workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
I do not see Time Travel Debugger. Is there any way to activate that?
2019-04-18T11:13:00.401600
Phoebe
elmlang
general
~It's not available in 0.19~ (edited: see discussion below around 1:18pm)
2019-04-18T11:13:21.401800
Dede
elmlang
general
:open_mouth: is it going to appear anytime soon?
2019-04-18T11:13:52.402200
Phoebe
elmlang
general
AFAIK there's no timeline for.. well, anything, in core Elm. It will happen when it happens. Welcome to life with a 0.x environment :slightly_smiling_face:
2019-04-18T11:17:37.402900
Dede
elmlang
general
It's worth noting that building with -debug is generally risky/broken right now. If you see a `map!` haskell error, remove the debug flag and try again. (You can still use `Debug.log` and friends, though.)
2019-04-18T11:24:06.403700
Dede
elmlang
general
Is anyone using the Web Crypto API? I’m not satisfied with the available crypto libraries in elm, especially since they support hardly any algorithms, and not the ones I need.
2019-04-18T11:26:13.405900
Isaiah
elmlang
general
Writing crypto libraries in elm is also painfully difficult because of a lack of binary datatypes, unsigned int8, and no ability to mutate if necessary (like for hashing thousands of iterations)
2019-04-18T11:28:23.408500
Isaiah
elmlang
general
Thanks for the tip. What tool sdo you use to profile that ?
2019-04-18T11:55:42.409300
Caron
elmlang
general
<@Phoebe> the current debugger is a time traveling debugger. You can navigate back in time by clicking the messages. There are some issues with the current version but I’m hoping that `0.19.1` will fix them.
2019-04-18T13:18:01.411400
Maida
elmlang
general
also, keepi in mind that the original time traveling debugger was from a moment in time when Elm did not have http calls. Any kind of side-effects (http calls) do not play well with the debugger BUT it works wonderful for regular updates caused by user interaction.
2019-04-18T13:20:28.413500
Maida
elmlang
general
Wait, does the current debugger actually restore state when you click the old messages? I apologize for my wrong answer.
2019-04-18T13:20:58.414100
Dede
elmlang
general
yes
2019-04-18T13:29:20.414500
Isaiah
elmlang
general
Is there any documentation available for elm reactor?
2019-04-18T14:26:16.414900
Monte
elmlang
general
I need a custom index.html and can't find how to make it work with 0.19
2019-04-18T14:27:31.415500
Monte
elmlang
general
Elm reactor just serves straight from elm files. If you need a custom index.html you may be able to view it as a file but more likely need a web server.
2019-04-18T14:28:20.416700
Dede
elmlang
general
`npm install -g http-server` can get you a long way.
2019-04-18T14:29:00.417800
Dede
elmlang
general
There used to be a way to serve custom html, <https://blog.ilias.xyz/elm-reactor-and-custom-html-9e7143553807> Has that feature been removed?
2019-04-18T14:29:13.418200
Monte
elmlang
general
Parcel or elm-live is probably easier though :smile:
2019-04-18T14:29:39.419100
Nana
elmlang
general
Right, I had forgotten about elm-live
2019-04-18T14:29:54.419300
Monte
elmlang
general
`http-server` just runs at the command line in the directory you want to serve. I think it’s pretty easy.
2019-04-18T14:30:46.420700
Dede
elmlang
general
<@Dede> it's not what I need.
2019-04-18T14:31:50.421000
Monte
elmlang
general
what is the difference between `&gt;&gt;` and `|&gt;`? Are these two snippets the same? ``` Task.map Success &gt;&gt; Task.onError (Failure &gt;&gt; Task.succeed) Task.map Success |&gt; Task.onError (Task.succeed Failure) ```
2019-04-18T14:39:09.421900
Vilma
elmlang
general
<@Vilma> no, they are different
2019-04-18T14:39:47.422400
Monte
elmlang
general
`|&gt;` takes a value and sends it to a function
2019-04-18T14:40:07.422800
Monte
elmlang
general
`&gt;&gt;` composes two functions together
2019-04-18T14:40:14.423200
Monte
elmlang
general
`"A B C" |&gt; String.split " " |&gt; List.map (\letter -&gt; letter ++ letter)`
2019-04-18T14:41:04.424100
Monte
elmlang
general
`"A B C" |&gt; (String.split " " &gt;&gt; List.map (\letter -&gt; letter ++ letter))`
2019-04-18T14:41:48.424500
Monte
elmlang
general
both do the same thing, but the first passes a value first to a function (`String.split " "`), then passes the result to `List.map ...`
2019-04-18T14:42:51.425500
Monte
elmlang
general
The second instead, passes the value to the function resulting from the composition of `String.split " "` and `List.map (\letter -&gt; letter ++ letter)`
2019-04-18T14:43:48.426400
Monte
elmlang
general
In practice `&gt;&gt;` is not used as often as `|&gt;`
2019-04-18T14:44:28.427100
Monte
elmlang
general
I think I understand
2019-04-18T14:44:46.427300
Vilma
elmlang
general
`|&gt;` takes a value and a function, and produces a value `&gt;&gt;` takes two functions and produces a function
2019-04-18T14:45:12.428300
Monte
elmlang
general
`|&gt;` makes it sequential, while `&gt;&gt;` is like the mathematics (calculus, I think) of doing `g(f(x))` and then allowing us to pass a parameter to this function which is the combination of `f(x)` and `g(x)`
2019-04-18T14:45:43.428900
Vilma
elmlang
general
`a |&gt; f` is literally `f a`
2019-04-18T14:58:13.429300
Kris
elmlang
general
and `g &lt;&lt; f = \x -&gt; g (f x)`
2019-04-18T14:58:25.429600
Kris
elmlang
general
`elm: Map.!: given key is not an element in the map` anyone got a tip?
2019-04-18T16:18:48.430400
Margo
elmlang
general
known compiler bug
2019-04-18T16:19:12.430600
Kris
elmlang
general
I think you have to remove your elm-stuff dir/not compile with --debug
2019-04-18T16:19:30.431100
Kris
elmlang
general
OK, ill try. Thanks
2019-04-18T16:21:23.431400
Margo
elmlang
general
Im using Parcel and just deleted elm-suff and ran parcel build (not sure what parcel does...). That did not help
2019-04-18T16:33:13.432400
Margo
elmlang
general
Make sure you're running with Parcel 1.10 since it doesn't use the `--debug` flag
2019-04-18T16:35:04.433100
Carman
elmlang
general
OK
2019-04-18T16:35:30.433500
Margo
elmlang
general
BTW Parcel is a build manager. It compiles your Elm, handles assets, environment variables, etc for you. It's like Webpack but with no config needed. It also comes with a live-reload server.
2019-04-18T16:36:27.434400
Carman
elmlang
general
You can think of it as a fancier `elm reactor`
2019-04-18T16:36:48.434800
Carman
elmlang
general
Such things always make me sceptical
2019-04-18T16:39:16.435100
Agustin
elmlang
general
Config is *always* needed
2019-04-18T16:39:22.435300
Agustin
elmlang
general
Usually claims of “no config needed” means the necessary config is hard.
2019-04-18T16:39:53.436000
Agustin
elmlang
general
And they don’t play well with others.
2019-04-18T16:40:00.436200
Agustin
elmlang
general
Webpack for all its evils, is easily configurable, and integrates with multiple backend frameworks.
2019-04-18T16:40:26.436800
Agustin
elmlang
general
<@Carman> is parcel specific for Elm? Or independent?
2019-04-18T16:46:14.437400
Erlene
elmlang
general
independent
2019-04-18T16:47:04.437600
Danika
elmlang
general
<https://parceljs.org/>
2019-04-18T16:52:51.438100
Briana
elmlang
general
It's good!
2019-04-18T16:52:56.438400
Briana
elmlang
general
very good!
2019-04-18T16:56:09.438600
Danika
elmlang
general
Is there any way to do something like `Html.Events.preventDefaultOn` on the window? Such as a subscription? I need to be able to handle form and button navigation with only arrow keys. I have to be able to support a keyboard that doesn’t have a Tab key
2019-04-18T17:00:35.441200
Chae
elmlang
general
<@Chae> `Browser.Events.onKeyPress` ?
2019-04-18T17:07:37.441700
Nana
elmlang
general
though I guess it doesn't prevent default
2019-04-18T17:09:29.442000
Nana
elmlang
general
That `prevent default` is the 1 missing part that I need :confused:
2019-04-18T17:10:20.442800
Chae
elmlang
general
I guess you could just add an event listener in JS
2019-04-18T17:12:01.443300
Nana
elmlang
general
I’m not sure that would work though, as I need to conditionally call `event.preventDefault()` based on elm state
2019-04-18T17:14:56.444700
Chae
elmlang
general
<@Chae> I had this question yesterday and could solve it ;) <https://elmlang.slack.com/archives/C0CJ3SBBM/p1555540089368200?thread_ts=1555540089.368200&amp;cid=C0CJ3SBBM>
2019-04-18T19:13:27.445800
Millie
elmlang
general
AMA if you need further help ;)
2019-04-18T19:17:17.446300
Millie
elmlang
general
I'm doing something similar. There's still the possibility of someone changing the focus outside of the outermost div though, in which case the listener no longer works. For example if the body of the app gets focus, there's no way to regain focus inside the app without a mouse or pressing Tab
2019-04-18T19:21:17.451000
Chae
elmlang
general
I think this is a workaround for missing core functionality. Not too happy with it, but currently the best option I could find.
2019-04-18T19:25:01.452300
Millie
elmlang
general
The gizra docs also mention adding an `id` to potentially set the focus programmatically. So one could set the focus as a fallback, when it's lost. But it won't make the solution simpler.
2019-04-18T19:31:24.456700
Millie
elmlang
general
Hi, just added `prikhi/decimal` to my project to deal with decimal (obvsly) but now (the first time it compiled with one module using `Decimal`) I get this error `elm: Map.!: given key is not an element in the map`. I tried googling it which suggested to delete `elm-stuff`. I tried it, does not work...
2019-04-19T05:10:36.458700
Hiedi
elmlang
general
It happens a lot when you compile with `--debug`, try without it?
2019-04-19T05:12:43.459500
Sharon
elmlang
general
<@Hiedi> I might be able to fix that. Can you try the following for me? 1. Open up `~/.elm/0.19.0/package/prikhi/decimal/2.0.0/src/Decimal.elm` 2. Remove the `type alias Mantissa = BigInt` line 3. Replace the `Mantissa` in the type definition for `Decimal` with `BigInt` 4. Remove your project's `elm-stuff` folder 5. Try recompiling w/ the `--debug` flag
2019-04-19T05:17:30.461200
Earnest
elmlang
general
If that works I can update the library and push out a new release for you
2019-04-19T05:18:29.461600
Earnest
elmlang
general
Not sure if directly editing files in `~/.elm` will work or not though...
2019-04-19T05:19:15.462000
Earnest
elmlang
general
Okay I'm trying
2019-04-19T05:21:56.462300
Hiedi
elmlang
general
First it works without the --debug flag
2019-04-19T05:22:32.462800
Hiedi
elmlang
general
<@Earnest> Your change does not enable to build with the debug flag
2019-04-19T05:25:00.463500
Hiedi
elmlang
general
But it works without
2019-04-19T05:25:39.463800
Hiedi
elmlang
general
Hmm, ok thanks for checking. I thought that bug was cause by unexported type aliases or something like that :thinking_face:
2019-04-19T05:32:22.464400
Earnest
elmlang
general
I guess I just gonna have to wait for 0.19.1 since it seems like a fix is on its way
2019-04-19T05:39:06.465000
Hiedi
elmlang
general
you need to remove more
2019-04-19T05:53:14.465200
Virgie
elmlang
general
in `~/.elm/0.19.0/package/prikhi/decimal/2.0.0/` there are also some .dat files which you need to remove to get it to actually recompile
2019-04-19T05:53:43.465800
Virgie
elmlang
general
<@Virgie> Ok thx, I will try it but I can actually wait for the problem to be fixed since it seems it's really close and since decimal is a small part of my app I can do later
2019-04-19T05:56:04.466900
Hiedi
elmlang
general
hi, wanted to start learning elm and took a look at the guide yesterday. can't seem to access it right now though, was there some planned maint. or something?
2019-04-19T09:09:00.468300
Rubye
elmlang
general
<https://guide.elm-lang.org/>
2019-04-19T09:09:02.468500
Rubye
elmlang
general
maybe just my computer acting up, but wanted to check in
2019-04-19T09:09:19.468900
Rubye
elmlang
general
I can't reach it either so I guess the site is down
2019-04-19T09:10:39.469300
Jae
elmlang
general
<https://guide.elm-lang.org/> is down does anyone know if its content can be reached from elsewhere ?
2019-04-19T09:47:58.470200
Bart
elmlang
general
<http://web.archive.org/web/20190417024338/https://guide.elm-lang.org/>
2019-04-19T09:50:30.470400
Danika
elmlang
general
<https://github.com/evancz/guide.elm-lang.org>
2019-04-19T09:51:25.470600
Sharon
elmlang
general
great ! thanks a lot !
2019-04-19T09:52:48.470900
Bart
elmlang
general
Maybe it create a ticket in the GitHub repository issue tracker?
2019-04-19T10:33:55.472000
Millie
elmlang
general
It looks like gitbook is having some issues
2019-04-19T11:00:13.472300
Huong
elmlang
general
Looks up now, at least here.
2019-04-19T11:41:09.472800
Hoa
elmlang
general
is there a way to combine an HTTP request and some other message in such a way that first the message is sent and then the HTTP request performed? Something like this: ``` Msg = GoingToPerformARequest send GoingToPerformARequest |&gt; andThen myCustomHttpRequest ```
2019-04-19T11:47:51.474500
Vilma
elmlang
general
I think I did something like this once
2019-04-19T11:48:37.474700
Vilma
elmlang
general
I see that there’s a Json.Decode.maybe. Is there something like that but gives a result instead (Decoder a -&gt; Decoder (Result Error a))? I have a list of items I’m decoding. I don’t want to break if some of the items fail, but it would be great to see a list of errors on the items that did fail to decode.
2019-04-19T11:58:23.477700
Jerilyn
elmlang
general
would a `Decoder (List a) -&gt; List (Result Error a)` also work? that is much easier
2019-04-19T12:06:01.478400
Virgie
elmlang
general
how you would do that is have a 2-phase decoder, decode first with a `Decoder (List Value)`, then use `decodeValue` on the items of the list
2019-04-19T12:08:29.479400
Virgie
elmlang
general
<@Virgie> would you know anything about the question I posted above? :point_up: :pray:
2019-04-19T12:09:45.480000
Vilma
elmlang
general
it seems that before the `2.0.0` version of the `elm/http` package this was achieved with `toTask`, but this function no longer exists?
2019-04-19T12:10:05.480500
Vilma
elmlang
general
there is still <https://package.elm-lang.org/packages/elm/http/latest/Http#task>
2019-04-19T12:11:41.480700
Virgie
elmlang
general
yes, I saw that but it’s way more complicated and asking for quite a bit of parameters
2019-04-19T12:12:11.481100
Vilma
elmlang
general
previously toTask was used in a pipeline, this new function is just one function that does everything without need for pipelines
2019-04-19T12:14:34.482100
Virgie