@hyper-neutrino @AaronMiller @UnrelatedString @Underslash @Razetime @Wasif @Ausername @user @AviFS @pxeger @math ^ (sorry for the mass ping, this is one of the few times I'll be doing such a ping for a while)
This might not be the right place to ask this but I noticed Vyxal has a really nice online interpreter running on pythonanywhere.com. I recently made my own language with the interpreter also written in python and I'm trying to figure out how to make a similar online interpreter. The only problem is that I don't know what I'm doing when it comes to getting a website working - did you guys follow any tutorials to get that working and, if so, is there any chance you could point me to them?
obviously you only need THIS_FOLDER to be assigned once, but you would need to create a new file name for each file you want to open using os.path.join
But that's all once you've gotten the site working lol
my current implementation of yuno is in JS so the entire thing runs client-side, so it's not too helpful - unless you're willing to use JS instead of Python
my online interpreter server (branch, flurry, etc) has some stuff that might help but do be warned that it's not actually secure AFAIK
granted having your tokens set so you can build a parse tree is mostly relevant for normal languages and you can get away with it if the extent of your parsing is like transformers
@lyxal when you encounter string delimiter set a string flag, and capture everything in between including newlines and when faced another delimiter close the flag and keep evaluating tokens
But looks like this will not go with your group string strategy
The way I'm planning to implement vectorisation is just to do a map, but with the stack it takes input from as the current value, plus the rest of the main stack. Then figure out how many items it popped and put that back on the stack.
I mean, it's kinda too late for you now
I just don't want to have to keep track of the arity of everything.
I'm considering, for my stack-based lang, replacing most array-based commands with a "execute this code in a new stack frame with this array as its initial stack". A bit like eval, I suppose. (and having the array commands operate on the stack itself)