Re: [elm-discuss] Super-unimportant request for Google Closure Compiler.js compatibility

2017-01-26 Thread Peter Damoc
You need the --assume_function_wrapper flag. Also, if you have more troubles you could also drop the compilation level to SIMPLE. The difference should be no larger than few kb in gzipped form. It is worth mentioning that at such small sizes, even the unminified output gzips to very tiny sizes. I

Re: [elm-discuss] Build iOS apps with Elm

2017-01-26 Thread Rudolf Adamkovič
Thank you and sorry for the second message. I thought I forgot to click “Submit”. Have a nice, nice day! R+ > On 26 Jan 2017, at 04:46, Duane Johnson wrote: > > (Note from list admin: Rudolf, I didn't approve your second message because > it seemed like a duplicate attempt. We've had problem

[elm-discuss] Re: Html.Attributes.none

2017-01-26 Thread 'Rupert Smith' via Elm Discuss
On Thursday, January 26, 2017 at 3:45:24 AM UTC, Robert Lee wrote: > > The following fits in good enough for me. > > filterDiv : List (Maybe (H.Attribute msg)) -> List (Maybe (H.Html msg)) -> > H.Html msg > filterDiv a n = > H.div (List.filterMap identity a) (List.filterMap identity n) > Yes,

Re: [elm-discuss] Super-unimportant request for Google Closure Compiler.js compatibility

2017-01-26 Thread Ahmed Fasih
On Thursday, January 26, 2017 at 3:30:25 AM UTC-5, Peter Damoc wrote: > > You need the --assume_function_wrapper flag. > Thank you Peter!!! That was all that was necessary, no need for the compiler to emit anything special. I updated the build script and am proceeding happily. I am hearing wh

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Robin Heggelund Hansen
I was mostly talking about size. I know Closure very well, and I'm well aware of what code must look like in order to get the most out of advanced opts. The way Elm is compiled makes it easy for uglify to get the same results in mangling and dead-code elimination, but of course it won't do inli

Re: [elm-discuss] Super-unimportant request for Google Closure Compiler.js compatibility

2017-01-26 Thread Robin Heggelund Hansen
Advanced opts won't work with Elm. Check https://github.com/elm-lang/core/pull/734 Also, I'm surprised that uglify gives so bad results. As you can see in the PR, my results didn't show that big a difference. torsdag 26. januar 2017 12.53.31 UTC+1 skrev Ahmed Fasih følgende: > > On Thursday, Jan

Re: [elm-discuss] Super-unimportant request for Google Closure Compiler.js compatibility

2017-01-26 Thread Ahmed Fasih
On Thursday, January 26, 2017 at 7:43:13 AM UTC-5, Robin Heggelund Hansen wrote: > > Advanced opts won't work with Elm. Check > https://github.com/elm-lang/core/pull/734 > Also, I'm surprised that uglify gives so bad results. As you can see in > the PR, my results didn't show that big a differen

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
Hmm, compare uglify with google closure is really misleading .. ( I am not a fan of google or even remotely close, but as a compiler engineer , we should respect basic facts) On Thu, Jan 26, 2017 at 7:37 AM Robin Heggelund Hansen wrote: > I was mostly talking about size. I know Closure very well,

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
Hi Gordon, I think it is inappropriate to discuss BuckleScript performances on this mailing list (people may feel unhappy about this), if you are interested, we can discuss on BuckleScript github issues(I will create a mailing list too). A minor comment: > As Elm does not have mutable linear arr

[elm-discuss] Module / Payload Splitting - Such a thing?

2017-01-26 Thread Dave Rapin
We're using Elm in a smallish piece of a production application and are evaluating whether we use it for the entire app. One thing we find invaluable w/ JS frameworks like React or what have you, is that we can package our source separate from the React library. Doesn't matter too much on small

Re: [elm-discuss] Module / Payload Splitting - Such a thing?

2017-01-26 Thread Peter Damoc
On Thu, Jan 26, 2017 at 5:00 PM, Dave Rapin wrote: > Just wondering if there's a good approach for this in Elm? Is there a way > to split framework code & app code, or are we stuck with adding 100k to our > payload every time we iterate? > > This is being worked on right now and something will be

Re: [elm-discuss] Module / Payload Splitting - Such a thing?

2017-01-26 Thread Dave Rapin
Great news. Thanks for the quick response Peter. Amazing community! On Thursday, January 26, 2017 at 10:25:14 AM UTC-5, Peter Damoc wrote: > > On Thu, Jan 26, 2017 at 5:00 PM, Dave Rapin > > wrote: > >> Just wondering if there's a good approach for this in Elm? Is there a way >> to split framewo

[elm-discuss] Using Elm on the server (full stack Elm webapps )

2017-01-26 Thread Peter Damoc
Hello community, I thought that using elm on the backend would be hard but it turns out that it is easy. I took the websockets example and turned it into a stand alone webapp. https://github.com/pdamoc/elm-sapling The approach that I used is to describe an API between the client and the server.

[elm-discuss] Re: Using Elm on the server (full stack Elm webapps )

2017-01-26 Thread 'Rupert Smith' via Elm Discuss
On Thursday, January 26, 2017 at 3:47:12 PM UTC, Peter Damoc wrote: > > I took the websockets example and turned it into a stand alone webapp. > https://github.com/pdamoc/elm-sapling > I see, as websockets are symetrical in the sense of being the same on client and server side, they make this ea

Re: [elm-discuss] Re: Using Elm on the server (full stack Elm webapps )

2017-01-26 Thread Peter Damoc
On Thu, Jan 26, 2017 at 6:40 PM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > Still, its a long way from there to a full stack... > > Every journey has to start somewhere. Can you share a set of requirements for a full-stack? Like, how would a checklist for your must hav

Re: [elm-discuss] Using Elm on the server (full stack Elm webapps )

2017-01-26 Thread Noah Hall
I've already done this. Full stack elm is not a feasable option right now. You can use elm to drive your logic if you want but the amount of boilerplate and overhead from the runtime make it inefficent for a server. For full stack elm, with the server code in elm, youll find yoyrself fighting nodem

Re: [elm-discuss] Using Elm on the server (full stack Elm webapps )

2017-01-26 Thread Peter Damoc
Hi Noah, I have read the readme but I don't understand what happen. Can you give more details about what were the actual challenges encountered? Alternatively, can you provide a small challenge that would get someone trying to implement it in the same troubles? I'm thinking that maybe if more o

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread GordonBGood
On Thursday, 26 January 2017 21:13:33 UTC+7, Bob Zhang wrote: > > Hi Gordon, > I think it is inappropriate to discuss BuckleScript performances on this > mailing list (people may feel unhappy about this), if you are interested, > we can discuss on BuckleScript github issues(I will create a mail

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
As I said, you already get convinced elm is better for you, then happy coding in elm. I am not interested in a biased judgement. On Thu, Jan 26, 2017 at 7:29 PM GordonBGood wrote: > On Thursday, 26 January 2017 21:13:33 UTC+7, Bob Zhang wrote: > > Hi Gordon, > I think it is inappropriate to disc

[elm-discuss] Convert Char to Int?

2017-01-26 Thread Duane Johnson
Big picture: I'm writing a visual display algorithm of a binary ".hex" file that is the result of compiling code on the Arduino platform. I load the file into the browser via HTTP.getString, and then attempt to display the values. Problem: I'm unable to find a way to represent this binary data s

Re: [elm-discuss] Re: Support for binary data

2017-01-26 Thread Duane Johnson
My use case: I have a compiled microcontroller file (a ".hex" file) delivered to the client browser. I use the data to draw a fancy SVG barcode that is subsequently displayed on the screen and scanned by a camera (like a QR Code). I need a way to retrieve binary data from the server, and iter

Re: [elm-discuss] Re: Emphasizing /r/elm more

2017-01-26 Thread Gage Peterson
Totally agree. Reddit here I come. Also, I feel we really need to treat Evan like the awesome leader he is. Give the guy a break. He's making one of the best languages I've ever used. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubsc

Re: [elm-discuss] Convert Char to Int?

2017-01-26 Thread Peter Damoc
On Fri, Jan 27, 2017 at 5:54 AM, Duane Johnson wrote: > Char.toCode and Char.fromCode seem specifically tuned for use with > keyboard events. > What does this mean? KeyCode is an alias to Int so, at least in theory, you should have the actual Int value of the Char. What happens if you display th