Introducing the X++ Programming Language

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Introducing the X++ Programming Language

Boost - Dev mailing list
Hello Boost / Qt,

By taking advantage of the simplicity of the code of Javascript, the
power of C++ and the deterministic C++ memory manager Root.Ptr, I
decided to write my own programming language which takes advantage of
all these powerful features.

On the downside Javascript suffers from a slow garbage collector that
kicks in randomly which makes it impossible to write real-time engines
and C++ just doesn't have any objective memory manager up to this day.

My initial attempt was to convert Javascript into C++ but then the
principle of 'closures' and 'escape analysis' inlaid with Javascript
just makes it impossible to get rid of the garbage collector. So if we
sacrifice these principles away then we can integrate Root.Ptr and take
advantage of the power of C++ and the true flexibility and run-time
features of Javascript.

It has to be noted that X++ is an extension of C++ and therefore
everything we can do in C++ can also be done in X++.

You can find the source code here:
https://github.com/philippeb8/root_ptr/tree/x++/xpp2cpp

And the benchmarks indicate X++ is 2.7 faster than Node.JS! Note that
the language is still in a preliminary state but we can already compare it.

Furthermore, in theory, is should be possible to offer a service which
compiles the executables for combinations of major architecture / OS
only once, cache these executables on the webserver and executing them
in a specialized container on the client's desktop.  Thus, in theory, we
would be able to execute real-time engines from within our own browser!

So I am including Boost because one day X++ could be merged with the C++
programming language and I know Boost is well used in the vast gaming
industry which requires real-time engines.


Regards,
-Phil
http://www.fornux.com
http://www.finitetheory.com
https://www.actatabula.com
https://github.com/philippeb8/root_ptr/tree/x++/xpp2cpp


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
On 17/07/2017 15:59, Phil Bouchard wrote:
> Furthermore, in theory, is should be possible to offer a service which
> compiles the executables for combinations of major architecture / OS
> only once, cache these executables on the webserver and executing them
> in a specialized container on the client's desktop.  Thus, in theory, we
> would be able to execute real-time engines from within our own browser!

That used to be a thing (https://developer.chrome.com/native-client) but
was deprecated in favour of WebAssembly (http://webassembly.org/).


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
Nice idea. I'll definitely try it and feed back.

On Mon, 17 Jul 2017 at 08:10, Gavin Lambert via Boost <[hidden email]>
wrote:

> On 17/07/2017 15:59, Phil Bouchard wrote:
> > Furthermore, in theory, is should be possible to offer a service which
> > compiles the executables for combinations of major architecture / OS
> > only once, cache these executables on the webserver and executing them
> > in a specialized container on the client's desktop.  Thus, in theory, we
> > would be able to execute real-time engines from within our own browser!
>
> That used to be a thing (https://developer.chrome.com/native-client) but
> was deprecated in favour of WebAssembly (http://webassembly.org/).
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On 07/17/2017 02:10 AM, Gavin Lambert via Boost wrote:

> On 17/07/2017 15:59, Phil Bouchard wrote:
>> Furthermore, in theory, is should be possible to offer a service which
>> compiles the executables for combinations of major architecture / OS
>> only once, cache these executables on the webserver and executing them
>> in a specialized container on the client's desktop.  Thus, in theory,
>> we would be able to execute real-time engines from within our own
>> browser!
>
> That used to be a thing (https://developer.chrome.com/native-client) but
> was deprecated in favour of WebAssembly (http://webassembly.org/).

Interesting; then all we would need is for G++ to generate WebAssembly code.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On 07/16/2017 11:59 PM, Phil Bouchard via Boost wrote:
>
> Furthermore, in theory, is should be possible to offer a service which
> compiles the executables for combinations of major architecture / OS
> only once, cache these executables on the webserver and executing them
> in a specialized container on the client's desktop.  Thus, in theory, we
> would be able to execute real-time engines from within our own browser!

Apparently it's possible to compile the C++ code into WebAssembly:
https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm

(I'm reposting feedback from the Boost mailing list)


-Phil


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On 07/17/2017 06:57 AM, Phil Bouchard via Boost wrote:
> G++ to generate WebAssembly

Oh it's already happening:
https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
Phil Bouchard via Boost <[hidden email]> wrote:
>
> You can find the source code here:
> https://github.com/philippeb8/root_ptr/tree/x++/xpp2cpp
>
> And the benchmarks indicate X++ is 2.7 faster than Node.JS! Note that
> the language is still in a preliminary state but we can already compare it.

I just tried it on a different computer (3.40GHz) and it's 3.6 times faster
than Node.JS!


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Introducing the X++ Programming Language

Boost - Dev mailing list
On 07/17/2017 04:19 PM, Phil Bouchard via Boost wrote:

> Phil Bouchard via Boost <[hidden email]> wrote:
>>
>> You can find the source code here:
>> https://github.com/philippeb8/root_ptr/tree/x++/xpp2cpp
>>
>> And the benchmarks indicate X++ is 2.7 faster than Node.JS! Note that
>> the language is still in a preliminary state but we can already compare it.
>
> I just tried it on a different computer (3.40GHz) and it's 3.6 times faster
> than Node.JS!

Yeah it's around 3 times faster regardless on any computer.

So tonight added basic class definitions to the parser and I fixed some
bugs which now makes standard operator calls return r-values correctly.


-Phil


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...