workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
that is... an interesting proposition XD
2019-04-24T08:20:58.354300
Emilee
elmlang
general
Anyone know if there's any workaround for this compiler bug? <https://github.com/elm/compiler/issues/1776> (Other than not having conditional subscriptions, I guess, which becomes messy in an SPA)
2019-04-24T08:24:09.355100
Rochell
elmlang
general
the question is... where?^^
2019-04-24T08:26:37.355300
Emilee
elmlang
general
wait, it needs to be called too, right?
2019-04-24T08:26:54.355500
Emilee
elmlang
general
Do you send any command from your `init` <@Rochell>?
2019-04-24T08:29:59.356100
Lynne
elmlang
general
Yeah, the initial routing in the SPA happens there.
2019-04-24T08:30:13.356400
Rochell
elmlang
general
Is it generated as a result of `Task.attempt` or `Task.perform`?
2019-04-24T08:30:57.357000
Lynne
elmlang
general
And since each page has its own subscriptions, that's where the conditional subscriptions happen
2019-04-24T08:30:58.357200
Rochell
elmlang
general
No, doesn't use Task.
2019-04-24T08:31:16.357300
Rochell
elmlang
general
okay, doing this doesn't seem to help ``` main = Application.element { init = identity init -- The call to `identity` is just here to temporarily fix #2901. It should be removed when Elm 0.19.1 hits , subscriptions = subscriptions , update = update , view = view , propDecoder...
2019-04-24T08:31:40.357500
Emilee
elmlang
general
But it does change the model such that the subscriptions change, since each page in the SPA has its own subscriptions.
2019-04-24T08:32:01.357700
Rochell
elmlang
general
i think i'll just accept that the error message will be here for a while^^'
2019-04-24T08:32:09.357900
Emilee
elmlang
general
Ok, you do something like `Navigation.pushUrl`, right?
2019-04-24T08:32:15.358100
Lynne
elmlang
general
Which, if I'm reading the bug report right, would trigger this issue.
2019-04-24T08:32:16.358300
Rochell
elmlang
general
Yeah, I don’t think it’s currently fixable :confused:
2019-04-24T08:32:18.358500
Huong
elmlang
general
Yeah
2019-04-24T08:32:19.358700
Rochell
elmlang
general
I think you may try delaying this using `Process.sleep`
2019-04-24T08:32:33.358900
Lynne
elmlang
general
Hmm... okay. Is it a race condition?
2019-04-24T08:33:04.359100
Rochell
elmlang
general
There were examples where it helped (presumingly by allowing runtime to initialize subscriptions subsystem correctly)
2019-04-24T08:33:10.359300
Lynne
elmlang
general
Yeah, seems like that
2019-04-24T08:33:13.359500
Lynne
elmlang
general
But those example was with a task, so I am not sure it will help you
2019-04-24T08:33:27.359700
Lynne
elmlang
general
Still may be worth trying
2019-04-24T08:33:33.359900
Lynne
elmlang
general
Yeah, never know. Any idea how long to sleep for?
2019-04-24T08:33:48.360100
Rochell
elmlang
general
Start with 1ms
2019-04-24T08:33:54.360300
Lynne
elmlang
general
I'll give it a go. :slightly_smiling_face: Thanks.
2019-04-24T08:34:32.360500
Rochell
elmlang
general
Good luck :slightly_smiling_face:
2019-04-24T08:34:41.360700
Lynne
elmlang
general
That's got bad code smell all over it though lol
2019-04-24T08:34:47.360900
Rochell
elmlang
general
Well, that's life... I usually add some comment saying why it had to be done this way and what I am working around
2019-04-24T08:35:31.361100
Lynne
elmlang
general
Gives a relief :slightly_smiling_face:
2019-04-24T08:35:34.361300
Lynne
elmlang
general
Haha. At least pushing responsibility back to the compiler. :wink:
2019-04-24T08:35:50.361500
Rochell
elmlang
general
Well, but that's where it belongs, tbh
2019-04-24T08:36:09.361800
Lynne
elmlang
general
Yeah, definitely. I just want to find an elegant way past the problem. Life's not always fair. :wink:
2019-04-24T08:38:44.362000
Rochell
elmlang
general
... to one's expectations :wink:
2019-04-24T08:39:03.362200
Lynne
elmlang
general
I woke up to a bunch of travis build failures from my Elm repos :confused: <https://travis-ci.org/prikhi/paginate/builds/523950532#L465-L493>
2019-04-24T08:47:19.363000
Earnest
elmlang
general
I noticed that previous successful build used node version 11.14.0 and the failing one used node version 12.0.0
2019-04-24T08:52:01.363900
Mindy
elmlang
general
<@Earnest> is it due to node 12?
2019-04-24T08:52:02.364100
Augustus
elmlang
general
I actually created one for the vscode extension! It helps a little, but there are lots of things better done with a cli tool.
2019-04-24T08:52:16.364200
Lorilee
elmlang
general
I suspect that is causing the breakage and you should pin your node version with a .nvmrc file at the root of your project (or directly in the .travis.yml file)
2019-04-24T08:52:39.364700
Mindy
elmlang
general
Travis supports Elm directly. <https://docs.travis-ci.com/user/languages/elm/>
2019-04-24T08:52:54.365200
Jin
elmlang
general
Thanks :+1:
2019-04-24T08:55:53.365500
Earnest
elmlang
general
if I'm correct `+` in a multipart message gets interpreted as a space, but I'm not sure how to change that
2019-04-24T09:02:29.365700
Emilee
elmlang
general
some resources seem to suggest that this is improved when setting utf-8 as a content encoding. is there a way in elm to set the content encoding of a post request? or do you have to resort to `Http.request` and setting the header manually? Or am I missing some easier solution?
2019-04-24T09:09:01.366000
Emilee
elmlang
general
yeah, did you try without `--debug` on? it looks like it is the debugger that is causing it to render twice there, outside of debug mode it only renders once
2019-04-24T09:13:33.366300
Alicia
elmlang
general
here’s a better gif of what happens with debug off
2019-04-24T09:16:43.366500
Alicia
elmlang
general
None
2019-04-24T09:17:32.366700
Alicia
elmlang
general
hmm, i can't really change the charset in `Http.request` if i want to send multipart data, right? because then i override the boundary
2019-04-24T09:49:03.367800
Emilee
elmlang
general
Would it make sense to `Url.percentEncode` the string?
2019-04-24T10:07:56.367900
Carman
elmlang
general
<@Alicia> Thanks for making all those gifs! :bow: Is it possible to use ellie without --debug so I can quickly check?
2019-04-24T10:28:14.368200
Maxwell
elmlang
general
It seems like that it was only a problem within the browser itself (Chrome), that interpretes the "+" as an " ". Not an Elm problem.
2019-04-24T10:46:31.368700
Tanika
elmlang
general
not at the moment, but it is on the roadmap!
2019-04-24T10:50:01.368900
Alicia
elmlang
general
<https://github.com/ellie-app/ellie/issues/66> is the tracking issue
2019-04-24T10:50:49.369100
Alicia
elmlang
general
i think it speaks a lot to elms safety that the only thing i get from this fatal error is... no error message inside elm. everything else still works like a charm
2019-04-24T10:50:51.369300
Emilee
elmlang
general
What if each view’s type signature includes a list of the shit which should be canceled (or a function returning such a list), should the view be canceled out of. Then when you hit the view cancel trigger in your code, the things to kill are already there (even if they can’t be killed in this current version of elm). S...
2019-04-24T12:47:44.369600
Ester
elmlang
general
<@Floy> What request type in particular is causing you trouble?
2019-04-24T12:52:48.369800
Dede
elmlang
general
<@Dede> seems it got lost somewhere but it is just investigating the matter for the training. People are asking alot about similirarities and cancelling request was one of them. I do have example at hand now
2019-04-24T13:12:51.370100
Floy
elmlang
general
Dont have
2019-04-24T13:13:06.370300
Floy
elmlang
general
Ehhh...phone and slack are not cooperating...
2019-04-24T13:13:36.370600
Floy
elmlang
general
Gotcha. No rush.
2019-04-24T13:14:03.370800
Dede
elmlang
general
<@Ester> I think that I would cancel request from an old view only if new URL is for different one and only then
2019-04-24T13:15:28.371000
Floy
elmlang
general
About function signature...well each view would have to have the same signature to get a list of request that can be safely cancelled if necessarry
2019-04-24T13:16:43.371200
Floy
elmlang
general
I cant promise to cook an example up...I am busy every evening with a contract...not to mention that I might be developing flu...
2019-04-24T13:18:34.371400
Floy
elmlang
general
I just added a `port` to my project, but it seems the JS console does not find it. It’s already being exposed in the module :thinking_face: should I do something more?
2019-04-24T13:52:13.372400
Vilma
elmlang
general
Is it “wired” to the rest of your Elm app? Dead code elimination might be the culprit
2019-04-24T13:56:16.372900
Hoa
elmlang
general
maybe the JS is cached?
2019-04-24T13:56:18.373100
Vilma
elmlang
general
oh right, I think I had the exact same problem in my other port
2019-04-24T13:56:47.373200
Vilma
elmlang
general
let me use it somewhere to see if it works
2019-04-24T13:57:15.373400
Vilma
elmlang
general
Go :slightly_smiling_face:
2019-04-24T13:57:21.373600
Hoa
elmlang
general
hi
2019-04-24T15:18:56.374100
Giselle
elmlang
general
elm seems so promising for me. reading elm tutorial i had two aha moment (1. elm not having a null, and not having a template language like angular etc, because you can use elm in html)
2019-04-24T15:19:44.374900
Giselle
elmlang
general
do you know an online elm editor?
2019-04-24T15:23:47.375600
Giselle
elmlang
general
like stackblitz for angular?
2019-04-24T15:23:56.375900
Giselle
elmlang
general
ellie!
2019-04-24T15:24:03.376200
Briana
elmlang
general
could i use stackblitz for elm?
2019-04-24T15:24:11.376500
Giselle
elmlang
general
ok thx
2019-04-24T15:24:16.376700
Giselle
elmlang
general
<https://ellie-app.com/new>
2019-04-24T15:24:20.377000
Briana
elmlang
general
i'll chek it out
2019-04-24T15:24:22.377100
Giselle
elmlang
general
thx
2019-04-24T15:24:24.377400
Giselle
elmlang
general
It's good!
2019-04-24T15:24:26.377500
Briana
elmlang
general
You can ask any questions about it in <#C408UCWMN|ellie>.
2019-04-24T15:24:50.377800
Briana
elmlang
general
thx
2019-04-24T15:25:29.378200
Giselle
elmlang
general
have you heard about nativescript? i was thinking about using elm in nativescript? you think it's possible? i didnt readly find anything about it
2019-04-24T15:27:42.379300
Giselle
elmlang
general
There’s no DOM in nativescript, so you’d have to use elm in “headless” mode without a view function
2019-04-24T15:30:19.380100
Danika
elmlang
general
At which point maybe its a bit pointless, guess thats up to you to decide
2019-04-24T15:33:59.380600
Danika
elmlang
general
no dom, but in nativescipt you have native ui, could my view function just use nativescript ui tags?
2019-04-24T15:42:39.383400
Giselle
elmlang
general
The runtime touches the dom directly, its completely coupled to the browser
2019-04-24T15:51:21.386300
Danika
elmlang
general
You'd have to implement diffing, event handling, and stuff like that I believe
2019-04-24T15:58:27.386900
Kris
elmlang
general
Which is not entirely crazy, but probably not worth it.
2019-04-24T15:58:43.387400
Kris
elmlang
general
I experimented with that for a bit
2019-04-24T15:58:53.387700
Kris
elmlang
general
elm nativescript would be nice though
2019-04-24T16:01:07.388700
Danika
elmlang
general
has anyone done uploads with aws-s3 presigned url?
2019-04-24T19:58:13.389300
Jeanene
elmlang
general
I have an idea of how to implement, but wanted to check here first. :slightly_smiling_face:
2019-04-24T19:58:35.389700
Jeanene
elmlang
general
I’ve done it through ports using the AWS sdk for signed uploads to S3. But not directly from Elm
2019-04-24T20:59:59.395600
Francis
elmlang
general
I would be interested in a solution without ports too
2019-04-24T21:00:28.396500
Francis
elmlang
general
I need to convert a `List` of `Maybe`s to a `Maybe List`. In Haskell, I’d use `sequenceA`, is there a simple mechanism in Elm? Should I just use the following? ``` prependToMaybeList : Maybe a -&gt; Maybe (List a) -&gt; Maybe (List a) prependToMaybeList a maybeList = case a of Just val -&gt; Maybe.map ((::) val) ...
2019-04-24T21:05:53.397400
Jacquelyn
elmlang
general
You can just copy the haskell implementation for sequence
2019-04-24T21:24:50.397900
Kris
elmlang
general
That said, it's in the extrapackage <https://package.elm-lang.org/packages/elm-community/maybe-extra/5.0.0/Maybe-Extra#combine>
2019-04-24T21:25:38.398200
Kris
elmlang
general
Excellent, didn’t see this, thanks
2019-04-24T21:39:46.398400
Jacquelyn
elmlang
general
I’m getting this error message repeatedly. What do I do? ```$ elm install elm-lang/dom -- CORRUPT JSON ---------------------------------------------------------------- The elm.json for elm-community/list-extra 2.0.0 got corrupted somehow. I removed it from my file cache, so if it was some transient error it should be...
2019-04-25T00:49:51.399600
Lorriane
elmlang
general
<@Lorriane> `elm-lang/dom` is a package for Elm 0.18, use the DOM module in `elm/browser` instead
2019-04-25T00:52:02.400700
Earlean
elmlang
general
<@Earlean> Thanks, I’ll try that. What’s odd is I’m looking at <https://github.com/carwow/elm-slider/tree/7.0.1> which is 0.19, but has the line ```import DOM exposing (boundingClientRect)```
2019-04-25T00:59:12.402900
Lorriane