When I was starting to work on EZLang, I really didn't know what I was doing. I made a small 138-line interpreter in python that ran super slowly and the way it was interpreted was a mess. Then I decided to rewrite the language, again, and again. Now I finally sat down and started work on a specification for the language to use. The new concept is to function in similar ways to C, where we compile to .o(object) files that can be linked and executed. The naming convention strides against common naming so any linker will have to adapt, but other than that it should be basically interoperable with compiled C.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// api_auto is PUBLIC DOMAIN, but credit is appreciated! | |
// If you where to credit, please credit "OpenAbility", "OpenAbility Software", or if you're feeling | |
// like it, "khhs" or "khhs167" | |
// Creators contact info: "jimmy@openability.tech" or just "contact@openability.tech" | |
// Hope you enjoy using it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is just iterated over really quickly using the byte[] from the content loader | |
// This is just done with a quick while loop looking like this: | |
// string? line; | |
// while((line = lineIterator.GetLine()) != null) Console.WriteLine(line); | |
namespace Soul.Engine; | |
public class LineIterator | |
{ | |
private readonly ReadOnlyMemory<byte> _data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The content loader loads in a ZipArchive, and uses it to load data, it has a hasing function etc | |
// I wish to keep a couple things secret but i'll try and include as much as I can. | |
// This function loads in a resource from a hashed file name, the file name is hashed and passed into this function in another | |
// function called "LoadResource" | |
private static Stream LoadResourceHashed(string hash) | |
{ | |
if (_archive == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rock paper scissors ReCT speedrun 2.0 | |
// Copyright (C) khhs 2022 | |
// All rights reserved | |
package sys; | |
sys::Write("Enter Your command(Rock/Paper/Scissors)"); | |
var option <- sys::Input(); | |
if(option = "Rock"){ | |
sys::Print("CPU Chooses paper") |