Re: [elm-discuss] Re: How to walk my own implementation of an array

2017-12-04 Thread Francisco Ramos
Hi Matthieu, your function is genius, https://ellie-app.com/4qBxgmzvBa1/0 Thanks a lot. I couldn't come up with a good way to implement this. Not only that, but also I've just learnt something I didn't even know was possible in Elm, the definition of a helper function in the "let" block. Never

Re: [elm-discuss] Re: How to walk my own implementation of an array

2017-12-04 Thread Francisco Ramos
I didn't your last message when I answered. Let me have a look at your solution. Thanks On Mon, Dec 4, 2017 at 9:19 AM Francisco Ramos <jscriptco...@gmail.com> wrote: > I had similar idea, walking the entire buffer and somehow check boundaries > (dimension size) but I w

Re: [elm-discuss] Re: How to walk my own implementation of an array

2017-12-04 Thread Francisco Ramos
unOffset // stride1 >> >> column = >> unOffset % stride1 >> in >> if line < height && column < width then >> Just (line, column) >> else >> Nothing >> >> Generalization would proceed t

Re: [elm-discuss] Re: How to walk my own implementation of an array

2017-12-03 Thread Francisco Ramos
ur > matrice [1 3; 7 9] will be represented by { strides = (6, 2), shape = (2,2) > } not strides = (2,2). Because 6 is the jump from one line to the other (1 > to 7). > Let me know if I'm mistaking or not clear. > > > On Friday, December 1, 2017 at 11:22:16 PM UTC+8, Fra

Re: [elm-discuss] JS typed array implementation for elm

2017-11-27 Thread Francisco Ramos
That's great!! Watching the project. Let me know if you need some help with this, or somehow I can contribute with it. Being using TypedArrays for a while already, and in my opinion they are the most thriving way to achieve the best performance in a N-dimensional array implementation, 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

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-17 Thread Francisco Ramos
om> wrote: > Slicing isn't O(N). > > In the current implementation in core, slicing is O(log32n) i believe. In > the next version of Elm, slicing is O(log32n) when start = 0; I'm uncertain > what the big-o notation is once start > 0 though. > > > fredag 17. november 20

[elm-discuss] Array map with start and end

2017-11-17 Thread Francisco Ramos
Hi there, Was wondering how I can map over an array with a start and end indexes. I know I could slice the array and then map, but performance is a concern and slicing is O(N) where N = end - start, plus the actual mapping, another O(N). Maybe there is another way where I just loop once over

Re: [elm-discuss] Re: The NumPy for Elm

2017-11-03 Thread Francisco Ramos
and let me know: https://gist.github.com/jscriptcoder/3be0e4186bc8098d1310e6e7fb3bf441 Fran On Fri, Nov 3, 2017, 10:39 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > On Thursday, November 2, 2017 at 5:28:15 PM UTC, Francisco Ramos wrote: >> >> Hey

Re: [elm-discuss] Re: The NumPy for Elm

2017-11-02 Thread Francisco Ramos
package for machine learning in elm. > > Cheers, > Matthieu > > > On Tuesday, October 31, 2017 at 5:32:06 AM UTC-7, Francisco Ramos wrote: >> >> Today I'm releasing NumElm, another small contribution to the Open >> Source, Frontend and Elm community. NumElm i

Re: [elm-discuss] Re: The NumPy for Elm

2017-11-02 Thread Francisco Ramos
Hey Rupert, Let me have a look when I have a little bit of time and I'll get back to you. Fran On Thu, Nov 2, 2017, 15:41 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > On Wednesday, November 1, 2017 at 8:38:48 PM UTC, Rupert Smith wrote: >> >> How would I write a

Re: [elm-discuss] The NumPy for Elm

2017-10-31 Thread Francisco Ramos
Peter Damoc <pda...@gmail.com> wrote: > Hi Fran, > > I would be interested in seeing performance benchmarks agains NumPy. > I'm expecting NumElm to be worse but I'm curious how much worse it is. :) > > In any case, congrats for creating this! > > > > On Tue, Oct

[elm-discuss] The NumPy for Elm

2017-10-31 Thread Francisco Ramos
Today I'm releasing NumElm, another small contribution to the Open Source, Frontend and Elm community. NumElm is inspired by NumPy, the fundamental package for scientific computing with Python. NumElm is the first step in this ambitious idea of mine of building a Machine Learning package for

[elm-discuss] Question about pure functions

2016-08-26 Thread Francisco Ramos
Hi there, I'm fairly new in Functional Programming and Elm language and I was hoping someone could tell me if what I'm doing is correct or it goes against Elm and its pure functions. I have a model, defaultModel, with some values by default. I have a couple functions that create a new model

[elm-discuss] Re: Hide component on document click

2016-08-22 Thread Francisco Ramos
age to close the menu. > > You could also just use `elm-mdl`'s menu too if you want. :-) > > > On Monday, August 22, 2016 at 1:52:39 AM UTC-6, Francisco Ramos wrote: >> >> Hi there, >> >> I'm fairly new with Elm. I'm currently working on a personal project

[elm-discuss] Hide component on document click

2016-08-22 Thread Francisco Ramos
Hi there, I'm fairly new with Elm. I'm currently working on a personal project (Minesweeper, repo here: https://github.com/jscriptcoder/minesweeper-elm) to learn this fascinating language and architecture. I have this menu that opens when you click on a link. What I'd like to do is to hide it