J Has the Best Development Environment (2009)
prog21.dadgum.com
prog21.dadgum.com
Since then the priority has been for J to be platform independent, but it's resulted in some big steps backward for beauty and usability. That's for the environment only--not the language.
Among my favorite parts of the language is the sole set of vocabulary[0] that you have to learn to be proficient in J. It's daunting at first, but after this "alphabet" is internalized, you can understand most code. Just as our integral symbols save us from writing out "Integral()", J's operators are shorthand for fundamental computational functions. For example, here's a very naive kNN implementation in J, without pulling in any "jlearn" external libraries or anything:
https://github.com/wyc/snippets/blob/master/j/knn.ijs
One of the stated purposes of J is the clear expression of algorithms. How are you supposed to clearly do that with layers upon layers of abstractions? The language excels at matrix and statistical operations on sets of homogeneous data. Many financial institutions deploy J's close sister, K (also a descendant of APL) coupled with KDB[1].
Does it have potential for use on "Big Data"? Maybe. It's not SMP, but the interpreter is rather light, so it can be spun up in multiple processes. Cutting up the data correctly is still a problem. I would also not use J to write a webapp; CRUD isn't its strong point.
Some more examples of J: https://github.com/wyc/snippets/blob/master/j/jtalk/examples...
Come hang out at #jsoftware on freenode to find people much more knowledgeable than me. :P
[0] http://www.jsoftware.com/help/dictionary/vocabul.htm
[1] not the kernel debugger, but the time-series K database: http://kx.com/kdb-plus.php
I recently wrote a discrete wavelet transform algorithm in J. It took 4 lines. I could probably have done it in 1. Granted it took me a while to write these 4 lines, but it's pretty cool being able to take the whole thing in at a glance.
While I was at it, I wrote my own query system for a much larger than memory dataset; that part only took a few minutes.
One of the great things about J: it teaches you to appreciate the matrix subsystems of things like R. You can do a lot of J in R if you stay away from data.frames.
Oh yeah, while the IDE is pretty nice, I use it in emacs.
Some resources: Minimal J for beginners: http://www.jsoftware.com/jwiki/DevonMcCormick/MinimalBeginni...
A more wordy vocabulary for beginners: http://www.jsoftware.com/jwiki/NuVoc
So, what to do?
I'm beginning to think approaching it more like a foreign language will make more sense - i.e., reading & spaced repetition of phrases (short programs - J's specialty!) / vocab (useful hooks, forks) using a flash card system.
It's a compelling language to learn (even just for the fact you can pretty much program using a pen and paper while waiting for the bus - short little rows of verbs you build out gradually as you reason about it or type them in your iphone), and I hope my approach has merit.
That one still looks very cryptic, though.
I'd say that you need to know about hooks, forks (trains in general) and ranks before starting to learn the vocabulary. But maybe you can learn those things along the vocabulary too.
b=: ? 1000 1000 $ 10
+/+/b
These two lines create a 1x10^6 element array and then sums the columns, and then sums the single row total. Fast. These guys have really distilled the libraries and made them work well with J (lapacke c interface to lapack). You get c speeds from an interpreter. I guess this is why q with kdb+ is used so much by the finance community despite how expensive it is.
Anyway, I am currently staying with J, and I am writing my little tasks in J and julia to see how they fare against each other in speed and development efforts. Now that I have the knowledge to do Qt interfaces for J, I may just stick with J for the sheer joy.You're probably aware since it's not a big community, but the 32-bit version of kdb+ is available for free now for any purpose. The 64-bit version still cost an arm and a leg, and I'm sure they're relying on most use cases for the language requiring more then what you can fit into 32-bit address space.
For my purposes, kx got it entirely right: I can barely scratch my own nose with <2 GB of data. :)
What? I have considered that standard for all the languages that have an interpreter (which is roughly, everything except C,C++,C#, Java).
$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> var seq = Enumerable.Range(0, 100);
csharp> var mod17 = from num in seq
> where num % 17 == 0
> select num
csharp> foreach (var n in mod17) {
> Console.WriteLine(n);
> }
0
17
34
51
68
85
csharp>On a totally different topic, are you Avshalom as well on #emacs on freenode? If that's the case I once spoke to you about improving how ESS shows graphics - something I haven't worked on further, sadly.
The stuff from Jim Jarmusch is rather nice.
If you're doing web apps, it's probably worth a try provided you don't mind writing your own libraries for a lot of stuff.
It's a shame that REBOL was open sourced a decade and a half too late. Back when Perl was still king of scripting languages and Python/Ruby etc. hadn't taken over for Perl yet, REBOL could have had success. The community was fun and creative and the implementation seemed like it would be small and able to be improved through open source.
Just checked, and the repository hasn't had a checkin for 7 months:
And there are alpha versions that run on Android - http://rebol.informe.com/blog/2013/04/15/rebol-3-on-android/
But yes still got some way to go. Good news is that there are versions for Windows & Linux - http://atronixengineering.com/downloads.html
A few people have tried to keep it going, there is even a version for Android, but there have been no commits for over a year.
Rebol 3 ("alpha version") is open-sourced under Apache 2.0 license; most recent commit is dated Mar 04 2014; not quite yesterday, but certainly not "over a year ago". See:
https://github.com/rebol/rebol
As to Red, it is a totally separate project, kinda rewrite from scratch of Rebol (started when Rebol 3 was still closed source and seemed dead), and although still not complete, looks very lively:
-- see also the pretty status/completion tracking graphs for Red at:
The main Rebol repo (https://github.com/rebol/rebol) keeps getting blocked due to a lack of stewardship :(
At some point this will be fixed. As a stop gap Rebolsources was created and was used by community to filter changes through to main repo. See https://github.com/rebolsource/r3 & http://rebolsource.net/
There are two other versions maintained by two commercial entities:
* Saphiron - http://development.saphirion.com/
* Atronix Engineering - http://atronixengineering.com/
Both are fixing/improving Rebol 3 whilst also developing the R3-GUI (Saphiron work on Windows version while Atronix ported it to Linux desktop).
Unfortunately the Saphiron development isn't kept public so the repo (https://github.com/saphirion/saphir) isn't up-to-date. Atronix is probably the best place to look at this moment (https://github.com/zsx/r3). The last commit was only 6 days ago.
J's syntax, where everything is a single character, kind of turns me off. Is that incidental or is the syntax essential to the language? (In the case of Lisp, the "weird" syntax isn't incidental but rather essential, since code is data)
If it's incidental, I'd like to see some elegant J programs "written out" with some more friendly syntax.
EDIT: If you want a laugh, download the source for J, and run wc -l .c .h.
http://www.infoq.com/presentations/j-language
Or, perhaps, this chapter of the (rather dense) "Learning J":
As someone versed in both APL and K/Kona, J's syntax puts me off as well.
APL has a better mental "feeling" for me, more like mathematical symbols. Oftentimes, these are pretty direct.
Want to drop the first element of a vector?
APL: 1 ↓ 1 2 3 4 5
J: 1 }. 1 2 3 4 5
The APL version looks like a drop to me. The J version looks like two characters that I have to remember the meaning of.
I'm sure if I was deeply proficient at J, the two-characters would stand out by their meaning, but it's hard for me to get that far when APL is so much cleaner for me to read.
The language need the aliases to be learnable.
1 drop 1 2 3 4 5 NB. this is how to comment
2 3 4 5 NB. drop is }. in J
Exactly how did it 'flop'? Popularity, or your understanding of it?Math symbols are cryptic, and Math is not popular, but I would not want to write:
"The derivative of x with respect to t" everytime instead of, dx/dt everytime I needed to write a formula.
I am sure beginners find 'for' ambiguous unless they have experience with programming as in 'for i = 1 to 10'. It's syntax you are highlighting, not meaning. People extoll the brevity of Haskell, and other functional languages, because they take the time to understand its syntax. J has been around a lot longer, and was created by some very smart people. I didn't choose it for its job market or popularity, but to expand my mind, and further my mathematics studies.
Most things in J are actually two characters, take a look at the Vocabulary (http://www.jsoftware.com/help/dictionary/vocabul.htm)
> I'd like to see some elegant J programs "written out" with some more friendly syntax
The problem with J is that the syntax is highly context sensitive, not the length of identifiers. See here: http://www.jsoftware.com/jwiki/Guides/Language%20FAQ#Guides....
Also, you can use aliases for every word, which are defined in stdlib. You can write "each", "cut" etc. if you want. The reason nobody does that is a little complex.
J is suited for exploratory programming and rapid prototyping. This means that expressive power per character should be as high as possible - and J delivers on this promise. Also the standard J words you can see in the Vocabulary are all there is to J. Everything else is always defined in terms of those and you can't define words with symbolic names, like you can in Haskell, OCaml etc. - so once you know those, you can say you know the language. And as for reading J code, it's meant to be read with the help of the J system: you have at least three possible representation to choose from when viewing J code, and you have ability to evaluate each subexpression to see what it does.
Anyway, J is hard to learn, but after initial hump it's a pleasure to write, and then after a while it becomes possible to read it. In exchange for this difficulty level you get incredible expressive power and performance.