workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | There is a way to use bookmarks capability through extensions. | 2019-04-22T05:19:12.149600 | Lory |
elmlang | general | I haven't tried that yet, but I think it's a good way to navigate. | 2019-04-22T05:19:31.149800 | Lory |
elmlang | general | I imagine other editors also have bookmarks plugins. | 2019-04-22T05:21:17.150000 | Lory |
elmlang | general | No, it should be <https://package.elm-lang.org/packages/elm-explorations/test/latest/Expect#within> | 2019-04-22T05:21:32.150200 | Ayesha |
elmlang | general | OK, so what’s the problem? | 2019-04-22T05:22:55.150400 | Hoa |
elmlang | general | Right, the problem with floats is that most of the time you can’t compare them because of the precision errors | 2019-04-22T05:23:55.150600 | Dorotha |
elmlang | general | If you’re absolutely sure, you can trick the tests by wrapping a float with `Ok`, and thus making it into `Result Float`. It is a hack :slightly_smiling_face: | 2019-04-22T05:24:51.150800 | Dorotha |
elmlang | general | Wait, <@Ayesha> is using `elm-verify-examples` | 2019-04-22T05:25:30.151200 | Lynne |
elmlang | general | One can't really choose how comparison is done there as far as I know | 2019-04-22T05:25:43.151400 | Lynne |
elmlang | general | Yeah, that’s why | 2019-04-22T05:25:53.151600 | Dorotha |
elmlang | general | So correct answer would be to avoid using `elm-verify-examples` for functions returning floats unless there is some support for this case in that library | 2019-04-22T05:26:28.151800 | Lynne |
elmlang | general | Or if you’re absolutely sure that precision wouldn’t be a problem, wrapping with `Ok` would allow to workaround the `Float` check <https://github.com/BrianHicks/elm-trend/blob/master/src/Trend/Linear.elm#L90> | 2019-04-22T05:30:25.152100 | Dorotha |
elmlang | general | Other things to consider: multiplying the value by e.g. 10000 and rounding to an integer, although that would complicate the tests. | 2019-04-22T05:34:36.152400 | Dorotha |
elmlang | general | Or using `String.fromFloat` and then comparing with a string | 2019-04-22T05:35:03.152600 | Dorotha |
elmlang | general | Thank you all :slightly_smiling_face: <@Dorotha> I have used `Ok` and it works. | 2019-04-22T05:55:27.152800 | Ayesha |
elmlang | general | I'm just really stoked people are using `elm-verify-examples`. Go <@Ayesha>! :tada: :tada: | 2019-04-22T06:08:12.153100 | Huong |
elmlang | general | Thanks <@Huong> | 2019-04-22T06:34:14.153400 | Ayesha |
elmlang | general | Better way? Would you elaborate? | 2019-04-22T10:10:57.154000 | Buffy |
elmlang | general | Hello All | 2019-04-22T11:31:55.154800 | Art |
elmlang | general | Hi everybody. Is someone running server side rendered elm in production? | 2019-04-22T11:40:57.155600 | Nestor |
elmlang | general | So, I'm running a site on aws. When I'm using firefox, occasionally I get an 'Err Http.NetworkError' back from a <http://Http.post|Http.post> cmd. I can't reproduce it locally, and chrome doesn't appear to have this issue. Does this ring any bells for you all? | 2019-04-22T11:51:46.157900 | Lindsey |
elmlang | general | When I look at the network debugger in FF, my requests have 200 responses, except for the bad ones which have no responses at all. There aren't any response headers. | 2019-04-22T11:53:18.158000 | Lindsey |
elmlang | general | May it time out? | 2019-04-22T11:54:07.158200 | Lynne |
elmlang | general | doesn't seem so. The error response is immediate. | 2019-04-22T11:55:15.158500 | Lindsey |
elmlang | general | Then FF is dropping connection for some reason. Weird. | 2019-04-22T11:55:54.159300 | Lynne |
elmlang | general | There's a debugger tab called Timings. under that everything reads 0ms: ```Blocked:
0 ms
DNS resolution:
0 ms
Connecting:
0 ms
TLS setup:
0 ms
Sending:
0 ms
Waiting:
0 ms
Receiving:
0 ms``` | 2019-04-22T11:56:08.159800 | Lindsey |
elmlang | general | I would google for FF connection drop or something like this if I were you | 2019-04-22T11:56:48.160600 | Lynne |
elmlang | general | Does not seem being an Elm issue | 2019-04-22T11:56:52.160900 | Lynne |
elmlang | general | So I'm currently learning React at my bootcamp, but I chose to opt out since I already know it fairly well and instead focus on learning / building things with Elm for my projects. Would anyone be interested in helping me build a calculator app for today's assignment - in Elm? | 2019-04-22T11:57:15.161400 | Audry |
elmlang | general | I guess I'll have to code up some kind of retry logic... | 2019-04-22T11:59:19.161600 | Lindsey |
elmlang | general | It would not hurt anyway | 2019-04-22T11:59:41.161800 | Lynne |
elmlang | general | Bootcamp: “A military training camp for new recruits, with very harsh discipline.” Sounds tough :slightly_smiling_face: | 2019-04-22T12:08:33.162300 | Hoa |
elmlang | general | Is this an option for your class, to opt out or do it in another language? | 2019-04-22T12:35:08.163300 | Sabra |
elmlang | general | Also:
> a short, intensive, and rigorous course of training
:slightly_smiling_face: | 2019-04-22T12:36:05.163500 | Hoyt |
elmlang | general | Better :slightly_smiling_face: | 2019-04-22T12:49:06.163800 | Hoa |
elmlang | general | yeah, we have what are called "stretch goals". I intend on extending the application using Elm | 2019-04-22T12:54:42.164000 | Audry |
elmlang | general | But I'm also going to rebuild it from scratch in Elm (it's not a huge assignment) | 2019-04-22T12:54:59.164200 | Audry |
elmlang | general | Svelte 3 was just released and I really enjoyed the video linked in the blog that shows how it works:
<http://svelte.dev/blog/svelte-3-rethinking-reactivity>
I noticed a lot of conceptual similarities with elm (compiler assisting, dead code elimination, batteries included etc)
I was wondering on a theoretical level, could Elm take a similar approach and ditch the Virtual Dom? Or is Elms Vdom already taking a similar approach?
I am not familiar with the inner workings of compilers and/or vdom, just curious if there are fundamental concepts blocking elm to do something similar. | 2019-04-22T13:51:20.172000 | Jillian |
elmlang | general | I believe there was an elm talk about building a calculator in elm. | 2019-04-22T15:05:43.172700 | Delois |
elmlang | general | Hi, folks. When you are decoding something and have a number of validations you want to put on it, do you just pipe to a few `Decode.andThen` like I have here?
```
emailDecoder : Decoder String
emailDecoder =
let
nonEmpty email =
if String.length email > 0 then
Decode.string
else
Decode.fail "must not be empty"
containsAtSymbol email =
if String.contains "@" email then
Decode.string
else
Decode.fail "must have an @ symbol"
in
Decode.string
|> Decode.andThen nonEmpty
|> Decode.andThen containsAtSymbol
```
I hesitate to have a single one with all the checks in it. | 2019-04-22T16:04:50.173800 | Hoyt |
elmlang | general | I like the idea of having distinct validations | 2019-04-22T16:06:28.174000 | Hoyt |
elmlang | general | Although I can think of a couple ways to have a set of them that I run through, that might return `Result String (Decoder String)` and then find the first one that doesn’t return an `Ok decoder` | 2019-04-22T16:07:32.174200 | Hoyt |
elmlang | general | I tend to mostly use decoders for API data, which I trust to be semantically correct, so I basically haven't run into this case :thinking_face: | 2019-04-22T16:29:55.174400 | Huong |
elmlang | general | I'd personally go for `Decode.succeed email` rather than repeating `Decode.string` - it feels like that spreads the knowledge of the underlying JSON structure over more auxiliary functions than strictly necessary | 2019-04-22T16:31:11.174900 | Huong |
elmlang | general | Hey peeps. I coded up an `onKeyDown` handler that seems to work decent in my Elm app. But event propagation is confusing me a little bit. I put an `onKeyDown` handler onto the `body` div, thinking that this could act as a global `keydown` handler. But it only seems to work when I’ve selected an `input` text box within the app, and not any other elements. I figured that no matter what other elements I’ve selected within the app, as long as they don’t have any `stopPropagationOn` handlers attached to them, they’d propagate the `keydown` event up to that `body` div. But this doesn’t seem to be the case. Lmk if any of you know what I’m missing, thanks | 2019-04-22T16:37:34.178800 | Vonda |
elmlang | general | Also not sure if this belongs in <#C0CJ3SBBM|general> or <#C192T0Q1E|beginners>. Not sure how noob I count as being :stuck_out_tongue: | 2019-04-22T16:38:18.179500 | Vonda |
elmlang | general | You can attach handlers to the window using <https://package.elm-lang.org/packages/elm/browser/latest/Browser-Events#onKeyDown> | 2019-04-22T16:53:14.180100 | Huong |
elmlang | general | Ah, switching to `Decode.succeed email` is a good idea. | 2019-04-22T17:00:52.181200 | Hoyt |
elmlang | general | I’m doing this on decoding the flags that are coming in on initialization. We’re experimenting with the idea of supporting a nice elm-based error screen if any error happens on initialization. | 2019-04-22T17:01:31.182000 | Hoyt |
elmlang | general | Yeah I’m already using that. And it does work. But I’m wondering why attaching my own `onKeyDown` handler to the `body` div doesn’t also work, especially since it would work much better for doing keyboard shortcuts that wouldn’t work within `stopPropagationOn` elements. (The global one you linked wouldn’t be affected by `stopPropagationOn`) | 2019-04-22T17:02:26.183000 | Vonda |
elmlang | general | Oh… nvm. The global one is indeed affected by `stopPropagationOn`. So yeah this would work as a solution. But I’m still very curious so lmk if anyone knows why the `body` one doesn’t work as an alternative. | 2019-04-22T17:03:55.183800 | Vonda |
elmlang | general | FYI for anyone interested, turns out you need to set the `tabindex` property on `div` elements in order for `keydown` handlers to work properly. Still not sure why, but this fixed my issue.
<https://stackoverflow.com/questions/43503964/onkeydown-event-not-working-on-divs-in-react> | 2019-04-22T17:24:31.184700 | Vonda |
elmlang | general | Does anyone know an Elm library or function to convert a random string to a valid class name? | 2019-04-22T17:47:31.185400 | Erlene |
elmlang | general | Maybe this can help?
<https://package.elm-lang.org/packages/hecrj/elm-slug/latest/> | 2019-04-22T18:01:01.185700 | Nestor |
elmlang | general | "We've also changed our tagline, from 'The magical disappearing UI framework' to 'Cybernetically enhanced web apps'. " sounds like a very bad marketing decision. | 2019-04-22T19:58:47.186700 | Earlean |
elmlang | general | doing what SVELTE does requires a restricted DSL that is restricted enough that you can do it statically at compile time. So the 'view' part of your app needs to be written in a more restricted language that the rest of your app. | 2019-04-22T20:04:46.186900 | Earlean |
elmlang | general | A cheap way to do it could be to start with a prefix like `gc` so that you won't have to worry about strings starting with a dash or underscore, and then regex replace any character that isn't `[A-z0-9]` with an underscore or empty string and append it to the prefix. If uniqueness is a problem you could use the prefix plus a counter for each time to create a claasname, so you get `gc1` `gc2` etc | 2019-04-22T20:30:09.187100 | Augustus |
elmlang | general | The outcome is that you're trading composition for performance, which is almost always the case. ie. Manual memory management is faster than garbage collection but requires a larger amount of work, duplication and reduces code reuse and sharing. | 2019-04-22T21:05:32.187300 | Earlean |
elmlang | general | I’ve read the intro material. From what I understand they “imperatively” updates the DOM by compiling svelte code. Clever. I guess this is the same approach used by Imba which has great performance too. <http://imba.io> Here there’s a related discussion: <https://discourse.elm-lang.org/t/an-alternative-to-virtual-dom-20x-faster/2264> | 2019-04-23T03:26:50.188400 | Hoa |
elmlang | general | Google's 'incremental dom' is the same idea. But it requires that you can know the data dependency relationship between data and the view statically at compile time | 2019-04-23T03:32:38.188600 | Earlean |
elmlang | general | See their `{#each` syntax, because they can't call a function like `map` to do it and still keep track of data dependencies statically | 2019-04-23T03:33:56.188800 | Earlean |
elmlang | general | All flow control in the view needs to be compile time trackable, which means no arbitrary loops or recursion. They achieve this restriction by having a specific template syntax that can only describe that restricted flow control | 2019-04-23T03:39:21.189100 | Earlean |
elmlang | general | <https://www.zdnet.com/article/programming-languages-dont-bother-learning-these-ones-in-2019/> | 2019-04-23T04:15:48.189500 | Valda |
elmlang | general | I feel personally attacked by this list | 2019-04-23T04:15:57.189900 | Valda |
elmlang | general | Survivorship bias | 2019-04-23T04:20:50.191200 | Lynne |
elmlang | general | Someone posted the actual list on <#C0CJ671HU|misc> the other day, it was totally arbitrary | 2019-04-23T04:21:35.192400 | Danika |
elmlang | general | Given how many other popular and growing though still niche languages are on that list I would not pay a big mind to that article | 2019-04-23T04:21:49.192600 | Lynne |
elmlang | general | They mostly arbitrarily rank the languages in 3 categories “community engagement”, “job market”, and “growth and tools” and basically just take the average and call it a day | 2019-04-23T04:27:43.194300 | Danika |
elmlang | general | Dart apparently has the worst job market but the best growth :innocent: | 2019-04-23T04:27:59.194800 | Danika |
elmlang | general | keyEvents works only on elements that can have focus.. | 2019-04-23T05:48:02.195200 | Liza |
elmlang | general | better use global handler for that, | 2019-04-23T05:48:16.195400 | Liza |
elmlang | general | How can we insert CSS classes in the Html as Elm-ui does? | 2019-04-23T06:01:51.196700 | Loralee |
elmlang | general | create just style node with css content | 2019-04-23T06:13:41.197300 | Liza |
elmlang | general | Yep, there's nothing else, here's the source from elm-ui: <https://github.com/mdgriffith/elm-ui/blob/64c9670778a6b74c15f310e6a1136780620f04c7/src/Internal/Model.elm#L2314> | 2019-04-23T06:14:28.197900 | Dayna |
elmlang | general | just was searching for that line.. | 2019-04-23T06:15:53.198000 | Liza |
elmlang | general | it makes some degree of sense in that it's probably tough finding a job, there's not many job listings for Elm | 2019-04-23T06:43:47.200900 | Nana |
elmlang | general | but it's also pretty silly since there's an infinite list of languages that are less popular than Elm | 2019-04-23T06:44:44.201100 | Nana |
elmlang | general | and the "community engagement" ranking was a bit unfair because the Elm community uses Slack instead of StackOverflow | 2019-04-23T06:50:24.201400 | Nana |
elmlang | general | I'm trying to install `elm/http` v2 but elm always tries to install v1. I presume one of my dependencies is forcing v1, is there any way to find out which one? | 2019-04-23T07:01:29.202800 | Kimbery |
elmlang | general | Most likely it is `elm/core` or `elm/json` | 2019-04-23T07:02:10.203200 | Lynne |
elmlang | general | righto, tried `elm/json` already, I'll give `elm/core` a go | 2019-04-23T07:02:34.203600 | Kimbery |
elmlang | general | You can paste your elm.json here:
<https://www.markuslaire.com/github/elm-dependencies-analyzer/> | 2019-04-23T07:03:19.203900 | Earnest |
elmlang | general | OH | 2019-04-23T07:05:14.205000 | Huong |
elmlang | general | oh nice | 2019-04-23T07:05:19.205500 | Kimbery |
elmlang | general | can I use you for an experiment? | 2019-04-23T07:05:21.205600 | Huong |
elmlang | general | so hold on and don’t do anything for a minute :smile: | 2019-04-23T07:05:30.205800 | Huong |
elmlang | general | Ugh, that's a low-quality piece of journalism. | 2019-04-23T07:05:48.206400 | Corinne |
elmlang | general | that's very handy | 2019-04-23T07:05:49.206600 | Kimbery |
elmlang | general | need some-how remember that name.. | 2019-04-23T07:05:56.206800 | Liza |
elmlang | general | Bookmark it? | 2019-04-23T07:07:03.208100 | Lynne |
elmlang | general | I have a work-in-progress CLI tool for doing this type of thing. I haven’t officially released it, but if you feel like giving it a go: `npm i -g elm-json` and then `elm-json install elm/[email protected]` or `elm-json upgrade --unsafe` if you already have `elm/http` installed | 2019-04-23T07:07:21.208500 | Huong |
elmlang | general | that sounds great, I'll give it a go | 2019-04-23T07:08:41.208800 | Kimbery |
elmlang | general | <@Huong> that's awesome, I'm onboarding some javascript devs and this is definitely not Elm's finest moment so far :sweat_smile: your tool should keep them happy | 2019-04-23T07:10:21.210000 | Kimbery |
elmlang | general | would be nice if such tool would be part of `elm` it self, with `elm install` | 2019-04-23T07:15:19.210800 | Liza |
elmlang | general | I’m sure it eventually will be - this is just an intermediate solution, the same way `elm-test` is | 2019-04-23T07:15:53.211500 | Huong |
elmlang | general | rewrite `elm-test` to haskell :hug: or maybe extend `elm repl` to be able execute some elm from cli, like `node -e 'console.log("hello)'` | 2019-04-23T07:16:24.212300 | Liza |
elmlang | general | hmm, the results of `Browser.Events.onResize` and `Browser.Dom.getViewport` seem to be different. any idea how i can get the result of `Browser.Events.onResize` via task? | 2019-04-23T07:17:09.213400 | Emilee |
elmlang | general | maybe create just middleware model, that waits for that event ? | 2019-04-23T07:18:22.214000 | Liza |
elmlang | general | or pass it as flag ? | 2019-04-23T07:18:27.214200 | Liza |
elmlang | general | Is there any way to do file uploads with `elm/http` v1? | 2019-04-23T07:20:53.214800 | Kimbery |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.