workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
elmlang | general | Yeah I was thinking there might be something that you can do with elm/bytes | 2019-03-03T11:13:21.344200 | Wendell |
elmlang | general | In theory there is, and if you write a jpeg or png decoder/encoder I’ll definitely use it, but it’s a big job. | 2019-03-03T11:14:02.345200 | Cammy |
elmlang | general | Unless you’re just looking to glitch a random pixel, in which case you probably could do in a day with elm/bytes. | 2019-03-03T11:14:35.346300 | Cammy |
elmlang | general | Nah I’m thinking about new ideas for packages and wanted to make sure I am not duplicating work. Now I’m going to read the png/jpeg spec to see how big a job it really is. I believe ppm is an easy format to parse but obviously it is much less useful than png/jpg. I might start there though just to see what the library would do before deciding to invest in decoding compressed images :slightly_smiling_face:. | 2019-03-03T11:18:46.346600 | Wendell |
elmlang | general | I think it’s great. I’ve been thinking about JPEG for a while but just don’t have the time. | 2019-03-03T11:19:59.347600 | Cammy |
elmlang | general | Yeah it seems like it could be a real monster of a project. | 2019-03-03T11:20:15.347800 | Wendell |
elmlang | general | We’ll see what my initial research yields | 2019-03-03T11:20:29.348000 | Wendell |
elmlang | general | It would be awesome. | 2019-03-03T11:21:44.348400 | Cammy |
elmlang | general | If you do it, I’m sure you’ll have no problem with dct, but if you do, hit me up, I’ve done it before. | 2019-03-03T11:25:47.349200 | Cammy |
elmlang | general | Thanks, I’ll keep that in mind | 2019-03-03T11:26:23.349400 | Wendell |
elmlang | general | mini player is constructed on mouse over and is re used when mouse moves to another channel so there is only 2 HLS players max in the application (mini/preview player and main player)
there is extra one for playing ads so that stream is pre loaded by the time ad is ended
so that's 3 players already
at some point there was an idea of having pined preview like picture in picture and to allow up to 4-5 pined previews
or there may be game with sound effects as separate mp3 files and you may need to play arbitrary number of sound tracks at same time
so of course there are reasons for not playing 40 videos at same time but that's up to application developer and there should not be limitation from language/library API | 2019-03-03T11:32:53.349700 | Cleveland |
elmlang | general | Sometimes I make things more complicated than they need to be :slightly_smiling_face: | 2019-03-03T11:41:12.349900 | Susanna |
elmlang | general | You are not alone in it :smile: | 2019-03-03T11:59:37.350100 | Lynne |
elmlang | general | I’ve been following: <https://github.com/rtfeldman/elm-spa-example>
which uses `Html.map`. However in the docs it says to use `Html.map` sparingly. Is this spa example still a good one? | 2019-03-03T13:57:55.351200 | Tamiko |
elmlang | general | Yes, it shows when using `Html.map` is ok. Don't try to use it more often without good reason. | 2019-03-03T14:06:14.352000 | Lynne |
elmlang | general | <@Tamiko> Richard touches on that very question in a recent talk, with a lovely analogy. <https://www.youtube.com/watch?v=RN2_NchjrJQ&t=32m43s> | 2019-03-03T16:31:26.354800 | Deb |
elmlang | general | No problem! I used it heavily on my last application that was a wizard driven set of questions. | 2019-03-03T19:36:43.355100 | Edie |
elmlang | general | Hi! happy to be here and working with elm | 2019-03-03T20:40:39.356000 | Loriann |
elmlang | general | Is there any case where a 200 response from a server would trigger an Err message from elm in a branch? | 2019-03-03T20:42:43.357300 | Loriann |
elmlang | general | This is my response body | 2019-03-03T20:43:10.357600 | Loriann |
elmlang | general | None | 2019-03-03T20:43:33.357700 | Loriann |
elmlang | general | header status is 200 | 2019-03-03T20:44:03.358200 | Loriann |
elmlang | general | Thank you in advance | 2019-03-03T20:44:27.358800 | Loriann |
elmlang | general | <@Loriann> sure, you'll get an error if the decoder fails | 2019-03-03T20:44:53.359500 | Earlean |
elmlang | general | <@Earlean> Thank you! that makes sense, I overlooked the decoder. I was thinking a level higher | 2019-03-03T21:13:53.360500 | Loriann |
elmlang | general | The error would have included this information including the reason the decoder failed | 2019-03-03T21:14:49.361400 | Earlean |
elmlang | general | Thank you, saw the bad body error in the elm debugger. <@Earlean>, i appreciate your help | 2019-03-03T21:17:21.362200 | Loriann |
elmlang | general | Alright, I finally figured out what the issue was, but I'm not sure how to solve it. it looks like the issue is with "Request header field content-type is not allowed by Access-Control-Allow-Headers" when initiating a webhook via a post request like so: | 2019-03-04T01:43:12.363600 | Loriann |
elmlang | general | None | 2019-03-04T01:44:43.363700 | Loriann |
elmlang | general | <@Loriann> if you look at the network tab in developer tools you'll be able to see an 'options' request to '<http://hooks.zapier.com|hooks.zapier.com>', have a look at that `Access-Control-Allow-Headers` header in the response to that request | 2019-03-04T01:48:57.365500 | Earlean |
elmlang | general | For security reasons cross origin requests are only allowed by the browser if the cross origin server gives permission by including CORS headers | 2019-03-04T01:50:17.366600 | Earlean |
elmlang | general | <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS> gives a good introduction to CORS | 2019-03-04T01:50:54.366900 | Earlean |
elmlang | general | <http://hooks.zapier.com|hooks.zapier.com> may not allow cross origin requests in which case you won't be able to make that request from within a browser | 2019-03-04T01:51:50.367900 | Earlean |
elmlang | general | <@Earlean> Thank you, I think I understand what you mean. My understanding of HTTP requests is growing. | 2019-03-04T01:52:47.368700 | Loriann |
elmlang | general | It looks like the request that I am sending from the machine is setting a content type even though I thought I was able to override headers from the Http.request function. Any good resources on Elm and CORS? It's been slightly challenging to get answers . on that from the docs. Thanks in advance. | 2019-03-04T01:54:20.370000 | Loriann |
elmlang | general | It's not an Elm specific issues, CORS handled and enforced by the browser | 2019-03-04T01:57:52.372200 | Earlean |
elmlang | general | Ahh, I see what you mean, but elm is creating the request. Elm is generating a request of Content-Type: application/json | 2019-03-04T01:59:44.373500 | Loriann |
elmlang | general | yep, you're sending json so it needs a content type of json | 2019-03-04T02:00:03.374200 | Earlean |
elmlang | general | from the article you shared | 2019-03-04T02:00:09.374300 | Loriann |
elmlang | general | hey <@Lea> | 2019-03-04T02:00:17.374400 | Floy |
elmlang | general | thanks for reply, haven't noticed the reply | 2019-03-04T02:00:25.374600 | Floy |
elmlang | general | None | 2019-03-04T02:00:27.374800 | Loriann |
elmlang | general | watched that, but I guess need to watch it again in context of ,y problem | 2019-03-04T02:00:41.375200 | Floy |
elmlang | general | Do you know how I can set this manually? | 2019-03-04T02:00:57.375800 | Loriann |
elmlang | general | can you show us the full error message you're seeing on the web dev console? | 2019-03-04T02:01:35.377100 | Earlean |
elmlang | general | setting the content type to something other than json and trying to send json will just have the server reject the request because it's expecting json | 2019-03-04T02:03:14.379700 | Earlean |
elmlang | general | hey, is is possible to model a problem where I have a phantom type describing the filter
```
type alias Filter a msg = {label: String, selected: List a, all: List a, selectMsg: a -> msg}
type alias Filters = List Filter ? ?
```
problem lies in storing all filters in a list. I mean I can have a lot of filters carrying different sort of data (and I'd love to avoid casting to string back and forth)
I suppose different msg will not be problematic
any ideas? Thx for help in advanced :+1: | 2019-03-04T02:03:23.380000 | Floy |
elmlang | general | maybe a little of context | 2019-03-04T02:05:04.380100 | Floy |
elmlang | general | I need this to be able to produce 3 different functions that will render that data into 2 different views as well as apply the filtering based on stored filters | 2019-03-04T02:05:46.380300 | Floy |
elmlang | general | For sure | 2019-03-04T02:06:11.380500 | Loriann |
elmlang | general | based loosely on sortable-table, no data of filters stored inside the model (parent or own), everything built up in view | 2019-03-04T02:06:22.380700 | Floy |
elmlang | general | This is the request I am sending from Postman in JS to test | 2019-03-04T02:06:37.380900 | Loriann |
elmlang | general | xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("cache-control", "no-cache"); | 2019-03-04T02:06:38.381100 | Loriann |
elmlang | general | from origin '<http://localhost:4000>' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response. | 2019-03-04T02:08:18.381300 | Loriann |
elmlang | general | Yep, looks at the 'preflight' request, it's an 'options' request to the same url | 2019-03-04T02:09:24.381600 | Earlean |
elmlang | general | Hmmm, maybe expectJson is setting that in the request header | 2019-03-04T02:10:40.381800 | Loriann |
elmlang | general | It is setting the content-type header because you need it set to be sending json | 2019-03-04T02:12:27.382000 | Earlean |
elmlang | general | If you looks at the headers of the preflight request you'll be able to see what content-types this server allows | 2019-03-04T02:13:29.382200 | Earlean |
elmlang | general | It's very possible that what you want to do is impossible, I don't know if <http://hooks.zapier.com|hooks.zapier.com> even allows cross origin requests | 2019-03-04T02:14:23.382400 | Earlean |
elmlang | general | I see what you mean. The proper request type when sending this is request is application/x-www-form-urlencoded and it works through postman and zapier when sent manually, but I'm not sure how to set this that way with elm. | 2019-03-04T02:14:49.382600 | Loriann |
elmlang | general | This happens when trying to send data to the Zapier webhooks from inside a web browser and altering the Content-Type header during the process. Because of Cross Browser Security restrictions, your browser will reject these requests. To combat this, do not set a custom Content-Type header in the request. | 2019-03-04T02:16:13.382800 | Loriann |
elmlang | general | <https://zapier.com/help/common-problems-webhooks/> | 2019-03-04T02:17:11.383000 | Loriann |
elmlang | general | Thank you for your help, I will hunt through the source to see where that is getting set. Have a good night ( im so sleepy ) | 2019-03-04T02:18:20.383300 | Loriann |
elmlang | general | Ah.....so zapiers API is just badly implemented. | 2019-03-04T02:26:26.383500 | Earlean |
elmlang | general | You could try using <https://package.elm-lang.org/packages/elm/http/latest/Http#stringBody> with the first parameter as "text/plain" | 2019-03-04T02:28:55.383700 | Earlean |
elmlang | general | yeah... the API has some flaws, but it sure talks to alot | 2019-03-04T02:40:24.383900 | Loriann |
elmlang | general | I found the answer with your help after some digging: | 2019-03-04T02:40:42.384100 | Loriann |
elmlang | general | <https://github.com/elm/http/blob/master/src/Http.elm> | 2019-03-04T02:40:45.384300 | Loriann |
elmlang | general | {-| Put some JSON value in the body of your `Request`. This will automatically
add the `Content-Type: application/json` header.
-} | 2019-03-04T02:41:13.384500 | Loriann |
elmlang | general | At least I know, thank you for your timo | 2019-03-04T02:41:44.384700 | Loriann |
elmlang | general | time | 2019-03-04T02:41:46.384900 | Loriann |
elmlang | general | using custom elements for this sounds terrible though :grimacing: I think they should only be at the edge of your system, not integrated inte core stuff like that | 2019-03-04T03:07:50.385300 | Nana |
elmlang | general | I agree that having the view determine what data you fetch is a nice thing though, that's how our Vue app works | 2019-03-04T03:08:40.385500 | Nana |
elmlang | general | <@Tamra> saw someone had actually made an example of that, seems like a bit of an extreme solution though :stuck_out_tongue: | 2019-03-04T03:10:54.385700 | Nana |
elmlang | general | ok, I guess I managed to figure it out | 2019-03-04T04:29:32.386000 | Floy |
elmlang | general | the trick was to do some transformation for the sake of data structure of the filter | 2019-03-04T04:30:46.386200 | Floy |
elmlang | general | hi, guys, how it is possible to send object through port? | 2019-03-04T04:35:30.387000 | Eleanor |
elmlang | general | <@Eleanor> I think you have to use a JSON encoder/decoder | 2019-03-04T04:41:54.387500 | Nana |
elmlang | general | thanks | 2019-03-04T04:42:18.387800 | Eleanor |
elmlang | general | Anybody here with experience in `elm-style-animation`? I would like to know if there’s an obvious way to send a message when the animation is finished. I believe it is something that `Animation.Messenger` can do, but how ? | 2019-03-04T04:57:34.389800 | Hoa |
elmlang | general | Uhm. Looks like <https://github.com/mdgriffith/elm-style-animation/blob/master/examples/SimpleSendMsg.elm#L53> you can chain animation and the send msg. | 2019-03-04T04:59:47.390600 | Hoa |
elmlang | general | So I have to use `Animation.queue` | 2019-03-04T05:00:53.391200 | Hoa |
elmlang | general | Or `Animation.interrupt` | 2019-03-04T05:03:01.391400 | Cornell |
elmlang | general | OK, thank you Matthew! | 2019-03-04T05:04:43.391900 | Hoa |
elmlang | general | No problem :smile: | 2019-03-04T05:04:55.392100 | Cornell |
elmlang | general | hi, is there some naming convention for `Msg` when it comes to making HTTP requests? Example `fetch/update` some kind of "settings".
```
FetchSettings - initiate request
ReceiveSettings(...) - handle response from above ^
UpdateSettings(...) - initiate request to update settings
ChangeSettings(...) - handle response from above ^
```
I wish naming where clearer. | 2019-03-04T07:10:50.398400 | Tanesha |
elmlang | general | I always tend to name my `Msg`s after the events that happened not the other way around. Say you trigger fetching settings from a button click. Then I would name it something like `RetrieveButtonClicked`. This is also much useful when you are handling the responses. Your second `Msg` can be then called `RetrievedSettings`. | 2019-03-04T07:30:57.401100 | Leonore |
elmlang | general | Is anybody here using elm with haskell servant? | 2019-03-04T08:22:31.402200 | Marlys |
elmlang | general | Can we determine which `Html.Attribute` *values* are passed to a function? I would like determine if something is `disabled` without adding additional parameters (in order to keep the API for a custom function the same as for a standard html element). | 2019-03-04T08:42:59.404700 | Moshe |
elmlang | general | Actually I’m currently thinking about it. Let me know if it works for you :smile: | 2019-03-04T08:43:29.404800 | Moshe |
elmlang | general | The official packages on Hackage are broken. I'm trying out the NoRedInk forks:
- <https://github.com/NoRedInk/elm-export>
- <https://github.com/NoRedInk/servant-elm>
These seem working | 2019-03-04T08:45:05.405000 | Marlys |
elmlang | general | Hmmm… that’s a little disappointing. I was hoping for some more straight forward integration.
Are you using stack to manage your project? | 2019-03-04T08:49:55.405200 | Moshe |
elmlang | general | yes | 2019-03-04T08:52:04.405400 | Marlys |
elmlang | general | it's easy to integrate those packages with stack | 2019-03-04T08:52:11.405600 | Marlys |
elmlang | general | add:
- github: NoRedInk/elm-export
commit: a6b7a9a315bd24cde663012fcbb5fd35d1129a72
- github: NoRedInk/servant-elm
commit: 84cb393969305d539daed2c10850b8a40f3fb398
to the extra-deps in the stack.yaml | 2019-03-04T08:52:40.405800 | Marlys |
elmlang | general | you can replace the commit hash with a newer one from github | 2019-03-04T08:52:56.406000 | Marlys |
elmlang | general | stack will automatically resolve the right dependencies in your package.yaml | 2019-03-04T08:53:49.406300 | Marlys |
elmlang | general | awesome... it's working :^> | 2019-03-04T08:56:22.406500 | Marlys |
elmlang | general | :heart: | 2019-03-04T08:56:36.406700 | Marlys |
elmlang | general | No, that's not possible <@Moshe> | 2019-03-04T09:15:36.407100 | Lynne |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.