frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Bubble sort on a Turing machine

https://github.com/purplejacket/bubble_sort_on_tm
6•purplejacket•1d ago
Bubble sort is pretty simple in most programming languages ... what about on a Turing Machine? I used all three of Claude 4.6, GLM 5, and GPT 5.2 to get a result, so this exercise was not quite trivial, at least at this time. The resulting machine, bubble_sort_unary.yaml, will take this input:

111011011111110101111101111

and give this output:

101101110111101111101111111

I.e., it's sorting the array [3,2,7,1,5,4]. The machine has 31 states and requires 1424 steps before it comes to a halt. It also introduces two extra symbols onto the tape, 'A' and 'B'. (You could argue that 0 is also an extra symbol because turinmachine.io uses blank, ' ', as well).

When I started writing the code the LLM (Claude) balked at using unary numbers and so we implemented bubble_sort.yaml which uses the tape symbols '1', '2', '3', '4', '5', '6', '7'. This machine has fewer states, 25, and requires only 63 steps to perform the sort. So it's easier to watch it work, though it's not as generalized as the other TM.

Some comments about how the 31 states of bubbles_sort_unary.yaml operate:

  | Group | Count | Purpose |
  |---|---|---|
  | `seek_delim_{clean,dirty}` | 2 | Pass entry: scan right to the next `0` delimiter between adjacent numbers. |
  | `cmpR_*`, `cmpL_*`, `cmpL_ret_*`, `cmpL_fwd_*` | 8 | Comparison: alternately mark units in the right (`B`) and left (`A`) numbers to compare their sizes. |
  | `chk_excess_*`, `scan_excess_*`, `mark_all_X_*` | 6 | Excess check: right number exhausted — see if unmarked `1`s remain on the left (meaning L > R, swap needed). |
  | `swap_*` | 7 | Swap: bubble each `X`-marked excess unit rightward across the `0` delimiter. |
  | `restore_\*` | 6 | Restore: convert `A`, `B`, `X` marks back to `1`s, then advance to the next pair. |
  | `rewind` / `done` | 2 | Rewind to start after a dirty pass, or halt. |
(The above is in the README.md if it doesn't render on HN.)

I'm curious if anyone can suggest refinements or further ideas. And please send pull requests if you're so inclined. My development path: I started by writing a pretty simple INITIAL_IDEAS.md, which got updated somewhat, then the LLM created a SPECIFICATION.md. For the bubble_sort_unary.yaml TM I had to get the LLMs to build a SPEC_UNARY.md because too much context was confusing them. I made 21 commits throughout the project and worked for about 6 hours (I was able to multi-task, so it wasn't 6 hours of hard effort). I spent about $14 on tokens via Zed and asked some questions via t3.chat ($8/month plan).

A final question: What open source license is good for these types of mini-projects? I took the path of least resistance and used MIT, but I observe that turingmachine.io uses BSD 3-Clause. I've heard of "MIT with Commons Clause;" what's the landscape surrounding these kind of license questions nowadays?

News publishers limit Internet Archive access due to AI scraping concerns

https://www.niemanlab.org/2026/01/news-publishers-limit-internet-archive-access-due-to-ai-scrapin...
289•ninjagoo•4h ago•174 comments

uBlock filter list to hide all YouTube Shorts

https://github.com/i5heu/ublock-hide-yt-shorts/
382•i5heu•5h ago•134 comments

Breaking the spell of vibe coding

https://www.fast.ai/posts/2026-01-28-dark-flow/
95•arjunbanker•1d ago•44 comments

My smart sleep mask broadcasts users' brainwaves to an open MQTT broker

https://aimilios.bearblog.dev/reverse-engineering-sleep-mask/
295•minimalthinker•7h ago•139 comments

Ooh.directory: a place to find good blogs that interest you

https://ooh.directory/
387•hisamafahri•9h ago•110 comments

Zvec: A lightweight, fast, in-process vector database

https://github.com/alibaba/zvec
18•dvrp•1d ago•1 comments

Flood Fill vs. The Magic Circle

https://www.robinsloan.com/winter-garden/magic-circle/
11•tobr•3d ago•0 comments

IBM tripling entry-level jobs after finding the limits of AI adoption

https://fortune.com/2026/02/13/tech-giant-ibm-tripling-gen-z-entry-level-hiring-according-to-chro...
120•WhatsTheBigIdea•23h ago•46 comments

Instagram's URL Blackhole

https://medium.com/@shredlife/instagrams-url-blackhole-c1733e081664
24•tkp-415•1d ago•4 comments

Discord: A case study in performance optimization

https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance
32•tylerdane•22h ago•12 comments

Amsterdam Compiler Kit

https://github.com/davidgiven/ack
81•andsoitis•6h ago•16 comments

5,300-year-old 'bow drill' rewrites story of ancient Egyptian tools

https://www.ncl.ac.uk/press/articles/latest/2026/02/ancientegyptiandrillbit/
26•geox•3d ago•0 comments

Colored Petri Nets, LLMs, and distributed applications

https://blog.sao.dev/cpns-llms-distributed-apps/
14•stuartaxelowen•2h ago•0 comments

A header-only C vector database library

https://github.com/abdimoallim/vdb
46•abdimoalim•5h ago•11 comments

The consequences of task switching in supervisory programming

https://martinfowler.com/fragments/2026-02-13.html
19•bigwheels•1d ago•0 comments

Launching Interop 2026

https://hacks.mozilla.org/2026/02/launching-interop-2026/
26•linolevan•1d ago•2 comments

Ask HN: How to get started with robotics as a hobbyist?

132•StefanBatory•6d ago•57 comments

Descent, ported to the web

https://mrdoob.github.io/three-descent/
113•memalign•3h ago•19 comments

Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB

https://github.com/datavorous/sameshi
171•datavorous_•9h ago•50 comments

How often do full-body MRIs find cancer?

https://www.usatoday.com/story/life/health-wellness/2026/02/11/full-body-mris-cancer-aneurysm/883...
56•brandonb•1d ago•42 comments

Unicorn Jelly

https://unicornjelly.com/
20•avaer•10h ago•6 comments

A review of M Disc archival capability with long term testing results (2016)

http://www.microscopy-uk.org.uk/mag/artsep16/mol-mdisc-review.html
52•1970-01-01•7h ago•52 comments

Windows NT/OS2 Design Workbook

https://computernewb.com/~lily/files/Documents/NTDesignWorkbook/
57•markus_zhang•3d ago•22 comments

OpenAI should build Slack

https://www.latent.space/p/ainews-why-openai-should-build-slack
78•swyx•15h ago•88 comments

An AI agent published a hit piece on me – more things have happened

https://theshamblog.com/an-ai-agent-published-a-hit-piece-on-me-part-2/
591•scottshambaugh•22h ago•520 comments

A method and calculator for building foamcore drawer organisers

https://capnfabs.net/posts/foamcore-would-be-a-sick-name-for-a-music-genre/
57•evakhoury•5d ago•13 comments

Vim 9.2

https://www.vim.org/vim-9.2-released.php
308•tapanjk•7h ago•132 comments

Fun with Algebraic Effects – From Toy Examples to Hardcaml Simulations

https://blog.janestreet.com/fun-with-algebraic-effects-hardcaml/
47•weinzierl•4d ago•1 comments

Zig – io_uring and Grand Central Dispatch std.Io implementations landed

https://ziglang.org/devlog/2026/#2026-02-13
337•Retro_Dev•14h ago•245 comments

Show HN: Arcmark – macOS bookmark manager that attaches to browser as sidebar

https://github.com/Geek-1001/arcmark
57•ahmed_sulajman•6h ago•13 comments