Re: [elm-discuss] Noob HTTP questions

2016-11-26 Thread Nick H
I would recommend having another read through the "Linked List" and "Generic Data Structures" sections of the union types page. The types you are asking questions about behave the same way that the "List a" does. 1) Msg is a type. "Cmd Msg", "Sub

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Erik Lott
that should say : Simon, I'm just glancing at this code, but this page *shouldn't* perform page refreshes at all. It should only fire UrlChange events without reload the browser. Am I missing something? On Saturday, November 26, 2016 at 5:59:56 PM UTC-5, Erik Lott wrote: > > The aim is to get t

Re: [elm-discuss] Re: Whither Rationals?

2016-11-26 Thread Nick H
Nope, I didn't do any infix operators. I work a lot the vector types in elm-community/linear-algebra, so I am quite used to prefix functions like "add". It's more verbose, but I don't find that too much of a bother. On Sat, Nov 26, 2016 at 2:52 PM, John Watson wrote: > Hi, Nick, > > I'd be very

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Erik Lott
> > The aim is to get the navigation history ticking along properly without > page refreshes. Simon, I'm just glancing at this code, but this page should perform page refreshes at all. It should only fire UrlChange events without reload the browser. Am I missing something? On Saturday, Novem

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Erik Lott
Wouter, in regards to that sequence of events, I would reduce sequence to the following question: What does my elm app do when the address bar is "/apples/234" ? If apple 234 exists, show the apple page. If apple 234 does not exist, show a "Not Found" page. IMHO if the user types the url "/app

Re: [elm-discuss] Re: Whither Rationals?

2016-11-26 Thread John Watson
Hi, Nick, I'd be very interested to see that if you have managed to carry over all the infix operators from *Basics*. I tried something like this myself in a fork of imeckler/ratio, but found that (for example) Basics.(+) would interfere with Ratio.(+). In the end I used operators like (|+|),

Re: [elm-discuss] What is the motivation for using google groups?

2016-11-26 Thread Bernardo
I like Google Groups, it's simple and it works fine. I also like Discourse. It may be a good alternative if you are looking for a more complete forum that is modern. I don't like Reddit, it doesn't feel like a forum nor a mailing list, and it has advertisement. On Friday, 25 November 2016 23:34

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Erik Lott
> > With option 1 how do you stop the page reloading on each click on an > anchor? I'm not sure I understand. I would think that you would want a UrlChange msg to be fired each time one of these anchors were clicked. I think I'm missing the point, so let me know. Another Con of option 1 migh

Re: [elm-discuss] What is the motivation for using google groups?

2016-11-26 Thread Joey Eremondi
I'm a bit reluctant of using Reddit for this: 1. It's hard to keep things sorted by topic. One of the main reasons for moving away from groups is that we could separate feature requests from newbie help from advanced help from library announcements. You can't do that on reddit. 2. It's susceptibl

Re: [elm-discuss] What is the motivation for using google groups?

2016-11-26 Thread OvermindDL1
Another +1 for reddit here, I don't use the mailing list aspects of things but for one who does reddit would be a -1, but there are so many aggregators for reddit that I've no doubt a mailing list thing is made by someone or a hundred. On Saturday, November 26, 2016 at 12:09:40 AM UTC-7, Robin

Re: [elm-discuss] About output file size

2016-11-26 Thread Nick H
Luiz, what sort of load times are you looking at? On Sat, Nov 26, 2016 at 1:27 PM, Nick H wrote: > I would 100% recommend Elm for small projects! > > The core platform takes up a certain size, but the code you write on top > of that is not going to add much more. > > On Sun, Nov 20, 2016 at 8:06

Re: [elm-discuss] About output file size

2016-11-26 Thread Nick H
I would 100% recommend Elm for small projects! The core platform takes up a certain size, but the code you write on top of that is not going to add much more. On Sun, Nov 20, 2016 at 8:06 AM, Luiz Bills wrote: > Can I output a js file more optimized? A simple hello world outputs 175K > (67K min

Re: [elm-discuss] The Elm Architecture and Html.beginnerProgram

2016-11-26 Thread Nick H
What are you trying to figure out? If you are looking for the implementation of Html.beginnerProgram, you can look in the elm-stuff/packages directory. Or you can compile your program and read the output JavaScript to see what is "really" going on. But I don't think either of those things are goin

[elm-discuss] The Elm Architecture and Html.beginnerProgram

2016-11-26 Thread Wouter In t Velt
The `model` function is called only once, when your app is started. Then your `view` function is called, to render the model to the DOM. After that, every time your `view` function produces and `Msg`, your `update` function is called, and the resulting model is passed on to another call of your

Re: [elm-discuss] Re: Whither Rationals?

2016-11-26 Thread Nick H
There is also willnwhite/bigratio (also not update to 0.18 yet) that uses big integers... might be preferable for avoiding "resolution" problems when numerators and denominators get to big. On Sat, Nov 26, 2016 at 12:57 PM,

[elm-discuss] The Elm Architecture and Html.beginnerProgram

2016-11-26 Thread Brent Brinkley
Where can I find the code that show specifically what's happening with the information that's passed into Html.beginnerProgram { model = model, view = view, update = update } ?? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe fro

Re: [elm-discuss] Re: Whither Rationals?

2016-11-26 Thread Nick H
I have a module that implements most of the math functions from *Basics* for rational numbers. Happy to publish it. For interop with ints, there is int : Int -> Rational Then converting back you have the normal round/floor/ceiling as well as toFloat. Is that unobtrusive enough? On Sat, Nov 26,

[elm-discuss] Re: Whither Rationals?

2016-11-26 Thread John Watson
Nothing too complex. I do stuff with music notation, which has the concept of half note, quarter note etc. One thing I've been toying with is porting the Haskell School of Music / Euterpea

Re: [elm-discuss] Help with an update function

2016-11-26 Thread Fed Reggiardo
I tried this with a List yesterday and failed. However, since I wasnt sure if this was the best approach i didnt go crazy trying to make it work. Let me play around a bit and see what i come up with. Thanks again -- You received this message because you are subscribed to the Google Groups "E

[elm-discuss] Re: Random.list

2016-11-26 Thread Max Goldstein
Oh, and I'm obliged to say: this function will never terminate if you pass it the wrong predicate, so be careful about that! "Wrong" might mean unsatisfiable (or always satisfied, depending on how you want it to work), or not satisfied by any element generated, for example, (\n -> n > 100) for

Re: [elm-discuss] looking for a Director of Frontend Engineering

2016-11-26 Thread Roland Kuhn
Indeed: our offices are in Munich, our engineering team is spread across Europe, and our customers are in central Europe so far. Regards, Roland On Sat, 26 Nov 2016 at 16:41, Peter Damoc wrote: > Well, the job post has a Munich, Germany address in the footer. > I think it is safe to assume that

[elm-discuss] Re: Random.list

2016-11-26 Thread Max Goldstein
You can do this, but you have to define something that *should* be defined for you (and is by random-extra and elm-random-pcg): Random.constant. import Random constant x = Random.map (always x) Random.bool listUntil : Random.Generator a -> (a -> Bool) -> Random.Generator (List a) listUntil elem

Re: [elm-discuss] Whither Rationals?

2016-11-26 Thread Janis Voigtländer
I can't answer for OP, but for example doing the calculations for my project https://github.com/jvoigtlaender/circuits with Floats would be forbidding/forbidden. Determining whether a certain branch of the constructed circuit has current or not in a given switch setting, that needs exact compar

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Simon
Here is some code to make things more concrete https://gist.github.com/simonh1000/9368f9dbd7f93646207ec27fdf3662a2 It is based on the example from the Navigation library, but with the links changed from # to (I think they are called) HTML5 links. I added an onClick handler to provide a prevent

[elm-discuss] Whither Rationals?

2016-11-26 Thread Max Goldstein
What problem are you trying to solve that you can't do with Floats? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For

Re: [elm-discuss] looking for a Director of Frontend Engineering

2016-11-26 Thread Peter Damoc
Well, the job post has a Munich, Germany address in the footer. I think it is safe to assume that this is where the company is based and that this is where the post is. On Sat, Nov 26, 2016 at 5:33 PM, Zachary Kessin wrote: > Hey, you might want to add where in the world your team is located t

Re: [elm-discuss] looking for a Director of Frontend Engineering

2016-11-26 Thread Zachary Kessin
Hey, you might want to add where in the world your team is located to your add. The only hint in your post is that your phone# starts with +49 Zach On Tue, Nov 22, 2016 at 8:57 AM, Roland Kuhn wrote: > Hi all, > > Evan suggested that I describe my predicament here, if someone knows a > better p

[elm-discuss] Re: elm-make: Map.!: given key is not an element in the map

2016-11-26 Thread Anthony Naddeo
Thanks a lot, was pretty confused about this one... I'm assuming this should actually never happen. I'll have to see if anyone filed a bug on this. My project was brand new and all Elm .18, so this could probably happen to a new Elm user. It started happening after I installed the decoder pipel

[elm-discuss] Whither Rationals?

2016-11-26 Thread John Watson
It seems to me that a maturing language such as Elm requires first-class support for Rational numbers. There is a very solid start in imeckler/ratio but a couple of things are starting to concern me: - There is (as yet) no version of this library for 0.1

[elm-discuss] Re: How to use Navigation library

2016-11-26 Thread Wouter In t Velt
Thank you for the explanation Erik! With the upgrade to 0.18 and the changes in navigation, I was wondering which route (pun intended) to follow with the upgrade. Not sure I follow completely though. In option 1, could you deal with redirect-like scenario's inside the SPA? Like 1. user is on

Re: [elm-discuss] Help with an update function

2016-11-26 Thread Thomas Coopman
Yes :) On Sat, 26 Nov 2016 at 09:36 Fed Reggiardo wrote: > Thomas, thanks! The problem is that I don't know how many inputs I'll > need. So are you saying I should add them into a Dict as created and > access them from there by mapping over the Dict from an update function? > > > On Saturday, N

Re: [elm-discuss] Injecting CSS into the DOM

2016-11-26 Thread Peter Damoc
On Tue, Nov 22, 2016 at 11:49 PM, Qiming Weng wrote: > Evan has suggested using the VirtualDom, but something like > > whatever = > div [] [ node "style" [] [ text ".cats { ... }" ] ] > > Simply creates a node representation in memory, but doesn't actually > insert it into the DOM. > This is w

Re: [elm-discuss] Help with an update function

2016-11-26 Thread Fed Reggiardo
Thomas, thanks! The problem is that I don't know how many inputs I'll need. So are you saying I should add them into a Dict as created and access them from there by mapping over the Dict from an update function? On Saturday, November 26, 2016 at 2:31:51 AM UTC-6, Thomas Coopman wrote: > > I'm

Re: [elm-discuss] Help with an update function

2016-11-26 Thread Thomas Coopman
I'm not sure if I completely understand your problem, so if this is not correct, ignore me. You cannot dynamically change your model, but you can use a List or a Dict to store multiple inputs. I would probably choose a Dict String (List Note) On Sat, 26 Nov 2016, 08:33 Fed Reggiardo, wrote: > I

Re: [elm-discuss] About output file size

2016-11-26 Thread Peter Damoc
On my system (0.18), Hello world is: - 179KB RAW - 58KB minified (Google Closure Compiler) - 18k minified+gzipped . I find this acceptable. I would love for it to be even lower and there was an attempt at one point to give Elm native DCE but, in the mean time, Google Closure Compiler does a good e

Re: [elm-discuss] Noob questions re the http example

2016-11-26 Thread Justin
Great answers. Thank you both very much. I think the docs, esp those related to the elm architecture examples, could do with fleshing out this kind of stuff. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop

Re: [elm-discuss] Noob questions re the http example

2016-11-26 Thread Justin
Great answers. Thank you both very much. I think the docs, esp those related to the elm architecture examples, could do with fleshing out this kind of stuff. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop