15 ms·
Regression with the C64
- brazzy 5y agoThis is the IT equivalent of the grumpy old man declaring that "in my day we walked to school 10 miles barefoot through snow, uphill both ways!". And it's just as stupid.
- blueflow 5y agoYou are the equivalent of the person who hails their new Ad-riddled TV because its "smart" and "modern".
- celdon25 5y agoI'm not one of those people and I found the article to be pretty useless.
- z0r 5y agoI partially agree, but I don't think it's stupid - I've been experiencing a gradual push to do more things in the browser for 2 decades (along with everyone else I'm sure) and I don't think it's a positive thing. My workplace is experimenting with people getting a cloud computer and laptop instead of a workstation (and laptop) when it's time for new hardware, and my experience during the last couple of years of WFH has been that our nice modern laptops cannot really provide enough power for Chrome to do everything they want us to use Chrome to do.
- reaperducer 5y agoML on a C-64. Pretty interesting. Reminds me of when everyone in the SV bubble was all excited about "graph theory" because Facebook was using it. But it's something that was being done in 16K BASIC back in the 1970's.
- Someone 5y agoNot ML, only linear regression. Looking at the screen dump (can’t figure that out from the ‘source’ code, as that is junk), possibly only with two points, and in two dimensions. If so, it finds the line through two points.
- reaperducer 5y agoThanks for the clarification. I know zero about ML and was assessing it based on the text.
- intricatedetail 5y agoIt still frustrates me that e.g. text editors can't get the basics like a latency between a key press and character appearing on the screen. My latest Ryzen can't compete with C64 in that regard.
- jandrese 5y agoSome of that isn't the text editors fault. With the C64 the keystroke may be on the screen before it out of the USB stack on a modern computer. That is even before you start to consider the latency in the video stack. As John Carmack once noted: "I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that?" -- https://twitter.com/id_aa_carmack/status/193480622533120001 https://twitter.com/id_aa_carmack/status/193480622533120001
- forinti 5y agoReminds me of some pretty nice articles on Acorn User about colliding galaxies, animated lissajous curves, fractals (of course), etc. A friend of mine calls 8 bit computers "glorified calculators" and he's right. You could have tons of fun though.
- roywiggins 5y ago"To perform the same code on another System, you need more than a few transistors, 64 kilobytes of RAM, and a small ROM with an even small BASIC interpreter. You need at least a small operating system, a much bigger Python interpreter, and a lot of libraries to perform the same actions in mostly the same amount of time." Is anything actually stopping you writing it in baremetal x86 assembly if you wanted?
- blueflow 5y agox86 is a pain, and for much functionality, you need to do things like parsing the ACPI tables. Oh, before someone comes up with "Just use UEFI". UEFI was made by the same people and is the same kind of pain in the ass.
- masklinn 5y agoOf course not. Though baremetal x86 is probably not the best architecture to work with. But, people routinely code to this sort of specs (minus the transistors count): the lowest end of NXP SoC spec has 1-4K RAM and 8-32K ROM (though probably high 5 figures transistors count, possibly low 6).
- nickdothutton 5y agoThe desktop computer revolution lead us on a gigantic 30 year detour we are only now coming to the end of.
- 0x0 5y agoDoes the assembly listing look sensible to anyone? It's been a long time but to me it looks like the disassembly of random bytes. "Jam rts"? "Nop $60"? "Brk brk sta Routine_0c86"? And a ton of raw un-assembled ".byte"?
- onurcel 5y agothat's really weird. It looks like the author wrote it with a more powerful system then partly disassembled it. In my opinion this hurts the narrative of this otherwise cool project/article.
- scarygliders 5y agoThat's not the case. Back in the day you would use some sort of "monitor" program to assemble that code (or to disassemble code already in memory). For example, the C64 Action Replay cartridge had a built-in monitor. Software machine code monitors and assemblers were also available.
- ksherlock 5y agoYou're 100% right. It looks like output from a tracing disassembler but it didn't account for the preamble so it quickly gets pear shaped. If you download the binary and hex dump it, it's a PRG file which contains a 2-byte header ($0801, the load address), followed by a short basic program (816 SYS 2061) followed by the actual code at 2061 ($080d). The actual code starts with LDA $01 but the address is off by 2 bytes (due to the PRG header) so the JSR subroutines are off as well. https://michaelcmartin.github.io/Ophis/book/x72.html https://michaelcmartin.github.io/Ophis/book/x72.html
- scarygliders 5y agoNope, it's a perfectly normal listing of 6502 code in Assembler. The BRK instruction, if I recall correctly from my 6502 days, forces an interrupt for reasons I can't precisely remember. EDIT : https://www.c64-wiki.com/wiki/BRK https://www.c64-wiki.com/wiki/BRK
- 5y ago
- Flashtoo 5y agoSince the article doesn't bother to explain the regression method or its implementation, I'll assume this is ordinary least squares regression, a method invented over 200 years ago. It's only shown to work with two variables, so perhaps it is just determining the equation for a line through two points. Either way, this is something that has been trivial to do using your own brain before even the C64 existed. Of course this is a neat exercise to do on a C64, but in no way does this give any reason to think we're doing something wrong by using more powerful computers to study vastly more data (using more complex algorithms - we are not just doing "the same thing" as in this demo). The gap between showing that you can fit a line to two points on old hardware and concluding that modern data science is one big heap of inefficiency is just too large.
- PaulHoule 5y agoLinear regression was a common type-in BASIC program at the time for computers like the TRS-80, Apple ][, Coco, Atari 800, C64, etc.
- LeoPanthera 5y agoI wonder if you could use a modern system to "evolve" C64 6502 machine code until you got the result you wanted.
- jononor 5y agoThe C64 has 64 kB of RAM. That is more than many contemporary microcontrollers. Using something like https://github.com/emlearn/emlearn https://github.com/emlearn/emlearn allows to generate portable C code of ML models for such targets. Should be able to classify digits (MNIST) no problem on such hardware. Assuming there is a workable C compiler available. Disclosure: Maintainer of emlearn project.
- tomxor 5y ago> There are a lot of “Experts” out there, who know node.js, Java, or just Spring Boot, Numpy, and so on. But this is not development. This is playing Bricks with predefined methods and classes. I work in the finance sector and a lot of these things I create could perform better on less big hardware. I agree, with this, and the general sentiments in this blog post. Yet I am one of those "Experts" out there who knows nodejs et al, and builds things with it. I recognise it's deep flaws, evade them as much as I am able and am always trying to find better ways of doing things - but this is the domain I work in, and using these tools and building blocks to some degree is quite difficult to completely avoid (and I say this as someone who has gone to quite some extremes in my attempts to do so). My point is, even though the issue is a cultural one, not everyone caught up in a particular manifestation of these issues is blind to them - Please remember this the next time you judge a web dev, or foo dev, or someone from whatever area you perceive to be hopelessly flawed.
- Max_Horstmann 5y ago> But this is not development. Gatekeeping at its finest.
- bullen 5y agoI agree BUT 3D is something real both for audio and video, we have two eyes and ears! That said, going back to less powerful hardware is the right thing to do because we get longer lasting batteries: https://shop.pimoroni.com/products/picosystem https://shop.pimoroni.com/products/picosystem Dual Arm Cortex M0+ running at up to 133Mhz with 264kB of SRAM, this is the equivalent to a modern C64 and it consumes 0.1W instead of 20W. That said again, I'm targeting the Raspberry 4 for my upcoming 3D action MMO and that is 5W when maxxing the GPU and one CPU core. It's a good way to keep your expectations in check as electricity prices rise indefinitely. The only thing I'm 100% sure of is that people will soon not be able to afford to play on 200+W machines.
- pshirshov 5y ago> Why do I have to run Windows 10, waste tons of RAM for an IDE, load Spring Boot? You don't have to use Windows 10, there are better options. You have to waste tons of RAM for an IDE to keep fast useful indexes in-memory. You don't have to use Spring Boot, there are better options.