wichtounet/thor-os

JavaScript Interpreter Implementation

Closed this issue · 4 comments

DukTape is a javascript interpreter, It would be really nice if there was a way to run it with thor-os, It's not minimal amount of c/c++ includes, can you help me bring it across in thor-os?

Hi,

Porting existing code to thor is a very large amount of work. I haven't looked at the DukTape code, but you will very likely have to port most of the C library. And you'll need to implement new system calls.

Thor is not yet in a sufficient state to port applications to. Doing so would require a large amount of work. It's only a hobby project and I'm not currently working on it.

Baptiste

What about porting something like mjs which can deal with having the bare minimum of libraries? (Almost none if you go through some source code for 10 mins.). I think Having a javascript interpreter might make things easier and more interesting with this project. I'll try porting it myself will let you know how that goes.

Btw What is the status with memory allocation? Like what can I make use of? Thank you.

If it's something standalone, it could be done probably in a reasonable amount of time. I don't know mjs, but it could a nice first try. Although, something smaller would probably be better.

Be wary that there is no support for threads in Thor.

For memory allocation, it depends where you are programming. If you are in the kernel, you can make use of physical memory, virtual memory or dynamic memory. In user space (if you port a program for instance), you can make use of dynamic memory via malloc and new.

Closing issue for lack of activity, please reopen if the problem is still there.