We had the JS working just fine, you just messed it up
We had all this setLongDict and setShortDict and a dictionary.js file
@lyxal My interpreter already works on modules tohugh so it will work fine
Anyway in Scala, why not just have a Dictionary.scala file that imports the resources and whatever and exposes them, and then in all your files just do Dictionary.longDict and whatever
imo singletons are a cancer except when they exist to manage resources that you logically can't have multiple handles to, but it also sounds like this is deep enough in js hell that they might be the solution anyways lol
If it was just jvm and js, that'd probably be okay. If it was just jvm and native, that'd also probably be okay. But the three altogether? You're pandering to a really weird intersection of limitations
With documentation that isn't as nice as you'd want it to be
@naffetS are you also saying that the dictionary contents would be passed to the singleton before execution? Because I think that's also what you're saying then.
Probably unrelated issue, but in the test_lexer_input function (which btw is in main.c for some reason), if you give is < 5 chars at print it out to check, it removed the trailing newline like it should; if you give it exactly 5 chars it seems to not remove the trailing newline; and if you give it > 5 chars, it segfaults
If I try to replicate it calling append_str on a 5char string and a 1char string it works, which leads me to think memory's being misallocated somewhere...
the only problem with transpilation I have is that it doesn't allow for as much freedom as interpreting does. And yes, I know v2 is transpiled, but that's because at the time I made it, I didn't know how to do interpreters.