[elm-discuss] Re: Permission denied: Elm package install

2016-09-15 Thread Kristo Koert
Same as David Legard for me, stopped working in a dropbox folder, moved to non syncing and it worked. Haven't seen the issue anymore. On Wednesday, September 14, 2016 at 6:03:35 PM UTC+3, kiran kumar BS wrote: > > Hello Team, > > I am trying to setup a small ELM project but failed due to some pe

[elm-discuss] Any tricks for debugging?

2016-09-15 Thread 'Rupert Smith' via Elm Discuss
I am finding it useful to know which Msgs are being triggered through my update functions, so have been putting in code like this: log = Debug.log "myModule" ... Add -> let d = log "add" in ... Now I have decided it would be easier to just print all Msgs

Re: [elm-discuss] Elm app crashing in Chrome/Firefox

2016-09-15 Thread Eduardo Cuducos
Many thanks for you reply, Peter. Indeed changing that line to Cmd.none fix the issue. The reason why I (naïvely) added that Navigation.modifyUrl "" was to clean up a “invalid” URL. For example: if location is #/document/42, this is a valid entry point; but is the location happens to be mistyped

Re: [elm-discuss] Elm app crashing in Chrome/Firefox

2016-09-15 Thread Peter Damoc
As a suggestion: Don't modify the URL directly. Create some kind of helper function that would allow you to navigate using a higher level of structure. I have the concept of Pages in my app (i.e. locations where certain parts of the functionality gets accomplished). When I want to navigate, I navi

Re: [elm-discuss] Elm app crashing in Chrome/Firefox

2016-09-15 Thread Eduardo Cuducos
Hum… that sounds interesting. I'm not refactoring it right now, but gonna try this next time I go back to that code. Do you have any snippet as reference? Many thanks, On Thu, Sep 15, 2016 at 8:40 AM Peter Damoc wrote: > As a suggestion: > Don't modify the URL directly. Create some kind of helpe

Re: [elm-discuss] Elm app crashing in Chrome/Firefox

2016-09-15 Thread Peter Damoc
The url-parser example shows this: https://github.com/evancz/url-parser/blob/master/examples/App.elm#L104 On Thu, Sep 15, 2016 at 4:30 PM, Eduardo Cuducos wrote: > Hum… that sounds interesting. > I'm not refactoring it right now, but gonna try this next time I go back > to that code. > Do you

Re: [elm-discuss] Elm app crashing in Chrome/Firefox

2016-09-15 Thread Eduardo Cuducos
Great, many thanks, Peter : ) On Thu, Sep 15, 2016 at 11:11 AM Peter Damoc wrote: > The url-parser example shows this: > > https://github.com/evancz/url-parser/blob/master/examples/App.elm#L104 > > > > On Thu, Sep 15, 2016 at 4:30 PM, Eduardo Cuducos > wrote: > >> Hum… that sounds interesting.

[elm-discuss] Http 401 Interceptor? My 3rd Elm Project - authentication

2016-09-15 Thread 'Rupert Smith' via Elm Discuss
My next project is delving much deeper into Elm - until till now I mostly just played around with the view and a little bit of glue to stick it all together. The code I am porting to Elm is an Angular project that has a fairly sophisticated way of handling logins. When a resource is accessed on

[elm-discuss] Upgrading 0.16 `Effects.task <| Task.succeed` to 0.17

2016-09-15 Thread Rex van der Spuy
Hi Everyone! I'm upgrading some complex old 0.16 code to 0.17 and came across this in my `update` function: ``` ( model'' , Effects.batch [ Effects.task <| Task.succeed FadeOutOldPage , Effects.task <| Task.succeed FadeInNewPage , Effects.task <| Task.succeed (UpdateInfo

[elm-discuss] Re: Upgrading 0.16 `Effects.task <| Task.succeed` to 0.17

2016-09-15 Thread OvermindDL1
I'm not from 0.16, but here is how I send a message to myself, I have this in a Helpers module: ```elm cmd_from_msg : msg -> Cmd msg cmd_from_msg msg = Task.perform (\_ -> Debug.crash "This cannot fail") identity (Task.succeed msg) ``` Which would turn your code into this if I understand what

Re: [elm-discuss] Upgrading 0.16 `Effects.task <| Task.succeed` to 0.17

2016-09-15 Thread Janis Voigtländer
One of the following two pages/sections of the FAQ should solve that for you: http://faq.elm-community.org/17-tasks.html http://faq.elm-community.org/17.html#how-do-i-generate-a-new-message-as-a-command ​ 2016-09-15 20:30 GMT+02:00 Rex van der Spuy : > Hi Everyone! > > I'm upgrading some comple

[elm-discuss] Re: Any tricks for debugging?

2016-09-15 Thread Zinggi
You could wait some time on the 0.18 release which will most likely bring back the time traveling debugger, with object introspection. This is much more comfortable than Debug.log. For now, you could use this library which als

Re: [elm-discuss] Re: Any tricks for debugging?

2016-09-15 Thread John Orford
any ballpark guesses on when 0.18 will happen? before the end of the year perhaps? On Thu, 15 Sep 2016 at 21:37 Zinggi wrote: > You could wait some time on the 0.18 release which will most likely bring > back the time traveling debugger, with object introspection. > This is much more comfortable

Re: [elm-discuss] Re: Any tricks for debugging?

2016-09-15 Thread Zinggi
Well elm-conf is happening right now, so we'll get more info very soon. On Thursday, 15 September 2016 21:50:42 UTC+2, John Orford wrote: > > any ballpark guesses on when 0.18 will happen? before the end of the year > perhaps? > > On Thu, 15 Sep 2016 at 21:37 Zinggi >

Re: [elm-discuss] Private state: A contrived example

2016-09-15 Thread Mark Hamburg
(Sparked by the great lightning talk at elm-conf on elm-style-animation) A less contrived example of private state might be something built around elm-style-animation. The animation is potentially simply part of the view rather than the data model. We can again store that state separately but it

[elm-discuss] ANN: elm-light 0.4.0 - AST driven Elm features in Light Table

2016-09-15 Thread Magnus Rundberget
Hi ! After quite a few weeks of working evenings and nights I'm finally ready to announce the 0.4.0 release of the Elm language plugin for Light Table . I guess the big thing is that I've created a parser (using a parser generator, PEG.js) to give me the pos

Re: [elm-discuss] Re: Any tricks for debugging?

2016-09-15 Thread joseph ni
Ahh, I needs it! Just spent last night trawling through chrome dev console looking at single line formatted debug.log, finally found the bug after an hour but it took me back to js days... Because all your business logic is explicitly reflected in your model, being able to step and look at your

[elm-discuss] Re: no user not a github project

2016-09-15 Thread art yerkes
I discovered this recently when trying out elm-server-side-renderer . The elm compiler is parsing the repository url in elm-package.json and using what would be the user name and repository fields for these. Apparently, what you have is what happens when the repository url doesn't point to gi

[elm-discuss] Re: Http 401 Interceptor? My 3rd Elm Project - authentication

2016-09-15 Thread art yerkes
HttpError has BadResponse Int String which you can use to detect non-200 results to http requests. The way to do it in elm is to write a function that wraps the creation of login enabled http requests and translates 401 errors into a suitable message (which is why Task.perform has two function