oak
oak copied to clipboard
primitives and spec missing on website
Hello @thesephist
I can't find the primitives like input()
on oaklang.org/.
I also have some other questions
- is there
read
andwrite
from lisp - how to use Oak inside an application as scripting language
You can use Oak inside of another language easily if you and the language have Shell access and can keep doing so. Just install Oak, and then use 'oak' to enter the repl.
I can't find the primitives like
input()
on oaklang.org/.
You could probably find some clues in the 'env.go' file starting at oakinput on line 577.
I end up finding the built-in functions in docs/spec.md
This is true, but there are a few variables that aren't listed there inside the env
As you can see, these variables are usable within the latest Oak.
They just aren't in the old spec.md
.
lib -> import gc -> collect garbage mem -> show memory usage lib__oak_qm -> ?
lib__oak_qm -> ?
lib__oak_qm -> import exists in memory?
lib__oak_qm -> import exists in memory?
i can't find it in the source code
lib__oak_qm -> import exists in memory?
i can't find it in the source code
Well, you can use it to get a true or false if a lib has been imported, e.g. ___runtime_lib?('std')
I also found ___runtime_proc()
, which returns the current pid and oak
excutable name.
c.LoadFunc("___runtime_lib", c.rtLib)
c.LoadFunc("___runtime_lib?", c.rtIsLib)
c.LoadFunc("___runtime_gc", c.rtGC)
c.LoadFunc("___runtime_mem", c.rtMem)
c.LoadFunc("___runtime_proc", c.rtProc)
Oak is a good language. Will the author ever come back to update the official website?
Not sure, but I've been using it with Kaboom for my games.
It's pretty good when you build to the web since you can interop between JS and Oak almost seamlessly.
It's pretty good when you build to the web since you can interop between JS and Oak almost seamlessly.
How do I do that interop? Do I print
the object to string and send it?
It's pretty good when you build to the web since you can interop between JS and Oak almost seamlessly.
How do I do that interop? Do I
No, you have to be building with --web
I misunderstood. I thought you were mentioning interop between Oak code in browser and Oak code on server.
I want to add basic features such as chdir
to Oak. Can I submit the patch to your fork?