News for hackers. Stuff that matters.

tryfinally

Re:NixOS 26.05 on Monday June 29, 2026 @12:09PM (#48721087)
I've ditched M$, switched to NixOS last month and I feel like I don't hate computers again. Shouldn't have procrastinated this for so long. All other operating systems feel so silly to use now (at least when they aren't anxiety- and rage-inducing).
The modern .NET runtime can get devirtualize interface calls and eliminate temporary object allocations in some scenarios. It's a bit of a black box - who knows when it actually works? - but still, it's a nice boost here and there.
C# 9, but with some hacks you can bump it up to C# 10 - actually works and surprisingly stable. Can't wait for them to finally migrate to CoreCLR, though.
Fans of LINQ may enjoy ZLinq[0], which is a less versatile but much more performant way to write LINQ-like queries. I certainly use a lot of (Z)Linq in my code; the performance tradeoff is just fine for one-off initialization, UI code, editor tooling, etc.

[0]: https://github.com/Cysharp/ZLinq

Re:C++ says "We have try at home." on Sunday December 28, 2025 @05:40AM (#46410098)
I always wonder whether C++ syntax ever becomes readable when you sink more time into it, and if so - how much brain rewiring we would observe on a functional MRI.
You add PolySharp to your source generator project to get back some of the modern C# features. https://github.com/Sergio0694/PolySharp
I do have an inner monologue, but I do make many decisions non-verbally. I often visualize actions and their consequences, in the context of my internal state. When I’m thirsty I consider the drinks available nearby and imagine their taste. In the morning coffee feels most tempting, unless I’ve already had a few cups - in that case drinking more would leave me feeling worse, not better. After a workout, a glass of water is the most expedient way to quench the thirst. It is similar when I write a piece of code or design a graphic. I look at the code and consider various possible transformations and additions, and prefer ones that move me closer to my goal, or at least make any sort of improvement. It’s basically a weighing of imagined possible world-states (and self-states), not a discussion.

I struggle to imagine how people can find the time to consider all of these trivial choices verbally - in my case it all happens almost instantaneously and the whole process is easy to miss. I also don’t see what the monologue adds to the process - just skip this part and make the decision!

That said, I do use an inner voice when writing, preparing what to say to someone, etc. and I feel like I struggle with this way of thinking much more.

Re:Technicalities of Homeworld 2 Backgrounds on Sunday March 23, 2025 @01:35PM (#43454403)
Thanks, this made my day! No wonder your pitch was a success.
I've been self-hosting this for years now, works flawlessly.
Re:C# almost has implicit interfaces on Friday July 26, 2024 @03:44AM (#41076621)
> Oh yeah and if the interface removed a method and you didn’t realise you might be dragging that useless methods for a long while. Then again it’s not like your Java-style interface is any different.

In C# I usually use explicit interface implementations. (They're inconvenient to type, but Rider has a macro for it.) When the interface changes or disappears, my code won't compile.

Well, yes, deadlines are best practice.
As a game developer, I definitely distinguish high-risk and low-risk parts of the code base.

There's code that can be allowed to fail, and furthermore, it will eventually fail due to the sheer amount of this code, the development time constraints, the number of possible game states, etc. I don't care that this code rarely fails under some arcane conditions, because this simply causes some button to stop working, some NPC to stop moving, but the game will continue working. Even if the player notices the bug, they'll just shrug and keep playing. My aim is to make sure that the game recovers and returns to a healthy state after the level/save is reloaded. (Obviously, I'd like to fix/avoid every single possible bug, but it's impossible in practice. You'll have more luck continuously tracking in your head how dangerous the code you're working on is. Also, you rarely have the luxury of being the only programmer on the team. Bugs will happen.)

The other kind of code is the core game system stuff, the low level stuff, the error handling stuff, the memory stuff, the pointer stuff. You must pay special attention while working on this code, because failures will straight up crash the process or bring the game into an irrecoverably broken state (eg. all objects stop updating, stuck in some menu, the player never respawns...). Bugs like these also highly prioritized by management. My update loop needs to be shiny.

Such is the reality of working on complex systems (or simple object-oriented programs ;))

Re:Why the M2 is more advanced that it seemed on Monday January 15, 2024 @04:18AM (#38998831)
You can store it and move it around, but arithmetic operations are prohibitively expensive without hardware acceleration.

(Note that bfloat16 has a different range than float16, so you can't interpret one as the other)

Re:Kagi.com is unstable for all regions on Friday January 12, 2024 @07:07PM (#38975890)
I’ll probably give DDG another go, even though their result quality would always eventually prove too annoying in practice.

By the way, I have no idea what your point is.

Re:Kagi.com is unstable for all regions on Friday January 12, 2024 @05:25PM (#38974977)
Funny coincidence, my subscription ends today. I’m switching to self employment and won’t be able to afford the service for a while. I wish it were more affordable, because the freeing feeling of not having to rely on google is irreplaceable.
I shipped mine to a friend who forwarded the package to me. They figured out what I'm doing, and I got an e-mail warning me that they'll ship the laptop, but I won't get warranty outside of the country they're shipping to, so not sure I'd recommend doing this.

Worth it, though. It's one hell of a laptop.

Re:Steam Deck OLED on Thursday November 09, 2023 @07:41PM (#38213444)
Precisely. Dyeing your armor black helps too.
I just put 64 gigs of (fast) memory and a (very fast) 4 TB SSD in my laptop for a total of $600.

In the MacBook Pro configurator the equivalent upgrades look like

36GB->64GB RAM: $400

1TB->4TB SSD: $1000

Re:What's new in C# 12: overview on Friday October 20, 2023 @11:14AM (#37957286)
It’s an extraordinary feature that is only intended for optimization of edge cases. Making the feature verbose and somewhat ugly to use seems like an intentional choice. This way if a beginner comes across this “confusing/weird looking” code they can look up the attribute and see what it does, whereas a more convenient/native syntax would be less recognizable and noticeable. This is similar to the idea that you should make ugly APIs ugly to use (to avoid giving users a false sense of security).
Worked for me at the start of my programming career. I had a few Stack Overflow answers (few hundred karma) and a fairly barebones GitHub profile.

I applied to a large local IT corporation. The person interviewing me (who was a team lead) simply assumed I have the skills necessary for an entry position and we pretty much skipped the technical part of the interview. (I ended up in a fairly fantastic team full of great engineers and coworkers. Turns out the guy who interviewed me was awesome at hiring.)

Re:A new C# MUD based on DIKU and ROM on Tuesday July 25, 2023 @04:25AM (#36859504)
Always interested in a C# game codebase, thanks for sharing!
I’ve noticed people’s sensory reactions to sweeteners can vary greatly. You can perceive them less or more strongly, they can be sugar-like or weirdly chemical-tasting, etc.

I used to have a very negative reaction to sweeteners in various soda drinks (I remember coke zero tasting so bad, I couldn’t force myself to drink it when I got it for free at a promo). I got used to it over time, now it’s not as repulsive (but nowhere as good as the sugary original either). So it can go both ways, depending on what association your brain and your gut builds over time.

I really want to try allulose sometime, apparently it’s very sugarlike. You can make caramel with it!

Re:Langchain Is Pointless on Sunday July 09, 2023 @04:27AM (#36652693)
> Debugging a LangChain error is near impossible, even with verbose=True.

(A while ago) I tried using LangChain and shortly gave up after not finding any way whatsoever to actually debug what’s going on under the hood (eg. see the actual prompts, LLM queries). It’s pretty ridiculous that this isn’t basic functionality, or at least it isn’t very discoverable.

I cannot imagine spending extended time with a framework without knowing what the internals are doing. I do realize this isn’t achievable on all levels with LLMs, but introducing more black boxes on top of existing ones isn’t solving any problems.

This is inexcusable, and provides no benefit other than intentionally confusing the reader. I wish companies were more afraid of using blatant dark patterns in whatever they publish.

I’m sure there’s a solution somewhere out there - perhaps a crowdsourced website akin to the Google Graveyard[0], or certain fact checking sites, where bad faith decisions could be archived and accumulated until it becomes obvious which companies are simply not worth the trouble of working with.

[0]: https://killedbygoogle.com/

Re:Userstyle for wider ChatGPT conversation window on Friday May 12, 2023 @04:41AM (#35913561)
This is a somewhat low-effort post, but I figured I might as well share because I've personally found the default layout to be extremely annoying.

I also added a snippet for hiding the severely anti-user "Enable chat history" button, in case you also constantly find yourself enabling data collection by accident.

> Another problem is the lack of guarantees that 100 years later the same company would care about frozen people at all

It’s not like they’re likely to change their business model to online advertisement. And assuming the tech actually becomes available, what do you think the future post-singularity post-scarcity society will do? Keep them old-timer heads frozen out of spite?

Either way, it’s a matter of probability. 0.000000001% of survival is a lot more than 0%. By the looks of it there’s a lot of Everett branches out there, too. It seems worth a shot to some people.

Re:Vikunja – The open-source, self-hostable to-do app on Saturday January 21, 2023 @06:41PM (#34472153)
Sure! My requirements are very simple, so my setup isn’t very complicated. The process isn’t precisely repeatable because each self-hosted app has different requirements, some require multiple containers, and so on.

I start with a template docker-compose yaml that contains the barebones: network settings, labels for Traefik (eg. Let’s Encrypt config), placeholders for the image/container name, volumes, env variables, etc. I fill this in based on the container I want to setup. Many self-hosted apps provide example docker-compose configurations - I often just merge them with my template by hand. It’s usually just a couple of lines.

I edit the files in vscode (but directly over ssh). Not a huge fan of editing YAML in the terminal.

Then, I execute an aliased command that goes something like this:

  docker-compose down ; docker-compose pull && docker-compose up -d && docker-compose logs -f
to see if the container stands up, and tweak if necessary.
Re:Vikunja – The open-source, self-hostable to-do app on Saturday January 21, 2023 @03:49PM (#34470353)
I host tens of self-hosted apps for various purposes, including ones similar to this one, all via docker-compose. Setting up new ones is a breeze (thanks to Traefik), backing up the configuration and data is trivial, upgrading to the latest version takes a few minutes at most. I’m confident my workflow is simpler and more convenient than yours. Granted, the initial investment to learn and understand the tools is pretty large.
Re:No Start Menu for You on Wednesday January 18, 2023 @06:18AM (#34425483)
I use this AutoHotkey oneliner. WIN+Space pins/unpins the current window.

    #SPACE:: Winset, Alwaysontop, , A
(Save to set-always-on-top.ahk, and create a shortcut to the script in %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. Optionally add #NoTrayIcon at the top of the script to get rid of the tray icon.)

Older »