Discuss Scratch

technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

joefarebrother and I invented an esoteric programming language! You can find more about it here: http://esolangs.org/wiki/No_Comment
firedrake969_test
Scratcher
500+ posts

~-~! (No Comment) [Esoteric Programming Language]

Is there a way to program in it?
technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

firedrake969_test wrote:

Is there a way to program in it?
Not yet. It was invented on Saturday. We are planning on making an interpreter for it sometime soon though.

Last edited by technoboy10 (Jan. 20, 2014 02:22:32)

firedrake969_test
Scratcher
500+ posts

~-~! (No Comment) [Esoteric Programming Language]

technoboy10 wrote:

firedrake969_test wrote:

Is there a way to program in it?
Not yet. It was invented on Saturday. We are planning on making an interpreter for it sometime soon though.
Still, pretty cool. How do you plan on making the interpreter? (C++?)
technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

firedrake969_test wrote:

technoboy10 wrote:

firedrake969_test wrote:

Is there a way to program in it?
Not yet. It was invented on Saturday. We are planning on making an interpreter for it sometime soon though.
Still, pretty cool. How do you plan on making the interpreter? (C++?)
I assume some version of C (for speed, at least), but I really don't know. jfb and I will discuss it.
firedrake969_test
Scratcher
500+ posts

~-~! (No Comment) [Esoteric Programming Language]

Ok, thanks (I really don't know that much about language compilers and interpreters right now)
technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

firedrake969_test wrote:

Ok, thanks (I really don't know that much about language compilers and interpreters right now)
Nor do I, TBH. :p
poopo
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

You said

tb10 wrote:

Almost ANYTHING can be assigned - even ~ = ~~ is legal - from that point on, all tildes will have the effect that two tildes would have had before. Unless some variable had an odd value, you have no way to get back odd numbers.
What about ~~ = ~?

Last edited by poopo (Jan. 20, 2014 03:32:02)

nathanprocks
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

Challenge: Write a self-interpreter.
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

And how would one add 2 variables together?

EDIT: ‘+’'. I'm so stupid xD

EDIT AGAIN: I used this in a golf for Hello World obfuscation, you were only allowed to break one of these rules:

  • Does not contain the characters: “h”, “l”, “w” and “d” in any case
  • Does not contain the characters: “e”, “o”, “r”, “0”, and “1” in any case
  • Does not contain the characters: “2” or “7”

The code I entered:

'=~~~:''=~~~~:'''=~~~~~:@~~,'',',':@''',''',''+~:@'',',',':@'',',',':@''',''',''+<''',~~+~>:@'','',~~:@'',~~,<''',~~>+'+'':@''',''',''+<''',~~+~>:@''',''',''+<<'+''>,~~>:@'',',',':@''',''',''

I should have written a recursive function, but I was lazy. xD

The winning code is in GolfScript:

'·š““ß¨“›'{~}%

written by Chris Jester-Young. But, ~-~! is pretty good for character constraint challenges.

Last edited by Gravitation (Jan. 20, 2014 12:59:32)

technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

@Gravitation that's awesome!
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

technoboy10 wrote:

@Gravitation that's awesome!
By the way, just because I'm bored, I'm writing an interpreter for this in Python (as stupid as it is). I'm calling it 0# (zerohash/zeroHash alphanumerically) (the equivalent of `~-~!` in Python).
technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

Gravitation wrote:

technoboy10 wrote:

@Gravitation that's awesome!
By the way, just because I'm bored, I'm writing an interpreter for this in Python (as stupid as it is). I'm calling it 0# (zerohash/zeroHash alphanumerically) (the equivalent of `~-~!` in Python).
Cool, please post a link to it here (or on Esolang) when you're done.
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

technoboy10 wrote:

Gravitation wrote:

technoboy10 wrote:

@Gravitation that's awesome!
By the way, just because I'm bored, I'm writing an interpreter for this in Python (as stupid as it is). I'm calling it 0# (zerohash/zeroHash alphanumerically) (the equivalent of `~-~!` in Python).
Cool, please post a link to it here (or on Esolang) when you're done.
No problem. I'm up to 100 lines and it's only been 4 hours! xD
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

Sorry for double post, but could you elaborate more on exporting symbols in libraries, and can I get a list of operators sorted by precedence?

EDIT: Um, your Esolang page says that the pipes ( | | ) return the unicode byte string of a string as an integer. But, Unicode uses 4 bytes to represent 1 character: for instance, “h” is 00000000000000000000000001101000 and “i” is 00000000000000000000000001101001, so wouldn't “hi” be 0000000000000000000000000110100000000000000000000000000001101001, which is 446676598889, not 26729…?

EDIT: 26729 is 0110100001101001, which is 01101000 (ascii h) and 01101001 (ascii i). So, you might want to swap out “unicode” for “ascii” or change the 26729 to 446676598889.

EDIT: So far tokenization works quite well. All I have to do now is write a function to create an expression's hierarchy according to the order of operations. Then, I just have to evaluate it (easy). Right now I'm working on representing an operator in a variable with a specific class instance but I'm a bit stuck on backtrace (e.g., the evaluator looking at the code and knowing which variables are operators and which ones aren't), but I can figure something out.

Tokenizer in action:

>>> '=|*==%[%]~~+'&*-~|
["'", '=', "|*==%[%]~~+'&*-~|"]
>>> *==%[%]~~+'&*-~
['*', '==', '%', '[', '%', ']', '~~', '+', "'", '&', '*', '-', '~']
>>> '=~~~:''=~~~~:'''=~~~~~:@~~,'',',':@''',''',''+~:@'',',',':@'',',',':@''',''',''+<''',~~+~>:@'','',~~:@'',~~,<''',~~>+'+'':@''',''',''+<''',~~+~>:@''',''',''+<<'+''>,~~>:@'',',',':@''',''',''
["'", '=', '~~~', ':', "''", '=', '~~~~', ':', "'''", '=', '~~~~~', ':', '@', '~~', ',', "''", ',', "'", ',', "'", ':', '@', "'''", ',', "'''", ',', "''", '+','~', ':', '@', "''", ',', "'", ',', "'", ',', "'", ':', '@', "''", ',', "'", ',', "'", ',', "'", ':', '@', "'''", ',', "'''", ',', "''", '+', '<', "'''", ',', '~~', '+', '~', '>', ':', '@', "''", ',', "''", ',', '~~', ':', '@', "''", ',', '~~', ',', '<', "'''", ',', '~~', '>', '+', "'", '+', "''", ':', '@', "'''", ',', "'''", ',', "''", '+', '<', "'''", ',', '~~', '+', '~', '>', ':', '@', "'''", ',', "'''", ',', "''", '+', '<', '<', "'", '+', "''", '>', ',', '~~', '>', ':', '@', "''", ',', "'", ',', "'", ',', "'", ':', '@', "'''", ',', "'''", ',', "''"]
>>>

Last edited by Gravitation (Jan. 21, 2014 15:07:29)

joefarebrother
Scratcher
500+ posts

~-~! (No Comment) [Esoteric Programming Language]

It should be UTF-8 is what I meant. It's variable-width so the bottom 128 ASCII values can be represented in 1 byte yet if the high-bit of this byte is 1 then you can have more bytes.
Awesome tokeniser BTW!
Also, be warned that I plan on adding a special form involving the # character so the tokeniser should signal an error

Last edited by joefarebrother (Jan. 21, 2014 17:11:15)

mythbusteranimator
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

joefarebrother wrote:

It should be UTF-8 is what I meant. It's variable-width so the bottom 128 ASCII values can be represented in 1 byte yet if the high-bit of this byte is 1 then you can have more bytes.
Awesome tokeniser BTW!
*insert something programmy here so i can feel smart please*
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

joefarebrother wrote:

It should be UTF-8 is what I meant. It's variable-width so the bottom 128 ASCII values can be represented in 1 byte yet if the high-bit of this byte is 1 then you can have more bytes.
Awesome tokeniser BTW!
Also, be warned that I plan on adding a special form involving the # character so the tokeniser should signal an error
I'm a bit scared of utf-8. xD How do you decode the bitstring, if it's variable length?
technoboy10
Scratcher
1000+ posts

~-~! (No Comment) [Esoteric Programming Language]

mythbusteranimator wrote:

joefarebrother wrote:

It should be UTF-8 is what I meant. It's variable-width so the bottom 128 ASCII values can be represented in 1 byte yet if the high-bit of this byte is 1 then you can have more bytes.
Awesome tokeniser BTW!
*insert something programmy here so i can feel smart please*
*nods head knowingly to make it look like you said something programmy*
Gravitation
Scratcher
100+ posts

~-~! (No Comment) [Esoteric Programming Language]

Gravitation wrote:

joefarebrother wrote:

It should be UTF-8 is what I meant. It's variable-width so the bottom 128 ASCII values can be represented in 1 byte yet if the high-bit of this byte is 1 then you can have more bytes.
Awesome tokeniser BTW!
Also, be warned that I plan on adding a special form involving the # character so the tokeniser should signal an error
I'm a bit scared of utf-8. xD How do you decode the bitstring, if it's variable length?
print ('%x' % int(binarydata, 2)).decode('hex').decode('utf-8')
Thank you, Igonato from StackOverflow. xD

Powered by DjangoBB