News for hackers. Stuff that matters.

techhazard

Re:Why Does Everyone Hate Haskell, Jazz, and Pure Math? on Monday August 05, 2024 @02:20PM (#41163877)
> I've noticed with untyped code that at some point HOFs start becoming hard to write because the layers of abstraction get confusing […]

I have the same with Nix (from NixOS).

It’s a really nice idea to have a functional language that compiles to a working linux installation, but those abstract functions can get really complicated, especially when I return to something I wrote six months ago.

It makes me really miss Rust’s type system…

Re:Ask HN: Anyone here burnt out of the AI hype? on Friday July 05, 2024 @04:52PM (#40885895)
Yes, very. ML and LLM has its specific uses, but every company is slapping “AI” onto everything and it’s so stupid. Have you heard about the AI rice cooker…?[1]

You might enjoy the talk Adam Conover had with Ed Zitron[2]; I found it quite cathartic.

1: https://ifdesign.com/en/winner-ranking/project/ai-rice-cooke...

2: https://youtu.be/T8ByoAt5gCA

Re:The Death of NYC Congestion Pricing on Friday June 28, 2024 @05:16PM (#40825383)
Exactly! If you only look at the commute, you get ridiculous things like commuter trains, that only run in the morning in one direction and in the afternoon in the other.

In the Netherlands for example, lots of people go by car to Work, because that’s relatively far away; but then they’ll use their bike or transport for everything else. Stuff like groceries, dentist visits, meeting friends, going to the gym, etc. because all those things are within (their district of) the city.

We’re slowly inching closer to: Say McDonalds to end commercial [1]

1: https://web.archive.org/web/20230122044853/https://www.altch...

That’s likely because it’s unable to print the tracking dots[1].

1: https://en.wikipedia.org/wiki/Machine_Identification_Code

I now run NixOS, so that’s a non-issue for me.

But even so, it’s not hard, you have to install the ZFS package and make sure it’s included in your initramfs (if you use ZFS for / ).

On arch I used the linux-lts kernel with ZFS and never had any issues in three years.

Re:Ask HN: How do you do backups for personal/home server? on Saturday June 10, 2023 @09:01AM (#36270096)
Desktop, Laptop, NAS and Server all run on ZFS and push snapshots to an extra backup pool on the Server (colocated in a DC).

Those backups are also pushed to an offsite location (with a hosting provider).

Laptop and NAS run on a single disk rootfs, Desktop and Server run on mirrored nvme drives.

Re:NixOS for the Impatient on Friday June 09, 2023 @04:04PM (#36263409)
I use colmena[1] to manage one nixos configuration for multiple machines: - laptop - desktop - server - rpi nas

I also wipe my entire rootfs every boot with a zfs snapshot rollback[2] using the impermanence module[3] to keep specific stateful data one one of two datasets with regular snapshots: one is backed up with zfs send, the other is just for cache between reboots.

It took a little puzzling to get started, because I didn’t know about the impermanence module at first, so I built my own hacky solution. But I really love this setup. And the way I don’t have cruft to clean.

Also my backups are so much smaller now :’-)

[1]: https://colmena.cli.rs/

[2]: https://grahamc.com/blog/erase-your-darlings/

[3]: https://github.com/nix-community/impermanence

Re:Jsonnet – The Data Templating Language on Monday March 27, 2023 @04:17PM (#35331849)
Not OP, but I can highly recommend just using the programming language you already use to make key-value map to and then converting that to JSON. That way you only have 1 syntax to worry about. In my case that’s Python (using dictionaries and json.dumps)

You could also try for a templating framework (like jinja2) but then you have 3 syntaxes colliding: the programming language you call the templating engine with (e.g. Python for jinja2) the templating language itself (e.g. jinja2) and then JSON as well.

Do you have any references about what they got wrong and what the more traditional stories are?

I expected they took some liberties for storytelling purposes, but if it’s as egregious as you make it out to be, I’d love to hear the common versions of the stories.

Exactly, self-driving cars do not solve the car problem; Good public transportation does.
This is no perversion of capitalism. Companies have only one responsibility: to increase profits to the shareholders.

All other responsibilities have to be legally enforced; stuff like worker safety, food safety, minimum wage, 8-hour workday, no child labour etcetera.

These are all things companies will gladly ignore if it profits them. Minimum wage in this case, through a loophole of payback.

Re:Scaling Mastodon with systemd template units on Tuesday November 29, 2022 @05:55AM (#33786003)
> Requires=network.target tells systemd not to start this mastodon.target if the network.target hasn’t been reached successfully.

That’s not true, Wants=/Requires= do not specify any order between units, only that without them the unit cannot be marked as succesful. This way they can still be started in parallel.

If you really want it to happen after network is up, you should add a dependency of After= under the Requires=.

Also network-online.target might be a better choice but YMMV.

I’m also very happy with my Ergodox EZ, and a trackball mouse.

The configuration of the keyboard is highly flexible and super easy, and no software on the pc is needed (only to flash the updated config).

I’ve also used a Kinesis Advantage in the past, which was amazing. But that was my boss’s, so I had to leave it.

Apart from that I’m using the Dvorak layout, which gives me a much better typing experience than querty; way less fingerstreching.

Re:I use Attrs instead of Pydantic on Thursday August 26, 2021 @06:13AM (#28312849)
I also prefer my python to stay simple.

Maat looks really interesting for this use-case.

Re:Asynchronous Tasks with FastAPI and Celery on Wednesday May 12, 2021 @05:57AM (#27128538)
I haven't heard of RQ before, but on first glance they look pretty similar.

The main difference I see is that meesee workers are always setup as python programs, whereas RQ workers are separate programs. (calling a `rq` program insead of `python3 my_worker.py`) Though looking at the docs tells me that RQ can do the latter as well.

Re:Asynchronous Tasks with FastAPI and Celery on Wednesday May 12, 2021 @05:30AM (#27128380)
Personally I prefer meesee[1], because setting up Celery or other big worker systems is always a lot of work, and they have more components than I usually need.

Meesee is an elegantly simple worker system (written in python) using redis as a backend, and it works really well if you don't need all those extra features that stuff like Celery give you.

You just need a redis instance and then you're good to go :)

1: https://github.com/Attumm/meesee