off-topic question: why invent new Haskell-like compile-to-js functional languages when we have awesome js_of_ocaml ?

Hi all, Sorry for off-topic question, I'm asking this question here because as Haskell community we invent lots of new Haskell-like(sometimes a subset of Haskell like Fay, sometimes different languages with Haskell syntax and Haskell-like features like Elm and recent language with row polymorphic records -- I don't remember it's name) languages. What I'm wondering is that js_of_ocaml project looks like solving all problems we have. It's supports 100% of OCaml(it translates OCaml bytecode), and OCaml is arguably better than all languages we invented(awesome module system, records, strict by default, all OCaml libraries(except FFI ones) work, like functional data structures, parser generators etc.) (I'm assuming we won't have JS backend for GHC anytime soon) So in short, I don't understand why use Haskell like compile-to-js languages instead of js_of_ocaml (other than learning purposes -- JS may be a nice high-level target language to practice writing compilers etc.) Please note that I'm not using any compile-to-js languages in my work, so I may not be able to make a fair comparison, but to me all other compile-to-js langauges look worse after seeing js_of_ocaml. Of course, if I had a JS backend for GHC(which would mean compiling Haskell to JS with all extensions) it would be best solution, but for now I think js_of_ocaml is superior to all other solutions. I'm wondering your opinions about this. Thanks, --- Ömer Sinan Ağacan http://osa1.net

(I'm assuming we won't have JS backend for GHC anytime soon)
You would be somewhat mistaken. https://github.com/ghcjs/ghcjs Just
beware of compiling huge packages with it.
On Mon, Nov 11, 2013 at 11:28 AM, Ömer Sinan Ağacan
Hi all,
Sorry for off-topic question, I'm asking this question here because as Haskell community we invent lots of new Haskell-like(sometimes a subset of Haskell like Fay, sometimes different languages with Haskell syntax and Haskell-like features like Elm and recent language with row polymorphic records -- I don't remember it's name) languages. What I'm wondering is that js_of_ocaml project looks like solving all problems we have. It's supports 100% of OCaml(it translates OCaml bytecode), and OCaml is arguably better than all languages we invented(awesome module system, records, strict by default, all OCaml libraries(except FFI ones) work, like functional data structures, parser generators etc.)
(I'm assuming we won't have JS backend for GHC anytime soon)
So in short, I don't understand why use Haskell like compile-to-js languages instead of js_of_ocaml (other than learning purposes -- JS may be a nice high-level target language to practice writing compilers etc.)
Please note that I'm not using any compile-to-js languages in my work, so I may not be able to make a fair comparison, but to me all other compile-to-js langauges look worse after seeing js_of_ocaml. Of course, if I had a JS backend for GHC(which would mean compiling Haskell to JS with all extensions) it would be best solution, but for now I think js_of_ocaml is superior to all other solutions.
I'm wondering your opinions about this.
Thanks,
--- Ömer Sinan Ağacan http://osa1.net _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I'm aware of this, but when I first tried it a few months ago, it was
not easy to use at all. Is it changed now?
---
Ömer Sinan Ağacan
http://osa1.net
2013/11/11 Charlie Paul
(I'm assuming we won't have JS backend for GHC anytime soon)
You would be somewhat mistaken. Just beware of compiling huge packages with it.
On Mon, Nov 11, 2013 at 11:28 AM, Ömer Sinan Ağacan
wrote: Hi all,
Sorry for off-topic question, I'm asking this question here because as Haskell community we invent lots of new Haskell-like(sometimes a subset of Haskell like Fay, sometimes different languages with Haskell syntax and Haskell-like features like Elm and recent language with row polymorphic records -- I don't remember it's name) languages. What I'm wondering is that js_of_ocaml project looks like solving all problems we have. It's supports 100% of OCaml(it translates OCaml bytecode), and OCaml is arguably better than all languages we invented(awesome module system, records, strict by default, all OCaml libraries(except FFI ones) work, like functional data structures, parser generators etc.)
(I'm assuming we won't have JS backend for GHC anytime soon)
So in short, I don't understand why use Haskell like compile-to-js languages instead of js_of_ocaml (other than learning purposes -- JS may be a nice high-level target language to practice writing compilers etc.)
Please note that I'm not using any compile-to-js languages in my work, so I may not be able to make a fair comparison, but to me all other compile-to-js langauges look worse after seeing js_of_ocaml. Of course, if I had a JS backend for GHC(which would mean compiling Haskell to JS with all extensions) it would be best solution, but for now I think js_of_ocaml is superior to all other solutions.
I'm wondering your opinions about this.
Thanks,
--- Ömer Sinan Ağacan http://osa1.net _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I tried it about a month ago, and the vagrant install method was easy and
straightforward, if slow. They plan to cabalize it as well.
On Mon, Nov 11, 2013 at 11:32 AM, Ömer Sinan Ağacan
I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
--- Ömer Sinan Ağacan http://osa1.net
2013/11/11 Charlie Paul
: (I'm assuming we won't have JS backend for GHC anytime soon)
You would be somewhat mistaken. Just beware of compiling huge packages with it.
On Mon, Nov 11, 2013 at 11:28 AM, Ömer Sinan Ağacan < omeragacan@gmail.com> wrote:
Hi all,
Sorry for off-topic question, I'm asking this question here because as Haskell community we invent lots of new Haskell-like(sometimes a subset of Haskell like Fay, sometimes different languages with Haskell syntax and Haskell-like features like Elm and recent language with row polymorphic records -- I don't remember it's name) languages. What I'm wondering is that js_of_ocaml project looks like solving all problems we have. It's supports 100% of OCaml(it translates OCaml bytecode), and OCaml is arguably better than all languages we invented(awesome module system, records, strict by default, all OCaml libraries(except FFI ones) work, like functional data structures, parser generators etc.)
(I'm assuming we won't have JS backend for GHC anytime soon)
So in short, I don't understand why use Haskell like compile-to-js languages instead of js_of_ocaml (other than learning purposes -- JS may be a nice high-level target language to practice writing compilers etc.)
Please note that I'm not using any compile-to-js languages in my work, so I may not be able to make a fair comparison, but to me all other compile-to-js langauges look worse after seeing js_of_ocaml. Of course, if I had a JS backend for GHC(which would mean compiling Haskell to JS with all extensions) it would be best solution, but for now I think js_of_ocaml is superior to all other solutions.
I'm wondering your opinions about this.
Thanks,
--- Ömer Sinan Ağacan http://osa1.net _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Nov 11, 2013 at 2:32 PM, Ömer Sinan Ağacan
I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
The biggest bump in usability will come from it not being just in HEAD with everything about building it that that implies. (next release of GHC will have it) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

yup! i'm very excited about GHCJS once the 7.8 GHC lands :)
On Mon, Nov 11, 2013 at 2:37 PM, Brandon Allbery
On Mon, Nov 11, 2013 at 2:32 PM, Ömer Sinan Ağacan
wrote: I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
The biggest bump in usability will come from it not being just in HEAD with everything about building it that that implies. (next release of GHC will have it)
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though. - jeremy

On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
wrote: I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct. The easiest way to install and use it right now is using their Vagrant setup: http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...

That's great news. I wonder if that means it'll be end for Fay and
similar languages?
---
Ömer Sinan Ağacan
http://osa1.net
2013/11/12 Patrick Mylund Nielsen
On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
wrote: I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup: http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...

thats up to the users :)
that said, having full ghc haskell to target JS will be pretty amazing :)
On Tue, Nov 12, 2013 at 3:24 PM, Ömer Sinan Ağacan
That's great news. I wonder if that means it'll be end for Fay and similar languages?
--- Ömer Sinan Ağacan http://osa1.net
2013/11/12 Patrick Mylund Nielsen
: On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan <
omeragacan@gmail.com>
wrote:
I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup:
http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren... _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Tue, Nov 12, 2013 at 3:24 PM, Ömer Sinan Ağacan
That's great news. I wonder if that means it'll be end for Fay and similar languages?
On Tue, Nov 12, 2013 at 12:33 PM, Carter Schonwald < carter.schonwald@gmail.com> wrote:
that said, having full ghc haskell to target JS will be pretty amazing :)
I think the biggest determiner, by far, is ease of integration and deployment. Integration means things like how can I use this with a web page, full other other bits in JS (like google analytics, and FB plug-ins), and access jQuery. Deployment means things like how easily I can edit, and then see that code run *in situ.* These things, more than language completeness, will determine what succeeds. (viz. PHP!) - Mark

Ömer Sinan Ağacan
That's great news. I wonder if that means it'll be end for Fay and similar languages?
GHCJS's Hello World is 2.1M worth of javascript (well, that's how it was several month ago, maybe it's better now?). And even google closure compiled with advanced optimizations it's ~500K. Fay's output is 5K after google-closure-mumbo-jumbo.
2013/11/12 Patrick Mylund Nielsen
: On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
wrote: I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup: http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...
-- lelf

church% hastec --version
0.2.9
church% cat > Hello.hs
module Main where
main = print "Hello world."
church% hastec --opt-google-closure --start=asap Hello.hs
Compiling Main into .
Linking Hello.js
Linking Main
Linking GHC.IO.Handle.Text
Linking Haste.Handle
Linking GHC.Tuple
Linking GHC.Types
Linking GHC.Show
Linking GHC.List
Linking GHC.Base
Linking GHC.IO
Running the Google Closure compiler on Hello.js...
church% nodejs Hello.js
"Hello world."
Hello.js 5750 Bytes (46746 bytes without google closure).
On Wed, Nov 13, 2013 at 3:56 PM, Anton Nikishaev
Ömer Sinan Ağacan
writes: That's great news. I wonder if that means it'll be end for Fay and similar languages?
GHCJS's Hello World is 2.1M worth of javascript (well, that's how it was several month ago, maybe it's better now?). And even google closure compiled with advanced optimizations it's ~500K.
Fay's output is 5K after google-closure-mumbo-jumbo.
2013/11/12 Patrick Mylund Nielsen
: On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan <
omeragacan@gmail.com>
wrote:
I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup:
http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...
-- lelf
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Anyone tried this same test on GHCJS?
---
Ömer Sinan Ağacan
http://osa1.net
2013/11/13 Aycan iRiCAN
church% hastec --version 0.2.9
church% cat > Hello.hs module Main where main = print "Hello world."
church% hastec --opt-google-closure --start=asap Hello.hs Compiling Main into . Linking Hello.js Linking Main Linking GHC.IO.Handle.Text Linking Haste.Handle Linking GHC.Tuple Linking GHC.Types Linking GHC.Show Linking GHC.List Linking GHC.Base Linking GHC.IO Running the Google Closure compiler on Hello.js...
church% nodejs Hello.js "Hello world."
Hello.js 5750 Bytes (46746 bytes without google closure).
On Wed, Nov 13, 2013 at 3:56 PM, Anton Nikishaev
wrote: Ömer Sinan Ağacan
writes: That's great news. I wonder if that means it'll be end for Fay and similar languages?
GHCJS's Hello World is 2.1M worth of javascript (well, that's how it was several month ago, maybe it's better now?). And even google closure compiled with advanced optimizations it's ~500K.
Fay's output is 5K after google-closure-mumbo-jumbo.
2013/11/12 Patrick Mylund Nielsen
: On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
wrote: I'm aware of this, but when I first tried it a few months ago, it was not easy to use at all. Is it changed now?
Last I heard, Luite was waiting for GHC 7.8 to be released because it contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup:
http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...
-- lelf
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- http://www.google.com/profiles/iricanaycan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Wed, Nov 13, 2013 at 3:18 PM, Ömer Sinan Ağacan
Anyone tried this same test on GHCJS?
I'm definitely interested in seeing the same, but for a recent version of GHCJS, too. Personally, I think Fay is great, size- and API-wise for when what you're making is a "script." When you're making a big/real application, I prefer a more complete API, and I find that the initial payload size is negligible in these cases.
2013/11/13 Aycan iRiCAN
: church% hastec --version 0.2.9
church% cat > Hello.hs module Main where main = print "Hello world."
church% hastec --opt-google-closure --start=asap Hello.hs Compiling Main into . Linking Hello.js Linking Main Linking GHC.IO.Handle.Text Linking Haste.Handle Linking GHC.Tuple Linking GHC.Types Linking GHC.Show Linking GHC.List Linking GHC.Base Linking GHC.IO Running the Google Closure compiler on Hello.js...
church% nodejs Hello.js "Hello world."
Hello.js 5750 Bytes (46746 bytes without google closure).
On Wed, Nov 13, 2013 at 3:56 PM, Anton Nikishaev
wrote: Ömer Sinan Ağacan
writes: That's great news. I wonder if that means it'll be end for Fay and similar languages?
GHCJS's Hello World is 2.1M worth of javascript (well, that's how it was several month ago, maybe it's better now?). And even google closure compiled with advanced optimizations it's ~500K.
Fay's output is 5K after google-closure-mumbo-jumbo.
2013/11/12 Patrick Mylund Nielsen
: On Tue, Nov 12, 2013 at 12:24 PM, Jeremy Shaw
wrote: On Mon, Nov 11, 2013 at 1:32 PM, Ömer Sinan Ağacan
wrote: > I'm aware of this, but when I first tried it a few months ago, it > was > not easy to use at all. Is it changed now? Last I heard, Luite was waiting for GHC 7.8 to be released because
it
contains changes that will allow him to upload ghcjs to hackage and then you will be able to just cabal install it. I could be wrong though.
As far as I know, that's correct.
The easiest way to install and use it right now is using their Vagrant setup:
http://www.reddit.com/r/haskell/comments/1fvv5q/ghcjs_introduction_concurren...
-- lelf
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- http://www.google.com/profiles/iricanaycan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (9)
-
Anton Nikishaev
-
Aycan iRiCAN
-
Brandon Allbery
-
Carter Schonwald
-
Charlie Paul
-
Jeremy Shaw
-
Mark Lentczner
-
Patrick Mylund Nielsen
-
Ömer Sinan Ağacan