workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
Okay, so we're at least in theory avoiding double encoding (though I don't think that's true because somewhere that string is still probably going to get a `JSON.stringify` to go through the port, though it may be trivial performance wise even for large data).
2019-02-21T14:42:08.075700
Rosaria
elmlang
general
Anyway, all besides the point.
2019-02-21T14:42:51.076300
Rosaria
elmlang
general
There’s no stringify that happens when going through ports.
2019-02-21T14:43:50.078200
Danika
elmlang
general
<@Agustin> The most important thing however that you haven't touched on is is there code generation for these GraphQL things? Do I have to write clients for it by hand with support libraries?
2019-02-21T14:43:50.078300
Rosaria
elmlang
general
No, the most popular library generates elm for your graphql
2019-02-21T14:44:31.079100
Agustin
elmlang
general
You still have to couple that to your code
2019-02-21T14:44:39.079500
Agustin
elmlang
general
Okay, that's a huge relief.
2019-02-21T14:44:42.079700
Rosaria
elmlang
general
But the “decoding” is handled
2019-02-21T14:44:46.080000
Agustin
elmlang
general
<@Danika> Ah I see. Before the json passing in ports occurred, elm had hardcode support for its basic types through ports.
2019-02-21T14:46:38.081300
Rosaria
elmlang
general
That's excellent news.
2019-02-21T14:46:40.081500
Rosaria
elmlang
general
Hey there, I am searching for the complete schema of "--report=json" compiler flag... is that JSON schema just the same for every type of error/warning/message ?
2019-02-21T15:32:23.084100
Cherish
elmlang
general
currently I am reengineering the schema from concrete error messages, but that seems somewhat inefficient and tedious..
2019-02-21T15:33:35.084900
Cherish
elmlang
general
This didn't help? <https://package.elm-lang.org/packages/elm/project-metadata-utils/latest/Elm-Error>
2019-02-21T16:10:23.089500
Velia
elmlang
general
TLDR; contextually rendered UI loses bindings in IE 11 Hi there, I have the singular misfortune of having to support IE11 for our app, and while it works reasonably well, there is an issue where the app seems to lose its binding for overlays, i.e DOM that is rendered contextually based on a user interaction. I can verify that if I render the overlay on page load, I can interact with it ( (I can verify the responsiveness by watching the elm debugger), but when I close it and reopen it the overlay eventually loses it bindings, and becomes non-responsive. By eventually, I mean that I can reopen and close the overlay 0 or more times, but typically no more than 5, so this suggests that perhaps the issue is in IE’s event loop handling of the runtime, which, well, is not a cause for much optimism that this issue is easily fixable. Has anyone else experienced this issue with IE11 and if so, how did you mitigate it. thanks all!
2019-02-21T16:16:44.094000
Kaitlin
elmlang
general
By loses bindings, do you mean there are no event handlers registered, or do you see errors in the console when interacting?
2019-02-21T16:20:33.095600
Huong
elmlang
general
there are no console errors or elm debugger updates
2019-02-21T16:21:11.096200
Kaitlin
elmlang
general
That's pretty weird! I've had issues where events would result in errors due to some weird edge case with html.map that only pops up in IE 11, but haven't run into a complete lack of interaction!
2019-02-21T16:23:09.098400
Huong
elmlang
general
yeah, it’s very weird!
2019-02-21T16:26:11.098800
Kaitlin
elmlang
general
<@Huong> you are a genius. your comment about Html.map inspired me to look at how I was constructing the DOM where the overlay was rendered, and indeed I was doing something rather weird with Html.map basically I was doing this: ```div [] &lt;| List.map (Html.map myFooMsg) [ viewNode1 , viewOverlay , viewNode2 , viewNode3 ]``` when I should have been doing this : ```Html.map myFooMsg &lt;| div [] [ viewNode1 , viewOverlay , viewNode2 , viewNode3 ]```
2019-02-21T16:49:03.102400
Kaitlin
elmlang
general
using the latter structure makes my overlay 100% functional.
2019-02-21T16:50:27.103400
Kaitlin
elmlang
general
I’m not sure why that would be the case, but i know the original way I was doing it is obviously not idiomatic
2019-02-21T16:51:29.104400
Kaitlin
elmlang
general
Yeah, that's actually the bug I was referring to. Having an indirection between the node and the mapped contents seems to make this problematic, for whatever reason. Anyway, glad that helped!
2019-02-21T17:00:10.106700
Huong
elmlang
general
<@Velia> great! I just can't produce this for testing: `ModuleProblems (List BadModule)` I have 2 Modules, each of which have 1 error, but I get only 1 "BadModule" from the json-report this is what never produced something more than one element: <https://github.com/elm/project-metadata-utils/blob/1d43c1a660c4f7dca9f14e64a050ac3971141221/src/Elm/Error.elm#L69>
2019-02-21T17:09:42.106800
Cherish
elmlang
general
ah.. I think I just got it: there will be &gt;1 module-errors only, if I compile multiple _independent_ modules if I use moduleB in moduleA (that is, moduleA imports moduleB !), only the first error is reported, and which depends on whichever module will be checked by the compiler first
2019-02-21T17:17:34.107300
Cherish
elmlang
general
Really great talks from Oslo Elm Day. Almost finished watching all of them.
2019-02-21T17:52:53.108300
Wendell
elmlang
general
What is the best way to call an Elm function from Js. I have a parser implemented in Elm and would really love to be able to call the function synchronously from Js so I don’t have to reimplement the same thing in Js.
2019-02-21T18:14:36.110900
Kathlyn
elmlang
general
I am perfectly fine with encoding and decoding stuff as needed.
2019-02-21T18:17:52.111400
Kathlyn
elmlang
general
Send the text to be parsed in through a port, encode a JSON object of the AST or whatever and send it back out.
2019-02-21T18:19:16.111600
Cammy
elmlang
general
You have mostly 2 options for doing it synchronously, something like this: <https://medium.com/@jjant/making-elm-unsafe-cc6435495af2> or using a trick with decoding/encoding a proxy
2019-02-21T18:20:09.111800
Kris
elmlang
general
These are not the officially recommended options etc etc
2019-02-21T18:20:34.112000
Kris
elmlang
general
<@Cammy> Yeah, was hoping for an sync way of doing it as the thing I have to integrate with requires it. Thanks all the same
2019-02-21T18:22:21.112200
Kathlyn
elmlang
general
Is the current state of running elm with the debugger enabled that you can’t use Lists in your Msg’s? If been reading on the bug reports but they mainly talk about the usage of Arrays and opt to convert them in to lists for your messages, but a List also reports ```elm: Map.!: given key is not an element in the map```
2019-02-21T19:01:40.114100
Dexter
elmlang
general
Unfortunately yes. There is a fork of the compiler that fixes this issue: <https://github.com/tomstejskal/compiler> The official fix will be part of `0.19.1` but there are other issues being fixed that will delay that release some more time.
2019-02-22T01:10:08.115900
Maida
elmlang
general
How to iterate over struct
2019-02-22T02:41:44.116400
Chi
elmlang
general
you mean over the fields of a struct? If so, it is not possible as that would mean iterate over values of different types.
2019-02-22T02:45:01.116500
Elza
elmlang
general
<@Chi> what are you wanting to do?
2019-02-22T02:45:44.116700
Iona
elmlang
general
struct have different type lets say struct {data:List String, id: int}
2019-02-22T02:47:20.116900
Chi
elmlang
general
yes?
2019-02-22T02:48:04.117200
Iona
elmlang
general
i want to iterate over it List of struct
2019-02-22T02:48:47.117500
Chi
elmlang
general
What do you whant to do in the iteration? Applying a function to the records? A filter? something else?
2019-02-22T02:51:53.117800
Allyn
elmlang
general
Hello. I struggle to apply a list of filters to a list of values. I made a simplified example in ellie: <https://ellie-app.com/4NpDSmYhdvMa1>
2019-02-22T02:53:12.119100
Allyn
elmlang
general
want to apply funtion
2019-02-22T02:54:21.119200
Chi
elmlang
general
So use List.map: <https://package.elm-lang.org/packages/elm/core/latest/List#map>
2019-02-22T02:55:33.119400
Allyn
elmlang
general
I'm just going to give you the answer. But feel free to ask any questions so we can help you understand it ``` applyFilters : List Int -&gt; List (Int -&gt; Bool) -&gt; List Int applyFilters values filters = List.foldl (\filter remainingValues -&gt; List.filter filter remainingValues) values filters ```
2019-02-22T02:57:59.119600
Sharon
elmlang
general
It doesn’t seem to produce the expected result in my example
2019-02-22T03:01:16.119900
Allyn
elmlang
general
<https://ellie-app.com/4NpPhpwLXZfa1>
2019-02-22T03:01:17.120100
Allyn
elmlang
general
oh I thought all filters had to be applied,sorry :slightly_smiling_face:
2019-02-22T03:02:37.120300
Sharon
elmlang
general
so if any filter returns true, the element can stay
2019-02-22T03:03:04.120500
Sharon
elmlang
general
No, it’s my example which is bad, your solution is OK
2019-02-22T03:03:32.120700
Allyn
elmlang
general
sorry
2019-02-22T03:03:41.121000
Allyn
elmlang
general
And thank you for your help
2019-02-22T03:03:55.121200
Allyn
elmlang
general
Just in case you are interested in OR filters, there is a function in `list-extra` which may be helpful: `List.Extra.lift2`
2019-02-22T03:05:36.121500
Lynne
elmlang
general
You could patch out the check about which repos are allowed to produce kernel code.
2019-02-22T03:38:47.122200
Niesha
elmlang
general
But you'd be on your own writing kernel code.
2019-02-22T03:39:04.122400
Niesha
elmlang
general
Hey peeps - Is there a way to generate inline styles with elm-css?
2019-02-22T03:56:46.123000
Teri
elmlang
general
Can't find it in the docs nor issues?
2019-02-22T03:56:56.123200
Teri
elmlang
general
It is actually interleaved with installed modules. If you put the consumed modules in your source directory rather than the elm packages directory the error goes away.
2019-02-22T03:58:06.123300
Teri
elmlang
general
Is <http://package.elm-lang.org|package.elm-lang.org> broken for anyone else? <https://package.elm-lang.org/packages/jinjor/elm-debounce/latest/Debounce> I can't click any links, I just get ``` elm.js?1538874483:3779 Uncaught TypeError: Cannot read property 'childNodes' of undefined at _VirtualDom_addDomNodesHelp (elm.js?1538874483:3779) ``` Over and over again in my console
2019-02-22T06:14:31.130500
Shelia
elmlang
general
If I refresh the page, the first console error is `Unchecked runtime.lastError: The message port closed before a response was received.`
2019-02-22T06:14:59.130800
Shelia
elmlang
general
That seems to happen whenever I move the mouse
2019-02-22T06:15:11.131000
Shelia
elmlang
general
Ok, looks like it's my Stay Focused Chrome extension
2019-02-22T06:17:29.132600
Shelia
elmlang
general
<@Shelia> yep, that error is the result of something outside Elm messing with Elm's part of the DOM
2019-02-22T06:17:48.133000
Earlean
elmlang
general
perhaps Stay Focused should be mentioned as an example here? <https://discourse.elm-lang.org/t/fullscreen-elm-app-in-0-19-childnode-issue-reopened/3174/9> (if <http://package.elm-lang.org|package.elm-lang.org> is using `Browser.application`)
2019-02-22T06:20:53.134000
Lewis
elmlang
general
How many frontend devs does NoRedInk have? Working on a presentation about Elm :slightly_smiling_face:
2019-02-22T07:39:06.137100
Nana
elmlang
general
Hello all! We're under threat from a decision-maker for our use of Elm so we're writing a big post on *"Why Choose Elm in 2019"*. We would _very much appreciate your help_ with a :+1: and sharing any success stories and challenges you've had on this post with our outline so we can make it comprehensive :hearts: <https://github.com/dwyl/learn-elm/issues/129>
2019-02-22T09:03:11.140100
Charley
elmlang
general
<@Nana> Looks like their website doesn't differentiate between front end and back end, just roughly 25 engineers: <https://www.noredink.com/about/team> :slightly_smiling_face:
2019-02-22T09:04:10.140300
Charley
elmlang
general
Oh, that's kind of what I'm doing too! Although for me it's actually more our Java developers. My boss was more "reliability sounds good"
2019-02-22T09:15:20.141800
Nana
elmlang
general
Ah thanks, I see :thinking_face:
2019-02-22T09:20:04.142100
Nana
elmlang
general
<@Nana> We're dedicating our time to it next week without fail so maybe we could share ideas as we go through? If you could put the word out maybe we could collect some wider experience for everyone!
2019-02-22T09:20:37.142300
Charley
elmlang
general
Hi! Does anyone know the algorithm used for the Elm type checker?
2019-02-22T09:45:41.143200
Randi
elmlang
general
I think it's based on this: <https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system>
2019-02-22T09:47:30.143300
Nana
elmlang
general
<@Charley> I just heard from <@Carl> (Microsoft) they are going to be recording for the next episode of the elm-town podcast today
2019-02-22T09:55:35.143600
Nana
elmlang
general
We don't differentiate internally either
2019-02-22T10:46:37.144500
Sherilyn
elmlang
general
Eg I used to do mostly Backend and now I write a lot of elm.
2019-02-22T10:49:05.144700
Sherilyn
elmlang
general
Having big names always help :slightly_smiling_face:
2019-02-22T11:35:42.145400
Hoa
elmlang
general
Does anyone know if its possible to change the location of the elm-stuff directory? (Not to be confused with the .elm directory.) I'm trying to work around some unfortunate read-only drive problems and it would be great if I could move it to another location.
2019-02-22T11:44:14.147000
Lavon
elmlang
general
`elm-stuff` is always created in the same directory as your `elm.json`. However, you might be able to move your `elm.json` and update its `source-directories` entry accordingly?
2019-02-22T11:45:47.148000
Huong
elmlang
general
while we do use Elm at Microsoft, we're just a small team inside a huge company. I don't think the TypeScript people or VSCode people are even aware of what our team is doing
2019-02-22T11:47:00.148600
Carl
elmlang
general
If I can automate copying it to another location and updating the source-directories list dynamically that might work...
2019-02-22T11:48:16.149600
Lavon
elmlang
general
If namedropping is the goal - there's a team at adobe that uses Elm, and Amazon AWS had a job-listing for Elm engineers too, a year or so ago.
2019-02-22T11:49:27.150100
Huong
elmlang
general
You could copy the whole source directory from the read only drive to one with write access?
2019-02-22T11:49:29.150300
Crissy
elmlang
general
Yeah, that's an option too. I was hoping I could just change an environment variable to make it all work, but it looks like I'll have to do more than that :confused:
2019-02-22T11:52:05.152000
Lavon
elmlang
general
hi, i'm trying to build the elm compiler from its source. i tried to build it using stack, but `stack init` fails because it does not find a suitable resolver. any hints?
2019-02-22T16:23:35.155200
Karan
elmlang
general
Is there some component/package to use the bluetooth web API in Elm?
2019-02-22T16:30:24.155600
Garnet
elmlang
general
I don't think so, but you can use ports to interact with any browser API
2019-02-22T17:17:22.155900
Bert
elmlang
general
Has anyone seen this error before? ``` ERROR in ./src/Planning.elm Module build failed (from ./node_modules/elm-webpack-loader/index.js): Error: Compiler process exited with error Compilation failed Success! elm: Map.!: given key is not an element in the map CallStack (from HasCallStack): error, called at libraries/containers/Data/Map/Internal.hs:603:17 in containers-0.5.10.2:Data.Map.Internal at ChildProcess.&lt;anonymous&gt; (/Users/herman/Projects/_customer/tranman/elm/node_modules/node-elm-compiler/index.js:149:27) at ChildProcess.emit (events.js:160:13) at maybeClose (internal/child_process.js:943:16) at Socket.stream.socket.on (internal/child_process.js:363:11) at Socket.emit (events.js:160:13) at Pipe._handle.close [as _onclose] (net.js:562:12) @ ./js/elm.js 1:0-41 3:13-16 ``` It happens on running webpack with --development, not with --production. And it just started all of a sudden between 1 compile and the other.
2019-02-23T04:01:00.157800
Salvador
elmlang
general
never mind, I deleted elm-stuff and it went away.
2019-02-23T04:02:49.158200
Salvador
elmlang
general
<@Salvador> That's a compiler issue, on Github there are few threads discussing it. If it comes again and removing `elm-stuff` won't help you can try running `elm make` without `--debug` if it suits you or build elm compiler from a forked repo where this bug is fixed
2019-02-23T04:07:33.159600
Lynne
elmlang
general
<@Lynne> Aha, thanks for the info. For the moment it’s compiling fine. But I’ll put it on my list.
2019-02-23T04:08:52.160500
Salvador
elmlang
general
Yeah, just wondered if thers some Elm package ^^
2019-02-23T04:31:10.160700
Garnet
elmlang
general
I'm using Visual Studio Code and just started a new elm project, but I can't seem to get it to reformat my code on save like it used to in my old project. Anything in particular I need to do? I'm using the Krzysztof-Cieslak/vscode-elm extension
2019-02-23T12:46:35.162500
Santina
elmlang
general
Does it format manually ? (Shift+Alt+F) in that case it must be your settings.. there is a Format on save settings in vsCode.. There is also a timer soewhere... I found that it has to be set more than defaul 1s.. when I changed mine to 5s it works every time..
2019-02-23T12:52:18.164800
Monnie
elmlang
general
Hmm. It just doesn't seem to like my code. Compiler errors.
2019-02-23T12:58:45.165100
Santina
elmlang
general
does elm compiler require a Main.elm?
2019-02-23T12:58:50.165300
Santina
elmlang
general
I'm starting my writing the shape of my data
2019-02-23T12:59:05.165500
Santina
elmlang
general
didnt want to dive into wiring the boilerplate yet
2019-02-23T12:59:33.165700
Santina
elmlang
general
not sure.. never tried without main :slightly_smiling_face:
2019-02-23T13:00:01.165900
Monnie
elmlang
general
Does elm compiler require a Main.elm to exist before elm-format will function? I'm starting by writing out the shape of my data and wanted it typechecked as well as the benefit of elm-format, so i've started writing some real basic static data, but elm-format shows me compiler errors with *very* basic data that *should* compile okay
2019-02-23T13:01:29.167300
Santina
elmlang
general
Compiler will compile any file you point it at. The errors are probably real
2019-02-23T13:02:50.167800
Dede
elmlang
general
example: <https://gist.github.com/bstro/22585039e6b61211a245b335131c27ef>
2019-02-23T13:03:37.168000
Santina