Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Hey, y'all. I just got this idea for what might prove to be an interesting esolang:

Technologic

Technologic is (or, I should say "will be") a language in which all keywords are words in the Daft Punk song of the same name.

https://www.youtube.com/watch?v=D8K90hX4PrE

I tried to allocate all of the words in the song to their best possible function. However, I am very open to suggestions on changing them (especially with how numbers are represented; I don't particularly enjoy how I ended up deciding that format).

Without further ado, here are the (possible) specs.

Design Philosophy

The main goal of Technologic is to make programs that look like the lyrics to the titular song. Thus, each line in the "lyrics" must also be in the same rhythm: DAH dih DAH dih DAH dih DAH dih. For example, here is a theoretical cat program in Technologic:


Code:
name it, code, rename it, buy it
click, format it, start it, press it
name it, code, rename it, name it
code, rename it, quick - format it
print it, mail it, break it, mail it

technologic


If you read this out loud (why would you want to, though?), you can hear the "rhythm" to the words. I'll probably make this rhythm required if I ever make an interpreter/compiler for this.

"Useless" commands

quick - (X)
NOP. Place this before any two-syllable word (X) to make it fit the rhythm, and a theoretical interpreter/compiler would act as if this word isn't there.

mail it
Ignored wherever you place it, even within variable names. Another rhythm-fitting word, so a theoretical interpreter/compiler would act as if this word isn't there.

pause it
(X)
play it

Comment (X). pause it must end the line it's on (but it doesn't have to fit the rhythm), and play it must start the line it's on

One more thing: the word it must be omitted if it is just before a two-syllable word, and it is optional after the word pause.

Variables

Variables in Technologic are defined when first stored to. An attempt to reference a variable before it is defined is illegal.

name it, (X), rename it
Refer to variable (X). Legal variable names are any combination of valid keywords other than name, rename, use, code, call, bring, and any one of the "useless" commands. Only the actual words are considered when parsing the variable names, not the its. Some examples of valid variable names:

upgrade it, cut it
break it
touch it, erase it, scan it, trash it

(X), write/rewrite it, (Y)
Store expression (X) into variable (Y). (Note: write and rewrite are synonyms here.) Defines variable (Y) if not previously defined.

Numbers

Numbers are represented by simply listing out the commands for the digits in order. If you want to represent a decimal number, use point it for the decimal point.
    0: erase it
    1: click it
    2: watch it
    3: view it
    4: work it
    5: surf it
    6: update it
    7: upgrade it
    8: zoom it
    9: fill it

Expressions

Expressions are mathematical operations done to numbers and/or variables. They can be pretty much as complex as you want them to be, and they are evaluated from left to right. Any command that takes an expression as an argument ACTUALLY takes the last expression evaluated, which doesn't necessarily have to be right before it.
Expressions must end in format it.

(X), touch it, (Y)
(X) + (Y).

(X), trash it, (Y)
(X) - (Y).

(X), cross it, (Y)
(X) * (Y).

(X), cut it, (Y)
(X) / (Y).

(X), crack it, (Y)
(X) / (Y) (integer division).

(X), rip it, (Y)
(X) mod (Y).

zip it, (X), unzip it
Enclose expression (X) in parentheses.

(X), turn it
Negate (X).

Control Flow and Conditional Statements

Conditional operators return 1 for true and 0 for false. Conditional statements consider anything nonzero to be true, and 0 to be false. Everything else should be "familiar".

(X), drag and drop it, (Y)
Conditional operator: (X) == (Y). (The only instance of a multi-word keyword!)

(X), pay/buy it, (Y)
Conditional operator: (X) < (Y).

(X), charge it, (Y)
Conditional operator: (X) > (Y).

(X), switch it
Makes conditional operator (X) act like the opposite of itself (!=, >=, or <=, respectively).

(X), check/rate it
(Y)
break it

If expression (X) is true, execute (Y).

(X), check/rate it
(Y1)
(jam, snap) it
(Y2)
break it

If expression (X) is true, execute (Y1). Otherwise, execute (Y2).

(X1), check/rate it
(Y1)
(fix, tune) it, (X2), check/rate it
(Y2)
break it

If expression (X1) is true, execute (Y1). Otherwise, if expression (X2) is true, execute (Y2). This construction can be repeated as many times as necessary, and it can be combined with a jam or snap statement as a catch-all.

lock it, (X), check/rate it
(Y)
break it

While expression (X) is true, execute (Y). (X) is evaluated before the start of the loop.

start it, (X), check/rate it
(Y)
break it

Until expression (X) is true, execute (Y). (X) is evaluated after the end of the loop.

leave it
Prematurely exit a check/rate it, lock it, or start it construction, equivalent to a "break" statement in most languages.

burn it
Immediately end program execution at this point.

technologic
The equivalent of labels. (This also signifies the end of the program.) This must be separated from any other code by at least two lines, like so:

Code:
(X)

technologic

(Y)


(X), find it
Go to the expression (X)th technologic in the program (1-indexed). 0 indicates the required "technologic" at the end of the program; negative numbers are illegal.

Input/Output

Because I completely forgot to tell you up until now, I present to you: the only way to make your programs actually useful!

scan it, (X)
Read a numeric input, and place it in variable (X). If (X) has not been defined before, this counts as a definition.

press it, (X)
Read a character input, and place its ASCII value in variable (X). If (X) has not been defined before, this counts as a definition.

(X), send it
Print expression (X) as a number (without a newline).

(X), print it
Print expression (X) as a character in ASCII (without a newline).

scroll it
Print a newline, because click, erase it, quick - format it, print it can be cumbersome.

Functions

Functions are pieces of code that can be run (called) at any point during the program, and can optionally take 1 or more numerical arguments.

use it, {(Y1), bring it, (Y2), bring it,...} (X), code it
(Z)
break it

Define a function named (X), optionally with arguments named (Y1), (Y2), etc. The body (Z) is executed whenever the function is called. Legal function and argument names are any combination of valid keywords other than name, rename, use, code, call, bring, and any one of the "useless" commands. Attempting to define a function more than once (even if both definitions take different amounts of arguments) is illegal.
Within the function, you can use name it, (Y1), rename it for each name like normal, but the value of these are not the same as ones with equivalent names in the regular code would be. Or, to put it briefly, scopes.

use it, {(Y1), plug it, (Y2), plug it,...} (X), call it
Call a function named (X), optionally with arguments as the expressions (Y1), (Y2), etc. This can be used within expressions if need be. Attempting to call a function before it is defined is illegal.

(X), unlock it
Within a function, return expression (X).

Oh yeah there's a stack

Oh, I forgot to tell you, there's a stack, too. Why? Because there were 4 commands left that had no definition.

(X), save it
Push expression (X) onto the top of the stack.

load it
Pop the top stack item (destructively). Popping from an empty stack is illegal.

fax it
Pop the top stack item, except the value can be used inside an expression. If this is used multiple times in an expression, the stack keeps getting popped. Popping from an empty stack, once again, is illegal.

(X), paste it
Get the value of the expression (X)th stack item from the top (0-indexed). This can be used in expressions if need be. Attempting to get a non-existent stack item is illegal.

(X), change it, (Y)
Store expression (X) to the expression (Y)th stack item from the top (0-indexed). Attempting to store to a non-existent stack item is illegal.




So, until I decide to change it, those are my specifications for my esolang idea. If anyone has any suggestions on improving them, or if anyone wants to have a go at interpreting/coding in this language, let me know!

Example programs in Technologic

Hello World:

Code:
quick - upgrade it, watch it, mail it
mail, format it, print it, mail it
click, erase it, click, format it
print it, click, erase it, zoom it
quick - format it, print it, print it
click it, click it, click, format it
print it, work it, work, format it
print it, view it, watch, format it
print it, zoom it, quick - upgrade it
quick - format it, print it, click it
click it, click, format it, print it
click it, click it, work, format it
print it, click, erase it, zoom it
mail, format it, print it, click it
quick - erase it, quick - erase it
mail, format it, print it, view it
view it, quick - format it, print it

technologic


Hello World indented in a way that should make it make more sense:

Code:
upgrade it, watch it, format it, print it
click it, erase it, click it, format it, print it
click it, erase it, zoom it, format it, print it, print it
click it, click it, click it, format it, print it
work it, work it, format it, print it
view it, watch it, format it, print it
zoom it, upgrade it, format it, print it
click it, click it, click it, format it, print it
click it, click it, work it, format it, print it
click it, erase it, zoom it, format it, print it
click it, erase it, erase it, format it, print it
view it, view it, format it, print it

technologic


Truth machine:

Code:
send it, name it, fax, rename it
start it, name it, fax, rename it
drag and drop it, quick - erase it
quick - format it, rate it, name it
fax, rename it, quick - format it,
send it, mail it, break it, mail it

technologic


Truth machine indented in a way that should make more sense:

Code:
send it, name it, fax it, rename it
start it, name it, fax it, rename it, drag and drop it, erase it, format it, rate it
   name it, fax it, rename it, format it, send it
break it

technologic


Fibonacci:

Code:
use it, buy it, bring it, fax it
touch it, code it, name it, buy it
quick - rename it, pay it, watch it
quick - format it, check it, name it
buy, rename it, mail, unlock it
break it, use it, name it, buy it
mail, rename it, trash it, click it
quick - format it, bring it, fax it
touch it, call it, touch it, use it
name it, buy, rename it, trash it
watch it, mail, format it, bring it
fax it, touch it, call, unlock it
break it, scan it, name it, buy it
quick - rename it, use it, name it
buy, rename it, quick - format it
fax it, touch it, call it, send it

technologic


Fibonacci indented in a way that should make more sense:

Code:
use it, buy it, bring it, fax it, touch it, code it
pause it
   Equivalent to something like def fax_it_touch_it(buy_it):
play it
   name it, buy it, rename it, pay it, watch it, format it, check it
      name it, buy it, rename it, unlock it
   break it
   pause it
      This is equivalent to:
      if buy_it < 2:
         return buy_it
      endif
   play it
   use it, name it, buy it, rename it, trash it, click it, format it, bring it, fax it, touch it, call it, touch it, use it, name it, buy it, rename it, trash it, watch it, format it, bring it, fax it, touch it, call it, unlock it
   pause it
      Wow, this is complicated...
      ...but basically, this translates to:
      return fax_it_touch_it(buy_it - 1) + fax_it_touch_it(buy_it - 2)
      You'll be able to see it here if you look REALLY hard at it
   play it
break it

scan it, name it, buy it, rename it
use it, name it, buy it, rename it, format it, bring it, fax it, touch it, call it, send it
pause it
   These two lines are equivalent to:
   buy_it = inputnum()
   print fax_it_touch_it(buy_it)
   NOTE: This buy_it is not the same as the buy_it in the function itself!
play it

technologic
This sounds verys neat!
I cannot wait to see where this takes you!
This begs the question of what would the actual song do as a program in this language? Razz
Botboy3000 wrote:
This begs the question of what would the actual song do as a program in this language? Razz

The very first word is "buy it", or the less-than operator, which would error because there is no part of an expression to the left.
The Knight Club remix is, of course, the far superior version:

https://www.youtube.com/watch?v=wD2o4L9oE_w
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement