haXe interpreter / VM ?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

haXe interpreter / VM ?

Marcelo de Moraes Serpa
Hi,

It might not make any sense at all, but I'm too used to interpreted languages, and maybe it would be nice to have a way to interpret haXe (i.e removing the compilation process). Of course, this would probably lead to slower programs, but faster turnaround. I think this is very nice for web apps (I'm spoiled by Ruby already).

Anyway, just an wild thought. Open for discussions if it makes sense.

Cheers,

Marcelo.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Franco Ponticelli
In my opinion, if you use an interpreter you loose one of the biggest advantages of haxe: compile time errors 
Strictly speaking they will still be there but you will see them as (pre?) runtime errors.
Probably having some automatism that autocompile your code on save could be enough, no? I think that that feature already exists in FD but I am used to F8/F5 so is not a problem for me.
That said I can see some advantanges in having a console interpreter.

Franco


On Tue, Jul 26, 2011 at 11:09 AM, Marcelo de Moraes Serpa <[hidden email]> wrote:
Hi,

It might not make any sense at all, but I'm too used to interpreted languages, and maybe it would be nice to have a way to interpret haXe (i.e removing the compilation process). Of course, this would probably lead to slower programs, but faster turnaround. I think this is very nice for web apps (I'm spoiled by Ruby already).

Anyway, just an wild thought. Open for discussions if it makes sense.

Cheers,

Marcelo.

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Raoul Duke
In reply to this post by Marcelo de Moraes Serpa
On Tue, Jul 26, 2011 at 10:09 AM, Marcelo de Moraes Serpa
<[hidden email]> wrote:
> Anyway, just an wild thought. Open for discussions if it makes sense.

i agree, i really want my programming languages to have a repl so i
can do experiments more easily.

sincerely.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

singmajesty
In reply to this post by Marcelo de Moraes Serpa
I know someone who set up a web server that compiled haXe code on-the-fly,  
whenever you visited the page.

The haXe compiler is very fast, so perhaps something like this would work  
out for development?



On Tue, 26 Jul 2011 10:09:43 -0700, Marcelo de Moraes Serpa  
<[hidden email]> wrote:

> Hi,
>
> It might not make any sense at all, but I'm too used to interpreted
> languages, and maybe it would be nice to have a way to interpret haXe  
> (i.e
> removing the compilation process). Of course, this would probably lead to
> slower programs, but faster turnaround. I think this is very nice for web
> apps (I'm spoiled by Ruby already).
>
> Anyway, just an wild thought. Open for discussions if it makes sense.
>
> Cheers,
>
> Marcelo.


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

davidedc
In reply to this post by Marcelo de Moraes Serpa
Nicolas Made hxscript. Doesn't interpret all of hAxe , but maybe enough for your use?


Pardon any typos, sent from my mobile.

On 26 Jul 2011, at 18:09, Marcelo de Moraes Serpa <[hidden email]> wrote:

> Hi,
>
> It might not make any sense at all, but I'm too used to interpreted languages, and maybe it would be nice to have a way to interpret haXe (i.e removing the compilation process). Of course, this would probably lead to slower programs, but faster turnaround. I think this is very nice for web apps (I'm spoiled by Ruby already).
>
> Anyway, just an wild thought. Open for discussions if it makes sense.
>
> Cheers,
>
> Marcelo.
> --
> haXe - an open source web programming language
> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

MarcWeber
In reply to this post by Marcelo de Moraes Serpa
Hi Marcelo,

you're not very accurate. Are you talking about
- REPL (read eval print loop)?
- or about dynamic language features (PHP,JS, Ruby,..)

REPL does exsit for statically typed languages. Examples are Haskell,
Scala ...

If you worry about speed - then you don't know HaXe. Jump in and get
started.
Well -things would get too slow - if you tried compiling 10.000 of
source files. Don't think thats the case..

> slower programs, but faster turnaround. I think this is very nice for web
> apps (I'm spoiled by Ruby already).
:-) Would you like to help writing a patch providing Ruby like syntax
for HaXe ?

Marc Weber

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

George McBay
In reply to this post by davidedc
hxscript is nice for some uses but given how fast the haxe compiler
is, I think a compile-on-demand system like the one Joshua mentioned
(also the way .net web frameworks or python->pyc works) would make way
more sense.  It would be trivial to implement something like that
compared to making a true haxe interpreter and the end result would
probably be superior in practice also -- as long as the compile step
happens without you having to manually launch it, who cares that it
happened?  With haxe unless you're hitting a huge project for the
first time the new code compile time will be lost in the noise of the
tcp/ip connection, even to localhost.


On Tue, Jul 26, 2011 at 10:29 AM, Davide Della Casa <[hidden email]> wrote:

> Nicolas Made hxscript. Doesn't interpret all of hAxe , but maybe enough for your use?
>
>
> Pardon any typos, sent from my mobile.
>
> On 26 Jul 2011, at 18:09, Marcelo de Moraes Serpa <[hidden email]> wrote:
>
>> Hi,
>>
>> It might not make any sense at all, but I'm too used to interpreted languages, and maybe it would be nice to have a way to interpret haXe (i.e removing the compilation process). Of course, this would probably lead to slower programs, but faster turnaround. I think this is very nice for web apps (I'm spoiled by Ruby already).
>>
>> Anyway, just an wild thought. Open for discussions if it makes sense.
>>
>> Cheers,
>>
>> Marcelo.
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Marcelo de Moraes Serpa
In reply to this post by MarcWeber
Hey!

I didn't know about REPL. I think this would be pretty cool. Like a simulated haXe env that is not the end target yet, but allows you to inspect the the objects.

But what I mean is to have a runtime, like Ruby does. The benefit is that it allows you to change the source without compiling (it can compile, but then it would be transparent to the user).

A ruby-like syntax would be very cool, since Ruby is a pleasure to work with. MacRuby, the Ruby "for Objective C" has some additional strict typing features. Maybe that syntax could be used as a base?

Wild ideas.. :)



On Tue, Jul 26, 2011 at 12:35 PM, Marc Weber <[hidden email]> wrote:
Hi Marcelo,

you're not very accurate. Are you talking about
- REPL (read eval print loop)?
- or about dynamic language features (PHP,JS, Ruby,..)

REPL does exsit for statically typed languages. Examples are Haskell,
Scala ...

If you worry about speed - then you don't know HaXe. Jump in and get
started.
Well -things would get too slow - if you tried compiling 10.000 of
source files. Don't think thats the case..

> slower programs, but faster turnaround. I think this is very nice for web
> apps (I'm spoiled by Ruby already).
:-) Would you like to help writing a patch providing Ruby like syntax
for HaXe ?

Marc Weber

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

MarcWeber
Excerpts from Marcelo de Moraes Serpa's message of Tue Jul 26 19:46:51 +0200 2011:
> Wild ideas.. :)
Get started. Then continue talking making suggestions.

I've setup Vim to run HaXe compiler. Thus there is no difference whether
I safe the file and reload it in ruby (don't know how to do that ..)
or whether I just run a test case written in HaXe.

And the next time when you request a "fast" feature be sure to include
- a timing (how long does compilation take?)
- information about the code you were compiling.

Then people can follow and agree on your concerns easily :)

(My two cents on this)

Marc Weber

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Marcelo de Moraes Serpa
I'm not requesting any feature. These are just ideas :) 

On Tue, Jul 26, 2011 at 1:36 PM, Marc Weber <[hidden email]> wrote:
Excerpts from Marcelo de Moraes Serpa's message of Tue Jul 26 19:46:51 +0200 2011:
> Wild ideas.. :)
Get started. Then continue talking making suggestions.

I've setup Vim to run HaXe compiler. Thus there is no difference whether
I safe the file and reload it in ruby (don't know how to do that ..)
or whether I just run a test case written in HaXe.

And the next time when you request a "fast" feature be sure to include
- a timing (how long does compilation take?)
- information about the code you were compiling.

Then people can follow and agree on your concerns easily :)

(My two cents on this)

Marc Weber

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Nicolas Cannasse
In reply to this post by Marcelo de Moraes Serpa
Le 26/07/2011 19:46, Marcelo de Moraes Serpa a écrit :
> Hey!
>
> I didn't know about REPL. I think this would be pretty cool. Like a
> simulated haXe env that is not the end target yet, but allows you to
> inspect the the objects.

This is already how the internal macro system works. It "interprets"
haXe/Neko code. You can try it by writing a class and run it with :

haxe --macro MyClass.myMethod()

Another possibility is to use -x, which will compile to neko and run it
afterwards :

haxe -x MyClass

(call MyClass.main())

Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe interpreter / VM ?

Marcelo de Moraes Serpa
Ah, very nice and powerful stuff. Thanks Nicolas.

On Tue, Jul 26, 2011 at 2:17 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 26/07/2011 19:46, Marcelo de Moraes Serpa a écrit :

Hey!

I didn't know about REPL. I think this would be pretty cool. Like a
simulated haXe env that is not the end target yet, but allows you to
inspect the the objects.

This is already how the internal macro system works. It "interprets" haXe/Neko code. You can try it by writing a class and run it with :

haxe --macro MyClass.myMethod()

Another possibility is to use -x, which will compile to neko and run it afterwards :

haxe -x MyClass

(call MyClass.main())

Nicolas

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org