[elm-discuss] Re: Current date (sorry for starting it again)

2016-11-21 Thread Tim Bezhashvyly
Sorry, I'm still not sure how to pass a received date or model to comparison function. On Tuesday, November 22, 2016 at 3:41:07 AM UTC+1, Max Goldstein wrote: > > You can partially apply the comparison function to the current date before > passing it to List.filter. The trick is that you have to

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Matthieu Pizenberg
On Tuesday, November 22, 2016 at 1:52:09 PM UTC+8, Peter Damoc wrote: > > On Tue, Nov 22, 2016 at 1:33 AM, Richard Feldman > wrote: > >> There is no unpublish feature, and it's important that there never be one >> . :) >> > > What would

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Peter Damoc
On Tue, Nov 22, 2016 at 8:10 AM, Richard Feldman < richard.t.feld...@gmail.com> wrote: > What would happen if someone deletes their github repository? Wouldn't the >> same kind of breakage take place? >> > > Yep, but that's a flaw in the current implementation (which was chosen for > expedience),

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Richard Feldman
> > What would happen if someone deletes their github repository? Wouldn't the > same kind of breakage take place? > Yep, but that's a flaw in the current implementation (which was chosen for expedience), not a desired feature of the design. The longer-term plan (which might be happening in 0

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Zachary Kessin
> What about a way to hide packages during search (unless you ask for them), but still be available to download? > I like this solution Zach ᐧ On Tue, Nov 22, 2016 at 4:35 AM, Max Goldstein wrote: > What about a way to hide packages during search (unless you ask for them), > but still be avail

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Peter Damoc
On Tue, Nov 22, 2016 at 1:33 AM, Richard Feldman < richard.t.feld...@gmail.com> wrote: > There is no unpublish feature, and it's important that there never be one > . :) > What would happen if someone deletes their github repository? Wo

Re: [elm-discuss] Can't install native package using elm-github-install

2016-11-21 Thread Gusztáv Szikszai
I think you are looking for something like this: https://github.com/gdotdesign/elm-ui/blob/master/source/Ui/Helpers/Emitter.elm It's a pure Elm pub / sub effects module (and possibly the most minimal example of an effect module). On Monday, November 21, 2016 at 11:54:50 PM UTC+1, Rupert Smith

Re: [elm-discuss] Proposed addition for Task package

2016-11-21 Thread Nick H
👍👍👍 On Mon, Nov 21, 2016 at 7:04 PM, Charlie Koster wrote: > I'm a fan of the changes to Task.perform in Elm 0.18. However, I'm still > finding that I'm writing a lot of boilerplate in some situations. For > example, there are several instances when I want to send a msg which has no > payload. >

[elm-discuss] Proposed addition for Task package

2016-11-21 Thread Charlie Koster
I'm a fan of the changes to Task.perform in Elm 0.18. However, I'm still finding that I'm writing a lot of boilerplate in some situations. For example, there are several instances when I want to send a msg which has no payload. Task.perform (\_ -> GoToLoginPage) (Task.succeed Nothing) I do thi

[elm-discuss] Re: Current date (sorry for starting it again)

2016-11-21 Thread Max Goldstein
You can partially apply the comparison function to the current date before passing it to List.filter. The trick is that you have to get the current date through a command, and either run the filter when the command comes back, or keep the current date in the model. -- You received this messag

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Max Goldstein
What about a way to hide packages during search (unless you ask for them), but still be available to download? -- 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 el

Re: [elm-discuss] Can Javascript to start Elm app be attached per page?

2016-11-21 Thread Brian Marick
I figured out how to make it work, thanks to your help. Because there are some fiddly bits, I wrote up a blog post that points to a frozen branch that might help others. It’s here: http://blog.roundingpegs.com/phoenix-elm-and-multiple-single-page-apps/ > On Nov 21, 2016, at 11:43 AM, OvermindD

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Noah Hall
The elm-community has been depreciating things every time a new Elm release comes along, by simply just not publishing for that version. On Tue, Nov 22, 2016 at 12:33 AM, Richard Feldman wrote: > There is no unpublish feature, and it's important that there never be one. > :) > > If you want to de

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread joseph ni
I came to Elm not knowing about the Maybe type. The hardest thing for me to grasp was the use case and being able to map : (a -> b) -> Maybe a -> Maybe b. And knowing when to use a Maybe (rarely) vs when to use a union type or refactor the code so it doesn't need the Maybe type. If I was to qu

Re: [elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Martin DeMello
Some things that might help: 1. typescript 2.0 has a really nice set of type-related features. https://blog.mariusschulz.com/2016/09/27/typescript-2-0-non-nullable-types in particular, it has support for lexical closures, immutable ("readonly") data, and tagged unions, which are over 90% of what

Re: [elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Robert Muller
Thank you! I've looked at typescript a bit and I am strongly biased toward statically typed PLs but I suppose I'll have to sort out whether or not it gets over the "helps them get an opportunity" bar. Is it really reasonably mainstream? I'll look into it. Thank you for the suggestion. Bob On M

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Richard Feldman
There is no unpublish feature, and it's important that there never be one . :) If you want to deprecate a package, I recommend publishing a new major release that removes everything and replaces the README with an explanation of how t

Re: [elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Martin DeMello
How about teaching it in typescript + react? Typescript is way better than vanilla javascript, while still being reasonably mainstream and not too different-looking. martin On Mon, Nov 21, 2016 at 3:23 PM, Robert Muller wrote: > I'm teaching a full-semester course on Web Apps this spring. It's

[elm-discuss] Tell me how to teach Web Apps

2016-11-21 Thread Robert Muller
I'm teaching a full-semester course on Web Apps this spring. It's my first time through so I have a lot to learn. I'm a long-time functional programmer (mostly ML: SML & OCaml). If I wasn't worried about my students getting jobs and internships the choice would be obvious: I'd teach Elm! But th

[elm-discuss] highlight.js and elm code

2016-11-21 Thread Brian Marick
I recently installed highlight.js (http://highlightjs.readthedocs.io ) on my blog. It’s supposed to understand Elm code, but the results are not appealing: Given the same thing happens with Haskell code, I suspect I’m doing something wrong. Any advice or ex

[elm-discuss] Re: Passing properties as arguments to messages?

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 21, 2016 at 6:27:40 PM UTC, Rex van der Spuy wrote: > > Is it possible to pass model properties as message arguments and use those > arguments to construct a new model? > Could use a Dict instead of properties? -- You received this message because you are subscribed to the

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 21, 2016 at 6:49:17 PM UTC, Michel Rijnders wrote: > > On Monday, November 21, 2016 at 3:40:02 PM UTC+1, Peter Damoc wrote: >> >> On Mon, Nov 21, 2016 at 1:42 PM, Michel Rijnders >> wrote: >> >>> The issue is that somebody forked our package (truqu/elm-base64) and >>> publish

Re: [elm-discuss] Can't install native package using elm-github-install

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 18, 2016 at 3:50:51 PM UTC, OvermindDL1 wrote: > > > On Friday, November 18, 2016 at 5:18:27 AM UTC-7, Rupert Smith wrote: >> >> I found using a port to enable global communication with the Auth module >> from anywhere in my application (any time you get a 401 or 403 you invoke

[elm-discuss] Re: Current date (sorry for starting it again)

2016-11-21 Thread Tim Bezhashvyly
But how then to pull current date in the functions where it could not be passed? For example I want to List.filter comparing to current date but I can not pass additional parameters to comparison function. On Monday, November 21, 2016 at 8:33:55 PM UTC+1, Tim Bezhashvyly wrote: > > Makes sense.

Re: [elm-discuss] Re: ANN: update-clock for fixed-time-step game loops

2016-11-21 Thread Nick H
You wouldn't be so sure of what? I am not sure which of my statements you are responding to. Network synchronization is a separate (and much more complicated) problem. This library won't help with that. On Mon, Nov 21, 2016 at 11:40 AM, Gaëtan André wrote: > I wouldn't be so sure. For example,

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Oliver Searle-Barnes
I have to admit I did find `Just` very confusing when I first encountered it, as mentioned earlier in this thread it implies some kind of limitation which doesn't match the semantics of Maybe at all. That said, it was one of those little oddities that very quickly become second nature, just want

Re: [elm-discuss] Re: ANN: update-clock for fixed-time-step game loops

2016-11-21 Thread Gaëtan André
I wouldn't be so sure. For example, in networking games where one might need to keep clocks synced. Le dimanche 20 novembre 2016 21:08:37 UTC+1, Nick H adn écrit : > > The purpose of the Clock is to relate the passage of time in the "real" > world to the passage of time in the simulated world. S

[elm-discuss] Re: Current date (sorry for starting it again)

2016-11-21 Thread Tim Bezhashvyly
Makes sense. Thank you. On Monday, November 21, 2016 at 8:32:14 PM UTC+1, OvermindDL1 wrote: > > Date.now would not be a functional call that way (returning the same > output for the same input) thus that could not work (without hacks like > native modules, but that would also break reproduceabi

[elm-discuss] Re: Current date (sorry for starting it again)

2016-11-21 Thread OvermindDL1
Date.now would not be a functional call that way (returning the same output for the same input) thus that could not work (without hacks like native modules, but that would also break reproduceability). By making it an effect it can just return a request to get the actual date. On Monday, Nove

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread OvermindDL1
There is always this: https://github.com/gdotdesign/elm-github-install Install via: ```sh npm install -g elm-github-install ``` With this usage: ```json # elm-package.json { ... "dependencies": { ... "githubUser/repoName": "desiredVersion <= v < someLargerNumber", "NoRedInk/nri-

[elm-discuss] Current date (sorry for starting it again)

2016-11-21 Thread Tim Bezhashvyly
Sorry for starting it again but do I really need to do Task.perform just to print current year just once? "Date.year Date.now" doesn't work as Date.now returns Task.Task x Date.Date. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscrib

Re: [elm-discuss] Passing properties as arguments to messages?

2016-11-21 Thread Nick H
Nope. On Mon, Nov 21, 2016 at 10:27 AM, Rex van der Spuy wrote: > Hi Everyone, > > Is it possible to pass model properties as message arguments and use those > arguments to construct a new model? > > For example, the only difference between these two messages is the model's > properties: > >

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Michel Rijnders
On Monday, November 21, 2016 at 3:40:02 PM UTC+1, Peter Damoc wrote: > > On Mon, Nov 21, 2016 at 1:42 PM, Michel Rijnders > wrote: > >> The issue is that somebody forked our package (truqu/elm-base64) and >> published it, so now there's two (nearly) identical packages, potentially >> causing con

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
I like that! type Maybe thing = Some thing | Nothing > On 21 Nov 2016, at 18:31, William Bailey wrote: > > type Maybe value = Some value | NoValue > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Elm Discuss" group. > To unsubscribe from this t

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread William Bailey
type Maybe value = Some value | NoValue -- 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 more options, visit https://

[elm-discuss] Passing properties as arguments to messages?

2016-11-21 Thread Rex van der Spuy
Hi Everyone, Is it possible to pass model properties as message arguments and use those arguments to construct a new model? For example, the only difference between these two messages is the model's properties: AnimateQuestion animMsg -> let (newStyle, cmds) = Ani

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Peter Damoc
On Mon, Nov 21, 2016 at 7:48 PM, Will White wrote: > I remember being confused by Just, and I still find it awkward. > It matters less if some other places call it Option and the cases have different names. If one cares about the

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread OvermindDL1
I highly doubt it would ever be changed, but I significantly prefer the OCaml style Some/None to Haskell's Just/Nothing as well. Although `Thing` and `NoThing` could by funny and descriptive both. ^.^ On Monday, November 21, 2016 at 10:48:11 AM UTC-7, Will White wrote: > > I remember being con

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Joey Eremondi
True, I like Just because I'm familiar with it. But its name isn't obvious. Some isn't obvious. Something isn't obvious. There's really, two ways to understand Just. One is to listen to an explanation like what Richard gives. The other is to see the definition: type Maybe a = Just a | Nothing. A

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
I remember being confused by Just, and I still find it awkward. Hearing Richard F. explain it in his introductory Elm talk is what prompted me to start this discussion. > On 21 Nov 2016, at 17:33, Noah Hall wrote: > > Has anyone actually encountered a

[elm-discuss] Re: Can Javascript to start Elm app be attached per page?

2016-11-21 Thread OvermindDL1
A few things (as I do use elm with phoenix): 1. Make sure the script tag is loaded before you load a page specific call like require or so (my script sends a 'js-loaded' event when done that my pages can listen to if it is not already sent, a simple function in the head can simplify that to a s

[elm-discuss] Re: Can Javascript to start Elm app be attached per page?

2016-11-21 Thread Andrey N. Ronin
i think tis could help you https://blog.diacode.com/page-specific-javascript-in-phoenix-framework-pt-1 so you can initialize elm app in view specific js file понедельник, 21 ноября 2016 г., 3:31:15 UTC+4 пользователь Brian Marick написал: > > Note: newbie to Javascript and frontend in general.

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Noah Hall
Has anyone actually encountered anyone being confused by the names? I haven't. I think this a solution to a problem that doesn't exist. On Mon, Nov 21, 2016 at 6:15 PM, Will White wrote: > I think that’s because you already know what Just means. I don’t think it’s > arbitrary though from an acces

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
I think that’s because you already know what Just means. I don’t think it’s arbitrary though from an accessibility point of view. Some or None is easier for newcomers to understand than Just or Nothing, especially as Some isn’t misleading the way Just is, as Andrew described well. > On 21 Nov 2

[elm-discuss] Re: Proposal: Shorter qualified imports

2016-11-21 Thread Jakub Hampl
I think the advantage of this is that it would encourage name-spacing rather than just publishing all modules as top level. I think that too much namespacing is problematic (org.example.mypackage.data.hierarchy.Tree anyone?), but as the ecosystem grows, top-level module name clashes are bound t

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Joey Eremondi
Honestly, these choices seem pretty arbitrary. Everyone has a preference. ML uses Some/None, Haskell uses Just/Nothing. Some people find Something intuitive, some don't. Given that the choices is (mostly) arbitrary, it seems best to stick with the status quo. On Mon, Nov 21, 2016 at 7:47 AM, 'And

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 21, 2016 at 2:39:21 PM UTC, Rupert Smith wrote: > > On Monday, November 21, 2016 at 11:42:30 AM UTC, Michel Rijnders wrote: >> >> The issue is that somebody forked our package (truqu/elm-base64) and >> published it, so now there's two (nearly) identical packages, potentially >

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 21, 2016 at 3:31:21 PM UTC, Max Goldstein wrote: > > I have a similar issue with my geojson library. I merged a PR but forgot > to run elm-package publish for a few days, and in the interim someone > published a fork. Reasonable, but now it's annoying. > I wonder if adding th

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread 'Andrew Radford' via Elm Discuss
Probably inherited from Haskell, like a lot of other stuff. Doubt if there was any other thought put into it if I'm honest. On Monday, 21 November 2016 14:46:40 UTC, Will White wrote: > > Sorry, meant to say “I guess he’s already considered and rejected them”. > > On 21 Nov 2016, at 14:21, Will W

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Max Goldstein
I have a similar issue with my geojson library. I merged a PR but forgot to run elm-package publish for a few days, and in the interim someone published a fork. Reasonable, but now it's annoying. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group.

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
Sorry, meant to say “I guess he’s already considered and rejected them”. > On 21 Nov 2016, at 14:21, Will White wrote: > > I prefer Some or None, for understanding. Though, unless Evan didn’t know > about them, I guess we’d already have them. > >> On 20 Nov 2016, at 23:41, Robin Heggelund Hans

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 21, 2016 at 11:42:30 AM UTC, Michel Rijnders wrote: > > The issue is that somebody forked our package (truqu/elm-base64) and > published it, so now there's two (nearly) identical packages, potentially > causing confusion. > I was recently wondering what would happen if someon

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Peter Damoc
On Mon, Nov 21, 2016 at 1:42 PM, Michel Rijnders wrote: > The issue is that somebody forked our package (truqu/elm-base64) and > published it, so now there's two (nearly) identical packages, potentially > causing confusion. > This is a more interesting issue to discuss. On one side, there shoul

[elm-discuss] Re: Can Javascript to start Elm app be attached per page?

2016-11-21 Thread Joel McCracken
Does your layout view load app.js *after* the body has been loaded, akin to how mine does it here? https://github.com/joelmccracken/ef_support/blob/master/web/templates/layout/app.html.eex notice <%= render @view_module, @view_template, assigns %> comes before "> If this is the case, the e

Re: [elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
I prefer Some or None, for understanding. Though, unless Evan didn’t know about them, I guess we’d already have them. > On 20 Nov 2016, at 23:41, Robin Heggelund Hansen wrote: > > How about 'Some' and 'None'? > Those are not longer to type than what we have today, and they should solve > your

Re: [elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread Will White
I thought “something or nothing” would be really good for quick understanding. If Something is really too long, how about Thing (vs Nothing)? Or if noun phrases really matter, how about Have or Got? > On 21 Nov 2016, at 13:12, 'Andrew Radford' via Elm Discuss > wrote: > > I dunno - I don't fi

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread 'Andrew Radford' via Elm Discuss
I dunno - I don't find either a clear winner over the other; years ago when I came across 'Just' I was a little confused because it's not strictly the opposite of 'nothing' when used in spoken English, it's normally used to also express there is a limitation at work, in the presence of a greater

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Michel Rijnders
The issue is that somebody forked our package (truqu/elm-base64) and published it, so now there's two (nearly) identical packages, potentially causing confusion. On Monday, November 21, 2016 at 12:17:33 PM UTC+1, Peter Damoc wrote: > > What is the actual issue here? What are you trying to solve?

Re: [elm-discuss] Unpublishing a package

2016-11-21 Thread Peter Damoc
What is the actual issue here? What are you trying to solve? How would unpublish make your life better? On Mon, Nov 21, 2016 at 12:55 PM, Michel Rijnders wrote: > Hi, > > Is there a way to unpublish a package, i.e. to remove it from > http://package.elm-lang.org/ ? > > Best, > Michel > > -- >

[elm-discuss] Unpublishing a package

2016-11-21 Thread Michel Rijnders
Hi, Is there a way to unpublish a package, i.e. to remove it from http://package.elm-lang.org/ ? Best, Michel -- 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 e