workspace stringclasses 4
values | channel stringclasses 4
values | text stringlengths 1 3.93k | ts stringlengths 26 26 | user stringlengths 2 11 |
|---|---|---|---|---|
elmlang | general | <https://github.com/elm/compiler/pull/1850> | 2019-05-09T11:37:56.263600 | Garnett |
elmlang | general | it also happends without the --debug flag, same as <https://github.com/elm/compiler/issues/1916> | 2019-05-09T11:46:40.263800 | Lilli |
elmlang | general | That one can be worked around - ```type Value r
= Value
type alias BugVal r =
Value { r | field : () }
type alias Bug r =
BugVal r -> ()
bug : Bug {}
bug Value =
()``` | 2019-05-09T11:50:46.264100 | Huong |
elmlang | general | (and does not have the same rootcause) | 2019-05-09T11:51:02.264300 | Huong |
elmlang | general | Can someone help me find the `Color` module? I'm upgrading to 0.19.0 and it has inexplicably disappeared and I'm having difficulty finding what happened to it. | 2019-05-09T12:29:57.265600 | Lu |
elmlang | general | <@Lu> it got dropped - <https://package.elm-lang.org/packages/avh4/elm-color/latest/> is the recommended replacement I've heard | 2019-05-09T12:33:33.266800 | Nana |
elmlang | general | for some reason it didn't deserve an official package I guess :man-shrugging: | 2019-05-09T12:35:24.268700 | Nana |
elmlang | general | thanks <@Nana>. Why is this just not mentioned in the upgrade-doc (<https://github.com/elm/compiler/blob/master/upgrade-docs/0.19.md>)? Also, why does the elm/core `changelog.md` stop after 0.15? I'm feeling a bit anxious about going thru the upgrade process | 2019-05-09T12:35:42.268800 | Lu |
elmlang | general | Hey all, I had an interesting problem to solve, thought I'd discuss solutions here since it was a fun one to wrap my hands around. Reauthorizing and retrying HTTP requests after a `401` error. But here's what made it interesting: lots and lots of requests in flight, but the `refresh_token` can only be used once. So ... | 2019-05-09T15:02:03.273900 | Kymberly |
elmlang | general | I was already using `Task`s to control the flow of Http requests (many of the requests resulted in a chain of requests; fetching a "folder" also sent requests for each "file" in the folder, and recursive requests for each subfolder) | 2019-05-09T15:03:14.275100 | Kymberly |
elmlang | general | what I ended up with was:
```
type RetryTask a
= Retry (Task.Task Http.Error (RetryTask a))
| Success a
reAuth : Task.Task Http.Error a -> Task.Task Http.Error (RetryTask a)
``` | 2019-05-09T15:03:35.275400 | Kymberly |
elmlang | general | what I _really_ wanted was a way to have the Task queuing independent of the `update` function, but I'm pretty sure that's impossible. Once a request fails (and sends `Retry task`) that needs to be turned into a message, and the `update` code passes these tasks into a request queue, depending on the `model.authStatus`... | 2019-05-09T15:05:29.277500 | Kymberly |
elmlang | general | anyway, if someone else has tackled this another way, I'd love to hear about it. | 2019-05-09T15:05:48.277900 | Kymberly |
elmlang | general | rather than storing the tasks, how about a data structure that describes the tasks, then you can put those in a queue, something like
```
type ApiCall =
FetchFolder String
| FetchFile String
type ErrorWithRetry = ErrorWithRetry Http.Error ApiCall
```
then your error type on the task would include how to recrea... | 2019-05-09T16:20:08.281300 | Alicia |
elmlang | general | hey folks, just a simple question: can you react to stack overflows (too much recursion) in elm? in chome there's a surprisingly low stack size (firefox works fine) | 2019-05-09T16:57:29.282300 | Amiee |
elmlang | general | <@Amiee> it depends, elm supports tail recursion so you may be able to make it into a tail recursive call, what is the code doing? | 2019-05-09T16:59:37.283200 | Alicia |
elmlang | general | also known as tail call optimization | 2019-05-09T17:00:14.283600 | Alicia |
elmlang | general | If I need to use Type as key in a Dict, is `AllDict` still way to go? | 2019-05-09T17:13:37.289700 | Nedra |
elmlang | general | I've just stumbled across chadtech/elm-relational-database - do you know if it can cope with associative entities (that only contain keys, to resolve many-to-many relationships) or joined pairs of one-many relationships of even one-many relationships? I can't see how this fits into the Id, Item pairing - these relation... | 2019-05-09T17:14:03.289900 | Guadalupe |
elmlang | general | <@Nedra> we've been thinking along the same lines - I've been using that package but just come across elm-relationsional-databases - I think it is a dict with an Id Type defined - so not a type you define but one exposed by the package | 2019-05-09T17:19:06.292400 | Guadalupe |
elmlang | general | I was avoiding this problem for a while now (most of the app is public, just the “administration” needs authorisation) but I will have to think about it soon.. anyway, my basic idea was to offload this whole code to js using ports and keep the whole networking stuff there.. you wouldn’t have to pass the requests collec... | 2019-05-09T17:21:22.292500 | Allison |
elmlang | general | Yeah, something along, but I don't really need a relational DB. Just a Dict with Type as key :smile: | 2019-05-09T17:24:54.293700 | Nedra |
elmlang | general | I liked this package: pzp1997/assoc-list/ there's an implementation of sets based on it as well. There's also any-dict, but I haven't tried it. | 2019-05-09T17:33:26.295900 | Guadalupe |
elmlang | general | will check, thanks! | 2019-05-09T17:39:05.296200 | Nedra |
elmlang | general | <@Alicia> Thanks for that hint, I haven't thought of that yet, I will try that | 2019-05-09T18:26:08.297200 | Amiee |
elmlang | general | <@Guadalupe> for many-to-many relationships you could use a list of Ids | 2019-05-09T20:30:56.299100 | Nana |
elmlang | general | RE relational DB in elm… I put together a simple Set implementation that is backed by a List and uses `==` for membership checks.
<https://github.com/z5h/elm-oottp/blob/master/src/ListBackedSet.elm>
There is a `product : Set x -> Set y -> Set ( x, y )` which is essentially a join. With that and mapping and filte... | 2019-05-09T22:15:21.301300 | Leoma |
elmlang | general | We just released in production our first large Elm application!
<https://login.account.rakuten.com/sso/register?client_id=rakuten_tw01&redirect_uri=https%3A%2F%2Fwww.rakuten.com.tw%2Fmember%2Fdelegate#/registration/1>
It is an Authentication/Registration system.
```
~ 20,000 lines of Elm/elm-ui
~ 300 lines of ... | 2019-05-10T01:29:59.302200 | Raeann |
elmlang | general | I want to prevent the user from using browser back button after logout. Currently I clear the model when logout is clicked but It would be nicer if back-button does not work after logout. Any suggestions? | 2019-05-10T03:48:21.304500 | Arie |
elmlang | general | please, *please* never interfere with a navigation methods of the user agent. losing access to the back button results in a sudden break in usage patterns.
since you know about the session state of a user, why not just show a "you are no longer logged in" message when a restricted route is accessed? | 2019-05-10T06:14:56.305500 | Emilee |
elmlang | general | I agree. The api calls to backend obviously do not work, but the empty gui can be viewed by pressing back. I need to check if there is an access-token, and only display pages then. | 2019-05-10T07:12:57.305900 | Arie |
elmlang | general | I'm having an issue with ```Task.attempt (HandleFocusResult id) (Dom.focus id)``` in IE, has anyone dealt with this? It doesn't fail, but <input id=id> doesn't receive the focus. In the docs it mentions how to handle silent fails of Dom.focus, but wanted to ask here in case I'm missing something. | 2019-05-10T08:06:47.309000 | Lauren |
elmlang | general | I’ve just installed `excoveralls`, but when I run it I get:
```
➜ alchemy git:(admin_panel) ✗ mix coveralls <<<
** (exit) an exception was raised:
** (MatchError) no match of right hand side value: :error
cover.... | 2019-05-10T08:30:23.309600 | Fred |
elmlang | general | I get that Elm and Elixir frequently come together, but I think this is more of a question for the Elixir community | 2019-05-10T08:32:30.309700 | Lashawna |
elmlang | general | Whoops | 2019-05-10T08:33:18.309900 | Fred |
elmlang | general | All channels called “general” look the same in the Slack app :slightly_smiling_face: | 2019-05-10T08:33:43.310100 | Fred |
elmlang | general | Great! | 2019-05-10T08:49:01.310800 | Maxwell |
elmlang | general | Hello. To get the response headers of an http request, I understand I must use an “elaborate expectation”, like expectStringResponse (<https://package.elm-lang.org/packages/elm/http/latest/Http#expectStringResponse>), instead of expectString. Am I correct? | 2019-05-10T09:15:17.312700 | Allyn |
elmlang | general | you're right, you need to use expectStringResponse.. in fact I did a small write up on extracting headers! <https://medium.com/@girishso/extracting-http-headers-in-elm-7034d5bfecb2> | 2019-05-10T09:17:53.313900 | Renay |
elmlang | general | It will be useful! Thanks <@Renay> :slightly_smiling_face: | 2019-05-10T09:19:06.314400 | Allyn |
elmlang | general | Blasphemy! :wink: I already had an `Helper` model that is passed to all my Elm apps/child-apps, and this queue code fit right in there. I also have translation helpers, date generators (during testing these use a constant value instead of requesting `Time.now`), and network client credentials. Anyway it was a suitab... | 2019-05-10T10:02:26.315300 | Kymberly |
elmlang | general | I did have to pass my network requests in an extra `|> Network.queue <http://model.helpers.net|model.helpers.net>`, that's almost it on the model side. The `Retry`'s are handled by the top-most app. | 2019-05-10T10:03:20.315600 | Kymberly |
elmlang | general | Yes, this actually comes up too, in a way. To queue the tasks, we need to store both the task _and_ the `Msg` that receives the successful result. Storing `ApiCall` instead of a Task is conceptually very similar, but doesn't scale to handling requests on other APIs (this project is a marketing dashboard, we are inter... | 2019-05-10T10:06:40.315800 | Kymberly |
elmlang | general | Your code is based on elm 01.8, isn’t it? | 2019-05-10T10:18:11.316000 | Allyn |
elmlang | general | How do you reinstall the packages in 0.19. Out of habbit I did `rm -rf elm-stuff` and then `elm install` but it doesn't work like that anymore. | 2019-05-10T11:01:06.317800 | Evonne |
elmlang | general | I also removed the `.elm` directory | 2019-05-10T11:01:35.318200 | Evonne |
elmlang | general | Install them one-by-one as they’re listed in your `elm.json`. And do not remove `.elm` directory in the future… | 2019-05-10T11:04:02.319200 | Lynne |
elmlang | general | if the `elm.json` file is still there, you can just run `elm make` | 2019-05-10T11:04:28.319700 | Huong |
elmlang | general | There’s no need to `elm install` if `elm.json` is correct | 2019-05-10T11:05:20.320900 | Huong |
elmlang | general | I get invalid import as an error message | 2019-05-10T11:09:52.321200 | Evonne |
elmlang | general | Then something else is likely amiss. What’s the error, and what’s in your `elm.json`? | 2019-05-10T11:16:42.321900 | Huong |
elmlang | general | `I cannot find a Http import. These names seem close though:` | 2019-05-10T11:18:39.322100 | Evonne |
elmlang | general | This is in elm.json ` "elm/http": "2.0.0",` | 2019-05-10T11:19:36.322900 | Evonne |
elmlang | general | (moving to thread so it doesn’t get lost) | 2019-05-10T12:12:14.326200 | Huong |
elmlang | general | Is it in your direct dependencies? | 2019-05-10T12:12:15.326400 | Huong |
elmlang | general | Are you running `elm make` in the same folder as your elm.json lives? | 2019-05-10T12:12:19.326600 | Huong |
elmlang | general | <@Nana> Yea, thanks for that confirmation - I'm doing that in an app with simple needs - but what about a one-many that needs compound keys? I think that for 'proper' relational algebra <@Leoma> 5h is pointing the way | 2019-05-10T12:12:59.327200 | Guadalupe |
elmlang | general | I do have an updated version of that “relational” ListSet. With diff, intersect, and such.
<https://gist.github.com/z5h/d55fb702ad1dc91107fe74835f1dbc6c> | 2019-05-10T12:30:11.327400 | Leoma |
elmlang | general | I think you could also just do something like this?
```
listA |> List.map (\a -> listB |> List.filter (\b -> b.foo == a.foo && b.bar == a.bar)
``` | 2019-05-10T12:39:02.328000 | Nana |
elmlang | general | Im using sets as intended by the relational algebra, and a nice bonus is that the cartesian product of these sets must naturally be a set as well (no deduping needed). So that gives us some nice guarantees we can use to optimize our sets built on `==` semantics. | 2019-05-10T13:00:30.328700 | Leoma |
elmlang | general | What do y'all use for documentation searching in elm? `<http://package.elm-lang.org|package.elm-lang.org>` is okay for searching inside a package, but not for searching across all packages. The dash docs (even tho updated recently) seem to be missing some files. Is there something like `<http://devdocs.io|devdocs.io>`? | 2019-05-10T13:04:08.331300 | Sofia |
elmlang | general | <@Sofia> with intellij-elm you can just hover over any function to see the docs for it, and also in the auto-complete list | 2019-05-10T13:10:28.332600 | Nana |
elmlang | general | I am using Browser.Events.onKeyPress but things are not working as expected.
So I wanted to see exactly what was being passed.
The code I have used for the decoder passed to onKeypress is ...
Json.Decode.value
|> Json.Decode.map (Json.Encode.encode 0)
|> json.Decode.map SetLastKeyPressInfo
While this compil... | 2019-05-10T13:10:54.332800 | Vallie |
elmlang | general | the thing that gives me pause with storing the tasks is that it is storing a function on the model, it’ll break the import/export from the debugger and it is possible to get runtime exceptions if someone ever tries to compare the tasks for equality with `==`. Could another way be doing exponential backoff on retries? ... | 2019-05-10T13:13:07.333000 | Alicia |
elmlang | general | `mfarmiloe`: looks like you aren't decoding the `"key" field` | 2019-05-10T13:21:35.333700 | Sofia |
elmlang | general | <https://github.com/elm/browser/blob/1.0.0/notes/keyboard.md> | 2019-05-10T13:21:35.333900 | Sofia |
elmlang | general | But i want to see what other fields are being passed, such as shiftKey and altKey. | 2019-05-10T13:27:17.334100 | Vallie |
elmlang | general | <@Vallie> I tried doing something similar to you and when I press a key (Chrome on MacOS) I get:
```
{ "isTrusted": true }
``` | 2019-05-10T13:53:11.335100 | Carman |
elmlang | general | <https://ellie-app.com/5vR4q3TQ8JYa1> | 2019-05-10T13:53:18.335300 | Carman |
elmlang | general | However, if I manually decode values out of the event I can get output like:
```
{ alt = False, key = "a", shift = False }
``` | 2019-05-10T13:54:04.336100 | Carman |
elmlang | general | <https://ellie-app.com/5vR4n2RVZMJa1> | 2019-05-10T13:54:11.336300 | Carman |
elmlang | general | Stringifying generic DOM events is tricky because they contain cycles (e.g. `event.target.parent.children`). Also many of the fields are special types that kind of act like normal JS values but aren't (e.g. `NodeList`). | 2019-05-10T13:57:53.338600 | Carman |
elmlang | general | For these reasons, calling `Encode.encode` on an event object can potentially be dangerous. I remember seeing something about `Encode.encode` stripping fields from DOM events but don't remember the details. | 2019-05-10T13:59:50.340200 | Carman |
elmlang | general | I think that might be what's happening here | 2019-05-10T14:00:12.340700 | Carman |
elmlang | general | <https://klaftertief.github.io/elm-search/> | 2019-05-10T14:13:52.340800 | Rico |
elmlang | general | Dang, wish it worked for package names as well. `Pipeline` returns nothing, for example :confused: | 2019-05-10T14:50:05.341100 | Sofia |
elmlang | general | <@Jin> is working on improvements though :slightly_smiling_face: (mentioning him so he sees your feature request) | 2019-05-10T15:20:15.341300 | Timika |
elmlang | general | Oho, fantastic! | 2019-05-10T15:27:45.341500 | Sofia |
elmlang | general | What is the easiest way of converting a `Type` to comparable type?
I imagine there could be a function that would convert Type to some hashed value, so I could use it in key for Dict :thinking_face: | 2019-05-10T15:54:32.343200 | Nedra |
elmlang | general | In 0.18 there used to be `toString`, but that got forced out, so you gotta write one manually. | 2019-05-10T15:57:17.344000 | Niesha |
elmlang | general | one way for 0.19 is using the pattern that <https://package.elm-lang.org/packages/turboMaCk/any-dict/latest/> does | 2019-05-10T15:58:22.344300 | Alicia |
elmlang | general | or <https://package.elm-lang.org/packages/pzp1997/assoc-list/latest/> | 2019-05-10T15:59:02.344500 | Alicia |
elmlang | general | :bow: | 2019-05-10T15:59:42.344700 | Nedra |
elmlang | general | assoc-list is a list behind the scenes? and update maps through elements? Waat :smile: | 2019-05-10T16:03:03.345200 | Nedra |
elmlang | general | And it seems that any-dict still requires to figure out how to convert `Type` to some comparable :confused: Like I have to implement my own function, and I really don't want to write a long switch case for like 10+values :smile: | 2019-05-10T16:28:21.345900 | Nedra |
elmlang | general | I just shared this elsewhere <https://gist.github.com/z5h/d55fb702ad1dc91107fe74835f1dbc6c>
It’s a set based on `==` semantics. Optimizing where possible. (e.g. partitioning doesn’t require deduping) | 2019-05-10T16:43:12.347000 | Leoma |
elmlang | general | Just throw whatever you like in there, and don’t worry about it. | 2019-05-10T16:43:32.347400 | Leoma |
elmlang | general | Sorry, I see above you’ve looked at an assoc list. What’s the issue with that? | 2019-05-10T16:45:34.348000 | Leoma |
elmlang | general | I guess I can use it, I just find it not a good solution under the hood. Just wanted to find out if there is any better approach available | 2019-05-10T16:49:05.348100 | Nedra |
elmlang | general | Are you concerned about performance with an assoc list? I’m using them in an animation framework and they’re more than fast enough until they have 100s-1000s of elements in them.
Up to a point they are faster than dicts. | 2019-05-10T16:51:46.348300 | Leoma |
elmlang | general | It would be nice if everything was comparable, but alas, we don’t have that. (yet?) | 2019-05-10T16:52:33.348500 | Leoma |
elmlang | general | yeah, I guess you are right I could just go with assoc list | 2019-05-10T16:55:06.348700 | Nedra |
elmlang | general | But still, as I saw somewhere in github in one of the issues <@Marcellus> made about this topic, it didn't seem like there is a plan to do this. | 2019-05-10T16:55:57.348900 | Nedra |
elmlang | general | Thx ilias. Yes for both. | 2019-05-10T17:24:26.349100 | Evonne |
elmlang | general | <@Carman> Thanks for the background on the DOM events. i just wanted to know why what I was trying wasn't working. Is there a way to capture in Elm the details of the DOM events by using something other than encode? Or should I be reading the Javascript documentation :grinning:? | 2019-05-10T18:36:37.352700 | Vallie |
elmlang | general | ```case n of
(-1) ->
```
why does Elm 0.19.0 no longer like this? | 2019-05-10T18:45:49.352900 | Lu |
elmlang | general | I have run into too many undocumented breaking changes during my upgrade to 0.19.0 :white_frowning_face: | 2019-05-10T18:47:47.353700 | Lu |
elmlang | general | It doesn’t handle cases of negative numbers. I’m unclear if that is by intent or a bug. | 2019-05-10T19:59:37.354700 | Dede |
elmlang | general | Interesting! Can you share the entire elm.json? | 2019-05-10T20:31:34.354900 | Huong |
elmlang | general | Is anyone generating automated fuzz tests for json decoders from json schema? | 2019-05-10T23:25:59.356300 | Cammy |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.