PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

New programming language on the PocketPC to come!

Hi, I would like to announce my new programming language to be released on the 16th of this month. It is called PPL and here is a brief description of it:

PPL (Pocket Programming Language)

PPL is a compiler/interpreter for the PocketPC. Source code is compiled on the fly to StrongARM (XSCALE is supported) byte code and then executed. Execution speed is very good and comparable with any other interpreted language out there. A semi-compiled version of the source file is saved (with a different extension) and automaticly recompiled if the source file is changed. This means totally transparent compiling to the user and a great distribution mechanism.

The language itself is a mix of C, Pascal and the Basic language. There is no variable types in PPL. Everything is fully transparent, from string to char to integer or double. Multi-dimensional arrays is supported and structures can be defined. You can also work with pointers the same way the C language handles them. String manipulation is done transparently and allocated dynamicly just like in Pascal or Basic.

In PPL the WindowsCE api or any other .dll are very easy to access. Simply define the function, the number of input and output parameters and the interpreter will do all the necessary conversion including WideChar conversion. It also comes with very easy functions to create interface (forms, buttons, editbox ...). Complete interface can be build in just a few lines of code. Most of the internal message processing is handled by PPL. You can also write your own message handling routine to customize your application to your liking.

PPL can be used on the road to test prototypes or better yet, to program full-blown games or demos straight from your PocketPC. PPL comes fully loaded with a game graphic API (using the PocketFrog library) and a sound API (using the Nekkus Sound System library).


The game API will be released next month. I want to make sure the language is top-notch before releasing this API. And btw, it took me only a few lines of code to write a very simple game that was running constantly at 70fps in an early build of PPL. The newest build is quite more optimized. I hope to squeeze so more fps in the coming releases.

Regards,
Kornalius.

PS: I am looking for somebody to host a forum section for me for free for the moment. This way I could give good support and post news there. :)
Sounds very interesting! Speaking as someone that also created his own language some years ago, I very much appreciate how much effort must have went into this. Kudos to you just for finishing it!

Do you have any language specs we could look at in advance of the release? I'm just talking about the syntax of your language.

I'm not sure how many of us would be willing to jump to a whole new language for our primary development, but if you've made the syntax accessible to people who aren't hardcore coders, you may find a very good folllowing builds quicly around PPL anyway.

Congrats again. Creating your own language is an impressive feat, no matter how it turns out, you should certainly be proud of the accomplishment.
Thank you very much for the kind words. Yes, it was infact a lot of work. But I had already done a good part of it years ago for an internal project at my work. The code was written under Delphi and compiling was for INTEL byte-codes. I took most of it and rewrote it all under eVc 4. I made a lot of changes to it too. It's more efficient (optimized) and a lot cleaner now! :D

As for the syntax of the language it is very much like C. Here is a little example, doesn't do much but just to show you how the language works.

Code:
proc main
s$=10.23+23.5;
ShowMessage(s$);
ShowMessage(root%);
ShowMessage("This is variable s$ "+s$);
end;


No variable declaration needed! It has local and global variables system. Global variables names are followed with an '%' and local with an '$'. Global variables are accessible by all programs running in the same PPL process. You can run multiple code files within code.

BTW, you guys here at PM helped me a lot getting started in the eVc programming world. It is also my first real C project ever. Without you guys here this would have never been possible.

Regards,
Kornalius
That's an interesting idea, the symbol that specifies variable scoping. No more of those evil local variable-masking bugs.

I've always liked the weakly-typed languages myself (the one I created was the same initially). May I offer a suggestion though? I discovered this the hard way myself... It tends to be better if you do like VB does and have both typed variables and untyped... Especially for the times when you need maximum performance, being able to specify a variable as a byte for instance instead of it defaulting to a generic type is a nice thing. Most of the time I find that people are OK with variables being untyped, but for performance and for mission-critical type applciations, where just havnig a generic type can result in hard to find bugs later, people like to be able to specify types explicitly. Just a thought.
Actually I do offer alternatives to type variables:

Code:
struct (v$, "Byte:1", "Short:2", "Int:4", "Double:8", "String:20");
v.byte$ = 10;
v.short$ = 300;
v.int$ = 37343;
v.double$ = 398.2932;
v.string$ = "This is a string";
free(v$); /* This is not necessary though */


It will certainly not be faster execution wise but more efficient in terms of memory. I still got to work on optimizing the struct access for the next release.

Regards,
Kornalius
Or you can also use this:

Code:
new(v$, 1);
set(v$, 10, TBYTE);
free(v$);

new(v$,4);
set(v$, 100029, TINT);
free(v$);


Regards,
Kornalius