A demonstration of Turing equivalency. Any Turing complete computer can do what any other Turing complete computer can do if you don’t care about time.
How do you run Linux in lambda calculus?
Linux on a Commodore 64
71–80 of 97 posts
Re: Linux on a Commodore 64
#72Very nice, but my first thought was "surely this will not fit in 64k of ram!". And it doesn't. It requires a 16MB REU! To explain for the uninitiated how rare this bit of hardware is. The REU available for the c64 back in the day were 256kB and 512kB. These are most commonly built replicas as there are schematics available for them. Sometime in the late 90s there was also an "expansion" for c64 that contained a compl…
Re: Linux on a Commodore 64
#73I’d be interested in watching a time-lapse video of that on real hardware, if someone has a couple of months/years to spare. ;)
Re: Linux on a Commodore 64
#74Very nice, but my first thought was "surely this will not fit in 64k of ram!". And it doesn't. It requires a 16MB REU! To explain for the uninitiated how rare this bit of hardware is. The REU available for the c64 back in the day were 256kB and 512kB. These are most commonly built replicas as there are schematics available for them. Sometime in the late 90s there was also an "expansion" for c64 that contained a compl…
Or is that how far your purism in anti-emulation goes? (;
Re: Linux on a Commodore 64
#75Earlier quoted context omitted.
Sure. Here's a couple of functions to iterate over an array of "Ball" objects, as you might do in a Breakout-style game that has a multi-ball powerup. I didn't do anything to make it particularly 6502-amenable; it's how I'd write it for a modern machine, probably. Even compiled with -O2: as expected, the code is slow and enormous - a single addition compiles to something like 30 instructions. [0] https://godbolt.org/…
Seems like your problem is more with the venerable 6502 itself rather than the compiler. Most of that assembly code is spent calculating the offsets inside the Ball struct, which must be done at 16 bits of resolution in every case. The compiler's using the indirect indexed (zero page address with Y offset) 6502 addressing mode to get at all the fields in your struct. It has placed all the variables in zero page, so n…
For 6502, to get the optimum assembly you'd have to structure your data in structure-of-arrays instead of arrays-of-structures and use indices instead of pointers as much as possible (at least when amount of Ball objects would be < 256).
Re: Linux on a Commodore 64
#76Earlier quoted context omitted.
Why would it let smoke out? I doubt a C64 has any power management. So whether it idles or boots Linux via a couple of emulation layers, the thermal load will be exactly the same.
I know there can be issues with thermal saturation on a heatsink design-- it was expected not just to generate N watts of heat, but to only do so for M hours. Can you expect to leave a real 64 on for days or weeks and it will stay up? I wonder if stores that had them as demo units when it was a relevant product, for example, power-cycled them regularly. I know from experience if you block the bottom intake vents on a…
If you block all air circulation, sure you might eventually end up with problems, but it takes quite a bit.
Re: Linux on a Commodore 64
#77Earlier quoted context omitted.
Assuming "daily driver" requires a modern web browser running modern web productivity apps I'd put the minimum at a Core 2 Duo with 4 GB memory. It wouldn't exactly be snappy but with a bit of patience you shouldn't be limited by the hardware. Throw in a GPU with hardware video decoding and you might even be able to watch YouTube in above-potato quality.
I've got a core 2 duo with 2GB RAM that I used for around 6 hours yesterday to write an application. Only slightly noticeable waiting times when I accessed some sites, but it worked and the application works too.
Re: Linux on a Commodore 64
#78Earlier quoted context omitted.
Time and memory.
Yeah, so technically a Turing machine has infinite memory.. so no real-world computer is fully Turing complete.
Re: Linux on a Commodore 64
#79Earlier quoted context omitted.
I've got a core 2 duo with 2GB RAM that I used for around 6 hours yesterday to write an application. Only slightly noticeable waiting times when I accessed some sites, but it worked and the application works too.
Which distro, though?
Linux Mint Vanessa, running the Mate DE.
The program is a C program with a single Makefile. My workflow was (and still is, even on my desktop) using a Vim with three vertical splits:
1. A LHS split which is a terminal to run make and execute the program for testing
2. A RHS split with the program source code (single file program).
3. A middle split with the test input file and test output file (in horizontal splits).
Although it is just a single file, on my other C projects I've used the same laptop, with the same 3-vert-split Vim, with multiple tabs, so up to maybe 16-20 source files open at a time for a single project.
Building C projects is very fast, even on the Core 2 Duo/2GB RAM setup. Running a similar workflow but in VSCode on my desktop is less snappier than Vim on the laptop.
I haven't tried doing a Go project on that laptop yet with VSCode, but I am tempted to see what happens :-)
Re: Linux on a Commodore 64
#80Earlier quoted context omitted.
Which distro, though?
> Which distro, though? Linux Mint Vanessa, running the Mate DE. The program is a C program with a single Makefile. My workflow was (and still is, even on my desktop) using a Vim with three vertical splits: 1. A LHS split which is a terminal to run make and execute the program for testing 2. A RHS split with the program source code (single file program). 3. A middle split with the test input file and test output file…
But now I can tell why you're experience was good. Mate is a phenomenal desktop environment certainly, so 2GB is probably more than enough for a daily driver.