Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Naalaa source code
#1
Hi everyone

In what language was NaaLaa compiler created ? c ? c++ ? other ?
Is NaaLaa compiler source code available ? Can i have it ? If not well i tried LOL [Image: smile.png]
Reply
#2
It's written mostly in C, but the source is closed (mostly because it's a huge mess that I'm not proud of).

I am working on another language, also in C. It's interpreted, not compiled to "bytecode" like naalaa. But its source will be open when its ready enough. I made a half functional draft for the language in naalaa: http://www.naalaa.com/community/showthread.php?tid=68
Reply
#3
But if the experimental language will be interpreted directly and not use intermediate bytecode for execution; it would not be too slow?, at least for game programming?
Reply
#4
(08-30-2018, 07:36 AM)Transdiv Wrote: But if the experimental language will be interpreted directly and not use intermediate bytecode for execution; it would not be too slow?, at least for game programming?

We'll see. It probably depends on how it's used. It's very easy to extend with C, so libraries can be written to take care of heavy work.

It does tokenize the sourcecode, and it generates "jumps" and "shortcuts" while interpreting. For example, an if statement runs a lot faster the second time it's executed, because the interpreter learns where to jump after doing it once.
Reply
#5
Quote:It does tokenize the sourcecode,

That sounds like my next project
tokenizer finished .... Big Grin
Reply
#6
(09-06-2018, 05:17 AM)Aurel Wrote:
Quote:It does tokenize the sourcecode,

That sounds like my next project
tokenizer finished .... Big Grin

Haha Smile

I just wanted to point out that it doesn't jump around in the actual sourcecode and do heavy string comparisons for everything while executing. I assume there exist interpreters that actually do that.

You've written a few languages, do they all compile to bytecode? Just curious Smile
Reply
#7
Quote:You've written a few languages, do they all compile to bytecode? Just curious

Not few
just two and Ruben is unfinished and abandoned
it is semi tokenized and yes no bytecode...
But when i looked recently into JImage interpreter ..heck there is no bytecode
but is written in Java and perform very fast.
Speed really depend on language in which is interpreter written
Ed D show us his toy.interpreter written in many langs it isbytcoe and ass such is very fast
for example o2 version is very fast.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)