ℙ𝕖𝕡 🙴 ℕ𝕠𝕞

home | documentation | examples | translators | download | blog | all blog posts

You can't wake up someone who is pretending to be asleep. African saying

the translation folder for the ℙ𝕖𝕡/ℕ𝕠𝕞 system

This folder contains a number of nom translation scripts which are also capable of translating themselves and other translation scripts as well.

The scripts which are currently working and reasonably debugged are rust | dart | perl | lua | go | java | javascript | ruby | python | tcl | c

There is also a helper nom script called /eg/nom.to.pss which can translate any script to any other available language. This script accepts the command in 'english' such as 'translate <file> to ruby'

translate the palindrome script to rust
 pep -f script.translate.pss -i 'palindrome.pss to rust' | bash

translate the translator to perl
 pep -f nom.to.pss -i 'nom.to.pss to perl' | bash

use the translated translator to translate a script to lua
 echo "palindrome.pss to lua" | ./nomto.pl 

The nom scripts which I am currently writing (aug 2025) all include their own help system (usually triggered by the '/help' keyword or some other help-word) and they will also include self-translation which is provided by script.translate.pss

translation examples

Here are some examples of how to translate a script into a target language listed above.

translate an inline script to lua and print to stdout
 pep -f nom.tolua.pss -i "r;[\n]{lines;add ' ';}print;d;"

translate an inline script to lua and run with input

    pep -f nom.tolua.pss -i "r;[\n]{lines;add ' ';}print;d;" > test.lua
    echo -e "leaf \nbranch\n twig" | lua test.lua
    # This will print each line numbered, or run with a file at input
    # (but won't number the first line!)
    cat /usr/share/dict/words | lua test.lua
  

translate a ℕ𝕠𝕞 script file to lua and run with input

    pep -f tr/nom.tolua.pss eg/nom.syntax.reference.pss > syntax.lua
    echo  "read;add '/';print;clear;" | lua syntax.lua
    # or run with a file at input
    cat eg/palindrome.pss | lua syntax.lua
    # or use the command line switches for input
    # (but this is more for testing purposes)
    lua syntax.lua --file eg/palindrome.pss 
    # or 
    lua syntax.lua --input "read;add '/';print;clear;" 
  

You can also use the bash functions in bumble.sf.net/books/pars/helpers.pars.sh to translate into a particular language.

translate inline script into ruby and run with input
 pep.rbs 'read;add".";print;clear;' 'abcd'