workspace stringclasses 4
values | channel stringclasses 4
values | text stringlengths 1 3.93k | ts stringlengths 26 26 | user stringlengths 2 11 |
|---|---|---|---|---|
elmlang | general | `var a = document.createElement("a")` - not in a document, and if you pass it to Elm, it will crash | 2019-04-30T03:29:26.211900 | Huong |
elmlang | general | `a.ownerDocument === document` #badfaith | 2019-04-30T03:32:03.212100 | Syble |
elmlang | general | it depends what you consider what's in a document or not | 2019-04-30T03:32:23.212300 | Syble |
elmlang | general | the a is part of the document, whatever it's inserted in the hierarchy or not | 2019-04-30T03:32:47.212500 | Syble |
elmlang | general | in a document = it appears in the tree as a node | 2019-04-30T03:32:48.212700 | Huong |
elmlang | general | if it appears in the tree, it’s by definition a node of that tree | 2019-04-30T03:33:10.212900 | Huong |
elmlang | general | and the document is not only the tree, I'm being pedantic, so no need to argue more, we're both right in a certain way | 2019-04-30T03:34:02.213100 | Syble |
elmlang | general | If we’re both right, there is ambiguity :smile: | 2019-04-30T03:35:53.213300 | Huong |
elmlang | general | ok, I see your point | 2019-04-30T03:36:39.213500 | Syble |
elmlang | general | :slightly_smiling_face: | 2019-04-30T03:36:43.213700 | Syble |
elmlang | general | So really, I don’t disagree with your interpretation at all, it’s a very sane interpretation that also _just works_. The fact that there are more ways to interpret what an `element` really is, is where things break down. | 2019-04-30T03:41:45.213900 | Huong |
elmlang | general | Actually you convinced me, I remembered they were a way to access nodes that are not children (must be an implementation specific of Expat or something else), but actually it doesn't seem.
For the fun:
`(new Array(...document.children)).indexOf(a)` | 2019-04-30T03:43:54.214300 | Syble |
elmlang | general | I think we can conclude this with “the DOM is complex, and naming is hard” :smile: | 2019-04-30T03:49:44.214500 | Huong |
elmlang | general | Yes. I don’t know the specifics, but I believe they are published during May. | 2019-04-30T03:56:20.214800 | Jin |
elmlang | general | when changing views in my app (ala spa example), the html and url changes are instant, but the page 'title' (i.e. <title>) is not | 2019-04-30T06:52:32.216100 | Adrian |
elmlang | general | is this a known, random bug or something? | 2019-04-30T06:52:41.216400 | Adrian |
elmlang | general | <@Adrian> if you type `document.title = "hello"` in the console, is it instant then? | 2019-04-30T06:56:27.217100 | Nana |
elmlang | general | nope! | 2019-04-30T06:57:33.217300 | Adrian |
elmlang | general | I didn't think to check that. | 2019-04-30T06:57:39.217500 | Adrian |
elmlang | general | weird, must be a chrome bug or something | 2019-04-30T06:57:49.217700 | Adrian |
elmlang | general | Yay, cannot wait :badger: | 2019-04-30T07:16:39.218100 | Leeanne |
elmlang | general | I'm using <https://package.elm-lang.org/packages/terezka/line-charts/latest/> how do I set the left margin of responsive chart <https://package.elm-lang.org/packages/terezka/line-charts/latest/LineChart-Container#responsive> | 2019-04-30T07:33:07.218300 | Wendy |
elmlang | general | i found way round the problem | 2019-04-30T08:03:35.218500 | Wendy |
elmlang | general | I have passed empty list to attributesHtml = [] in <https://package.elm-lang.org/packages/terezka/line-charts/latest/LineChart-Container#custom> | 2019-04-30T08:04:31.218600 | Wendy |
elmlang | general | is it an error in the documentation? | 2019-04-30T08:04:41.218700 | Wendy |
elmlang | general | <@Francis> if you’re still interested, you can DM me. I’ve got a working POC and it’s not _too bad_. :slightly_smiling_face: I’ll prob try to write up a blog post about it here in a week or two when all the polish is done if I’ve got the extra time. | 2019-04-30T09:12:27.219000 | Jeanene |
elmlang | general | Wondered if anyone here is using elm-markup? | 2019-04-30T09:35:30.219700 | Carmon |
elmlang | general | so you got rid of the `let` :open_mouth: | 2019-04-30T09:37:30.219800 | Nana |
elmlang | general | Yeah, turns out the problem kind of disappears if you wrap it up in a type :smile: | 2019-04-30T09:40:23.220000 | Huong |
elmlang | general | so if I want Watchers to optionally return commands, would you do it like:
```
type Watcher m msg
= Watcher (m -> m -> (m, Cmd msg))
```
or:
```
type Watcher m msg
= Watcher (m -> m -> m)
| WithCmd (m -> m -> (m, Cmd msg))
```
? | 2019-04-30T09:51:56.220200 | Nana |
elmlang | general | I’d go for the former (and do the `Cmd.none`) stuff - handling less cases seems easier | 2019-04-30T10:02:22.220500 | Huong |
elmlang | general | <https://ellie-app.com/5qkP5s2fWmga1> Why does `fooBar` not work? | 2019-04-30T10:24:14.220900 | Shaina |
elmlang | general | the `Foo` type alias is more a constraint than a concrete type. It means "type with at least this field", but that is not enough to actually create a value. | 2019-04-30T10:28:49.221900 | Virgie |
elmlang | general | `fooBar : Bar -> Foo {}` would work, but then that’s just `Bar` really | 2019-04-30T10:29:08.222700 | Huong |
elmlang | general | If you construct a record and you know all the fields, the type signature has to reflect this fact. Since you can’t construct a record with an unknown set of fields, you can’t return an extensible record with an unbound type variable denoting the other fields | 2019-04-30T10:31:17.226700 | Huong |
elmlang | general | I have a tricky riddle for you all to play around and exercise the brains. Given a `button` function accepting a type of a button (like Submit, Cancel or Normal, affecting the visual appearance) and size of a button (like Small, Medium or Large, also affecting the visual appearance), we want to disallow certain combina... | 2019-04-30T10:38:32.232400 | Audria |
elmlang | general | if it doesn’t have to be a compiler error you could force it down to valid states, something like
```
withSize: Size -> Button -> Button
withSize size button =
if size == Large && button.style == Normal then
{ button | size = Medium }
else
{ button | size = size }
``` | 2019-04-30T10:42:57.234500 | Alicia |
elmlang | general | <https://ellie-app.com/5qm7FyQYLRpa1> | 2019-04-30T10:44:43.234600 | Huong |
elmlang | general | basically how rtfeldman/elm-css does a lot of seemingly magic tricks | 2019-04-30T10:45:52.234800 | Huong |
elmlang | general | oooo I like it | 2019-04-30T10:46:52.235100 | Alicia |
elmlang | general | disregard what I wrote there and look at <@Huong>’s suggestion in the thread | 2019-04-30T10:47:11.235600 | Alicia |
elmlang | general | we use this in our application for similar purposes, it’s pretty neat. Just be wary of someone writing `foobar : Variation foo` because then that suddenly is allowed everywhere :smile: | 2019-04-30T10:47:42.235800 | Huong |
elmlang | general | <@Huong>, <@Virgie> thank you both :slightly_smiling_face: | 2019-04-30T10:49:34.236400 | Shaina |
elmlang | general | got it working :blush:
<https://ellie-app.com/5qmcNqnfkkSa1> | 2019-04-30T10:50:40.236500 | Nana |
elmlang | general | (not exposing `Variation` means that such tomfoolery can only happen in one module, though, so it’s pretty easy to control) | 2019-04-30T10:53:38.237000 | Huong |
elmlang | general | wow, that’s tricky but impressive! | 2019-04-30T10:54:32.237200 | Audria |
elmlang | general | (you don’t _technically_ need `Variation` to hold a `String`, but I find that you’ll need a `variationToSTring` at some point, and that becomes easy to write when it’s already in there :smile: ) | 2019-04-30T10:56:14.237400 | Huong |
elmlang | general | <https://ellie-app.com/5qmn89B7BYCa1> for reference | 2019-04-30T11:00:19.237600 | Huong |
elmlang | general | Oh and, just because it’s a fun little extra - with `--optimize`, all the variations compiled to _just a `String`_ | 2019-04-30T11:04:27.237800 | Huong |
elmlang | general | so this is a zero-cost abstraction | 2019-04-30T11:04:37.238000 | Huong |
elmlang | general | ```var author$project$Main$large = 'large';
var author$project$Main$medium = 'medium';
var author$project$Main$small = 'small';``` | 2019-04-30T11:05:09.238200 | Huong |
elmlang | general | (or close to it, since the compiler isn’t quite smart enough to realise that `variationToString` can just disappear altogether, it compiles it down to something like `function (v) { return v; }` | 2019-04-30T11:07:38.238400 | Huong |
elmlang | general | certain minimizers might be able to optimize that away, though | 2019-04-30T11:07:53.238600 | Huong |
elmlang | general | ) | 2019-04-30T11:08:12.238800 | Huong |
elmlang | general | This is pure wizardry, absolute madness | 2019-04-30T12:16:58.239600 | Danika |
elmlang | general | Is this hacky, or legit? | 2019-04-30T12:18:34.240000 | Danika |
elmlang | general | Legit, just using the type-checker’s rules for extensible records, and using those as a phantom type | 2019-04-30T12:29:05.240200 | Huong |
elmlang | general | _phantom types_ that was it! | 2019-04-30T12:37:46.240600 | Danika |
elmlang | general | anyone visiting DC in May? Interested in giving a talk? | 2019-04-30T14:26:48.241300 | Modesto |
elmlang | general | Hey out there | 2019-04-30T15:18:57.241600 | Willodean |
elmlang | general | I am having a problem with `elm/time` | 2019-04-30T15:19:05.241900 | Willodean |
elmlang | general | both of these are today `1556570333000` `1556651400000` | 2019-04-30T15:19:30.242400 | Willodean |
elmlang | general | when passed to `toDay` one gives `30` which is correct, and the other gives `29` | 2019-04-30T15:19:50.242800 | Willodean |
elmlang | general | do you specify the correct tz? that'd be my guess | 2019-04-30T15:20:49.243100 | Fidela |
elmlang | general | yes | 2019-04-30T15:20:57.243300 | Willodean |
elmlang | general | same for both | 2019-04-30T15:21:00.243500 | Willodean |
elmlang | general | <@Willodean> I tried it with `new Date(1556570333000)` in the browser console and I too get 29 and 30 :smile: | 2019-04-30T15:23:42.244300 | Nana |
elmlang | general | how odd | 2019-04-30T15:24:13.244500 | Willodean |
elmlang | general | oh interesting | 2019-04-30T15:24:20.244700 | Willodean |
elmlang | general | `new Date(1556570333000)` vs `Date(1556570333000)` | 2019-04-30T15:24:31.245200 | Willodean |
elmlang | general | `new Date(1556570333000)` becomes `Mon Apr 29 2019 22:38:53 GMT+0200` | 2019-04-30T15:24:44.245400 | Nana |
elmlang | general | yes it does | 2019-04-30T15:24:50.245600 | Willodean |
elmlang | general | What package should I be using to make a simple table? | 2019-04-30T15:26:16.246600 | Glayds |
elmlang | general | seems like `Date()` without `new` ignores any arguments and just returns the current time. JS is weird :stuck_out_tongue: | 2019-04-30T15:26:44.247000 | Nana |
elmlang | general | <@Glayds> you can just use `table` `tr` `td` etc. from the `Html` package | 2019-04-30T15:27:47.248100 | Nana |
elmlang | general | yeah, terrible | 2019-04-30T15:36:12.248300 | Willodean |
elmlang | general | when changing the source-directories values in my elm.json file, do I need to do anything to pick up the change or should it just pickup the next time I run “elm-test”? | 2019-04-30T17:30:32.249700 | Rosette |
elmlang | general | I feel like its not finding paths I’ve defined | 2019-04-30T17:30:54.250000 | Rosette |
elmlang | general | I think that should just work | 2019-04-30T17:32:24.250200 | Virgie |
elmlang | general | Sorry this is more of a Css question than an elm one but when using the `table` from the `Html` package, what is a `Css` function that spaces everything out within the table? I've tried `padding` but it just seems to pad the outside margin | 2019-04-30T18:51:26.252100 | Glayds |
elmlang | general | Have you tried flexbox? <https://www.kirupa.com/html5/centering_vertically_horizontally.htm> | 2019-04-30T18:54:28.252300 | Wenona |
elmlang | general | No I haven't I'll check it out thanks! | 2019-04-30T19:05:16.252600 | Glayds |
elmlang | general | I'm writing my first package. For applications, I usually use `npm` to install `elm-format`, `elm-test`, and have custom scripts. I don't see any examples of elm packages with a `package.json`, though. How do people normally run tests on their packages? | 2019-04-30T21:20:44.254600 | Rico |
elmlang | general | people often install elm-format, elm-test and elm globally | 2019-04-30T21:24:20.255300 | Earlean |
elmlang | general | I am using nix for this | 2019-04-30T21:36:37.255800 | Willodean |
elmlang | general | Do you have an example? | 2019-04-30T21:45:52.256000 | Rico |
elmlang | general | I assume you mean this Nix? <https://nixos.org/nix/> | 2019-04-30T21:47:44.256200 | Rico |
elmlang | general | :point_up: this all needs to be a blog post. | 2019-04-30T23:43:32.256600 | Leoma |
elmlang | general | <https://medium.com/@ckoster22/advanced-types-in-elm-phantom-types-808044c5946d> like this one? ^^ | 2019-05-01T01:02:33.258400 | Danika |
elmlang | general | How do I change curly braces expansion and brackets expansion for that matter from this to this. I'm talking about VScode | 2019-05-01T01:26:04.259100 | Lory |
elmlang | general | None | 2019-05-01T01:26:26.259400 | Lory |
elmlang | general | Help! Im getting a very strange error | 2019-05-01T02:02:41.260700 | Isaias |
elmlang | general | Oh.. i think i know why... | 2019-05-01T02:04:54.261100 | Isaias |
elmlang | general | Its a compiler bug :hushed: | 2019-05-01T02:07:10.261400 | Isaias |
elmlang | general | Wait, i dont know why! | 2019-05-01T02:14:29.261800 | Isaias |
elmlang | general | "thread blocked indefinitely in mvar operation" | 2019-05-01T02:15:07.262300 | Isaias |
elmlang | general | yeah, that would be a compiler bug. Are you using Elm 0.19? | 2019-05-01T02:19:02.263000 | Earlean |
elmlang | general | Yup | 2019-05-01T02:19:06.263200 | Isaias |
elmlang | general | If i gave you context i would need to give you a 600 line file | 2019-05-01T02:20:03.263800 | Isaias |
elmlang | general | I need to get this done tonight! | 2019-05-01T02:25:41.264100 | Isaias |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.