Better HN
topnewbestaskshowjobs
Log inSign up

jdxcode

1,380 karma · joined Mar 19, 2020 (6y ago) · 457 submissions

https://github.com/jdx
Submissions

comment 1y ago · link · parent

of course I selected the best benchmark. Once I ran a benchmark that had higher numbers I edited my response—I was up front about that. So far 0 benchmarks show that lefthook is faster and I doubt there could be one knowing how both of them work. I'm not just creating scenarios where I know hk will outperform but I'll certainly highlight the best one.

> then you removed the parallel support

that was not intentional. I fixed that, but it didn't change the results that much:

https://github.com/jdx/hk/commit/dfe1fc1724b8f6c43b184dc98ac...

In any case, I don't know why anyone would take such a new project "seriously". I certainly don't.

comment 1y ago · link · parent

mise is my solution to that problem. I don't think it should be the job of a hook manager to install things developers should have installed for other reasons anyways.

comment 1y ago · link · parent

pkl is so good I don't think I need plugins for hk

comment 1y ago · link · parent

it just needs to define shell script

comment 1y ago · link · parent

This project is brand new. I've only spent 3 days on it and this doc I half finished today. That said, I just did some benchmarks and it certainly is much faster than its peers. 4.6x faster than lefthook and 6.1x faster than pre-commit (in the best case).

I'll put these benchmarks on that page in different scenarios.

Update: https://github.com/jdx/hk/blob/main/docs/public/benchmark.pn...

As I said in the doc I think real-world performance in a large codebase will show that hk is even faster still—though that will depend on the project in question. It's really just a matter of providing the right levers in the right places and having good defaults.

Despite what everyone here says: yeah, just doing CLIs in Rust will be faster than Go and for CLIs like this milliseconds matter.

comment 1y ago · link · parent

I also looked into WASI as well as lua until I ultimately decided that I think I can get rid of the concept of plugins altogether in favor of pkl. We'll see how well that works out but right now I don't have any use-cases that would require plugins and if I can stick to that it will definitely help performance.

comment 1y ago · link · parent

I haven't even built it, let alone benchmark it. I don't think people are realizing this thing is like a 3 day old project (in terms of actual work). The about page is a bunch of scratch I wrote today (and didn't even finish that doc before I moved onto something else).

comment 1y ago · link · parent

don't know the specifics of this situation, but in general it's common for governments to simply not enforce laws making actions illegal but tolerated.

comment 1y ago · link · parent

I agree, overzealousness sounds like the most likely reason for this.

> Starting on January 19, 2025 Facebook's internal policy makers decided that Linux is malware and labelled groups associated with Linux as being "cybersecurity threats".

The author gives no evidence to back up on this claim.

comment 1y ago · link · parent

do you happen to have any examples of what didn't work well? I'm just curious as I switched to vscode and later jetbrains after a decade with vim and I find all of them to be great, though I usually have to modify an option or 2 to get it how I like

comment 1y ago · link · parent

what the heck is "four-dimensional drag-and-drop"?

comment 1y ago · link · parent

I totally see the point of this, but still, you have to admit this is pretty funny:

> Developers sometimes experience trouble debugging the quarter-million line amalgamation source file because some debuggers are only able to handle source code line numbers less than 32,768 [...] To circumvent this limitation, the amalgamation is also available in a split form, consisting of files "sqlite3-1.c", "sqlite3-2.c", and so forth, where each file is less than 32,768 lines in length

comment 1y ago · link · parent

homepod?

comment 1y ago · link · parent

that's not how meson describes itself:

> Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.

now I've never used it, so I can't directly defend that claim. I have heard good things about meson though and it would seem strange to me such a headline would make sense on a project that I also hear good things about.

comment 1y ago · link · parent

what about meson?

comment 1y ago · link · parent

> If mise watch -t run -- -r is too hard to remember

in recent versions this can be simplified to `mise watch -r run`

107.

Fish 4.0: The Fish of Theseus(fishshell.com ↗)

906 points · by jdxcode · 1y ago · 198 comments

comment 1y ago · link · parent

I am very difficult to please when it comes to dotfile managers. I tried all of them and I'm quite fond of rcm[0]. It's been a few years so it's hard for me to remember exactly what it was but I think both chezmoi and yadm involved some kind of step to "apply" changes but I just want things symlinked into a dotfiles repo that I have a cron job which basically does `git ci -a && git push` to synchronize changes.

That said, I don't think rcm should be anyone's first choice. I'd check it out if nothing else seems to work for you. From what I hear, chezmoi seems to be most people's favorite so I'd start there. I don't know a single other person that uses rcm.

[0] https://thoughtbot.github.io/rcm/rcm.7.html

comment 1y ago · link · parent

> Also, what's with using unofficial Python builds by default? Even on platforms where official builds exist (macOS/Windows)? I get that these standalone builds solve certain problems (like bootstrapping), but it feels like a risky shortcut. If those unofficial builds go unsupported or change directions, where does that leave "uv"? Why not at least give users the option to rely on official binaries?

The official macOS binaries wouldn't work for uv because they're not portable. They're also taking ownership over the indygreg project which is a great thing for everyone since portable pythons are useful in a lot of contexts. I'm sure they'll start sending some of the portability changes upstream too once they get there.

I don't see how this is criticism.

comment 1y ago · link · parent

I've settled into a mostly daily cadence. If there's a day with more than 1 it's because there is a relatively serious bug that I don't want anyone to need to wait around for—those are the releases you should actually pay attention to so you're not missing something important. It's true I used to do more but I've dialed this back in recent weeks.

That said, it's a selfish strategy that benefits me more than anyone. It ultimately means I don't spend as much time fixing bugs since resolutions go out quicker and users get to test them (often whether they want to or not) while the issue is fresh in my head and I can quickly make an adjustment if needed.

I know especially package maintainers such as yourself would prefer I have nightlies for this purpose and then less frequent releases but that's more work for me and means users generally will be testing changes with a bigger delay.

Users may also think they want this but I actually think it wouldn't serve their interests—it'd mean I spend less time actually improving mise and more time with logistics. I'm also terrible at release notes and commit messages and I'm not sure it's an area I want to improve in simply because that would come at the cost of doing other things. I also don't like doing that stuff and this is (ostensibly) a hobby after all.

That said, I'd really appreciate if you came by our discord and had a conversation about this with me. While those are my reasons for the way things are I'm also certainly not opposed to change. With homebrew I have a release hook to automate this process and perhaps we could do something similar for MacPorts. We could even automate every N releases or something if you think that would be better.

comment 1y ago · link · parent

> And where are those mystery meat binaries supposed to come from?

the vendor

comment 1y ago · link · parent

I try not to be annoying best I can, but in the `mise trust` case I had to opt for tightening security even if it meant a bit of friction.

comment 1y ago · link · parent

I really appreciate that. It's definitely something I get a ton of satisfaction about of building. Drop by our discord and let me know how it goes!

comment 1y ago · link · parent

I don't understand how people don't notice the massive tax they're paying by using nvm:

    $ hyperfine "~/.nvm/nvm.sh" "mise env"

    Benchmark 1: ~/.nvm/nvm.sh
      Time (mean ± σ):      1.722 s ±  0.032 s    [User: 0.064 s, System: 0.112 s]
      Range (min … max):    1.684 s …  1.805 s    10 runs
     
    Benchmark 2: mise env
      Time (mean ± σ):      13.4 ms ±   5.7 ms    [User: 10.0 ms, System: 21.3 ms]
      Range (min … max):     9.4 ms …  42.2 ms    29 runs
      
    Summary
      mise env ran
      128.14 ± 53.94 times faster than ~/.nvm/nvm.sh
100x is definitely something you'll notice

EDIT: for some reason in discord we're getting very conflicting results with this test. idk why, but maybe try this yourself and just see what happens.

comment 1y ago · link · parent

you should see this in tomorrow's release, or you can install with cargo from main branch now: https://github.com/jdx/mise/pull/3414

comment 1y ago · link · parent

it's very possible, I don't recall when/why I added it

comment 1y ago · link · parent

system updates causing breakages with mise tools would be news to me
12345
16