Live data from Hacker News

Manipulate Functions with the J Language

adamtornhill.com

1–10 of 34 posts

Re: Manipulate Functions with the J Language

#2
Interesting article. I'm playing with J currently and it is one powerful, yet difficult to learn language. Simple things are simple, but being able to efficiently chain trains of verbs together and think not in terms of loops and normal data structures, but arrays and math/matrix operations takes some training and time to get used to. I'd like to keep it up to obtain a powerful data analysis tool in my arsenal, but I want to make sure there are enough J & APL developers to make sure it is worth it. The language itself is amazing, but if there aren't enough developers you start to suffer from lack of libraries and you end up back in JS/Java/Python/Perl land.

Re: Manipulate Functions with the J Language

#3
The problem I've seen with these languages is they are tough to debug syntax and semantics errors. A typed array programming language would be interesting. When are J or APL expressions well-formed and would some kind of type system help incrementally build and compose expressions?

Re: Manipulate Functions with the J Language

#5
post #4

What's the advantage of using array programming versus using list/array types in other languages? Nothing I saw in this article seems particularly unique to J except the syntax.

I'd take this a step further and say the website for J language doesn't move a finger to entice anyone to learn the language or use it.

I don't know if it's academia or what - but if I spent the effort on creating a whole programming language that I believed was actually good - I'd have a very different front page.

Re: Manipulate Functions with the J Language

#6
post #4

What's the advantage of using array programming versus using list/array types in other languages? Nothing I saw in this article seems particularly unique to J except the syntax.

I think the advantage is that you end up with much terser programs because you don't have to explicitly declare everything as an array.

Re: Manipulate Functions with the J Language

#7
post #4

What's the advantage of using array programming versus using list/array types in other languages? Nothing I saw in this article seems particularly unique to J except the syntax.

I'd take this a step further and say the website for J language doesn't move a finger to entice anyone to learn the language or use it. I don't know if it's academia or what - but if I spent the effort on creating a whole programming language that I believed was actually good - I'd have a very different front page.

It was probably fine in the 90's when I'm guessing it was written. I personally think the minimalistic design is great, which is a trait of both the language and community. The problem is different parts of the site have different and inconsistent menus, so navigation can be cumbersome at times.

Re: Manipulate Functions with the J Language

#8
J is a beautiful, beautiful language. It is quite hard to learn -- as a benchmark, I'd say Haskell is easy by comparison -- but once you reach a critical mass of knowledge it can more addictive, and more fun to program in, than anything else I've tried.

While J is fast, and can be practical, I would never recommend it for that reason, if only because it's so niche. But if you want to glimpse what a small sliver of all possibility the world of your day to day programming is, you will love J.

Re: Manipulate Functions with the J Language

#9
post #4

What's the advantage of using array programming versus using list/array types in other languages? Nothing I saw in this article seems particularly unique to J except the syntax.

Probably the built in support for vectorization, which reduces the amount of code you need to write, and allows your code to be closer to mathematical expressions. Of course there are other languages like R, Julia and Fortran that also have built-in vectorization, and Python adds that with the Numpy library. It makes certain operations much easier to express than with your normal lists/arrays. That's why the Python scientific stack is built on top of Numpy arrays, and not the builtin data structures.

You can compare it to regular expressions for manipulating text.

Re: Manipulate Functions with the J Language

#10

The problem I've seen with these languages is they are tough to debug syntax and semantics errors. A typed array programming language would be interesting. When are J or APL expressions well-formed and would some kind of type system help incrementally build and compose expressions?

J syntax is very strictly enforced; the rules for verbs are unambiguous and fairly easy to parse as a human. The difficulty arises in learning and committing these rules to memory.

For example, every verb is infix, but the right side is evaluated before the left. thus expressions like '2+34' is unambiguously different from '43+2' (the former evaluates to 14 while the latter is 24). J is a language similar to C in that it will oftwn assume you meant what you typed, but has much less undefined behavior.

Re: types, J has a type system, albeit most are numeric (support for complex and rationals are built in). I dont, personally, imagine a type system akin to Haskell or Ocaml would benefit J greatly. Almost every verb in the language is overloaded with respect to the numeric types, thats why addition works as it should with ints, floats, complex, and rationals. Whats more, it handles all that stuff in the underlying system, so that everything works together correctly (coercion and whatnot). A type systen would introduce complexity and virtually nothing more to an already complex language.

Post reply on HN