Hello Bill,
Hehehe, you noticed it too? Yep ... this style is actually mandated by the
president of the company. :)
Don't ask me how it came about ... it’s a long story of a struggle that would
make the Harry Potter series a footnote. :P
So what happened is my startup.ijs script file looks like this:
cocurrent 'z'
load 'files dir debug misc primitives'
load 'E:\Projects\SmartEOE\bin\eoe.ijs'
load jpath '~Projects\eoe2\eoe2.ijs'
load jpath '~Projects\eoe2\eoex.ijs'
load jpath '~Projects\eoe2\eoeproplan.ijs'
load jpath '~Projects\eoe2\uas.ijs'
As you can see, I have 5 library files of "special" methods (i.e. progressive
sums, consolidations, pert methods, etc) to hide from .NET developers the
actual J scripts.
Still, it works, because of the readability ... some of the C# developers
actually finds out the problem with the data by looking at where J would throw
the error without involving me. Actually, I just got a Jr developer assigned to
me to learn J using the primitives and after 4 months ... he's now an
invaluable help with our ERP development. :)
Still, I sometimes miss doing:
+/ 3 {. "1 i. 5 5
Instead ... I have to write it this way
sum across (integers 3) colsfrom integers 5, 5
otherwise ... I'm the only one who's going to know what the heck I was doing.
Hahahahahahahaha. =)
r/Alex
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bill lam
Sent: Thursday, December 27, 2007 12:05 PM
To: Beta forum
Subject: Re: J Debugger (WAS: RE: [Jbeta] Deleting temporary files)
AFAICS this style making use cover name for nearly every primitive
verb/conjunction, and remotely resemble any J code I've ever seen. Apart from
readability problem, a side effect is that possible special code is defected.
Is this style of coding mandated by your corporation bureaucrats?
Alex Rufon wrote:
> Hmmm.
>
> I am heavily dependent on the J debugging system. I believe that I would
> never have come this far without it.
>
> The thing is, I tend to write J scripts in a verbose way and to give you an
> idea, here is a sample script which takes data from an MS-SQL stored
> procedure and returns a heterogeneous array for use by a C# application.
>
> NB. =========================================================
> NB.*syncArticles (v) synchronizes articles against bom details
> NB.
> NB. y is name of articles and BOM
> NB. returns a converted array
> syncArticles=: verb define
> NB. STEP 1: Get the passed parameters
> 'articles bomdetails'=. 2 take y
> 'artf artv'=. 2 take articles
> 'bomf bomv'=. 2 take bomdetails
>
> NB. STEP 2: First pass, remove all non matching details
> header=. 2 drop take bomv
> NB. NOTE: Use this code if your using the DESCRIPTION
> arts=. ravel curtail (1 colsfrom artv) atop tomatrix header
> NB. This code is using the COLOR_CODE
> NB. arts=. ravel curtail (searchLOOKUP format each 1 colsfrom artv) atop
> tomatrix header
> NB. Update the local variable with valid data
> mask=. increment indices header in arts
> bomv=. (2 take rank 1 bomv) aside drop arts atop mask colsfrom 2 drop rank 1
> bomv
>
> NB. STEP 3: Second pass, rearrange the data columsn
> header=. 2 drop take bomv
> NB. Make sure that we remove the non matching articles
> mask=. increment bx not arts in header
> if. tally mask do.
> fxart=. arts replacecols mask;0
> else.
> fxart=. arts
> end.
> NB. We reorganize the columsn
> mask=. ((box header) indexof every fxart)
> result=. (2 take rank 1 bomv) aside arts atop drop mask colsfrom 2 drop rank
> 1 bomv
>
> NB. Now convert to a valid format for C#
> boxedlist2mat numbers2sqldata bomf;result
> )
>
> You see, for me, the debugger is an indispensable tool when debugging complex
> J application.
>
> r/Alex
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Björn Helgason
> Sent: Thursday, December 20, 2007 12:54 AM
> To: Beta forum
> Subject: Re: [Jbeta] Deleting temporary files
>
> I decided I wanted to give debug a go
>
> Started debug and set the stops on the moo verb
>
> load 'c:\users\bjorn\j602-user\temp\1.ijs'
> 13!:3 '* 0:0'
> moo 10 10 10 10
> |stack error
> *coname[0]
>
> I can not remember any case where debug has helped me nor trace for that
> matter
>
> I love the trace and being able to step through C in the visual studio
>
> If anything similar could be done involving J I would really love it
>
> A beautiful application like moo is very few lines but lots of operations on
> each and it would be marvelous to be able to see it in action step by step
>
> 2007/12/19, Björn Helgason <[EMAIL PROTECTED]>:
>> I have to say that I may have misunderstood the project manager.
>> I may have tried it a long long time ago and it did not help me then.
>>
>> If it will help with debug and trace I am all for it.
>>
>> As much as I like to perform trace and debug in C the debug in J I
>> have never been able to let it perform the way I want it.
>> I more or less wind up with sticking smoutput here and there in the
>> code instead.
>>
>> I do like to create scripts and let them build up gradually and I
>> never keep them in temp unless I want them to accidentally disappear.
>>
>> I do use a lot of files in temp but only temporarily and I always
>> expect temp stuff to not contain anything of permanent value.
>>
>> 2007/12/19, Chris Burke < [EMAIL PROTECTED]>:
>>> Oleg Kobchenko wrote:
>>>> It would be useful if interested J users would share their order
>>>> of use cases for J environment. Here's mine:
>>> My own use is quite different. There are just two choices - if I
>>> don't need to keep a script, it will be created in temp, and blown
>>> away when I
>>>
>>> do a periodic clean up of temp. Otherwise, the script goes into
>>> project manager.
>>>
>>> I have a large number of projects, many of which are simply
>>> collections of related scripts, and not single applications. In
>>> effect, I distinguish the various cases you listed as belonging to
>>> different projects. This is also why I have no qualms about deleting
>>> all files in temp.
>>>
>>> I see project manager as being a J source code manager, and perhaps
>>> the name "project manager" is misleading. I also see it as being
>>> part of the J session - rarely do I use J without it.
>>>
>>> It sounds like there is a need to better integrate project manager
>>> (or its successor) into the session. Incidentally, my goal for the
>>> next release (603) is to rework the IDE, specifically the session,
>>> debug, and project manager - so suggestions are welcome.
>>>
>>> --------------------------------------------------------------------
>>> -- For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>>
>>
>>
>> --
>> Björn Helgason, Verkfræðingur
>> Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
>> 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
>> Skype: gosiminn, gsm: +3546985532
>> Landslags og skrúðgarðagerð, gröfuþjónusta
>> http://groups.google.com/group/J-Programming
>>
>>
>> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari
>> einfaldleikans
>>
>> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>> /|_ .-----------------------------------.
>> ,' .\ / | Með léttri lund verður |
>> ,--' _,' | Dagurinn í dag |
>> / / | Enn betri en gærdagurinn |
>> ( -. | `-----------------------------------'
>> | ) | (\_ _/)
>> (`-. '--.) (='.'=)
>> `. )----' (")_(")
>
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> Skype: gosiminn, gsm: +3546985532
> Landslags og skrúðgarðagerð, gröfuþjónusta
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
> /|_ .-----------------------------------.
> ,' .\ / | Með léttri lund verður |
> ,--' _,' | Dagurinn í dag |
> / / | Enn betri en gærdagurinn |
> ( -. | `-----------------------------------'
> | ) | (\_ _/)
> (`-. '--.) (='.'=)
> `. )----' (")_(")
>
>
> ------------------------------------------------------------------------
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm