frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The next frontier in weight-loss drugs: one-time gene therapy

https://www.washingtonpost.com/health/2026/01/24/fractyl-glp1-gene-therapy/
1•bookofjoe•30s ago•1 comments

At Age 25, Wikipedia Refuses to Evolve

https://spectrum.ieee.org/wikipedia-at-25
1•asdefghyk•3m ago•1 comments

Show HN: ReviewReact – AI review responses inside Google Maps ($19/mo)

https://reviewreact.com
1•sara_builds•3m ago•0 comments

Why AlphaTensor Failed at 3x3 Matrix Multiplication: The Anchor Barrier

https://zenodo.org/records/18514533
1•DarenWatson•4m ago•0 comments

Ask HN: How much of your token use is fixing the bugs Claude Code causes?

1•laurex•8m ago•0 comments

Show HN: Agents – Sync MCP Configs Across Claude, Cursor, Codex Automatically

https://github.com/amtiYo/agents
1•amtiyo•9m ago•0 comments

Hello

1•otrebladih•10m ago•0 comments

FSD helped save my father's life during a heart attack

https://twitter.com/JJackBrandt/status/2019852423980875794
2•blacktulip•13m ago•0 comments

Show HN: Writtte – Draft and publish articles without reformatting, anywhere

https://writtte.xyz
1•lasgawe•15m ago•0 comments

Portuguese icon (FROM A CAN) makes a simple meal (Canned Fish Files) [video]

https://www.youtube.com/watch?v=e9FUdOfp8ME
1•zeristor•16m ago•0 comments

Brookhaven Lab's RHIC Concludes 25-Year Run with Final Collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
2•gnufx•18m ago•0 comments

Transcribe your aunts post cards with Gemini 3 Pro

https://leserli.ch/ocr/
1•nielstron•22m ago•0 comments

.72% Variance Lance

1•mav5431•23m ago•0 comments

ReKindle – web-based operating system designed specifically for E-ink devices

https://rekindle.ink
1•JSLegendDev•25m ago•0 comments

Encrypt It

https://encryptitalready.org/
1•u1hcw9nx•25m ago•1 comments

NextMatch – 5-minute video speed dating to reduce ghosting

https://nextmatchdating.netlify.app/
1•Halinani8•26m ago•1 comments

Personalizing esketamine treatment in TRD and TRBD

https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1736114
1•PaulHoule•27m ago•0 comments

SpaceKit.xyz – a browser‑native VM for decentralized compute

https://spacekit.xyz
1•astorrivera•28m ago•0 comments

NotebookLM: The AI that only learns from you

https://byandrev.dev/en/blog/what-is-notebooklm
2•byandrev•28m ago•1 comments

Show HN: An open-source starter kit for developing with Postgres and ClickHouse

https://github.com/ClickHouse/postgres-clickhouse-stack
1•saisrirampur•29m ago•0 comments

Game Boy Advance d-pad capacitor measurements

https://gekkio.fi/blog/2026/game-boy-advance-d-pad-capacitor-measurements/
1•todsacerdoti•29m ago•0 comments

South Korean crypto firm accidentally sends $44B in bitcoins to users

https://www.reuters.com/world/asia-pacific/crypto-firm-accidentally-sends-44-billion-bitcoins-use...
2•layer8•30m ago•0 comments

Apache Poison Fountain

https://gist.github.com/jwakely/a511a5cab5eb36d088ecd1659fcee1d5
1•atomic128•32m ago•2 comments

Web.whatsapp.com appears to be having issues syncing and sending messages

http://web.whatsapp.com
1•sabujp•32m ago•2 comments

Google in Your Terminal

https://gogcli.sh/
1•johlo•34m ago•0 comments

Shannon: Claude Code for Pen Testing: #1 on Github today

https://github.com/KeygraphHQ/shannon
1•hendler•34m ago•0 comments

Anthropic: Latest Claude model finds more than 500 vulnerabilities

https://www.scworld.com/news/anthropic-latest-claude-model-finds-more-than-500-vulnerabilities
2•Bender•38m ago•0 comments

Brooklyn cemetery plans human composting option, stirring interest and debate

https://www.cbsnews.com/newyork/news/brooklyn-green-wood-cemetery-human-composting/
1•geox•39m ago•0 comments

Why the 'Strivers' Are Right

https://greyenlightenment.com/2026/02/03/the-strivers-were-right-all-along/
1•paulpauper•40m ago•0 comments

Brain Dumps as a Literary Form

https://davegriffith.substack.com/p/brain-dumps-as-a-literary-form
1•gmays•40m ago•0 comments
Open in hackernews

Speed-coding for the 6502 – a simple example

https://www.colino.net/wordpress/en/archives/2025/08/28/speed-coding-for-the-6502-a-simple-example/
53•mmphosis•5mo ago

Comments

rbanffy•5mo ago
What a delightful short read.

They could go one step further and calculate the table as needed and use it as a cache.

For an single image scaling it might get a little bit better.

spc476•5mo ago
If you read the entire article, they do that at the end of the article.
anyfoo•5mo ago
Not quite. They build the entire table upfront, whether any individual entry is needed or not.

Making it an on-demand cache instead is a neat next step. Whether it helps or hurts depends on the actual input: If the input image uses every pixel value anyway, the additional overhead of checking whether the table entry is computed is just unnecessary extra with no value.

But if a typical image only uses a few pixel values, then the amortized cost of just calculating the few needed table entries may very well be significantly below the cost of the current algorithm.

If images are somewhere in between, or their characteristics not well known, then simply trying out both approaches with typical input data is a good approach!

Unless you’re perfectly happy with 0.2 seconds, for example because the runtime of some other parts take so long that dwarfs those 0.2s, then why bother.

egypturnash•5mo ago
Even if you could get the "is this cell of the table calculated?" check down to one cycle (which you can't, 6502 branch instructions take 2-4 cycles, plus a few more operations to check the table calculation status), it's still gonna add one cycle to a hot loop that's done 43k times. Pre-calcing the entire table only burns 6k cycles, and can probably be done while displaying some transitional effect that requires very little CPU.

If we presume this scaling operation will be done more than one time (which it probably will be if it's getting this level of optimization) then it gets even worse.

anyfoo•5mo ago
Good analysis. I guess I lost my cycle-counting foo, because on modern CPUs cycle-counting is a) infeasible on a superscalar, speculative, out-of-order CPU, and b) even if you did manage to do it, it hardly matters when a CPU cycle is less than a nanosecond, but any memory access that slips through the caches means many orders of magnitude higher latency.

Of course none of that applies here, but it colors the way you think about things…

egypturnash•5mo ago
meanwhile the 6502 is all "cache? what's cache", every 6502 optimization is basically a pessimization for modern CPUs.
colinlm•5mo ago
Every entry will be used, it's to scale X/Y coordinates :) And indeed, those 0.2s are dwarfed by the rest of the algorithm (10 seconds)
rbanffy•5mo ago
Good point. I was thinking of pixel values.
Joker_vD•5mo ago
I wonder if building this table can be sped up by noticing a recurring pattern?

    x    0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 ... 254 255
    f(x) 0  0  1  2  3  3  4  5  6  6  7  8  9  9 10 11 12 12 ... 190 191
So something like

    sta table,y
    iny
    sta table,y
    adc $0
    iny    
    sta table,y
    adc $0
    iny    
    sta table,y
    adc $0
    iny    
used as the loop body that should be repeated 64 times, should work. Will it take less than 6000 cycles total?
FatalLogic•5mo ago
I didn't check your code worked.. just copied it and ran the inner part of the loop once, but according to https://www.masswerk.at/6502/

It's about 2x faster. Your code uses 44 CPU cycles x 64

Edit: plus a branch instruction, maybe that adds 3 cycles x 64 I guess

anyfoo•5mo ago
Very neat. Breaking up multiplications and divisions into bit shifts, and lookup table to trade off memory for runtime, are indeed nothing new to engineers working on the low level, but this paints a very pretty picture of how this looks in practice.
JKCalhoun•5mo ago
Games that needed trig in the 90's often used SIN/COS lookup-tables. To keep memory down:

1) you only need the first 1/4 of the Sine table since the remaining 3/4 are either the first 1/4 in reverse and/or with the sign flipped.

2) and of course Sine can also be used as a Cosine lookup if you add pi/2 radians to the cosine angle (wrapping around of course).

3) to avoid the size needed for a table of floats you can of course use integers (scaled by some factor) or fixed-point values.

4) and simple interpolation would get you seemingly more precision.

(Combining all the above was a bit gross so documentation and a good SPI helped.)

lttlrck•5mo ago
I wrote a token ring networking simulator with error simulation (token dropping etc) on a 6502. 128 bytes of RAM. It was a squeeze.

I used a Hewlett Packard development system with a 12" hard disk.

Good times.