Re: [elm-discuss] Feature proposal: Html.none

2016-08-31 Thread Nick H
Evan pointed out on Elm Dev that this is functionality is already available: none = text "" but I don't think that solution is very obvious, and agree that adding none to the library would be nice. On Wed, Aug 31, 2016 at 4:02 PM, Mark Hamburg wrote: > Html.none would

[elm-discuss] Feature proposal: Html.none

2016-08-31 Thread Mark Hamburg
Html.none would produce a virtual DOM node but that node would not produce anything in the actual DOM. It's usage is an alternative to list concatenation and empty divs. For example: div [] [ headerView model, , model.error |> Maybe.map errorBoxView |> Maybe.withDefault Html.none ,

Re: [elm-discuss] Re: Design of Large Elm apps

2016-08-31 Thread Mark Hamburg
I re-read your message, Erik, and my reply and realized that I hadn't answered all of the questions. The routing I've been working with handles both commands created by the client side and handled by the service side and commands created by the client and handled by "normal" external means. This

[elm-discuss] Re: Elm-mdl implementations - suggest projects that can be added to reference list

2016-08-31 Thread Dmytro Gladkyi
Yes, it is now public on bitbucket: https://bitbucket.org/gladimdim/offtieweb/src On Wednesday, August 31, 2016 at 2:58:40 PM UTC+3, Håkon Rossebø wrote: > > Is the source available for this project? It would be nice to share > implementations with others. > > Håkon > > lørdag 20. august 2016

Re: [elm-discuss] conditional json parsing

2016-08-31 Thread Thomas Coopman
Thanks, I should have seen that. On Wed, 31 Aug 2016 at 20:10 Nick H wrote: > Maybe use *andThen* > ? > Looks like that would let you decode part of the event, identify its type, > and then

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Excellent - thanks for the info and link looks most cool indeed :) - just had a play - looking forward to being able to write something as capable at what you've got there (and as well organised code-wise). One of my colleagues at work suggested the same approach (as why would you put text

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Hey Nick (and thanks) the reason I'm using canvas is that I don't believe that you can pass a regular DOM element to web-gl for use as a texture - however this is my first foray into webgl so I am on a (pretty steep) learning curve and it may be that I have just not found out that you can

[elm-discuss] conditional json parsing

2016-08-31 Thread Thomas Coopman
I'm struggling with parsing json data that contains different kinds of data. My json structure looks like this: [{event: A, data: {id: 1, name: 'foo'}}, event: B, data: {id: 1, address: 'bar'}}] I want to parse this structure to type Event = EA A | EB B type alias A = {id : Int, name:

[elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Hi I've recently been learning/hacking/having fun with elm and webgl and have been experimenting with rendering text using canvas textures. It seems that this is not possible using elm-graphics as it renders text using the DOM and not canvas, so I have slapped together a proof of concept

[elm-discuss] Re: Performance issue with AnimationFrame based game

2016-08-31 Thread OvermindDL1
Chrome, Windows 10 (I'm at work, this is not my main OS). Every time I tried to profile the tab would get slower and slower over a period of just a few seconds until the tab itself died. On Wednesday, August 31, 2016 at 8:49:01 AM UTC-6, Alex Spurling wrote: > > Thanks, that is good to know!

[elm-discuss] Re: Performance issue with AnimationFrame based game

2016-08-31 Thread Alex Spurling
Thanks, that is good to know! I wonder what exactly caused it to blow up. I've done profiling on both Chrome and Firefox and never had it blow up. What browser and OS are you using? Alex On Wednesday, 31 August 2016 15:27:22 UTC+1, OvermindDL1 wrote: > > Well if it helps I hooked up a profiler

[elm-discuss] Re: Performance issue with AnimationFrame based game

2016-08-31 Thread OvermindDL1
Well if it helps I hooked up a profiler to the page and ran it, it exploded and died due to memory allocations. Unsure where since it died... On Tuesday, August 30, 2016 at 5:23:51 PM UTC-6, Alex Spurling wrote: > > I've made a little canvas drawing app in Elm which unfortunately suffers >

Re: [elm-discuss] Elm and contenteditable

2016-08-31 Thread Damir Batinović
I had to use contenteditable in my project. The true way to handling cursor position was to hard (I don't remeber what it was but I thing it involves window.selection) so I went with a dirty hack. Added another field to my model (tmpInput), saving input events into that field until Blur event

[elm-discuss] Re: Elm-mdl implementations - suggest projects that can be added to reference list

2016-08-31 Thread Håkon Rossebø
Is the source available for this project? It would be nice to share implementations with others. Håkon lørdag 20. august 2016 17.52.29 UTC+2 skrev Dmytro Gladkyi følgende: > > You can press on a blue Card (anywhere) and it will navigate back to list. > I'll add button for this anyway. -- You

Re: [elm-discuss] Unrelated modules having ports with the same name

2016-08-31 Thread James Wilson
There is as I understand it nothing wrong with compiling multiple modules with a main function using one command. It's very useful if you want many separate Elm widgtts that share the same runtime and library code. As I understand you can do: Foo.hs: module Foo main = HTML.App.Program...

Re: [elm-discuss] Unrelated modules having ports with the same name

2016-08-31 Thread b123400
Thanks for the reply. I want to try out Elm as embedded element(s) instead of full page app, but due to the original DOM structure and CSS layout, I cannot put everything inside a single element. Then I thought it would be a good idea to create two separated modules, and "pipe" then through