workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
Wondering if keying my container nodes (say, header/footer/etc) would be worthwhile from a speed perspective. I’m going to be syncing up with an external time (basically syncing with speech), so curious if I can eek out all the perf I can from the vdom
2019-04-16T10:30:08.299500
Hoyt
elmlang
general
Put whatever possible in a top level value, and only the bare minimum in a function using those static values. Due to <https://github.com/elm/virtual-dom/blob/master/src/Elm/Kernel/VirtualDom.js#L706> such static bits aren't diffed or patched
2019-04-16T10:31:29.299700
Huong
elmlang
general
If I remember correctly, a reference to a view won’t trigger a re-render: ``` footer = Html.div [] (Html.text "feet") ``` is :ok_hand:, but: ``` footer text = Html.div [] (Html.text text) ``` would need to be `lazy`’d
2019-04-16T10:33:07.299900
Sabra
elmlang
general
Oh yes, what <@Huong> said :point_up:
2019-04-16T10:33:49.300100
Sabra
elmlang
general
Thanks <@Huong>!
2019-04-16T10:34:31.300300
Hoyt
elmlang
general
Keying is a useful opt when dealing with lists where it updates are usually to one of those (dynamic) entries. I wouldn't recommend it for a largely static view
2019-04-16T10:34:35.300500
Huong
elmlang
general
A good amount of the rest of the page is dynamically generated on load, but doesn’t change as we play the audio and sync the text. Think subtitling some audio while highlighting the words as they are spoken.
2019-04-16T10:35:31.300800
Hoyt
elmlang
general
So, I’d want to be able to give as many hints to the diffing engine as I can that “almost the entirety of the page isn’t going to change, so don’t worry”
2019-04-16T10:36:03.301000
Hoyt
elmlang
general
It isn’t really “static” from the classical sense as much as “static” from the “it isn’t changing while we are playing audio and showing subtitles”
2019-04-16T10:36:25.301200
Hoyt
elmlang
general
wouldn't `lazy` be the best?
2019-04-16T10:36:30.301400
Nana
elmlang
general
Right, lazy those bits up. If the shape of the structure doesn't change between renders, I doubt keyed is going to help
2019-04-16T10:36:32.301600
Huong
elmlang
general
That’s what I was thinking of. YAY!
2019-04-16T10:36:38.301800
Hoyt
elmlang
general
Thanks so much! I’m glad to be back doing elm full-time a lot because you all are so great!
2019-04-16T10:36:58.302000
Hoyt
elmlang
general
Keyed helps in preventing diffs when things swap / are added / removed in a list of nodes, but if the shape stays the same and updates happen to a deeper subtree, it won't really help that much. Lazy, however, should definitely help!
2019-04-16T10:38:30.302500
Huong
elmlang
general
Hello! I can't install anymore, I have remove all my node_modules and now I'm stuck at elmi-to-json &gt; binwrap-install
2019-04-16T11:07:36.303600
Zane
elmlang
general
Are there any issues with the elm package server?
2019-04-16T11:07:47.304000
Zane
elmlang
general
I was installing elm on a new machine this weekend
2019-04-16T11:09:30.304900
Danika
elmlang
general
I found that that step just takes a long time and has no output, leave it and wait
2019-04-16T11:09:57.305800
Danika
elmlang
general
I’m stuck for 2 hours here…
2019-04-16T11:10:45.306500
Zane
elmlang
general
Hmmm then I’m not sure what to suggest
2019-04-16T11:11:07.306900
Danika
elmlang
general
:disappointed:
2019-04-16T11:11:09.307100
Zane
elmlang
general
Yeah, I was thinking of Lazy, got my memory confused a bit. Thanks for the clarification.
2019-04-16T11:11:58.307200
Hoyt
elmlang
general
<@Zane> for that part it should only be hitting npm’s servers, not elm’s package server, what happens if you try to install other npm packages?
2019-04-16T11:32:08.308100
Alicia
elmlang
general
it works with other npm package, it looks like it is binwrap-install related problem
2019-04-16T11:35:54.309100
Zane
elmlang
general
what OS are you on?
2019-04-16T11:51:20.309400
Alicia
elmlang
general
if you can, try with `yarn` to install them, or run with `npm install --loglevel=verbose` for more detailed output
2019-04-16T11:52:26.309900
Alicia
elmlang
general
the issue appears on macos and inside docker container when running ci
2019-04-16T11:54:06.310800
Zane
elmlang
general
nothing special appears on the logs, it just stuck when doing &gt; binwrap-install
2019-04-16T11:56:05.312000
Zane
elmlang
general
it happens in both macos and the docker container for you? is the `node_modules` folder being mounted into the docker container?
2019-04-16T12:01:41.312800
Alicia
elmlang
general
my guess it is a permissions issue
2019-04-16T12:01:48.313200
Alicia
elmlang
general
Anyone know what to do in this case? ``` ¯\_(ツ)_/¯ 🐈 $elm install eeue56/elm-html-test -- CORRUPT JSON ---------------------------------------------------------------- The elm.json for elm-community/list-extra 1.0.0 got corrupted somehow. I removed it from my file cache, so if it was some transient error it should be fixed if you try the same thing again. Please report this if it seems like an Elm problem though! ``` :disappointed:
2019-04-16T12:01:48.313300
Hoyt
elmlang
general
oddly, I’m not on 1.0.0 of `list-extra`
2019-04-16T12:02:17.313600
Hoyt
elmlang
general
<@Hoyt> it looks like `elm-html-test` is a 0.18 package, I think that is the error you get when you try to install a 0.18 package in 0.19
2019-04-16T12:02:50.314300
Alicia
elmlang
general
error message could definitely be better
2019-04-16T12:02:56.314600
Alicia
elmlang
general
ah, good catch. Thanks!
2019-04-16T12:03:00.314700
Hoyt
elmlang
general
Ah, I missed the “this isn’t for 0.19” banner on it. :slightly_smiling_face:
2019-04-16T12:03:39.315100
Hoyt
elmlang
general
Oh, wait, that’s on elm-test. Is there a 0.19 version of elm-html-test somewhere?
2019-04-16T12:04:13.315500
Hoyt
elmlang
general
oh, interesting. It looks like it is being merged into elm-test
2019-04-16T12:05:17.316000
Hoyt
elmlang
general
looks like it got merged into elm-test? <https://github.com/eeue56/elm-html-test/issues/69>
2019-04-16T12:05:18.316100
Alicia
elmlang
general
:slightly_smiling_face:
2019-04-16T12:05:25.316300
Alicia
elmlang
general
Just saw that. As always thanks to <@Leonie> for the comment that points there.
2019-04-16T12:06:15.316700
Hoyt
elmlang
general
Now to just figure out how to get to it and use it in elm-test :slightly_smiling_face:
2019-04-16T12:06:53.317000
Hoyt
elmlang
general
guess I’ll just to use it and see what happens. :slightly_smiling_face:
2019-04-16T12:07:26.317300
Hoyt
elmlang
general
is there any new news in elm world, as far as extending support for the web platform?
2019-04-16T12:12:37.318200
Kristopher
elmlang
general
<@Kristopher> what type of extensions are you looking for?
2019-04-16T12:14:39.319000
Alicia
elmlang
general
I recently changed the directory name from `XMPP` to `Xmpp`, but somehow the compiler is confused. I cleared out the cache (`rm -rf elm-stuff`) but this error message persists. I already ran into trouble earlier because macos uses case-insensitive file/directory names. Any idea how to solve this?
2019-04-16T13:55:13.319200
Isaiah
elmlang
general
Of course, if I do what the compiler suggests, it gives me the opposite error.
2019-04-16T14:01:37.320000
Isaiah
elmlang
general
Is there a hidden cache somewhere I am not aware of?
2019-04-16T14:02:21.320400
Isaiah
elmlang
general
I wonder if Mac's file attributes captured the original name somehow?
2019-04-16T14:05:02.320900
Dede
elmlang
general
try hitting the directory name with `mdls DIRNAME` and/or `xattr DIRNAME` and see if something weird is hanging out there?
2019-04-16T14:05:39.321500
Dede
elmlang
general
I'm totally speculating here.
2019-04-16T14:05:43.321700
Dede
elmlang
general
running `mdls XMPP` and `mdls Xmpp` both say the name is `Xmpp`
2019-04-16T14:06:59.322200
Isaiah
elmlang
general
I'd expect that since the macos filesystem is case-insensitive
2019-04-16T14:07:17.322600
Isaiah
elmlang
general
XMPP and Xmpp are the same according to mac
2019-04-16T14:07:24.322900
Isaiah
elmlang
general
`xattr` returns nothing
2019-04-16T14:08:41.323300
Isaiah
elmlang
general
Yeah, that was a wild guess. I don't know of any caches outside of elm-stuff.
2019-04-16T14:08:43.323400
Dede
elmlang
general
another point for using linux
2019-04-16T14:09:11.323800
Isaiah
elmlang
general
I develop Elm on mac and linux and haven't hit this (yet?)
2019-04-16T14:09:24.324100
Dede
elmlang
general
well I just did and it completely stopped my work in its tracks
2019-04-16T14:10:07.324500
Isaiah
elmlang
general
I have no idea what to do
2019-04-16T14:10:10.324700
Isaiah
elmlang
general
rename the directory to something different, then back?
2019-04-16T14:12:00.324900
Leoma
elmlang
general
Yeah, I like renaming it to `Foo` and updating the module to match.
2019-04-16T14:13:15.325100
Dede
elmlang
general
If that doesn't compile, you have a thread to pull on.
2019-04-16T14:13:31.325300
Dede
elmlang
general
Thanks. I tried that and it revealed the real issue. I had missed a single `import` declaration in a different module that was using the old module name. That is really weird, and potentially a compiler bug
2019-04-16T14:23:14.325700
Isaiah
elmlang
general
Wow.
2019-04-16T14:26:41.326900
Dede
elmlang
general
That seems like an interaction between the MacOS filesystem and the compiler.
2019-04-16T14:26:54.327100
Dede
elmlang
general
The compiler goes looking for something at XMPP/... and finds it, of course, and then gets irritated that the internal name doesn't match the string it was looking for.
2019-04-16T14:27:23.327300
Dede
elmlang
general
<@Syble> Interesting. I didn't know about `identity`.
2019-04-16T14:55:18.327600
Marcus
elmlang
general
It would be nice if old packages were clearly marked as deprecated on github and packages.elm, maybe even in `elm install`?
2019-04-16T16:00:27.328500
Rosario
elmlang
general
It's a bit confusing that there are all the elm-community packages and their elm-explorations replacements, for example, or the elm-lang/ vs elm/ packages.
2019-04-16T16:01:14.329400
Rosario
elmlang
general
the current ones have an `elm.json` instead of an `elm-package.json` since 0.19 was released. Or are you saying there are deprecated packages showing up on the <http://package.elm-lang.org|package.elm-lang.org> site?
2019-04-16T16:09:13.331200
Isaiah
elmlang
general
I think all of the `elm-lang` repos are set to archived mode?
2019-04-16T16:12:17.331400
Carman
elmlang
general
I see the `elm/bytes` package, but haven't upgraded to 0.19 yet. Is there any way to get bytes from an http post in 0.18?
2019-04-16T17:17:04.333300
Shakita
elmlang
general
No, I believe `elm/bytes` is only 0.19+
2019-04-16T17:20:09.333400
Carman
elmlang
general
Yes. I understand that, but are there any other packages or solutions for doing something similar in 0.18?
2019-04-16T17:20:50.334000
Shakita
elmlang
general
Not that I'm aware of
2019-04-16T17:21:22.334600
Carman
elmlang
general
Thanks! We haven't had a compelling reason to do the work of upgrading to 0.19, but this might be it. We're using some packages that aren't going to upgrade, so replacing them will be more than trivial.
2019-04-16T17:23:03.336300
Shakita
elmlang
general
Hello. I’m wondering what is in the interest of using ``` UrlBuilder.crossorigin "<https://example.com:8042>" [ "over", "there" ] [ string "name" "ferret" ] ``` instead of a simple string like “<https://example.com:8042/over/there?name=ferret>” ? Is there anything else than the concatenation of path items and query parameters ?
2019-04-16T17:23:17.336500
Allyn
elmlang
general
The path components and parameters need to be URL encoded as well: <https://en.wikipedia.org/wiki/Percent-encoding>
2019-04-16T17:29:02.336600
Shenika
elmlang
general
Thanks <@Shenika>
2019-04-16T17:35:02.337100
Allyn
elmlang
general
anyone have tips on migrating elm/http 1.0 -&gt; 2.0?
2019-04-16T17:57:32.337500
Jeanene
elmlang
general
Does anyone know how to configure Rails webpacker 4 to compile for production?
2019-04-16T18:23:31.338300
Kathryn
elmlang
general
kinda--what’s your issue?
2019-04-16T18:24:14.338400
Jeanene
elmlang
general
I’m mainly stuck around converting `Http.expectJson decoder` -&gt; `Http.expectJson Cmd decoder`…
2019-04-16T18:57:25.338600
Jeanene
elmlang
general
The important but there is that the runtime will send the response through your update loop at using the `Cmd` in your example. So if your decoder returns a `FooBar` you would want to pass in a `Msg` constructor that is a `Result Error FooBar`
2019-04-16T20:21:37.338900
Augustus
elmlang
general
Like `type Msg = GotFooBar (Result Http.Error FooBar)`, you would use `GotFooBar` as the `Cmd`
2019-04-16T20:23:01.339100
Augustus
elmlang
general
Sorry, after re-reading your question I see you probably know all that...in our app we made a wrapper around `Http.task` that handles retries and stuff for us and we use our decoders we had in Http 1.0.0
2019-04-16T20:28:58.339400
Augustus
elmlang
general
Yeah…can you share how you used task? I’m at a total loss right now.
2019-04-16T21:52:25.339700
Jeanene
elmlang
general
``` delete : Endpoint -&gt; Cred -&gt; Body -&gt; Decoder a -&gt; Cmd a delete url cred body decoder = Endpoint.request { method = "DELETE" , url = url , expect = Http.expectJson decoder , headers = [ credHeader cred ] , body = body , timeout = Nothing , withCredentials = False } ``` For example--expectJson wants `#Decoder a -&gt; Expect msg#`…
2019-04-16T21:53:43.339900
Jeanene
elmlang
general
I think the only thing you have to add is another param for the `Msg` you want to generate, like ``` delete : Endpoint -&gt; Cred -&gt; Body -&gt; Expect msg -&gt; Cmd msg delete url cred body expect = Endpoint.request { method = "DELETE" , url = url , expect = expect , headers = [ credHeader cred ] , body = body , timeout = Nothing , withCredentials = False } ``` Then you can pass in a `Http.expectJson SomeMsg yourDecoder` for the `expect` param
2019-04-17T01:24:29.340100
Augustus
elmlang
general
you could also pass in the decoder and `Msg` separately, but I think it is easier to read using this way
2019-04-17T01:25:30.340300
Augustus
elmlang
general
When Webpack compiles my assets, I get the following warning in the console on production: "Compiled in DEV mode." I have no clue where to set the --optimize flag.
2019-04-17T01:53:57.340500
Kathryn
elmlang
general
maybe needs optimize:true in default options obj? <https://github.com/rails/webpacker/blob/353bda39b24c05364cac37adb1479d8dcd60c593/lib/install/loaders/elm.js>
2019-04-17T02:12:47.340800
Jarvis
elmlang
general
not sure how i landed don that commit but master is no different
2019-04-17T02:14:40.341000
Jarvis
elmlang
general
<@Isaiah> <@Carman> They still show up on <http://package.elm-lang.org|package.elm-lang.org>. It would be nice if there was a redirect or a notice at the top of the page saying "This is deprecated, this way for elm 0.19" or something
2019-04-17T04:24:59.342100
Rosario
elmlang
general
If it is Rails, may it depend on `RAILS_ENV` variable then? Did you try running build with `RAILS_ENV=development` prepended to the command?
2019-04-17T05:24:02.342400
Lynne
elmlang
general
does anyone have any experience using the `Reader` monad for “View” functions? I’m thinking about learning about it to try to simplify my code on some of the more complicated views I’ve got
2019-04-17T07:55:48.345200
Vilma
elmlang
general
from what I read it seems to make sense to use the Reader monad for that
2019-04-17T07:56:01.345500
Vilma
elmlang
general
but I’ve got zero knowledge about monads, though
2019-04-17T07:56:15.345800
Vilma
elmlang
general
What’s your webpacker.yml?
2019-04-17T07:56:51.346000
Jeanene