Amelia,

I believe you picked this read/evaluate/print/loop (REPL) problem because you 
perceive it to be the trivial, standard, "hello world!" program, and you're 
used to using it to learn new programming languages.

I'm here to tell you that this is NOT the way to learn J, and neither is REPL a 
trivial program in J.  The verb you quote below isn't J.  It's C, pretending to 
be J.

If I'm wrong, and your goal truly is to write REPL programs, then I suggest you 
choose a different programming language.  But if I'm right, and you're just 
trying to learn J, then I suggest you choose a different problem.  

J is an array oriented language.  It is happiest when it can work on a bunch of 
data at once.  It doesn't work (well) on streams, it works (heroically) on 
blocks (aka files).   So your toy J program should really get its input from 
files, not user interaction.

As I suggested yesterday, you'll find Henry Rich's "J for C Programmers" 
enlightening and entertaining.  You'll get a lot of value out of it.  It's 
available here:

   http://www.jsoftware.com/help/jforc/contents.htm

if you want to read it offline, it's already on your system.


In the J window, press the F1 key.  That'll open the J documenation in your 
browser.  At the top of the page, you'll see a list of links: click on the one 
entitled  JfC  .  

Alternatively, if you want to read JfC on paper (truly offline), you can 
download a PDF or the original word document:

   PDF:  
http://www.jsoftware.com/jwiki/HenryRich?action=AttachFile&do=get&target=JforC20060721.pdf
  

   Word:  
http://www.jsoftware.com/jwiki/HenryRich?action=AttachFile&do=get&target=JforC20060720.doc

and print it out.

If a whole book is intimidating, then try the nice, brief, J Primer:

   http://www.jsoftware.com/help/primer/start_here.htm

press the  >>  link to go from page to page.  The primer is also on your 
system, it's the entitled  Pri  in that list of links.

Subsequent or in parellel to that, try going through the introductory J labs.  
Labs are interactive, which walk you through examples of J, and allow you to 
experiment.  Open the J menu item  Studio>Labs  and select  "Language"  from 
the dropdown.  Go through the labs in that category.  

I strongly recommend you read up.  Until you understand what's problematic with 
statements like  "I don't want to define a verb" and questions like " Is there 
a way to make a program run without having to supply it with a value like 
that?" you'll never be able to write programs in J. 

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

Reply via email to