[elm-discuss] Elm Remote Meetup #2 videos, broken out by talk

2016-07-28 Thread Josh Adams
Hey! So this is later than I intended it to be, but I managed to edit the videos for the second Elm Remote Meetup and get them live. You can find them here: - The whole thing: https://www.dailydrip.com/topics/elm-remote-meetup/drips/elm-remote-meetup-2 - Elm Stuff, by Luke Westby:

[elm-discuss] Collecting use cases for File, ArrayBuffer and TypedArrays/DataViews

2016-07-28 Thread Daniel Bachler
I'd love to see support for the File and ArrayBuffer Apis, and maybe TypedArrays/DataViews as well. IMHO they are an important piece of the Web Platform that is still missing in Elm. Evan suggested collecting concrete use cases to guide the design. I would like this thread to be the starting po

Re: [elm-discuss] Re: port module for JS interop.. without main/view ?

2016-07-28 Thread Leroy Campbell
Just to clarify, inbound messages to Elm are batched (enqueued) and then executed on nextTick. And to echo Luke, observables would make more sense. A Promise-based interface would mean supporting only request-response semantics. Observables not only allow for request-response, but also publish-

[elm-discuss] Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-28 Thread Aditya Vishwakarma
Hi I am getting Uncaught TypeError: Cannot read property 'tag' of undefined in a sample code I built to tryout elm. The error happen when I send JSON data across the elm port from JS side. Port defn: https://github.com/adityav/elm-reddit-listing/blob/master/src/AppPorts.elm#L14 JS call which

[elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-28 Thread OvermindDL1
Could possible do it 'now' with ```elm type Time = Time_Value Float milliseconds m = seconds <| m/1000 seconds s = Time_Value s minutes m = seconds <| m*60 from_json json = Json.Decode.decodeString Json.Decode.float json |> Result.map (\t -> Time_Value t) to_seconds (Time_Value t) = t t

Re: [elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-28 Thread Joey Eremondi
There is also some prior art with Haskell for this: https://hackage.haskell.org/package/uom-plugin https://hackage.haskell.org/package/units https://hackage.haskell.org/package/Measure On Thu, Jul 28, 2016 at 12:33 PM, Duane Johnson wrote: > > On Thu, Jul 28, 2016 at 1:11 PM, art yerkes wr

Re: [elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-28 Thread Duane Johnson
On Thu, Jul 28, 2016 at 1:11 PM, art yerkes wrote: > F# is kind of radical in that it has units. > > https://fsharpforfunandprofit.com/posts/units-of-measure/ > Wow, very neat! I like that F# keeps the units after the number, actually adding to readability. -- You received this message because

[elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-28 Thread art yerkes
F# is kind of radical in that it has units. https://fsharpforfunandprofit.com/posts/units-of-measure/ It's not perfect, but it could serve as a starting point for evaluating different ways of having units as part of a language. On Thursday, July 28, 2016 at 11:42:44 AM UTC-7, John Bugner wrote:

Re: [elm-discuss] Unit Types : A Radical Proposal

2016-07-28 Thread Duane Johnson
This would be a nice fix to the Radians / Degrees issue too. Every language seems to settle on one or the other as "the base unit" but newcomers have to learn the assumption or face bad accidental outputs. On Thu, Jul 28, 2016 at 12:42 PM, John Bugner wrote: > In the time library ( > package.elm

[elm-discuss] Unit Types : A Radical Proposal

2016-07-28 Thread John Bugner
In the time library ( package.elm-lang.org/packages/elm-lang/core/4.0.3/Time ), there are many functions under the "Units" heading. Under the function `millisecond`, it says: >Units of time, making it easier to specify things like a half-second (500 * millisecond) without remembering Elm’s unde

[elm-discuss] Re: Form with union type

2016-07-28 Thread Yosuke Torii
Hi Simone, I wrote the fixed version here (copy & paste to Try Elm ). Union type was not wrong. The `on` function assumes an event object to be decoded, but you expect a string. So I used `targetValue` de

[elm-discuss] Re: Is there a way to investigate a Html tree?

2016-07-28 Thread Yosuke Torii
Recently I wrote a little parser for `toString` representation. https://github.com/jinjor/elm-time-travel/blob/master/src/TimeTravel/Internal/Parser/Parser.elm It turns toString <| div [] [ input [ type' "text", class "foo", onClick 1 ] [], text "hello" ] into Record ([Property "type" (StringLi

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Conrad Dean
I've been trying to figure out how to do this with elm-markdown objects as well, but haven't gotten anywhere with it. On Thu, Jul 28, 2016 at 8:06 AM, Noah Hall wrote: > Hope. This is what I tried first, but toString sadly does things to js > objects that make that hard. The rest of the helpers

Re: [elm-discuss] Re: Modifying the DOM with external JS libraries

2016-07-28 Thread Marco Perone
Thanks Ian, elm-markdown did the trick! 2016-07-28 0:46 GMT+02:00 Ian Mackenzie : > In this particular case, if you're just using highlight.js to highlight a > block of code, you might also be able to use evancz/elm-markdown ( > http://package.elm-lang.org/packages/evancz/elm-markdown/3.0.0/). Yo

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Noah Hall
Hope. This is what I tried first, but toString sadly does things to js objects that make that hard. The rest of the helpers in that file are dedicated to trying to get that to work, actually. By replacing and collecting fields and properties. On Thursday, July 28, 2016, Peter Damoc wrote: > Wil

[elm-discuss] Re: Search Selection widget

2016-07-28 Thread Erkal Selman
In other words, I want to prevent the default behaviour not for all keypresses but only for up and down arrow keypresses. Is this possible? On Thursday, July 28, 2016 at 1:55:18 PM UTC+2, Erkal Selman wrote: > > I don't understand. What do you mean by *"handle those keys inside the > input field

[elm-discuss] Exporting an event stream

2016-07-28 Thread Zachary Kessin
I know the idea of having an event stream that can be exported and replayed has been kicked around a bit for a while. Has anyone ever done anything with this? Ideally I would like to be able to generate a sequence of events with a QuickCheck type tool (either in elm or erlang) Zach -- Zach Kess

[elm-discuss] Re: Search Selection widget

2016-07-28 Thread Erkal Selman
I don't understand. What do you mean by *"handle those keys inside the input field"*? The problem is that if we prevent the default arrow key behaviour with preventDefault, writing into the input field is also prevented. On Thursday, July 28, 2016 at 1:33:00 PM UTC+2, Zeljko Nesic wrote: > >

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Peter Damoc
Will calling toString on a Html element render it or will it print the internal representation? I'm trying to avoid going to Native, if possible. On Thu, Jul 28, 2016 at 2:39 PM, Noah Hall wrote: > It turns the internal representation to a string representation. It > doesn't actually render i

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Noah Hall
It turns the internal representation to a string representation. It doesn't actually render it at that point. It's just the internal representation. On Thursday, July 28, 2016, Peter Damoc wrote: > I took quick look and I got here: > > https://github.com/eeue56/elm-server-side-renderer/blob/mast

[elm-discuss] Re: Search Selection widget

2016-07-28 Thread Zeljko Nesic
I today had a plan of rewriting my dropdown component from Angular to Elm, which was inspired by SemanticUI's one. Anyway, my solution was handle those keys inside the input field. Also, make sure, just to preventDefault, and let propagation fall through. == { stopPropagation = False , preven

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Peter Damoc
I took quick look and I got here: https://github.com/eeue56/elm-server-side-renderer/blob/master/src/Helpers.elm#L31 query leads to nodeTypeFromHtml which is actually living in a module named HtmlToString :) Looks like you are still turning it into a string. I'm imagining that with the help of th

Re: [elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Noah Hall
My implementation of server-side rendering allows you to do exactly that, without turning it to a string. Checkout how this is implemented -> https://github.com/eeue56/elm-server-side-renderer/blob/master/src/Query.elm#L51 On Thu, Jul 28, 2016 at 11:21 AM, Peter Damoc wrote: > I need to gather a

[elm-discuss] Re: Search Selection widget

2016-07-28 Thread Erkal Selman
I am also interested in the answer. Does anyone know a solution (for 0.17)? On Monday, February 15, 2016 at 8:29:59 PM UTC+1, Bernd Meyer wrote: > > I'm trying to create a search selection widget like > http://semantic-ui.com/modules/dropdown.html#search-selection in elm. I > would the user to b

[elm-discuss] Is there a way to investigate a Html tree?

2016-07-28 Thread Peter Damoc
I need to gather all the class names used in a Html tree generated by the app. Is there a way to do this short of converting the html to a string and manually parsing it? -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- You received this message because you are subscribe

[elm-discuss] Looking for a contract doing Elm (possibly with Erlang or Elixir)

2016-07-28 Thread Zachary Kessin
Hi All I have been developing on elm for about 8 months and have been doing Erlang since about 2011. I was wondering if anyone needs a developer for a project? Zach -- Zach Kessin Twitter: @zkessin Skype: zachkessin ᐧ -- You received this message because you are