workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | makes sense, is it only a viable option for small - mid apps? | 2019-03-23T08:16:15.600900 | Corine |
elmlang | general | or not at all? | 2019-03-23T08:16:32.601200 | Corine |
elmlang | general | <@Lynne> Doesn't seem to work. I created the project with `create-elm-app` and opened it in Atom, so I assume the working directory is the elm.json directory? Can I set it manually somehow? | 2019-03-23T08:17:41.601900 | Janna |
elmlang | general | I'd recommend Purescript if you want the haskell type/typeclass features in the browser | 2019-03-23T08:19:15.602600 | Virgie |
elmlang | general | i see, ok thanks for the inights! | 2019-03-23T08:20:04.602900 | Corine |
elmlang | general | Agree about purescript, ghcjs is an ugly monster sadly | 2019-03-23T11:14:04.603900 | Kris |
elmlang | general | <https://reasonablypolymorphic.com/blog/elm-is-wrong> | 2019-03-23T17:58:34.605500 | Niesha |
elmlang | general | I think I’m losing my mind. Would someone want to explain to me why the following Ellie will not compile?
If I’m using an extensible record, and I have a function that takes `Extensible a`, surely an `Extensible Something` would work, no?
<https://ellie-app.com/54NfSGxYCWpa1> | 2019-03-24T06:43:27.606800 | Moriah |
elmlang | general | <@Moriah> what if I pass it a function `Extensible { foo : Int } -> Extensible { foo : Int }` that updates the `foo` field? | 2019-03-24T06:48:09.607800 | Huong |
elmlang | general | Which is entirely valid according to your type signature, but of course wouldn't work since your records don't have a `foo : Int` field | 2019-03-24T06:49:23.609000 | Huong |
elmlang | general | My recommendation would be not to use extensible records for this, and group the common things in a regular record | 2019-03-24T06:53:26.610700 | Huong |
elmlang | general | Yes, that’s true. So is it even possible to create a function that takes a function that only operates on the `Extensible` part of `Extensible a`? | 2019-03-24T06:55:10.611900 | Moriah |
elmlang | general | I will follow that recommendation, I’m just trying to understand where my thinking went wrong. | 2019-03-24T06:55:51.612900 | Moriah |
elmlang | general | Not in Elm, but it _can_ be done in languages where you can be more specific with regards to quantification, e.g. purescript | 2019-03-24T06:57:53.614500 | Huong |
elmlang | general | Ok. Thank you <@Huong>, you saved me a lot of time. | 2019-03-24T06:59:22.615300 | Moriah |
elmlang | general | so what you're trying to is something like this:
You have a function like so:
```
updateCount : Extensible a -> Extensible a
updateCount r = { r | count = r.count + 1 }
```
With explicit quantification, that could be written as
```
updateCount : ∀ a. Extensible a -> Extensible a
updateCount r = { r | count = r.count + 1 }
``` meaning that which function works regardless of what `a` is: it is valid for all values of `a`
What you're trying to write now is a way of embedding that signature in another signature, which means it _should_ look like this:
`(∀ a. Extensible a -> Extensible a) -> State -> State`
But Elm doesn't let you do that, and instead you end up with `∀ a. (Extensible a -> Extensible a) -> State -> State` which doesn't mean the same thing :slightly_smiling_face: | 2019-03-24T07:03:33.615400 | Huong |
elmlang | general | Is `∀` like `forall` in Haskell? | 2019-03-24T07:09:48.615700 | Moriah |
elmlang | general | yes, it's exactly that | 2019-03-24T07:11:49.615900 | Huong |
elmlang | general | <https://gist.github.com/zwilias/f9f5f8fa7c6b2dbcadcc537c982035cd> so this would be a valid purescript implementation of your idea :slightly_smiling_face: | 2019-03-24T07:12:29.616100 | Huong |
elmlang | general | <http://try.purescript.org/?gist=f9f5f8fa7c6b2dbcadcc537c982035cd> | 2019-03-24T07:15:13.616300 | Huong |
elmlang | general | (you can see what happens when you move the `forall a.` out to where it would end up in Elm) | 2019-03-24T07:16:01.616500 | Huong |
elmlang | general | With a Keyed.node are the children's ids only stored in the virtual Dom and not actually present in the actual Dom? | 2019-03-24T09:07:33.618000 | Vallie |
elmlang | general | Yeah, they're not `id` attributes, they're just internal identifiers used by the virtual-dom | 2019-03-24T09:12:16.618800 | Huong |
elmlang | general | Ok, then can you have a look at the issue raised on billstclair/elm-sortable-table (the elm 0.19 version of Evan's) which has a problem with the sorting. It appears to be flipping out the virtual Dom patching code and seems to be thoroughly reproducible. It is very worrying to my mind. Sorting by the Name column works fine. Then sorting by Price is OK too. But then trying to sort by Rating causes errors and bad output. Alternatively sorting by Name, then Rating, then Price gives NO ERRORS, but displays one row TWICE. I think this needs to raised as an Elm compiler issue, as there does not appear to be any problem with the code in elm-sortable-table (and indeed there shouldn't be a way to write Elm code that causes this problem). I just don't know where else to raise this. | 2019-03-24T09:25:46.623800 | Vallie |
elmlang | general | <@Vallie> what are you using for the node key? | 2019-03-24T09:45:44.624700 | Earlean |
elmlang | general | .name | 2019-03-24T10:01:14.627100 | Vallie |
elmlang | general | It only appears to be a problem when sorting by a column of floats, followed by a different column of floats. | 2019-03-24T10:02:51.628100 | Vallie |
elmlang | general | Oh | 2019-03-24T10:20:58.628500 | Huong |
elmlang | general | The example uses an outdated version of `elm/html`/`elm/virtual-dom` | 2019-03-24T10:21:23.629200 | Huong |
elmlang | general | Bumping the (indirect) dependency on `elm/virtual-dom` to 1.0.2 fixes the example. | 2019-03-24T10:23:02.630500 | Huong |
elmlang | general | <@Vallie> ^ (just making sure you see this :slightly_smiling_face: ) | 2019-03-24T10:24:41.630900 | Huong |
elmlang | general | Well, I never would have thought of that. Thanks for restoring my belief in Elm's infallibility :grinning: I'll update the issue if you haven't already. | 2019-03-24T13:13:03.633200 | Vallie |
elmlang | general | hello, i can't locate the package but how do i make a sticky header on scroll? | 2019-03-24T13:34:51.633700 | Leopoldo |
elmlang | general | If you’re working with HTML, just use CSS: <https://developer.mozilla.org/en-US/docs/Web/CSS/position> | 2019-03-24T14:45:41.634100 | Dede |
elmlang | general | <@Dede> that's static positionning i believe but i have 2 type of menus set. one static one which is embeded in the Hero Div layout, then another sticky ones which should appear when scrolled down | 2019-03-24T14:55:44.636000 | Leopoldo |
elmlang | general | so i need to track the scrolling as i scroll the page down, the sticky one should appear | 2019-03-24T14:56:13.636500 | Leopoldo |
elmlang | general | Look at `position: sticky` and see if it does the job. | 2019-03-24T15:05:18.637200 | Dede |
elmlang | general | how do i run the test conditions? | 2019-03-24T15:10:49.637500 | Leopoldo |
elmlang | general | I don’t understand the question sorry... | 2019-03-24T15:16:00.638000 | Dede |
elmlang | general | Check out the examples on the link I sent? | 2019-03-24T15:16:17.638600 | Dede |
elmlang | general | <@Dede> Let's say. `position : static` _on_scroll_ `position : sticky` | 2019-03-24T16:08:24.641900 | Leopoldo |
elmlang | general | is Basics.Array faster than Basics.List? | 2019-03-24T16:10:17.642200 | Marlys |
elmlang | general | Why not just set `position:sticky`? I don’t understand. | 2019-03-24T16:16:14.642500 | Dede |
elmlang | general | Like, it’s static until you hit the top and then it’s absolute. That’s kind of perfect usually. <https://developer.mozilla.org/en-US/docs/Web/CSS/position#Sticky_positioning> | 2019-03-24T16:17:03.642900 | Dede |
elmlang | general | Depends on what you're using it for. If one was better for everything, we'd only have the one :) | 2019-03-24T16:49:34.643100 | Huong |
elmlang | general | Ah, I see you already got replies in <#C192T0Q1E|beginners>. Try not to cross post, tho. | 2019-03-24T16:51:04.643300 | Huong |
elmlang | general | Ok let me play with it | 2019-03-24T16:53:31.643900 | Leopoldo |
elmlang | general | So signals were dropped from the core a while ago now | 2019-03-24T18:48:25.644400 | Danika |
elmlang | general | Any third-party libraries for FRP in elm? | 2019-03-24T18:48:35.644700 | Danika |
elmlang | general | anyone got any advice on handling credentials? | 2019-03-25T02:34:27.645300 | Euna |
elmlang | general | <@Euna> credentials for what? | 2019-03-25T02:37:11.645600 | Earlean |
elmlang | general | refresh + short lived accesstoken | 2019-03-25T02:43:08.646100 | Euna |
elmlang | general | I'm not sure if I should have main handle it, and pass them in as a session into the view | 2019-03-25T02:43:45.647100 | Euna |
elmlang | general | or have the pages handle it | 2019-03-25T02:43:58.647500 | Euna |
elmlang | general | or whatever sub component | 2019-03-25T02:44:08.647800 | Euna |
elmlang | general | My advice is to use cookies if you can. But if you can't having the current page store the access token is a good model | 2019-03-25T02:45:27.649500 | Earlean |
elmlang | general | nah I'm running full oidc, so cookies are out of the question | 2019-03-25T02:49:00.650300 | Euna |
elmlang | general | its just that when the pages own the session data its kinda ugly how to remake the pages on urlChange | 2019-03-25T02:49:48.650900 | Euna |
elmlang | general | and I don't really want to go the nuclear option yet like rtfeldman's spa app | 2019-03-25T02:50:14.651100 | Euna |
elmlang | general | Is there any way to receive http streams in Elm? (chunked response/http2) Obviously ports is an option but is there an Elm api that would do the job? | 2019-03-25T03:11:25.652100 | Kimbery |
elmlang | general | <@Kimbery> the http packages doesn't provide a streaming interface. You'll need to use a port | 2019-03-25T03:37:30.653700 | Earlean |
elmlang | general | hi, this is what i was referring to yesterday, how do i convert this to elm?
``` //Sticky scroll navbar
if ($('.navbar-wrapper.navbar-fade').length) {
$(".navbar-wrapper.navbar-fade").wrap('<div class="navbar-placeholder"></div>');
$(".navbar-placeholder").height(jQuery(".navbar-wrapper.navbar-fade").outerHeight());
$(window).on('scroll', function() { // this will work when your window scrolled.
var height = $(window).scrollTop(); //getting the scrolling height of window
if(height > 65) {
$(".navbar-wrapper.navbar-fade").removeClass('navbar-fade').addClass('translateDown navbar-sticky');
} else{
$(".navbar-wrapper.navbar-sticky").removeClass('translateDown navbar-sticky').addClass('navbar-fade');
}
});
} ``` | 2019-03-25T03:37:47.654100 | Leopoldo |
elmlang | general | any insight ? | 2019-03-25T04:23:04.654800 | Leopoldo |
elmlang | general | use a preprocessor, what you are describing in this can be done in stylus or sass | 2019-03-25T04:26:57.655600 | Euna |
elmlang | general | how? | 2019-03-25T04:29:24.655800 | Leopoldo |
elmlang | general | the sass version i saw was a lone sticky menu, but here, the menu had to change style on-scroll | 2019-03-25T04:32:24.656700 | Leopoldo |
elmlang | general | That's your job to find a solution. Read documentation, examine StackOverflow or other parts of the Internet for similar cases, think, try, fail, repeat. | 2019-03-25T04:42:44.657000 | Lynne |
elmlang | general | You'll most likely get an answer if you show what you have done and what did not work, why do you think it did not work and what you think you are missing. | 2019-03-25T04:43:43.657200 | Lynne |
elmlang | general | Just asking "how?" implies you just want a solution. That's not what community is for. | 2019-03-25T04:44:51.657400 | Lynne |
elmlang | general | <@Leopoldo> Do you have an online demo to show similar to the behaviour you are after ? | 2019-03-25T05:09:15.658200 | Hoa |
elmlang | general | I guess we are after something like this: <https://css-tricks.com/scroll-fix-content/> - in you case there are some fading but it’s a fx applied via css. So I guess one would use viewport to figure out where the scroll pos actually is. <https://package.elm-lang.org/packages/elm/browser/latest/Browser-Dom#getViewport> | 2019-03-25T05:22:05.658400 | Hoa |
elmlang | general | <@Hoa> here is an example <https://bulkitv2.cssninja.io/landing-kits/kit-1/index.html> | 2019-03-25T05:29:10.659000 | Leopoldo |
elmlang | general | I'm trying to extract coverage information from `elm-coverage` for further processing. I see that `--report json` gives me nice information about complexity, but I can't find what was actually covered by tests. The data is there in the HTML output (the red vs green code), but it's hard to extract. Am I missing something? <@Huong> | 2019-03-25T05:37:19.659300 | Dorsey |
elmlang | general | Yeah, the coverage information isn't super straightforward for humans to read. Using the codecov reporter, you can get a json file that should conform to this schema: <https://github.com/zwilias/elm-coverage/blob/master/docs/elm-coverage.json> | 2019-03-25T05:39:43.662500 | Huong |
elmlang | general | The use case is: have a flag that is similar to `--cov-fail-under` in pytest, which makes the elm-coverage exit with non-zero status. This is great for using CI to making sure people are not pushing commits that decrease the coverage. | 2019-03-25T05:39:57.662800 | Robyn |
elmlang | general | And hence get slow incremental increase in test coverage | 2019-03-25T05:40:45.664000 | Robyn |
elmlang | general | <@Leopoldo> I think you can implement that by simply setting a class based on viewport data. Here is an example on how to do this: <https://ellie-app.com/55dpwC5Xxcva1> | 2019-03-25T05:40:50.664200 | Maida |
elmlang | general | > The goal of the reports generated by elm-coverage is to help you visualize what parts of your code are being evaluated when running your tests, and to try and guide you towards writing tests that focus specifically on the more complex functions in your codebase.
>
>The goal is not to condense that information down into a single metric. It is too easy to write tests that don't make meaningful assertions about your code and its behaviour, but only serve to increase the coverage.
>
>The only thing worse than having no tests is having tests that provide a false sense of security. | 2019-03-25T05:41:04.664300 | Huong |
elmlang | general | I feel very strongly about that :slightly_smiling_face: | 2019-03-25T05:41:09.664500 | Huong |
elmlang | general | It is very reasonable | 2019-03-25T05:42:17.664700 | Robyn |
elmlang | general | do you have a recommendation on an alternative way to have a computer do a basic “this PR has enough tests” check and inform the author, before I start the manual code review? | 2019-03-25T05:43:09.665100 | Robyn |
elmlang | general | If you're using GitHub, the codecov integration can help with that a little - <https://github.com/zwilias/json-decode-exploration/pull/5>
Though in a general sense, I suspect that some human judgement is required still. :thinking_face: | 2019-03-25T05:46:46.665600 | Huong |
elmlang | general | oh cool, thanks! | 2019-03-25T05:48:02.665800 | Robyn |
elmlang | general | Is there a way around this npm audit error? I’m building for 0.18 so the recommendation is not a solution | 2019-03-25T06:52:46.666100 | Lynn |
elmlang | general | I have a BIG problem : <https://discourse.elm-lang.org/t/server-side-problem/3389> and would love to have feedback | 2019-03-25T07:16:10.667100 | Valeria |
elmlang | general | I would not attempt to use elm on the server side thats for sure. | 2019-03-25T07:19:53.667500 | Agustin |
elmlang | general | If you’re set on using GraphQL you’re going to have to map database rows to its types, thats part of how it works. | 2019-03-25T07:20:24.668100 | Agustin |
elmlang | general | If you don’t want to build that there are several “GraphQL as a Service” providers. | 2019-03-25T07:20:41.668500 | Agustin |
elmlang | general | I am surprised you haven’t considered Elixir and Phoenix/Absinthe. Its a very popular combination for backend, its immutable, and functional, just not strictly typed. | 2019-03-25T07:21:37.669400 | Agustin |
elmlang | general | You’re right :slightly_smiling_face: | 2019-03-25T07:23:28.669600 | Valeria |
elmlang | general | Just added it to the list | 2019-03-25T07:23:33.669800 | Valeria |
elmlang | general | I got the requirement to provide an elm app as "Widget" (<https://www.w3.org/TR/widgets/>). Is there something in elm so that I don't have to do everything manually? | 2019-03-25T07:41:45.670600 | Joan |
elmlang | general | Never heard of it and seems to be on its way to be deprecated <https://github.com/w3c/transitions/issues/65> so I doubt that there is anything else than maybe something on NPM for JS | 2019-03-25T07:57:59.670700 | Denae |
elmlang | general | Yeah - still AGL is using it for custom apps. So I'll cough up some build magic :slightly_smiling_face: | 2019-03-25T08:35:02.670900 | Joan |
elmlang | general | <@Valeria> I think it’s worth your time to look at Rust. I agree with <@Agustin> that Elixir/Phoenix will feel very familiar coming from Elm, but the lack of a strong compile-time type checker is super painful. Rust’s type system is actually very Elm-ish. I haven’t looked into Redis options, but the ORM support in the Diesel library is excellent and solves a lot of the problems you mentioned. There are several web server frameworks to choose from with Rust, an overwhelming number really, but you can probably narrow your focus to Rocket and Actix without missing out too much. | 2019-03-25T09:14:49.674600 | Dede |
elmlang | general | (Would you prefer to have this conversation in Discourse or is it OK to chatter here?) | 2019-03-25T09:15:18.675100 | Dede |
elmlang | general | Rust seems pretty cool, but for general app development I'd think you'd rather not have manual memory management? | 2019-03-25T09:20:47.675300 | Nana |
elmlang | general | Rust has done an amazing job of making it not painful. | 2019-03-25T09:21:05.675500 | Dede |
elmlang | general | And the runtime performance is spectacular. <@Valeria> specifically mentioned performance issues as a concern, which immediately elevates Rust to top-tier candidate IMHO. | 2019-03-25T09:21:47.675700 | Dede |
elmlang | general | For many tasks, most of the memory management still happens automagically behind the scenes based on baked-in RAII <https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization> | 2019-03-25T09:23:17.676000 | Dede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.