The World’s Most Mind-Bending Language Has the Best Development Environment
Programming in the 21st Century - James Hague - August 24, 2009I highly recommend that all programmers learn J. I doubt most will end up using it for daily work, but the process of learning it will stick with you. J is so completely different from everything else out there, and all your knowledge of C++ and Python and Scheme goes right out the window, leaving you an abject, confused beginner. In short. J will make you cry.
But that’s not what I want to talk about. Though it’s a bizarre and fringe language (yet not one of those programmer attempts at high humor), J is the most beautiful and useful development system I’ve come across. I’m not talking about the language itself, but the standard environment and add-ons that come with the language.
The IDE is more akin to Python’s IDLE than monstrosities which may come to mind. There’s a window for entering commands and seeing the results, and you can open up separate, syntax-colored editor windows, running the contents of each with a keypress. It’s nothing groundbreaking, but it’s something that most languages don’t provide. And in the spirit of IDLE, J’s IDE is written in J.
(I’ll interject that J is cross-platform for Windows, OS X, and Linux, including 64-bit support, just in case anyone is preparing to deride it as as a Windows-only.)
Then there are the standard libraries: 3D graphics via OpenGL; full GUI support including an interface builder; memory-mapped files; performance profiling tools; a full interface to arbitrary DLLs; regular-expressions; sockets. Again, nothing tremendously unusual, except maybe memory-mapped files and the DLL hooks, but having it all right there and well-documented is a big win. Beginner questions like “What windowing library should I use?” just don’t get asked.
The first really interesting improvements over most languages are the visualization tools. It’s one line of code to graph arbitrary data. Think about that: no need to use a graphing calculator, no need to export to some separate tool, and most importantly the presence of such easy graphing ability means that you will use it. Once you get started running all kinds of data through visualization tools, you’ll find you use them to spot-check for errors or to get a better understanding of what kinds of input you’re dealing with. It goes further than just 2D graphs. For example, there’s a nifty tool that color codes elements of a table, where identical elements have the same colors. It makes patterns obvious. (Color code a matrix, and you can easily tell if all the elements on a diagonal are the same.)
What makes me happiest is the built-in tutorial system, called “Labs” in J lingo. It’s a mix of explanatory text, expressions which are automatically evaluated so you can see the results, and pauses after each small bit of exposition so you can experiment in the live J environment. Labs can be broken into chapters (so you can work through them in parts), and the tool for creating your own labs is part of the standard J download.
While many of the supplied labs are along the lines of “How to use sockets,” the best ones aren’t about J at all. They’re about geometry or statistics or image processing, and you end up learning J while exploring those topics. J co-creator Ken Iverson‘s labs are the most striking, because they forgo the usual pedantic nature of language tutorials and come across as downright casual. Every “Learn Haskell” tutorial I’ve read wallows in type systems and currying and all the trappings of the language itself. And after a while it all gets to be too much, and I lose interest. Iverson just goes along talking about some interesting number theory, tosses out some short executable expressions to illustrate his points, and drops in a key bit of J terminology almost as an afterthought.
If you’re wondering why I love the J environment so much but don’t use it as my primary programming language, that’s because, to me, J isn’t suited for most projects I’m interested in. But for exploration and learning there’s no finer system.
(If you want to see some real J code, try Functional Programming Archaeology.)
Categories: Blogs Programming in the 21st Century
Comments
J is just APL done in ASCII…
Posted by Cameron on 14 Sep 2009 at 07:15It’d help if they’d start by expanding “>> << Ndx Usr Pri JfC LJ Phr Dic Rel Voc !: wd Help ” to something that made sense by looking at it and reversing the order of “>>” and “<<”, geesh!
Posted by jfb3 on 14 Sep 2009 at 07:49I’ve been messing with this language over the last year or so, though not so much lately. I would LOVE to work with others using this.
Posted by Andrew Thompson on 14 Sep 2009 at 11:33Learning a language whose only implementation is proprietary seems like asking for trouble.
Posted by mjgoins on 14 Sep 2009 at 15:15There’s source code for an early implementation out there (google: early_j), along with official reference material which you do not have to pay ANSI to get a copy of but no one in the free software community has seemed very maintaining an implementation of the language.
Posted by rdm on 22 Apr 2010 at 18:04
Add comment
Erlang on Twitter
» User_4574 (Nathan Lasseter): Dear Haskell, your pattern matching sucks. Go talk to Erlang, he’ll tell you how to do it right. That is all. Thanks.
» YSI_JAMBI (YSI Chapter JAMBI): Oyoy pening galo hhha RT @doni_erlang
» dooridho (Ridho Septiansyah): Hhaa datangla boy,texas “@doni_erlang: @dooridho : bukan,maulid td na dtg dak kw?”
» dooridho (Ridho Septiansyah): Dtglah boy? Kau ngapo dak pernah les lg? “@doni_erlang: @dooridho : kw td datang dak?”
» dooridho (Ridho Septiansyah): Apo boy? “@doni_erlang: Boy @dooridho”
» xHamidR (Hamid): Frans maakt mij echt boos altijd moet k erlang voor leren
» takabow (takabow♨): RT @bestjobsonline: Senior Erlang Engineer - relo to SF available - http://t.co/BaKJm1J3 #jobs #CyberCodersEngineering #NewYork
» kuenishi (UENISHI Kota): RT @bestjobsonline: Senior Erlang Engineer - relo to SF available - http://t.co/BaKJm1J3 #jobs #CyberCodersEngineering #NewYork
» obin94 (Muhhamad obin): saya dan dewa erlang sedang menuju ke langit untuk bertemu dewa hujan.
Statistics
Number of aggregated posts: 10456
Number of comments: 1447
Most recent article: February 06, 2012
Latest comments
» swishathy on Java And Threads (Jetty): <iframe width=“420” height=“315” src=“http://www.youtube.com/embed/kjGHiRGHyW0” frameborder=“0” allowfullscreen></iframe> <object width=“420” height=“315”><param name=“movie” value=“http://www.youtube.com/v/kjGHiRGHyW0?version=3&hl=ru_RU”></param></param></param><embed src=“http://www.youtube.com/v/kjGHiRGHyW0?version=3&hl=ru_RU” type=“application/x-shockwave-flash” width=“420” height=“315” allowscriptaccess=“always” allowfullscreen=“true”></embed></object> …
» vindisesl on Pretend This Optimization Doesn't Exist: I completely agree with you. I really like this article. It contains a lot of useful information. I can set…
» simple smile on Scale means Skills: Very informative article. Pretty sure people would love to go to that place for shopping. Specially to those who are…