Eric,

Please disregard my complaints copied below. I (finally) discovered my 
problem...

For those reading this and shaking their heads, it is a problem that is 
a bit tricky to find and someone else may experience a variation on it. 
The etymology of the (my) error is that I had developed a verb in 
version 504 (and continue to use that version on an old server) that 
splits up large mail files, finding the beginnings of messages and 
breaking the file into pieces smaller than some fixed size.

It was added at the end of my quedprof.ijs file and was defined thusly:

      msplit =: 3 : 0
   1e8 msplit y
:
   bs =. x. + spltno =. fp =. # buf =. ''
   fs =. fsize fn =. y
while. (0 < rl =. bs <. fs -fp ) do.
   buf =. buf, ir fn ; fp, rl
   fp =. fp + rl
   wii =. {: (bs > ii) # ii =. I. (LF,'From ') E. LF, buf
echo (#buf), wii, (0 ~: {. ii) # '** Corrupt Buffer **'
   (wii{.buf) fwrite 'split', ": spltno =. >: spltno
   buf =. wii}.buf
end.
   buf fappend 'split', ": spltno
)

I finally discovered that if I did the

18!:4<'base'                     NB.  cocurrent'base'
('jkt';18!:2<'base')18!:2<'base'  NB.  ('jkt';copath'base')copath'base'


explicitly in my failing session, things seemed to work. That lead me to 
realize that something must have broken in the course of loading the 
profile quedprof.ijs ... So I pasted the above definition into the 
crippled environment and got:

|spelling error
|   bs =. x. + spltno =. fp =. # buf =. ''
|         ^
|   msplit=:    3 :0


The problem was suddenly clear! I had failed to convert an x. to x (I 
did fix the y.s) in this verb that was tacked on to the script that had 
been working for years, and this caused the script to fail before the 
final steps. I'm not sure what might make this an easier problem to 
solve, but I can vouch that it puzzled me more than I like - and I can 
imagine other people struggling with it too.

I know that a decision was made long ago to flag such errors when the 
definition was happening, but in a case like this, it would be much more 
convenient if the error was deferred until the verb was executed...

Apologies for all the noise ....

- joey


On 2011/11/02 21:43 , Joey K Tuttle wrote:
> On 2011/11/02 17:20 , Eric Iverson wrote:
>> I'll add this to our list of bugs to investigate and fix for 702.
>>
>> On Wed, Nov 2, 2011 at 7:32 PM, Joey K Tuttle<[email protected]>   wrote:
>>
>> .....
> Eric,
>
> Great!
>
> Here is another one to add to a related list... Actually perhaps more
> related to the "local packages" thread...
>
> I use the profilex.ijs facility to have j put things where I want them
> and bring in a bunch of stuff I've accumulated for 20 years (not really
> as large as it sounds... :) The last (actually, all of the active) lines
> of my profilex.ijs are:
>
> user=.   home,'/Documents',userx   NB. profile default - edit to change
> break=.   user,'/break'
> snap=.    user,'/snap'
> temp=.    user,'/temp'
> config=.  user,'/config'
>
> NB. Bring in local profile
>
> 0!:0 :: ]<BINPATH,'/quedprof.ijs'
>
> While the first and last lines of quedprof.ijs are:
>
> NB.  create / cd to jkt locale
> 18!:4<'jkt' NB. doing this explicitly because we are "pre-boot"
> COCLASSPATH=: 'jkt';,'z'
> NB.  coclass'jkt'
> NB.
>     ... elided ...
>
> NB.  now change back to the 'home' locale&  add jkt to its path (again
> explicitly)
> 18!:4<'base'                     NB.  cocurrent'base'
> ('jkt';18!:2<'base')18!:2<'base'  NB.  ('jkt';copath'base')copath'base'
>
>
> This all works as I expect in Linux, but in OSX, the insertion of my
> locale into 'base" fails. Here are examples of what happens -
>
> In Linux -
>
> jkt@set1:~$ ja
>      version
> 3 : 'JVERSION, NL, (host ''cat /proc/version''), 2!:0 ''echo `java
> -version 2>&1`'''
>      version ''
> Engine: j701/2011-01-10/11:25
> Library: 7.01.045
> Platform: Linux 64
> Installer: j701a_linux64.sh
> InstallPath: /usr/local/lib/j64-701
> Linux version 2.6.32-24-server (buildd@yellow) (gcc version 4.4.3
> (Ubuntu 4.4.3-4ubuntu5) ) #43-Ubuntu SMP Thu Sep 16 16:05:42 UTC 2010
> java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.9)
> (6b20-1.9.9-0ubuntu1~10.04.2) OpenJDK 64-Bit Server VM (build 19.0-b09,
> mixed mode)
>
> In OSX -
>
> iMi7:~ jkt$ j64
>      version
> |value error: version
>      version_jkt_
> 3 : 'JVERSION, NL, (host ''sw_vers''), 2!:0 ''echo `java -version 2>&1`'''
>      version_jkt_ ''
> Engine: j701/2011-01-10/11:25 build: Feb  6 2011 16:16:29
> Library: 7.01.043
> Platform: Darwin 64
> Installer: j701a_mac64.dmg
>
> InstallPath: /Applications/j64-701
> ProductName:    Mac OS X
> ProductVersion:    10.6.8
> BuildVersion:    10K549
> java version "1.6.0_26" Java(TM) SE Runtime Environment (build
> 1.6.0_26-b03-384-10M3425) Java HotSpot(TM) 64-Bit Server VM (build
> 20.1-b02-384, mixed mode)
>
> So, the question is, what is different when starting things in OSX
> versus Linux? Why doesn't the copath insertion work??
>
> - joey
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to