workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
<@Leoma> I believe I saw a post of yours where you were doing some live editing-rendering with your markdown language. Could you point me to it?
2019-03-18T04:49:18.324100
Jana
elmlang
general
<@Jana> <https://elmlang.slack.com/archives/C0CJ671HU/p1552497726223800>
2019-03-18T09:05:23.324700
Leoma
elmlang
general
So this is working pretty well, EXCEPT, there are two elements working together here, a transparent textarea and a div. I’m just having some CSS struggles with how these resize in sync with each other. Wasn’t working on the weekend, but back at it today.
2019-03-18T09:08:19.325000
Leoma
elmlang
general
Richard has some workshops that might help. One specifically for beginners
2019-03-18T09:13:16.328200
Rosa
elmlang
general
Is it something that can be done online?
2019-03-18T09:42:42.328800
Monte
elmlang
general
Richard's course on Frontend Masters is on-line. If you are asking about our service, then yes. We can use video calls with screen sharing. I currently work with <@Robyn> that way. You can ask him about his experience :smile:
2019-03-18T09:44:45.329000
Dorsey
elmlang
general
I’m a very happy customer!
2019-03-18T10:23:42.329700
Robyn
elmlang
general
:heart:
2019-03-18T10:26:32.329900
Dorsey
elmlang
general
What's the worst name for a scheme written in elm?
2019-03-18T11:35:28.330600
Lindsey
elmlang
general
so far I've got schelme.
2019-03-18T11:38:18.330700
Lindsey
elmlang
general
Hey beautiful people. I've got chat, and I load more messages above the current ones (like slack). I want to keep the scroll position as the messages are added. I am being able to successfully do that, but I have a flash of one frame where the scroll position is wrong before it being corrected. This is the code I'm using ``` {-| Maintain scroll position after adding elements above the current view. -} anchorScrollPosition : String -&gt; Viewport -&gt; Task Browser.Dom.Error () anchorScrollPosition id before = let distanceToBottom vp = vp.scene.height - vp.viewport.y adjustScroll after = Browser.Dom.setViewportOf id 0 (after.scene.height - distanceToBottom before) in Browser.Dom.getViewportOf id |&gt; Task.andThen adjustScroll ```
2019-03-18T11:44:11.332800
Tawnya
elmlang
general
I suspect this is happening because Elm is using `requestAnimationFrame` on `getViewportOf` and `setViewportOf`, which means that it draws stuff, I get the viewport, and only in the next frame is the scroll adjusted.
2019-03-18T11:45:03.333900
Tawnya
elmlang
general
What I would really need is to force a reflow by getting the new scroll position and setting it to the right value *after* the content is there, but *before* it is rendered on screen.
2019-03-18T11:46:02.335600
Tawnya
elmlang
general
Is that possible?
2019-03-18T11:46:09.336000
Tawnya
elmlang
general
That is correct. One thing you might want to look into is using `position: sticky` in CSS, though I don't know what browser compatibility is like
2019-03-18T11:46:27.336500
Huong
elmlang
general
<@Huong> What do you mean? How could that help?
2019-03-18T11:47:18.337200
Tawnya
elmlang
general
I’d try handling all of this with css. I think the way you’re trying to do things won’t work without some convoluted solution. You’ll definitely want: - Html.Keyed.ol You may need: - Flex Column Reverse (This allows the user to load a page, at the very bottom.)
2019-03-18T12:00:08.337300
Delois
elmlang
general
schelme-on-you ?
2019-03-18T12:19:24.337700
Velia
elmlang
general
welp, its out there as schelme now.
2019-03-18T12:40:57.337900
Lindsey
elmlang
general
I meant scheme-on-you, but schelme is most likely bad enough :laughing: I don't understand it though, my English is lacking. Is it related to the German word?
2019-03-18T12:45:22.338100
Velia
elmlang
general
Or another word play?
2019-03-18T12:45:40.338300
Velia
elmlang
general
its just scheme with an extra L! its scheme with elm inside, but technically it should be the other way around
2019-03-18T12:58:38.338500
Lindsey
elmlang
general
:man-facepalming:of course
2019-03-18T12:59:21.338700
Velia
elmlang
general
I am running into this a lot at work. Think it has to do with the the fact our projects have slightly different versions of elm compiler. Elm-bugfix2, bugfix5, bugfix6 etc. Have been thinking of setting ELM_HOME env variable per project but have not tried it yet. Tell me how it goes if you try it...
2019-03-18T14:36:33.344100
Tabatha
elmlang
general
See: <https://github.com/elm/compiler/issues/1846>
2019-03-18T14:37:45.344500
Tabatha
elmlang
general
I handled this same situation in JS with a mutation observer that tracked when elements were added and adjusted the scroll position
2019-03-18T15:41:43.346600
Lorilee
elmlang
general
*[Only for those who program in Java too]* *Custom Types* from ELM VS *Enums* from Java Hi! Reading the appendix* from the guide I did not really find there is a difference in terms of cardinality between a custom type from ELM and an Enum from Java. Both will give no room for invalid inputs. I agree it is easier to create a custom type though. What are your thoughts on this guys? * Source: <https://guide.elm-lang.org/appendix/types_as_sets.html> Thank you!
2019-03-18T21:24:43.350500
Paulita
elmlang
general
i can't remember if java enums are simple Ints, if so then there's one difference, a custom type can hold state or other custom types. however the biggest difference is the handling of custom types by the compiler. Elm will fail to compile if in a case statement, you do not handle all cases of a custom type. I believe java does not do this? ( sorry, no longer program in java )
2019-03-18T21:34:19.352700
Ruthann
elmlang
general
IIRC, under the hood, each value in a Java Enum is just a singleton object. They can’t carry data because they’re all constructed at startup. And the type checking definitely isn’t detailed enough to ensure comprehensive switch coverage.
2019-03-18T21:46:59.354200
Dede
elmlang
general
Like so much of Java, it’s really just syntactic sugar on objects.
2019-03-18T21:48:00.354800
Dede
elmlang
general
I wish, under the hood they are just Ints, if they were proper objects maybe they could carry some state
2019-03-18T21:49:57.355700
Shondra
elmlang
general
Hilariously, they are objects, and they can carry methods, and they can even carry the data with which they are constructed. Just.. .construction only happens once, so that comparison is just object comparison.
2019-03-18T21:54:21.356700
Dede
elmlang
general
<https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html>
2019-03-18T21:54:28.356900
Dede
elmlang
general
<@Paulita> maybe this proxy is closer to ADTs in Java than Enums: <https://github.com/spotify/dataenum>
2019-03-18T21:56:41.358200
Ruthann
elmlang
general
They can, those are c enums
2019-03-18T22:06:06.358900
Kris
elmlang
general
I think I've found a bug in the compiler, what's the course of action?
2019-03-19T01:51:13.359900
Shondra
elmlang
general
<@Shondra> write a <http://www.sscce.org/> that triggers the bug and report it at <https://github.com/elm/compiler/issues>
2019-03-19T01:59:52.360700
Earlean
elmlang
general
once you have a sscce you might want to post it here first to see if anyone knows anything about it
2019-03-19T02:00:43.361600
Earlean
elmlang
general
this breaks with elm: `Map.!: given key is not an element in the map`
2019-03-19T02:46:21.362600
Shondra
elmlang
general
sure, what I've found tinkering around is that it only happens if I put types from a library into a Msg type of my own
2019-03-19T02:46:27.362900
Shondra
elmlang
general
where Form comes from elm-form 4.0.0
2019-03-19T02:49:42.363300
Shondra
elmlang
general
but if I use it in a record it works
2019-03-19T02:49:53.363600
Shondra
elmlang
general
<@Shondra> ah, that's a well known one. It's being worked on at the moment.
2019-03-19T03:18:05.364600
Earlean
elmlang
general
if you're using `--debug` it's likely you can workaround this issue by not using `--debug`
2019-03-19T03:19:07.365800
Earlean
elmlang
general
yep, that "fixes" it
2019-03-19T03:25:11.366200
Shondra
elmlang
general
<@Earlean> is there a issue I can follow so I can know when it's fixed?
2019-03-19T03:27:05.367200
Shondra
elmlang
general
<https://github.com/elm/compiler/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+is%3Aopen+map.%21> there are a bunch of issues reported
2019-03-19T03:29:13.367500
Earlean
elmlang
general
oh :disappointed:, in my madness I downloaded and compiled elm, maybe I'll try to take a stab at it later :simple_smile:
2019-03-19T03:33:44.368600
Shondra
elmlang
general
I wouldn’t say that’s the part that’s madness, madness is that this bug has gone so long without being fixed :wink:
2019-03-19T06:25:56.369000
Garnett
elmlang
general
Indeed <@Ruthann>, maybe this proxy is closer to a Custom Type from ELM. There is even a comparison with Data types from Haskell.
2019-03-19T07:56:04.371300
Paulita
elmlang
general
Elms non-reactionary development is intentional, if not frustrating
2019-03-19T08:23:40.372100
Danika
elmlang
general
bug fixes ought to be treated differently than features though?
2019-03-19T08:26:38.372400
Nana
elmlang
general
the fix here is simple (do not use `--debug`) and therefore it did not warrant a patch release (so far)
2019-03-19T08:37:52.373000
Virgie
elmlang
general
the debug mode needs a lot of work anyway so patching it up now (while it is not really that useful) doesn't make sense
2019-03-19T08:38:34.373500
Virgie
elmlang
general
<@Virgie> I use the debugger extensively. Moving to `0.19` I had a significant drop in the quality of my debugging. Up until last week I used a fork that solved some of the issues with `Map.!:` but that fork stopped working too.
2019-03-19T08:56:46.377500
Maida
elmlang
general
how is it useful for you? my issues are 1) cannot read full message name/contents, 2) I get swamped by messages I don't need, hard to find the one I want
2019-03-19T09:04:27.378600
Virgie
elmlang
general
hey everyone! I work on an enterprise project using Elm and it has a pretty large codebase
2019-03-19T09:20:39.379400
Todd
elmlang
general
build times have become pretty unhealthy over time and I was wondering if some of you could share your build times (without previous build cache) and approx. lines of code? I'm interested to see if ours is a unique issue
2019-03-19T09:21:17.380300
Todd
elmlang
general
<@Todd> are you on Elm 0.19?
2019-03-19T09:21:58.380900
Earlean
elmlang
general
not yet, but I can't imagine the difference between the two versions to be that critically huge, especially with larger codebases
2019-03-19T09:22:27.381400
Todd
elmlang
general
It's quite a huge difference
2019-03-19T09:22:59.382000
Earlean
elmlang
general
I heard it can be around 40x? :smile:
2019-03-19T09:23:17.382300
Nana
elmlang
general
0.18 has some pathologic cases with n^2 complex
2019-03-19T09:24:10.383300
Earlean
elmlang
general
If compile time is your biggest concern then moving to 0.19 should be a high priority.
2019-03-19T09:26:45.384400
Earlean
elmlang
general
it is a high priority, but we also suspect that there are problems coming from modules that have too many dependencies/dependents
2019-03-19T09:27:37.385400
Todd
elmlang
general
I also wanted to see what kind of experiences others have with big codebases
2019-03-19T09:27:59.386200
Todd
elmlang
general
In terms of relationships between modules you want to structure your app so that modules that change often have few modules dependent on them because all modules that depend on a changed module need recompiling
2019-03-19T09:31:59.390200
Earlean
elmlang
general
A common mistake is to make too many modules depedent on a module that changes often. Eg. A shared Msg or Model module imported by every other module
2019-03-19T09:33:31.392400
Earlean
elmlang
general
Yes, we recently realized how much of a problem this has become. When our codebase was small, it was not a big deal, but it quickly snowballed and we didn't even notice
2019-03-19T09:34:10.393900
Todd
elmlang
general
Or putting modules containing views/css (that designers are changing often) at the very bottom of a dependency chain of modules
2019-03-19T09:35:20.395000
Earlean
elmlang
general
as a datapoint, our codebase went from 8 minutes -&gt; 12 seconds
2019-03-19T09:37:10.396500
Huong
elmlang
general
(for a clean compile, that is)
2019-03-19T09:37:53.396700
Huong
elmlang
general
how large is this codebase?? :anguished:
2019-03-19T09:39:22.396900
Todd
elmlang
general
There are a few numbers out there: - <https://discourse.elm-lang.org/t/our-experience-upgrading-to-0-19-at-humio/3258>: 81kLOC, from 77s to 2.73s - <https://discourse.elm-lang.org/t/contasystemer-as-current-stats-and-thank-you-the-community/3348/2>, 2.2s for 20.7kLOC - <https://elm-lang.org/blog/small-assets-without-the-headache>, 49kLOC in 1.9s - there are more that I cannot find right now I would seriously port to 0.19 before refactoring anything. I have not yet heard of anyone having compilation time issues with 0.19.
2019-03-19T09:41:49.397100
Velia
elmlang
general
I found this read really valuable recently
2019-03-19T09:58:35.397700
Teri
elmlang
general
<https://programmingisterrible.com/post/139222674273/write-code-that-is-easy-to-delete-not-easy-to>
2019-03-19T09:58:35.397900
Teri
elmlang
general
62630loc (excluding blanks and comments)
2019-03-19T10:07:10.398300
Huong
elmlang
general
which includes a couple of very large `case..of` statements, which makes a big difference
2019-03-19T10:07:31.398500
Huong
elmlang
general
wow, that is fascinating! thank you for telling me this, it's going to make the upgrade a lot easier to sell hopefully
2019-03-19T10:16:59.398900
Todd
elmlang
general
Can’t say I totally understand what you’re seeing there, but it appears that your open command is getting to the JS code. Don’t know if you’ve instrumented things enough to see if its getting to your socket server, and coming back to your handler through `PortFunnels.cmdPort`.
2019-03-19T10:21:54.399100
Granville
elmlang
general
Thanks Bill. I can see some data coming through now. As I’m sure you experienced, it takes a lot more wiring up than for 0.18
2019-03-19T10:37:57.399500
Lynn
elmlang
general
Sometimes I know I have compilation errors but the Elm code is compiled without any unless I go to the file with error and save it to trigger the compilation process.
2019-03-19T10:55:50.400700
Frieda
elmlang
general
Why that happen?
2019-03-19T10:56:05.401100
Frieda
elmlang
general
It happens with webpack elm loader in watch mode
2019-03-19T10:56:35.401600
Frieda
elmlang
general
I think it's a known bug in the compiler. I find myself deleting elm-stuff in its entirety a few times a day.
2019-03-19T11:04:58.402000
Dede
elmlang
general
it used to happen to me a lot, but then it stopped and doesn't happen at all now, don't remember what I changed :thinking_face: (using webpack, elm-webpack-loader and elm-hot-webpack-loader)
2019-03-19T11:06:31.402900
Nana
elmlang
general
<https://github.com/elm/compiler/issues/1809>
2019-03-19T11:06:41.403100
Dede
elmlang
general
Thank you
2019-03-19T11:27:04.403500
Frieda
elmlang
general
I have rather short message names and minimal nesting.
2019-03-19T12:07:05.403600
Maida
elmlang
general
also, the main thing I’m interested in is the state of the model.
2019-03-19T12:07:25.403800
Maida
elmlang
general
I would love if I would also have the full message above the model representation BUT, between what I have in the sidebar and what I have in the model, I have access to a lot of information.
2019-03-19T12:08:34.404000
Maida
elmlang
general
Anyone been creating an SPA with Browser.application and realized suddenly that any given http request fired is still active after navigation? Do people then put trackers on all requests and cancel them?
2019-03-19T13:32:28.406700
Rosaria
elmlang
general
Any elm folks in Budapest? I’m going to be there next week.
2019-03-19T13:46:16.407000
Hoyt
elmlang
general
I just have per-page message wrappers, and discard messages intended for a page that isn't current.
2019-03-19T13:55:31.407100
Dede
elmlang
general
That's what we did too. But some messages are gloablly handled and it was creating race conditions.
2019-03-19T14:00:03.407400
Rosaria
elmlang
general
Hm. Can you provide more detail?
2019-03-19T14:01:46.407600
Dede
elmlang
general
On init API requests fly out on a given page. If one comes back 401 then we redirect the user to a 404 page with the ability to login there. But a second in flight request triggers the same thing and we get redirected a second time.
2019-03-19T14:11:46.407800
Rosaria
elmlang
general
I think having login/access denied as a "route" and using redirects is always awkward
2019-03-19T14:21:02.408000
Nana
elmlang
general
Open to suggestions. It's not so much a route as it's a global message that is handled in Main, it's handled with a redirect in Main however.
2019-03-19T14:21:59.408200
Rosaria
elmlang
general
nicer to just have it as a conditonal view - ie. if current route requires auth and auth is missing, display login screen. if auth is pending, display a loading indicator, if everything is fine, display the actual page
2019-03-19T14:22:40.408400
Nana