Raul

>OK so i will bite.-) i would guess as boxes were created specifically to 
>expose structures that they would continue in that role. The, associated, data 
>however, where would it be? Presumably carried around in the same noun? With a 
>& family adverb to allow amending and extracting data; and rearranging 
>structure?

>This is kind of abstract question though, not really handleable. Perhaps json 
>is a popular format here, and getting stuff to and from that data structure 
>for use in outside languages; and of course being able to manipulate it in J, 
>would be beneficial. Perhaps there is a pidgin of json which is appropriate 
>for communication? It does need however to include some recursive structure; 
>though that might be flattened like trees are in APL like representations.

greg
~krsnadas.org

--

from: Raul Miller <[email protected]>
to: Programming forum <[email protected]>
date: 27 April 2014 22:22
subject: Re: [Jprogramming] [Jchat] How a Genius Programmer Rewirtes a
Ten-line code into One-line.

I meant homogeneous at the top level.

>That's probably not what you meant, of course. What you meant (a pervasive 
>form of homogeneous) would probably be best represented by paring a flat array 
>with an external representation of structure?

Thanks,

--
Raul

--

from: greg heil <[email protected]>
to: Programming forum <[email protected]>
date: 27 April 2014 22:06
subject: Re: [Jprogramming] [Jchat] How a Genius Programmer Rewirtes a
Ten-line code into One-line.

>Wow great! Now i suppose for the next few weeks i will use try the appose 
>hammer on every problem i encounter (it is mostly directory structures that 
>are popping nails now)

>i do wonder though what you mean by homogeneous when it is perfectly normal to 
>have a boxed structure such as

'asf';1 2 3;(i.2 3);2.3 4.5;1 0 1 1

Yes the external view is, but internal is anything but. So operators
can make NO assumptions which might be useful for simplification. Open
(and yours!) help though.

greg
~krsnadas.org

--

from: Raul Miller <[email protected]>
to: Programming forum <[email protected]>
date: 27 April 2014 20:46
subject: Re: [Jprogramming] [Jchat] How a Genius Programmer Rewirtes a
Ten-line code into One-line.

Boxes are a homogeneous, ragged type.

Also, something to think about:

open=: &:>

Thanks,

--

from: greg heil <[email protected]>
to: Programming forum <[email protected]>
date: 27 April 2014 20:28

subject: Re: [Jchat] How a Genius Programmer Rewirtes a Ten-line code
into One-line.

>i kind of liked Rogers idea but missed the decoration afforded by textbook 
>tables. This kept it to just the snippet afforded by the genius:

* table open/ 1 2+ each i. each 9 4

>it is a bit annoying that J treats boxes in such a cumbersome manner, so i did 
>have to define open:

open=:1 : '([:>[) x [:>]'

table and each are in the standard lib

>i kind of miss the each`s (and the lack of boxes) of K -ragged data is so 
>easily dealt with (eg dictionaries, XML, json...). i do wonder if a subset of 
>J could be made where all the content of boxes were made of a homogenous type, 
>just ragged...

greg
~krsnadas.org

--

from: Roger Hui <[email protected]>
to: Chat Forum <[email protected]>
date: 27 April 2014 15:29
subject: Re: [Jchat] How a Genius Programmer Rewirtes a Ten-line code
into One-line.

Yes, */~i.10. And then +/~i.10, >./~i.10, <./~i.10, |/~i.10, +./~i.10, etc.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to