Ask HN: Help me find an exotic programming language to learn next
I have written code in these languages, in order of experience:
- PHP, Javascript. Java, Python, Perl, C
I've been doing some random walks on the massive list of programming languages on Wikipedia and I've found a few interesting choices. Here is a small list:
- Cofeescript http://coffeescript.org/
- Fantom http://fantom.org/
- HaXe http://haxe.org/
- Neko http://nekovm.org/specs
- K http://en.wikipedia.org/wiki/K_%28programming_language%29
- Factor http://factorcode.org/
- Ragel http://www.complang.org/ragel/
I think learning a niche language will be fun, could give me a different perspective than the procedural and OO languages I've used so far and could prove to be a valuable and marketable skill in the future.
Which exotic programming language would you recommend?
65 comments
[ 3.6 ms ] story [ 126 ms ] threadLisp is a lot more exotic than you might think! What it does to your brain is unmatched!
- Cofeescript http://coffeescript.org/
- Fantom http://fantom.org/
- HaXe http://haxe.org/
- Neko http://nekovm.org/specs
- K http://en.wikipedia.org/wiki/K_%28programming_language%29
- Factor http://factorcode.org/
- Ragel http://www.complang.org/ragel/
K and Factor should teach you about composability, semantics and expressivity. I have read some about Factor and I like the philosophy. Ragel looks extremely interesting and (from this list) is probably the one I would choose.
But the languages you know already are all semantically derived from Algol. You should program a lot more stuff in functional languages. I highly recommend Haskell to anyone wanting to expand their understanding of programming languages. There's a LOT to learn from Haskell, and few other languages capture as many Things Which Are Different.
Just curious what is so nice / difficult about Haskell?
In fact, there are a lot of assumptions that Haskell throws out that you may be used to. One example is strictness. When you call a function in most programming languages, you can assume that the arguments to the function are evaluated before the function is called, but that's not necessarily true in Haskell. In fact, nothing is evaluated until its result is needed for something else -- such as adding two numbers; if you need to evaluate + (an addition), then you need to know what the values of the left and right hand sides are.
However, there are advantages to such assumption-breaking ideas. For example, you can have a function which produces an infinite data structure, and another function which consumes pieces of it at a later time. The functions need not know about each other at all. Such a system would be much more difficult to implement without this intrinsic laziness feature.
There's a lot more to learn, much of it quite mind-bending. If you grok Haskell, you won't design programs in other languages in quite the same way, because you realize what silly assumptions were being made before.
http://www.atariage.com/2600/programming/index.html
I've had the urge to homebrew an 8-bit computer from the chip up, but I don't know if I have it in me to go that deep just yet, so I'm testing the waters by homebrewing some 2600 ware first. If I like it, maybe I'll build a hardware emulator somehow (Typing that I thought of half a dozen obstacles, but hey, why not?).
Word of warning, though - 2600 programming is particularly tricky, because you only have a couple of screen buffers, and each is a byte. So when changing the background, you have to keep track of where the electron gun is and write things at the right time if you want the left and right side of the screen to be different :)
BTW, for the others following along: I've found Haskell to be hands down the most mind-bending of the functional languages. Even with a background in Lisp (actually Scheme) and ML, I still struggle to write non-trivial programs in Haskell. I say this as someone who learned Tcl on the job and gave a presentation on how to program in Tcl just a few months later.
Watch someone program Conway's Game of Life in one line of APL: http://www.youtube.com/watch?v=a9xAKttWgP4
It's black magic to me, but pretty cool looking, too.
J (closed source, free),
A+ (GPL, inactive),
K (closed source, commercial)
This guy has consolidating what he and his cohorts have learnt from C, C++, ANSI C (Plan9), Limbo (Inferno).
Might be the most cutting edge language of the moment.
Still, Brainfuck is cool in that it's really easy to write compilers for it.
That said, writing a programming language sounds a little daunting if you've never been introduced. So here's my recommendation: Work your way through at least the first half of Programming Languages: Application and Interpretation by Shriram Krishnamurthi (free online http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/). Probably the most influential book of my entire CS degree, not too difficult once you get used to Scheme, and incredibly rewarding (and fun!).
Your experience is mostly OO and procedural. Let's round it out with the functional cannon: In the first half of PLAI you implement the crown jewels of the paradigm: first-class functions, both with dynamic and static scope (aka closures), lazy evaluation ala Haskell, true language-supported continuations, recursion (the Y combinator is in there), mutable vs. immutable variables and more.
The implementation language is Scheme, which is really really easy to grasp the basics of quickly. So as a side effect you will learn an interesting esoteric language just as you wanted. I would think any competent programmer could learn enough Scheme to work through PLAI in under 2 days. Basic Scheme is kinda like "lisp light" compared to CL/Clojure, so it's a great way to start.
It's one thing if you want to deal with integer representations and memory allocation, and quite another to want to experiment with language design, grammars and object models (and be playing with <canvas> animations tomorrow). The CoffeeScript codebase is only 2,200 lines of code in toto, and it's all annotated to help you get started and make sense of things.
http://jashkenas.github.com/coffee-script/documentation/docs...
I'll second the motion for you to write your own thing.
http://lolcode.com/specs/1.2
http://wiki.portal.chalmers.se/agda/pmwiki.php?n=ReferenceMa...