
Ask HN: Help me find an exotic programming language to learn next - bobds
I want to start learning a new programming language but frankly none of the popular languages appeal to me right now.<p>I have written code in these languages, in order of experience:<p>- PHP, Javascript. Java, Python, Perl, C<p>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:<p>- Cofeescript http://coffeescript.org/<p>- Fantom http://fantom.org/<p>- HaXe http://haxe.org/<p>- Neko http://nekovm.org/specs<p>- K http://en.wikipedia.org/wiki/K_%28programming_language%29<p>- Factor http://factorcode.org/<p>- Ragel http://www.complang.org/ragel/<p>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.<p>Which exotic programming language would you recommend?
======
chc
You should go for a functional language like Haskell, Clojure or OCaml/F#.
They're mainstream/practical enough that you could write real programs in
them, but different enough from the imperative languages you already know that
they'll open your mind to new things.

~~~
wtracy
A side-question: Are there any Haskell-oriented groups of people in the Bay
Area? I'm increasingly convinced that I'm going to need help if I'm going to
teach myself Haskell.

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.

~~~
gtani
<http://groups.google.com/group/bahaskell/topics>

------
jashkenas
CoffeeScript is hardly "exotic", as other comments on this post mention. But,
if you want to try playing around with a mini programming language of your
own, it could serve as a good starting point -- especially if you want to make
something that runs in the browser.

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...](http://jashkenas.github.com/coffee-
script/documentation/docs/scope.html)

I'll second the motion for you to write your own thing.

------
bobds
Clickable links:

\- 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/>

~~~
lincolnq
I don't see the point of learning Coffeescript (compiles in an obvious manner
to js). Fantom and HaXe have the somewhat interesting problem of an API that
is compatible with many backend VMs. neko is the opposite and also possibly
interesting. None of the above languages will teach you anything about syntax
or semantics, they're mostly implementation details.

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.

~~~
serverdude
I also started looking at functional languages recently. I started with lisp
(the free book) then moved to clojure (since it is lispy and probably may a
better future (just a guess - i am no expert on functional languages - so no
flames please.)

Just curious what is so nice / difficult about Haskell?

~~~
lincolnq
Haskell is a research language - it was built by programming languages
researchers, and lots of researchers now work with it, extend it and so on. As
such, it is not "nice" in the sense that it is easy to learn how to use.

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.

~~~
serverdude
Thanx - sounds very intriguing. Haskell definitely would be in my list now:)

------
charlief
Scala, I've had a lot of fun with it. You can also try generative and meta-
programming using emf/gmf/acceleo maybe some xtext as well. Learning exotic
frameworks can be useful/fun as well. Maybe try a different domain like
physics, finance, or even buy a fpga and learn some vhdl?

~~~
TheSmoke
agree with scala. you'll enjoy it.

------
luckydude
Hmm. I'm going to get crucified here but we've come up with a little language
we call L (for little language. Really :)

<http://www.bitmover.com/lm/L.html>

It's not really that interesting to most people, it was designed to be easy to
read, easy to maintain larger programs in, in particular, it was designed to
be easy to read and review, that was the point.

It was not designed to be interesting to hackers like the folks here, I
strongly suspect that 98% of you will go WTF? You based this on top of tcl?
Are you retarded? And the answer is "well, yeah, sort of. But it fit our
needs".

Anyway, we're in the midst of a commercial product release but after that I
can see about getting the source out for anyone who wants (BSD license or
whatever tcl is, I know it's BSD or BSD like) as well as prebuilt images for
all the common platforms (Windows, Mac, Linux, *BSD, HPUX, Solaris, AIX, even
IRIX and SCO for the 3 people in the world still using those).

If anyone has constructive feedback, bring it on. It's a moving target which
is why we haven't released yet, haven't nailed down 1.0 hard enough that we
want to live with it. We are using it internally.

~~~
bobds
Interesting, what kind of projects have you written in L so far in your
company?

I actually started implementing a DSL in TCL a while ago, it was meant for a
YubNub replacement but the project was scrapped and I never finished it.

~~~
luckydude
We're reworking our GUI tools in it.

Once it is really stable, we plan on provide a pile of canned triggers (email
notification of commits, other workflow stuff) as part of our commercial
product.

And we have some plans for future products where L will be the glue that holds
them together. An example would be a generic importer $SCM => BitKeeper
written in L and shipped as source so that if you have some oddball SCM that
we don't understand you can do your own importer.

But the main point is to redo our guis. We're still playing around but this is
an example - not polished yet but not as sucky as some stuff we've done in the
past: <http://bitmover.com/lm/explorer-l.gif>

------
astrofinch
Relevant links:

[http://en.wikipedia.org/wiki/Categorical_list_of_programming...](http://en.wikipedia.org/wiki/Categorical_list_of_programming_languages)

<http://en.wikipedia.org/wiki/Programming_paradigm>

I'd say learn Haskell, Clojure, and Scala before anything else because they
seem like they might actually be 3 of the best programming languages out
there. After that I'd recommend Oz (in conjunction with the textbook Concepts,
Techniques, and Models of Computer Programming, which Peter Norvig mentions as
being a possible modern equivalent to SICP (Structure and Interpretation of
Computer Programs, a classic MIT Scheme-based text)), Scheme (with SICP), and
Erlang.

Can't say I've done all this myself, it's just what I would do if I had a
really strong interest in learning new programming languages.

~~~
proemeth
Thank you for the pointer on Concepts, Techniques, and Models of Computer
Programming. <http://www.info.ucl.ac.be/~pvr/book.html>

------
drallison
Lua, Erlang, Haskel, ML, Go, Smalltalk, Algol, Modula 2, Modula 3, Snobol,
assembly language.... After a while, most languages begin to look similar.

But, if what you want to do is to learn about programming languages, the thing
to do is to write one of your own. Language design is among the most difficult
of human intellectual tasks because the language elements must be composable
to create larger, more capacious elements. A common error is to "add a
statement to do X" rather than creating a conceptual framework that works with
other language elements to allows X (and other things) to be performed.

A book worth reading on the design of language is Alexander Stephanov and Paul
McJones, Elements of Programming. A talk covering some of the material in this
book is scheduled for the Stanford EE Computer Systems Colloquium for November
3rd (<http://ee380.stanford.edu>). The lecture is open to the public, webcast
live, and archived for on-demand viewing. Eventually it will be out on
YouTube, iTunes, and elsewhere.

And while we are on the ideas of language design, you might want to look into
some of the theories of natural language. George Lakoff's ideas in cognitive
linguistics seem to apply to programming languages as well. Language, in his
view, is motivated by metaphor.

I also think anyone who is serious about programming languages needs to have
programmed in several assembly languages and to have experimented with macro
assemblers. Macro assemblers provide a powerful tool for creating nonce
programming languages at the assembly level.

I would also suggest that learning about optimizations would be of interest.
At some level, optimizations are about mapping programming language concepts
onto real machines for efficient execution. There is a dymaxion tension
between programming languages and computer hardware with each influencing the
other. Today, the need to efficiently map programs onto multi-core machines
has renewed interest in parallel programming languages.

------
dchest
I recommend _writing_ a programming language.

~~~
paulitex
Definitely, I wish I could upvote that more.

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.

~~~
makmanalp
I wish I could upvote _that_ more. PLAI was awesome. To me, scheme is to lisp
what coffeescript is to javascript. More or less. Don't let it intimidate you.
Throughout the book, you'll see awesome things, like how switching from static
to dynamic scope is merely changing a bunch of lines of code. When I finally
got my type inferencer working, I was euphoric.

------
losvedir
How about APL? (Well, I think APL is expensive, I think there's open source
variants?)

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.

~~~
bobds
I've looked at the languages related to APL and it doesn't seem there is a
solid open-source implementation.

J (closed source, free),

A+ (GPL, inactive),

K (closed source, commercial)

------
nubela
Prolog. After coding in "normal" (iterative/procedural) languages for a long
while, this rule-based languaged just couldn't click. It finally did after
about a week. And bam. Changed my thinking.

Also, learn Scheme, or Lisp. You'll rethink recursion after that.

------
yayitswei
How about Agda? It has the interesting property that it's runtime-error proof.

[http://wiki.portal.chalmers.se/agda/pmwiki.php?n=ReferenceMa...](http://wiki.portal.chalmers.se/agda/pmwiki.php?n=ReferenceManual.IntroWhat)

------
waterlesscloud
6502 Assembler.

~~~
zephyrfalcon
This may look like a silly choice to some, but if your goal is to stretch your
mind a bit, assembler will definitely do the trick. 6502 assembler is less
annoying than its i386 equivalent, and can be used in e.g. C64 or Apple
emulators.

~~~
cadr
And you can write Atari 2600 games :)

<http://www.atariage.com/2600/programming/index.html>

~~~
waterlesscloud
Which is just what I'm doing with it, so I brought it up here!

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?).

~~~
cadr
I highly recommend the "2600 Programming For Newbies". I worked through it a
few years back and loved it.

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 :)

------
arethuza
In the "classic" list I would suggest maybe looking at:

\- CLOS (not just Lisp, but it's wonderful "standard" object system)

\- PostScript - which is actually a nice interactive programming language that
just happens to have nice graphics capabilities

I've spent years working in CLOS and PostScript (on the same project!) and of
all of the languages I've used these were the ones that I found the most
satisfying. I still keep a copy of AMOP on my desk in my study at home to
browse occasionally.

[Deleted reference to APL after seeing previous post]

------
maxdemarzi
How about a Lisp?

~~~
CyberFonic
Well if complex syntax is your thing, then don't go there.

 _Lisp is a lot more exotic than you might think!_ What it does to your brain
is unmatched!

------
fleitz
Try to find a language that has "weird" features that you've never seen
before. Try something like f#/ocaml, prolog, or vhdl/verilog. For vhdl/verilog
run it in a simulator and look on opencores for source. Also, perhaps
something like Cg or one of the other gpu languages, the further you get from
Von Neumann arch the more you will learn, beacause so much of programming
languages are leaky abstractions. Also, try forth it's pretty strange as well.

------
cmbanker
Forth...Forth....Forth....Forth...Get close to the machine and extend the
language to suit your needs. It will change your approach in a positive way!

------
prodigal_erik
I found <http://en.wikipedia.org/wiki/Prolog> has a dramatically different
perspective. Pervasive design-by-contract from
<http://en.wikipedia.org/wiki/Eiffel_(programming_language)> was also
interesting, though it isn't much of a departure otherwise.

~~~
cadr
If you take the Prolog route, this is a fun text:
<http://www.amzi.com/AdventureInProlog/advfrtop.htm>

------
TNO
Piet: <http://www.dangermouse.net/esoteric/piet/samples.html>

------
mightybyte
I would suggest that you choose the language that will stretch your brain the
most. If you use this heuristic, don't completely ignore other obvious factors
like practicality, availability on your platform, etc. But I think stretching
your brain should be high up on the list. For me, this meant Haskell.

------
CarlSmotricz
Clojure. It's mildly exotic in being Lisp-y and functional, but efficient,
clean and solidly supported by the gigabytes of Java library code that's
available for every purpose and can be smoothly interfaced.

Lua. A tiny yet powerful language whose only data structure is the associative
table. Can be learned in half a day.

------
makmanalp
Intercal. Abandon all sanity, ye who enter here.
<http://www.catb.org/esr/intercal/stross.html>
<http://www.muppetlabs.com/~breadbox/intercal-man/>

------
bigsassy
For a laugh,

<http://lolcode.com/specs/1.2>

------
jpenny
You ought to check out <http://lambda-the-ultimate.org/> They discuss new
languages and language related ideas.

------
mrjbq7
I highly recommend learning Factor. It's a really incredible system and has
the benefit of encouraging different ways of thinking and approaching
algorithms.

------
Anon84
<http://en.wikipedia.org/wiki/Brainfuck> is as exotic as it gets.

~~~
wtracy
Still not as exotic as
[http://en.wikipedia.org/wiki/Whitespace_%28programming_langu...](http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29)

Still, Brainfuck is cool in that it's really easy to write compilers for it.

------
babo
Forget the exotic tag, learn clojure or Haskell.

~~~
dasil003
Those two are at the top of my list for sure. Haskell because I believe I can
learn more from it than any other single language, and Clojure because after
I've been enlightened I will want to sit down and build something quickly.

------
Aga
Forth could be interesting to look at. It does offer a quite different
perspective to programming.

~~~
cmbanker
Agreed! Different, refreshing..and good.

------
pierrefar
Erlang. At least syntax wise it will seem exotic given the languages you know.

------
gilaniali
learn R.

~~~
bobds
Why?

------
scrame
Intercal

------
yanw
How about Go? <http://golang.org/>

~~~
CyberFonic
Listened to a lecture by Rob Pike last week. Blown away!

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.

~~~
nickik
i didnt think it was mindblowing. The CSP stuff is kind of unice but othe than
that i dont think its cutting edge. In therms of systems programming D is
better. The go concurency story is still unsave (pasing pointers to channels).
Note: i dont say go is a bad language.

------
rahulchaudhary
Have you looked at Heron <http://www.heron-language.com/>

------
grails4life
I recommend learning Blub

