workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
Is there anything else that could be afoot?
2019-01-15T21:24:00.457800
Lesli
elmlang
general
This works for me: <https://ellie-app.com/4sPQp6kD9mya1>
2019-01-15T21:28:09.458000
Earnest
elmlang
general
Thanks <@Earnest>, that's essetnially what we're doing as well. The other 4 ports work, it's just the one with the `() -&gt; Cmd msg` signature that doesn't..
2019-01-15T21:32:40.458200
Lesli
elmlang
general
Never mind got it, the app structure threw us off onto the wrong file... thanks again :slightly_smiling_face:
2019-01-15T21:36:45.458400
Lesli
elmlang
general
<@Jenni> Elm already produces the best tree-shakable code of all though Elm's VDOM can probably be sped up further as well, looking at [Inferno.js](<https://infernojs.org/>) for example
2019-01-15T23:10:57.460200
Nana
elmlang
general
:thumbsup:
2019-01-15T23:23:07.460700
Jenni
elmlang
general
I'm making a few demo project of a more-or-less mainstream JavaScript stack that approximates Elm. Of course it's not as nice, but my thought is that if I could get JS teams to this combination of stuff (React, Redux, Redux-Loop, Flow) then Elm would be an easier migration. Any ideas for catchy names for this JS stack?
2019-01-16T00:08:27.464100
Yolande
elmlang
general
Oh, how is Flow doing? I see there's a lot of push for TypeScript now.
2019-01-16T00:40:20.466300
Jake
elmlang
general
"rrl" is free on npm :-)
2019-01-16T00:42:23.468300
Jake
elmlang
general
“almost-elm”
2019-01-16T00:43:39.468600
Leoma
elmlang
general
"Elmish", but that's already taken for F# :stuck_out_tongue:
2019-01-16T00:46:59.469300
Nana
elmlang
general
Flow is pretty good as an 80% kinda thing. Some parts are funny. For example, you can declare that a function takes a string and returns a two-element tuple of numbers, but your function can easily return more or less than two
2019-01-16T00:54:36.473100
Yolande
elmlang
general
Come join Me and another new Elm-er - We're going to this weekend game jam at Noisebridge in mission to build a game in elm <https://www.meetup.com/SF-Bay-Area-Game-Jamming-Game-Design/events/257602179/> Heads up to anyone that wants to join!
2019-01-16T00:55:40.474800
Colette
elmlang
general
I don’t have a good sense of how Flow compares to TypeScript, but from reading about them it seemed like Flow is more Elm-like of the two. The fact that you can run Flow on vanilla JavaScript seems advantageous for my boil-the-frog approach
2019-01-16T00:57:24.476700
Yolande
elmlang
general
welcome, please see <https://github.com/elm/projects>
2019-01-16T02:52:24.477500
Desire
elmlang
general
Flow is type annotations, typescript is a programming language
2019-01-16T03:11:16.478700
Danika
elmlang
general
Hi folks, is there a way to cancel a http request? The situation is I have a list of checkbox, people toggle a checkbox will trigger a request with checked items as parameters, so when the user toggle multiple checkboxes quickly, it will fire multiple requests, I want to keep the last request and just ignore others.
2019-01-16T03:19:22.481500
Raymonde
elmlang
general
<@Raymonde> You can cancel a http request using <https://package.elm-lang.org/packages/elm/http/latest/Http#cancel> but you're probably better off not making multiple requests in the first place.
2019-01-16T03:21:53.482400
Earlean
elmlang
general
since if you cancel a request you don't know whether it succeeded or failed or was never processed by the server
2019-01-16T03:22:58.483200
Earlean
elmlang
general
<@Earlean> I noticed `cancel` work on request based on a tracker, seems like the type of requests download files. Is any request can be tracked the progress?
2019-01-16T03:34:43.484800
Raymonde
elmlang
general
<@Danika> well, typescript is still mostly just type annotations for js, it just has a few extra extensions I think
2019-01-16T03:39:27.485900
Nana
elmlang
general
Hello all! Did something change w/ decoding to a Tuple in [email protected]? I’m getting the following compiler message (which I thought worked previously): ```Something went wrong while parsing an expression (in parentheses) in subscriptions's definition. 281| (D.map2 (,) (D.succeed 0) (D.succeed 1)) ^ I was expecting: - an expression, like x or 42 - a closing paren - a minus sign (-) - an infix operator, like (+) or (==) ```
2019-01-16T11:25:58.489800
Kayleigh
elmlang
general
the `(,)` syntax got removed
2019-01-16T11:26:27.490400
Virgie
elmlang
general
use `Tuple.pair`
2019-01-16T11:26:44.490800
Earlean
elmlang
general
<@Earlean> got it thanks! I must have forgotten that
2019-01-16T11:27:15.491500
Kayleigh
elmlang
general
hi all. I have a problem with <https://package.elm-lang.org> connection timed out =( for this reason elm install doesn't work as well
2019-01-16T11:37:37.492600
Fabiola
elmlang
general
are you in Russia? I believe there are some issues with accessing the elm website from there
2019-01-16T11:38:28.493100
Virgie
elmlang
general
yep, in Russia
2019-01-16T11:38:41.493300
Fabiola
elmlang
general
I see
2019-01-16T11:38:46.493600
Fabiola
elmlang
general
but then why is <http://elm-lang.org|elm-lang.org> is working? That's kinda strange to block only second level domain
2019-01-16T11:40:34.494600
Fabiola
elmlang
general
wasn't that like the whatsapp blocks aka some blocking some random cloud servers
2019-01-16T11:42:55.496100
Desire
elmlang
general
I don't know much more about it, only that this has been an issue (and that as far as I know there is nothing we the elm community can do about it)
2019-01-16T11:43:28.496700
Virgie
elmlang
general
I see
2019-01-16T11:44:02.497100
Fabiola
elmlang
general
russia blocked ~16 million IPs due to the ban of the Telegram messenger, some IPs from google cloud and AWS are included in there so it caused some collateral damage and blocked unrelated things as well
2019-01-16T11:45:02.498200
Alicia
elmlang
general
if you have access to a VPN I think that is the easiest way though, it isn’t ideal I know :confused:
2019-01-16T11:45:35.498600
Alicia
elmlang
general
yeah, looks like VPN is an option to go
2019-01-16T11:48:03.499600
Fabiola
elmlang
general
Does anyone know a good way to do mouse subs in v0.19
2019-01-16T13:34:29.501000
Freida
elmlang
general
the subscriptions moved to the `Browser` package, or are you looking for something more high-level?
2019-01-16T13:41:32.501500
Virgie
elmlang
general
Yeah I'm trying to get the coordinates of the mouse position, with the previous package it seemed to be a little bit easier. Currently I'm using JSON decoder to try to get the x and y, but haven't had any luck yet (well some luck, but the numbers are way off)
2019-01-16T14:06:47.503100
Freida
elmlang
general
Thanks!
2019-01-16T14:15:46.503200
Jae
elmlang
general
When run `elm install elm/file` I'm no longer able to run tests. Instead I get this error ```The dependencies in your elm.json are not compatible. Did you change them by hand? Try to change it back! It is much better to add dependencies with elm install or the dependency management tool in elm reactor.``` I'm guessing `elm-explorations/test` relies on an older version of a package `elm/file` also uses. How do I fix this?
2019-01-16T15:28:14.505100
Jae
elmlang
general
<@Jae> <https://github.com/elm-explorations/test/issues/54>
2019-01-16T15:30:38.505400
Virgie
elmlang
general
tldr make elm/json a direct dependency
2019-01-16T15:31:01.505700
Virgie
elmlang
general
Yup, that works. Thanks!
2019-01-16T15:32:10.505900
Jae
elmlang
general
I'm not sure how I'm supposed to use elm/parser. This example helps (<https://github.com/elm/parser/blob/1.1.0/examples/DoubleQuoteString.elm>) but what is the `run` keyword?
2019-01-16T16:38:46.507100
Yolande
elmlang
general
ah, `Parser.run`
2019-01-16T16:39:16.507500
Yolande
elmlang
general
exactly
2019-01-16T16:39:27.507700
Virgie
elmlang
general
<https://github.com/elm/parser/blob/1.1.0/src/Parser.elm#L95>
2019-01-16T16:39:36.507900
Danika
elmlang
general
^^
2019-01-16T16:39:50.508100
Danika
elmlang
general
this is why exposing everything in an import is discouraged btw
2019-01-16T16:40:13.508500
Danika
elmlang
general
that example would be much clearer if `import Parser exposing (run)` or `Parser.run` were used
2019-01-16T16:40:38.509200
Danika
elmlang
general
Can I make a type alias for `(Int, Int)`?
2019-01-16T17:09:04.509600
Yolande
elmlang
general
Sure
2019-01-16T17:09:31.509800
Carman
elmlang
general
`type alias TwoIntegers = (Int, Int)`
2019-01-16T17:09:45.510300
Carman
elmlang
general
aliases are alternate names for existing types
2019-01-16T17:10:13.510800
Carman
elmlang
general
you can alias any type you want
2019-01-16T17:10:18.511100
Carman
elmlang
general
if it can be seen in a type signature, it can be aliased
2019-01-16T17:10:29.511400
Carman
elmlang
general
Gotcha. Thought so. I think I'm also confused about how `succeed` works in elm/parser
2019-01-16T17:11:02.512200
Yolande
elmlang
general
even function types can be aliased: `type Predicate a = a -&gt; Bool`
2019-01-16T17:11:03.512300
Carman
elmlang
general
`succeed TwoIntegers` gives "I cannot find a `TwoIntegers` constructor"
2019-01-16T17:11:40.513500
Yolande
elmlang
general
Note that you don't need a type alias to use parsers
2019-01-16T17:11:40.513600
Carman
elmlang
general
Didn't think so either, but good to know
2019-01-16T17:11:53.514200
Yolande
elmlang
general
`succeed` wants a function
2019-01-16T17:12:05.514400
Carman
elmlang
general
when you alias records Elm will automatically create a constructor function of the same name
2019-01-16T17:12:25.515100
Carman
elmlang
general
ah but not tuples
2019-01-16T17:12:40.515500
Yolande
elmlang
general
To parse into a tuple you could use a lambda `succeed (\x y -&gt; (x, y))`
2019-01-16T17:13:05.515900
Carman
elmlang
general
or alternatively the tuple constructor from the core library `succeed Tuple.pair`
2019-01-16T17:13:31.516500
Carman
elmlang
general
nice, thanks!
2019-01-16T17:14:39.516800
Yolande
elmlang
general
Has anyone run into this error
2019-01-16T19:24:34.516900
Freida
elmlang
general
Is `Json` a module in your package? Did you mean `Json.Encode` or `Json.Decode`?
2019-01-16T19:25:36.517200
Earnest
elmlang
general
I'm trying to import elm/json
2019-01-16T19:26:02.517400
Freida
elmlang
general
There's no `Json` module in that project, just the two I mentioned above
2019-01-16T19:26:32.517600
Earnest
elmlang
general
`import Json` doesn't import both of them, if that's what you were trying to do
2019-01-16T19:26:52.517800
Earnest
elmlang
general
I usually do something like ``` import Json.Decode as Decode exposing (Decoder) import Json.Encode as Encode exposing (Value) ```
2019-01-16T19:27:20.518000
Earnest
elmlang
general
So I'm assuming this does not work ``` Browser.Events.onClick (Json.map message (<http://Json.at|Json.at> ["offsetLeft"] <http://Json.int|Json.int>))```
2019-01-16T19:28:27.518200
Freida
elmlang
general
not unless you do `import Json.Decode as Json`
2019-01-16T19:28:50.518400
Earnest
elmlang
general
then any use of Json in your code will refer to the Json.Decode module
2019-01-16T19:29:11.518600
Earnest
elmlang
general
With Elm 0.19, does anyone know where the Http.uriEncode method went? I'm building a querystring and need to make sure the params I add to it will cooperate.
2019-01-16T23:19:30.519800
Marcus
elmlang
general
Looks like it's in the Url package now.
2019-01-16T23:22:31.520100
Marcus
elmlang
general
The `Url.Builder` is the new way to build your urls. Or if that proves hard when migrating `percentEncode` is also available
2019-01-17T01:26:54.520200
Maryrose
elmlang
general
What is the best way to build elm package (not an application) on a CI?
2019-01-17T01:45:37.520700
Zachary
elmlang
general
I just call elm-make: <https://github.com/prikhi/paginate/blob/master/.travis.yml#L26>
2019-01-17T01:50:27.520900
Earnest
elmlang
general
Maybe I should use jq to extract all exposed modules
2019-01-17T01:53:44.521300
Zachary
elmlang
general
Ah it requires all modules live in `src`
2019-01-17T01:55:45.521600
Zachary
elmlang
general
:man-facepalming:
2019-01-17T01:56:05.521800
Zachary
elmlang
general
there's no way to configure source-directories for packages?
2019-01-17T02:05:23.522200
Zachary
elmlang
general
I'm confused about elm/color. Here's a repo: <https://github.com/elm/color>. Here it looks like it's part of the standard library: <https://package.elm-lang.org/packages/elm-lang/core/latest/Color>. `import Color` says "I cannot find that module!". `elm install elm/color` says PACKAGE NOT FOUND. How do I use elm/color in my project?
2019-01-17T03:05:56.524700
Yolande
elmlang
general
<@Yolande> it was in core in Elm 0.18, it's was moved out of core, but never released
2019-01-17T03:16:37.526200
Earlean
elmlang
general
<https://package.elm-lang.org/packages/avh4/elm-color/latest/> is a fork of that package
2019-01-17T03:17:14.526700
Earlean
elmlang
general
no <https://github.com/elm/compiler/blob/master/docs/elm.json/package.md>
2019-01-17T03:18:04.526800
Velia
elmlang
general
<@Zachary> I’ll get working on changing that
2019-01-17T03:42:20.527200
Iona
elmlang
general
There uesd to be an archive of Elm Slack IIRC at <https://elmlang.slackarchive.io/> but now it redirects to the source repo on GitHub. Is there anything like that around? I need to find a link to the Ellie example I was discussing here few months ago :neutral_face:
2019-01-17T03:53:51.529400
Dorsey
elmlang
general
thanks!
2019-01-17T03:56:36.529600
Zachary
elmlang
general
cool, thanks <@Earlean>
2019-01-17T04:25:24.529900
Yolande
elmlang
general
what does it mean that elm has drag and drop support in the standard library? im watching this video: <https://youtu.be/RFrKffrKCeU?t=281>
2019-01-17T04:44:33.530400
Yang
elmlang
general
I think she means possibility to add arbitrary event handlers (with help of `Html.Events.on` and other functions from that module), possibly comparing with earlier versions of Elm where there was no such possibility (I am guessing)
2019-01-17T04:48:57.531900
Lynne
elmlang
general
Or may be she refers to <https://package.elm-lang.org/packages/norpan/elm-html5-drag-drop/> for some reason calling it "standard library"
2019-01-17T04:51:19.532600
Lynne
elmlang
general
The main thing here is that implementing drag and drop in Elm is possible nowadays without single line of JS code
2019-01-17T04:51:56.533200
Lynne
elmlang
general
<@Dorsey> - nope, once the message disappears behind the 10,000 limit you won't be able to see it
2019-01-17T05:04:46.533900
Rosalind
elmlang
general
Hey all, what would you name a ternary conditional function in Elm? So something that takes a condition and returns the second argument if true, and the third if not.
2019-01-17T08:17:30.535400
Leonore