Recent submissions

Comment · 14 days ago
Comment · 19 days ago
And that's why AmigaOS allowed a MEMF_REVERSE option in the call to the memory allocator ( http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodo... )

Sometime in 95 or 96 recall making a very very simple OS patch that would force all allocations > X size ( 1KB or something like that ) to use MEMF_REVERSE and that made wonders to reduce memory fragmentation :)

Comment · 29 days ago
Well written, good content, doesn't try to sell random junk, +10 would read again :)
Comment · 1 month ago
Correct, but also beside the point.

To do it in almost-plain C, you'd need fairly complex macros that are more difficult to write correctly.

To do it in plain C without macros, or plain C++ without templates... you'd need to work out the combination of the template expansion yourself and write down a piece of code that is more likely to have bugs and more difficult to understand.

Comment · 1 month ago
This is called template-based compile-time programming.

By making 3 instances of linear_feedback_shift_engine class template ( and 2 of xor_combine_engine ), you are forcing the compiler to expand the code exactly as-is 3 times, each with different parameters.

The parameters to the template are constant, therefore the compiler can easily look at how they are used and you are guaranteed ( even in a 1999 c++ compiler ) that the compiler will look at the copies of the code and merge them as much as possible into a single piece of code... which is the one that you see when you decompile the code.

So in summary, it means that you get to write fairly readable code while the final binary is fully optimized as-if you had spent the time merging all the variants as needed for the specific constants.

Comment · 1 month ago
Comment · 3 months ago
Comment · 3 months ago
Can confirm all sceners call it sinus in Spain :)
Comment · 3 months ago
Comment · 3 months ago
Protip: all modern monitors and TVs can still run at 50HZ and you can configure Linux to use it all the time --> zero vsync micro jumps when running european software under ZX, Amiga or C64 emulators :)
Comment · 3 months ago
The memory requirement is actually not a problem, because you may be able to stream the mp3 from a harddisk ( easily 159 KB per second from a 2.5 inch ide disk when used on a 7mhz 68000 of amiga 600) or maybe even from a floppy ( 10 KB per second on a double density floppy ).

The actual problem is that mp3 decoding requires lots of math, and the total cpu usage to decode at 22Khz mono is the equivalent of a 68030 running at 50mhz, which is more or less 5 times as much CPU as a 68000 running at 16mhz.

Comment · 3 months ago
For me: January = up, April = left, July = down, October = right.

Never sure why I did this association, maybe it comes from a drawing in a book I read when I was six or somthn?

Comment · 5 months ago
Here is one in plain 68000 assembler.

  move.b #200,d0
  move.b #100,d1
  add.b  d0,d1   ; 8th bit goes to X flag
  subx.b d0,d0   ; d0 = $00 or $ff depending on X flag
  or.b   d0,d1   ; d1 = 255 if there was saturation
You can do the same with all others that somehow store the 8th bit carry somewhere then allow using it for substraction.
Comment · 6 months ago
For me https://demozoo.org/music/249024/ from the Deep Remix is their best coop.
Comment · 7 months ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton