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 ( >

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

2016-07-27 Thread Marco Perone
Hello everybody, I am building an application in Elm and I need to call an external JS library that interacts directly with the DOM (in my case, highlights a section). I built a port to communicate from Elm to Javascript and, on the Javascript side, I'd like to call my external library as

[elm-discuss] Re: More thorough side-effect isolation

2016-08-17 Thread Marco Perone
Hi! I was eventually able to read carefully the thread and give some thoughts about it. @kasey, I had a look to your Gist and it looks really interesting! Some notes about it: - I think it would be better to store in the parameter of the Fact's the increment, and not the state of the

Re: [elm-discuss] Re: More thorough side-effect isolation

2016-08-17 Thread Marco Perone
h I worry about how huge the model.write > could get considering it saves every event ever. Say in a given chat app > this could get amazingly huge. How would that be handled in this pattern? > > > On Wednesday, August 17, 2016 at 10:32:27 AM UTC-6, Marco Perone wrote: >> >

[elm-discuss] Re: More thorough side-effect isolation

2016-08-18 Thread Marco Perone
y responding to facts. Not sure if plus/minus > overflow in Elm (in JS, they flip sign on overflow), but other kinds of > operators could. > > On Wednesday, August 17, 2016 at 11:32:27 AM UTC-5, Marco Perone wrote: >> >> Hi! >> >> I was eventually able to rea

[elm-discuss] Represent explicitely function domains

2016-10-02 Thread Marco Perone
Some days ago I had an idea, which I don't know if it's worth exploring, so I'll just share it here and ask for some feedback. Thinking about how to handle only valid state of an application, I tought it would be nice if, for every function, we could be able to specify precisely its domain,

[elm-discuss] Re: Do the same with ELM?

2016-10-20 Thread Marco Perone
you could just add a `value` to your input field like input [ onInput NewContent, value inputStr ] and then reset the `inputStr` value when you confirm the submission Confirm -> { model | state = WaitingForSubmit , inputStr = ""

Re: [elm-discuss] Mutually dependent types

2017-01-13 Thread Marco Perone
ntv...@gmail.com>: > Op vrijdag 13 januari 2017 09:13:25 UTC+1 schreef Marco Perone: >> >> Coming back to my original question, supposing we have two mutually >> recursive types, they must be in the same module and hence in the same >> file, right? >> > > Yes

[elm-discuss] Mutually dependent types

2016-12-30 Thread Marco Perone
I have two types type alias Player = { ... , team : Team } type alias Team = { ... , players : List Players } which clearly have a circular dependency. I am duplicating data and I am doing that on purpose. Now the question is: is it