« first day (166 days earlier)      last day (1609 days later) » 

03:31
Okay, interpreter structure time!
As you can tell from the repository, there are 7 files involved in the execution process
Vyxal.py (the main file)
VyParse.py (the parser)
Codepage.py (the code page and command dictionary)
Encoding.py (implements the sbcs)
Bases.py (some base conversion utilities)
Uncompress.py (the string uncompressor)
And Words.py (the string compression dictionary)
Admittedly, encoding, bases and uncompress should be merged into a single file
Compilation starts in vyxal.py
^ the command line arguments are read and placed into variables
^^ however, if there isn't any command line args, repl mode starts
okayy
Anyhow, if the flag that indicates that the vyxal encoding is present, flow moves to encoding.py
In there, the file is converted from raw bytes to utf8
(I stole the algorithms from 05ab1e lol)
(fun fact: 05ab1e was once written in python)
Once the program's contents have been decoded, we start transpiling the program
But before any code gets turned into python, it needs to go through VyParse
VyParse takes the program string and returns a list of "tokens", which store information like structure types, etc.
Flow then goes back to vyxal.py
Each token has its type checked to see how to transpiled it
First, it is checked to see if it is a single character command
If it is, then the dictionary of commands in codepage.py is used to get the translation
But if it isn't, the token is then checked to see if it is a number
If it is, the translation looks like stack.push(<whatever>)
If it isn't, we then check to see if the token is a string
@Razetime is this making sense thus far?
03:49
yes it does
Good
Continuing, if the token is a string (that is, it's a string to push to the stack), program flow goes over to uncompress.py
There, the string gets dictionary uncompressed
With what I call "string compression codes" turned into actual words
String compression codes (scc's) are two character strings made of non ascii characters
Each scc represents a certain dictionary word
E.g in Keg (which also uses the scc idea), H% stands for Hello
Anyhow, once the string is uncompressed, flow returns to vyxal.py
and everything is cool and good
But if the token wasn't a string, it's a structure
so I can help with some TODO operators
@Razetime yep
03:53
@Lyxal like, a function?
or an actual data structure
@Razetime if, for, while, list, lambda, function
Those are called "structures"
After that, we move onto the next token and rinse and repeat
ok ok
That's the general structure of the interpreter pipeline
There's a lot more to explain
I should probably scan and upload my notes
Those have a bit more detail regarding operation
Or I can read the source and figure some stuff out
That too
Also, when implementing operators, try to use the add, subtract, multiply, divide and modulo functions
Those implement type cohesion
And do some other things like vectorisation with stacks
Things that python's +-*/% don't automatically do
Of course, if need be, you can use built in operators
Actually, forget I said that, you implement things the way you want
04:05
oh nice
and then you will err umm
clean up any dumb things I may have done
@Razetime depends if they're dumb or not
I trust you
I trust that you can code good
sure, imma reclone the repo
And feel free to point out dumb things I've done
@Razetime did you accept the invitation to be a collaborator?
not yet
Cool and good
 
3 hours later…
Imma download that real quick
Question: why is everyone an owner?
@Razetime because of hi.
Note that the first few pages are less visible because I used pencil
07:46
I can read it no prob
good
Just people who have contributed to vyxal are ro's now
oh cool

« first day (166 days earlier)      last day (1609 days later) »