Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-20 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 17, 2017 at 1:25:02 PM UTC, GordonBGood wrote: > > The rational to depreciating these seems to be performance when applied to > their limited use in tests and I see that, as I tried to make changes to > Lazy that would improve its lack of performance when run on some

Re: [elm-discuss] Re: Array map with start and end

2017-11-20 Thread Francisco Ramos
Hi Matthieu, Thanks for those links!!. Those lazy views look like what I'm trying to achieve. I'm actually working on a multidimensional container of items, elm-ndarray, https://github.com/jscriptcoder/elm-ndarray/blob/master/src/NdArray.elm. Still some work to do. I need to re-write *map* and

Re: [elm-discuss] Re: Array map with start and end

2017-11-20 Thread Francisco Ramos
Hi guys, Thanks for your answers. Robin, that was a great talk. I actually was in that very same room when you gave the presentation :-). Very interesting and educative. Hope to see you again in the next Elm Europe. Matthieu, thanks for the info. I didn't know about Okasaki's work on immutable

[elm-discuss] Re: Encoding JSON and updating

2017-11-20 Thread David Legard
OK, thanks, I didn't fully understand your previous message. I'll do some more tinkering with this. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [elm-discuss] Re: Array map with start and end

2017-11-20 Thread Robin Heggelund Hansen
It using Array.prototype.slice under the hood, but the way Arrays in Elm is implemented is by using trees. I suggest you watch my talk from Elm Europe, where I explain how the different data structures work in detail =) https://www.youtube.com/watch?v=mmiNobpx7eI fredag 17. november 2017

[elm-discuss] Re: Encoding JSON and updating

2017-11-20 Thread David Legard
OK, thanks for the suggestions. There's something going on beyond my comprehension level. I can read the data from http://localhost:3000/db, but when I try to send it back, even with an Http.emptyBody, I get: BadStatus { status = { code = 404, message = "Not Found" }, headers = Dict.fromList

[elm-discuss] Re: Decoding a json property with different types of values

2017-11-20 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 17, 2017 at 3:19:55 PM UTC, Thiago Temple wrote: > > I have situation where I have to a jso object similar to this > > { "level": 1, "displayValue": "some text", "dataValue": "a string with > the value" } > > { "level": 1, "displayValue": "some text", "dataValue": { "name":

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-20 Thread W. Gordon Goodsman
Oh, I understand the rationale, but it limits the general usefulness of lazy lists, as certain types of problems need memoization, and without Lazy as it currently exists there is no way to accomplish it without JavaScript. Just because the creators of the language don't see a need for it doesn't

[elm-discuss] Re: Encoding JSON and updating

2017-11-20 Thread Steve Schafer
Like I said in my previous message, you can't send data to that URL. That URL identifies the *entire* database. With PUT, PATCH, and DELETE, you have to use a URL that identifies a *specific *record in the database. The error message also says that the body of the request is empty, but I can't

Re: [elm-discuss] Re: Array map with start and end

2017-11-20 Thread Matthieu Pizenberg
Hi again, So out of curiosity, I just spend a couple hours looking for variations of: "(immutable/persistent) (tensor/multidimentional array/multidimentional data structure) implementation" and my conclusion is that I did not easily find examples of implementations of data structures tailored