Readit News logoReadit News
Hnus commented on Nixtml: Static website and blog generator written in Nix   github.com/arnarg/nixtml... · Posted by u/todsacerdoti
nothrabannosir · 20 days ago
I’m convinced when people say they “love flakes” , 95% of them just love fetchTree and lock files.

(Which is totally valid btw)

Hnus · 20 days ago
Fair, another thing I really like is you can do `nix flake show templates` and try to `nix flake init -t templates#trivial` and be like ahh so thats how its supposed to be done or init `full` and be like ok this flake thing can do a lot of things I didn't know it could do, you can then edit, delete and experiment.
Hnus commented on Nixtml: Static website and blog generator written in Nix   github.com/arnarg/nixtml... · Posted by u/todsacerdoti
entropie · 21 days ago
> your flake is not committed or staged

That has nothing to do with flakes. When I add a "module" to my repos its the same. I have to add it the git repos or nix does not "see" it. And yes, its pretty unintuitive.

Hnus · 21 days ago
It actually is specific to flakes. Classic nix commands can see untracked files just fine. Flake evaluation behaves differently because of how it decides which "scheme" to use:

> If the directory is part of a Git repository, then the input will be treated as a `git+file:` URL, otherwise it will be treated as a `path:` url;

This is why untracked or unstaged files disappear when using flakes:

https://github.com/NixOS/nix/blob/ec6789f9dafce41011418fe6fc...

Hnus commented on Nixtml: Static website and blog generator written in Nix   github.com/arnarg/nixtml... · Posted by u/todsacerdoti
lillecarl · 21 days ago
It's a pretty special language, lazy evaluation and very basic types. However after spending the time to learn it to an intermediate level I think it's pretty great.

Flakes are not great however, they're what happens when you "overdo it", sadly the momentum is behind flakes because some UX/DX improvements came along with them (lockfile in repo).

I think the stdenv being built on bash is worse than Nix language.

Module system errors can be very hard to troubleshoot because of lazy eval, sadly I can't see a reasonable solution without worse tradeoffs :(

Hnus · 21 days ago
The flakes were the main UX/DX improvement for me. Before them I honestly could not do anything. The learning curve was so incredibly steep it almost felt like the people behind Nix were being malicious or intentionally gatekeeping. You finally stumble onto something you can at least partly understand, but then the powers that be throw two last obstacles at you like,

First, flakes are "experimental", so you have to enable them. Back then there were like three slightly different CLI commands to do it, and it felt like none worked from like 5 tutorial tabs I had open, putting it `experimental-features =` into flake you are trying to switch to does not work obviously.

Then you hit the classic situation where your flake is not committed or staged, so Nix refuses to see it. And instead of telling you that, it prints this abomination of error message "error: path '/nix/store/0ccnxa25whszw7mgbgyzdm4nqc0zwnm8-source/flake.nix' does not exist" (https://determinate.systems/blog/changelog-determinate-nix-3...)

I would not wish learning Nix from zero on my worst enemy, and I say that as someone who uses nix-darwin, devShells, deploy-rs and so on every day. The UX/DX is really bad, but nothing else comes close to its capabilities.

Sorry for rant but without flakes I would not make it.

Hnus commented on DMT-induced shifts in criticality correlate with self-dissolution   jneurosci.org/content/ear... · Posted by u/Anon84
boppo1 · 24 days ago
I did it once. Felt like my consciousness rocketed "up" out of my body, but not up through physical space, through some 'adjacent' space. Then I saw/felt "infinity". There was no time, and I saw a hundu-esque god/goddess with infinite arms. I had no interest in eastern religion prior. Not disinterested either. I just didn't think about it, the way I don't think about golf.

It was a neat thing to experience.

Hnus · 24 days ago
I saw exactly the same infinite arms thing with zero prior interest in religion. It took me to place “I was once before and should know well” other entities protested because why bother when he needs to go back soon. Then I came back to my room and had no idea what to do with that experience.
Hnus commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
sudodevnull · 2 months ago
Sure, go try doing it and see what happens. Make sure to handle every verb, automatically connect, expo backoff, etc!
Hnus · 2 months ago
I literally do that, it is not that hard. Getting locked into framework with weird licensing is probably harder engineering problem to solve.
Hnus commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
Hnus · 2 months ago
HTMX can do all of that via OOB updates no?
Hnus commented on Libghostty is coming   mitchellh.com/writing/lib... · Posted by u/kingori
Hnus · 3 months ago
I would love to use Ghostty but it renders fonts so ugly on external monitors its impossible to use https://github.com/ghostty-org/ghostty/issues/4504
Hnus commented on Ruby on Rails Audit Complete   ostif.org/ruby-on-rails-a... · Posted by u/todsacerdoti
rubyfan · 6 months ago
Can you elaborate on why you think method_missing is bloat?
Hnus · 6 months ago
As another commenter said,

> it’s about your taste and philosophy.

Personally, method_missing goes against both of mine. It makes programs harder to reason about, more difficult to debug, and nearly impossible to `grep`. That said, I understand that this kind of flexibility is what some people like. I just don’t.

Hnus commented on Ruby on Rails Audit Complete   ostif.org/ruby-on-rails-a... · Posted by u/todsacerdoti
hotpocket777 · 6 months ago
> Also, it seems like every Ruby programmer I know only ever uses other dynamic languages like Python. It’s never like they’re experts in C++ or something and then decided to start programming in Ruby.

Can you expand on what you’re saying here or why you’re raising this is as an issue with ruby the language or rails the library?

Hnus · 6 months ago
Just a personal observation that made my communication with ruby developers hard as I cannot use concepts from strongly typed languages because they live in a word without them, but I guess it's more issue with me than them.
Hnus commented on Ruby on Rails Audit Complete   ostif.org/ruby-on-rails-a... · Posted by u/todsacerdoti
PapaPalpatine · 6 months ago
What an odd question lol. Yes, people like writing in Ruby. I’m one of the. Switched from C# in 2016.
Hnus · 6 months ago
You don't miss things like enums, exhaustive switch or any other basic language features? How about `method_missing` its such a crazy idea to me that something like this exists, I know why it exists but I am like why, why such bloat and complexity.

u/Hnus

KarmaCake day287February 14, 2017View Original