zod
- 13 Devlogs
- 50 Total hours
Zod is an interpreted programming language built in Go
Zod is an interpreted programming language built in Go
DevLog#12 — I have added Strings, Arrays, and Hashes to the bytecode compiler and the vm. I thought at first that it would be hard, but turns out it was smooth and easy. Well, not that easy because the Hashes had an issue that I discovered later when I tested the repl, turns out the Hashes doesn’t appear in the repl, but it worked in the tests, so that was weird, but I solved it by keeping track of the order of Hashes. I must continue the bytecode compiler and the vm by adding functions, and built-in functions. Wish me luck…….
DevLog#11 — I have added variables to the bytecode compiler and the vm. Mostly, it was easy, but the assigning char := was a bit tricky to implement in the bytecode compiler and the vm. I made a global environment for setting and getting the values in the variables. I must now focus on implementing / adding strings, arrays, and hashes. Wish me luck……
As a prize for your great work, look out for a bonus prize in the mail :)
DevLog#11 — Finished adding the other comparison expression. I implemented if conditions to the bytecode compiler and the vm. It worked just fine, but It was tense ordering the instructions to make the compiler compile the if condition in a good way. I must now start by adding else-if, and variables. Wish me luck.
DevLog#10 — Finished adding FLOAT_OBJ to the bytecode compiler and vm. Also, supported the operations +, -, *, /. I Implemented BOOLEAN_OBJ and comparison expression in the bytecode compiler and vm too. I will work now on adding more ways in the comparison expression. Also, adding if conditions.
DevLog#9 — Currently, Implementing the bytecode compiler and VM. I managed to to finish the initial part of the compiler and the vm. I was able to add integers, it can’t add float and it can’t do any operation other than addition. What I will do now is to add float to compiler so I can add them, and then I will I will add the other operation. I hope this bytecode compiler phase works good, so I can implement the full compiler so Zod could be like Go, Zig, and Rust in the future.
DevLog#8 — Zod is finally here. I finished building the interpreter phase (Yeah, Zod will be a compiled language soon). I added MATRIX_OBJ and that opens ways to build cool things with the language like this demo of Conway’s game of life built in Zod. Cooool!!!!!!! right.
DevLog #7 — I have added hash map in Zod. Also added hash built-in functions like insert(), remove(), contains(), keys(), vals(). NOTE: The hash map is randomized due to Go maps logic.
DevLog #6 — Zod finally has built-in functions, not many, but still good. Zod has len(), println(), printf(), input(), int(), string(), and type(). Also I have added string datatype, for-loop, and a loop {} statement like in Rust. Zod is becoming better day after day and I hope it become a great small language.
DevLog #5 — Zod is finally functional. After I have built the evaluator and added it to the REPL, Zod became a fully function language, Its not a full language, but its still functional. I still have to add more datatypes and built-in functions since it only has integers and boolean, and no built-in function . Zod is becoming a programming language day after day and I think the of its becoming a programming language is near.
DevLog #4 — I have added FunctionLiteral, CallExpressions, and IfExpressions. Also, updated the REPL with the parser. Now, I will start working on the Evaluation.
DevLog #3 –– Today I made significant progress on Zod’s parser. The parser can now handle: Let statements, Assignment statements, Return statements, Infix expressions, Prefix expressions, and Boolean literals. There’s still plenty of work to do, but the parser is taking shape and the language is starting to feel real. My goal with Zod remains the same: to create a programming language that puts learning first while still being capable of building interesting and practical projects.
Finally, I built the repl foundation, but the AST, parser, and eval are still left. Wish me luck….
Currently, expanding the lexer of zod. I am planning to make zod have mixed syntax between C, Go, and Rust.