Re: [elm-discuss] State of Elm Survey 2017 is live

2017-01-18 Thread Martin DeMello
the survey seemed overly focused on people whose day job was web development. i'm guessing a significant fraction of the elm community are people developing side projects. martin On Wed, Jan 18, 2017 at 10:28 AM, Brian Hicks wrote: > The State of Elm Survey is live.

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

2017-01-04 Thread Martin DeMello
I would argue very strongly against killing elm-discuss. I'm a heavy reddit user, and I think it simply lacks the features necessary to support mailing-list-style discussions: 1. if you subscribe to a lot of subreddits, there is no guarantee you'll be shown new posts from /r/elm in your front

Re: [elm-discuss] Separate files for type declarations and code

2016-12-31 Thread Martin DeMello
I do the same thing in both ocaml and elm code. It's a pretty common pattern. martin On Dec 31, 2016 3:29 PM, "Brian Marick" wrote: > To avoid circular dependencies, I find myself putting type declarations in > one file: > > > module Animals.Pages.Declare exposing (..) > >

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

2016-12-31 Thread Martin DeMello
Bucklescript's codegen looks really nice. Does it have any convenient way of working with the DOM and generating HTML/SVG? I looked through the docs and it seemed focused on writing javascript libraries rather than UI code. martin On Sat, Dec 31, 2016 at 8:09 AM, Bob Zhang

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

2016-12-28 Thread Martin DeMello
On Wed, Dec 28, 2016 at 6:25 PM, GordonBGood wrote: > > > Related to speed, it seems to me that the working Fable (F#) code linked > from your link above is more responsive than the working Elm code from > another link on that page, both for the same sample application; am

Re: [elm-discuss] Re: Upgrading to 0.18 and elm-webpack-starter

2016-12-22 Thread Martin DeMello
I've never had webpack file watching work robustly for me. I finally just bound a vim hotkey to "touch Main.elm" which was an adequate workaround. martin On Thu, Dec 22, 2016 at 9:50 AM, Simon wrote: > I just updated my skeleton app using webpack to 0.18. There was a bug in

Re: [elm-discuss] Re: Unpublishing a package

2016-11-22 Thread Martin DeMello
It's not a question of being antisocial or uncivilised; it's that it is really hard to say "I just want to patch this for 0.18 and continue using it in my project" without having globally visible effects. It is unreasonable to expect someone to wait for the package maintainer to do the update and

Re: [elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Martin DeMello
t and I am strongly biased toward > statically typed PLs but I suppose I'll have to sort out whether or not it > gets over the "helps them get an opportunity" bar. Is it really reasonably > mainstream? I'll look into it. Thank you for the suggestion. > Bob > > > On Mon

Re: [elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Martin DeMello
How about teaching it in typescript + react? Typescript is way better than vanilla javascript, while still being reasonably mainstream and not too different-looking. martin On Mon, Nov 21, 2016 at 3:23 PM, Robert Muller wrote: > I'm teaching a full-semester course on

Re: [elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Martin DeMello
I like Some and None, plus it'd be consistent with ocaml martin On Sun, Nov 20, 2016 at 3:41 PM, Robin Heggelund Hansen < skinney...@gmail.com> wrote: > How about 'Some' and 'None'? > Those are not longer to type than what we have today, and they should > solve your initial confusion. > > >

[elm-discuss] dependency problem with upgrading to 0.18

2016-11-17 Thread Martin DeMello
elm-update ran successfully, but elm-make fails with $ elm-make Problem in dependency tortus/elm-array-2d 2.0.1 The elm-package.json constraints of 'tortus/elm-array-2d' are probably letting too much stuff through. Definitely open an issue on the relevant github repo to get this fixed and save

Re: [elm-discuss] Re: using a compile-to-js workflow with elm-webpack-starter

2016-11-11 Thread Martin DeMello
Thanks, that helped me get everything working! I think this would be useful to add to the docs somewhere (either in elm-webpack-starter or in the elm tutorial itself, since it does mention webpack elsewhere). martin On Tue, Nov 8, 2016 at 3:54 AM, Wouter In t Velt

[elm-discuss] Re: using a compile-to-js workflow with elm-webpack-starter

2016-11-07 Thread Martin DeMello
No one? If the recommended solution is to move off webpack (plus pointers to a replacement) that's fine too; I would just like to get my dev environment set up once and for all and then go back to writing elm code. martin On Sat, Nov 5, 2016 at 5:31 PM, Martin DeMello <martindeme...@gmail.

[elm-discuss] using a compile-to-js workflow with elm-webpack-starter

2016-11-05 Thread Martin DeMello
I have my project set up with elm-webpack-starter, which installs a boilerplate index.html and index.js https://github.com/moarwick/elm-webpack-starter/tree/master/src/static I'm now trying to follow the ports guide http://guide.elm-lang.org/interop/javascript.html which says to compile elm to

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

2016-11-05 Thread Martin DeMello
Seconding this one - I need to be able to pass a binary file to my backend, which requires the ability to both load the file and attach binary data to a POST request. martin On Wed, Oct 19, 2016 at 2:53 AM, Simon wrote: > My need is to upload PDFs directly to S3. That

Re: [elm-discuss] Send a file via an ajax POST request

2016-11-05 Thread Martin DeMello
Thanks, I took a look at that, but it loads the file data into elm, where we still have the problem that we cannot attach a binary blob to a POST request. I'm not fully sure, but I think the flow needs to be: 1. Get filename from the input button, in elm. 2. Pass filename to javascript 3. Upload

Re: [elm-discuss] Re: Newbie - which build tool

2016-10-28 Thread Martin DeMello
On Fri, Oct 28, 2016 at 6:36 AM, Wouter In t Velt wrote: > > Don't know anything about Ieiningen or Clojure, but I am a content user of > elm-webpack-starter , > for bundling, hot reload, and sass-to-css. > Mine is just 1

Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-20 Thread Martin DeMello
I would be strongly opposed to renaming either foldl or foldr to just fold; that always confuses me when languages do it. martin On Thu, Oct 20, 2016 at 8:32 AM, Max Goldstein wrote: > Normally I'm opposed to syntax or name changes. But I think this or some > variation

Re: [elm-discuss] why no more primes on 0.18 ?

2016-10-19 Thread Martin DeMello
Agreed; I'll definitely miss being able to use primes in variable names! martin On Tue, Oct 18, 2016 at 6:28 PM, mbr wrote: > just learned that primes and backticks won't be on elm 0.18. > > What are the reason for their removal? > > I will miss the primes quite a bit. Am

Re: [elm-discuss] Re: List.filter -> List.keep?

2016-10-18 Thread Martin DeMello
I like ruby's "select" and "reject", for precisely the same reason. martin On Tue, Oct 18, 2016 at 1:39 PM, Kasey Speakman wrote: > I believe filter is a pretty standard name for this. Even Javascript has > Array.filter >

Re: [elm-discuss] Re: Why does this not work via record intersection

2016-10-09 Thread Martin DeMello
thanks! now that i know the answer i can see that it was in the docs under "extensible records", but it was indeed non-obvious. martin On Sun, Oct 9, 2016 at 9:09 PM, Max Goldstein wrote: > You need a rather non-obvious piece of syntax: > > make_xword : { a | rows :

[elm-discuss] Why does this not work via record intersection

2016-10-09 Thread Martin DeMello
If I have the following: make_xword : { rows : Int, cols : Int } -> Xword import Xword exposing (Xword, make_xword) type alias InCell = { x : Int , y : Int , contents : String } type alias InXword = { rows : Int , cols : Int , cells : List InCell } to_xword : InXword -> Xword

Re: [elm-discuss] Re: Which text editor do you prefer for Elm?

2016-10-04 Thread Martin DeMello
The top two features I look for in a code editor are vim emulation and autoindentation - how does vscode hold up in those areas? martin On Tue, Oct 4, 2016 at 5:07 AM, Ed Ilyin wrote: > BTW, vscode is now gaining popularity (even among Google employees) for > its

Re: [elm-discuss] How to sell Elm to your client / boss

2016-09-29 Thread Martin DeMello
I think the best way to sell elm to your client/boss is to point to a reasonably large scale project you have done in elm, and talk about your experiences with it. Another alternative is to talk about the benefits you gained from integrating small bits of elm into a larger project. I'd be wary of

[elm-discuss] interop between elm and js-of-ocaml/f# in the browser

2016-09-27 Thread Martin DeMello
Has anyone done work on serialising/deserialising data to share between elm and js code generated from ocaml or f#? Json does not seem like the optimal way to do it, because there's an impedance mismatch between the datatypes in both languages. I tried googling around for serialisation formats

Re: [elm-discuss] Re: pattern matching on a field within a record

2016-09-25 Thread Martin DeMello
On Sat, Sep 24, 2016 at 9:11 PM, Nick H wrote: > > Regarding null_square: If you want to make sure that null_square is passed > by reference, you can define it as a top-level value. (That said, the > record is so small, I doubt it would make a noticeable performance >

Re: [elm-discuss] Re: pattern matching on a field within a record

2016-09-24 Thread Martin DeMello
> > case c of > Just (Letter s) -> > s > _ -> "" > > > > On Friday, 23 September 2016 03:50:19 UTC+2, Martin DeMello wrote: >> >> If I have the following code: >> >> type Cell = Empty | Letter String >> >> t

[elm-discuss] pattern matching on a field within a record

2016-09-22 Thread Martin DeMello
If I have the following code: type Cell = Empty | Letter String type alias Square = { cell : Cell , num : Int } and c : Maybe Square, can I do the following in a single match? case c of Just { cell } -> case cell of Letter s -> s _ -> "" _ -> "" that is,