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
3•purplejacket•3h 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?

Show HN: Data Engineering Book – An open source, community-driven guide

https://github.com/datascale-ai/data_engineering_book/blob/main/README_en.md
48•xx123122•3h ago•6 comments

Show HN: Skill that lets Claude Code/Codex spin up VMs and GPUs

https://cloudrouter.dev/
85•austinwang115•6h ago•24 comments

Show HN: Moltis – AI assistant with memory, tools, and self-extending skills

https://www.moltis.org
68•fabienpenso•1d ago•23 comments

Show HN: OpenWhisper – free, local, and private voice-to-text macOS app

https://github.com/richardwu/openwhisper
11•rwu1997•6h ago•2 comments

Show HN: Explore ASN Relationships and BGP Route History with Real Internet Data

https://ipiphistory.com/
2•wangjiajie917•1h ago•0 comments

Show HN: Koala Diff – High-performance local data comparison (Rust and Polars)

https://github.com/godalida/koala-diff
2•godalida•1h ago•1 comments

Show HN: ClawProxy: An HTTP proxy that injects auth tokens into API calls

https://github.com/mlolson/clawproxy
2•LordHumungous•3h ago•0 comments

Show HN: Kuro-Nuri – Browser-based image redaction and compression using WASM

https://kuro-nuri.com/
2•kunronuri•3h ago•0 comments

Show HN: Bubble Sort on a Turing Machine

https://github.com/purplejacket/bubble_sort_on_tm
3•purplejacket•3h ago•0 comments

Show HN: Holywell – The missing SQL formatter for sqlstyle.guide

https://github.com/vinsidious/holywell
2•vcoppola•3h ago•0 comments

Show HN: A reputation index from mitchellh's Vouch trust files

https://vouchbook.dev/
2•rosslazer•3h ago•0 comments

Show HN: Geo Racers – Race from London to Tokyo on a single bus pass

https://geo-racers.com/
135•pattle•1d ago•85 comments

Show HN: Ghost – Session memory for Claude Code (local, qmd, Git-integrated)

https://github.com/notkurt/ghost
2•notkurt•4h ago•0 comments

Show HN: A private, bulk audio converter using WASM (186x real-time speed)

https://vocalremover.dev/bulk-converter/
2•jacoka•6h ago•1 comments

Show HN: I speak 5 languages. Common apps taught me none. So I built lairner

https://lairner.com
31•t17r•9h ago•83 comments

Show HN: Sol LeWitt-style instruction-based drawings in the browser

https://intervolz.com/sollewitt/
68•intervolz•3d ago•14 comments

Show HN: My agent started its own online store

https://clawver.store
5•nwang783•7h ago•0 comments

Show HN: AI agents play SimCity through a REST API

https://hallucinatingsplines.com
213•aed•4d ago•71 comments

Show HN: Codex HUD – Claude-HUD Style Status Line for Codex CLI

https://github.com/anhannin/codex-hud
3•anhm720•8h ago•0 comments

Show HN: Toil, a go library for simple parallelism

https://github.com/indrora/toil
3•indrora•8h ago•0 comments

Show HN: Forkwatch – Discover meaningful patches hiding in GitHub forks

https://github.com/stympy/forkwatch
3•stympy•9h ago•2 comments

Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

https://github.com/JaredStewart/coderlm/blob/main/server/REPL_to_API.md
79•jared_stewart•2d ago•36 comments

Show HN: Pgclaw – A "Clawdbot" in every row with 400 lines of Postgres SQL

https://github.com/calebwin/pgclaw
45•calebhwin•1d ago•33 comments

Show HN: Ez – project-scoped command aliases for macOS

https://github.com/urtti/ez
2•frankbyte•10h ago•0 comments

Show HN: 20+ Claude Code agents coordinating on real work (open source)

https://github.com/mutable-state-inc/lean-collab
50•austinbaggio•1d ago•37 comments

Show HN: What is HN thinking? Real-time sentiment and concept analysis

https://ethos.devrupt.io/
34•ddtaylor•1d ago•19 comments

Show HN: Agent Alcove – Claude, GPT, and Gemini debate across forums

https://agentalcove.ai
64•nickvec•2d ago•26 comments

Show HN: Rowboat – AI coworker that turns your work into a knowledge graph (OSS)

https://github.com/rowboatlabs/rowboat
202•segmenta•3d ago•56 comments

Show HN: Vintageterminals.io – a bootable museum of vintage OSes (13 so far)

https://vintageterminals.io
4•dansquizsoft•11h ago•1 comments

Show HN: I built a macOS tool for network engineers – it's called NetViews

https://www.netviews.app
241•n1sni•3d ago•60 comments