workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | There are other front end fp langs that offer upfront js support, but elm is not one of them | 2019-01-11T07:26:06.144600 | Danika |
elmlang | general | <@Danika> so it's the intention that all kernel code from elm-explorations will eventually be merged into core I guess? | 2019-01-11T07:29:34.145400 | Nana |
elmlang | general | As I understand, the intention is there will be no kernel code at all eventually | 2019-01-11T07:30:03.145900 | Danika |
elmlang | general | <@Danika> I believe <@Liza> is asking how to work on elm core locally | 2019-01-11T07:39:23.146700 | Agustin |
elmlang | general | Rather than publishing native JS | 2019-01-11T07:39:30.146900 | Agustin |
elmlang | general | kind of | 2019-01-11T07:39:36.147500 | Liza |
elmlang | general | I.e. if Evan ever opened up development of the language itself to others, how would you go about it | 2019-01-11T07:39:50.148100 | Agustin |
elmlang | general | It’s a moot point because Evan won’t do that | 2019-01-11T07:40:01.148700 | Danika |
elmlang | general | Well its not | 2019-01-11T07:40:14.149300 | Agustin |
elmlang | general | >WebAssembly support is complete
as i remember - there was no plans for that, and no one works on that | 2019-01-11T07:40:19.149800 | Liza |
elmlang | general | Because explorations are for precisely this reason | 2019-01-11T07:40:27.150000 | Agustin |
elmlang | general | Even if Evan then only takes the results as a guideline for his own dev of a library for core | 2019-01-11T07:40:57.150600 | Agustin |
elmlang | general | And at some point, someone other than Evan must be allowed to work on core | 2019-01-11T07:41:15.150900 | Agustin |
elmlang | general | Simply to remove the bus factor | 2019-01-11T07:41:21.151100 | Agustin |
elmlang | general | Unless we somehow transpile Evan into Elm itself… :thinking_face: | 2019-01-11T07:41:35.151400 | Agustin |
elmlang | general | Anyone have a USB to Evan adaptor? | 2019-01-11T07:41:59.151700 | Agustin |
elmlang | general | On a less silly note, you can fork elm, so you should be able to work on it that way? | 2019-01-11T07:44:06.155100 | Agustin |
elmlang | general | and there is also other part of “elm” that is compiler - that stuff lives in haskell, so that can be “easy” compiled by anyone who knows how haskell tooling works (btw kind of readable / hackable), but to work with “native modules” for people like me (more than 15y exp in JS) is kind of challenge | 2019-01-11T07:44:06.155200 | Liza |
elmlang | general | Thank you <@Desire> :+1: | 2019-01-11T07:44:32.155400 | Allyn |
elmlang | general | I wholeheartedly agree with you that there _should_ be some mechanism for playing with kernel code if not for the only reason of being able to contribute to existing projects | 2019-01-11T07:45:05.156100 | Danika |
elmlang | general | but there isn’t and it is a design choice of the language to not have that | 2019-01-11T07:46:01.157500 | Danika |
elmlang | general | for now “easiest way” looks like just recompile compilier and commenting out hardcoded stuff will do job | 2019-01-11T07:46:13.158000 | Liza |
elmlang | general | Indeed | 2019-01-11T07:46:21.158200 | Danika |
elmlang | general | :+1: | 2019-01-11T07:46:24.158400 | Agustin |
elmlang | general | Or just get blessed by Evan | 2019-01-11T07:46:30.158700 | Danika |
elmlang | general | Just be aware that no native code is going to to be accepted into packages going forward and hack away :stuck_out_tongue: | 2019-01-11T07:46:48.159100 | Agustin |
elmlang | general | Or just fork it ^^ | 2019-01-11T07:47:14.159800 | Danika |
elmlang | general | it will not work.. | 2019-01-11T07:47:23.160000 | Liza |
elmlang | general | You cannot run forked libs (if they contain native code).. | 2019-01-11T07:47:42.160500 | Liza |
elmlang | general | or i have no clue how to do that. | 2019-01-11T07:48:09.160900 | Liza |
elmlang | general | I meant fork the language | 2019-01-11T07:49:06.161900 | Danika |
elmlang | general | and about WASM - that is feature that i waiting mostly (as selling point of elm) - but as i understand for next year there is no plans for that - so no way | 2019-01-11T07:49:09.162100 | Liza |
elmlang | general | There are no immediate wasm plans | 2019-01-11T07:49:19.162400 | Danika |
elmlang | general | because wasm is still a working draft | 2019-01-11T07:49:35.162900 | Danika |
elmlang | general | and other part is that JS is part of ELM | 2019-01-11T07:51:17.163600 | Liza |
elmlang | general | from evans post on removing native code in 0.19:
> Since then, I have come to believe that there is no amount of documentation or communication that will really be effective. If the path exists, people will walk it. And with WebAssembly on the horizon, this is a door that is going to close on us anyway. | 2019-01-11T07:51:21.163700 | Danika |
elmlang | general | I may be overcomplicating it, but when I used that kind of ID type my code looked like this:
```
type ID a
= ID String
type CollectionType
= CollectionType
type alias CollectionID =
ID CollectionType
type alias Collection =
{ uuid : CollectionID
, name : String
}
id : a -> String -> ID a
id phantom uuid =
ID uuid
collectionID : String -> ID CollectionType
collectionID =
id CollectionType
``` | 2019-01-11T07:55:02.163800 | Sharon |
elmlang | general | impo main problem with wasm is that you need to rewrite compiler again, to be able map it to new “target”, and rework all JS mappings (have no clue how much of that was done by migration to 0.19) | 2019-01-11T07:58:04.165400 | Liza |
elmlang | general | for me additional target as wasm would be biggest selling point at work (in company where is 100+ js-devs) | 2019-01-11T07:58:58.166600 | Liza |
elmlang | general | but till that `elm` looks (for other devs) like toy where you have no controll, and “immutable and FP is slow by default” | 2019-01-11T08:00:09.167600 | Liza |
elmlang | general | well you have no control over things you should not control | 2019-01-11T08:26:32.170900 | Desire |
elmlang | general | is your js code able to change your bios? | 2019-01-11T08:27:31.172000 | Desire |
elmlang | general | Depends if your on a chromebook or not :drum_with_drumsticks: | 2019-01-11T08:28:14.172300 | Agustin |
elmlang | general | cros represent! | 2019-01-11T08:28:23.172500 | Danika |
elmlang | general | oh snap :smile: | 2019-01-11T08:29:00.172900 | Desire |
elmlang | general | Or NodeOS (yes thats a thing) | 2019-01-11T08:31:08.173400 | Danika |
elmlang | general | Just say noooooo to node | 2019-01-11T08:32:14.173700 | Agustin |
elmlang | general | <https://github.com/NodeOS/NodeOS> | 2019-01-11T08:34:10.174000 | Danika |
elmlang | general | On a more topical note, I want to start working on an Elm package. Do i need to setup anything differently/specifically? | 2019-01-11T08:34:39.174700 | Danika |
elmlang | general | just make sure you generate an elm.json for a package | 2019-01-11T08:55:26.175700 | Desire |
elmlang | general | the formats are different | 2019-01-11T08:55:43.176200 | Desire |
elmlang | general | and read the both package best practices from evan and dillon | 2019-01-11T08:56:33.177200 | Desire |
elmlang | general | <https://github.com/dillonkearns/idiomatic-elm-package-guide> this yes? | 2019-01-11T08:57:07.177400 | Danika |
elmlang | general | yes and <https://package.elm-lang.org/help/design-guidelines> | 2019-01-11T08:57:29.177800 | Desire |
elmlang | general | Aye I’ve read those. Tah | 2019-01-11T08:57:56.178100 | Danika |
elmlang | general | I have a problem: I have a port that works just fine when the Elm app has already been running for a short bit, but the port simply doesn't get called when I run it during initialization (well, not exactly the init function, but very shortly after) | 2019-01-11T10:53:48.179800 | Todd |
elmlang | general | Hey everyone | 2019-01-11T10:53:54.179900 | Todd |
elmlang | general | I tested it and the port itself works, but when it should be run after startup, nothing happens | 2019-01-11T10:54:27.180400 | Todd |
elmlang | general | fwiw we use elm in prod. ~50k loc | 2019-01-11T11:44:54.180700 | Rosa |
elmlang | general | Yeah <@Cora>, you just lock in certain functions to certain types by making the `a` in the type signature what every you want. But you can also do things like lock in consistency. Like for example:
```
getById : Id a -> Dict String a -> Maybe a
getById id dict =
Dict (Id.toString id) dict
```
You can use `getById` for any `a`, but it _must_ be the same `a` as the one in the `Id a`. | 2019-01-11T13:23:00.181200 | Ashton |
elmlang | general | Does that make sense? All you have to do is make the type signature `Id User` and is it an `Id User`, and thereafter it cannot be anything else. All it takes is making the type signature that to start with, and then from then on out through out your program theres type safety. | 2019-01-11T13:24:51.181500 | Ashton |
elmlang | general | Do people usually end up using webpack with Elm in production stacks or are elm make and reactor enough? Just asking because I'm upgrading one of mine to 0.19 and seems like elm-asset-loader maybe isn't compatible - so I'm wondering if it's wise to ditch webpack at this point - or start working round/ with what I have to get my scripts working again. | 2019-01-11T14:13:08.184600 | Gale |
elmlang | general | <@Ashton> although if `User` is a type alias you are then relying on duck typing :thinking_face: probably a pretty silly concern though | 2019-01-11T14:14:08.184700 | Nana |
elmlang | general | Im using webpack | 2019-01-11T14:15:45.185000 | Agustin |
elmlang | general | And I’m not the only one | 2019-01-11T14:15:51.185200 | Agustin |
elmlang | general | But its not used “in production” its just building for netlify in my case | 2019-01-11T14:16:04.185600 | Agustin |
elmlang | general | Yeah - seems like it might be the default - but I'm wondering if build/ compile with webpack is always necessary with teams using Elm or if it's just a habit. | 2019-01-11T14:17:58.186800 | Gale |
elmlang | general | Its by no means a default! | 2019-01-11T14:18:45.187800 | Agustin |
elmlang | general | Remember that elm doesn’t minify or bundle assets | 2019-01-11T14:19:00.188500 | Agustin |
elmlang | general | I'm unsure whether Elm tooling is designed (or aimed towards) being able to support production project builds on it's own or whether it is assumed that people will use webpack. | 2019-01-11T14:19:02.188800 | Gale |
elmlang | general | and things like your `getById` example probably provide more safety than what you lose from the duck typing | 2019-01-11T14:19:12.189000 | Nana |
elmlang | general | So in my upgrade I'm coming across people saying optimize won't work with uglify and things like that. I guess I'm trying to find out what the 'standard/ preferred' method is for bundling assets mostly at this point. My app is small and I'm not too bothered with the minify part. | 2019-01-11T14:20:55.191100 | Gale |
elmlang | general | I had a thought that webpack was maybe over-complicating things for my project (since it's the last hurdle for my 0.19 upgrade). <@Agustin> Thanks for your comments. | 2019-01-11T14:23:46.192400 | Gale |
elmlang | general | FWIW Webpack was not a blocker in my 0.18 -> 0.19 upgrade at all | 2019-01-11T14:31:46.192800 | Agustin |
elmlang | general | It’s quite a minimal webpack config tho | 2019-01-11T14:31:52.193000 | Agustin |
elmlang | general | Parcel is awesome! We use it in production too. :) | 2019-01-11T14:32:21.193500 | Timika |
elmlang | general | <@Agustin> I bet it's just my original webpack config being bad. | 2019-01-11T14:33:58.194200 | Gale |
elmlang | general | <@Timika> Parcel looks neat. I hadn't heard of it before. | 2019-01-11T14:35:03.194700 | Gale |
elmlang | general | oh actually writing:
```
type alias User =
{ id: Id User
, name: String
}
```
isn't allowed anyway, as it creates an infinitely recursive type :stuck_out_tongue:
so are you doing like this then?
```
type User
= User
{ id : Id User
, name : String
}
``` | 2019-01-11T14:37:18.194900 | Nana |
elmlang | general | maybe <@Sharon>'s example is actually the most convenient then, since you don't need to unwrap `User` | 2019-01-11T14:47:07.195400 | Nana |
elmlang | general | Thanks both ^^ since <@Agustin> said webpack shouldn't be causing me an issue... I nuked my node and stuff dirs - and ta da! (a lovely white screen) - but also successful build and compile - so I think I'm making progress. | 2019-01-11T14:54:44.198500 | Gale |
elmlang | general | Yeah Ive run into that recursive type problem. Ive never done your solution <@Nana>, but it seems like a good one. Instead I just try not to put ids _inside_ the thing they are an `Id` of, and instead use lots of `(Id User, User)`. Another, however less ideal solution Ive done is:
```
type UserId = UserId
type alis User =
{ id : Id UserId }
```
This also maintains consistency, even if its not using the `User` type. | 2019-01-11T15:56:39.198700 | Ashton |
elmlang | general | If you try to pattern match on an enumerated type but don't cover all cases, you get a compiler error. Is there a way to do something similar for record types, where you get an error if you don't name every field? | 2019-01-11T18:55:54.201900 | Kimiko |
elmlang | general | Could someone shed some light on what exactly happens when one calls `var app = Elm.Main.init({ flags: flags });` ? We ran into some issues where other JS components initialised before elm were misbehaving, which was fixed simply by moving them to after Elm.init | 2019-01-11T19:04:25.204300 | Daria |
elmlang | general | It kicks off the program and does the initial render and everything. Were the other JS components using things elm needs to render? | 2019-01-11T19:09:25.205900 | Augustus |
elmlang | general | What happens depends on whether you're using `Browser.element` or `Browser.application` | 2019-01-11T19:32:33.206500 | Earlean |
elmlang | general | `Browser.element` will mount the Elm app on a given DOM node. | 2019-01-11T19:32:57.206700 | Earlean |
elmlang | general | `Browser.application` will mount on the `body` DOM node removing any existing child nodes | 2019-01-11T19:34:25.206900 | Earlean |
elmlang | general | <@Earlean> thanks, we’re using Browser.application and indeed it seems clearing the child nodes was the culprit I was looking for as the js elements used “document.body.appendChild(script);” internally | 2019-01-11T19:44:19.207100 | Daria |
elmlang | general | elm-app install elm-lang/svg
-- OLD DEPENDENCIES --------------------------------------------------- elm.json
The following packages do not work with Elm 0.19.0 right now:
elm-lang/svg
This may be because it is not upgraded yet. It may be because a better solution
came along, so there was no need to upgrade it. Etc. *Try asking around on Slack*
to learn more about the topic.
Note: Whatever the case, please be kind to the relevant package authors! Having
friendly interactions with users is great motivation, and conversely, getting
berated by strangers on the internet sucks your soul dry. Furthermore, package
authors are humans with families, friends, jobs, vacations, responsibilities,
goals, etc. They face obstacles outside of their technical work you will never
know about, so please assume the best and try to be patient and supportive! | 2019-01-11T20:49:21.207400 | Grisel |
elmlang | general | OK - anyone come across this issue before? Knows answer? | 2019-01-11T20:51:06.208400 | Grisel |
elmlang | general | Worked it out. | 2019-01-11T21:00:25.208700 | Grisel |
elmlang | general | <https://github.com/elm-lang/svg> aka “elm-app install elm/svg” is now showing: “This repository has been archived by the owner. It is now read-only.” with a README.md saying “Repo Moved to elm/svg” | 2019-01-11T21:01:26.209500 | Grisel |
elmlang | general | So.. the new location is <https://github.com/elm/svg> and the install instruction elm-app install elm/svg worked. | 2019-01-11T21:08:00.210400 | Grisel |
elmlang | general | Here is my plan:
Add:
elm/svg 1.0.1
Would you like me to update your elm.json accordingly? [Y/n]: Y
Starting downloads...
● elm/svg 1.0.1
Dependencies ready! | 2019-01-11T21:08:07.210600 | Grisel |
elmlang | general | Thanks. | 2019-01-11T21:08:09.210800 | Grisel |
elmlang | general | Hope it helps someone else. | 2019-01-11T21:08:19.211100 | Grisel |
elmlang | general | For future reference elm-lang/* is 0.18 and elm/* is 0.19 :) | 2019-01-12T05:08:18.212500 | Danika |
elmlang | general | Oops, accidental bold | 2019-01-12T05:08:32.212900 | Danika |
elmlang | general | how to i get a mouse up event that works on the hole document | 2019-01-12T06:56:10.213200 | Yang |
Subsets and Splits