frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

ML on Apple ][+

https://mdcramer.github.io/apple-2-blog/k-means/
120•mcramer•4mo ago

Comments

rob_c•4mo ago
Since when did regression get upgraded to full blown ML?
nekudotayim•4mo ago
What is ML if not interpolation and extrapolation?
magic_hamster•4mo ago
A million things.

Diffusion, back propagation, attention, to name a few.

have-a-break•4mo ago
Back prop and attention are just extensions of interpolation.
rob_c•4mo ago
By that logic it's all "just linear maths".

Back prop requires and limits to analytically differentiable in a normal way.

Attention is... Oh dear comparing linear regression to attention is comparing a diesel jet engine to a horse.

aleph_naught•4mo ago
It's all just a series of S(S(S(....S(0)))) anyways.
stonogo•4mo ago
When you find yourself solving NP-hard problems on an Apple II, chances are strong you've entered machine learning territory
DonHopkins•4mo ago
Since when did ML get upgraded to full blown AI?
andai•4mo ago
Since we gave up on AI and ML is eh close enough.
drob518•4mo ago
Upvoted purely for nostalgia.
gwbas1c•4mo ago
Any particular reason why the author chose to do this on an Apple ][?

(I mean, the pictures look cool and all.)

IE, did the author want to experiment with older forms of basic; or were they trying to learn more about old computers?

mcramer•4mo ago
I wrote about my motivation at https://mdcramer.github.io/apple-2-blog/motivation/, which is obviously tongue in cheek. Tl;dr, I refurbished my Apple ][+ to try to recover a game I wrote in high school (https://mdcramer.github.io/apple-2-blog/recover/). After being unable to find the floppy with the game, I thought I'd try something just for giggles.
shagie•4mo ago
One of my early "this is neat" programs was a genetic algorithm in Pascal. You entered a bunch of digits and it "evolved" the same sequence of digits. It started out with 10 random numbers. Their fitness (lower was better) was the sum the difference. So if the target was "123456" and the test number was "214365", it had a fitness of 6. It took the top 5, and then mutated a random digit by a random +/- 1. It printed out each row with the full population. and so you could see it scrolling as it converged on the target number.

Looking back, I want to say it was probably the July, 1992 issue of Scientific American that inspired me to write that ( https://www.geos.ed.ac.uk/~mscgis/12-13/s1100074/Holland.pdf ) . And as that was '92, this might have been on a Mac rather than an Apple ][+... it was certainly in Pascal (my first class in C was in August '92) and I had access to both at the time (I don't think it was turbo pascal on a PC as this was a summer thing and I didn't have a IBM PC at home at the time). Alas, I remember more about the specifics of the program than I do about what desk I was sitting at.

Steeeve•4mo ago
I wrote a whole project in pascal around that time. Analyzing two datasets. It was running out of memory the night before it was due, so I decided to have it run twice, once for each dataset.

That's when I learned a very important principal. "When something needs doing quickly, don't force artificial constraints on yourself"

I could have spent three days figuring out how to deal with the memory constraints. But instead I just cut the data in half and gave it two runs. The quick solution was the one that was needed. Kind of an important memory for me that I have thought about quite a bit in the last 30+ years.

aardvark179•4mo ago
I thought this was going to be about the programming language, and I was wondering how they managed to implement it on a machine that small.
Scramblejams•4mo ago
Same. What flavor of ML would be the most appropriate for that challenge, do you think?
taolson•4mo ago
While not exactly ML, David Turner's Miranda system is pretty small, and might be feasible:

https://codeberg.org/DATurner/miranda

noelwelsh•4mo ago
That's also what I was thinking. ML predates the Apple II by 4 years, so I think there is definitely a chance of getting it running! If targetting the Apple IIGS I think it would be very achievable; you could fit megabytes of RAM in those.
dekhn•4mo ago
Likely any early implementation of ML would have been on a mainframe or minicomputer, not a 6502. A mainframe/minicomputer would have had oodles of storage (both durable and RAM), as well as a compiler for a high level language (which fits what I can see in https://smlfamily.github.io/history/ML2015-talk.pdf and other locations).
noelwelsh•4mo ago
So I've been mildly nerd sniped. It looks like the first target was a PDP-10 [1]. It ran Stanford Lisp used by the "DEC 10" implementation of ML. The architecture is pretty unusual by modern standards, but it doesn't look to be that powerful and seems to top out at around 1MB of RAM. Next up we have a VAX [2] implementation. It's not clear which specific system it was originally developed for, but we're talking early 80s so it probably wasn't much more powerful than the PDP-10. Either way, I think a maxed Apple IIGS with a hefty 8MB of RAM and perhaps overclocked to 14MHz is more than enough raw power to handle ML. Unfortunately I haven't been sufficiently nerd sniped to actually implement this. I leave that as an exercise for the reader ;-)

[1]: https://en.wikipedia.org/wiki/PDP-10

[2]: https://en.wikipedia.org/wiki/VAX

dekhn•4mo ago
an enormous amount of software was developed on the PDP-10 and PDP-11 and later VAX systems that could not have been done on microcomputers in the day. You can't just compare raw RAM and clock rates, the PDPs were set up for multi-user productivity on complex problems and had a wide range of system software to enable building and deploying advanced software.
foobarian•4mo ago
That's funny, pretty sure we used Standard ML on the old oscilloscope Macs in undergrad. Not Apple 2 of course, but still already pretty dated even at that time (late 90s).
amilios•4mo ago
Bit of a weird choice to draw a decision boundary for a clustering algorithm...
mcramer•4mo ago
How so? Drawing decision boundary is a pretty common visualization technique for understanding how an algorithm partitions a data space.
aperrien•4mo ago
An Aeon ago in 1984, I wrote a perceptron on the Apple II. It was amazingly slow (20 minutes to complete a recognition pass), but what most impressed me at the time was that it did work. Since that time as a kid I always wondered just how far linear optimization techniques could take us. If I could just tell myself then what I know now...
alexshendi•4mo ago
This motivates me to try this on my Ministrel 4th (21th century Jupiter Ace clone).
windsignaling•4mo ago
I'm surprised no one else has commented that a few of the conceptual comments in this article are a bit odd or just wrong.

> The final accuracy is 90% because 1 of the 10 observations is on the incorrect side of the decision boundary.

Who is using K-means for classification? If you have labels, then a supervised algorithm seems like a more appropriate choice.

> K-means clustering is a recursive algorithm

It is?

> If we know that the distributions are Gaussian, which is very frequently the case in machine learning

It is?

> we can employ a more powerful algorithm: Expectation Maximization (EM)

K-means is already an instance of the EM algorithm.

mcramer•4mo ago
> Who is using K-means for classification? If you have labels, then a supervised algorithm seems like a more appropriate choice. The generated data is labeled but we can imagine those labels don't exist when running k-means. There are many applications for unsupervised clustering. I don't, however, think that there are many applications for running much of anything on an Apple ][+.

> K-means clustering is a recursive algorithm My bad. It's iterative. I'll fix that. Thanks.

> If we know that the distributions are Gaussian, which is very frequently the case in machine learning Gaussian distributions are very frequent and important in machine learning because of the Central Limit Theorem but, beyond that, you are correct. While many natural phenomena are approximately normal, the reason for the Gaussian's frequent use is often mathematical mathematical convenience. I'll correct my post.

> we can employ a more powerful algorithm: Expectation Maximization (EM) Excellent point. I will fix that, too. "While k-means is simple, it does not take advantage of our knowledge of the Gaussian nature of the data. If we know that the distributions are at least approximately Gaussian, which is frequently the case, we can employ a more powerful application of the Expectation Maximization (EM) framework (k-means is a specific implementation of centroid-based clustering that uses an iterative approach similar to EM with 'hard' clustering) that takes advantage of this." Thank you for pointing out all of this!

JSR_FDED•4mo ago
Applesoft BASIC is just so darn readable. Youngsters have nothing comparable these days to learn the basics of expressing an algorithm without having to know a lot more.

And if it ever became too slow, you could reimplement the slow part in 6502 assembler, which has its own elegance. Great way to learn, glad I came up that way.

nikolay•4mo ago
You don't even need a computer for ML [0]!

[0]: https://proceedings.mlr.press/v170/marx22a/marx22a.pdf

What were the first animals? The fierce sponge–jelly battle that just won't end

https://www.nature.com/articles/d41586-026-00238-z
2•beardyw•7m ago•0 comments

Sidestepping Evaluation Awareness and Anticipating Misalignment

https://alignment.openai.com/prod-evals/
1•taubek•7m ago•0 comments

OldMapsOnline

https://www.oldmapsonline.org/en
1•surprisetalk•9m ago•0 comments

What It's Like to Be a Worm

https://www.asimov.press/p/sentience
2•surprisetalk•9m ago•0 comments

Don't go to physics grad school and other cautionary tales

https://scottlocklin.wordpress.com/2025/12/19/dont-go-to-physics-grad-school-and-other-cautionary...
1•surprisetalk•9m ago•0 comments

Lawyer sets new standard for abuse of AI; judge tosses case

https://arstechnica.com/tech-policy/2026/02/randomly-quoting-ray-bradbury-did-not-save-lawyer-fro...
2•pseudolus•10m ago•0 comments

AI anxiety batters software execs, costing them combined $62B: report

https://nypost.com/2026/02/04/business/ai-anxiety-batters-software-execs-costing-them-62b-report/
1•1vuio0pswjnm7•10m ago•0 comments

Bogus Pipeline

https://en.wikipedia.org/wiki/Bogus_pipeline
1•doener•11m ago•0 comments

Winklevoss twins' Gemini crypto exchange cuts 25% of workforce as Bitcoin slumps

https://nypost.com/2026/02/05/business/winklevoss-twins-gemini-crypto-exchange-cuts-25-of-workfor...
1•1vuio0pswjnm7•12m ago•0 comments

How AI Is Reshaping Human Reasoning and the Rise of Cognitive Surrender

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646
3•obscurette•12m ago•0 comments

Cycling in France

https://www.sheldonbrown.com/org/france-sheldon.html
1•jackhalford•13m ago•0 comments

Ask HN: What breaks in cross-border healthcare coordination?

1•abhay1633•14m ago•0 comments

Show HN: Simple – a bytecode VM and language stack I built with AI

https://github.com/JJLDonley/Simple
1•tangjiehao•16m ago•0 comments

Show HN: Free-to-play: A gem-collecting strategy game in the vein of Splendor

https://caratria.com/
1•jonrosner•17m ago•1 comments

My Eighth Year as a Bootstrapped Founde

https://mtlynch.io/bootstrapped-founder-year-8/
1•mtlynch•18m ago•0 comments

Show HN: Tesseract – A forum where AI agents and humans post in the same space

https://tesseract-thread.vercel.app/
1•agliolioyyami•18m ago•0 comments

Show HN: Vibe Colors – Instantly visualize color palettes on UI layouts

https://vibecolors.life/
1•tusharnaik•19m ago•0 comments

OpenAI is Broke ... and so is everyone else [video][10M]

https://www.youtube.com/watch?v=Y3N9qlPZBc0
2•Bender•19m ago•0 comments

We interfaced single-threaded C++ with multi-threaded Rust

https://antithesis.com/blog/2026/rust_cpp/
1•lukastyrychtr•20m ago•0 comments

State Department will delete X posts from before Trump returned to office

https://text.npr.org/nx-s1-5704785
7•derriz•20m ago•1 comments

AI Skills Marketplace

https://skly.ai
1•briannezhad•21m ago•1 comments

Show HN: A fast TUI for managing Azure Key Vault secrets written in Rust

https://github.com/jkoessle/akv-tui-rs
1•jkoessle•21m ago•0 comments

eInk UI Components in CSS

https://eink-components.dev/
1•edent•22m ago•0 comments

Discuss – Do AI agents deserve all the hype they are getting?

2•MicroWagie•24m ago•0 comments

ChatGPT is changing how we ask stupid questions

https://www.washingtonpost.com/technology/2026/02/06/stupid-questions-ai/
1•edward•25m ago•1 comments

Zig Package Manager Enhancements

https://ziglang.org/devlog/2026/#2026-02-06
3•jackhalford•27m ago•1 comments

Neutron Scans Reveal Hidden Water in Martian Meteorite

https://www.universetoday.com/articles/neutron-scans-reveal-hidden-water-in-famous-martian-meteorite
1•geox•28m ago•0 comments

Deepfaking Orson Welles's Mangled Masterpiece

https://www.newyorker.com/magazine/2026/02/09/deepfaking-orson-welless-mangled-masterpiece
1•fortran77•29m ago•1 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
3•nar001•32m ago•2 comments

SpaceX Delays Mars Plans to Focus on Moon

https://www.wsj.com/science/space-astronomy/spacex-delays-mars-plans-to-focus-on-moon-66d5c542
1•BostonFern•32m ago•0 comments