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
#8
Haha. I doubt the code is that sloppy. If you don't wanna release it, it's your code, your choice. I do hope you have it backed up somewhere redundant that won't get taken out by another disk crash though. I've seen way to many pieces of software get their sources permanently lost that way. Hell, I lost code that I never released before, because of accidental deletions. And also lost code that I thought was safe because of the hosting forum going down permanently without warning (qb64.net). Anyways, if u ever want someone to help clean it up let me know, I can be straight up OCD about making code look good. ;-)
Reply
#9
prolan
written in naalaa is great piece of code
also easy to unserstand  Wink

oups wrong topic...
it is not good every time have all open source
Reply
#10
(06-12-2019, 09:09 AM)Aurel Wrote: prolan
written in naalaa is great piece of code
also easy to unserstand  Wink

oups wrong topic...
it is not good every time have all open source

Hey, you cant blame me for trying Big Grin
I love messing around with code, I was a little disappointed to know that I can't mess with the source code to the compiler itself.
Anyways, unless the code is some kind of trade secret, no point of being self-conscious about it. I'm sure everyone has seen sloppier code. When I first started programming in QB64 back in the day, the code for the SDL version was a total rat's nest. Then since the code was open, certain people took the opportunity to help clean it up. It's still kinda sloppy but better than before.

My main point was that, keep a backup somewhere else, not on the local hard drive, in case one day he changes his mind, that way its not the type of situation where, he is willing to let the code be seen, but it doesnt actually exist anymore. (I use google drive for that purpose)

Shit happens, you know? I was looking online, because I like to mess with older versions of software, I found out there is at the very least a NaaLaa 2, 3, 4, 5, and current V 6. I was able to find version 5 (and 6 obviously) but all the other versions (and their libraries too) are now lost. I hope he has backups of them somewhere, but if not, they are literally gone forever. It would suck if that happened to the source code too. Just sayin...

I think the main reason it is hidden, is because on the surface it looks so professionally done. Maybe if the source were shown, it would blow the illusion of professionality, but... It's not a professional language so who cares? I think most people who are using it just like the challenge of doing things in a non-standard way, like the language and/or ide, or like all the handmade graphical routines. I myself fall into all of the above categories. I am nowhere near the target audience though, I dont program games, I program graphical user interfaces, which all the game routines are still useful for. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)