workspace stringclasses 4
values | channel stringclasses 4
values | text stringlengths 1 3.93k | ts stringlengths 26 26 | user stringlengths 2 11 |
|---|---|---|---|---|
elmlang | general | This is some high impact stuff on the language and once it is in the language, it most likely cannot be taken away. The default stance has been “wait and see” | 2019-04-06T07:26:51.622000 | Maida |
elmlang | general | “module functors” are what you call “parametrized modules”
<https://github.com/elm/compiler/issues/1039> | 2019-04-06T07:28:34.622200 | Maida |
elmlang | general | if you want to take a look at some of the discussions you can also search the old `elm-discuss` forum for “parametrized modules” or “module functors” | 2019-04-06T07:30:25.622400 | Maida |
elmlang | general | Thanks! I’ll have a look | 2019-04-06T07:34:37.622700 | Jae |
elmlang | general | I'm having issues with ports not sending data back to elm. Sometimes it works, sometimes it doesn't and I have no idea why. | 2019-04-06T13:51:36.623800 | Isaiah |
elmlang | general | the javascript code is clearly working, as evidenced by logging to the console, but it only sometimes successfully sends that data to elm. Could there be a race condition of some sort for setting up the subscriber? It seems to fail randomly | 2019-04-06T13:53:03.625400 | Isaiah |
elmlang | general | It turns out is *was* a race condition. I had to nest function calls inside of callbacks in the javascript to get it to sequence correctly. :see_no_evil: thanks for nothing javascript | 2019-04-06T14:02:52.626700 | Isaiah |
elmlang | general | well that didn't last long. Still not solved. | 2019-04-06T14:11:32.627000 | Isaiah |
elmlang | general | I'm running into some weird behaviour when using `Decode.oneOf` within an event handler. When I'm using a value from the model within this decoder, not the correct value is used, but instead always the initial value when the app was started. I reduced it to <https://ellie-app.com/5bJXXF3gZBja1>. To observe this behavio... | 2019-04-06T14:23:33.631500 | Manuela |
elmlang | general | I’m not seeing what you describe. | 2019-04-06T14:43:48.631700 | Dede |
elmlang | general | Which is to say, I see the value in the textbox change, and the model.value change in the console. | 2019-04-06T14:44:20.632200 | Dede |
elmlang | general | Oh, hey, now I’m reproducing some of it. Hang on. | 2019-04-06T14:46:46.632800 | Dede |
elmlang | general | Oh, I see. | 2019-04-06T14:48:11.633000 | Dede |
elmlang | general | So, hypothesis: | 2019-04-06T14:49:21.633400 | Dede |
elmlang | general | You are capturing (Value model.value) when you define your decoder when the view is first drawn. That gets baked into the click handler, because it’s evaluated when `view` is. It gets stale as you update model.value until `view` in its entirety gets called again. | 2019-04-06T14:51:01.635000 | Dede |
elmlang | general | Hm, but then it's interesting that removing the `oneOf` fixes this :slightly_smiling_face: So, maybe this is a bug? | 2019-04-06T14:52:26.635800 | Manuela |
elmlang | general | Yeah. | 2019-04-06T14:54:18.636200 | Dede |
elmlang | general | And it’s not totally consistent in reproducing for me. | 2019-04-06T14:54:24.636500 | Dede |
elmlang | general | I suspect there’s something about the decoder that is fooling the vdom differ and leaving the old event handler in place or something. | 2019-04-06T14:54:59.637200 | Dede |
elmlang | general | (Insert hands waving wildly) | 2019-04-06T14:55:07.637400 | Dede |
elmlang | general | :smiley: ok cool, thanks for trying it out as well! | 2019-04-06T14:55:57.638000 | Manuela |
elmlang | general | Are you able to reproduce every time?
It’s only happened for me once. | 2019-04-06T14:56:30.638300 | Dede |
elmlang | general | for me it happens every time | 2019-04-06T14:56:45.638600 | Manuela |
elmlang | general | I’m on chrome/mac. | 2019-04-06T14:56:57.638800 | Dede |
elmlang | general | You? | 2019-04-06T14:56:59.639000 | Dede |
elmlang | general | firefox on linux | 2019-04-06T14:57:17.639200 | Manuela |
elmlang | general | let me try chrome | 2019-04-06T14:57:23.639500 | Manuela |
elmlang | general | seems to be consistent on chrome as well | 2019-04-06T14:58:06.639800 | Manuela |
elmlang | general | I can’t reproduce on Safari. I can’t actually reproduce again on Chrome either. | 2019-04-06T14:58:42.640200 | Dede |
elmlang | general | Can you give me a precise recipe? | 2019-04-06T14:58:49.640500 | Dede |
elmlang | general | I open the console, then i type something into the input field (such that the value is not "initial" anymore) then i click in the input field. | 2019-04-06T14:59:22.641100 | Manuela |
elmlang | general | How do you get focus to the input field? | 2019-04-06T14:59:30.641300 | Dede |
elmlang | general | How do you open the console? | 2019-04-06T14:59:41.641800 | Dede |
elmlang | general | ok, first i click into the input field, sorry :slightly_smiling_face: | 2019-04-06T14:59:44.641900 | Manuela |
elmlang | general | Huh. | 2019-04-06T15:00:11.642500 | Dede |
elmlang | general | Yeah, I just can’t reproduce. | 2019-04-06T15:00:15.642800 | Dede |
elmlang | general | It only happened that one time. | 2019-04-06T15:00:19.643000 | Dede |
elmlang | general | via right-click-menu inspect, and then to the console | 2019-04-06T15:00:19.643100 | Manuela |
elmlang | general | ok, thats really weird then :smile: | 2019-04-06T15:00:39.643500 | Manuela |
elmlang | general | what chrome version? | 2019-04-06T15:01:07.643900 | Manuela |
elmlang | general | I don’t have a linux box handy here, sadly. | 2019-04-06T15:01:15.644100 | Dede |
elmlang | general | Chrome: Mac OS Version 73.0.3683.86 (Official Build) (64-bit) | 2019-04-06T15:01:36.644400 | Dede |
elmlang | general | oh, and i was using chromium 70 | 2019-04-06T15:01:41.644600 | Manuela |
elmlang | general | Super strange. | 2019-04-06T15:02:32.644800 | Dede |
elmlang | general | What do you see if you add something like this to the top of view?
```
let
_ = Debug.log "In view: " model.value
in
``` | 2019-04-06T15:03:03.645500 | Dede |
elmlang | general | Uh, no `msg` in view, forget that part :wink: | 2019-04-06T15:03:31.645800 | Dede |
elmlang | general | This line logs the correct model.value | 2019-04-06T15:04:09.646300 | Manuela |
elmlang | general | but the event handler still uses the old one | 2019-04-06T15:04:20.646600 | Manuela |
elmlang | general | OK, what if you replace `(Value model.value)` with `(Value <| Debug.log "handler" model.value)`? | 2019-04-06T15:04:58.647100 | Dede |
elmlang | general | value, not view. | 2019-04-06T15:06:13.647600 | Dede |
elmlang | general | this line also prints out the correct value O_o | 2019-04-06T15:06:36.648300 | Manuela |
elmlang | general | But you’re still getting the bogus msg passed to update? | 2019-04-06T15:06:47.648600 | Dede |
elmlang | general | yeah | 2019-04-06T15:06:51.648800 | Manuela |
elmlang | general | maybe i could try using a keyedNode, lets see | 2019-04-06T15:07:23.649200 | Manuela |
elmlang | general | That seems reportable. | 2019-04-06T15:07:28.649400 | Dede |
elmlang | general | yeah i think so too | 2019-04-06T15:07:50.649600 | Manuela |
elmlang | general | Do you see one instance of ValueChanged printed for every character you type, or is it batching? | 2019-04-06T15:09:12.650000 | Dede |
elmlang | general | one for each character. also i just tried using the keyednode and now the issue is gone | 2019-04-06T15:10:09.650500 | Manuela |
elmlang | general | (i used the model.value as the key) | 2019-04-06T15:10:25.650800 | Manuela |
elmlang | general | Wild. | 2019-04-06T15:10:39.651100 | Dede |
elmlang | general | fortunately, i can work around this in my actual code :smile: | 2019-04-06T15:11:41.651600 | Manuela |
elmlang | general | Hah! | 2019-04-06T15:11:55.651800 | Dede |
elmlang | general | You are not the first person: <https://github.com/elm/html/issues/180> | 2019-04-06T15:11:58.652000 | Dede |
elmlang | general | yeah, that looks like this issue, cool, thanks! | 2019-04-06T15:13:34.652800 | Manuela |
elmlang | general | Shoulda looked there earlier, sorry. | 2019-04-06T15:14:02.653100 | Dede |
elmlang | general | no problem :slightly_smiling_face: | 2019-04-06T15:14:07.653300 | Manuela |
elmlang | general | has anyone else encountered weird race conditions in ports code? | 2019-04-06T15:18:34.653900 | Isaiah |
elmlang | general | This is just absurd. Based on the console output, everything always happens in a sensible order, but randomly elm fails to receive data from the ports | 2019-04-06T15:19:23.654700 | Isaiah |
elmlang | general | I haven’t heard of that one. Can you reduce to something shareable (Ellie?) | 2019-04-06T15:36:49.655700 | Dede |
elmlang | general | It took a while, but I created a minimal example. and it seems that the problem has to do with initializing the subscriptions. I am initializing them at a later time when the user navigates to a certain part of the application instead of as soon as the bundle loads in the browser. | 2019-04-06T16:32:50.658400 | Isaiah |
elmlang | general | I don't see why this would work differently, but it does | 2019-04-06T16:33:10.658700 | Isaiah |
elmlang | general | I'm using an XMPP client library to build a chat client, and the chat history is what fails to load through ports because of this race condition, and also causes any incoming messages to be dropped at the port interface, but as soon as I send a message out myself, it starts working. That must be triggering some kind of... | 2019-04-06T16:36:43.660700 | Isaiah |
elmlang | general | Are you sure? That might be expected behavior, however difficult. There are tricky race conditions with subscriptions. | 2019-04-06T16:58:53.661700 | Ashton |
elmlang | general | I think, sending out cmds, updating the dom, and subscribing/unsubscribing are all synced on animation frames for the most part. | 2019-04-06T17:00:00.662800 | Ashton |
elmlang | general | This is just code for network requests, no dom | 2019-04-06T17:00:47.664100 | Isaiah |
elmlang | general | Yeah, but it could still be synced to the animation frame. Im not sure. | 2019-04-06T17:01:32.664800 | Ashton |
elmlang | general | I havent checked this question explicitly, but my expectation isnt that, when the new subscriptions are set, they arent simply set right there on the spot, but instead that the new subscriptions are diffed from the old ones next animation frame, and correct ones are unsubscribed, and the new ones are newly subscribed. | 2019-04-06T17:03:04.666300 | Ashton |
elmlang | general | but it works sometimes on on the initial page load, randomly | 2019-04-06T17:04:32.667500 | Isaiah |
elmlang | general | I wonder if if would make sense to have this be a completely separate application that is loaded simultaneously alongside the main application and embedded in the page in a node | 2019-04-06T17:13:16.668500 | Isaiah |
elmlang | general | there is little data shared between them, just some initialization values | 2019-04-06T17:14:04.669000 | Isaiah |
elmlang | general | I built my current application as one large program with multiple "screens", including a login/register screen, a lobby, and the main game screen. The chat application lives inside the game screen currently. | 2019-04-06T17:15:37.670100 | Isaiah |
elmlang | general | <@Isaiah> could it be this bug? <https://github.com/elm/compiler/issues/1776> | 2019-04-06T17:21:44.670600 | Augustus |
elmlang | general | wow that sounds like exactly what I am having trouble with | 2019-04-06T17:22:59.671200 | Isaiah |
elmlang | general | the last several days have not been nice to me. Countless impossible-to-debug issues, this being the only elm-related one | 2019-04-06T17:23:37.672100 | Isaiah |
elmlang | general | Although I don't have access to the elm debugger since has been broken since day one using 0.19 for my project | 2019-04-06T17:25:27.672800 | Isaiah |
elmlang | general | That debugger one is annoying! If the project will build with the debug flag on you could use Debug.log to print out the current Msg/Model at the top of your main update function. If it won't build at all with the debug flag on I don't know a good solution :-/ | 2019-04-06T17:43:56.673000 | Augustus |
elmlang | general | I use Debug.log to print out every message in the console already. I just got used to it after a while | 2019-04-06T17:49:33.673200 | Isaiah |
elmlang | general | <@Augustus> you can use `Debug.log` without the `--debug` flag - you just can't use `--optimize` | 2019-04-06T18:32:59.673500 | Huong |
elmlang | general | A structural fix for things breaking when compiling with `--debug` is in the works, for what it's worth. It requires some fairly invasive changes, so it's being batched with a bunch other features/improvements/fixes that benefit from the changes that need to be made. | 2019-04-06T18:36:27.673700 | Huong |
elmlang | general | Ah, thank you for clarifying! I hadn't hit that bug yet in our code base | 2019-04-06T21:11:23.674000 | Augustus |
elmlang | general | What is Elm's equivalent to React's fragments? Just curious. <https://reactjs.org/docs/fragments.html> | 2019-04-06T22:48:44.675100 | Maxwell |
elmlang | general | Just return a list | 2019-04-06T22:51:14.675500 | Kris |
elmlang | general | Thank you, do you understand how fragments work? | 2019-04-06T22:51:50.675800 | Maxwell |
elmlang | general | Just to make sure we're on the same page. | 2019-04-06T22:52:00.676100 | Maxwell |
elmlang | general | I’ve used them a bit, I believe they’re just a complicated way of returning an array | 2019-04-06T22:53:15.676900 | Kris |
elmlang | general | But maybe I’m missing something else. | 2019-04-06T22:53:24.677400 | Kris |
elmlang | general | Ah, okay. So, fragments are not the ability to return an array, but the ability for the VDOM to treat an array of nodes as a single entity (virtual node); for example, can you key the list? | 2019-04-06T22:53:34.677700 | Maxwell |
elmlang | general | <https://reactjs.org/docs/fragments.html#keyed-fragments> | 2019-04-06T22:53:50.677900 | Maxwell |
elmlang | general | No, you key the elements | 2019-04-06T22:57:20.679100 | Kris |
elmlang | general | Sure, that's a different thing. So, it's not supported, no problem. I just needed to confirm that. | 2019-04-06T22:58:12.679600 | Maxwell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.