workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | The type signature for `update` looks off. Tho, I dont know why the compiler doesnt catch that. | 2019-02-03T13:41:18.816100 | Ashton |
elmlang | general | Should be `Msg -> Model -> Model`, not just `Model -> Model` | 2019-02-03T13:41:25.816600 | Ashton |
elmlang | general | (right?) | 2019-02-03T13:41:29.817000 | Ashton |
elmlang | general | Ah, right, indeed | 2019-02-03T13:41:44.817300 | Huong |
elmlang | general | Yep that fixes it | 2019-02-03T13:42:06.817600 | Mozella |
elmlang | general | its still an obtuse compiler error though | 2019-02-03T13:42:15.818000 | Mozella |
elmlang | general | Yeah, thats a weird one. | 2019-02-03T13:43:23.818700 | Ashton |
elmlang | general | Yeah, I'd go ahead and log it in the error message catalog (<https://github.com/elm/error-message-catalog>) | 2019-02-03T13:43:28.818900 | Huong |
elmlang | general | <@Ashton> it also says `view : Model -> Html Model` | 2019-02-03T14:08:25.819300 | Nana |
elmlang | general | which I guess would actually work together with `update : Model -> Model` :stuck_out_tongue: | 2019-02-03T14:09:38.820200 | Nana |
elmlang | general | Huh, yeah. I recall some funny type signature stuff leading to some confusing error messages before. One time we had a confusing error message, because none of us could see that for `f : a -> b`, one possible value for `b` is `c -> d -> e -> f`, which means that `a -> c -> d -> e -> f` is a kind of `a -> b`. | 2019-02-03T14:17:54.822500 | Ashton |
elmlang | general | tried making an app with `view : Model -> Html Model` :stuck_out_tongue:
<https://ellie-app.com/4D8KssZknm9a1> | 2019-02-03T14:21:52.823700 | Nana |
elmlang | general | turned out update became `update : Model -> Model -> Model` though | 2019-02-03T14:22:32.824300 | Nana |
elmlang | general | so I guess we missed us, I at least talked to a follow elm user at one point | 2019-02-03T15:24:50.824800 | Desire |
elmlang | general | Hrm. I used ```elm install elm-community/list-extra``` and it installed. Now I'm trying to install ```elm-lang/lazy``` and it goes | 2019-02-03T16:42:25.826400 | Garnet |
elmlang | general | None | 2019-02-03T16:42:33.826500 | Garnet |
elmlang | general | note the version, it' s 2.0.0, but list-extra is at 8.1.0 (maybe higher) | 2019-02-03T16:44:05.827100 | Virgie |
elmlang | general | I think you can fix it by putting the correct (latest) version in your elm.json | 2019-02-03T16:44:20.827500 | Virgie |
elmlang | general | It is, amusingly | 2019-02-03T16:44:42.827800 | Garnet |
elmlang | general | None | 2019-02-03T16:45:08.828000 | Garnet |
elmlang | general | elm-lang/lazy is at 2.0.0 though | 2019-02-03T16:45:36.828500 | Garnet |
elmlang | general | Guess lazy won't work anymore then | 2019-02-03T16:47:41.828700 | Garnet |
elmlang | general | ow, right it doesn' t | 2019-02-03T16:48:10.828900 | Virgie |
elmlang | general | at least, in 0.19 | 2019-02-03T16:48:16.829100 | Virgie |
elmlang | general | Is HamT array still a thing? | 2019-02-03T16:49:02.830100 | Garnet |
elmlang | general | it was removed basically for simplicity; you can often use thunks (so `\_ -> loadsOfWork` ) to prevent expensive computations when they are not used | 2019-02-03T16:49:12.830300 | Virgie |
elmlang | general | HAMT is now the core `Array` | 2019-02-03T16:49:22.830600 | Virgie |
elmlang | general | the other thing that lazy did was memoization (so, requesting an answer twice would only compute it once, then store it) and that is not possible implicitly any more | 2019-02-03T16:50:03.831400 | Virgie |
elmlang | general | Hm, shame ^^ | 2019-02-03T16:50:18.831600 | Garnet |
elmlang | general | And okay, benchmark still a thing? The git repo seems to suggest it's only 0.18 | 2019-02-03T16:50:34.832000 | Garnet |
elmlang | general | it moved to `elm-explorations/benchmark` | 2019-02-03T16:50:47.832300 | Virgie |
elmlang | general | Ah ^^ Thanks | 2019-02-03T16:51:06.832500 | Garnet |
elmlang | general | <@Virgie> oh so Elm used to have built-in memoization? :open_mouth: hope it will come back | 2019-02-03T16:53:33.833600 | Nana |
elmlang | general | it sounds useful, but using it well was/is hard. If I remember correctly the number of practical use cases wasn't that large and it required some js tricks to make it work. Taking into account future garbage collection it was deemed not useful enough | 2019-02-03T16:55:34.835500 | Virgie |
elmlang | general | Sorry for so many questions, but "import Time" fails? Says it's part of core though, so I'm confused. | 2019-02-03T16:55:53.835600 | Garnet |
elmlang | general | it's a separate package now | 2019-02-03T16:56:14.835900 | Virgie |
elmlang | general | Hm | 2019-02-03T16:56:22.836100 | Garnet |
elmlang | general | <https://package.elm-lang.org/packages/elm/time/latest/> | 2019-02-03T16:56:27.836300 | Virgie |
elmlang | general | also the API has changed quite a bit | 2019-02-03T16:56:47.836600 | Virgie |
elmlang | general | I see, how would I get that info? <https://package.elm-lang.org/packages/elm-lang/core/5.1.1/> seems to still list Time | 2019-02-03T16:57:09.837000 | Garnet |
elmlang | general | right, so `elm-lang` moved to`elm` , so it's `elm/core` now | 2019-02-03T16:58:12.837400 | Virgie |
elmlang | general | Oh, I see | 2019-02-03T16:58:48.837600 | Garnet |
elmlang | general | Hm, old native Canvas seemed a bit more powerful. Seems I might have to mod this a bit to draw individual pixels well | 2019-02-03T17:08:54.838200 | Garnet |
elmlang | general | Or not sure how good making a single rect for each pixel would be | 2019-02-03T17:12:22.838700 | Garnet |
elmlang | general | I think there are canvas custom elements available too | 2019-02-03T17:12:34.839000 | Virgie |
elmlang | general | custom elements? | 2019-02-03T17:12:47.839200 | Garnet |
elmlang | general | yea, in current browsers (last couple of years) you can create your own html tags/elements from JS | 2019-02-03T17:13:17.839700 | Virgie |
elmlang | general | and these can be instantiated from elm, and given input via attributes | 2019-02-03T17:13:40.840400 | Virgie |
elmlang | general | which the element (via some js) can turn into whatever | 2019-02-03T17:13:51.840800 | Virgie |
elmlang | general | Hm, well the normal Canvas in JS alraedy has pixel-setting functions, but seems elm doesn't expose those | 2019-02-03T17:14:07.841100 | Garnet |
elmlang | general | Did you solve this? I think youre getting your error is because `elm-lang/lazy` is not upgraded to Elm 0.19 | 2019-02-03T17:14:17.841300 | Ashton |
elmlang | general | exactly, but rather than hacking the elm api, you can use a custom element and some JS to keep the image generation in pure elm, but the precise rendering logic (setting pixels etc) in JS. "hacking" the elm api to draw individual pixels will likely be awkward | 2019-02-03T17:15:06.842600 | Virgie |
elmlang | general | I might just try with rects and see if its okay | 2019-02-03T17:15:07.842800 | Garnet |
elmlang | general | Funny that you guys are talking about this, I just did a ports experiment for canvas: <https://github.com/Chadtech/elm-canvas-ports-experiment> | 2019-02-03T17:15:33.843400 | Ashton |
elmlang | general | My project seems to work. But, also joakin has a great package out there Canvas that doesnt have any ports at all called joakin/elm-canvas | 2019-02-03T17:16:27.844300 | Ashton |
elmlang | general | Just looked at `joakin/elm-canvas` and the examples; <https://chimeces.com/elm-canvas/>
`Fabulous!!` | 2019-02-03T22:13:03.847200 | Jana |
elmlang | general | Does anyone have experience with a `doctest` equivalent for elm? Where you can write unit tests as comments above the function where it’s implemented.
Had a quick look around and <https://github.com/stoeffel/elm-verify-examples> seemed like the nicest implementation, is there any others that I should consider? | 2019-02-04T01:06:59.849800 | Lizabeth |
elmlang | general | I am based in egypt and when visiting <https://guide.elm-lang.org/install.html> the browser states it cannot reach that site | 2019-02-04T01:09:51.850200 | Clarisa |
elmlang | general | This is a bit of a stretch, but here goes: I remember seeing a post in <#C0LUAGWRK|jobs> by a Berlin-based company (as far as I remember they were a web agency). They had open-sourced their employee handbook, and it looked amazing. However, I can’t remember the name of the company, and I really want to look at their employee handbook as inspiration…
Anybody who works for this company, or by chance know which company I’m talking about? Any help is greatly appreciated :pray: | 2019-02-04T01:46:37.853600 | Eloise |
elmlang | general | have you looked at the pinned items on that channel? | 2019-02-04T02:03:41.853900 | Ruthann |
elmlang | general | <@Eloise> | 2019-02-04T02:03:48.854100 | Ruthann |
elmlang | general | <@Ruthann> I have not, but will immediately. Thanks :slightly_smiling_face: | 2019-02-04T02:04:30.854500 | Eloise |
elmlang | general | because slack has archived them, it will appear as you can’t see the whole msg, but this is not true, if you go to try and delete that msg, you’ll get the whole msg with a confirmation to delete. this is a way to see the whole msg, of course don’t delete it | 2019-02-04T02:05:29.855500 | Ruthann |
elmlang | general | Hah, that’s a nice hack :smile: I found it. Thanks a lot! | 2019-02-04T02:07:04.856000 | Eloise |
elmlang | general | (in case anyone wonder, this is it: <https://diesdas.digital/wiki/about-this-wiki>) | 2019-02-04T02:13:41.856500 | Eloise |
elmlang | general | I’m working on a spa. There’s a page with all kinds of filters, and I want to add those filter values as query parameters to the url, but without re-initializing the page, because that would trigger some api requests that are only needed once on init. What would be a good way to do that? | 2019-02-04T03:36:49.859700 | Hwa |
elmlang | general | <@Hwa> `Browser.Navigation.replaceUrl` should do that for you | 2019-02-04T03:57:11.860100 | Nana |
elmlang | general | No, that re-initializes the page through the router. | 2019-02-04T03:57:43.860700 | Hwa |
elmlang | general | <@Hwa> hmm, that shouldn't be necessary though I think | 2019-02-04T03:58:43.861300 | Nana |
elmlang | general | I think that depends on how you've written your code | 2019-02-04T03:59:22.862000 | Nana |
elmlang | general | Wondering if your router can be aware that no page transition is needed and send the path update messages in via a non init mechanism | 2019-02-04T03:59:39.862600 | Simon |
elmlang | general | I wouldn’t know how. `replaceUrl` and `pushUrl` both cause the `onUrlChange` message set in `Browser.application`, and there’s only a `Url` attached to that. | 2019-02-04T04:10:34.864800 | Hwa |
elmlang | general | I could save the Url to the model, and on url change check whether `.path` stays the same. That would catch any changes to the query parameters. | 2019-02-04T04:12:55.866000 | Hwa |
elmlang | general | Just because you have a new url doesn’t mean you have to have a new model, per Simons point. Your router needn’t start by tossing the old model if the path should show the same page. Then you can pass a message into that pages update to reflect the query params in question | 2019-02-04T04:29:03.868800 | Simon |
elmlang | general | Some people have reported issues with accessing Elm’s sites from countries where Telegram being blocked, (e.g Russia). Elm is hosted on AWS within the same ip range, and theres not a lot that can be done about that!
The usual advice is to use a VPN :slightly_smiling_face: | 2019-02-04T09:36:35.874300 | Agustin |
elmlang | general | I think it is due to that, yeah. I just dropped it. | 2019-02-04T13:47:04.876000 | Garnet |
elmlang | general | How can I find the structure of the JSON sent for `onMouseMove`? The documentation just lists it as a Decoder... <https://package.elm-lang.org/packages/elm/browser/latest/Browser-Events#onMouseMove> | 2019-02-04T14:42:14.877000 | Sofia |
elmlang | general | <@Sofia> put this in your console :wink: `addEventListener("mousemove", console.log)` | 2019-02-04T14:44:23.877400 | Nana |
elmlang | general | Ah -- I just wasn't positive it used the default event JSON, or if it was modifying it. | 2019-02-04T14:44:44.877800 | Sofia |
elmlang | general | And I can't figure out how to print the raw JSON from inside Elm. `Debug.log` only shows `<internals>` when logging a `Decode.value` :disappointed: | 2019-02-04T14:45:29.878800 | Sofia |
elmlang | general | Yeah, it's tricky because it also isn't serialisable (cyclic structure). It's just the raw event tho, so mdn can help figure out what to use and what to stay away from :) | 2019-02-04T15:24:40.881300 | Huong |
elmlang | general | how do you guys handle localstorage? | 2019-02-04T15:42:46.881700 | Euna |
elmlang | general | do you pass in a message to the port and dispatch it on subscription recieve | 2019-02-04T15:43:10.882400 | Euna |
elmlang | general | or make different ports per purpose | 2019-02-04T15:43:21.882700 | Euna |
elmlang | general | ie. clear storage, credentials etc | 2019-02-04T15:43:30.883100 | Euna |
elmlang | general | <@Euna> one of the examples here is localstorage <https://github.com/MattCheely/elm-port-examples> | 2019-02-04T15:50:02.883600 | Randee |
elmlang | general | also this video I believe describes the recommended way to design ports <https://www.youtube.com/watch?v=P3pL85n9_5s> which is to say don’t make specific ports for every function/interaction in a library | 2019-02-04T15:51:21.884700 | Randee |
elmlang | general | ty ty | 2019-02-04T15:51:24.884900 | Euna |
elmlang | general | <@Euna> with a port. | 2019-02-04T19:53:52.887300 | Erlene |
elmlang | general | tl;dw for that video? I’ve seen its idiomatic to have basically one port in and one out, but that feels odd to me. | 2019-02-05T03:17:28.888900 | Danika |
elmlang | general | I think it was more about changing the mindset | 2019-02-05T03:19:43.889200 | Lynne |
elmlang | general | I don't think it really matters if you have one port for incoming and one port for outgoing data. Depending on your requirements you can have plenty of them. What's more important is to stop treating JS part as if it is an HTTP backend | 2019-02-05T03:21:00.890300 | Lynne |
elmlang | general | That's my conclusion at least :slightly_smiling_face: | 2019-02-05T03:21:23.890700 | Lynne |
elmlang | general | But since most of the time I am sending values to JS and get values from JS having different ports is just a way to tag messages. Which can also be done with type at Elm side and strings at JS side | 2019-02-05T03:23:24.892100 | Lynne |
elmlang | general | <@Danika> really it's "one port for each thing you want to communicate with" | 2019-02-05T03:24:30.892700 | Earlean |
elmlang | general | imagine you have a server and you've got 10 connections to it and you're sending messages to it over those 10 connections, it's going to be hard to send those messages in any kind of order | 2019-02-05T03:25:35.893800 | Earlean |
elmlang | general | with 1 connection you can send a batch of messages and then wait for a reply | 2019-02-05T03:26:34.894900 | Earlean |
elmlang | general | Ah yes that’s reassuring | 2019-02-05T03:27:40.896000 | Danika |
elmlang | general | but if you have 20 servers you need to have 20 connections and you're generally not going to expect to be able to maintain an order in the messaging between all 20 servers | 2019-02-05T03:27:42.896100 | Earlean |
elmlang | general | The way Elm ports are designed is the 'actor model', it's what Erlang does. | 2019-02-05T03:28:54.896900 | Earlean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.