News for hackers. Stuff that matters.

JamesTRexx

Re:Bring Back Crappy Forums on Thursday July 02, 2026 @12:00AM (#48756399)
Browser warning: www.catb.org uses an invalid security certificate.
Re:OpenTTD 16.0-Beta1 on Saturday June 27, 2026 @10:43AM (#48698733)
I calculated it long ago but I can't find the original notes. It can be extrapolated from the default 74 ticks a day (and the distance represented by 1 tile) to ((33 ticks per cpu second) * 86400) in my patch, and I think it came about a tile size of around 8 metres or so. Too long ago to be sure, but I found a time speedup of 4x compared to realtime was a good compromise. It made transport by slow vehicles viable to keep factories running, or a lot less were needed to keep up deliveries. The newer setting for minutes per tick made realtime possible eventually. I had it set to 11, I think.

It was also quite easy to limit production (or passengers) in the code from 06:00 to 20:00 a day for a little extra realism with either emptying a station during the night or have no traffic servicing buildings. Even weekends are possible. Warehouses would be a nice addition.

Re:OpenTTD 16.0-Beta1 on Saturday June 27, 2026 @06:50AM (#48697093)
> Separating locomotives from trains next? Someone wrote a patch for version 8 or 9 years ago which enabled coupling and decoupling, although one needed to set it up in a specific order to avoid failing couplings or train crashes. It's a shame the devs never picked it up.

> And then, finally, hump yards? I doubt a hump yard will ever be a feature because as far as I see it, it would need a complete overhaul of the way orders are set up and handled. Right now it's one semi-static order list for the whole train and a sorting yard needs dynamic order lists per locomotive and each wagon.

Re:OpenTTD 16.0-Beta1 on Saturday June 27, 2026 @06:38AM (#48697022)
I made version 12.2 my programming hobby project. First time I tackled it years ago was to have it run at real time instead of the default fast pace (even with the day length patch). Worked great including a feature to really schedule routes and have working yards for vehicles to wait. But when I wanted to change internal mechanics to add other features I hit the spaghetti code wall several times (and the code after 12.2 is just more complex with every version bump).

Took a break from it for a while and picked it up again, this time by not doing anything much feature-wise but pulling the code apart and de-C++-ing it. Bit by bit building a categorised code tree with single functions per file, deconstructing classes to plain functions and data structs, with the goal to convert from C++ to clear C. And then one day consolidate code to have for instance the same diagonal road options as current train tracks.

Might be pointless and take a long time to finish, but it's comforting to turn something overly complex into simple, small pieces and also create a unique code formatting style to visualise elements of a line of code for easier reading. Another fun part is reading about data design and coming up with a custom data container to replace the std::vector uses.

I already have the NS Flex free weekend subscription (with 1st class addition) and it's the only way for me to travel longer distances. It's also just about the only available public transport in the neighbourhood because I live in a polder.

Nearest train station is a 35 minute walk, nearest supermarkets are almost an hour walk. One advantage, before Covid and I had groceries delivered, mandatory walking back and forth three times a week to the village did wonders for losing weight.

Just about obligatory mention of Pale Moon here. Have had a relatively clean internet experience for years with the old Firefox uBlock extension in combination with eMatrix. *Includes a disclaimer because I don't use Youtube and other assorted "social" media websites.

Only need Firefox ESR for a handful of websites giving me no option when specifying a Linux/Mozilla user agent instead of the native one for those doesn't work.

Re:Should you normalize RGB values by 255 or 256? on Tuesday June 02, 2026 @03:06AM (#48366969)
Why not (uint8_t) ( float * (256/255) ) * 255?
Re:Comparison shows audiophiles waste a lot of money on Sunday March 29, 2026 @12:59PM (#47564921)
I've been an audiophile for a few years during early twenties because it was fun to check out new and used equipment every weekend in the store I frequented, listened to various great music, and read reviews in various magazines. I had enough disposable income to afford a nice set of highly regarded yet less hyped brands, and even once helped out set up a set with a pricetag of a good house.

Life changed and eventually gave up on the hobby while still being drawn to music and the technology behind audio. Then a "golden" kick out the door of one employer meant I could build the speaker set I had in mind based on Siegfried Linkwitz's knowledge. The total cost for the speakers was about 2000,- but it did take between 2000 and 3000 for a fully active setup with two subwoofer towers and two 3.5 way main towers, all open baffle.

I have never heard a more perfect three-dimensional soundstage before and after, and it still sounds like the artists are actually playing in the livingroom even from other parts of the house. This was kind of Siegfried's message about good sound, the speakers are what make it (electronics are more than good enough at low prices) as long as they're made on scientific grounds, and not another heavy set of hyped monkey coffins. I have reached my audiophile end goal without forking over a fortune. Also fun, I came across one of the only two or three Yamaha CD-1 players made for Europe back then as a trade-in, one rarity I kept as souvenir of those early years. ;-)

4chan doesn't need age checks, everyone knows there are only five year olds on it. :-p
That was the whole point of me drinking in the evening, to decline my cognitivity of the idiotic world I had to deal with during the day.

Unfortunately it doesn't work as well nowadays while the world became more idiotic.

Re:Peter Thiel's Antichrist Lectures on Friday March 13, 2026 @08:19AM (#47363439)
Religion is just one of the excuses/covers used to grab more power and/or shiny baubles by psychopatic people. And there are the ones who just want to see others suffer no matter what. Most of the people that are left don't feel like lifting a finger unless it directly endangers their own comfortable life.

Call me cynical, but I haven't seen any improvement in human nature in 50 years.

Re:What Happens After You Die? (2016) on Thursday March 12, 2026 @10:34AM (#47351119)
Thanks!
True. Seems self-preservation is strong in our genes and can manifest in strong greed or prefering to avoid (direct) conflict with the greedy.

Humans are not always social creatures on all social fronts.

Re:What Happens After You Die? (2016) on Thursday March 12, 2026 @06:01AM (#47348534)
I don't worry about decisions. Once they're made, they're made and life continues unless there's a good reason and possibilty later to change it. I just like to know where the world as a whole is headed to (before the inevitable supernova event, I'm just curious).

There was also nothing important coming to mind. Family and friends is a small group and I have every bit of confidence they'll do just fine without me. I just hope they'll have a fun party as a final goodbye to me. :-)

Besides, death is the ultimate "What, me worry?" as there is nothing left. Can't even experience the void we enter ( unfortunately because I'd like to experience my brain not thinking about anything at all for once :-p ).

Re:What Happens After You Die? (2016) on Thursday March 12, 2026 @04:08AM (#47347823)
Hopefully, clearing of my browser cache. :-)

When I felt my conscious fading away from a heart attack two years ago, I thought "Ah, I guess I die now. Too bad I can't tell my friend to clear the cache as a last joke."

It confirmed I'm not actually afraid to die, just regretting for a moment before the void that I can't witness what'll happen to the world in the future.

Government needs to be for all the people, and not just for the 1% with wealth and power. Not more or less.
Re:The hidden compile-time cost of C++26 reflection on Tuesday March 10, 2026 @08:09AM (#47322139)
Until you try to add / modify a feature of the software and run into confusing template or operator or other C++ specific errors and need to deconstruct a larger part of the code to find (if possible) out where it comes from and spend even more time trying to correct it.

C++ is the opposite of simplicity and clarity in code.

Re:Modernizing swapping: virtual swap spaces on Saturday March 07, 2026 @06:07AM (#47286519)
I think zswap is the better option because it's not a fixed RAM storage, it merely compresses pages in RAM up to a variable limit and then writes to swap space when needed, which is more efficient.

It worked very well with my preceding laptop limited to 4GB of RAM.

Speaking of SimAnt, I soon discovered the bug that by moving into the top corner, the black ants would conquer all squares with no intervention from that one sideways and downwards and too easily win the game.

Still, it was fun just messing around with the ants, watching the trails, and chasing spiders by calling forth all ants.

Re:Ask HN: How are you all staying sane? on Monday March 02, 2026 @05:59AM (#47216375)
Define sane.
Re:Shatner is making an album with 35 metal icons on Monday February 23, 2026 @11:40PM (#47132940)
Well, thanks for cutting another one and a half hours from my already too short period of sleep at night and making me waste more time tomorrow at looking up more stand up shows from Henry if available.
The point is they don't want their job spreading fantasies to be taken away, just like every other entertainer. ;-)
Re:Choosing a Language Based on Its Syntax? on Thursday February 19, 2026 @02:21PM (#47077904)
That's one of the things I like about C, the independence in how one can write code. I was able to develop my own style thanks to that, visualising the structure of the code to distinguish the different parts of statements and make it more clear (at least to myself).

(edited several times to try to correct changes in formatting for an example here, but it's just screwed up :-/ )

Re:Pink noise reduces REM sleep and may harm sleep quality on Sunday February 15, 2026 @09:16PM (#47030148)
I noticed I'd feel sleepy after more than half an hour in the server room. Likely the fan noise but the lower temperature might influence it as well.

Unfortunately too expensive and large to set this up in the bedroom to help me sleep nowadays.

Re:Lessons from Zig on Wednesday February 11, 2026 @11:55PM (#46985031)
I looked at Zig again recently as an alternative to C, but I wasn't too sure about the tone on the introduction page, thinking some points are exagerrated and some I disagree with. It's also not that minimalistic when it includes a package manager.

I like C because it's a bare-bones language providing only the necessities and nothing more. It's independent from libraries and build environment. Let people who have experience in those things work on that. Remeber the do only one thing and do it well? I think the urge to still add extra features is the reason why there's no real successor to C.

Re:.Beat Swatch Internet Time on Tuesday February 10, 2026 @07:25AM (#46958793)
It manhadles it like a Swiss stuffed on cheese fondue and chocolate.
Re:Art of Roads in Games on Monday February 09, 2026 @12:43PM (#46948264)
Go full science fiction and enable vertical or even upside-down roads for a 3D experience. :-)

Imagine an environment where ground/walls/ceilings always have gravity and one can build literal city mazes in horizontal and vertical directions. All that traffic going everywhere, oh my..

Re:GitHub Is Down on Monday February 09, 2026 @11:32AM (#46947207)
Sorry, my fault. I tried to download a couple of CppCon presentations from their stash. Should have known better than to touch anything C++. ducks
Re:Ask HN: What Are You Working On? (February 2026) on Sunday February 08, 2026 @09:07PM (#46940788)
Pulling apart and de-++-ing OpenTTD version 12.2 to scratch my itch of simplifying and reorganising the game back to C code. I rewrote it years ago to convert it to more realistic time (it's just way too fast), add scheduling features and make it more event based. Ended up at some complicated breaking point so I'm doing this first before adding features.

And then there's writing micro fiction and currently a YA fantasy novel.

Older »