This is the archived website of SI 413 from the Fall 2012 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.
J was designed in 1990 by Iverson and Hui. This is direct descendant of APL (A Programming Language), which uses a paradigm called array programming in which every operation is applied by default in parallel to an entire array of data. These languages are usually very terse and well-suited to mathematical and financial applications.
The J interpreter, version 602, is installed for you on the CS Linux
environment. This is also available for other platforms, from
I will use the
command to test your code, but you are encouraged to use the GUI,
jwd, for development.
You should create an argument-free function
to run your program at the top level.
Save your program in a file called
I will test your code in the same environment as the lab
machines in MI 302, using the command
echo "main" | jconsole proj.ijs
So for example, the 99 bottles of beer program, for my purposes, would be written as
bob =: ": , ' bottles of beer'"_ -. 1&= # 's'"_ bobw=: bob , ' on the wall'"_ beer=: bobw , ', '"_ , bob , '; take one down and pass it around, '"_ , bobw@<: main=: beer"0 (- i.) 99