https://futureofcoding.org/ logo
#linking-together
Title
# linking-together
e

Eli Mellen

11/14/2023, 7:47 PM
and while not the point of the article, Noulith, the language in question, sort of reminds me of John Ernest’s lil, which may be one of the most lovely little languages without heaps of parenthesis that I’ve ever used.
s

smt

11/14/2023, 8:31 PM
i LOVE noulith hahahaha. i’ve programmed in it a lot and really love the expressivity of this language. the kitchen sink of ways to call functions
m

Mike Austin

11/14/2023, 10:19 PM
Nice. I like the topics, the in depth reasoning and choices, and the "fun facts". I also had the idea to write a "implementing a language" article, but am trying to be very "incremental" and target a not-so-developer audience. It's tough not being able to just say random techie stuff when writing about techie stuff 🙂
a

alltom

11/14/2023, 10:46 PM
@Mike Austin That’s why I’m here. When I posted programming stuff on Facebook, I’d just get family members saying, “I don’t know what you’re talking about, but you seem to be having fun!”
s

smt

11/15/2023, 5:37 AM
@Eli Mellen do you know if it’s possible to use the lil language? i’m interested in playing around with it
e

Eli Mellen

11/15/2023, 12:38 PM
It is! I use it all the time. It’s embedded into decker where you can use it as a scripting language, and you can grab a standalone interpreter to run locally from GitHub. It is in the repo as a cosmopolitan libc, I find that works well. Hit me up with any questions @smt
This is one of my favorite programs I’ve written with lil. It isn’t useful, but I think it shows off the language features really well.
Copy code
sys.seed:<http://sys.ms|sys.ms>
cons: "|" split "b|c|d|f|g|h|j|k|l|m|n|p|r|s|t|v|w|z|ch|sh|zh|th"
 vow: "|" split "a|e|i|o|u|y|ee|ai|ae|au"

on syl do random[vow],random[cons] end
on word do syl @ range random[1,2,3,4] end
on words x do " " fuse word @ range x end
speak:words[7]
show[speak]
That generates mostly pronounceable gibberish, like
ushapaiw aih eez enasil auk aeshowychees ehilehuk
and
ainaec eeneewaig ainimimum auvaichaef ojushychaen upenizash ac
Same program in JavaScript,
Copy code
const cons = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "z", "ch", "sh", "zh", "th"];
const vow = ["a", "e", "i", "o", "u", "y", "ee", "ai", "ae", "au"];

const rpick = t => t[Math.floor(Math.random() * t.length)];

const syl = () => rpick(cons) + rpick(vow);

const word = () => {
  const syllables = Array(Math.floor(Math.random() * 3) + 1).fill(null).map(() => syl()).join('');
  return Math.random() > 0.2 ? syllables + rpick(cons) : syllables;
};

const speak = numberOfWords => Array(numberOfWords).fill(null).map(() => word()).join(' ');

console.log(speak(7));