Reading Binary Numbers From The User, Continued.

reading binary numbers from the user, continued.

when we left off, we had code to interpret one binary number from user input, and output it as a unary number. In this post we will add the second user input, and maybe make a thing that converts from unary to binary, and then outputs it.

The code for that was the following:

import blah BLAH; print please enter whatever character you will be using for binary zero.; INPUT ZEROCHAR; BIFURCATE ZEROCHAR[ZEROCHAR,JUNK]; import chrcmp CMP0; BIFURCATE [CMP0,ZEROCHAR]D; D.DIE(); print please enter whatever character you will be using for binary one.; INPUT ONECHAR; BIFURCATE ONECHAR[ONECHAR,JUNK]; import chrcmp CMP1; BIFURCATE [CMP1,ONECHAR]D; D.DIE(); BIFURCATE [NULL,NULL]2NULL; BIFURCATE 2NULL[OUTNUM,JUNK]; print please input the binary number you want.(it will be converted to unary); INPUT BINNUM; ~ATH(BINNUM){ BIFURCATE [OUTNUM,OUTNUM]G; BIFURCATE G[NCOPY,OUTNUM]; ~ATH(NCOPY){ BIFURCATE NCOPY[JUNK,NCOPY]; BIFURCATE [BLAH,OUTNUM]OUTNUM; }  BIFURCATE BINNUM[CHAR,BINNUM]; BIFURCATE [CMP0,CHAR]NEQ0; ~ATH(NEQ0){ BIFURCATE [BLAH,OUTNUM]OUTNUM; BIFURCATE 2NULL[NEQ0,JUNK]; } } print ok, going to print it out in unary, with each digit on one line. If the number you entered was large you might want to close the program instead of hitting enter.; INPUT JUNK; BIFURCATE [OUTNUM,OUTNUM]GOUTNUM; BIFURCATE GOUTNUM[OUTNUMCOPY,JUNK]; ~ATH(OUTNUMCOPY){ BIFURCATE OUTNUMCOPY[JUNK,OUTNUMCOPY]; print 1; }

ok, so what do we need to do after that?

Well we need to make it get two numbers, right?

Yes. Yes we do.

But getting one number was kind of long, wasn't it.

Luckily we don't have to have the entire thing there twice, much of it we can jusst have it in there once.

we COULD define a function, but I haven't added that to the interpreter yet, so yeah...

so a significant portion of that was initialization stuff that doesn't need to be duplicated. the first 14 lines in fact!

so pretty much we just duplicate everything but the first 14 lines.

gee, now I sound lazy for not writing this part earlier.

anyway, here goes:

import blah BLAH;

print please enter whatever character you will be using for binary zero.;

INPUT ZEROCHAR;

BIFURCATE ZEROCHAR[ZEROCHAR,JUNK];

import chrcmp CMP0;

BIFURCATE [CMP0,ZEROCHAR]D;

D.DIE();

print please enter whatever character you will be using for binary one.;

INPUT ONECHAR;

BIFURCATE ONECHAR[ONECHAR,JUNK];

import chrcmp CMP1;

BIFURCATE [CMP1,ONECHAR]D;

D.DIE();

BIFURCATE [NULL,NULL]2NULL;

BIFURCATE 2NULL[OUTNUM,JUNK];

print please input the first binary number you want.(it will be converted to unary);

INPUT BINNUM;

~ATH(BINNUM){

BIFURCATE [OUTNUM,OUTNUM]G;

BIFURCATE G[NCOPY,OUTNUM];

~ATH(NCOPY){

BIFURCATE NCOPY[JUNK,NCOPY];

BIFURCATE [BLAH,OUTNUM]OUTNUM;

BIFURCATE BINNUM[CHAR,BINNUM];

BIFURCATE [CMP0,CHAR]NEQ0;

~ATH(NEQ0){

BIFURCATE [BLAH,OUTNUM]OUTNUM;

BIFURCATE 2NULL[NEQ0,JUNK];

}

}

BIFURCATE [BLAH,OUTNUM]UINNUM1;

BIFURCATE UINNUM1[JUNK,UINNUM1];

BIFURCATE 2NULL[OUTNUM,JUNK];

print input the second binary number:;

INPUT BINNUM;

~ATH(BINNUM){

BIFURCATE [OUTNUM,OUTNUM]G;

BIFURCATE G[NCOPY,OUTNUM];

~ATH(NCOPY){

BIFURCATE NCOPY[JUNK,NCOPY];

BIFURCATE [BLAH,OUTNUM]OUTNUM;

BIFURCATE BINNUM[CHAR,BINNUM];

BIFURCATE [CMP0,CHAR]NEQ0;

~ATH(NEQ0){

BIFURCATE [BLAH,OUTNUM]OUTNUM;

BIFURCATE 2NULL[NEQ0,JUNK];

}

}

BIFURCATE [BLAH,OUTNUM]UINNUM2;

BIFURCATE UINNUM2[JUNK,UINNUM2];

BIFURCATE [UINNUM1,UINNUM1]CUINNUM1;

BIFURCATE CUINNUM1[SUM,JUNK];//haha, some junk

BIFURCATE [UINNUM2,UINNUM2]CUINNUM2;

BIFURCATE CUINNUM2[UINNUM2CPY,JUNK];

~ATH(UINNUM2CPY){

BIFURCATE UINNUM2CPY[JUNK,UINNUM2CPY];

BIFURCATE [BLAH,SUM]SUM;

}

print ok, going to print the sum out in unary, with each digit on one line. If the numbers you entered were large you might want to close the program instead of hitting enter.;

INPUT JUNK;

BIFURCATE [SUM,SUM]GSUM;

BIFURCATE GSUM[SUMCOPY,JUNK];

~ATH(SUMCOPY){

BIFURCATE SUMCOPY[JUNK,SUMCOPY];

print 1;

}

ok. That worked. I haven't made it convert the output to binary yet. I started this the day of the other post, but there was a bug I didnt get around to fixing in it that I didn't find the fix for until today.

that bug was that in the part where it changes the binary number to a unary number, the first time around, the unary number starts at zero and increases to what it should be...

...but I forgot to include the line to reset it back to zero for the second number.

but in works now.

I might make the part where it converts from unary to binary now instead of later, but I have to do stuff.

Sorry for having such a slow post rate, it is partly because I am busy and partly because I am lazy. mostly the [FORMER,LATTER].

hey, it adds the numbers that were entered in binary...

So a future improvement is to make it so it outputs it in binary as well.

Another possible future post is something that shouldn't work but the interpreter has a certain bug that might be amusing, and will not negatively affect many things.

specifically, if you have a "}" inside of a print statement, and you are jumping to the end of a loop, it will jump to the inside of the print statement, and execute the text as code. This is a bug, not a feature, so you should not rely on it when writing stuff. It might be fun to mess with though.

I might add user defined functions to the interpreter soon...

I don't feel that this post really explained much of anything, but I have to do stuff now, so I am going to post this, and possibly modify it later with clarifications.

Feel free to send me messages asking about how some part works.

More Posts from Learn-tilde-ath and Others

12 years ago

I am so bad at updating. (and a side note)

I am still intending to update this.

but I am not good at time management.

I have like 2 hours of free time after school, (because of certain inefficiencies on my part) so that's my stupid excuse.

I am working on writing some responses to some requests for clarification, and then I will do the second part of the converter TO binary.

the print command can have the end of a loop in.

The contents of the print command can be executed.

so if you say:

import blah A; import bleh B; ~ATH(A){ ~ATH(B){ print heh } ~ATH(NULL){ print giant frogs alert; B.DIE(); } }  

it should print

"heh } ~ATH(NULL){ print giant frogs alert giant frogs alert"

this of course, is not particularly useful as far as I can tell, except possibly for quines, and possibly obfuscation. but really, is it possibly to write anything in ~ATH that isn't obfuscated?

speaking of not obfuscated, I have started working on adding a feature for user defined functions. I have it pretty much worked out how it will work, but I am not sure how I want to make the user DEFINE the functions. so I haven't been doing NOTHING with regards to this.


Tags
10 years ago

Do you know of any ~ATH implementations or dialects besides yours and mine?

Actually, yes kinda. Sorta anyway. There is a compiler of sorts that is intended to be ~ATH based, though I don't think it matched canon all that well.

It did have one feature which I found interesting though. It had a command which would create a variable thing which was truthy iff there was a process currently running with a given name, so you could have in a ~ATH loop something that loops until another program is closed. It was a pretty cool feature, but the syntax for it was odd. The author misinterpreted the panel where Sollux deletes the different virus folders he had, so the command was called rm -rf or something like that.

It also had a command to run an executable (by file name) iirc.(which allowed for easy implementation of the robin hood and friar tuck programs)

It also was an editor of sorts, but it had a small window that I don't think was resizeable. It worked (iirc) by doing some string replacement to turn the program into a c(++?) program, which it then compiled.

I'll try to find it  so I can link it. I don't think it represents ~ATH all that accurately, but the using another program as one of the objects seemed like a neat and probably accurate feature (given the mobius double reacharound)

tl;dr yes

12 years ago

reading the contents of user input, and calculator improvement

This post will cover how to actually determine WHAT the user has typed, instead of just how long it is. It will also include how to interpret what the user enters as a binary number, so that its easier to type.

An Essential part of making it interpret binary numbers is making it double numbers repeatedly.

This actually has a few ways that can be done, so this is one of the first situations where coding style for this problem might differ from person to person. Because of this, I will say more than one way to do it.

The first way to do this it to copy the number twice, and then start from zero and add both of the copies. This is relatively inefficient, and would take

a copy thing, consisting of two bifurcates (which would take a little time)

where the size of the initial number is N, 2N normal bifurcates, 2N reverse bifurcates, and 4N lines relating to the actual loop

assuming each command takes the same amount of time (which is an oversimplification) this would take 9N+C line times. (C is a constant) This might be acceptable, but there is a more efficient and nicer looking way.

The second way is nicer looking, but still not the most effecient. However, when multiplying by a larger number(such as 3, or 4, or even large numbers), this method is part of what would be used.

The second method is essentially copying the number (using a reverse bifurcate and a normal bifurcate), and then adding the number to zero, except instead of each loop increasing the new number by one, it increases it by two. This is shorter, and it looks nicer. It also only takes half as many normal bifurcates. As a result, the number of steps it would take (again assuming each step is the same length) is 8N+C, instead of 9N+C 

this one I will write out, but it is still not the best way:

//N is the number initially BIFURCATE [NULL,NULL]2NULL; BIFURCATE [N,N]G; BIFURCATE G[NCOPY,JUNK]; BIFURCATE 2NULL[RESULT,JUNK]; ~ATH(NCOPY){ BIFURCATE NCOPY[JUNK,NCOPY]; BIFURCATE [BLAH,RESULT]RESULT; BIFURCATE [BLAH,RESULT]RESULT; } 

ok, so yeah. that takes N, and puts twice N into RESULT, but it is still inefficient.

A more efficient version is to copy the initial number, and add the number to itself. This way you only have to do half the number of reverse BIFURCATE statements. This is much more efficient, taking instead the steps:

a copy thing, consisting of two bifurcates (which would take a little time)

where the size of the initial number is N, N normal bifurcates, N reverse bifurcates, and 2N lines relating to the actual loop

This has 7N+C steps, which is a significant improvement. I think it is the fastest way to double a number in drocta ~ATH.

It is as follows (N is the number)

BIFURCATE [N,N]G; BIFURCATE G[NCOPY,RESULT]; ~ATH(NCOPY){ BIFURCATE NCOPY[JUNK,NCOPY]; BIFURCATE [BLAH,RESULT]RESULT; } 

This is shortest and fastest solution I have found. If you find a shorter or faster method, please tell me.

Ok. Now we can double numbers. That is good. That is an important step. But we still haven't gotten user input to be read in any reasonable way.

Hang on, I'm GETTING TO THAT. GEEZ. (I'm kidding, no one has been complaining about my taking so long, other than myself)

Ok, so here goes:

To interpret the binary number input and convert it to a "number", we can follow the following algorithm:

start with zero.(this is before the loop)

If there are any characters left, double the number that is being created.

remove the first character from the remaining characters. If it is "1" or whatever symbol (or alternatively if it is not "0"), add one to the number that is being created. Otherwise, continue onto step 4 without doing anything first.

go back to the start of the loop (step 2)

Ok. thats the algorithm we are going to use. But I STILL haven't explained how to recognize what the next character is. Seriously what is up with that?

What you do is you bifurcate the rest of the input into [the next character,the rest of the input].

Now you have the next character. Then what you do is you reverse bifurcate it with some other object, and then you check whether that object is already dead or not.

But how do you make it so the combination is already dead? How do you get the object for the character before the user has even inputed it?

Answer: You don't. Not in the current version of drocta ~ATH anyway. You will have to tell the user to enter all the characters they will be using ahead of time. Yes this is horrible and stupid. No its not exactly like that in the comic. Its ~ATH what do you expect? :P

that might change in future versions, but I will try to stay backwards compatible with that.

but anyway, back to comparing it:

so you say something along the lines of:

import comparingobject CMP1; othercodehere makeNEQ1besomethingalive BIFURCATE [CMP1,CHAR]EQ1; BIFURCATE [NULL,NULL]2NULL; ~ATH(EQ1){ print yep, they are equal; BIFURCATE 2NULL[EQ1,NEQ1]; } ~ATH(NEQ1){ print nope, they are not equal; BIFURCATE 2NULL[NEQ1,JUNK]; }  

in the othercodehere you get the character a head of time, and say BIFURCATE[CMP1,THECHARTHATMATCHESWITHCMP1]D; D.DIE();

That makes it so that it will go through the one section of code if the character is the right one, but something else if it is something else.

Which is what we want.

So to put it all together, and make the thing that interprets the input as a binary number(hold on tight(ok, what, why did I say that), this will be a long one(why am I talking like this?)):

import blah BLAH; print please enter whatever character you will be using for binary zero.; INPUT ZEROCHAR; BIFURCATE ZEROCHAR[ZEROCHAR,JUNK]; import chrcmp CMP0; BIFURCATE [CMP0,ZEROCHAR]D; D.DIE(); print please enter whatever character you will be using for binary one.; INPUT ONECHAR; BIFURCATE ONECHAR[ONECHAR,JUNK]; import chrcmp CMP1; BIFURCATE [CMP1,ONECHAR]D; D.DIE(); BIFURCATE [NULL,NULL]2NULL; BIFURCATE 2NULL[OUTNUM,JUNK]; print please input the binary number you want.(it will be converted to unary); INPUT BINNUM; ~ATH(BINNUM){ BIFURCATE [OUTNUM,OUTNUM]G; BIFURCATE G[NCOPY,OUTNUM]; ~ATH(NCOPY){ BIFURCATE NCOPY[JUNK,NCOPY]; BIFURCATE [BLAH,OUTNUM]OUTNUM; }  BIFURCATE BINNUM[CHAR,BINNUM]; BIFURCATE [CMP0,CHAR]NEQ0; ~ATH(NEQ0){ BIFURCATE [BLAH,OUTNUM]OUTNUM; BIFURCATE 2NULL[NEQ0,JUNK]; } } print ok, going to print it out in unary, with each digit on one line. If the number you entered was large you might want to close the program instead of hitting enter.; INPUT JUNK; BIFURCATE [OUTNUM,OUTNUM]GOUTNUM; BIFURCATE GOUTNUM[OUTNUMCOPY,JUNK]; ~ATH(OUTNUMCOPY){ BIFURCATE OUTNUMCOPY[JUNK,OUTNUMCOPY]; print 1; } print Am I a terrible person for writing this?; 

Oh gosh. I wish I could indent in tumblr. that is terrible to read. tumblr is a terrible source code editor.

One time someone called me a masochaist for writing this type of stuff.

And then we just have to put that together with the adding thing, and then maybe add a better way of outputting the number. maybe in binary.

HAHAHAHAH

ok, yeah, I'm going to put it together in the next post, not this one, because I have to homework now.(using the noun homework as a verb was intentional)

yeah. putting it together in the next post.

As always, if something was confusing, please ask for clarification.


Tags
5 years ago

How do you use this?

Just to be super clear, though you probably understand this, “drocta ~ath” is not for practical purpose. It is purely an amusement.

That being said, to run this, you need to have python 2 installed. (Yes, currently most new python projects are in python 3. Unfortunately I haven’t gotten around to making any of the updates I’ve wanted to on this project, and it has been years since I’ve worked on it.)

To run it: download the github repository from https://github.com/drocta/TILDE-ATH

then, (probably from the command line, though running it in other ways may also work) navigate into the folder where you put all those files, use python 2 in order to run interp_2.py  . [1] Then, it will allow you to type something in. It would be good if it gave some sort of prompt saying that it is accepting input, but it currently does not. What you have to type in is the file name of the drocta ~ath program that you want to run.

for example, you might type:

python interp_2.py looptest.~ATH

in order to run the program looptest.~ATH , and then you would see the output:that alternates between “APPLE” and “ORANGE” a number of times (like, 5 times I think).

If it isn’t working for you, let me know and I can try and help you troubleshoot what’s going on.

If you are asking, not “how do I run the programs in this language” but “how do I write programs in this language”, uh, read through the rest of this blog I guess. It isn’t complete, but the point of this blog was meant to be a tutorial for how the language works. If you have any particular questions about how to do a particular thing in the language, then ask that. But I don’t currently have time to re-do the whole project of this blog and put a tutorial for the language as a whole in one response to an ask.

P.S. I am currently in grad school for math (I made this language while in high school). I haven’t been doing all that much programming lately unfortunately.

([1] What’s that? “interp_2.py” is a weird name for the main file? Indeed it is. Originally I had “interp.py” and then before I started using git I made a new version which I called interp_2.py, and then, for basically no good reason, I kept that name for the file. If I go back to this at all, I suspect that I will change that to just “interp.py” or maybe “main.py” or something. idk.)

8 years ago

This blog still exists

Hi, I haven’t posted much here in quite some time.

So, is this blog abandoned? I wouldn’t say so. I intend to post more ~ATH content here at some point. I have other projects and obligations, which is why I’ve been not doing as much with it recently (”recently”: understatement of the year), but if anyone has any questions about drocta ~ATH, or would like to request that I do something in particular with it, I think I’ll probably respond within a reasonable amount of time.

Right now though I thought I would link to two blogs that I think you are likely to appreciate if you like this blog.

The first is @sbahjsic http://sbahjsic.tumblr.com/ which is for a programming language and assorted connected software meant to be, well, sbahjsic . like sweet bro and h---- jeff. (Warning though, that blog has some javascript alerts when you view it. Also it has moving parts which might be bad if you get nauseous easily or something? idk.) The blog theme there is a work of art to behold. This is likely to appeal because it is also a homestuck related programming language, and also it is great.

The second is @tilde-he which is where I post most of my non ~ATH related tumblr posts. This is somewhat likely to maybe appeal because it is by the same person as this blog (me).

Again, if you have any questions or comments about my version of ~ATH, or, really, any version that you can point out, feel free to send them, and I’ll try to respond within a reasonable amount of time.

Alright, cheers


Tags
11 years ago

Hello again all!

So recently I started kind of working on this again for a bit. I have fixed some bugs with the parser that I haven't pushed yet. I am also writing an improved interpreter that will use the parser instead of the hacky thing that just goes through strings.

However, for the time being, even after I release this version, I would recommend maybe using the older version for a while if anyone is using it, because this version is probably even more buggy.

However, you know how a few posts ago (but more than a year ago (wow) ) I posted that post where I said that I didn't think bifurcate can be used to split values into more than 2 values?

Well I still kind of think that, but on the map page for homestuck on act 6, it says split Act_6[Act_1,Act_2,Act_3,<etc>];

So this is something I intend to implement, and something I am implementing.

And like I said before I would like it to be done with repeated bifurcation, as a sort of syntactic sugar.

And I am thinking I want it to be like

[a,b,c] means the same thing as [a,[b,c]]

so split Z[A,B,C];

would be the same as

BIFURCATE Z[A,BCTEMP]; BIFURCATE BCTEMP[B,C];

and that split [A,B,C]Z;

would be the same as

BIFURCATE [B,C]BCTEMP; BIFURCATE [A,BCTEMP]Z;

But the way the splits would be done could also be backwards

so [a,b,c] could be the same as [[a,b],c]

I'm pretty sure I prefer the first way, but the second way is actually easier to implement.

or at least cleaner looking to implement.

Why doesn't my code look clean ever?

Anyway, my reason for this post is this:

Does anyone have any opinions about how split is implemented?


Tags
12 years ago

Bug

Ok, if you tried running a script with the interpreter, it might not have run properly. The part of the code that handles what part of the code is executed next is buggy. It is in the process of being fixed. Also, if python gives you a syntax error, it is probably because you are using a different version of python. Change raw_input to input And change print stuff to print(stuff) I will post an introduction to the syntax soon.


Tags
6 years ago

Merry Christmas!


Tags
12 years ago

Syntax explanation

~ATH is a programming language. A programming language is a language that can be used to write programs in, that can afterwards be run. ~ATH appears in Homestuck, and drocta ~ATH is my attempt at making it a real thing.

drocta ~ATH is limited to what is physically possible of course, because it actually exists. It is also limited to fit well with the comic, and how much of it I have created so far.

As such, so far all the programs that can be written in drocta ~ATH are text only, do not yet accept input (input in progress), and tend to be stupidly long.

It is however capable of computing anything a computer can given enough time and memory.

~ATH is based on objects, and the lives thereof. 

For example, in homestuck, there are programs that relate things to the lifespan of a universe, or a person, etc.

Of course, in order to make an interpreter possible, we have to limit ourselves to virtual objects. Ones that do not actually exist.

References to these objects are stored in things called variables. You probably know what these are already, but if you don't, think of a variable as a box that can have a thing in it. Each box has a name. You can say "do something with whatever is in the box called "apple".

In ~ATH, every object is either "alive" or "dead".  Note that it is the object that is alive or dead, not the variable that refers to the object.

Now onto the actual syntax!:

Currently(as of build 7), drocta ~ATH has 5 different commands: import, ~ATH(){}, .DIE();, print, and BIFURCATE.

First we will go over the import statement. The import statement has the purpose of creating a new variable and a new object. Unlike other operations that can create a new object, the object created by import is initially unrelated to all of the other objects.

The syntax of the import command is:

import anything other than semicolons here VARIABLENAME;

The things between import and the last space before the semicolon are ignored.  

In future versions, the import statement might also do additional things, such as using things from other files. But for now it just initializes variables.

EXAMPLES:

If you wanted to make a new variable called BANANA, and you wanted the reader to know that BANANA is a fruit, you would say:

import FRUIT BANANA;

or you could say

import YELLOW FRUIT BANANA;

The things that go before the variable name don't actually matter, you can say

import ghsdgh hgsdkhg hgksdhg hgskdjg BANANA;

if you wanted.

Now for the next command: The eponymous ~ATH loop!

The syntax of it is as follows:

~ATH(VARNAME){ Some other code goes here }

What this does, is each time the code execution gets to the ~, it checks what the variable in the parentheses is, and then checks the object the variable points to. If the object is alive, it continues. If the object is dead, it skips to after the }. When the Code execution reaches the }, (that is, if it did not skip to after it), it will jump back to the corresponding ~. Code execution will keep going around in this loop until the object pointed to by the variable is not alive. In later versions, there may be an additional requirement that the } be followed by EXECUTE(code here); Where code here can be replaced with ~ATH code, NULL, or possibly a file name. But currently, this is not the case. Now onto the command BIFURCATE!: Bufurcate actually has 2 forms, the standard bifurcate, And the reverse bifurcate. The first of the two has syntax as follows:

BIFURCATE VARNAME1[VARNAME2,VARNAME3];

What this does, is it takes the object pointed to by the first variable, and determines two objects, which are stored in the other two variables. The two objects determined will always be the same for a particular object.  If you for example say:

BIFURCATE V1[V2,V3]; V2.DIE(); BIFURCATE V1[V4,V5]; 

then V4 and V2 will point to the same object, which will be dead.

The other form of the BIFURCATE command has syntax as follows:

BIFURCATE [VAR1,VAR2]VAR3;

This is pretty much the inverse operation. That is, it undoes the other one. If you say for example:

BIFURCATE A[B,C]; BIFURCATE [B,C]D; 

then A and D will point to the same object. To be clear, undoing the other is not the only time you can use it. It will take any two objects, and determine an object from those two. If there is already an object for the combination of those two, then that object is the resultant object. If none has been created yet (and the two arent split from something in that order), it will create a new object, which it will put in VAR3.

To be clear, if you say:

BIFURCATE A[B,C]; BIFURCATE [C,B]D; 

 A and D will NOT point to the same object, unless you create A such that B and C are the same. That is, if you say:

BIFURCATE [Y,Y]A; BIFURCATE A[B,C]; BIFURCATE [C,B]D; 

 A and D WILL point to the same object, and B and C will both point to the same object as Y (and as each other).

The Final command is print.

print is pretty simple, but its syntax might change somewhat.

Currently the syntax is:

print the text you want to output;

Note the semicolon. the semicolon is important.

So hello world would be

print Hello, World.;

SYNTAX EXPLANATION COMPLETE! PLEASE SUGGEST CLARIFICATIONS IF NECESSARY.

MESSAGE END.


Tags
11 years ago

re: "computationalalchemist answered: You could use Prolog-style lists for split."

"computationalalchemist answered: You could use Prolog-style lists for split."

I'm not totally sure what you mean, but my best guess as to what you meant is probably pretty similar to how I making it.

I implemented it and I think it works, I need to double check though.

With what I have now when I use 

split [THIS,THIS,THIS,THIS,THIS,THIS,NULL]COUNTER; ~ATH(COUNTER){ print "bananas"; BIFURCATE COUNTER[JUNK,COUNTER]; }EXECUTE(print "ok";); print "whee!";

it yields 

bananas bananas bananas bananas bananas bananas ok whee!

Which seems to make sense to me, and also, fits with how lisp lists work, and apparently also prolog lists.

also where it says split it will also accept bifurcate. they are actually treated as the same command.

import statements aren't fully implemented yet though.

I think I will put this version on github pretty soon.

Thank you for the advice.


Tags
Loading...
End of content
No more pages to load
  • carcin9geneticist
    carcin9geneticist reblogged this · 12 years ago
  • learn-tilde-ath
    learn-tilde-ath reblogged this · 12 years ago
learn-tilde-ath - Learn ~ATH
Learn ~ATH

News and tutorials on drocta ~ATH by drocta. interpreter here A brief summary of how to write code in the language (but also see the table of contents)

38 posts

Explore Tumblr Blog
Search Through Tumblr Tags