frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: A small programming language where everything is a value

https://github.com/Jcparkyn/herd
25•jcparkyn•1h ago
This is a hobby project of mine that I started a few years ago to learn about programming language implementation. It was created 95% without AI, although a few recent commits include code from Gemini CLI.

I started out following Crafting Interpreters, but gradually branched off that until I had almost nothing left in common.

Tech stack: Rust, Cranelift (JIT compilation), LALRPOP (parser).

Comments

discarded1023•18m ago
At the risk of telling you what you already know and/or did not mean to say: not everything can be a value. If everything is a value then no computation (reduction) is possible. Why? Because computation stops at values. This is traditional programming language/lambda calculus nomenclature and dogma. See Plotkin's classic work on PCF (~ 1975) for instance; Winskel's semantics text (~ 1990) is more approachable.

Things of course become a lot more fun with concurrency.

Now if you want a language where all the data thingies are immutable values and effects are somewhat tamed but types aren't too fancy etc. try looking at Milner's classic Standard ML (late 1970s, effectively frozen in 1997). It has all you dream of and more.

In any case keep having fun and don't get too bogged in syntax.

jcparkyn•4m ago
Thanks, some interesting reading there that I will check out. Perhaps I should've used more precise wording: "All types are value types".

> Standard ML [...] It has all you dream of and more

The main thing here that's missing in Standard ML (and most other functional languages) is the "mutable" part of "mutable value semantics" - i.e., the ability to modify variables in-place (even nested parts of complex structures) without affecting copies. This is different from "shadowing" a binding with a different value, since it works in loops etc.

ekipan•16m ago
"Everything is a value" is not very informative. That's true of most languages nowadays. Maybe "exclusively call-by-value" or "without reference types."

I've only read the first couple paragraphs so far but the idea reminds me of a shareware language I tinkered with years ago in my youth, though I never wrote anything of substance: Euphoria (though nowadays it looks like there's an OpenEuphoria). It had only two fundamental types: the atom, a possibly floating point number, and the sequence: a list of zero or more atoms and sequences. Strings in particular are just sequences of codepoint atoms.

It had a notion of "type"s which were functions that returned a boolean 1 only if given a valid value for the type being defined. I presume it used byte packing and copy-on-write or whatever for its speed boasts.

https://openeuphoria.org/

https://rapideuphoria.com/

rvba•15m ago
> In herd, everything is immutable unless declared with var

So basucally everything is var?

Show HN: A small programming language where everything is a value

https://github.com/Jcparkyn/herd
26•jcparkyn•1h ago•5 comments

Show HN: An interactive map of US lighthouses and navigational aids

https://www.lighthouses.app/
21•idd2•6h ago•6 comments

Show HN: Bonsplit – Tabs and splits for native macOS apps

https://bonsplit.alasdairmonk.com
197•sgottit•12h ago•26 comments

Show HN: Netfence – Like Envoy for eBPF Filters

https://github.com/danthegoodman1/netfence
38•dangoodmanUT•9h ago•6 comments

Show HN: Spine – an execution-centric backend framework for Go

https://spine.na2ru2.me/en/
2•narubrown•55m ago•0 comments

Show HN: Fence – Sandbox CLI commands with network/filesystem restrictions

https://github.com/Use-Tusk/fence
61•jy-tan•5d ago•15 comments

Show HN: TUI for managing XDG default applications

https://github.com/mitjafelicijan/xdgctl
112•mitjafelicijan•13h ago•39 comments

Show HN: I built an app that blocks social media until you read Quran daily

8•kalyfacloud•1h ago•5 comments

Show HN: CertRadar – Find every certificate ever issued for your domain

https://certradar.net/
11•ops_mechanic•6h ago•8 comments

Show HN: LLMNet – The Offline Internet, Search the web without the web

https://github.com/skorotkiewicz/llmnet
21•modinfo•10h ago•6 comments

Show HN: AutoShorts – Local, GPU-accelerated AI video pipeline for creators

https://github.com/divyaprakash0426/autoshorts
66•divyaprakash•17h ago•34 comments

Show HN: Gitmore – AI-powered Git reports that write themselves

4•inferno22•11h ago•1 comments

Show HN: AI-rganize – CLI tool for organizing your files

https://github.com/adefemi171/ai-rganize
2•tha_infra_guy•4h ago•0 comments

Show HN: Sightline – Shodan-style search for real-world infra using OSM Data

https://github.com/ni5arga/sightline
20•ni5arga•16h ago•1 comments

Show HN: A Zero-Copy 1.58-bit LLM Engine hitting 117 Tokens/s on single CPU core

https://github.com/r3-engine/r3-engine
4•dhilipsiva•4h ago•0 comments

Show HN: Accurate Password Guessing with AI

https://github.com/Tzohar/PassLLM
2•Plarsy•5h ago•0 comments

Show HN: C From Scratch – Learn safety-critical C with prove-first methodology

https://github.com/SpeyTech/c-from-scratch
59•william1872•1d ago•8 comments

Show HN: I used my book generator to generate a catalog of books it can generate

https://www.ebook-forge.com/Omni
2•lywald•5h ago•2 comments

Show HN: Uv-pack – Pack a uv environment for later portable (offline) install

https://github.com/davnn/uv-pack
3•davnn•5h ago•0 comments

Show HN: Kreamsicle – Cmd+K command palette for Hacker News

https://sajarin.com/blog/kreamsicle/
3•Sajarin•6h ago•2 comments

Show HN: Open-source Figma design to code

https://github.com/vibeflowing-inc/vibe_figma
49•alepeak•1d ago•8 comments

Show HN: Coi – A language that compiles to WASM, beats React/Vue

215•io_eric•5d ago•68 comments

Show HN: StormWatch – Weather emergency dashboard with prep checklists

https://jeisey.github.io/stormwatch/
43•lotusxblack•1d ago•11 comments

Show HN: VM-curator – a TUI alternative to libvirt and virt-manager

https://github.com/mroboff/vm-curator
38•theYipster•21h ago•8 comments

Show HN: isometric.nyc – giant isometric pixel art map of NYC

https://cannoneyed.com/isometric-nyc/
1309•cannoneyed•3d ago•240 comments

Show HN: Bucket – Encrypted file sharing for people who live in the terminal

https://bucketlabs.org
7•bucket_•8h ago•6 comments

Show HN: Generate the perfect kickoff prompt

https://vibeprompting.dev
3•relatedcode•9h ago•0 comments

Show HN: Open Computer-Animated Multivariable Calculus Course in 6 Languages

https://calculus.academa.ai/
5•sinaatalay•9h ago•2 comments

Show HN: Free PDF Editor by TechRex – client-side PDF editing, OCR, compression

https://pdffreeeditor.com/
3•Maaz-Sohail•9h ago•0 comments

Show HN: Semantic search engine for Studio Ghibli movie

https://ghibli-search.anini.workers.dev/
44•aninibread•4d ago•10 comments