Chrono Compendium

Zenan Plains - Site Discussion => General Discussion => Topic started by: Schala Zeal on August 28, 2010, 12:02:24 am

Title: Something non-Chrono I made
Post by: Schala Zeal on August 28, 2010, 12:02:24 am
I am in production of my own programming language. I didn't originally make it but it was abandoned in early development so I'm remaking it and finishing it.

Check out the code repo: http://github.com/Schala/Zeal-KL

It's almost ready for an early alpha, but it will only do variables and commands when released. Alpha is alpha though. It's not complete.
Title: Re: Something non-Chrono I made
Post by: ZaichikArky on August 28, 2010, 04:05:54 am
What could it be used for?
Title: Re: Something non-Chrono I made
Post by: Schala Zeal on August 28, 2010, 05:31:19 am
Well I wanted a language that can be almost completely customized and extended while having powerful features like macros and user-friendliness and object-orientation the right way.

Code: [Select]
module Example;
    class Thread, super ForumObject;
        var id, uint16;
        var name, Text;
        var moderators, array User;
        var hitCount, uint32;
    eclass;

    cmd makeNewThread;
        prm thread, ptr Thread;
        prm name, Text;
 
        thread = new Thread, (0, "General Discussion", (Zeality, Ramsus), 9000);
    ecmd;
emodule;
Title: Re: Something non-Chrono I made
Post by: idioticidioms on August 28, 2010, 09:04:37 am
hey, I can actually understand that better than php.
Title: Re: Something non-Chrono I made
Post by: Schala Zeal on August 28, 2010, 06:56:03 pm
^_^ Well it isn't a web language like PHP but I suppose I can make it convert into Java. My main target is software programs. I just used the forums as an example.
Title: Re: Something non-Chrono I made
Post by: Ramsus on August 29, 2010, 10:01:00 am
Seems kind of early to announce an upcoming alpha, isn't it? You've only written one barebones function to tokenize strings, and then some random skeleton code so far.

If you're looking for quick results (and you should be, so you can test out and prototype your ideas faster), GNU Bison and Ragel are excellent tools. Ragel (http://www.complang.org/ragel/) is particularly interesting, since it has a lot of different applications and generates code in multiple languages without any dependencies.

Title: Re: Something non-Chrono I made
Post by: Schala Zeal on August 29, 2010, 10:52:44 am
I actually looked into Bison but it looks difficult plus some of my coding buddies said it was unnecessarily complex.

I'm sort of redoing the code for KL's compiler. I felt I could make it better than what I originally wrote. I stopped last night and thought "I could do this better."

My idea is having everything structure. Like, for variables, there'd be a structure with the members identifier, type, and value. That way when doing the codegen, it'd be easier to build. I'm thinking of using an ID system so everything's generated in the correct order. Maybe tonight I'll have the new branch up.
Title: Re: Something non-Chrono I made
Post by: Schala Zeal on September 01, 2010, 06:04:55 am
Okay, I redid a good portion of KL's implementation to make it far less complicated for working on. Github hosts the latest code as of tonight and if it works well, it'll be easier for me to add more features like object-orientation and macros in the future.

A sub-project I want to do is KLScript, a stack-based scripting language for the purpose of embedded scripting. That will hopefully come once KL manages to bootstrap. By that I mean eventually I want to write KL in itself.