[Factor-talk] multi dimensional arrays and console

2010-06-02 Thread Kobi Lurie
Hi guys, 1) In C sharp, multi dimensional arrays are built into the language, and I find them very useful for representing a board, or a board with a few layers. the syntax is also pretty nice: int[,,] cube = new int[3,3,3]; for example. but you can also do int[] (if you have the ram

Re: [Factor-talk] multi dimensional arrays and console

2010-06-02 Thread Slava Pestov
On Wed, Jun 2, 2010 at 1:47 AM, Kobi Lurie k_lu...@gbrener.org.il wrote: 1) In C sharp, multi dimensional arrays are built into the language, and I find them very useful for representing a board, or a board with a few layers. the syntax is also pretty nice: int[,,] cube = new int[3,3,3]; for

Re: [Factor-talk] multi dimensional arrays and console

2010-06-02 Thread Jon Harper
Hi, I had the same problem a few months ago : I expected multi-dimensional arrays to be part of the library. I decided to try and implement it. The challenge is to not rewrite everything and use existing code. Look at this paste to see the result : http://paste.factorcode.org/paste?id=1711 It's

Re: [Factor-talk] multi dimensional arrays and console

2010-06-02 Thread Joe Groff
On Wed, Jun 2, 2010 at 10:03 AM, Jon Harper jon.harpe...@gmail.com wrote: At this point I have questions: - Why isn't already in the library ? Do multi-dimensional arrays somehow go against factor's idioms ? Would you want such functionality in the library ? I think because arrays-of-arrays

Re: [Factor-talk] DLS paper: section 2.1.5 and 2.1.6

2010-06-02 Thread Eduardo Cavazos
Guys, Let me clarify a couple of things. I do not want to be listed as an author on the paper. What I meant in my last note is that, if the dataflow combinators and partial application syntax are presented as they are: New abstractions for managing the flow of data in stack-based

Re: [Factor-talk] multi dimensional arrays and console

2010-06-02 Thread William Tanksley, Jr
Joe Groff arc...@gmail.com wrote: Jon Harper jon.harpe...@gmail.com wrote: - Why isn't already in the library ? Do multi-dimensional arrays I think because arrays-of-arrays have been sufficient so far. Two-dimensional arrays aren't needed all that often, and higher-dimensional arrays hardly

Re: [Factor-talk] multi dimensional arrays and console

2010-06-02 Thread Joe Groff
The array language J stores multidimensional arrays as a shape array, followed by a flattened array accessed by multiplying the indices by the appropriate parts of the shape -- or, when one is iterating over an array, by simply iterating over the flattened version of the array (most

Re: [Factor-talk] Factor causes kernel crash on Lenovo S10

2010-06-02 Thread Joe Groff
On Tue, Jun 1, 2010 at 1:00 PM, Slava Pestov sl...@factorcode.org wrote: This doesn't sound like its the same bug, Joe. If opening a second window always crashes X11, then I bet the problem is that the driver simply doesn't properly handle the case of two GL contexts per server connection. On

Re: [Factor-talk] Factor causes kernel crash on Lenovo S10

2010-06-02 Thread Slava Pestov
Can you reproduce this reliably? Have you tried with the Gtk backend? On Wed, Jun 2, 2010 at 3:03 PM, Joe Groff arc...@gmail.com wrote: On my slowass Eee PC, I've been getting sporadic Failed to set GLX context errors from Factor too when Factor is compiling in the background and I have