O
Ori Bernstein
eigenstate.org · Personal blog · on HN since 2008
Ori Bernstein writes about systems programming, including his Myrddin language, C declarations, Makefiles, seccomp, and regex debugging.
What HN saysHN links his C declaration notes as an alternative to the spiral rule, and his Myrddin pages when discussing C-like languages; the author also comments there himself.
18HN people shared it
12linked it in comments
12stories submitted
186story points
3 months agolast shared
2008people per year2026
Most-shared posts
- 1Myrddin: a systems language that is powerful and fun8 people · 74 points · first shared 2014 · 66 comments on HN
- 2Myrddin: A language for coding close to the metal.4 people · 9 points · first shared 2013 · 1 comments on HN
- 3C decl3 people · first shared 2020
- 4Notes on Writing Makefiles2 people · 87 points · first shared 2015 · 9 comments on HN
- 5Irc.myr: A libc-free IRC client in Myrddin1 people · 6 points · first shared 2017 · discussion on HN
- 6Denying Syscalls with Seccomp1 people · 3 points · first shared 2015 · discussion on HN
- 7A Regex Debugger1 people · 3 points · first shared 2016 · 2 comments on HN
- 8Myrddin Monthly: Language Updates in December/January.1 people · 2 points · first shared 2014 · discussion on HN
- 9Debugging Regexes (2016)1 people · 2 points · first shared 2016 · discussion on HN
- 10Lang checklist1 people · first shared 2016
- 11Playground1 people · first shared 2016
- 12D41e3b69d258e3b52f7cee7a9921f0271 people · first shared 2017
- 13Tex.pdf1 people · first shared 2012
- 142018 Jan 00000081 people · first shared 2018
- 15Cable3 formatted.c1 people · first shared 2014
What HN people wrote when they linked it
pcfwik · 2026-07-31
Being taught this rule in undergrad really hampered my appreciation of C. As I've said in a previous comment, the real key that unlocked understanding C declarations for me is the mantra "declaration follows use." You declare a variable in C in exactly the same way you would use it: if you know how to use a variable, then you know how to read and write a declaration for it. Once I understood this elegant idea, it became hard to enjoy using statically typed languages that eschew it.
It is explained in more detail at this link:
https://eigenstate.org/notes/c-decl
jstimpfle · 2025-04-04
There is no spiral rule, that is a misconception. Look up how "declaration follows usage" in C. E.g. https://eigenstate.org/notes/c-decl
While this rule has become somewhat diluted when C developed and gradually took on features from C++ (like types in function parameters), it's still very helpful to understand the guiding principle. (But those inconsistencies that crept in over time are also the reason why newer languages don't do that anymore).
voaie · 2016-01-22
The designer has a stange aesthetics for those {} (function body) and ;; (block terminator), is there a FAQ?
Update: This may be the best answer...
http://eigenstate.org/myrddin/lang-checklist
andrewchambers · 2016-01-19
I had a play with nim and it wasn't totally to my taste.
Another language that is worth checking out is myrddin http://eigenstate.org/myrddin/. If you haven't heard of it before, I would describe it as C with generics, type inference and pattern matching.
ori_b · 2013-11-22
As the developer of Myrddin (http://eigenstate.org/myrddin.html), I felt the need to fill it in for my pet language:
You appear to be advocating a new:
[ ] functional [ ] imperative [ ] object-oriented [x] procedural
[ ] stack-based [x] "multi-paradigm" [ ] lazy [x] eager
[x] statically-typed [ ] dynamically-typed [ ] pure [x] impure
[ ] non-hygienic [ ] visual [ ] beginner-friendly
[ ] non-programmer-friendly [ ] completely incomprehensible
programming language. Your language will not work. Here is why it
will not work.
You appear to believe that:
[ ] Syntax is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[x] Nobody really needs:
[x] concurrency [x] a REPL [x] debugger support [x] IDE support [ ] I/O
[x] to interact with code not written in your language
[ ] The entire world speaks 7-bit ASCII
[x] Scaling up to large software projects will be easy
[x] Convincing programmers to adopt a new language will be easy
[ ] Convincing programmers to adopt a language-specific IDE
will be easy
[ ] Programmers love writing lots of boilerplate
[ ] Specifying behaviors as "undefined" means that programmers
won't rely on them
[ ] "Spooky action at a distance" makes programming more fun
Unfortunately, your language (has/lacks): [Lacks => L, Has => H]
[L] comprehensible syntax [L] semicolons
…
dang · 2018-06-04
> I believe that currently https://myrlang.org/ is a more canonical address
OK, we changed to that from https://eigenstate.org/myrddin/. Thanks!
akkartik · 2015-12-04
I've actually been building a teaching VM with these properties. You can't take the address of arbitrary values (so there's no distinction between lvalues and rvalues), there's no pointer arithmetic (instead you have type-safe primitives for record access and array indexing), all arrays (including strings) know their length and bounds-check accesses, and unions behave more like sum types, always knowing precisely what type they have stored. All these constraints ensure you can never convert a number to an address, or generate an address to an illegal value. More info about the goal and rationale: http://akkartik.name/post/mu; http://github.com/akkartik/mu.
I also recently found out about http://eigenstate.org/myrddin which seems more mature with very similar goals/aesthetics. I've been digging into it a fair bit.
Finally, on the extreme other end of the spectrum, there's Rust.
qznc · 2013-07-28
Having such a list myself, I would add:
Myrrdin: http://eigenstate.org/myrddin.html
Pascal: http://www.freepascal.org/
Cyclone is pretty dead.
orib · 2008-08-24
I wrote something similar to this a while back:
http://eigenstate.org/git-quickref.html
The rest of the site is effectively void of information, though, although I keep wanting to put stuff up on it. I need to get around to writing up an Autofoo tutorial, because it's one of those big scary piles of crap that isn't too bad (at least too bad to use) once you figure it out
zem · 2017-02-21
some others worth checking out (all largely single-developer efforts):
http://www.ats-lang.org/ [ml + c + everything dialled up to eleven. linear and dependent types. comes out of academia, but under active development and slowly beginning to gather a community.]
https://eigenstate.org/myrddin/ [not really familiar with this one but it looks interetsing. close to the metal, has pattern matching over algebraic datatypes but seems more towards the c than the ml end of the spectrum from the brief glance i took.]
http://mythryl.org/ [never took off, sadly; i really liked the looks of this one and its ambitious goals. strong sml influence, with better posix integration and some c-like surface features. developer is currently battling cancer: http://mythryl.org/pipermail/mythryl/2016-April/000942.html]
http://felix-lang.org/ [spawn of ml + c++ rather than ml + c. under enthusiastic if haphazard development.]
there have been a few others i've seen pop up over the years; i keep meaning to make a website or at least a github awesome-style list cataloguing and tracking them.
nickpsecurity · 2016-05-13
It's not. Like most of academic ones, it can be picked up or clean-slated if people really want it. The authors tend to move on, though, as in BitC (unfortunately...). I have some others for you, though. Most research is on automatically transforming C instead of a safer, manually-done C. Best are these:
https://www.cs.rutgers.edu/~santosh.nagarakatte/softbound/
http://sva.cs.illinois.edu/downloads.html
http://dslab.epfl.ch/proj/cpi/
Paper mentioning several of the safe C's, including those like Vault you can't have:
https://pdfs.semanticscholar.org/a890/a850dc78e65e26f8f4def435b17094ce…
Galois, as usual, graciously open-sourced two of theirs (Ivory & Tower) that's already fielded in real world:
http://ivorylang.org/
Popcorn and TALC are older ones in prototype form:
https://www.cs.cornell.edu/talc/releases.html
Someone here showed me this one I haven't evaluated but is used in compiler front-end:
https://eigenstate.org/myrddin/
The C0 one used in Verisoft is embedded in vc0compiler-trunk probably. They did great things with it but I haven't been brave enough to try to retrieve it ;).
http://www.verisoft.de/VerisoftRepository.html
So, altogether, what remains is quite scattered and prototype form. Plus, you still have to rewrite the software. So, I've mostly been recommending people apply Softbound, SAFECode, and CPI to their code just to see what happens. If it still works and fast enough, then just use it as it covers most bases. Also, contributing to…