Better HN
topnewbestaskshowjobs
Log inSign up

mjbq

6 karma · joined Apr 7, 2026 (7mo ago) · 13 submissions

flaneur, newspaper reader, author of nomlang.org
Submissions

comment 3w ago · link · parent

This is a post about relationship categories in different languages, in this case human languages.

comment 3w ago · link · parent

thanks for pointing that out. I have uploaded the missing page

3.

Feminine and Masculine(nomlang.org ↗)

3 points · by mjbq · 3w ago · 2 comments

comment 3w ago · link · parent

Pep/nom is a DSL for parsing text patterns (context-free and some context-sensitive). It was inspired by sed, the stream editor, but it uses a more capable underlying virtual machine (which I call pep) which is basically an array and stack of strings that is synchronised on push and pop (push increments an array point, and pop decrements the array pointer).

I have been working on this for several years in order to explore the idea and have found it useful and stimulating. The actual language, which I call "nom" uses a curly brace syntax and a set of commands that manipulate the text register machine.

Documentation is at http://nomlang.org/doc/ and a set of nom example scripts is at http://nomlang.org/eg/

Nom is self hosting and can translate itself to other languages such as perl, lua, dart and rust. Recently I have been working on a higher level parsing language which I call "syntagma" and which is much more similar to EBNF syntax. Some syntagma scripts can be seen at http://nomlang.org/syntagma/eg/

5.

Show HN: Pep/nom, a sed-inspired language for parsing(nomlang.org ↗)

2 points · by mjbq · 3w ago · 3 comments

comment 4w ago · link · parent

Could I suggest also looking at a sed-inspired parsing language (a DSL) which is called nom and is documented at http://www.nomlang.org An example script for parsing symbolic expressions is at http://www.nomlang.org/eg/maths.parse.pss and another which turns the expressions into LaTeX is /eg/maths.tolatex.pss

Nom may seem quite verbose. I have written another language (which compiles to nom) which I call Syntagma. The syntax of syntagma is much closer to EBNF but also has powerful additions, such as a "lookahead" syntax, a negated lookahead syntax (eg: "parse this as an expression if it is not followed by a multiply operator"). Also, Syntagma has a "condition" syntax, meaning that a parse rule will only reduce if the attributes of the parse tokens match certain conditions.

An example of an expression parser written in Syntagma is at http://www.nomlang.org/syntagma/eg/expr.sta This is much more succinct than the equivalent nom script. The script /syntagma/eg/expr.toforth.sta converts symbolic expressions (and assignments) into Forth.

Parsing is an interesting topic, but I feel that it is quite difficult or non-intuitive with some of the traditional tools and methods (at least for me).

comment 4w ago · link · parent

Nom is a sed-inspired language for parsing text patterns, formats, and context-free and context-sensitive languages. Nom is a simple language for parsing simple languages, and for that reason it gives rise to all sorts of self translation possibilities, not just the standard "self-hosting" compiler.

In fact Nom gives rise to some interesting identies: if T is a function or relation (in this case a nom translation script) then T(X) = x where X is a nom script and x is an equivalent script or source code in some other language (eg Perl, Lua, Rust). Logically, the following holds T(T) = t So the translation script can be run on itself. Also t(T) = t So when the translated translator is run on the original script it produces itself. Writing all this in Unix-speak as regards pep/nom, we have, in the case of Lua pep -f nom.tolua.pss nom.tolua.pss > nom.tolua.lua cat nom.tolua.pss | lua nom.tolua.lua > nom.tolua.again.lua diff nom.tolua.lua nom.tolua.again.lua The last diff produces no output because the files are the same.

  - www.nomlang.org/doc/  documentation

  - www.nomlang.org/tr/  translation scripts

  - www.nomlang.org/object/  c implementation of pep interpreter

8.

Translating the Translator with the Translated Translator(nomlang.org ↗)

1 points · by mjbq · 4w ago · 2 comments

comment 2mo ago · link · parent

This post is the result of several years of thinking about compilers, computer languages and FORTH. I have been through many phases in my appraisal of FORTH, from dismissal, to curiosity, as well as implementation. But recently I have become convinced that FORTH has a main-stream importance that is not widely recognised.

10.

Why Forth Matters(nomlang.org ↗)

3 points · by mjbq · 2mo ago · 1 comment

comment 6mo ago · link · parent

Hi, this is a little article I wrote about the connection between art, aesthetics, computers and stack-machines. It represents ideas that I have been thinking about and playing with for a long time. I hope it is thought-provoking.

12.

The artful way of the stack-machine(pepnom.org ↗)

3 points · by mjbq · 6mo ago · 1 comment