workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | I just finished updating my application from 0.18 and 0.19, but using `--optimize` only gets the compiled file from 1.2MB to 1.1MB. I guess I was expecting more. Could I be doing something wrong? | 2018-12-31T04:52:41.387200 | Fred |
elmlang | general | <@Fred> `--optimize` doesn't minify but it does have an output that is easier to minify <https://guide.elm-lang.org/optimization/asset_size.html#instructions> provides the best command for minifying | 2018-12-31T05:03:15.388300 | Earlean |
elmlang | general | Aha | 2018-12-31T05:03:36.388500 | Fred |
elmlang | general | That's better | 2018-12-31T05:07:06.388900 | Fred |
elmlang | general | 127k -> 84k | 2018-12-31T05:07:16.389200 | Fred |
elmlang | general | Happy new year all. I'm wondering why in the Elm docs, it is so discouraged to write effect manager helpers? If I knew why it was discouraged, it might give me an idea for how to implement some kind of alternative. <https://package.elm-lang.org/packages/elm/core/latest/Platform> | 2018-12-31T07:56:50.390600 | Santina |
elmlang | general | I don't think you even CAN write an effect manager since 0.19 | 2018-12-31T08:02:58.392100 | Mirian |
elmlang | general | It seems possible given the documentation, | 2018-12-31T08:03:09.392300 | Santina |
elmlang | general | unless the documentation is outdated | 2018-12-31T08:03:12.392500 | Santina |
elmlang | general | Yeah I think this is outdated but somebody got to confirm this | 2018-12-31T08:03:37.392700 | Mirian |
elmlang | general | As to why - we loose all guarantees that elm gives us when we just wrap js code | 2018-12-31T08:04:50.392900 | Mirian |
elmlang | general | If you need to access some js library ports are the way to go | 2018-12-31T08:06:49.393100 | Mirian |
elmlang | general | effect managers are not necessarily using JS code though. The main problem with them is that they store state outside of the model. This does indeed break the nice guarantees that elm otherwise provides.
They are also discouraged because they are the "easy" solution, thinking about the problem harder in an elm context likely gives a better solution | 2018-12-31T08:07:45.393300 | Virgie |
elmlang | general | Thanks for the tips, <@Mirian> and <@Virgie>! | 2018-12-31T08:09:05.393500 | Santina |
elmlang | general | I'm trying to write a shrinker (elm-explorations/test v1.2.0) for my own data structure but fail to import module 'Lazy.List' ("I cannot find that module!").
Importing module 'Shrink' works without problems.
Any ideas? | 2018-12-31T08:44:20.395900 | Lavonna |
elmlang | general | looks like it is not exported. Do you need anything besides the type signature? (also try <#C0CLGCMMF|testing> ) | 2018-12-31T08:48:21.396500 | Virgie |
elmlang | general | Where do you get the info from that it is not exported? (->Where should I look to find this out myself?) I thought I need it because the 'Shrink' doc (<https://package.elm-lang.org/packages/elm-explorations/test/1.2.0/Shrink>) says a shrinker should produce a lazy list and I had a look at the provided implementations.
Can I produce any kind of lazy list (maybe from other packages)? | 2018-12-31T09:04:59.400100 | Lavonna |
elmlang | general | ah . . . "elm.json" in the package source contains the info, what modules are exposed | 2018-12-31T09:08:11.400900 | Lavonna |
elmlang | general | in the docs <https://package.elm-lang.org/packages/elm-explorations/test/latest/Shrink#lazylist> exposed types are blue/clickable. `LazyList` isn't | 2018-12-31T09:17:43.401400 | Virgie |
elmlang | general | not true - for example `Shrinker` is exposed but not blue/clickable | 2018-12-31T09:19:44.401500 | Howard |
elmlang | general | Hmm, that did work before. Might be dropped in 0.19 | 2018-12-31T09:26:16.401700 | Virgie |
elmlang | general | also it does work for `elm/core` <https://package.elm-lang.org/packages/elm/core/latest/String> | 2018-12-31T09:26:41.401900 | Virgie |
elmlang | general | maybe it only works for types and not aliases? | 2018-12-31T09:27:28.402100 | Virgie |
elmlang | general | Can someone explain what is meant by “effect manager”? | 2018-12-31T09:32:48.402400 | Rosalee |
elmlang | general | they are something used in the implementation of subscriptions and commands, for instance the browser package uses them for keyboard and mouse events <https://github.com/elm/browser/blob/1.0.1/src/Browser/Events.elm#L246> | 2018-12-31T09:47:22.402700 | Virgie |
elmlang | general | but, like native code, they break guarantees and thus can only be used by the core team in specific packages | 2018-12-31T09:47:50.402900 | Virgie |
elmlang | general | thx - wasn't aware that the links correspond to the exposed types | 2018-12-31T10:01:00.403100 | Lavonna |
elmlang | general | Although in my special case (at most one possibility ever) I would conceptually get away with a regular list, the compiler insists on a 'Lazy.List.LazyList' . . . is there a more elegant way to solve this, than to replicate/copy the corresponding non-exposed code from 'elm-explorations/test'? | 2018-12-31T10:37:38.406000 | Lavonna |
elmlang | general | really depends on the specifics I think. The folks in <#C0CLGCMMF|testing> will know more (also sharing the specifics might help) | 2018-12-31T11:12:22.406700 | Virgie |
elmlang | general | thx - I'll ask there | 2018-12-31T12:24:34.407200 | Lavonna |
elmlang | general | new in town and looking for a jumpstart to accessing airtable from ELM. wondering if the is a GraphQL package. just getting started… | 2018-12-31T12:25:49.408400 | Lizeth |
elmlang | general | join us in <#C0RSQNQ92|graphql> | 2018-12-31T12:40:33.408700 | Rosalee |
elmlang | general | Tldr, check out <https://github.com/dillonkearns/elm-graphql> | 2018-12-31T12:40:50.409000 | Rosalee |
elmlang | general | Imagine the best of Graphql and Elm. Impossible to write an invalid query. Not just a syntactically invalid query. You can only build queries your api can return a valid response for. | 2018-12-31T12:42:49.410900 | Rosalee |
elmlang | general | Hi
I have been on and off with elm for different versions.. during signals.. then subscriptions... I have written a few apps in elm during that time.
I now require to write an App for my startup :slightly_smiling_face:
Can someone tell me if there are any new breaking changes ? New design patterns / philosophies ?
What are the upcoming / hot topics in Elm ?
Thanks for providing any information. | 2018-12-31T14:41:34.414300 | Britt |
elmlang | general | I would say to skim the recent conference talks to get an idea of whats hot these days <https://www.youtube.com/channel/UCOpGiN9AkczVjlpGDaBwQrQ> | 2018-12-31T14:44:19.415100 | Rosalee |
elmlang | general | I wish there were a way to easily look at the optimized output of a package. | 2018-12-31T16:26:44.416700 | Wendell |
elmlang | general | Is there an equivalent for `Date.fromString` in Elm .19, to parse a time string into a Posix? | 2018-12-31T16:56:42.417700 | Macy |
elmlang | general | <@Macy> Maybe <https://package.elm-lang.org/packages/rtfeldman/elm-iso8601-date-strings/latest> | 2018-12-31T16:59:15.418100 | Aurore |
elmlang | general | Thanks, <@Aurore> | 2018-12-31T17:00:13.418400 | Macy |
elmlang | general | Happy new year! :slightly_smiling_face: | 2019-01-01T00:29:21.419000 | Debrah |
elmlang | general | <@Delmy> I like your example as well. Thanks for your appreciation. We should probably start an online book with parsing examples. I think a lot of people would benefit from it | 2019-01-01T08:35:26.420000 | Marcelino |
elmlang | general | Is there any reason why you cannot use `Html.Attributes.property` (or `VirtualDom.property`) to set an element's `innerHTML` value in 0.19? | 2019-01-01T22:18:55.423500 | Norris |
elmlang | general | When I ported our 0.18 code to 0.19, that line stopped working | 2019-01-01T22:19:23.424100 | Norris |
elmlang | general | I can set a different attribute, e.g. if I change `property "innerHTML" (Json.Encode.string stringVal)` to `property "innerText" (Json.Encode.string stringVal)`, it will work | 2019-01-01T22:20:08.424800 | Norris |
elmlang | general | `innerHtml` is specifically forbidden in source:
VirtualDom.elm - <https://github.com/elm/virtual-dom/blob/5a5bcf48720bc7d53461b3cd42a9f19f119c5503/src/VirtualDom.elm#L167>
kernel code - <https://github.com/elm/virtual-dom/blob/5a5bcf48720bc7d53461b3cd42a9f19f119c5503/src/Elm/Kernel/VirtualDom.js#L289> | 2019-01-01T22:26:59.425600 | Howard |
elmlang | general | Yeah just noticed that by looking at my compiled `.js` file | 2019-01-01T22:28:05.426000 | Norris |
elmlang | general | I really don't appreciate these unannounced breaking changes | 2019-01-01T22:28:20.426400 | Norris |
elmlang | general | So how is one supposed to insert characters like `&nbsp;` into their HTML now? | 2019-01-01T22:29:28.427300 | Norris |
elmlang | general | Or any special chars for that matter | 2019-01-01T22:29:37.427500 | Norris |
elmlang | general | Type the actual character | 2019-01-01T22:32:14.428700 | Earlean |
elmlang | general | you can use Elm unicode escapes, for example `"\u{00A0}"` for non-breaking space (but granted this isn't as simple as using html escapes) | 2019-01-01T22:32:21.429000 | Howard |
elmlang | general | So just use `text`? | 2019-01-01T22:32:26.429200 | Norris |
elmlang | general | Yep | 2019-01-01T22:32:45.429500 | Earlean |
elmlang | general | so `text "&nbsp;"` will display as a space? | 2019-01-01T22:33:16.430400 | Norris |
elmlang | general | Nope | 2019-01-01T22:33:34.430700 | Earlean |
elmlang | general | Figured it wouldn't | 2019-01-01T22:33:47.431300 | Norris |
elmlang | general | We display user values that are stored as HTML codes in our database | 2019-01-01T22:34:12.432500 | Norris |
elmlang | general | `text "\u{00A0}"` will | 2019-01-01T22:34:29.432900 | Earlean |
elmlang | general | silly characters like :spades: | 2019-01-01T22:34:44.433600 | Norris |
elmlang | general | `♠` | 2019-01-01T22:34:52.434000 | Norris |
elmlang | general | You'll need to do the html entity decoding yourself | 2019-01-01T22:35:10.434700 | Earlean |
elmlang | general | <https://package.elm-lang.org/packages/marcosh/elm-html-to-unicode/latest/> is a package that does this | 2019-01-01T22:36:42.435500 | Earlean |
elmlang | general | So in my database I have a `&#8902` which looks like `⋆` when passed into `innerHTML` | 2019-01-01T22:48:46.436300 | Norris |
elmlang | general | if I `escape` that database value using that package, I get `&amp;#8902` | 2019-01-01T22:49:20.436700 | Norris |
elmlang | general | That doesn't quite seem to solve my problem | 2019-01-01T22:49:58.437000 | Norris |
elmlang | general | Problem is that in this case I have to turn `&#8902` into `\u{22C6}` | 2019-01-01T22:53:42.437800 | Norris |
elmlang | general | <https://www.toptal.com/designers/htmlarrows/math/star-operator/> | 2019-01-01T22:53:49.438000 | Norris |
elmlang | general | ah, looks like the issue is that the semicolon is missing | 2019-01-01T22:57:07.438500 | Norris |
elmlang | general | `unescape "&#8902;"` works, whereas just `&#8902` does not | 2019-01-01T22:57:25.439000 | Norris |
elmlang | general | does anyone use elm19 with emacs elm-mode? looks like it's rather written fro 18, but maybe there's a recipe to configure it for 19? | 2019-01-02T06:37:09.441000 | Earnestine |
elmlang | general | <@Earnestine> the elm IDE support is apparently a bit wonky. <https://github.com/jcollard/elm-mode/issues/152> | 2019-01-02T06:38:45.441500 | Niesha |
elmlang | general | ui | 2019-01-02T06:45:03.441700 | Earnestine |
elmlang | general | another one: does anybody know why this library (for elm 18) does not show up it's exposed modules/readme.md in here?:
<https://package.elm-lang.org/packages/thought2/elm-wikimedia-commons/1.1.0> | 2019-01-02T06:47:56.443100 | Earnestine |
elmlang | general | The <http://package.elm-lang.org|package.elm-lang.org> doesn't properly display newly published 0.18 packages. | 2019-01-02T07:08:40.443200 | Earlean |
elmlang | general | ui ui | 2019-01-02T07:52:29.443400 | Earnestine |
elmlang | general | any recommendations for an elm (18) documentation generator (html)? | 2019-01-02T08:26:55.444100 | Earnestine |
elmlang | general | For your own application? <https://github.com/ento/elm-doc> at versions < 1.0 works for Elm 0.18 | 2019-01-02T08:29:20.444800 | Jin |
elmlang | general | mhh, then we have have python as a build dependency... I'd prefer something that's in npm, I tried some of them, they are not really working... | 2019-01-02T09:10:22.445100 | Earnestine |
elmlang | general | This is off topic, but can anyone recommend a JS linter thats not as opinionated as standard? I want whitespace and syntax checking, but I care more about consistency when it comes to `function()` and semi colons etc. | 2019-01-02T09:21:24.446300 | Agustin |
elmlang | general | (We have serverside JS code and Ruby/Elixir code, haven’t yet convinced client to switch to Elm :() | 2019-01-02T09:22:13.447000 | Agustin |
elmlang | general | Prettier is pretty good for formatting | 2019-01-02T09:30:03.447900 | Kris |
elmlang | general | I find `eslint` satisfactory, but you’ll have to tweak the settings I reckon | 2019-01-02T09:36:31.448700 | Meridith |
elmlang | general | I'm late to the party but south american countries like Brazil (where i'm from) also have very low % of english speakers, and a high number of software developers. I jumped in the forum :slightly_smiling_face: | 2019-01-02T09:51:52.449100 | Sherri |
elmlang | general | <@Leoma> sorry i just saw this, that would be doable with this package. I could probably create some functions that exposes all that functionality | 2019-01-02T15:52:25.452500 | Michelle |
elmlang | general | Hi, is there any good stream library for 0.19? | 2019-01-02T16:04:50.453400 | Saul |
elmlang | general | stream of what? | 2019-01-02T16:12:09.453600 | Virgie |
elmlang | general | an updated version of this: <https://package.elm-lang.org/packages/naddeoa/stream/latest> | 2019-01-02T16:14:20.454500 | Saul |
elmlang | general | maybe <https://package.elm-lang.org/packages/the-sett/lazy-list/latest/Seq> | 2019-01-02T16:16:55.454700 | Virgie |
elmlang | general | nice thanks | 2019-01-02T16:37:01.454900 | Saul |
elmlang | general | I am looking at the documentation for Random (<https://package.elm-lang.org/packages/elm/random/latest/Random>); and see that the signature for `generate` is `generate : (a -> msg) -> Generator a -> Cmd msg`; is there a name for the (a -> msg) part? Asking because I want to pass my random function a `(a -> msg)` | 2019-01-02T17:20:48.456300 | Su |
elmlang | general | it is often a (partially applied) constructor of your `Msg` type | 2019-01-02T17:22:59.456700 | Virgie |
elmlang | general | so if `Msg = Thing1 Int Int | Thing2 String` then `Thing1 42` and `Thing2` are both values of type `something -> Msg` | 2019-01-02T17:23:49.457600 | Virgie |
elmlang | general | and `Thing1` and `Thing2` are the constructors of `Msg` | 2019-01-02T17:24:00.457900 | Virgie |
elmlang | general | Ah, ok, thanks! Constructor makes sense. This makes the signature of the function I am working on look like:
```
generatePassword : (String -> Msg) -> Cmd Msg
generatePassword msgConstructor =
``` | 2019-01-02T17:25:35.459100 | Su |
elmlang | general | Hello all! Any suggestion on naming messages? (I'm mostly having issues naming msgs for HTTP command) | 2019-01-02T17:27:30.460000 | Earleen |
elmlang | general | in that context I think I would go for `toMsg`, but your name would be unremarkable (which is good!) | 2019-01-02T17:28:06.460700 | Virgie |
elmlang | general | <@Earleen> generally, go for "thing has happened" rather than "make thing happen" | 2019-01-02T17:29:32.461300 | Virgie |
elmlang | general | for instance <https://github.com/rtfeldman/elm-spa-example/blob/master/src/Main.elm#L110> | 2019-01-02T17:29:52.461600 | Virgie |
elmlang | general | <@Su> note that you don’t need to make that Msg concrete, you can keep it a type variable to get a more generic function | 2019-01-02T17:35:30.463000 | Kris |