Would it be possible to compile Haxe in the browser?

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

Would it be possible to compile Haxe in the browser?

singmajesty
Hi everyone,

I just wanted to brainstorm -- what if someone was going to create a  
browser plugin or extension that made it possible to visit a "webpage"  
written in Haxe, and have it compiled to Javascript on the fly,  
client-side?

Would that work? Would there be any pitfalls or gotchas? I'd love to hear  
your thoughts.

This could be an interesting tool, if possible, for Javascript developers

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

Re: Would it be possible to compile Haxe in the browser?

Blue Sans douze
So one could possibly live-edit its code and see changes ?

Is there a real need for that, since haXe compiler is lightning-fast ?
Blue112

2011/10/10 Joshua Granick <[hidden email]>
Hi everyone,

I just wanted to brainstorm -- what if someone was going to create a browser plugin or extension that made it possible to visit a "webpage" written in Haxe, and have it compiled to Javascript on the fly, client-side?

Would that work? Would there be any pitfalls or gotchas? I'd love to hear your thoughts.

This could be an interesting tool, if possible, for Javascript developers

--
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: Would it be possible to compile Haxe in the browser?

rammserker
And what about hscript? You can bind it and make live changes, making a JS generator based in hscript. There is an already made library that compiles hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...

Sometime ago we were speaking about the possible bootstrapping of the haXe compiler and its implications, and it's not an easy task. It you're thinking about the possibility of making a bootstrapped haXe compiler working right in browser (in JS, Flash or whatever) you're not alone ;)

Max
0 1 0 | 0 0 1 | 1 1 1


On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze <[hidden email]> wrote:
So one could possibly live-edit its code and see changes ?

Is there a real need for that, since haXe compiler is lightning-fast ?
Blue112


2011/10/10 Joshua Granick <[hidden email]>
Hi everyone,

I just wanted to brainstorm -- what if someone was going to create a browser plugin or extension that made it possible to visit a "webpage" written in Haxe, and have it compiled to Javascript on the fly, client-side?

Would that work? Would there be any pitfalls or gotchas? I'd love to hear your thoughts.

This could be an interesting tool, if possible, for Javascript developers

--
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: Would it be possible to compile Haxe in the browser?

singmajesty
One of the things I just learned (thanks Philippe!) that helps alleviate  
this need is "nekotools server" ... wish I had known about it before :)

I could link "nekotools server" to a build process, so the directory where  
your Haxe code is compiled will instantly be available over a local  
server. Such a cool idea.

Being able to do it with a remote server might also be cool, however




On Mon, 10 Oct 2011 09:24:11 -0700, Maximiliano Fernández  
<[hidden email]> wrote:

> And what about hscript? You can bind it and make live changes, making a  
> JS
> generator based in hscript. There is an already made library that  
> compiles
> hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...
>
> Sometime ago we were speaking about the possible bootstrapping of the  
> haXe
> compiler and its implications, and it's not an easy task. It you're  
> thinking
> about the possibility of making a bootstrapped haXe compiler working  
> right
> in browser (in JS, Flash or whatever) you're not alone ;)
>
> Max
> 0 1 0 | 0 0 1 | 1 1 1
>
>
> On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze  
> <[hidden email]>wrote:
>
>> So one could possibly live-edit its code and see changes ?
>>
>> Is there a real need for that, since haXe compiler is lightning-fast ?
>> Blue112
>>
>>
>> 2011/10/10 Joshua Granick <[hidden email]>
>>
>>> Hi everyone,
>>>
>>> I just wanted to brainstorm -- what if someone was going to create a
>>> browser plugin or extension that made it possible to visit a "webpage"
>>> written in Haxe, and have it compiled to Javascript on the fly,  
>>> client-side?
>>>
>>> Would that work? Would there be any pitfalls or gotchas? I'd love to  
>>> hear
>>> your thoughts.
>>>
>>> This could be an interesting tool, if possible, for Javascript  
>>> developers
>>>
>>> --
>>> 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: Would it be possible to compile Haxe in the browser?

rammserker
Ohh... I see your point, sorry. That could be great! An haxe compiler just in the browser... That's great! +1

Max
0 1 0 | 0 0 1 | 1 1 1



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

Re: Would it be possible to compile Haxe in the browser?

alx
In reply to this post by singmajesty
It would be nice, also given that the "haXe compiler is lightning-fast" it wouldn't require a lot of resources.

On Mon, Oct 10, 2011 at 11:29 AM, Joshua Granick <[hidden email]> wrote:
One of the things I just learned (thanks Philippe!) that helps alleviate this need is "nekotools server" ... wish I had known about it before :)

I could link "nekotools server" to a build process, so the directory where your Haxe code is compiled will instantly be available over a local server. Such a cool idea.

Being able to do it with a remote server might also be cool, however





On Mon, 10 Oct 2011 09:24:11 -0700, Maximiliano Fernández <[hidden email]> wrote:

And what about hscript? You can bind it and make live changes, making a JS
generator based in hscript. There is an already made library that compiles
hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...

Sometime ago we were speaking about the possible bootstrapping of the haXe
compiler and its implications, and it's not an easy task. It you're thinking
about the possibility of making a bootstrapped haXe compiler working right
in browser (in JS, Flash or whatever) you're not alone ;)

Max
0 1 0 | 0 0 1 | 1 1 1


On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze <[hidden email]>wrote:

So one could possibly live-edit its code and see changes ?

Is there a real need for that, since haXe compiler is lightning-fast ?
Blue112


2011/10/10 Joshua Granick <[hidden email]>

Hi everyone,

I just wanted to brainstorm -- what if someone was going to create a
browser plugin or extension that made it possible to visit a "webpage"
written in Haxe, and have it compiled to Javascript on the fly, client-side?

Would that work? Would there be any pitfalls or gotchas? I'd love to hear
your thoughts.

This could be an interesting tool, if possible, for Javascript developers

--
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


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

Re: Would it be possible to compile Haxe in the browser?

gershon
Kinda related,

Haven't been haxing much lately, but have started fiddling with various parser generators ("compiler-compilers", LL(1\k) mostly...)
Most these generators output their lexers & parsers into various languages - which haxe already does...

So far there's Luca's http://deltaluca.me.uk/
Though its out-dated and from the pre-macro haxe era...

I basically imagine a small DSL cross-compiled to provide only the bare minimum, secure functionally for a dynamically programmed web app.

Cheers, gershon.

On Mon, Oct 10, 2011 at 6:39 PM, alx <[hidden email]> wrote:
It would be nice, also given that the "haXe compiler is lightning-fast" it wouldn't require a lot of resources.

On Mon, Oct 10, 2011 at 11:29 AM, Joshua Granick <[hidden email]> wrote:
One of the things I just learned (thanks Philippe!) that helps alleviate this need is "nekotools server" ... wish I had known about it before :)

I could link "nekotools server" to a build process, so the directory where your Haxe code is compiled will instantly be available over a local server. Such a cool idea.

Being able to do it with a remote server might also be cool, however





On Mon, 10 Oct 2011 09:24:11 -0700, Maximiliano Fernández <[hidden email]> wrote:

And what about hscript? You can bind it and make live changes, making a JS
generator based in hscript. There is an already made library that compiles
hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...

Sometime ago we were speaking about the possible bootstrapping of the haXe
compiler and its implications, and it's not an easy task. It you're thinking
about the possibility of making a bootstrapped haXe compiler working right
in browser (in JS, Flash or whatever) you're not alone ;)

Max
0 1 0 | 0 0 1 | 1 1 1


On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze <[hidden email]>wrote:

So one could possibly live-edit its code and see changes ?

Is there a real need for that, since haXe compiler is lightning-fast ?
Blue112


2011/10/10 Joshua Granick <[hidden email]>

Hi everyone,

I just wanted to brainstorm -- what if someone was going to create a
browser plugin or extension that made it possible to visit a "webpage"
written in Haxe, and have it compiled to Javascript on the fly, client-side?

Would that work? Would there be any pitfalls or gotchas? I'd love to hear
your thoughts.

This could be an interesting tool, if possible, for Javascript developers

--
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


--
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: Would it be possible to compile Haxe in the browser?

Juraj Kirchheim
An LLVM frontend for OCaml should suffice:
https://github.com/kripken/emscripten ... ;-P


On Mon, Oct 10, 2011 at 8:21 PM, gershon <[hidden email]> wrote:

> Kinda related,
>
> Haven't been haxing much lately, but have started fiddling with various
> parser generators ("compiler-compilers", LL(1\k) mostly...)
> Most these generators output their lexers & parsers into various languages -
> which haxe already does...
>
> So far there's Luca's http://deltaluca.me.uk/
> Though its out-dated and from the pre-macro haxe era...
>
> I basically imagine a small DSL cross-compiled to provide only the bare
> minimum, secure functionally for a dynamically programmed web app.
>
> Cheers, gershon.
>
> On Mon, Oct 10, 2011 at 6:39 PM, alx <[hidden email]> wrote:
>>
>> It would be nice, also given that the "haXe compiler is lightning-fast" it
>> wouldn't require a lot of resources.
>> On Mon, Oct 10, 2011 at 11:29 AM, Joshua Granick
>> <[hidden email]> wrote:
>>>
>>> One of the things I just learned (thanks Philippe!) that helps alleviate
>>> this need is "nekotools server" ... wish I had known about it before :)
>>>
>>> I could link "nekotools server" to a build process, so the directory
>>> where your Haxe code is compiled will instantly be available over a local
>>> server. Such a cool idea.
>>>
>>> Being able to do it with a remote server might also be cool, however
>>>
>>>
>>>
>>>
>>> On Mon, 10 Oct 2011 09:24:11 -0700, Maximiliano Fernández
>>> <[hidden email]> wrote:
>>>
>>>> And what about hscript? You can bind it and make live changes, making a
>>>> JS
>>>> generator based in hscript. There is an already made library that
>>>> compiles
>>>> hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...
>>>>
>>>> Sometime ago we were speaking about the possible bootstrapping of the
>>>> haXe
>>>> compiler and its implications, and it's not an easy task. It you're
>>>> thinking
>>>> about the possibility of making a bootstrapped haXe compiler working
>>>> right
>>>> in browser (in JS, Flash or whatever) you're not alone ;)
>>>>
>>>> Max
>>>> 0 1 0 | 0 0 1 | 1 1 1
>>>>
>>>>
>>>> On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze
>>>> <[hidden email]>wrote:
>>>>
>>>>> So one could possibly live-edit its code and see changes ?
>>>>>
>>>>> Is there a real need for that, since haXe compiler is lightning-fast ?
>>>>> Blue112
>>>>>
>>>>>
>>>>> 2011/10/10 Joshua Granick <[hidden email]>
>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> I just wanted to brainstorm -- what if someone was going to create a
>>>>>> browser plugin or extension that made it possible to visit a "webpage"
>>>>>> written in Haxe, and have it compiled to Javascript on the fly,
>>>>>> client-side?
>>>>>>
>>>>>> Would that work? Would there be any pitfalls or gotchas? I'd love to
>>>>>> hear
>>>>>> your thoughts.
>>>>>>
>>>>>> This could be an interesting tool, if possible, for Javascript
>>>>>> developers
>>>>>>
>>>>>> --
>>>>>> 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
>>
>>
>> --
>> 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: Would it be possible to compile Haxe in the browser?

tong-2
In reply to this post by gershon
Some time ago i implemented a remote hscript processor using the
XMPP/LinkedProcessProtocol:
https://github.com/tong/hxmpp.lop
https://github.com/tong/hxmpp/tree/master/jabber/lop

See also:
http://www.internetdagarna.se/track/media/social-computing-or-let-the-bots-talk
http://xmpp.org/extensions/inbox/lop.html

Sadly, i never found time to do something really useful with it.
One thing on my mind was to write a remote haxe compiler for hxcpp to
cross compile for different systems, using computing power of known
entities (buddies in your contact list).

I think the 'push the process to the data' is a great concept, offering
a loooot of possibilities and a great fit for XMPP cause of the builtin
authentication and security model.

/tong


On 10/10/2011 08:21 PM, gershon wrote:

> Kinda related,
>
> Haven't been haxing much lately, but have started fiddling with various
> parser generators ("compiler-compilers", LL(1\k) mostly...)
> Most these generators output their lexers & parsers into various languages -
> which haxe already does...
>
> So far there's Luca's http://deltaluca.me.uk/
> Though its out-dated and from the pre-macro haxe era...
>
> I basically imagine a small DSL cross-compiled to provide only the bare
> minimum, secure functionally for a dynamically programmed web app.
>
> Cheers, gershon.
>
> On Mon, Oct 10, 2011 at 6:39 PM, alx <[hidden email]> wrote:
>
>> It would be nice, also given that the "haXe compiler is lightning-fast" it
>> wouldn't require a lot of resources.
>>
>> On Mon, Oct 10, 2011 at 11:29 AM, Joshua Granick <
>> [hidden email]> wrote:
>>
>>> One of the things I just learned (thanks Philippe!) that helps alleviate
>>> this need is "nekotools server" ... wish I had known about it before :)
>>>
>>> I could link "nekotools server" to a build process, so the directory where
>>> your Haxe code is compiled will instantly be available over a local server.
>>> Such a cool idea.
>>>
>>> Being able to do it with a remote server might also be cool, however
>>>
>>>
>>>
>>>
>>>
>>> On Mon, 10 Oct 2011 09:24:11 -0700, Maximiliano Fernández <
>>> [hidden email]> wrote:
>>>
>>>  And what about hscript? You can bind it and make live changes, making a
>>>> JS
>>>> generator based in hscript. There is an already made library that
>>>> compiles
>>>> hscript to AVM2 bytecode ( fscript in haxelib ). You can tweak it...
>>>>
>>>> Sometime ago we were speaking about the possible bootstrapping of the
>>>> haXe
>>>> compiler and its implications, and it's not an easy task. It you're
>>>> thinking
>>>> about the possibility of making a bootstrapped haXe compiler working
>>>> right
>>>> in browser (in JS, Flash or whatever) you're not alone ;)
>>>>
>>>> Max
>>>> 0 1 0 | 0 0 1 | 1 1 1
>>>>
>>>>
>>>> On Mon, Oct 10, 2011 at 2:13 PM, Blue Sans douze <
>>>> [hidden email]>**wrote:
>>>>
>>>>  So one could possibly live-edit its code and see changes ?
>>>>> Is there a real need for that, since haXe compiler is lightning-fast ?
>>>>> Blue112
>>>>>
>>>>>
>>>>> 2011/10/10 Joshua Granick <[hidden email]>
>>>>>
>>>>>  Hi everyone,
>>>>>> I just wanted to brainstorm -- what if someone was going to create a
>>>>>> browser plugin or extension that made it possible to visit a "webpage"
>>>>>> written in Haxe, and have it compiled to Javascript on the fly,
>>>>>> client-side?
>>>>>>
>>>>>> Would that work? Would there be any pitfalls or gotchas? I'd love to
>>>>>> hear
>>>>>> your thoughts.
>>>>>>
>>>>>> This could be an interesting tool, if possible, for Javascript
>>>>>> developers
>>>>>>
>>>>>> --
>>>>>> 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
>>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>


--
[) | 5 |< † |2 3 3 - http://disktree.net


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