[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Portability of Lua
- From: Jay Carlson <nop@...>
- Date: Wed, 1 May 2013 19:27:19 -0400
[ok, we're well off into the senior lounge now]
On May 1, 2013, at 1:59 PM, Laurent Faillie wrote:
> Le 01/05/2013 18:57, Jay Carlson a écrit :
>> Plus you didn't have to deal with far vs huge pointers. I am so happy
>> to have lived on the Amiga until flat i386.
>
> Hehe, Aztec vs SAS, Dice, Gcc story :)
At least there was a partial ordering on that: Lattice < Aztec < {dice,gcc}. :-)
Although it does depend on which version of dice. gcc 1.39 was awesome, except 2M of FastRAM was the limit of my SCSI+RAM sidecar. I ended up building various flavors of library stubs in gcc, an introduction to the "extern inline asm" stuff I'm still doing in uClibc twenty years later.[1] Probably the high point of this was hacking dvi2ps into a driver for the Epson FX-80 dot-matrix printer--the existing quad-res drivers didn't care about the printhead limitation of "can't print dots in adjacent columns" so I added a second horizontal pass. You could roll the paper up a third of a dot, so I got the full 240x216 resolution in six passes per line. I added some metafont hackery to compensate for the overprint, and then proceeded to print the TeXbook. I think the Apple LaserWriter II NTX could do this at around six pages per minute. Mine printed about six pages an hour.
Towards the end of my stay on the Amiga I started to understand why the OS was doomed as a platform: a flat memory space without relocatable chunks meant external fragmentation inexorably increased over time. Even with FreeMem remaining constant, the maximum AllocMem chunk size would go to zero. pbmplus worked fine on the Amiga as long as you allocated its bitmaps line by line rather than a single allocation: uchar *foo[] rather than uchar foo[][].
The miracle is that an MC68000 system with a shared flat address model and absolutely no memory protection *could* stay up for months. The Mac (and PalmOS) had handles, which let their memory manager shuffle unlocked chunks around at will. Errors in handle discipline probably crashed more Macs than fragmentation would have, though.
I wonder what Lua is like on AmigaOS 2.0. Well, I know where the emulator is.
Jay
[1]: Except uClibc uses #defines to build its syscalls on MIPS instead of using inline functions. Nobody ever learns.