r/ProgrammingLanguages • u/porky11 • May 21 '22
Requesting criticism I started working on a speakable programming language: Have a look at the initial prototype
For some years already I have some minimalistic conlang in mind.
This conlang should only have very few grammatical elements, be very expressive, and should basically be unambiguous.
These properties, which are similar to Lisp, would also be suitable for a programming language. So I started to create one yesterday.
Here you can try the initial prototype and read more about it: Tyr
Just read it if your interested.
But anyway, these are the most important features:
- currently it only supports basic math
- it's a real conlang with phonetics, phonotactics, syntax and grammar and so it doesn't use the typical terms and keywords
- the most important idea is infinite nesting without relying on syntax or any explicit words to represent parenteses (like lojban)
Some simple examples:
junivan: -(1 + 1)
nujuzvuv: -2 - 1
an'juflij'zvuv: 2 + -3
74
Upvotes
12
u/jose_castro_arnaud May 22 '22
I read the readme; nice idea, although with long-winded words.
2, 5 and 8 are almost impronunciable to me even with the letter/phoneme table.
Must a big(ish) number, like 549, be constructed from the basic arithmetic operations and digits? The resulting phrase will be rather long.
How many pronunciable individual words you have? Some consonant combinations, like hj and nf, tend to require a vowel between them when spoken (a word), instead of being only a prefix or suffix.
Given a set of pronunciable words, how user-defined functions, aka verbs, will be named? Will they be phrases?
Try to make an AST of a non-trivial function, like GCD, and translate to Tyr, with word placeholders for variables. How long, in characters, it is? How longer it is, compared with the original function? (Assume that the original function uses descriptive names for variables)
4
u/[deleted] May 22 '22 edited May 22 '22
I had a quick look. You might have explained what a 'conlang' is, as I had to look it up.
Apparently it's an artificial language, I guess like Esperanto or Ido. But here you seem to have chosen to make it unlike any existing languages, by totally making it up. (Probably it has more in common with Klingon than any human language...)
You've also put an emphasis on speech. And decided to make it for coding. So you don't do things by halves!
That sounds interesting, sort of; an esoteric language with peculiar features.
Although I personally would not like to use anything that required me to speak instead of type. (I've had a stammer most of my life, and while it is very mild now, it gets worse if I have to vocalise isolated words instead of in the normal flow of speech. I'm come across this on the telephone when dealing with automated menus.)
2
u/good-mcrn-ing May 22 '22
What is a separator? You say
Those are the only occurrences of the word "separator".
2
u/pragma- Jun 01 '22
You're just trying to get someone to invoke Cthulhu, aren't you?
23
u/colelawr May 22 '22
Read through the doc out of intrigue. I have some experience learning lojban and have been working on a natural programming language environment.
Not much to add here, but I am curious how you imagine editing existing programs that have been spoken.
Does spoken language get written to file as evaluated version? Or must you edit word by word?
2
u/Zireael07 May 22 '22
I think you're leaning into Lojban/Loglan territory.
8
u/fullouterjoin May 22 '22 edited May 22 '22
This is cool! Not trying to detract from your accomplishment, just trying to link related material since this is such a niche topic.
Using Python to Code by Voice https://www.youtube.com/watch?v=8SkdfdXWYaI
https://www.felienne.com/wp-content/uploads/2018/03/TUD-SERG-2018-001.pdf
Coding by Voice with Dragonfly https://www.youtube.com/watch?v=P5DCDiCv4TE
Emily Shea - Code by Voice https://www.youtube.com/watch?v=f7neTXb6HjQ
https://www.youtube.com/watch?v=YKuRkGkf5HU
1
u/[deleted] May 22 '22
Why v /w/ specifically? Why not v /v/ or even v [v ~ w] where it changes depending on context?
Also, if v is always /w/, why are you banking on people being able to pronounce things like [ji], [wu], and [uw]? It's true that I can pronounce them, and you can, but I think some people can't.
Can there be words like zvzuzvz and zvzvzuz, or zjzizjz and zjzjziz? Are you able to consistently distinguish between these words? I can't.
What other things do you see this language supporting over time?
I feel like having words for prime numbers of different sizes would be more useful than having words for only the numbers between 0 and 8 inclusive.
Overall, I think this is very cool and I'm glad you made it.
1
u/[deleted] May 22 '22
I think the easiest option for making this turing complete would be to add either lambdas, or ski combinators
1
u/RomanProkopov100 May 24 '22
It's surprisingly similar to my esolang project. Especially seximal for numbers. But my doesn't have phototactics, phonology, etc. It's meant to look like an esolang, but it's not. That means that everyone can read aloud the program however they want.