Author Topic: Language Construction!  (Read 6151 times)

0 Members and 2 Guests are viewing this topic.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Language Construction!
« on: May 15, 2013, 05:01:37 pm »
Recently, I've been having an upsurge in conlanging, so I'd like to share my constructed language with you:
VE3ENCS:
pdf

I'd also like to see your interests in constructing languages, if any.
« Last Edit: July 07, 2013, 03:23:03 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline TheBassetHound

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +7/-3
  • GLaDOS is a potato
    • View Profile
Re: Language Construction!
« Reply #1 on: May 15, 2013, 09:45:42 pm »
So you made a programming language... With what? Java? TELL ME HOW THIS SOUNDS LIKE FUN!!! :-D I've seen a tutorial on how to create a programming language in Java... Is this different?
TheBassetHound


Aperture Science Handheld Portal Device
 /––––\    (¯\       /¯—/¯¯–______––
/   /\/˜¯¯¯\  \____/     \
   /          \___________\
 –(           |____________\
   \   /¯¯--•¦=––––––––––––\
    \/           ¯\==========\
\     ¯¯——__–¯\—————––\
 \––––___–¯–¦__                   \ √=_
                   \____——¯¯¯¯¯¯¯¯

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Language Construction!
« Reply #2 on: May 15, 2013, 10:10:14 pm »
Not a programming language, but rather one that you'd actually speak. (VE1ENCS is short for Vletmata erse Myn eas Necarasso Cryssesa, which translates to The First Revision of the Cressia Language.)
« Last Edit: May 15, 2013, 10:11:31 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Language Construction!
« Reply #3 on: May 16, 2013, 12:02:44 pm »
for programming languages, if you want to learn how to make your own you're going to have to learn how to write a compiler. all languages other than machine code running on bare metal are compiled. the three options for this are to write a compiler which converts your code directly into machine code (which is very difficult, and becomes exponentially more so if you want it to work on multiple architectures), a compiler which converts your code into some other language, which is then compiled (which is a bit roundabout and messy, so it isn't very popular), or a compiler which converts your code into bytecode that is executed by a virtual machine written in some other language (which is the most widespread method today).

every good compiler needs to have a few basic parts:

-a lexer this converts plain text files into strings of tokens, with associated types (string literal, type identifier, list, etc) which the language uses. there are plenty of dedicated lexers out there that you can easily include directly in a new language. flex is a particularly popular one.

-a parser this takes your now-tokenised source and searches for illegal statements (something like: int "tasty";, for example, if you're writing C). there is a lot of interesting theory behind the best methods of doing this, but again, you'd be best off just using one of the many pre-made parsers out there. bison is a popular one

-a method for organising data elements (symbol table) and recursive statements (syntax tree). this step will be as easy or as difficult as the complexity level of the program you're writing. if you're making a simple, purely functional language you can use whatever structure you want to store your symbol table. even a giant list would do, though you'd probably want to use something like a heap in order to reduce lookup times. the syntax tree does pretty much have to be a tree structure. this is because it breaks code up into a hierarchical structure so that everything afterwards knows the correct order in which to read your source code. if you had the following code, for example:
Code: [Select]
For(A,0,2)
   A→C
   If A=B
      <do foo>
   Else
      <do bar>
   End
End
it might be translated into a pre-order syntax tree like this:
Code: [Select]
          [<rest of program above>]
                      |
                [For loop]
               /     |    \
  [initialiser]   [body]  [increment]
    /                |               \
[0→A]        [If statement]          [A++]
             /            \
    [condition]          [body]
         |              /      \
       [A≤2]       [A→C]         \
                         [two part If statement]
                         /          |          \
                 [condition]   [then part]   [else part]
                      |             |             |
                    [A=B]       [<do foo>]    [<do bar>]
obviously, if you want to work with objects, variable scope, etcetera, this all gets more complicated.

-semantic checking. traverse your tree and find any inconsistencies (like a function that expects two parameters being passed three instead or a statement like "string literal" == integer, where integer is of type int).

-code generation part. if you're writing a simple, functional language, this part is really easy. just directly translate your now, organised program into its counterpart in whatever other language you're using (converting to machine code, some other language, or bytecode for a virtual machine), looking up variables in your symbol table as you encounter them while traversing the syntax tree and inserting references to them in your generated code (direct addresses for machine code or a virtual machine or names if you're translating to some other language).

-code optimisation part. scan over your generated code and apply any optimisations you can find. obviously, this part isn't necessary, but you will get slow results without it.

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Language Construction!
« Reply #4 on: May 16, 2013, 12:25:40 pm »
I've never constructed a language that wasn't a programming language. (as for programming languages, I did a small tutorial on compiler construction here)

Maybe I'll make a spoken language someday, because I'm annoyed at the limited expressiveness of existing ones. Everyone seems to agree that language should be a one-dimensional string of either sound of text with perhaps the occasional back-reference, but I don't particularly agree with that - I certainly don't think that way. Of course sound that has more than one dimension is sort of tricky ;)
But I'll work around that somehow.
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Language Construction!
« Reply #5 on: May 16, 2013, 12:26:38 pm »
As BB94 said, it's not about programming languages, but actually an actual communication language (like English). I've began skimming through the document in the OP, it looks very interesting.

EDIT: Correct me if I'm wrong, but E enara alyrynssyd issos sylorssa. Damn. I really like how it sounds.
« Last Edit: May 16, 2013, 12:34:55 pm by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Language Construction!
« Reply #6 on: May 16, 2013, 01:08:15 pm »
Well damn, that's very impressive O_o

You can see my own Kakrii language here: http://ourl.ca/18644

Mine is not as far along as your is, but it's got the basics nailed down. Also, "atoro menehess cypra" yeah, I really like how this language sounds as well :P

Edit:

Quote
E enara alyrynssyd issos sylorssa

Damn it, e enara alyrynssyd. <_<
« Last Edit: May 16, 2013, 01:14:28 pm by Scipi »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Language Construction!
« Reply #7 on: May 16, 2013, 01:20:14 pm »
This looks really impressive. I've always liked the idea of creating a new language (in fact I still need to :P) but I never get around it how to do it. Skimming the document now, it looks great.

Some people need a high five in the face... with a chair.
~EC

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Language Construction!
« Reply #8 on: May 16, 2013, 04:00:17 pm »
As BB94 said, it's not about programming languages, but actually an actual communication language (like English). I've began skimming through the document in the OP, it looks very interesting.

EDIT: Correct me if I'm wrong, but E enare alyrynssyd issos sylorssa. Damn. I really like how it sounds.
Here's another example:
Spoiler For Spoiler:
Yr iss enva acrynala, iss enva erse ermessacveryssan, eas merseda erse enefa, eas elsse erse aplamysenrotacveryssanallasmafssalia, enarass ylmayd. Myron enva emte, enarass re nass tecto enva emte.
On the dark day of February 22, 2013, we panicked. After that day, we did what we did before.
Note: this phrase includes terms not found in the VE1ENCS. They will be included in the VE2ENCS.
« Last Edit: May 16, 2013, 04:01:11 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Language Construction!
« Reply #9 on: May 17, 2013, 04:06:48 am »
Hey BB84, could you make a pdf version of that document?
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Language Construction!
« Reply #10 on: May 17, 2013, 03:59:19 pm »
I will for VE2ENCS.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline TheBassetHound

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +7/-3
  • GLaDOS is a potato
    • View Profile
Re: Language Construction!
« Reply #11 on: May 25, 2013, 10:15:20 pm »
Oops... It was all caps so I thought it was a programming language. Plus I didn't read the article (That tells a lot about me) :P. I thought about doing so in, like, 3rd grade, but I never actually started it just because it was such a huge project. But thanks shmibs for the tutorial!
TheBassetHound


Aperture Science Handheld Portal Device
 /––––\    (¯\       /¯—/¯¯–______––
/   /\/˜¯¯¯\  \____/     \
   /          \___________\
 –(           |____________\
   \   /¯¯--•¦=––––––––––––\
    \/           ¯\==========\
\     ¯¯——__–¯\—————––\
 \––––___–¯–¦__                   \ √=_
                   \____——¯¯¯¯¯¯¯¯

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Language Construction!
« Reply #12 on: May 29, 2013, 06:13:58 pm »
Surprise! Look at the OP for some insight.
P. S. VE2ENCS is the name of the document teaching you how to speak the language.
« Last Edit: May 29, 2013, 06:26:12 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの