frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: MegaHAL in Pure SQL

https://github.com/tgies/megahal-sql
1•tgies•1h ago
I ported Jason Hutchens' 1998 Loebner Prize-winning chatbot, MegaHAL, to run entirely inside PostgreSQL, in pure SQL. The entire lifecycle -- tokenization, learning, keyword extraction, Markov chain generation, and entropy scoring -- is implemented in standard SQL using complex CTEs. There is no PL/pgSQL or any other sort of procedural escape hatch.

Learning is a single ~560-line SQL statement that splits text, interns symbols, and updates two 5th-order Markov tries (forward and backward) using depth-unrolled writable CTEs. Inference is a recursive query that generates N candidate replies in parallel. It performs bidirectional weighted random walks, evaluates them for information-theoretic surprise, and formats the winner as a sentence-cased string.

I provided a `docker-compose.yml` and convenient Python driver script so you can try it out quickly, and there's also a web-based demo where I bundled it with PGlite (WASM PostgreSQL) at https://tgies.github.io/megahal-sql/. These are provided for convenience, but you can also just run the schema initialization SQL and `SELECT megahal_converse('hello from hn.');`

Comments

vunderba•35m ago
Nice job! I corresponded with Hutchens back in the day about MegaHAL. What made it stand out compared to other Loebner chatbots was that it didn’t just zoom in on a couple of keywords in the user’s input and then run a forward-only chain - instead buiding both forward and backward Markov models, generating text in both directions along with calculating entropy/surprise to produce a novel response.

Credits are a ledger problem, not a pricing problem

https://www.solvimon.com/blog/credits-are-a-ledger-problem-not-a-pricing-problem
1•arnon•20s ago•0 comments

Study: Digital treatment with Tetris can dramatically reduce trauma memories

https://www.ox.ac.uk/news/2026-02-19-study-shows-digital-treatment-tetris-gameplay-can-dramatical...
1•giuliomagnifico•34s ago•0 comments

Linus Torvalds and friends: how Linux evolved from solo act

https://www.theregister.com/2026/02/18/linus_torvalds_and_friends/
1•signa11•1m ago•0 comments

Practical guide to start building with Claude Code

https://barts.space/getting-started-with-claude-code-the-practical-version/
1•cast42•1m ago•0 comments

Porting barcode scanning library ZXing to Go with Claude Code

https://levine.tech/blog/porting-zxing
1•ericlevine•2m ago•0 comments

Why applicant tracking systems are broken by design

https://www.saj.ad/2026/ats
2•dajas•2m ago•0 comments

You Can't Critique AI You Haven't Built With

https://karozieminski.substack.com/p/critical-ai-literacy-product-thinking
1•Lunaboo•2m ago•0 comments

New technology solves production bottleneck for black soldier fly larvae

https://agrilifetoday.tamu.edu/2026/01/22/new-technology-solves-production-bottleneck-for-black-s...
1•PaulHoule•2m ago•0 comments

There'll Be More AI Agents Online Than Humans. and No Way to Verify Them

https://timafey.substack.com/p/soon-therell-be-more-ai-agents-online
1•Tima_fey•3m ago•0 comments

Test

1•migrevdolseg•3m ago•0 comments

Show HN: SageOx – The Hivemind for Agentic Engineering

https://sageox.ai/blog/introducing-sageox
1•port8080•4m ago•2 comments

Most Developers Don't Build New Things

https://robbyonrails.com/articles/2026/02/18/most-developers-dont-build-new-things/
2•robbyrussell•4m ago•1 comments

Show HN: Orchestera – Managed Apache Spark on Kubernetes in Your Own AWS Account

https://orchestera.com/
1•iamspoilt•5m ago•0 comments

Show HN: $89.90 AI market study instead of a $50k agency report

https://my-market-study.com
1•brunocfalcao•5m ago•0 comments

A Deep Dive into ClassLoader Contention in Java

https://medium.com/@nik6/a-deep-dive-into-classloader-contention-in-java-a0415039b0c1
2•signa11•6m ago•0 comments

Choosing a Language Based on Its Syntax?

https://www.gingerbill.org/article/2026/02/19/choosing-a-language-based-on-syntax/
2•todsacerdoti•6m ago•0 comments

Problems with a weak tryLock operation in C and C++ standards

https://forums.swift.org/t/se-0512-document-that-mutex-withlockifavailable-cannot-spuriously-fail...
2•matt_d•6m ago•0 comments

Molt Productions – a music platform where every user is an AI agent

https://molt.productions
1•tyintech•7m ago•1 comments

Extend Cursor with Plugins

https://cursor.com/blog/marketplace
2•gmays•7m ago•0 comments

Ask HN: Why is 'Verified' B2B data becoming a deliverability trap?

2•solarisos•7m ago•1 comments

Blog Post Is Your Sign to Start Self-Hosting

https://blog.tjll.net/this-is-your-sign-to-self-host/
1•speckx•7m ago•0 comments

Show HN: Foolery – a web UI for orchestrating Claude Code agents on top of Beads

https://github.com/acartine/foolery
1•therealcartine•8m ago•0 comments

Could Sarvam 30B/105B Models Be India's Answer to DeepSeek and Mistral?

https://shivekkhurana.com/blog/sarvam-ai-summit/
1•shivekkhurana•9m ago•1 comments

Ask HN: Biggest f-ups by your Agent

2•cyrusradfar•9m ago•1 comments

One tool for agents, clusters, and E2E tests – locally and in production

https://slicervm.com/blog/one-tool-for-agents-clusters-and-tests/
1•alexellisuk•10m ago•1 comments

Helicobacter Pylori: A Nobel Pursuit?

https://pmc.ncbi.nlm.nih.gov/articles/PMC2661189/
1•o4c•11m ago•0 comments

Show HN: Qlaude – Queue Tasks for Claude Code, Control via Telegram

https://github.com/starsh2001/qlaude
2•starsh2001•11m ago•1 comments

Show HN: Kantext – A context-native data store in Rust, grounded in Git

https://www.kantext.dev/
1•jasonlantz•12m ago•0 comments

HR teams are drowning in slop grievances

https://www.ft.com/content/afc335fb-8f32-458f-9b6f-431021774002
3•speckx•12m ago•0 comments

Nix isOdd

https://github.com/anna-oake/nix-is-odd
1•notpushkin•13m ago•0 comments