logo       

RE: Lack of software abstractions: msg#00224

lang.j.general

Subject: RE: Lack of software abstractions

After I close J and reload the script with your code having put a NB. in
front of save f I have:
f
c:\j601\temp\X.jkf
load f
|domain error: load
| load f
FNAF_floop_
restore my value!

Not quite that simple I suppose...

Paul Gauthier
APL Software Developer - Senior
pgauthier-oQFXY4Vn4Wdl57MIdRCFDg@xxxxxxxxxxxxxxxx
Phone: 312-739-3467
Fax: 312-739-3496

CheckFree. The Company that Powers Payment on the WebSM.
http://www.checkfree.com/paybillsonline




Dan Bron <jf-pk/dOXfYWDBeoWH0uzbU5w@xxxxxxxxxxxxxxxx>
Sent by: general-bounces-eCoxsOKuxbJl57MIdRCFDg@xxxxxxxxxxxxxxxx
01/26/2007 03:15 PM
Please respond to
General forum <general-eCoxsOKuxbJl57MIdRCFDg@xxxxxxxxxxxxxxxx>


To
general-eCoxsOKuxbJl57MIdRCFDg@xxxxxxxxxxxxxxxx
cc

Subject
RE: [Jgeneral] Lack of software abstractions






Joe Tibollo wrote:
> Having to write a function to query all locales
> and package all objects to a single file is a serious undertaking
>
> I don't think it is all that trivial.

I disagree. It is not a serious undertaking, and it is trivial. It
took me 6-8 minutes and 3 lines. Here:

require'keyfiles'
save =: (<@:[ keycreate) (3!:1@:(5!:1)@:] keywrite
,)"0 ;@:((]
, '_' , [ , '_'"_) L: 0 verb : '<nl__y $~0'"0)@:conl bind ''
load =: < (] 4 : ('(x) =: y 5!:0';'1') :: 0:&>
(3!:2&.>)@:keyread"1@:,.) keydir


f =: jpath'~temp\X.jkf'

FNAF_floop_ =: 'my original value'
save f

FNAF_floop_ =: 'restore my value!'
load f
1 1 1 1 1 ...

FNAF_floop_
my original value

> that is why it still has yet to be done...

It has yet to be done because that's not how we do it in J. That's
how you do it in APL. In J, we use script files.

If you want, we can discuss the relative merits of the two approaches.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise