workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
<@Earlean> btw, is the intention that processes will eventually run in web workers?
2019-03-21T18:29:28.542200
Nana
elmlang
general
I think that may have been the plan. There was also talk of a port of Elm to the Erlang BEAM VM
2019-03-21T18:31:44.543800
Earlean
elmlang
general
Here's the project page for Elm Beam <https://kofi.sexy/blog/elm-beam.html>
2019-03-21T18:50:04.544100
Lory
elmlang
general
Interesting
2019-03-21T19:04:13.544300
Isaias
elmlang
general
Isn't there also elchemy which indirectly gets Elm code running on the BEAM (via elixir)? <https://github.com/wende/elchemy>
2019-03-21T19:07:31.545200
Lizabeth
elmlang
general
Could you paste the code on Github Gist? Ellie does not work on my (browser) machine.
2019-03-21T22:47:07.545500
Yolando
elmlang
general
Ports question: is there any way to get a return value when calling into JS from Elm? I’m not seeing one in the Guide, but perhaps I’m overlooking it.
2019-03-21T23:49:56.546500
Dede
elmlang
general
I guess I have to set up a second port to subscribe to from Elm and handle this fully asynchronously, even though the JS subroutine is synchronous.
2019-03-21T23:53:22.547400
Dede
elmlang
general
Yup, that’s right
2019-03-21T23:56:06.547800
Kris
elmlang
general
I've found this to be a wonderful resource (for elm in general), but this particular section goes into your question a fair bit: <https://elmprogramming.com/receiving-data-from-javascript.html>
2019-03-21T23:56:25.548300
Lizabeth
elmlang
general
<@Dede> Elm ports are based on the 'actor model' of concurrency. It's fully asynchronous.
2019-03-21T23:58:04.549300
Earlean
elmlang
general
Thanks.
2019-03-22T00:00:36.550000
Dede
elmlang
general
Given a model following Feldman's immutable relational data, how then does that affect how people store/interact with their data on the back end? I know people use various languages and such but I'm wondering about normalized / denormalized, graphdb's, graphql, firebase even? What have been some successful approaches for people w/ reg. to building API's for consumption by an Elm front end?
2019-03-22T02:00:02.553400
Buffy
elmlang
general
Hi everybody, it's the last day of earlybird. <https://elmeurope.org>, because tomorrow we release the speakers ! And if you like good content you'll be happy :)
2019-03-22T02:28:04.555100
Valeria
elmlang
general
What would be the right way to handle links like `a [] [ href "<mailto:[email protected]>"]` in `Browser.application`? I'm getting clicks on these links as `Browser.External "mailto..."` messages. But I don't want to do `Browser.Navigation.load` which leaves the page. But I still want it to open email client. Not sure how to achieve that.. Anyone else encountered this?
2019-03-22T03:54:38.555500
Exie
elmlang
general
May providing `target "_blank"` solve the issue for you?
2019-03-22T04:16:18.556100
Lynne
elmlang
general
Yes, that works for me. Thanks for the tip
2019-03-22T04:52:25.556600
Exie
elmlang
general
I plan to implement pagination. I'm looking at the jschomay elm-paginate 3.1.1 package. I my case, I fetch data from a rest API with support for pagination (Spring). Is it beneficial to use the elm-paginate package? It seems I must provide a full list of data to it, instead of fetching page by page from the REST API...
2019-03-22T05:05:09.560100
Arie
elmlang
general
elm-formate --version throw er; // Unhandled 'error' event ^ Error: spawn /Users/Documents/workspace/node_modules/elm-format/unpacked_bin/elm-format ENOENT
2019-03-22T06:51:42.560400
Chi
elmlang
general
any fix for this issue
2019-03-22T06:52:01.560800
Chi
elmlang
general
maybe try deleting node_modules and re-installing?
2019-03-22T06:53:26.561200
Shenita
elmlang
general
Just stupid question is it possible in elm create int / float that is just infinity ?
2019-03-22T06:56:21.562400
Liza
elmlang
general
`String.toFloat "Infinity"` <https://ellie-app.com/53Vfxqf6nFCa1>
2019-03-22T07:04:53.562900
Sharon
elmlang
general
`1 / 0` is another way.
2019-03-22T07:09:31.563200
Timika
elmlang
general
So there is isInfinity but no const for it ?
2019-03-22T07:16:44.564100
Liza
elmlang
general
Yeah, no constant yet.
2019-03-22T07:17:13.565100
Timika
elmlang
general
1/0 - that is what I’m thinking how to create that..
2019-03-22T07:17:19.565400
Liza
elmlang
general
Interesting, the `1 // 0` resulting in an `Infinity` with a type of `Int` has been fixed in Elm 0.19: ``` &gt; 1 // 0 0 : Int ```
2019-03-22T07:53:25.567800
Bert
elmlang
general
is 0 really better than including Infinity as an Int though? :thinking_face: with Infinity `1 // 0 &gt; 1 // 1` would be True, which seems like a good thing
2019-03-22T07:58:58.567900
Nana
elmlang
general
but I guess not having Infinity makes interop with other languages more consistent
2019-03-22T08:00:20.568100
Nana
elmlang
general
The reason it was removed for `//` is that `Infinity` has type `Float`
2019-03-22T09:38:26.568500
Huong
elmlang
general
so it shouldn't be result of integer division
2019-03-22T09:40:08.568700
Huong
elmlang
general
<@Huong> wouldn't it be up to Elm to decide though? JS just has `Number` after all
2019-03-22T09:41:38.568900
Nana
elmlang
general
Sure, but that decision also means opening another can of worms :shrug:
2019-03-22T09:42:39.569100
Huong
elmlang
general
<@Huong> actually Ints can still be Infinity :open_mouth: <https://ellie-app.com/53XHgmkRzDva1>
2019-03-22T09:46:45.569400
Nana
elmlang
general
Yeah, there;'s still a bunch of bugs related to that :disappointed:
2019-03-22T09:47:05.569600
Huong
elmlang
general
maybe `round (1/0)` should return `Number.MAX_SAFE_INTEGER`
2019-03-22T09:47:53.569800
Nana
elmlang
general
I guess that could also be an option for `1 // 0`, or maybe that'd be weird :thinking_face:
2019-03-22T09:48:47.570000
Nana
elmlang
general
There's no good value for `x/0` - sometimes it's `Infinity`, but other times it's 0 or a real number (calculating the derivative of a function is an example of a "zero denominator", but a sensible number comes out). Having a "safe division" function that returns `Indeterminate | Real num` is one solution, but there's not really a reason to prefer `1//0 -&gt; Infinity` over `1//0 -&gt; 0` if you want a pragmatic division operator.
2019-03-22T10:23:24.570500
Kymberly
elmlang
general
Absolutely! <@Yolando>: <https://gist.github.com/lytedev/d1f22b44875f97f8f7f3100d97cdde9e>
2019-03-22T10:27:53.570700
Amie
elmlang
general
This passed on Slack not too long ago: <https://www.hillelwayne.com/post/divide-by-zero/>
2019-03-22T10:36:20.571000
Hoa
elmlang
general
I cannot understand it all, but it gives some context.
2019-03-22T10:36:59.571400
Hoa
elmlang
general
I'm happy using elm/html but boy was it hard to hand over to a designer yesterday. What're people's thoughts on elmx (or other options)?
2019-03-22T12:16:51.572600
Kymberly
elmlang
general
what do you mean, what sort of handover are you talking about
2019-03-22T12:20:45.572700
Shelli
elmlang
general
I've got the "beta" version of a dashboard written in Elm, now it's time to make it look decent. Our designer was not excited about (aka "willing to") write Elm code to add css classes and such.
2019-03-22T12:34:52.572900
Kymberly
elmlang
general
He wants an html file / templating language that looks like html. :confused:
2019-03-22T12:35:33.573100
Kymberly
elmlang
general
We use zeplin, the designers publish designs from sketch into it, and we use that to build the elm
2019-03-22T12:36:22.573300
Augustus
elmlang
general
There are extensions for vscode that convert html into elm “in place”
2019-03-22T12:42:15.574000
Danika
elmlang
general
Rather than elmx which is old and unmaintained afaik
2019-03-22T12:42:41.574900
Danika
elmlang
general
I think elmx is a pretty bad idea, it's an extra build step that can go wrong, you lose things like IDE support, and very few people seem to use it
2019-03-22T12:42:42.575100
Nana
elmlang
general
start with a html-&gt;elm tool, and maybe soon your designer will realize that the mapping between html and elm-html is actually pretty simple
2019-03-22T12:44:33.575400
Nana
elmlang
general
Danke!
2019-03-22T13:39:54.575600
Yolando
elmlang
general
Is there any documentation on what goes in the elm.json file? For instance, what is the difference between the direct and indirect dependencies and the differences between the contents for the application and package types.
2019-03-22T14:31:00.577900
Vallie
elmlang
general
<https://github.com/elm/compiler/blob/0.19.0/docs/elm.json/application.md>
2019-03-22T14:33:45.578000
Lynne
elmlang
general
<https://github.com/elm/compiler/blob/0.19.0/docs/elm.json/package.md>
2019-03-22T14:33:55.578200
Lynne
elmlang
general
Shortly, direct dependencies are ones installed by you
2019-03-22T14:34:07.578400
Lynne
elmlang
general
Indirect dependencies are ones required by the direct dependencies
2019-03-22T14:34:28.578600
Lynne
elmlang
general
`elm install` handles them on its own
2019-03-22T14:34:42.578800
Lynne
elmlang
general
OK. Thanks for that.
2019-03-22T14:35:39.579000
Vallie
elmlang
general
I’m accustomed to the flow going the other way — designer hands over images developed in designer toolchain (e.g. photoshop, etc.), developer implements the images using the dev toolchain.
2019-03-22T14:58:31.579300
Dede
elmlang
general
Is that an option in your circumstances?
2019-03-22T14:59:15.579600
Dede
elmlang
general
I think they are separate disciplines and the designer should not be responsible for implementing their designs in code. I could see converting HTML to Elm for a static page, but adding animations and interactivity will blur the line between design and development, how would a designer add something like a fade-out effect when a panel closes? It would likely require some changes in Elm state to keep the component around in the DOM until the animation finishes
2019-03-22T14:59:46.579800
Alicia
elmlang
general
if you haven’t seen it check out <https://zeplin.io/> <@Dede>, it is like the old photoshop mocks on steroids, you can measure things, see colors, generated CSS, and a lot more
2019-03-22T15:00:36.580000
Alicia
elmlang
general
I hadn’t seen that one, although there’s plenty of others I have seen — Photoshop was just a handy go-to :wink:
2019-03-22T15:01:32.580300
Dede
elmlang
general
ah true :slightly_smiling_face:
2019-03-22T15:01:38.580500
Alicia
elmlang
general
&gt; blur the line between design and development Is that a bad thing?
2019-03-22T15:39:56.580700
Huong
elmlang
general
depends on your situation, on a smaller team I don’t think it is so bad
2019-03-22T15:52:10.580900
Alicia
elmlang
general
in a larger organization I would consider it a sign of poor organization, presumably your developers are better at development than the designers, and the designers are better at designing things than the developers. Having them trade jobs would be inefficient for both
2019-03-22T15:53:45.581100
Alicia
elmlang
general
Have someone tried 2 or 3 different datetime pickers who can recommend me one good datetime picker?
2019-03-22T15:59:54.582300
Rosann
elmlang
general
At almost any size, the tools designers want to use to iterate fast during their design process differ significantly than the tools developers want to use to implement.
2019-03-22T16:06:04.582400
Dede
elmlang
general
Sure. I just don't see why it would be a problem or inherently inefficient for someone to be able to do both. I wish I had enough time to teach my UI/UX coworkers Elm and help them explore how their designs translate to reality.
2019-03-22T16:25:08.582600
Huong
elmlang
general
Designers are smart people, the syntax of Elm in your `view` is quick to learn but nobody will be happy if you just turn up one day with a pile of code in a syntax they've never seen and expect them to do the hard work of learning in a hurry. You should have got buy in for the designer earlier on before going down the Elm path. Allocated them specific learning time and addressed and acknowledged their tooling needs.
2019-03-22T16:50:44.582800
Earlean
elmlang
general
^WHAT SHE SAYS! Love your designers!
2019-03-22T17:04:19.583000
Shelli
elmlang
general
Trying to setup Atom for Elm for a friend, but it keeps complaining that elm-format doesn't know which version of Elm we're using. Any idea how to fix this? Thanks :heart:
2019-03-23T07:03:39.587700
Janna
elmlang
general
Is `elm` command on PATH?
2019-03-23T07:19:49.588100
Lynne
elmlang
general
Also, is working directory pointing to where `elm.json` is?
2019-03-23T07:20:36.588500
Lynne
elmlang
general
You could take the output of your elm program and save that as HTML, then give that to your designer. You could then diff what you gave them against what they give you back and make the appropriate changes in Elm.
2019-03-23T07:49:54.588700
Maida
elmlang
general
<@Lynne> `elm` works in cmd and git bash, so yes. I'm not sure about working directory, but I'll check it out. Thanks :slightly_smiling_face:
2019-03-23T07:56:36.589300
Janna
elmlang
general
Hey! was wondering if it is possible to implement this in elm?
2019-03-23T08:00:45.590100
Corine
elmlang
general
<http://www.haskellforall.com/2012/05/scrap-your-type-classes.html>
2019-03-23T08:00:46.590300
Corine
elmlang
general
tried to do it... ended up a mess...
2019-03-23T08:01:24.591100
Corine
elmlang
general
it also doesn't work for stuff like `Functor`, because in elm all type variables are of kind `*`/`Type` (currently)
2019-03-23T08:02:00.591900
Virgie
elmlang
general
so * -&gt; * is not possible?
2019-03-23T08:02:30.592500
Corine
elmlang
general
right
2019-03-23T08:02:41.592700
Virgie
elmlang
general
going to past my code snippet, its a disaster...
2019-03-23T08:02:57.593400
Corine
elmlang
general
limits it to `Monoid` and `Semigroup` really
2019-03-23T08:03:00.593500
Virgie
elmlang
general
i see
2019-03-23T08:03:22.593700
Corine
elmlang
general
None
2019-03-23T08:03:58.593800
Corine
elmlang
general
tried to force it
2019-03-23T08:04:08.594200
Corine
elmlang
general
well trying to make anything do something it wasn't designed for is going to be ugly
2019-03-23T08:04:46.594700
Virgie
elmlang
general
this means recursive data types are also not possible?
2019-03-23T08:08:57.596100
Corine
elmlang
general
Custom List?
2019-03-23T08:09:04.596300
Corine
elmlang
general
no, `type L a = N | S a (L a)` is possible, because `L a` is of kind `*`
2019-03-23T08:09:45.596900
Virgie
elmlang
general
ah cool, right...
2019-03-23T08:10:49.597400
Corine
elmlang
general
thanks for the help :smile: !
2019-03-23T08:13:25.597700
Corine
elmlang
general
wait NO!
2019-03-23T08:13:50.597900
Corine
elmlang
general
been looking into the haskell Miso framework, inspired by Elm architecture
2019-03-23T08:14:13.598500
Corine
elmlang
general
any experience with it?
2019-03-23T08:14:18.598800
Corine
elmlang
general
not really, big problem with it is that the haskell runtime (in full) has to be compiled and distributed with it
2019-03-23T08:15:01.599700
Virgie
elmlang
general
which is overkill for the vast majority of apps
2019-03-23T08:15:19.600100
Virgie