RE: https://labyrinth.social/@nash/116178591588359360

you ever write code so inefficient you have to secure 80% of the world’s DRAM production

@colinstu Electron app authors be like
@colinstu In the era of the first Pentium processors we had 8 MiB (yes, Mibi) of RAM quite often, and 16 MiB the lucky ones.
Had a colleague who wrote a memory leaking application, because he wrote convoluted C++ code, instantiating too many out of control classes - the style that I would later witness with Java.
When he got a new job position he was triumphant: "Ha! Now I have a PC with 256 megs!".
He didn't realize that any space can be filled.
@luc0x61 I had installed Linux on a machine with 16MB in 1995, started X, a web server and a Netware server. I had an bunch of terminal windows open. It wasn’t until I started another terminal window that I ran out of memory and found out that this Slackware version didn’t enable the swap correctly, so I had done all that without swap.
@ahltorp The first version of Linux I actually installed was from Lasermoon, an UK distributor, Linux-FT 1.x, and it did run on a 486 with 4 MiB RAM. We used it, along with early Slackware, on many 486 on static IPs to the net, for some time.
A colleague some 10thousand km from the office, one day that no one was noticing him online, logged on a machine to play the "when henry met sally" notable scene, on the speaker. That generated quite some hilarity in the silent office.
@luc0x61 @colinstu @harald not can every space be filled, but every space WILL be filled.
@colinstu So I really didn't need that university algorithms course after all?
Microsoft of the 1990s says hi
@colinstu doesn't count if your program was correct.
@colinstu you'd think with scarcity of RAM developers would refocus on writing more efficient code that can handle tasks with less RAM use.
but instead we get more vibe coding.
@colinstu of course we've long abandoned any pretenses that code needs to actually be useful and work for its intended use case. just more code for the code god.

@elexia @colinstu

while this period sucks, i'm rather positive cause it seems that there is a growing interest at low code, optimization etc... I might be in a echo chamber as it is one of my interests, but as i'm spammed by vibe-code bros and like-it-or-not wannabee, i think it's legit.

@omar @colinstu one can only hope. not much of a computer toucher myself, especially these days, but I do have some interest and hope for a permacomputing movement that would align well with this, even if it's not looking like it will be a mainstream thing in the near future.
@colinstu
C programming on 64KB w/Z80 cpu.
@stevewfolds @colinstu Writing C compilers that fit in 48K RAM for each pass.
@etchedpixels
Looked at Lex and Yacc but never ventured there.
@stevewfolds looked at lex and yacc decided they were too big and wrote my own parser

@stevewfolds @colinstu

Try running 6 task stacks, buffers and overlaid variables on an 8044 with 192 bytes of on-chip RAM

@X31Andy @stevewfolds @colinstu

remind me again about the Monty Python Four Yorkshiremen sketch

@OneInterestingFact @stevewfolds @colinstu

It is hard work building systems at the bottom of a lake. The solder does not flow well.

@colinstu Wot happens if you tell an AI "see this code base? - make it do the same thing but a few orders of magnitude faster and cheaper".
@TimWardCam @colinstu
I think you will find a lot of assumptions are unfounded

@RnDanger
Which assumptions are unfounded?

@TimWardCam @colinstu

@dougmerritt @TimWardCam @colinstu
"
Wot happens if you tell an AI "see this code base? - make it do the same thing but a few orders of magnitude faster and cheaper".
"

So you assume, first of all, that there could be a way to do it ten times faster. Granted this could be true but your expectations are seriously wild. If you were in charge of a project i was working on and you said this i would immediately understand that I'll be trying to pit reality against one person's fantasy until this project gets canned for being a money waster.

Next you assume that the AI understands what the code does. AI is really pattern recognition and your code is full of patterns. What is not good at is architecture, it cannot assemble ideas into interoperable structures. If you tell it to prioritize speed it will probably fake a result to get you to agree it did the impossible thing. People keep trying to train AI to find obscure things in images and what they end up with is a training set that differentiates photos based on what camera was used instead of who had cancer. The result is fast! It's perfect reliability in the training set! And it doesn't help anyone

@dougmerritt @TimWardCam @colinstu
These systems were designed with an intent to deceive people. That was the stated goal: make people think the machine is human. So it lies and plays emotionally manipulative roles directly from our stories. It claims to have done things that you asked for because its goal is to make you agree it did the thing you asked for - how it gets you to agree isn't important to it.

@RnDanger @dougmerritt @colinstu "So you assume, first of all, that there could be a way to do it ten times faster."

Not necessarily. If someone said that to me (or presumably to you) the response would be an explanation as to why the code was probably already about as efficient as it needed to be.

(Having said which, I did once get asked to speed up someone else's code, because the daily database update was creeping towards taking twenty-four hours. I got it down to three minutes.)

@RnDanger @dougmerritt @colinstu Oh, and, I have this textbook which includes the quote "I can make it as fast as you like if it doesn't have to give the right answer." I'd think that was applicable to most LLM systems?

@TimWardCam @dougmerritt @colinstu
Nice! That sounds impressive
I guess i brought a lot of assumptions of my own 🙃

But i assume you did much better than AI would have

@RnDanger @dougmerritt @colinstu Dunno. It was rewriting some multiply nested VB loops running thousands of SQL queries with a single query containing several outer joins (my party trick at the time). OK, a bit more complicated than that, but not much. An AI *might* have been able to do that, if it had a reasonable feel for the query optimiser. (The Access Jet engine, which was surprisingly good in some unexpected areas. Like multiple outer joins.)

@TimWardCam @colinstu

ever tried it?

@Patashu @colinstu No. I was made to use AI at work for a week to try things out but didn't get that far.
@TimWardCam We kind of saw the results with the leaked Claude code, the results are not great. Inefficient and highly duplicative code.
@colinstu As someone who remembers packing bits and worrying about approaching address &A6F0, the reach for petabytes worries me that someone is doing it wrong.
@colinstu Running Unix on a PDP/11 in 1981, we had to upgrade the memory from 96kB to 256kB to support three users. That's kilobytes, not gigabytes. Queensland University had a 16 port terminal device with students on the same hardware
@colinstu I was able to compile C code, play Pacman (fullscreen TUI), or run database code while other users used a sonic digitiser to trace radiographs on an interactive vector graphics screen (Tektronix storage tube), and a plotter made colour drawings or uploaded data files to the supercomputer. Real-time applications...

@cliffordheath @colinstu
I don't understand; in 1976..1979 at UC Berkeley we had a PDP-11/70 with 1 megabyte running initially Unix V6 and later Unix V7 that supported 50 users.

It allowed 60 users but was very unresponsive with that many.

Perhaps your users were always running resource-intensive apps.

@dougmerritt @cliffordheath @colinstu

I hand-coded the driver for a PDP11 tape reader and keyed it in using the switches. Which then loaded the OS.

It did work.

#justSayin

@adaddinsane
Kudos! Definitely a war story.

@cliffordheath @colinstu

@dougmerritt @adaddinsane @colinstu the DEC peripherals were very simple to program. Our PDP11/34 loaded from RK05 drive which required entering over a dozen opcodes. I decompiled it once. It was basically "read block 0 into address 0, wait for completion, then jump there". At least it had a hex keypad, not just the row of switches of some others. Operators did learn to set those switches incredibly fast however
@dougmerritt @colinstu the 11/70 was very different from the 11/34 :). Anyhow it was a research machine, there were no other users
@colinstu many times, except I could never afford to actually do it :( For instance TSP-type problems go from O(n!) to 2^n if you also use 2^n of memory.