workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | aaa ok thanks. pff cant think properly today :smile: | 2019-03-06T09:31:57.579300 | Yang |
elmlang | general | worked :slightly_smiling_face: | 2019-03-06T09:35:49.579700 | Yang |
elmlang | general | i have a wired excention error when using js ports. Does this look familiar to anyone? | 2019-03-06T12:32:08.581400 | Yang |
elmlang | general | None | 2019-03-06T12:32:23.581500 | Yang |
elmlang | general | found this: <https://github.com/elm/compiler/issues/1686> | 2019-03-06T12:32:30.581900 | Yang |
elmlang | general | One another note re ports: if you don’t subscribe to them in your Elm, the compiler shakes them out, which can cause problems if the JS side is still expecting the functions to be there | 2019-03-06T12:35:41.582800 | Simon |
elmlang | general | I think Elm should never shake those out given possible external dependencies, but YMMV | 2019-03-06T12:35:55.583200 | Simon |
elmlang | general | we run into this because we have standard ports for a couple apps, not all app use all of them | 2019-03-06T12:36:09.583700 | Simon |
elmlang | general | yes seen that as well. | 2019-03-06T12:36:11.583800 | Yang |
elmlang | general | yeh, that bug's taking a long time to fix | 2019-03-06T12:36:43.584800 | Kris |
elmlang | general | that's assuming it's really considered a bug, or just a side-effect of tree shaking | 2019-03-06T12:37:25.585100 | Huong |
elmlang | general | thats not the issue though. i do ave the subscriptions wired up - and the issue appears whhen im calling this. | 2019-03-06T12:38:08.585700 | Yang |
elmlang | general | ```
/// more code above.
elmHandles.syncLabels.send(labels);
```
So without this line - ports work. as soon as i call this send function it crashes. | 2019-03-06T12:38:47.586400 | Yang |
elmlang | general | It's literally tree shaking *used* code, so I don't think you can consider it not a bug | 2019-03-06T12:38:48.586500 | Kris |
elmlang | general | Sounds like you have some recursive loop on the handling side | 2019-03-06T12:39:19.587000 | Kris |
elmlang | general | None | 2019-03-06T12:40:16.587100 | Yang |
elmlang | general | Just to make sure we're on the same page, we're talking about a `port foo : (x -> Sub msg) -> Sub msg` where there is nothing in Elm using `foo`, right? | 2019-03-06T12:40:36.587800 | Huong |
elmlang | general | that means what more exactly ? I have recursive functions ? | 2019-03-06T12:40:38.588000 | Yang |
elmlang | general | or you refer to a data type | 2019-03-06T12:40:50.588400 | Yang |
elmlang | general | I meant on the elm side of things | 2019-03-06T12:40:58.588600 | Kris |
elmlang | general | hmm ok. | 2019-03-06T12:41:05.588900 | Yang |
elmlang | general | But I can't be sure without looking at the code | 2019-03-06T12:41:09.589100 | Kris |
elmlang | general | Yes | 2019-03-06T12:41:36.589200 | Kris |
elmlang | general | where you suggest i look first time? can this be anywere or is more likely to be in the decoders/subscription code>? | 2019-03-06T12:42:39.590200 | Yang |
elmlang | general | im gonna look there first | 2019-03-06T12:42:49.590500 | Yang |
elmlang | general | Yeah, maybe `update` too, where you're handling the message from the port | 2019-03-06T12:43:07.590900 | Kris |
elmlang | general | aha ok. so the entrie pathway then. | 2019-03-06T12:43:23.591200 | Yang |
elmlang | general | I'd argue that if the compiled artifact is guaranteed to not ever respond to `...ports.foo.send(something)`, it could be considered useful to not allow calling that. | 2019-03-06T12:44:11.591300 | Huong |
elmlang | general | wired error. I've solve it. I think it came form the fact that elm cashes files and doesn't compile them if not necessary. I've changed the meaning of the Label.decoder in the Label module - and here in the Label.Database the change wasn't detected. The entire project compiled just fine. Gonna look more into it but so far this is my understanding. Code was:
```
syncLabels : (List Label -> msg) -> Sub msg
syncLabels tagger =
portIn_LabelDatabase_syncLabels
(\labels ->
labels
|> List.map Label.decoder // here. this now doesn't compile once i opened this file. But it compiled just fine before. I think it keeps files chched.
// is not possible to map a label with a decoder since a decoder is not a function. Was a function before. Something like
Label.decoder : String -> Label .. but now that it become an actual decoder ..
Label.decoder : Decoder Label .. it obviously doesn't compile. Anyway .. i was hoping this stuff is supposed to be choucht by compiler. Gonna look more into it.
|> tagger
)
``` | 2019-03-06T13:07:54.599300 | Yang |
elmlang | general | thanks everyone for trying to help :slightly_smiling_face: | 2019-03-06T13:08:46.599600 | Yang |
elmlang | general | <@Yang> happens sometimes, if you run into weird bugs like this delete `elm-stuff` and recompile | 2019-03-06T13:12:32.600900 | Brady |
elmlang | general | yep i did get a error about elm stuff just few mins ago. Was pointed right to Main.elm on line 1. | 2019-03-06T13:13:36.601700 | Yang |
elmlang | general | js code could probably check if `ports.foo` is defined | 2019-03-06T14:02:27.601800 | Randee |
elmlang | general | How does one verify an email address in the simplest way in Elm? | 2019-03-06T15:06:17.603100 | Margo |
elmlang | general | <https://package.elm-lang.org/packages/rtfeldman/elm-validate/latest/Validate#isValidEmail> | 2019-03-06T15:07:51.603300 | Rosa |
elmlang | general | Yeah, I copy pasted that regex into my own project, too | 2019-03-06T15:08:24.603500 | Huong |
elmlang | general | You may want to look at <https://github.com/kdeldycke/awesome-falsehood#emails> before going too far down the path of validating emails | 2019-03-06T15:17:40.603700 | Carman |
elmlang | general | Thanks! | 2019-03-06T15:18:56.603900 | Margo |
elmlang | general | Yeah, emails are notoriously hard to validate. I have some addresses that get rejected on a bunch of websites (apparently not all devs think .xyz should be a valid tld or something?)
And yet, I'd rather have "validation that covers 98% of what my users enter" over no validation at all | 2019-03-06T15:21:56.604100 | Huong |
elmlang | general | The best validation is emailing the user a confirmation link (AKA "double opt in") | 2019-03-06T15:31:34.604400 | Carman |
elmlang | general | No one likes to allow all correct emails either | 2019-03-06T15:32:03.605300 | Kris |
elmlang | general | <@Carman> sure, when we're talking about entering your own email address, that works. Even then, it makes sense to do a sanity check first - there's no point in trying to send an email to `foobar`. Then, there are obvious misspellings, and people being rather bad at noticing their own typos.
In our specific case - and this might have something to do with our customer base - support queries went down drastically after adding stricter validation to some email input fields. Turns out, people are really sloppy, and tend to think "the system did something wrong" before considering they might have entered nonsense. | 2019-03-06T16:21:59.606400 | Huong |
elmlang | general | Was that stronger validation than basically `*@*.*`? | 2019-03-06T16:24:16.606600 | Franklin |
elmlang | general | While `"hello there"@gmail` might be a valid email address according to the rfc, I _highly_ doubt that if one of our users enters that, they did it intentionally | 2019-03-06T16:24:24.606800 | Huong |
elmlang | general | I'd be curious to try doing validating as a warning as opposed to an error. e.g. "That doesn't look like a valid email." and present a link similar to "No that's correct, that's my email". Less validation, more... correctness-hinting? :slightly_smiling_face: | 2019-03-06T16:28:26.607000 | Franklin |
elmlang | general | Yeah, might do that at some point. I checked our regex against the entire DB, and didn't encounter any false negatives, so I didn't want to complicate the design by adding an extra concept. But yeah, that sounds like a good idea to me, either way. I also like `mailcheck` which offers suggestions for possible typos (e.g. <http://gmail.co|gmail.co> -> <http://gmail.com|gmail.com>) | 2019-03-06T16:34:54.607200 | Huong |
elmlang | general | (there's an Elm version) | 2019-03-06T16:35:28.607400 | Huong |
elmlang | general | there are a lot of websites that think one of my `.io` email addresses should actually be `.it` | 2019-03-06T16:43:11.607600 | Wiley |
elmlang | general | Hey newbie question. Is there a way to add an extra parameter to the classic `view : Model -> Html Msg` that complies?
For example `view : ExtraParameter -> Model -> Html Msg` | 2019-03-06T20:19:16.611700 | Luther |
elmlang | general | No | 2019-03-06T20:19:59.611900 | Kris |
elmlang | general | Why would you want that? | 2019-03-06T20:20:07.612200 | Kris |
elmlang | general | You can do `view model = viewHelp extraParam model` or something like that | 2019-03-06T20:20:37.613000 | Kris |
elmlang | general | And have the helper function have the type you want | 2019-03-06T20:20:49.613400 | Kris |
elmlang | general | The extra parameter I want to insert is a paginated list to populate my table | 2019-03-06T20:29:09.615100 | Luther |
elmlang | general | <@Luther> the Browser functions like Browser.sandbox and Browser.program require a certain signature for the top level `view` function. but of course, internally, your html-returning functions can have any signature. | 2019-03-06T20:31:48.616700 | Jarvis |
elmlang | general | where does the list come from? | 2019-03-06T20:33:47.617400 | Jarvis |
elmlang | general | My list comes from this function ``` filterAndSortThings : Model -> PaginatedList String
filterAndSortThings model =
let
sort =
if model.reversed then
List.reverse
else
identity
filter =
if model.query == "" then
identity
else
List.filter (\thing -> String.contains model.query thing)
in
Paginate.map (filter >> sort) model.things
```
When I change `view : Model -> Html Msg` to `view : PaginatedList String -> Html Msg` and the higher definition to `view = filterAndSortThings >> view` it works. | 2019-03-06T20:42:39.621100 | Luther |
elmlang | general | .... the problem is I still need to do this whist having access to `Model` in the `view` | 2019-03-06T20:44:05.622300 | Luther |
elmlang | general | <@Luther> you should just call `filterAndSortThings` from inside your `view` | 2019-03-06T20:47:39.623700 | Earlean |
elmlang | general | for example, imagine if the first line of your `view` was `let sortedThings = filterAndSortThings model.query model.reversed model.things in` | 2019-03-06T20:49:58.624200 | Jarvis |
elmlang | general | Thank you thank you thank you <@Jarvis> <@Earlean> :grin::+1: | 2019-03-06T20:59:45.625600 | Luther |
elmlang | general | I'm currently use http 1 in my project but I need to install http 2 | 2019-03-07T00:11:58.627000 | Janita |
elmlang | general | How I can do that | 2019-03-07T00:12:07.627300 | Janita |
elmlang | general | And also I can't change it in elm.json manually | 2019-03-07T00:13:37.628200 | Janita |
elmlang | general | I found http 2 installed in cash but how to force app to use it | 2019-03-07T00:18:18.629200 | Janita |
elmlang | general | <@Janita> `elm install` will install the latest version of a package that is compatible with all your existing packages. Most likely you'll need to update `elm/core` and `elm/json` first Try removing `elm/core`, `elm/json` and `elm/http` from your elm.json file and then run `elm install elm/http` | 2019-03-07T00:29:20.631100 | Earlean |
elmlang | general | good morning!
does elm 0.19 still have html5 drag and features? | 2019-03-07T04:09:17.632300 | Karrie |
elmlang | general | Yes, I found <https://package.elm-lang.org/packages/norpan/elm-html5-drag-drop/latest/> really easy to use. | 2019-03-07T04:15:32.632800 | Jin |
elmlang | general | <https://package.elm-lang.org/packages/eriktim/elm-protocol-buffers/latest/> | 2019-03-07T04:27:24.633000 | Elissa |
elmlang | general | Eric Timms wrote there: "This package provides an API to help converting between Elm values and bytes by implementing Protocol Buffers. elm-protocol-buffers also opens the door to add support for the communication protocol gRPC, which could be an interesting next step." | 2019-03-07T04:28:51.633200 | Elissa |
elmlang | general | i was looking at that one already! :slightly_smiling_face: but was hoping to not add another dependency to the project and trying to do it myself | 2019-03-07T05:20:40.634300 | Karrie |
elmlang | general | but I guess it’s just way faster if I use an external package | 2019-03-07T05:21:04.634800 | Karrie |
elmlang | general | Hi. I'm trying to save a list of about 3000 strings (which I get from http request) to the model
But getting «Main.elm:9136 Uncaught RangeError: Maximum call stack size exceeded» exception.
What can be done about this?
This snippet is from my update function:
```
GotChain chainResponse ->
case chainResponse of
Success chain ->
-- This causes the exception
({ model | branches = chain.branches }, Cmd.none)
_ ->
( model, Cmd.none)
``` | 2019-03-07T07:26:05.635600 | Racquel |
elmlang | general | Sometimes it is being saved, but then, when I try to load another chain, and replace this long list with the new one (even if the new list contains only of 5 strings for example), I get this exception again. | 2019-03-07T07:38:42.639500 | Racquel |
elmlang | general | That's super weird. Record update shouldn't cause this error. What type does `chain.branches` have? Is it `List String`? Do you use this field anywhere, in `view` for example? | 2019-03-07T07:39:11.640000 | Lynne |
elmlang | general | Yes, it is `List String`, and no, I don't use it anywhere. I've removed it completely from everywhere, except of this branch of `update`. | 2019-03-07T07:43:00.643300 | Racquel |
elmlang | general | Could you hit a kernel bug? Did you search for something similar in `elm/compiler` or `elm/core` repos? | 2019-03-07T07:44:09.643600 | Lynne |
elmlang | general | I've seen this thread
<https://github.com/elm/compiler/issues/1521>
But it was closed. And I have elm 0.19. | 2019-03-07T07:48:42.644100 | Racquel |
elmlang | general | <@Racquel> can you try without `--debug`? | 2019-03-07T07:48:50.644400 | Huong |
elmlang | general | Do you have a stracktrace? | 2019-03-07T07:51:15.644500 | Lynne |
elmlang | general | Evan said it was fixed, that's why it was closed | 2019-03-07T07:52:05.644700 | Lynne |
elmlang | general | So it may be that they broke it again | 2019-03-07T07:52:19.644900 | Lynne |
elmlang | general | Ping <@Huong> | 2019-03-07T07:53:28.645100 | Lynne |
elmlang | general | It is fixed. My guess is that <@Racquel> may be using `--debug`. When the debugger is active, it serializes every message, and when messages are very large, that can cause issues, sadly. | 2019-03-07T07:53:45.645300 | Huong |
elmlang | general | Yeah, I saw in the thread that was fixed. Hopefully your guess about `--debug` is correct | 2019-03-07T07:54:18.645500 | Lynne |
elmlang | general | Yes, it was `--debug`. Without it everything works just fine. Thanks! | 2019-03-07T08:11:19.645700 | Racquel |
elmlang | general | Great, thanks for confirming <@Racquel>! | 2019-03-07T08:25:22.645900 | Huong |
elmlang | general | Hi all i am trying to update my elm package from 0.18 to 0.19. when i use elm publish it is saying package has not been published yet. Any suggestions. Thanks | 2019-03-07T10:00:14.647000 | Oliver |
elmlang | general | I deleted the elm.json and re-install the packages again this fix the issue | 2019-03-07T10:11:14.647300 | Janita |
elmlang | general | Hi ELM community!!
I am studying the best was to create a sort of right side menu with a *grid of images with text*, as I highlighted on the attached image.
I considered using <http://elm-bootstrap.info/grid> to do so, but I'm not sure if that's the way to go.
Would you have any suggestion for me to start with?
Thanksss | 2019-03-07T10:58:33.648000 | Paulita |
elmlang | general | Are you using anything for styling right now (elm-css, separate css/sass/less, something else)? What are your target browsers? Depending on those, it could be possible for you to use css grid <https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout> | 2019-03-07T11:12:18.648300 | Chae |
elmlang | general | If you're not committed to CSS/HTML, using elm-ui is pretty sweet. | 2019-03-07T11:43:40.648600 | Dede |
elmlang | general | (There's a whole channel, <#C4F9NBLR1|elm-ui>) | 2019-03-07T11:43:46.648800 | Dede |
elmlang | general | When 0.19 was released, it appears that publishing 0.18 packages causes some weird behaviour. What happens when you try to publish your package as 1.0.0 on 0.19? What exact error do you get? | 2019-03-07T11:50:03.649000 | Huong |
elmlang | general | To publish package as 1.0.0 i have to edit git tag 1.0.0 and going forward i have to edit all git tags which may conflict with 0.18 versions. | 2019-03-07T11:51:31.649300 | Oliver |
elmlang | general | So I am thinking of new git repository is there any other way? | 2019-03-07T11:51:55.649500 | Oliver |
elmlang | general | So, as far as you know, are there any users using the 0.18 version of your package? | 2019-03-07T11:52:37.649700 | Huong |
elmlang | general | i don't think so but 0.18 verison is being used in my company old app which we are updating | 2019-03-07T11:53:32.649900 | Oliver |
elmlang | general | I wouldn't _generally_ recommend this, but given that the package was first published after the 0.19 release, chances are that you are aware of all users of the 0.18 version. In that case, removing the existing tags (except perhaps for the last published 0.18 version which is still in use) might be an option | 2019-03-07T11:53:56.650100 | Huong |
elmlang | general | It's a bit of a pain, for sure | 2019-03-07T11:54:47.651000 | Huong |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.