Better HN
topnewbestaskshowjobs
Log inSign up

TonyStr

509 karma · joined May 13, 2023 (3y ago) · 227 submissions

https://tonystr.net
Submissions

comment 10mo ago · link · parent

You are completely right about tvc ls recomputing each hash, but I think it has to do this? A timestamp wouldn't be reliable, so the only reliable way to verify a file's contents would be to generate a hash.

In my lazy implemenation, I don't even check if the hashes match, the program reads, compresses and tries to write the unchanged files. This is an obvious area to improve performance on. I've noticed that git speeds up object lookups by generating two-letter directories from the first two letters in hashes, so objects aren't actually stored as `.git/objects/asdf12ha89k9fhs98...`, but as `.git/objects/as/df12ha89k9fhs98...`.

>why were TOML files not considered at the end I'm just not that familiar with toml. Maybe that would be a better choice! I saw another commenter who complained about yaml. Though I would argue that the choice doesn't really matter to the user, since you would never actually write a commit object or a tree object by hand. These files are generated by git (or tvc), and only ever read by git/tvc. When you run `git cat-file <hash>`, you'll have to add the `-p` flag (--pretty) to render it in a human-readable format, and at that point it's just a matter of taste whether it's shown in yaml/toml/json/xml/special format.

comment 10mo ago · link · parent

Is it possible to commit individual files, or specific lines, without a staging area? I guess this might be against Fossil's ethos, and you're supposed to just commit everything every time?

comment 10mo ago · link · parent

This page is beautiful!

Bookmarked for later

comment 10mo ago · link · parent

Interestingly, I looked at github insights and found that this repo had 49 clones, and 28 unique cloners, before I published this article. I definitely did not clone it 49 times, and certainly not with 28 unique users. It's unlikely that the handful of friends who follow me on github all cloned the repo. So I can only speculate that there are bots scraping new public github repos and training on everything.

Maybe that's obvious to most people, but it was a bit surprising to see it myself. It feels weird to think that LLMs are being trained on my code, especially when I'm painfully aware of every corner I'm cutting.

The article doesn't contain any LLM output. I use LLMs to ask for advice on coding conventions (especially in rust, since I'm bad at it), and sometimes as part of research (zstd was suggested by chatgpt along with comparisons to similar algorithms).

comment 10mo ago · link · parent

haha, maybe that's the next project. It did feel weird to make git commits at the same time as I was making tvc commits

comment 10mo ago · link · parent

haha, thank you. Added now :-)

comment 10mo ago · link · parent

Very interesting. Looks like fossil has made some unique design choices that differ from git[0]. Has anyone here used it? I'd love to hear how it compares.

[0] https://fossil-scm.org/home/doc/trunk/www/fossil-v-git.wiki#...

188.

I made my own Git(tonystr.net ↗)

382 points · by TonyStr · 10mo ago · 176 comments

comment 10mo ago · link · parent

> steam engines only came about after people had spent centuries building cannons that didn't explode

That's an interesting insight. I had not thought about the possibility of a scientific understanding of pressure developing prior to the steam engine. If you have some pointers to read up on this, I'd love to learn more.

Also, there were demands for pumps in antiquity, particularly in hydraulics. Lot's of labor was invested in building aqueducts and underground waterways. I always saw the Aeolipile as a tech demo showing that heat can be used as a power source for mechanical motion, but this is probably because I live after the steam machine, knowing it's true potential. I've long wondered why the idea wasn't expanded upon by the Romans or later the Greeks or Egyptians, but I suppose it wasn't convincing enough on its own.

comment 10mo ago · link · parent

I think you are completely right about demand pull being a deciding factor in adoption of new inventions. Many question why Rome never entered the industrial revolution, especially considering that they invented a steam engine[0].

Although I would question if multiple hours of daily labor isn't itself a significant demand pull? I assume everyone wants to free up time spent on monotonous tasks, but maybe this is wrong.

[0] - https://www.wikiwand.com/en/articles/Aeolipile

comment 10mo ago · link · parent

It's bewildering to see privacy-focused companies like Proton and DDG jump on the AI train. I guess privacy is just a vehicle for attracting early adopters, and all those principles fall apart once their user base becomes large enough.

comment 10mo ago · link · parent

Dont forget `*` and `#`. Idk if other editors have this now, but before learning vim, I used to ctrl+shift+arrow_keys to select a word, ctrl+c, ctrl+f, ctrl+v, Enter in order to move around in code. Discovering `*` and `#` in vim was mindblowing

comment 10mo ago · link · parent

I 100% agree, but I also think you can get very far with just taking a weekend to read the user manual (:h user-manual). It won't solve the remembering problem, but it will make looking up help when you need it much easier. For example, you would know that most window operations start with <C-w>, so when you need to tile windows you could start with looking up `:h ctrl_w`.

There is also a very popular plugin for neovim that shows a popup with possible keybinds and descriptions whenever you begin any keybind: https://github.com/folke/which-key.nvim

comment 10mo ago · link · parent

A smart, and by no means technically incompetent friend of mine struggled to get a software product to run. He would reinstall it, try different configuration, uninstall plugins, yet every time he tried running it, the program gave the same error message. I asked him to read the error, and it very simply stated that it was failing to create symlinks because the the disk was formatted with ExFAT. Had he just piped this message into ChatGPT, he would have avoided hours of debugging.

195.

Git Show(tonystr.net ↗)

2 points · by TonyStr · 10mo ago · 1 comment

comment 11mo ago · link · parent

Nope, it's too late. It sounded stupid when they called it AI in the start, but now AI means something like "tools that can perform tasks that typically requires human faculties to complete". Just like a computer does more than compute, words change meaning, sometimes influenced by marketing.

comment 1y ago · link · parent

Assuming you used neovim, did you try neogit? It promises to be a magit clone for vim, but I'm curious how faithful it is. I've never used magit, so I don't understand what's so nice about it. Would be interesting to hear a long time emacs user's opinion on neogit.

comment 2y ago · link · parent

Thank you for introducing me to this! Life transferring files and holding presentations will be a lot easier from now on

comment 3y ago · link · parent

Was about to say! Real life Jean Valjean

comment 3y ago · link · parent

I used a debloater on my windows 11 laptop which also removed edge. No big deal since Firefox is my browser if choice, but I'm a Web developer and need to test my apps in different browsers. I've tried to install edge multiple times, but I can never get it to work.

comment 3y ago · link · parent

Do you have any resources on learning colour theory? I can make things look good through experimentation, but I rarely understand why.

comment 3y ago · link · parent

Which they absolutely are doing, but it's difficult to provide public transport anywhere else than the big cities when only about 2% of Norway is inhabited. The price of public transport is not what's keeping people from using it, but the fact that many people live outside the big cities and have to travel to them for work. Depending on where you live, commuting to the city may be very unwieldy. Oslo has been building out more train tracks recently which make travel time much quicker for a lot of people living outside the city.

comment 3y ago · link · parent

I have never given emacs a fair shot, so I can't compare the two. Neovim makes it easier to get modern editor features like treesitter and lsp support integrated into the editor. The Lua api seems to have been very well received, so the plugin ecosystem for neovim is thriving. It has also attracted a lot of people outside of the original vim niche (including me!) recently, which means there are more plugin developers who care about how things look and feel to use.

There are certainly some constrains on what plugins can achieve due to nvim being exclusively a TUI, but in my opinion the pros of the editor outweigh the cons.

As to what makes me choose neovim over vscode with a vim plugin, it's a combination of things. One thing I love is that neovim is extremely easy to configure. I also enjoy that everything follows vim rules, rather than some things like file trees or consoles having their own unique rules. I have also become dependent on some vim plugins that don't exist in vscode.

comment 3y ago · link · parent

I'm a 22yo front end dev with (neo)vim as my primary editor. I'm not missing anything from Vscode.

comment 3y ago · link · parent

vi"p or vi"P is a great way to overwrite "" contents with the contents of your unnamed register

comment 3y ago · link · parent

What does `%!python -m json.tool` offer that `%!jq` doesn't?

comment 3y ago · link · parent

Curious about which extensions are keeping you in vscode?

comment 3y ago · link · parent

R.I.P. Today is the day to donate to ICCF.

comment 3y ago · link · parent

How do Ergo layouts make it harder to touch type? I learnt touch typing after getting my first ergo keyboard, but I found it a transferrable skill to normal qwerty staggered keyboards with little need for adjustment. My error rate might be 1% higher on none-ergo keyboards, but otherwise I don't notice much difference.

For reference, I use a ZSA Moonlander.

1
45678