workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
yeah
2019-01-30T10:15:51.481600
Daysi
elmlang
general
but you cannot check if scrollWidth > clientWidth of a specific element
2019-01-30T10:16:18.482200
Daysi
elmlang
general
you'd have to make the roundtrip through ports
2019-01-30T10:17:49.483200
Daysi
elmlang
general
<@Daysi> if it is a specific element you care about, you should be able to subscribe to `scroll` with `Html.Events.on`, extract both values and compare them, shouldn't you?
2019-01-30T10:21:41.484500
Lynne
elmlang
general
I did it in 0.18, this possibility is still there in 0.19
2019-01-30T10:23:14.485000
Lynne
elmlang
general
Not exactly this, I was using `scrollTop` but that's just another property
2019-01-30T10:24:02.485500
Lynne
elmlang
general
that's an interesting point but not quite what I was searching for. I need to render an element depending if scrollWidth &gt; clientWidth of another element
2019-01-30T10:32:45.486900
Daysi
elmlang
general
I see
2019-01-30T10:34:02.488000
Lynne
elmlang
general
but maybe I don't see a solution because I'm not familiar enough with the Html.Events module?
2019-01-30T10:35:11.489000
Daysi
elmlang
general
<@Daysi> first set up a subscription to `Browser.Events.onResize`, then in the response handler, use `Browser.Dom.getViewportOf`
2019-01-30T10:35:23.489500
Nana
elmlang
general
pretty fiddly but that should work I tihnk
2019-01-30T10:35:33.489900
Nana
elmlang
general
Are you aware of `Browser.Dom.getViewportOf` <@Daysi>?
2019-01-30T10:35:40.490000
Lynne
elmlang
general
not until now
2019-01-30T10:35:51.490300
Daysi
elmlang
general
Ah sorry <@Nana> did not see your message
2019-01-30T10:35:55.490500
Lynne
elmlang
general
I think that's what you need then <@Daysi>. At least docs name `clientWidth` as one of the things you may get from it
2019-01-30T10:36:57.491200
Lynne
elmlang
general
<https://package.elm-lang.org/packages/elm/browser/latest/Browser-Dom#getViewportOf>
2019-01-30T10:37:44.492000
Daysi
elmlang
general
interesting :thinking_face:
2019-01-30T10:37:50.492200
Daysi
elmlang
general
maybe this helps already
2019-01-30T10:39:56.493000
Daysi
elmlang
general
Thanks guys!!
2019-01-30T10:40:01.493200
Daysi
elmlang
general
<@Myong> oh shut up!
2019-01-30T10:40:10.493700
Daysi
elmlang
general
basically the same as in js really: ``` window.addEventListener("resize", () =&gt; document.getElementById("myElement").scrollWidth etc... ) ```
2019-01-30T10:40:22.493900
Nana
elmlang
general
I guess it's mostly the Msg system that makes it feel fiddlier :thinking_face:
2019-01-30T10:40:51.494700
Nana
elmlang
general
oh
2019-01-30T10:51:16.495300
Daysi
elmlang
general
what if I subscribe to "resize" and the event fires _before_ the Elm app is rendered?
2019-01-30T10:51:43.495900
Daysi
elmlang
general
well, I could fire it via Cmd on init to be sure :thinking_face:
2019-01-30T10:53:04.496700
Daysi
elmlang
general
Start your app w/ Browser.Dom.getViewport
2019-01-30T10:54:14.497700
Dede
elmlang
general
Wait,
2019-01-30T10:54:25.497900
Dede
elmlang
general
sorry
2019-01-30T10:54:27.498200
Dede
elmlang
general
I see that in history.
2019-01-30T10:54:31.498500
Dede
elmlang
general
Well, I see getViewportOf in history. getViewport will give you the Window dimensions. I think if you combine that as an init-launched task with a subscription you should have total coverage.
2019-01-30T10:55:15.499100
Dede
elmlang
general
<@Daysi> yeah, same as in JS, whenever you add a listener to resize, you usually also need to run the code once right away
2019-01-30T11:04:06.500600
Nana
elmlang
general
pretty common in JS: ``` const resizeHandler = () =&gt; document.getElementById("myElement").scrollWidth etc... resizeHandlar() window.addEventListener("resize", resizeHandler) ```
2019-01-30T11:05:44.501800
Nana
elmlang
general
yeah right
2019-01-30T11:28:08.503600
Daysi
elmlang
general
Hello there, just wanted to tell you that our CFP for Elm Europe is open ! We wrote some guidelines this year, hoping it will make this process clearer/simpler for everyone. :slightly_smiling_face: <https://checkout.eventlama.com/#/events/elm-europe-2019/cfp> Guidelines <https://drive.google.com/file/d/1Yt_IdGObx6u3BO3alkhBXqaxQM4Zx9fM/view?usp=sharing>
2019-01-30T11:53:26.505300
Jalisa
elmlang
general
There is a typo in the guidelines. Should be 8th of March I guess. :slightly_smiling_face: &gt; You have until the 8th of February if you want to have feedback, 1 week before the end of the CFP then.
2019-01-30T12:42:06.506900
Jin
elmlang
general
<@Jin> Absolutely, the changes have been made ! :slightly_smiling_face:
2019-01-30T14:33:36.507500
Jalisa
elmlang
general
Hello! It's been &gt;1 year since I made a few tiny apps in Elm, and I'm curious if anyone has a good path for getting ramped back up again? Wanting to include Elm on an internal project at work once I am comfortable enough with it and patterns (project structure, etc). I'm going to Elm in the Spring in Chicago, as well, in April!
2019-01-30T17:40:51.509600
Alison
elmlang
general
Hi all, I almost know I'll get no response for this but does anyone know if there has any been any word on the `Map.!: given key is not an element..` bug? Because at this point i'm about ready to bail out of this language, which is really painful for me to say. I've invested a lot of time in it and I think its almost perfect, but it has been a relatively long time since 0.19 was released, and no matter how many times I try and get an answer, noone knows. Its a game breaking bug and noone seems to acknowledge its existence.. It goes against everything this language seems to stand for, friendliness to newcomers, helpful error messages. Its just a plain blocker to anyone new who uses the language. It feels to me at this point, as someone who has been coding Elm extensively for the last few years, that noone seems to care anymore. I understand the lack of communication when developing a new feature set, but this is a bug, is there any reason why a bug in the compiler has sat unfixed for so long? And if so, why won't anyone tell the community? I'm very fed up with it, and I've actually been scared to write this message because I know I'll likely get a massive backlash, but when the github issue was locked and limited in November, what am I supposed to do? To me it isn't really the bug anymore, but the lack of communication over it. It feels like a big F you to the community that love the language, and a big F you to the newcomers who are sold by the amazing ideas that Elm gets so right, only to be confronted by a really unfriendly and unsolvable Haskell bug in the compiler when they use, for example, the elm style animation library (<https://package.elm-lang.org/packages/mdgriffith/elm-style-animation/latest/Animation>).. which is something newcomers probably want to do quite often.
2019-01-30T18:16:42.512000
Jenice
elmlang
general
It has been quiet, some news would be welcome. In any case, without the `--debug` flag you should be fine. Also, in any case even if that bug were fixed today, there might be other things that maybe also need to be done before a 0.19.1 release can happen. Releases don't happen often by design
2019-01-30T18:33:49.514800
Virgie
elmlang
general
also I'd hope that `Map.!` won't be used in the compiler going forward. it shows exactly why elm's non-crashing is so nice
2019-01-30T18:34:30.516000
Virgie
elmlang
general
If the bug has been fixed, why wait to release 0.19.1? Isn't that the reason we're using semantic versioning?
2019-01-30T18:34:44.516300
Jenice
elmlang
general
there is more. There are some problems with adding packages/version conflicts. Releases bundle a bunch of work because there is (a lot) of overhead to a release. Also I'm really not sure how much work it is to fix this bug (we know the cause).
2019-01-30T18:36:45.518400
Virgie
elmlang
general
Okay, so given that, would it not be sensible to tell the community?
2019-01-30T18:37:21.519100
Jenice
elmlang
general
is the only workaround to remove the `--debug` flag? i haven’t encountered it myself
2019-01-30T18:37:42.519700
Ruthann
elmlang
general
ah… that’s because i don’t use the `--debug` flag :stuck_out_tongue:
2019-01-30T18:38:17.520600
Ruthann
elmlang
general
Yes
2019-01-30T18:38:18.520700
Jenice
elmlang
general
yes, just for full context the problem occurs when exposing a type alias for an internal (non-exposed) type
2019-01-30T18:38:27.521000
Virgie
elmlang
general
something that many packages do, so this is a real problem in pretty much any elm app
2019-01-30T18:38:54.521800
Virgie
elmlang
general
I'm not the most experienced developer, and i'm not as talented as probably yourself or Evan, but this bug must have turned off hundreds of people off of Elm
2019-01-30T18:39:21.522600
Jenice
elmlang
general
Not everyone will come to this slack and even find the non `--debug` flag solution
2019-01-30T18:39:40.523300
Jenice
elmlang
general
eddy, can you continue without the --debug flag?
2019-01-30T18:40:53.524800
Ruthann
elmlang
general
No
2019-01-30T18:41:03.525200
Jenice
elmlang
general
On multiple projects
2019-01-30T18:41:12.525500
Jenice
elmlang
general
Do you mean continue development?
2019-01-30T18:41:24.526100
Jenice
elmlang
general
yeah, typically i use Debug.log
2019-01-30T18:41:36.526700
Ruthann
elmlang
general
my state is so huge that having --debug on lags my app to unusability
2019-01-30T18:41:56.527800
Ruthann
elmlang
general
so i haven’t been using that flag for the last 2 yrs
2019-01-30T18:42:03.528400
Ruthann
elmlang
general
I can muddle through without --debug yes, but I don't think that is the point i'm really trying to make here
2019-01-30T18:42:09.528600
Jenice
elmlang
general
I would think those people would never even find the `--debug` flag. In any case: yes it is frustrating but I don't see a clear way forward that would be obviously better.
2019-01-30T18:42:29.529300
Virgie
elmlang
general
By default people are going to come to this language and turn on the `--debug` flag
2019-01-30T18:42:40.529600
Jenice
elmlang
general
I'd prefer they even rip out the `--debug` option at this point. If I was a newcomer to Elm and I hit that Haskell bug, I think i would just stop and look for something else
2019-01-30T18:43:25.530700
Jenice
elmlang
general
well, the whole debugger is somewhat flawed in its current form, and needs serious rethinking to be really practical.
2019-01-30T18:44:43.531700
Virgie
elmlang
general
it's great for finding the order in which messages happen for instance, but I don't think the whole "saving a session" thing has delivered so far. A big technical question is when to invalidate (change in model, change in Msg).
2019-01-30T18:46:05.533800
Virgie
elmlang
general
I mean it’s enabled by default with create-elm-app..
2019-01-30T18:46:31.535000
Jenice
elmlang
general
Aren’t we arguing about the wrong thing here? The worthiness of the bug seems almost irrelevant
2019-01-30T18:47:00.536300
Jenice
elmlang
general
what is the right thing to argue about?
2019-01-30T18:47:35.537200
Virgie
elmlang
general
The lack of communication regarding if/when it will be fixed
2019-01-30T18:48:03.538200
Jenice
elmlang
general
i can hear the frustration in your voice and yeah it sucks to be where you’re at there. i’m not here to vouch for elm or for the core team’s communication of bugs, though personally i think they try their best. if you can keep going without it then do so, elm has been a very practical and productive language for me. if you can’t then you have to make the call here. the way that I’ve worked is to find an acceptable workaround and keep going, i lead a team of 3 on a mid (60k loc) legacy rewrite and frankly i’m scared of what happens when this project ends and i have to go back to js… if you think this needs to be better communicated, then be the person to better communicate it :slightly_smiling_face:
2019-01-30T18:49:49.541600
Ruthann
elmlang
general
right. understanding that requires that you follow elm-related discourse quite well I think: that communication has not worked out well in the past. It is just not productive for Evan to say "bug is hard, I'm working on it", and even less productive for him to spell out the details.
2019-01-30T18:51:03.542800
Virgie
elmlang
general
I just don’t subscribe to that, It seems very easy for somebody on core to acknowledge bug is hard, We’re working on it. Anyone in this slack knows people come here daily reporting this bug again and again. If that many come to slack reporting it, imagine how many don’t come to the slack, and just abandon ship. I honestly have no way to know that they are working on it? No acknowledgement from anybody for months at this point
2019-01-30T18:53:44.547000
Jenice
elmlang
general
It’s not a language paradigm up for debate, I understand the arguments Evan makes in that regard, I just want to know if I can ever use the debugger again
2019-01-30T18:55:09.548200
Jenice
elmlang
general
I hear that. I remember when Evan would post regular updates on the elm-dev mailing list (which were always fun to read), but also saw how the discussion around it didn't really work out. Can we ever use the debugger again? probably, but who knows in what form. I sketched some of the issues with the debugger earlier, and maybe they're working on a larger rehaul of the system. In the spirit of "better do it right than right now". We'd know if elm were abandoned (it isn't), so there will be something eventually
2019-01-30T19:01:14.552200
Virgie
elmlang
general
It's just not enough for me I think
2019-01-30T19:02:07.552400
Jenice
elmlang
general
I'm just trying to clarify the situation. There are underlying reasons for the current state of affairs. I would like an official statement on it, but (given the past) understand why that may be difficult.
2019-01-30T19:03:57.554100
Virgie
elmlang
general
&gt; but also saw how the discussion around it didn't really work out. yeah, evan gets a lot of negativity and demands whenever he posts so he stopped posting. i also liked the little progress updates and insights into what he was working on next.
2019-01-30T19:08:22.555800
Ruthann
elmlang
general
And also a lot of discussions that go all over the place. Updates would be nice, though personally I’ve invested a lot in Elm because I have a lot of faith in Evan as a designer. For me, an aspect of having faith in Evan as a designer is to have trust that he is managing himself and the technical direction of the project well. He’s done it this far, and in my opinion has done exceedingly well. So, I direct my energies elsewhere from putting requirements on him.
2019-01-30T19:18:20.560100
Cornell
elmlang
general
I hear that, but to me this isn't a design task, it's a bug in the design that i've already bought in to
2019-01-30T19:19:38.561000
Jenice
elmlang
general
I'm sold on Elm
2019-01-30T19:19:43.561200
Jenice
elmlang
general
Is there noone else in a core-ish capacity that could update the Elm community that a major bug was being worked on?
2019-01-30T19:20:46.562600
Jenice
elmlang
general
I think I read a post somewhere saying they were totally reworking the debugger, so perhaps they're just ignoring the bug in favor of the new debugger :thinking_face:
2019-01-30T19:24:13.565200
Nana
elmlang
general
If someone on core had told me what you just said ^ then I would feel quite a bit better
2019-01-30T19:25:17.567400
Jenice
elmlang
general
We know about all of the bugs that have been brought up and they’re all being fixed. Some are already fixed but someone already brought up about batching releases so I won’t repeat
2019-01-30T19:25:31.567800
Lashawnda
elmlang
general
hey, thanks for ellie btw :heart:
2019-01-30T19:26:11.568100
Alison
elmlang
general
Thanks Luke, thats really the first time i've heard in the last few months that they're being fixed and I appreciate the update
2019-01-30T19:27:23.570500
Jenice
elmlang
general
You’re welcome! It’s being transitioned to a new maintainer and I’m looking forward to the new perspective he’ll bring
2019-01-30T19:27:31.570800
Lashawnda
elmlang
general
Could you maybe clarify the batching bit?
2019-01-30T19:27:56.571400
Jenice
elmlang
general
Good on ya for that outlook. Looking forward to it
2019-01-30T19:28:01.571500
Alison
elmlang
general
There are a lot of secondary effects to doing a release that need to be managed for it to go well, so Evan tries to group stuff together in a cohesive way and release it all at once so that it’s nicer to communicate what has changed
2019-01-30T19:28:58.573600
Lashawnda
elmlang
general
ah, found the post I was talking about, although I don't know if it's still relevant : <https://github.com/elm-lang/elm-reactor> &gt; Since then (1) the internal implementation of Elm has changed a decent amount and (2) we have learned a lot about what production users need to use this tool seriously. So time travel is not available in elm-reactor right now, but it will be coming back with a new design focused on real workflows.
2019-01-30T19:30:09.574800
Nana
elmlang
general
Basically, each release has a clearly stated goal
2019-01-30T19:30:25.575200
Lashawnda
elmlang
general
that sounds to me like a new debugger?
2019-01-30T19:30:32.575400
Nana
elmlang
general
and the readme was last edited by Evan, August 2018
2019-01-30T19:31:11.576200
Nana
elmlang
general
We’d like a more advanced debugger but I don’t think anyone is working on it. I was planning to but other stuff in life came up
2019-01-30T19:31:42.577000
Lashawnda
elmlang
general
Quoting from <https://www.deconstructconf.com/2017/evan-czaplicki-on-storytelling> : “In my projects, I use a different approach, that I think is controversial. But it works well, in my opinion, which is that someone opens an issue, and we say, OK. And someone else opens another issue. And over time, we let these build up. And we do a more high level analysis of all of the concerns people have. And so when you look at them holistically, you can find one fix that addresses all those concerns in a way that’s clear. “And I think this, in the end, leads to better design. But from the perspective of storytelling, it also means you have a stronger narrative. Each release is about-- we did this work on the compiler. Elm has an emphasis on developer experience. You get a broader narrative than 40 things happened…”
2019-01-30T19:36:15.581000
Dede
elmlang
general
I hear you about the stated goal of each release, but I don't see why a bugfix couldn't be released for the compiler if you have a fix? As I mentioned earlier I think the impact on newcomers to the language is probably pretty severe. There seems to be a potential fix here: <https://elmlang.slack.com/archives/C13L7S5GR/p1547537552048900>
2019-01-30T19:36:37.582200
Jenice
elmlang
general
Sure, but that doesn't really make sense with bug fixes surely?
2019-01-30T19:39:41.586000
Jenice
elmlang
general
The way that we approach fixing stuff isn’t to just fix the one issue and release a patch. We do more of a structural analysis on all of the problems and look for a solution that works at the level of category rather than individual issue. In this case the work that fixes the debug flag also fixes other stuff and makes a bunch of improvements beyond the specific problem.
2019-01-30T19:40:39.587300
Lashawnda
elmlang
general
I haven't found the debugger particularily necessary so far anyway, so seems like an easy solution to just run without `--debug`
2019-01-30T19:42:18.589700
Nana
elmlang
general
and I think people are pretty used to struggling with Webpack etc. so a buggy debugger shouldn't be that bad :stuck_out_tongue:
2019-01-30T19:43:45.593100
Nana
elmlang
general
Regarding the impact, I’m not sure that it actually is that widely used of a feature and it doesn’t feature too frequently in beginner educational materials that we’ve seen. My intuition is that the effects are pretty marginal. But if there’s evidence that isn’t the case we should consider it!
2019-01-30T19:43:58.593600
Lashawnda