Better HN
topnewbestaskshowjobs
Log inSign up

turboponyy

433 karma · joined Oct 5, 2021 (5y ago) · 193 submissions

Submissions

comment 1w ago · link · parent

puter, simplify the proof make no mistakes

comment 1mo ago · link · parent

> It seemed reasonable to me record the deployment history in the repository

That doesn't seem reasonable to me. You'd be using Git for persistence concerns that are not directly related to source code management.

"Environment X had commit a1b2c3d deployed at 1970-01-01T00:00:00Z" is all you need to store, and I don't see why you'd want to do that in the repo itself. Commit a1b2c3d exists regardless of where or when it's deployed.

Store that data in the thing that handles the deployments.

comment 5mo ago · link · parent

Not really. If I'm using a linter, I go and configure the strictest possible ruleset, and only disable rules when justified on a need-by-need basis. It's just a matter of discipline.

comment 10mo ago · link · parent

I guess the Gnome-specific part is that Gnome comes with the Nautilus file browser, and the instructions add a script for Nautilus.

But yea, this will work as long as you have imagemagick and Nautilus installed.

comment 10mo ago · link · parent

I'm currently using niri (was previously using Hyprland).

Having used dwm-like tiling window managers for most of the time, I don't really care for the scrolling or dynamic workspace aspects of niri at all - in fact, I kinda dislike them (or haven't gotten used to them, at least). To me, it kills the point of a keyboard-centric desktop environment - which is the speed and lack of friction in making the window you want appear in front of your eyes.

Despite that, I still really like it. Mostly because I have so much more faith in its development. The documentation is excellent. The configuration file is sane, and not as arcane and ad hoc as the hyprland.conf format. The source repository looks well-maintained. Being written in Rust rather than C++ means onboarding new developers is easier. The discourse is more measured, owing to the lack of a somewhat stubborn lead maintainer in the case of Hyprland.

The surrounding ecosystem seems to be flourishing as well, with projects like Noctalia Shell, DankMaterialShell, and niri-flake natively supporting niri.

And perhaps most importantly, the out-of-the box experience is really nice. You have proper monocle and tabbed layouts without any compromises - features Hyprland has still not developed, where they are only possible with scuffed C++ plugins, or where its BDFL has stated they will never be introduced. Most features one would expect from a WM are already there and well-documented, which can't be said about Hyprland.

comment 10mo ago · link · parent

Exactly.

"GitHub actions bad" is a valid take - you should reduce your use to a minimum.

"My build failed because of GitHub actions couldn't install a dependency of my build" is a skill issue. Don't use GitHub actions to install a program your build depends on.

comment 10mo ago · link · parent

Samesies - need a Majjit before I can consider trying it out.

comment 11mo ago · link · parent

> If Vizo never licensed the software to you under the GPL [...]

That may be true.

> [...] you can't say they violated the GPL.

That does not necessarily follow.

If they used GPL-licensed code in their product, they may be obligated to provide the source code to that product's consumer.

comment 11mo ago · link · parent

No, you really don't have to. Partially complete software can have a lot of value too.

Anyone can fork it and quickly add the i18n (or just translate into a different language) for their own purposes. People will likely want to contribute i18n. People may fix or improve things for you.

Of course, it's entirely up to you - but I've appreciated half-complete software countless times before.

comment 11mo ago · link · parent

I have the same disagreement. TypeScript with its structural and pseudo-dependent typing, somewhat-functionally disposed language primitives (e.g. first-class functions as values, currying) and standard library interfaces (filter, reduce, flatMap et al), and ecosystem make propagating information using values extremely ergonomic.

Embracing a functional style in TypeScript is probably the most productive I've felt in any mainstream programming language. It's a shame that the language was defiled with try/catch, classes and other unnecessary cruft so third party libraries are still an annoying boundary you have to worry about, but oh well.

The language is so well-suited for this that you can even model side effects as values, do away with try/catch, if/else and mutation a la Haskell, if you want[1].

[1] https://effect.website/

comment 12mo ago · link · parent

It is unique and looks cool.

When it comes to providing an enjoyable blog post reading experience, it really does creep into the "fuck off" territory for me, though.

comment 12mo ago · link · parent

Even better is "" since it's not really adding anything

comment 1y ago · link · parent

`for` loops are a superfluous language feature if your collections have `map` for transformations and `forEach` for producing side effects

comment 1y ago · link · parent

It's quite nice for the following reasons:

- Image previews (for file management with dired/dirvish)

- PDF viewing

- In-buffer images (e.g. profile pictures in git log with Magit)

- Browsing simple HTML pages (e.g. API docs)

There's probably more I've yet to discover.

comment 1y ago · link · parent

You only need that much protein if you're trying to build muscle. The amount needed for a generally healthy diet is much lower.

comment 1y ago · link · parent

If that's something you care about, then don't define your CI build in terms of GitHub Actions steps. Instead, call your build that takes care of using whichever version of Node you want in CI.

comment 1y ago · link · parent

I actually completely agree with both the article and your point that your code should directly communicate your intent.

The angle I'd approach it from is this: recording whether an email is verified as a boolean is actually misguided - that is, the intent is wrong.

The actual things of interest are the email entity and the verification event. If you record both, 'is_verified' is trivial to derive.

However, consider if you now must implement the rule that "emails are verified only if a verification took place within the last 6 months." Recording verifications as events handles this trivially, whilst this doesn't work with booleans.

Some other examples - what is the rate of verifications per unit of time? How many verification emails do we have to send out?

Flipping a boolean when the first of these events occurs without storing the event itself works in special cases, but not in general. Storing a boolean is overly rigid, throws away the underlying information of interest, and overloads the model with unrelated fields (imagine storing say 7 or 8 different kinds of events linked to some model).

comment 1y ago · link · parent

I have Emacs set up like VSCode. I feel it surpasses VSCode, even because it's Emacs.

comment 1y ago · link · parent

Can you edit commits by adding on only parts of your "staging" area?

Because that's my workflow. I produce a few focused and semantically coherent commits that I'd like to apply to the codebase, where each keeps the codebase in a working state. I might be working on more than one thing at once, but I know which commit each set of changes should "live in."

An append-only log of commits is decidedly not something I want. Is jj amenable to this?

comment 1y ago · link · parent

> While I can jump through hoops to compile JavaScript into a binary, such wouldn't feel "solid". And the very point of writing a native program in the first place is to make it feel solid

You can use Bun to compile to native binaries without jumping through hoops. It's not mature, but it works well enough that we use it at work.

comment 1y ago · link · parent

Or, in a browser that's presumably displaying the website:

    btoa("Hello World")

comment 1y ago · link · parent

"Look what they need to mimic a fraction of our power" - some Emacs user, probably

comment 1y ago · link · parent

> It turns out that there’s a way to test this experimentally. Do a double blind experiment, just like in science. If you can tell which monitor is 240hz more than randomly, then it matters. Ditto for the pointer updates.

You can easily tell - easily. There is a reason why monitors go 500Hz and beyond now.

I consider 240 FPS at 240Hz to be choppy. I can tell the difference between ~200 FPS and framerates of 300 FPS and beyond at 240Hz - telling the difference between 120Hz and 240Hz would be absolutely trivial.

comment 1y ago · link · parent

Yes, because the visual feedback on your client matters as well (faster reaction times).

Also, it means each frame is more recent. Also, higher refesh rates reduce the mean variance between the timestamps of rendered frames offered by the GPU that are drawn on the monitor, meaning the visuals are smoother. The smoothness is pleasing to the eye and makes it easier to focus.

comment 1y ago · link · parent

Yea, the examples are wrong, and I'd interpret them the same way.

The principle is something I agree with and try to abide by, though.

comment 1y ago · link · parent

The modeness of vi does add friction in some cases, but it's a minor gripe, really.

Vi is incredibly well-suited and ergonomic for text editing, and switching between the modes is efficient, since often times you want to begin typing text as a consequence of some other normal mode operation you'd want to take anyway - e.g. add line below; change until end of line; change in parens; change up to character - and those operations put you immediately into insert mode afterwards anyway.

So I wouldn't let that feature (which enables making common operations more ergonomic) stop you from using vi-style binds.

Though modelessness can be quite nice, and I do see the appeal. Being able to select a region and immediately perform any desired operation is convenient.

What's great is that Emacs is what you make it - you can mix and match the two approaches. I, for example, use vi binds for text editing in Emacs, but maintain modeless binds I can always access when it makes sense. You can have the best of both worlds :)

comment 1y ago · link · parent

> It's better to say that some functions like "does this program halt?" simply don't exist.

Let f : (p: String) -> Boolean equal the function that returns True if p is a halting program, and False otherwise

comment 1y ago · link · parent

Glossing over some details, the build artifact and build definition are equivalent in Nix. If you know the build definition, you can pull the artifact from the cache and be assured that you have the same result.
1234567