Re: [Jprogramming] addon format/zulu

2012-09-18 Thread bob therriault
Hi Ian, I just tested the Averages lab on j701 and PREPARE seems to work, so I guess that genie is out of the bottle. I would use this facility to allow the learner to focus on the specific lesson rather than the set up details. In this way the ability to hide information is one of its gifts

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ric Sherlock
I copied the behaviour from Oleg Kobchenko who I think was one of the early adopters/designers of the JAL. On Wed, Sep 19, 2012 at 3:08 PM, Ian Clark wrote: > I thought you'd say that, Ric, because your wiki pages make good use > of it... :-) > > I 80%-agree with you. If zulu-lite and zulu-bare e

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ric Sherlock
load 'format/zulu' <--> load '~addons/format/zulu/zulu.ijs' load 'format/zulu/zulu' <--> load '~addons/format/zulu/zulu.ijs' load 'format/zulu/bare' <--> load '~addons/format/zulu/bare.ijs' If there is a script of the same name as the addon then this can be omitted a'la the first example abov

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread bill lam
I just have some trouble to remember the meaning of the form load 'format/zulu/bare' is it ~addons/format/zulu/bare.ijs or ~addons/format/zulu/bare/bare.ijs so I prefer avoid it. ymmv. Срд, 19 Сен 2012, Ian Clark писал(а): > I thought you'd say that, Ric, because your wiki pages make good use >

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
I thought you'd say that, Ric, because your wiki pages make good use of it... :-) I 80%-agree with you. If zulu-lite and zulu-bare earn themselves no friends, then it's the way to go. Mind you, I can do that now, exactly as you say, and not disturb the foundations of zulu-lite or zulu-bare. Then I

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
> I like the wiki presentation much more. In addition to content > changes, the formatting on the wiki is really richer than the J pages. Thank you. It's all been copy/pasted from the Lab, but I admit it does look prettier. The Lab lacks text formatting, but it does do the work for you, so avoidin

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
Mac "Spotlight" shows me several Labs in j602 base libraries have PREPARE-blocks, eg lapack.ijt -- I count some 40 others. I may be adopting an unpopular stance here, but having only yesterday discovered this facility, I don't like it, and wouldn't commend its use. It's sneaky. And I don't accept

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread bob therriault
Hey everybody, In J602 there was a markup Instruction used in labs called PREPARE that would bracket J commands to allow you to do things behind the scenes when running a lab file .ijt I wonder if this would be an option to have scripts load without having the learner aware of it. I think t

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Brian Schott
I see now that my description of "open" applies more to "matrix" and is thus all wrong. I like the wiki presentation much more. In addition to content changes, the formatting on the wiki is really richer than the J pages. On Tue, Sep 18, 2012 at 9:20 AM, Brian Schott wrote: > One thing that has

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ric Sherlock
On Wed, Sep 19, 2012 at 7:52 AM, Ian Clark wrote: > > Yes, I too would like to combine the whole thing in one single addon. > You'll recall the extensive correspondence (17 posts) that followed my > original proposal to do just this, and how best to do it? >http://www.jsoftware.com/pipermail/p

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
Thanks, Brian. I'll mull over it for a day or two. It's certainly grist for the mill. As Raul points out, I need some pithy "blurb" stashed away in the right places. When the dust has settled (and I have some 3rd-party users) I'll be able to see clearly where, and what. I was hoping to rely on th

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
Just about to reply to your earlier comments. For which - many thanks. They are helpful. > Zulu though... why would I want to "convert a string"? Yes that's a typo. Should be Stringlist Conversion Package. ...but the thing is, "stringlist" is a neologism in the J context. > There should be some

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Raul Miller
I wrote: > So if it were me, I would: > > 1. Try to explain the purpose of the package (at least enough that a > user could look up the names). > > 2. Combine everything into one package. To get the cut down variants, > it might be worthwhile describing somewhere what can be erased. After looking

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Ian Clark
http://www.jsoftware.com/jwiki/Addons/format/zulu Lab for zulu totally rewritten. Splitting it into chapters was the answer. On Tue, Sep 18, 2012 at 3:16 AM, Ian Clark wrote: > I'm re-thinking it. There's 3 different labs in one, and they're > addressed to 3 different audiences. And all mixed in

Re: [Jprogramming] cut y in segments of each size being x's items

2012-09-18 Thread Raul Miller
#\ is inefficient in J6 but has special code in J7. FYI, -- Raul On Tue, Sep 18, 2012 at 10:36 AM, Brian Schott wrote: > That is very clever. I don't think I have ever seen or thought of > using #\ and I haven't even yet investigated inv# especially as the > middle of a fork. > > On Tue, Sep

Re: [Jprogramming] cut y in segments of each size being x's items

2012-09-18 Thread Brian Schott
That is very clever. I don't think I have ever seen or thought of using #\ and I haven't even yet investigated inv# especially as the middle of a fork. On Tue, Sep 18, 2012 at 10:08 AM, Raul Miller wrote: > >takecut=: *@[ #inv ] 0 0 3 3 0 2 takecut i. 7 > ┌┬┬─┬─┬┬─┐ > │││0 1 2│3

Re: [Jprogramming] cut y in segments of each size being x's items

2012-09-18 Thread Raul Miller
P.S. if you want to overtake (instead of length error when the right arg does not contain enough elements): takecut=: [ (*@[ #inv ] wrote: > On Mon, Sep 17, 2012 at 11:14 PM, June Kim (김창준) wrote: >> It's not so difficult. However, generalizing takecut into allowing 0 as an >> item in x seems

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Raul Miller
On Mon, Sep 17, 2012 at 10:16 PM, Ian Clark wrote: > Format is a pre-existing addon category. It plays host to Henry's > printf utility, and seems the obvious place for zulu. But my lab just > happens to be the first released in that category. No, the name > doesn't give any clue to its purpose.

Re: [Jprogramming] cut y in segments of each size being x's items

2012-09-18 Thread Raul Miller
On Mon, Sep 17, 2012 at 11:14 PM, June Kim (김창준) wrote: > It's not so difficult. However, generalizing takecut into allowing 0 as an > item in x seems complicated. That is, > >3 0 2 2 takecut i.7 > +-++---+---+ > |0 1 2||3 4|5 6| > +-++---+---+ >0 0 4 3 0 takecut i.7 > +++---+-

Re: [Jprogramming] addon format/zulu

2012-09-18 Thread Brian Schott
One thing that has occurred to me is that in the early J Phrases document, they referred to certain nouns as "specimens" and maybe your nouns could build on that framework. Now that I am reminded that zulu is a phonetic name, it does not seem so bad, but until I perused your work, my only associati

Re: [Jprogramming] cut y in segments of each size being x's items

2012-09-18 Thread Henry Rich
takecut=: 0&~:@[ #inv ;@:({.&.>&1)@[ <;.1 ] The inserted empty boxes do not contain the correct shape and type, which should depend on the cut verb (< here). Henry Rich On 9/17/2012 11:51 PM, Ric Sherlock wrote: How about this... takecut=: 0&~:@[ #inv (+/\@[ e.~ >:@i.@#@]) <;.2 ]