workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
I am very interested in knowing more
2019-02-19T15:43:56.793500
Kathlyn
elmlang
general
Sounds horrible
2019-02-19T15:44:01.793900
Kathlyn
elmlang
general
I am reopening the Elm discussion in the forum
2019-02-19T15:44:19.794500
Kathlyn
elmlang
general
But the whole `<body>` control is new to 0.19, and only `Browser.application`. So maybe Evan is not conscious yet of the issues raised. It does not look good from the various reports.
2019-02-19T15:44:47.794900
Velia
elmlang
general
I recall bringing it up and being dismissed months ago. Constructively, I’d like to encourage the folks who shepherd that feedback to be a little more curious, I’m unsure how to achieve that
2019-02-19T15:45:49.796000
Simon
elmlang
general
<https://discourse.elm-lang.org/t/fullscreen-elm-app-in-0-19-childnode-issue-reopened/3174>
2019-02-19T15:46:33.796200
Kathlyn
elmlang
general
original filing if interested: <https://discourse.elm-lang.org/t/browser-application-doesnt-work-with-popular-analytics-approaches/2659/6>
2019-02-19T15:47:17.796600
Simon
elmlang
general
related conversation in Slack lost to sands of time of course :slightly_smiling_face:
2019-02-19T15:47:42.796900
Simon
elmlang
general
Like always
2019-02-19T15:48:37.797100
Kathlyn
elmlang
general
<@Simon> You said is was dismissed? You remember why?
2019-02-19T15:49:32.798100
Kathlyn
elmlang
general
Emotional memory says the vibe was not sacrificing Elm’s correctness for broader ecosystem impurity
2019-02-19T15:50:25.798800
Simon
elmlang
general
If you think this is the worst hack we’ve done, ask me about my compiler hackers :wink:
2019-02-19T15:50:49.799300
Simon
elmlang
general
<@Reuben> I'm building an interface for this language: <https://timothyatkinson.github.io/gettingstarted.html> so I just need a simple editor that I can query the state of to "compile" my program, and also control the state of to apply a few invariants to the rules, and produce output graphs
2019-02-19T16:10:59.799400
Vashti
elmlang
general
Haha, yep. Not a coincedence either.
2019-02-19T16:14:36.799700
Ashton
elmlang
general
I see. I was suspecting that :wink:
2019-02-19T16:17:19.799900
Velia
elmlang
general
That is problematic view imo. If Elm is to be used in real applications like ours, we have to face the facts and balance purity and pragmatism. This effectively makes any Elm applications unusable by a large segment of users
2019-02-19T16:25:55.802300
Kathlyn
elmlang
general
You can work around it easily enough I think?
2019-02-19T16:45:05.802700
Agustin
elmlang
general
You need to either add a wrapper div, or use element with an external wrapper div.
2019-02-19T16:45:24.803200
Agustin
elmlang
general
<@Agustin>That’s just it. You can’t. Fullscreen will always use the entire body element in 0.19. If you embed you app in a wrapper you cannot control navigation, which means you cannot to a SPA like ours
2019-02-19T16:47:11.804700
Kathlyn
elmlang
general
Ah so just the first option applies then
2019-02-19T16:48:12.805000
Agustin
elmlang
general
You can add the wrapper div inside your elm app
2019-02-19T16:48:21.805300
Agustin
elmlang
general
I believe
2019-02-19T16:49:36.805900
Agustin
elmlang
general
The virtual dom then doesn’t get out of sync and it doesn’t blow up
2019-02-19T16:49:50.806500
Agustin
elmlang
general
<@Edwin> it won’t work, because if another JS package has written to Body, elm will overwrite it once it “boots”
2019-02-19T16:49:56.806900
Simon
elmlang
general
Similar to how the “web components” hack works
2019-02-19T16:49:59.807000
Agustin
elmlang
general
so it’s also a bit of a timing issue
2019-02-19T16:50:07.807300
Simon
elmlang
general
Jon you have no control of the external scripts or extensions. I cannot wrap them if that is what you are suggesting. I am not sure how web components fit in here.
2019-02-19T16:51:24.809400
Kathlyn
elmlang
general
(as an aside, we make extensive use of web components elsewhere and are fond of the technique; we use it for avatar img fallbacks, algolia-based search, ChartJS fully implemented in Elm types but rendered via web component etc)
2019-02-19T16:51:26.809600
Simon
elmlang
general
We use webcomponents for Code Mirror and Charting
2019-02-19T16:51:53.810000
Kathlyn
elmlang
general
<@Edwin> you can control navigation using `element`, here's a tutorial <https://github.com/elm/browser/blob/1.0.0/notes/navigation-in-elements.md> , it's not as pretty but it's possible
2019-02-19T17:09:00.812000
Shondra
elmlang
general
Ludat thanks for the link, and sure, but we have a huge app that is fully Elm. The page starts with (Many companies introduce Elm gradually.). This is how we did in 0.18, and would prefer hacking the resulting Js like <@Simon> compared to this - which is a complete departure from the new navigation api.
2019-02-19T17:12:52.814200
Kathlyn
elmlang
general
<@Kathlyn> web components work because you have an element created by elm, and they manipulate the insides, the vdom is happy.
2019-02-19T17:28:24.816100
Agustin
elmlang
general
I’m suggesting a work around whereby you add an elmement at the top of the vdom, so it stays happy when other elements are added alongside it
2019-02-19T17:28:50.816700
Agustin
elmlang
general
AFAIK its the getting out of sync that makes it unhappy
2019-02-19T17:29:09.817100
Agustin
elmlang
general
You are welcome to ignore me though, just trying to help :slightly_smiling_face:
2019-02-19T17:29:34.817400
Agustin
elmlang
general
Sorry that sounded passive aggressive, what I mean is, I’m trying to help, but if I’m not thats ok :slightly_smiling_face:
2019-02-19T17:30:16.818500
Agustin
elmlang
general
I did not mean to sound ungrateful. :smile: I just genuinely do not see how it would help. And how adding more items (through the vdom would help)
2019-02-19T17:31:02.819400
Kathlyn
elmlang
general
It’s a trick for sure
2019-02-19T17:31:43.820900
Agustin
elmlang
general
Wrapping stuff in a div is only going to protect against stuff getting added to the bottom of the `&lt;body&gt;` right? It wont protect from things getting added to the top.
2019-02-19T17:31:43.821000
Ashton
elmlang
general
Thats my suspicion. It would be cool to confirm this.
2019-02-19T17:32:05.821600
Ashton
elmlang
general
(if you render just `&lt;body&gt;&lt;div&gt;stuff&lt;/div&gt;&lt;/body&gt;` The vdom is going to look for the first element, find it, and be happy, it wont care about any sibling elements since it doesnt believe they exist, but, if something else is first, it will find the something else, which it wont expect, and subsequently crash).
2019-02-19T17:33:30.823100
Ashton
elmlang
general
yes thats my belief
2019-02-19T17:34:17.823400
Agustin
elmlang
general
born out of experience with web components
2019-02-19T17:34:25.823700
Agustin
elmlang
general
the vdom cares about what it knows about, and ignores that it doesnt, but if the “streams cross” it gets mad
2019-02-19T17:34:55.824200
Agustin
elmlang
general
``` &lt;body&gt; &lt;div id="root"&gt;ELM APP STUFF HERE&lt;/div&gt; &lt;div id="injected-extension"&gt;ELEMENT INJECTED BY EXTENSION&lt;/div&gt; &lt;/body&gt; ``` Where do web components come into this picture?
2019-02-19T17:36:22.824400
Kathlyn
elmlang
general
This is correct. But take something like google tag manager, it will add things at the start of the body. Then you are screwed.
2019-02-19T17:42:46.825600
Kathlyn
elmlang
general
this is weird question but does this js port code look weird to you ?
2019-02-19T17:43:08.825900
Stacee
elmlang
general
context: I am working with a pretty gigantic SPA, and with the elm debugger not working so I am debugging things randomly to understand what is going on
2019-02-19T17:44:25.827300
Stacee
elmlang
general
the problem: I can’t get the onEventSteam port to fire again if I reload the page but if I get there by being routed (i.e.e elm changing the url) then it works :confused:
2019-02-19T17:45:21.829300
Stacee
elmlang
general
Looks fine. The only thing is you are sending error and event directly to Elm. Do you have full control over the content of those and are they the same format?
2019-02-19T17:45:22.829400
Kathlyn
elmlang
general
<@Kathlyn> thanks for the anwer! Jes the are Values and I just do a ghetto try two decoders one for the data and one for the error and return a custom type :smile:
2019-02-19T17:46:27.830600
Stacee
elmlang
general
Yes
2019-02-19T17:47:06.830700
Ashton
elmlang
general
For completion I am adding my solution to the browser extension problem above. It is a dirty hack as suggested by <@Simon>. But it does exactly what we need, nests the fullscreen app one level down from body. It is a webpack loader that transforms the resulting js source. Use at your own peril! And lets pray for the elm gods to find this despicable enough to merit a patch.
2019-02-19T18:33:13.834800
Kathlyn
elmlang
general
``` const findBodySnippet = "var bodyNode = _VirtualDom_doc.body;" const findRootDivSnippet = 'var bodyNode = _VirtualDom_doc.getElementById("root");' const createBodyElementSnippet = "var nextNode = _VirtualDom_node('body')"; const createDivElementSnippet = "var nextNode = _VirtualDom_node('div')"; module.exports = function(source) { return ( source .replace(findBodySnippet, findRootDivSnippet) .replace(createBodyElementSnippet, createDivElementSnippet) ); } ```
2019-02-19T18:33:28.835000
Kathlyn
elmlang
general
We went with `element` and use navigation through ports. It's pretty easy to set up :shrug:
2019-02-20T02:54:51.836500
Huong
elmlang
general
Well, it seems to me that Kite can be useful to you
2019-02-20T03:22:06.836700
Reuben
elmlang
general
I plan to add the feature “Importing/Exporting .DOT files”: <https://en.wikipedia.org/wiki/DOT_(graph_description_language)>
2019-02-20T03:26:24.836900
Reuben
elmlang
general
Will it be enough for your purposes?
2019-02-20T03:26:50.837200
Reuben
elmlang
general
Your compiler can export graphs in DOT format. Then, Kite can import them and visualize.
2019-02-20T03:28:59.837400
Reuben
elmlang
general
If Alex Korban is here: thank you so much for your blog post on combining tasks, huge eye opener for me. Very clear explanation, just concise enough so it stays understandable, but not to much so it becomes to hard to reuse. Perfect job :100:
2019-02-20T03:35:27.840500
Krista
elmlang
general
I’m getting this error when trying to install packages in Elm 0.18. It’s been like this for the last few hours. ``` Error: The following HTTP request failed. &lt;http://package.elm-lang.org/all-packages?elm-package-version=0.18&gt; FailedConnectionException2 "<http://package.elm-lang.org|package.elm-lang.org>" 80 False connect: does not exist (Host is down) ``` Any ideas? Are there any workarounds? Strangely when I put that url in a web browser, it has no problem downloading some json data.
2019-02-20T03:38:46.842000
Rheba
elmlang
general
It’s looking like it might be a firewall issue.
2019-02-20T03:40:44.842400
Rheba
elmlang
general
That was it! I was using Little Snitch, which was blocking it for some reason. I have no idea why it _suddenly_ started blocking the server, but I have a fix, yay!
2019-02-20T03:42:17.843300
Rheba
elmlang
general
<@Sari> ping.
2019-02-20T03:44:09.843400
Timika
elmlang
general
hi guys, I'm trying to compile the `elm/compiler` version that's on master
2019-02-20T06:45:49.844500
Sherill
elmlang
general
and i'm running into this issue: ``` Notice: installing into a sandbox located at /elm/.cabal-sandbox Configuring elm-0.19.0... Building elm-0.19.0... Failed to install elm-0.19.0 Build log ( /elm/.cabal-sandbox/logs/ghc-8.2.2/elm-0.19.0-5MMS6LtL8sV8JLlYZKbYv2.log ): cabal: Entering directory '.' Configuring elm-0.19.0... Preprocessing executable 'elm' for elm-0.19.0.. cabal: can't find source for Elm/Project in compiler/src, builder/src, terminal/src, dist/dist-sandbox-3e8f4b96/build/elm/autogen, dist/dist-sandbox-3e8f4b96/build/global-autogen cabal: Leaving directory '.' cabal: Error: some packages failed to install: elm-0.19.0-5MMS6LtL8sV8JLlYZKbYv2 failed during the building phase. The exception was: ExitFailure 1 ```
2019-02-20T06:46:28.845100
Sherill
elmlang
general
i'm using GHC 8.2.2 and cabal 2.2.0.0
2019-02-20T06:47:00.845600
Sherill
elmlang
general
unfortunately it seems I can't run build the project at all using stack, since I'm not able to generate a valid `stack.yml`
2019-02-20T06:47:26.846200
Sherill
elmlang
general
Talk on a similar-to-Elm approach to making cross platform mobile apps: <https://youtu.be/DTzfe98pFvs?list=WL&amp;t=1160> (first 18 minutes or so introduces Elm Architecture so can be skipped!)
2019-02-20T07:00:58.847300
Leigha
elmlang
general
<@Sherill> `stack init` works pretty well here.
2019-02-20T07:12:57.847800
Niesha
elmlang
general
That sounds ideal, thanks very much! (One of the main aims of this editor is to use the DOT format, as opposed to the internal gp2 graph format, to aid portability)
2019-02-20T07:20:28.847900
Vashti
elmlang
general
Do you think I'd be able to do it in the other direction? (User edits graphs in kite, and I pass these to the compiler as gp2 rule graphs)
2019-02-20T07:21:13.848100
Vashti
elmlang
general
How is a function named that has this signature? `List (M a) -&gt; M (List a)` :thinking_face:
2019-02-20T08:09:57.000900
Kizzie
elmlang
general
`sequence`, or maybe `combine`
2019-02-20T08:14:27.001300
Jin
elmlang
general
thanks, i think sequence fits here :slightly_smiling_face:
2019-02-20T08:16:59.001400
Kizzie
elmlang
general
You could also call it `switch`, if you're feeling adventurous in your naming. For switching types, as in `f (g a) -&gt; g (f a)`.
2019-02-20T08:17:46.001600
Niesha
elmlang
general
Hey there - I am running into this issue even though it should be fixed.. :confused:
2019-02-20T08:23:22.002300
Teri
elmlang
general
<https://github.com/elm/compiler/issues/1711>
2019-02-20T08:23:23.002500
Teri
elmlang
general
Means the init port command is fired before I can subscribe to it.
2019-02-20T08:23:38.003100
Teri
elmlang
general
Anyone else dealt with this before? Am I doing something wrong? Subscribe is defo called after init...
2019-02-20T08:24:26.004600
Teri
elmlang
general
What’s everyone using as a backend to handle URL correctly in Elm SPAs that use client-side routing?
2019-02-20T08:24:28.004700
Inger
elmlang
general
I'm hosting on <http://netlify.com|netlify.com>
2019-02-20T08:24:45.004800
Teri
elmlang
general
It's dead simple, free, fast and so on
2019-02-20T08:24:54.005000
Teri
elmlang
general
You can just put ```/* /index.html 200 ``` in a redirects file and you're good
2019-02-20T08:25:22.005200
Teri
elmlang
general
Redirecting stuff to an api is also a one-liner.
2019-02-20T08:27:05.005500
Teri
elmlang
general
For local development I use create-elm-app
2019-02-20T08:27:18.005700
Teri
elmlang
general
Nice. Is this what you mention -&gt; <https://www.netlify.com/docs/redirects/#rewrites-and-proxying> ?
2019-02-20T08:28:19.005900
Inger
elmlang
general
yeah
2019-02-20T08:31:13.006200
Teri
elmlang
general
Yes, I have very similar setup using create-elm-app but I have a custom backend. I have it setup to serve `index.html` as a fallback but it doesn’t know which url to 404, or 300 and my only choice is to 200 all incoming URLs, serve `index.html` and handle those at Elm side of things. So was wondering if there’s a more elegant solution w/r to that situation
2019-02-20T08:31:15.006400
Inger
elmlang
general
If your custom backend does API stuff you can leave it where it is and proxy to it
2019-02-20T08:31:46.006700
Teri
elmlang
general
leave the hosting to netlify..
2019-02-20T08:31:52.006900
Teri
elmlang
general
Cool I’ll try it out. Seems even netlify recommends the same approach :joy: `/* /index.html 200`
2019-02-20T08:32:50.007100
Inger
elmlang
general
Yeah that's where I got it from.
2019-02-20T08:49:02.000600
Teri
elmlang
general
i didn't quite understand what version of haskell I'm supposed to use
2019-02-20T09:39:56.001200
Sherill
elmlang
general
btw, 8.2.2 with cabal seems to be working fine
2019-02-20T09:40:10.001400
Sherill
elmlang
general
Then do that. `stack init` finds you the correct version.
2019-02-20T09:46:01.001600
Niesha
elmlang
general
when will all the speakers be announced for <https://www.elminthespring.org/>
2019-02-20T10:29:05.002200
Michelle
elmlang
general
Speakers are confirmed on the 22nd, so probably not long after that
2019-02-20T10:48:52.003200
Danika
elmlang
general
&gt; 2/22/19 - Speakers notified (by this date) &gt; 2/28/19 - Speakers announced (by this date)
2019-02-20T11:17:47.003400
Danika
elmlang
general
I re-posted in <#C0MU81TEC|conferences> for visibility :wink:
2019-02-20T11:32:59.003500
Gale