frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
426•klaussilveira•5h ago•97 comments

Hello world does not compile

https://github.com/anthropics/claudes-c-compiler/issues/1
21•mfiguiere•42m ago•8 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
775•xnx•11h ago•472 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
142•isitcontent•6h ago•15 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
135•dmpetrov•6h ago•57 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
41•quibono•4d ago•3 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
246•vecti•8h ago•117 comments

A century of hair samples proves leaded gas ban worked

https://arstechnica.com/science/2026/02/a-century-of-hair-samples-proves-leaded-gas-ban-worked/
70•jnord•3d ago•4 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
180•eljojo•8h ago•124 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
314•aktau•12h ago•154 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
12•matheusalmeida•1d ago•0 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
311•ostacke•12h ago•85 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
397•todsacerdoti•13h ago•217 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
322•lstoll•12h ago•233 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
12•kmm•4d ago•0 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
48•phreda4•5h ago•8 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
109•vmatsiiako•11h ago•34 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
186•i5heu•8h ago•129 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
236•surprisetalk•3d ago•31 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
976•cdrnsf•15h ago•415 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
144•limoce•3d ago•79 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
17•gfortaine•3h ago•2 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
49•ray__•2h ago•11 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
41•rescrv•13h ago•17 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
35•lebovic•1d ago•11 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
52•SerCe•2h ago•42 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
77•antves•1d ago•57 comments

The Oklahoma Architect Who Turned Kitsch into Art

https://www.bloomberg.com/news/features/2026-01-31/oklahoma-architect-bruce-goff-s-wild-home-desi...
18•MarlonPro•3d ago•4 comments

Claude Composer

https://www.josh.ing/blog/claude-composer
108•coloneltcb•2d ago•71 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
39•nwparker•1d ago•10 comments
Open in hackernews

Efficient Basic Coding for the ZX Spectrum (2020)

https://blog.jafma.net/2020/02/24/efficient-basic-coding-for-the-zx-spectrum/
60•rcarmo•1mo ago

Comments

ZeroConcerns•1mo ago
I'm not exactly sure what's going on with this article and whether it's just the language barrier or something else, but... it doesn't make an awful lot of sense?

'Tricks' like 'not including too many comments' were already well-known from day one of the ZX line (which started around 1980) because, well, you had 1K, 16K or 48K or RAM to work with, so every character counted!

Also, you were painfully aware of the performance of inner/outer loops, because, absolutely, a sub-3 MHz clock speed doesn't leave many other options. Other than to migrate to assembly coding, which was where most serious Sinclair coding took place.

The article is right about one thing, though: the Sinclair BASIC interpreter was a work of minimalist art, as was the hardware. "Sure, let's multiplex the audio-in line with the video sync signal, so we can save a pin on the ULA" is not something that gets a lot of consideration these days...

egypturnash•1mo ago
"You can poke new values into the start-of-program pointer to speed up jumps to the end of the program, and speed up loop execution" is pretty tricky. So's "you can poke new values into another pointer to jump to arbitrary statements within a multi-statement line, and here[1] is a 3d maze program that abuses the heck out of this to become a one-liner".

1: https://spectrumcomputing.co.uk/entry/21001/ZX-Spectrum/1_Li...

Zardoz84•1mo ago
> 'Tricks' like 'not including too many comments' were already well-known from day one of the ZX line (which started around 1980) because, well, you had 1K, 16K or 48K or RAM to work with, so every character counted!

But that GO TO/GO SUB target position in the code list matters, because does a linear search (so the no use comments, isn't only about wasting RAM), was new for me. And I toyed with a ZX Spectrum as child.

amiga386•1mo ago
It makes a lot of sense to me.

They key problem is that GO SUB and GO TO are not instantaneous like a CALL or JP instruction would be in Z80. The BASIC interpreter does a linear scan through the entire source code, until it reaches the specified line number. Every time you want to jump or call.

That's why this article is called "Efficient Basic Coding"... all the "tricks" are about moving the most frequently called code to the lowest line numbers, so the interpreter spends as little time scanning the source code destination line numbers as possible.

The second article in the series is on a theme, where variables aren't indexed either, the interpreter scans through each variable in turn until it finds the one with the name referenced in the source code... again you want to define them in order of most frequently accessed...

notorandit•1mo ago
HN effect:

Error establishing a database connection

onraglanroad•1mo ago
Rewind the tape, give the head adjustment screw a tiny turn anticlockwise, and hit play again. It'll load fine this time.
ErroneousBosh•1mo ago
Also maybe sit the database server on something hard like a book or a tray, to allow better airflow underneath it.
jrmg•1mo ago
Just don’t jostle it when it’s powered on.
ErroneousBosh•1mo ago
Hey hey 16k, what does that get you these days?
pjmlp•1mo ago
Great point!
anthk•1mo ago
Or load it over gopher:// with a Spectranet or similar:

https://www.youtube.com/watch?v=TTvrIPzGAFQ

gopher://gopherddit.com

Zardoz84•1mo ago
RESTORE
rwmj•1mo ago
This video about how to program the ZX81 efficiently is also fun: https://www.youtube.com/watch?v=WqVfyyZbIvo
tasty_freeze•1mo ago
ZX BASIC (as far as I know) was not a MS BASIC product, but many of the same techniques were used in MS BASIC. There were books describing the techniques that this blog post mentions, plus a lot more.

For instance, the symbol table is built as each variable is encountered, and it is not ordered. Thus, it was common for the first line of a BASIC program to be something like:

   10 Y=X=B=Z=1
because Y, X, B, and Z were the most frequently accessed variables, so getting them at the start of the symbol table sped up future look-ups.

Another thing: I'm pretty sure MS BASIC was smart enough to check if the GOTO or GOSUB line number was greater than the current line number, and if so, it would seek the target line from the current line, instead of the start of the program.

WANG 2200 BASIC-2 had an optimization for DEFFN statements. There was a small, fixed-size table, something like 16 entries, to hold a pointer to the first n DEFFN statements. Most programs used less than this limit. When an "FNX(...)" or whatever was encountered, it would search that DEFFN table, which then had a direct pointer to the line where the DEFFN was located. If there were more than 16 DEFFN statements, it would then have to do a linear search through the program text to find it.4

[EDIT] I forgot to mention, the article mentions that NEXT and RETURN also cared about line number placement. I haven't studied ZX BASIC so maybe it is different, but in MS BASIC and WANG BASIC there is a stack frame that contains a pointer to the head of the loop or the return point, respectively, for those two cases. Just storing a line number would be insufficient because the FOR body and the RETURN point might be in the middle of a line, eg

    200 X=X+1:GOSUB 1000:FOR I=1 TO 20:T=T-B(X):NEXT I
1313ed01•1mo ago
GW-BASIC, and probably other MS BASICs, only looked up destination lines once, then replaced the GOTO code with a direct pointer to the destination. Something similar may have been used for other symbols, but I don't remember for sure?

Guess the ZX BASIC did not do that, or it would have improved the measurements seen in the article?

BLUE Book of GW-BASIC is full of details and tricks like that and some of it probably is useful for other BASICs as well.

https://github.com/robhagemans/hoard-of-gwbasic