5 ms·
Complete shit. C was a mature language in 1989. Even for banging out a quick hack, and forgiving the gets into a 99 byte stack array, this is crap by any standa
by cplease 12y ago
Complete shit. C was a mature language in 1989. Even for banging out a quick hack, and forgiving the gets into a 99 byte stack array, this is crap by any standard.
I can compile and run pretty much any K&R code from the C Programming Language in 1978 with no problem. Finding the appropriate compiler, I can do the same with BCPL, the Language and its Compiler (1981). And the code is actually understandable.
This, on the other hand, is an obfuscated mess that segfaults on any input, J or otherwise. I'll be damned if I spend 5 minutes debugging it, ex() segfaults with infinite recursion. It's not worth the trouble.
Not saying this isn't worth sharing as a curiousity or an artifact, but this is not a work of genius and it is not defensible or to be emulated. Do your colleagues a favor and don't write like this.
- avmich 12y ago> Do your colleagues a favor and don't write like this. I'd second this - in any normal situation. If you're really aspiring to form the future, strive to be extremely productive, demands that from your colleagues - that's another thing. Sigh - industry as a whole isn't nearly on the level to use those advanced tools.
- cplease 12y ago>Sigh - industry as a whole isn't nearly on the level to use those advanced tools. Is this a parody? Is J a language for writing personal code with personal meaning only that you can only run in your head? There is nothing professional about this. Sounds more like a mental illness.
- avmich 12y agoI once needed to develop an algorithm for a underspecified task. Something like "generate a real-looking map of the floor - with walls, windows, doors, corridors..." . Took me 40 minutes to try several variants in J. Then some 3 hours more to complete C# code. I don't know how long it would took if I'd experiment directly in C#. Probably not too long - but iterations would surely be more painful; too much boilerplate code. In my experience, J is closer to thought process than many other languages. Really. You just have to try - and get used a little bit.
- cplease 12y agoThere's a reason that APL never gained a foothold and J has not been adopted by software engineers. You can program at the speed of thought in TECO as well, but the reasons for its limitations and peculiar history vanished long ago. There are far better tools available these days for rapid prototyping; interpreted languages with REPLs and libraries for just about everything--without resorting to a write-only line-noise language and actually ending up with a usable product. For that matter, I suppose it's possible to write understandable, maintainable TECO, APL and J with some effort if you don't value obscurity and cleverness over simplicity, correctness, maintainability and understandability. If your business logic or product is written in line noise written by some lone J genius, your company is fucked when your guy inevitably gets hit by a bus, goes nuts, or leaves for greener pastures.
- avmich 12y agoPerhaps "Notation as a Tool of Thought" - http://www.jsoftware.com/papers/tot.htm http://www.jsoftware.com/papers/tot.htm - could help you, if you want to understand why people keep writing APL and its successors? Like Mathematica, for example?.. Do you think mathematical articles are understandable and maintainable? What if there is not a lone J genius, but a whole - small - department of people, who spend time actually thinking and talking about computations, not the ways to express it?
- scottlocklin 12y agoI've been screwing around with it in my spare time. J is quite logical and understandable. Anyone can understand it, but they have to make an effort to do so, just like they would if they were learning some other "weird" language like Lisp or Forth.
- beagle3 12y ago> There's a reason that APL never gained a foothold APL was widespread in operations research in the 80s, and since the early 90s is usually found in and around finance, even though it isn't really common anymore. Part of it is a mindset thing; People used to consider longer employment periods, both from the company's perspective and from the employee's perspective. Although APL is extremely useful when you use it properly, it is definitely not a "programmer-is-a-replaceable-cog" language that Java strives to be and the most firms now assume.
- jpfr 12y agoIt's different. But it is definitely not shit. The majority of use shouldn't write code like this. But those who can create amazing things. Here's a working adaptation that is quite close to the original. https://github.com/tangentstorm/j-incunabulum/blob/master/mj.c https://github.com/tangentstorm/j-incunabulum/blob/master/mj... A current version of the k language still has traces of it inside. And there are still people on Wall Street running mission critical systems with it. http://kx.com/q/c/c/k.h http://kx.com/q/c/c/k.h The kona project attempts an open source implementation. And they give some rationale on the paricular coding style. https://github.com/kevinlawler/kona/wiki/Coding-Guidelines https://github.com/kevinlawler/kona/wiki/Coding-Guidelines