workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
Thank you two!!
2019-03-15T07:29:40.244700
Jarod
elmlang
general
Hello everyone, have a question regarding full dev stack. How do you do "Web design" to Elm? Programmers are coding interface after web designers provided raw HTML? Thank you
2019-03-15T11:07:08.246700
Fay
elmlang
general
<@Fay> I've never worked with a "web designer" that does HTML, but I would argue they can very well learn the Elm syntax for HTML too!
2019-03-15T11:29:26.248600
Bert
elmlang
general
yeah if they know html and css, they can at least learn to write "static" Elm there's also this tool that converts HTML to Elm <https://mbylstra.github.io/html-to-elm/>
2019-03-15T11:36:07.250400
Nana
elmlang
general
Actually, at my previous place our UX expert was able to implement her ideas in Elm&amp;CSS :slightly_smiling_face:
2019-03-15T11:41:23.251300
Lynne
elmlang
general
Hmm thank you
2019-03-15T11:44:20.251700
Fay
elmlang
general
hello, how do i implement parallax in elm ?
2019-03-15T15:30:18.252700
Leopoldo
elmlang
general
<@Leopoldo> What do you mean by parallax? Objects in distance moving slower than objects in front?
2019-03-15T17:12:16.253900
Florencia
elmlang
general
Oh - I was thinking about it in gamedev terms, but you're probably talking about something like scrolling on websites :sweat_smile: that's more likely
2019-03-15T17:12:46.254500
Florencia
elmlang
general
You project a line from the users approximate eye location through the screen to your object! Truncate that line at the screen surface. Or, render with webgl?
2019-03-15T17:30:38.255600
Lindsey
elmlang
general
<@Leopoldo> You should be able to easily port this to elm <https://link.medium.com/VkVJECzs5U>
2019-03-15T17:33:24.256300
Kris
elmlang
general
Although fairly basic, it should work
2019-03-15T17:33:42.256700
Kris
elmlang
general
you can even do it with pure CSS! <https://alligator.io/css/pure-css-parallax/>
2019-03-15T17:43:52.256800
Nana
elmlang
general
has anyone implemented a scripting language in elm? I think that would be neat.
2019-03-15T17:49:01.257400
Lindsey
elmlang
general
What do you mean? Like a bash dsl?
2019-03-15T17:49:36.257800
Kris
elmlang
general
Like in games where there's a simple script to run the AI in npcs, or to implement a turtle drawing language
2019-03-15T17:52:37.259000
Lindsey
elmlang
general
ok, thanks,
2019-03-15T18:08:16.259700
Leopoldo
elmlang
general
I will be soon
2019-03-15T18:26:19.260300
Danika
elmlang
general
Is there something else aside of `Float` I can use to calculate with?
2019-03-16T04:07:17.261800
Salvador
elmlang
general
I need to round a number to 2 decimal digits. so I do ``` number = 561.295 round (number *100) |&gt; modBy 100 ``` this should give me `30`, but I get `29`… because `number*100 /= 56129.5`, but `561129.4999999999`.
2019-03-16T04:10:30.264100
Salvador
elmlang
general
Sounds like <https://package.elm-lang.org/packages/myrho/elm-round/latest/> could do the job.
2019-03-16T04:38:05.264700
Jin
elmlang
general
There's a decimal package you could use: <https://package.elm-lang.org/packages/prikhi/decimal/latest/Decimal#round>
2019-03-16T06:44:08.264900
Earnest
elmlang
general
elm-round is very nice. It rounds using strings I believe, so it doesn’t have those issues
2019-03-16T07:00:51.266200
Bebe
elmlang
general
It would be very useful to have something Iike the JS Number.prototype.toFixed in Basics at some point. I end up installing elm-round in most elm apps
2019-03-16T07:02:47.268400
Bebe
elmlang
general
are the debug tools gone from elm reactor?
2019-03-16T07:48:00.268700
Marlys
elmlang
general
there is currently a bug when `--debug` is enabled that crashes the compiler
2019-03-16T07:48:29.269100
Virgie
elmlang
general
so I think it might be discouraged/hard to find info about it.
2019-03-16T07:49:07.269500
Virgie
elmlang
general
there was this small window where I could introspect all previous executed actions
2019-03-16T07:49:14.269800
Marlys
elmlang
general
yes, use `elm make --debug src/Main.elm` (or similar) to get that. but for many applications this will crash the compiler
2019-03-16T07:50:01.270300
Virgie
elmlang
general
I mean with the "elm reactor"
2019-03-16T07:51:12.271200
Marlys
elmlang
general
not sure, if you really wanted to you could do something like `elm make --debug src/Main.elm --output=index.html`, then open `index.html` with `elm reactor`
2019-03-16T07:55:02.272000
Virgie
elmlang
general
Thank you, I'll try it out
2019-03-16T07:55:44.272500
Marlys
elmlang
general
<@Marlys> you could use a build manager like parcel or, if you don’t have any external dependencies, you could use `elm-live` (for example `elm-live src/Main.elm -- --debug`)
2019-03-16T09:15:39.273700
Maida
elmlang
general
I was wondering - is it possible to use elm with a different renderer, outside of the Browser? I'm thinking of using it to bind to GTK (via yue for example) or something like that
2019-03-16T12:00:28.275200
Elden
elmlang
general
Not officially supported, yes-ish in theory
2019-03-16T12:13:51.275600
Kris
elmlang
general
But it means that you'd've to reimplement a lot of things like virtual dom and else, I believe
2019-03-16T12:14:53.276700
Kris
elmlang
general
are there any other renderers than the Browser available?
2019-03-16T12:26:20.277200
Elden
elmlang
general
Do I need to decode the Event object (<https://developer.mozilla.org/en-US/docs/Web/API/Event>) when subscribing to Browser.Events?
2019-03-16T15:05:35.278900
Marlys
elmlang
general
Folks who develop with webpack, do you have hot module replacement set up and working accross all your elm files? I'm for some reason unable to get any file except `Main.elm` to reload / recompile while developing
2019-03-16T16:56:13.280600
Al
elmlang
general
Yes, if you are writing your own event handler
2019-03-16T17:04:05.280700
Lynne
elmlang
general
Works for me in any file
2019-03-16T17:04:28.280900
Lynne
elmlang
general
I had some problems using webpack HMR plugin. Try using parcel js instead. HMR works there out of the box.
2019-03-16T17:07:54.281100
Arlinda
elmlang
general
I'm using elm-live and it works flawlessly so far
2019-03-16T17:21:05.281300
Marlys
elmlang
general
using create-elm-app on a 10k line app and no issues. You can copy the config from their repo
2019-03-16T17:49:47.281600
Teri
elmlang
general
So in the Browser.Events doc there is this note: "Unsubscribe if you do not need these events!". Is there a specific way to unsubscribe or is it enough if my Msg changes and I'm not accessing the branch where the event listener is?
2019-03-16T18:14:25.283000
Marlys
elmlang
general
Unsubscribe means "no longer return the subscription from your `subscriptions` function"
2019-03-16T18:17:00.283100
Huong
elmlang
general
That way, the related event listener is actually removed from the document, completely :slightly_smiling_face:
2019-03-16T18:17:28.283300
Huong
elmlang
general
remember that `subscriptions : Model -&gt; Sub Msg`, so you can decide - based on the state of your application - whether you should be subscribing to some event
2019-03-16T18:18:04.283500
Huong
elmlang
general
(the subscriptions are always checked right after your `update` runs)
2019-03-16T18:18:23.283700
Huong
elmlang
general
I see. Thanks!
2019-03-16T18:22:54.283900
Marlys
elmlang
general
There are not, and I think for good reason. Elm focuses on the Browser as a platform and that has led the ecosystem to become very well suited to that task over the years.
2019-03-16T20:43:09.284200
Mozella
elmlang
general
This is talked about as part of this talk here <https://www.youtube.com/watch?v=o_4EX4dPppA>
2019-03-16T20:43:35.284400
Mozella
elmlang
general
i love watching elm vids with richard feldman.
2019-03-16T22:50:36.285300
Lupita
elmlang
general
Are unused record fields removed with DCE?
2019-03-17T07:09:57.286100
Frieda
elmlang
general
No
2019-03-17T07:27:28.287100
Huong
elmlang
general
How do you have an 'unused record field'?
2019-03-17T07:55:37.288000
Earlean
elmlang
general
only written to, never read?
2019-03-17T07:58:46.288300
Virgie
elmlang
general
the problem is of course is that assigning will evaluate the thing you assign it to
2019-03-17T07:59:16.288800
Virgie
elmlang
general
But, in release mode where all functions are pure, there is no way to know so in theory I think you could remove record fields that are never read
2019-03-17T08:00:09.289600
Virgie
elmlang
general
but I don't think the benefit is that high; record fields are renamed to be as short as possible anyway, unlikely that removing them completely has a large effect
2019-03-17T08:01:13.290600
Virgie
elmlang
general
is it possible to destructure model properties while retaining the model reference?
2019-03-17T09:21:59.292400
Marlys
elmlang
general
foo model@{prop1, prop2} &lt;- something like that?
2019-03-17T09:22:21.293000
Marlys
elmlang
general
``` let ({prop1, prop2} as foo) = computeIt ... ```
2019-03-17T09:24:28.293700
Dede
elmlang
general
cool thanks
2019-03-17T09:24:43.294200
Marlys
elmlang
general
And if your record is contained in a custom type with a single constructor you can also restructure that directly. ``` let ((Bar {prop1, prop2} as foo) as bar) = computeIt ... ```
2019-03-17T09:27:28.297200
Jin
elmlang
general
even cooler, awesome!
2019-03-17T09:28:38.297500
Marlys
elmlang
general
this is what I have in init ``` WebSocket.makeOpen (Debug.log "url" &lt;| SocketHelpers.mkSocketUrl host) |&gt; Debug.log "makeOpen" |&gt; WebSocket.send PortFunnels.cmdPort ```
2019-03-17T14:04:19.297800
Lynn
elmlang
general
which leads to
2019-03-17T14:05:09.298000
Lynn
elmlang
general
None
2019-03-17T14:05:13.298200
Lynn
elmlang
general
Ok, so I think i can see some progress now
2019-03-17T14:23:16.298600
Lynn
elmlang
general
How do I report abuse for a user on the Elm slack group?
2019-03-17T15:20:27.299600
Nancey
elmlang
general
<@Nancey> try at <#C3FKL0A8H|admin-help>
2019-03-17T15:22:56.300200
Kris
elmlang
general
Thanks!
2019-03-17T15:23:17.300500
Nancey
elmlang
general
How can I remove an element from the DOM? ``` case ( dragState, dragItem ) of ( Moving, Just item ) -&gt; rectangle item.width item.height x y ( _, _ ) -&gt; div [] [] ``` I want a new rectangle each time I hit the first catch block and dispose it otherwise. Right now, I'm getting a copy of the last rectangle when re-entering ( Moving, Just item ) but instead I want a new rectangle.
2019-03-17T16:43:23.303300
Marlys
elmlang
general
You just don’t return it from your function
2019-03-17T16:44:42.303800
Kris
elmlang
general
Elm takes care of rerendering stuff automatically
2019-03-17T16:44:55.304300
Kris
elmlang
general
Hey ya'll, does anyone know how to set up vscode-elm to work with a WSL installation of elm? Is it even possible or should I just install elm in windows? The only reason I started using windows as a development environment is WSL, so I'd rather not go down that path
2019-03-17T16:54:59.304600
Annamarie
elmlang
general
<@Kris> I don't understand
2019-03-17T16:56:49.305000
Marlys
elmlang
general
I'm setting the dragItem to Nothing in between Msgs and create a new one. My intuition was that a new element will be added to the DOM.
2019-03-17T16:59:20.306400
Marlys
elmlang
general
Where does this `rectangle` come from?
2019-03-17T17:04:00.307600
Kris
elmlang
general
it's a function that returns a div
2019-03-17T17:04:23.308300
Marlys
elmlang
general
To clarify, just *calling* a function that returns some `Html msg` won't place that in the dom, you have to put that somewhere in your view
2019-03-17T17:04:40.308700
Kris
elmlang
general
If that's not what you're asking, perhaps you can setup an ellie example so I can understand better
2019-03-17T17:05:49.310400
Kris
elmlang
general
yes I'll do that
2019-03-17T17:05:59.310600
Marlys
elmlang
general
Who do i talk to to discuss pull requests for the elm package manager?
2019-03-17T17:14:35.311500
Isaias
elmlang
general
<@Isaias> Probably <#C13L7S5GR|elm-dev> or <#C2QPJLU2X|elm-discuss>
2019-03-17T17:16:54.312000
Kris
elmlang
general
Bump: anybody know how to configure vscode-elm to work with WSL?
2019-03-17T20:00:21.312600
Annamarie
elmlang
general
I’m working on two different Elm projects in parallel. And after one project is compiled the second one could not be compiled. It always gives following error. ``` -- error: CORRUPT BINARY - /Users/akoppela/.elm/0.19.0/package/ContaSystemer/elm-menu/1.0.0/objs.dat:1 The binary data at /Users/akoppela/.elm/0.19.0/package/ContaSystemer/elm-menu/1.0.0/objs.dat is corrupt. Elm caches build artifacts in the following directories: /Users/akoppela/.elm elm-stuff/ Maybe you recently installed a command line tool or editor plugin that messes with them? They definitely should not be doing that, but you never know! So maybe try deleting them? Everything will be rebuilt from scratch. This may help reveal the corrupting influence. ```
2019-03-17T23:13:37.313900
Frieda
elmlang
general
So I have to clean Elm stuff every time I switch projects. If anyone experience the same thing?
2019-03-17T23:14:08.314600
Frieda
elmlang
general
It happens to me each time I switch between running Elm in Webpack or the CLI
2019-03-18T00:20:30.315200
Carrol
elmlang
general
Are there any resources for teaching Elm as first language? Or anyone who has some real-world experience teaching Elm as first language?
2019-03-18T04:16:34.316100
Monte
elmlang
general
<@Dorsey> did <http://software.garden> just recently. There is also <http://outreach.mcmaster.ca>. They used the old Graphics package do teach programming to kids, then switched to a cutom package using SVG. You might find some information in here <https://package.elm-lang.org/packages/MacCASOutreach/graphicsvg/latest/>
2019-03-18T04:24:12.316800
Jin
elmlang
general
Thanks, awesome! =D
2019-03-18T04:24:56.317100
Monte
elmlang
general
Yup, you can talk to us (me and <@Ayesha>). We just did first run a week ago. It went better than expected :smile:
2019-03-18T04:26:40.319400
Dorsey
elmlang
general
<@Jin> thanks for mentioning us :heart:
2019-03-18T04:27:27.320200
Dorsey
elmlang
general
(I knew you were not alone, but I forgot <@Ayesha>’s name.)
2019-03-18T04:27:27.320400
Jin
elmlang
general
I don't think my friend can invest 500 EUR, but I'm reading all the posted info :smiley:
2019-03-18T04:27:46.320900
Monte
elmlang
general
Also <@Virgie> and <@Danilo> helped us.
2019-03-18T04:28:30.321900
Dorsey
elmlang
general
You are welcome to the materials. We also offer one on one couching. You can DM us about it.
2019-03-18T04:29:52.323600
Dorsey
elmlang
general
Cool thanks!
2019-03-18T04:30:56.323800
Monte