last day (90 days later) » 

1:54 PM
Hello
So far I've built a simple program that takes the processtack program as a file and prints it
 
How'd we get values for specific indexes?
[n]?
 
@MatthewRoh Could you transfer the online interpreter to gh-pages so that I can start working on the vanilla interpreter at master?
@MatthewRoh Too verbose, try to cut one byte
Btw should the language be like 2 2+ or +2 2? (the first one is easier IMO)
 
@KritixiLithos Done, You can work on master now
Do I have to set you as a collaborator
 
I think so, otherwise I can't commit directly
 
You're invited to collaborator
btw the things that were in master are still there
delete them before working on it
 
Wait, I think my git is messed up
 
So, get values for specific indexes with |n or something?
Also we need each characters which corresponds to each processing functions
Do we give only one index for each functions and get the data from n,n+1,n+2,etc?
 
@MatthewRoh Maybe n| where n is the number
So that after you push the index, you get the element at that index
@MatthewRoh Yes, we also might need to change some things around with the functions to make things less verbose
@MatthewRoh What do you mean by that?
 
Do we give each arguments to functions or give an index and the function gets arguments from n|, n+1|, n+2|, etc
 
We can do it both ways
 
2:13 PM
Sure
 
10r will rotate by 10 radians.
If the second element of the stack is 10, then 2|r will first get 10 and push it back to the top of the stack and then rotate by the amount on top of the stack, which is 10
 
This is a bit confusing for a first programming language made
(Sure, there was BrainLIFE, but that didn't have any progress!)
 
@MatthewRoh It is a stack-based language, right? So each literal will push its value onto the stack. 10;3 (code) => [10, 3] (stack)
 
oic
btw I gtg for now
 
And then when you call a function, say r for rotate, it will push the top value from the stack and use it as args for the function.
 
2:19 PM
Maybe discuss later
 
@MatthewRoh Bye o/
So 10;3r will first push 10 onto the stack [10], then ; is a separator between the numbers so that they won't be interpreted as one big number, then 3 push 3 onto the stack [10,3]. Then when rotate is called, it takes the top value of the stack (namely the 3) and uses it as its arguments. This is equivalent to rotate(3); in Processing code. After the function has been executed, the stack will be [10] since the 3 has been popped after calling rotate
This is just a rough idea that I think is how a stack-based language behaves, but we can change it later if we want
 

  last day (90 days later) »