Ask HN: Languages in the "spirit of Ruby"?

9 points by zephyrfalcon ↗ HN
Hi,

The recent thread here about the _why article made me wonder: Are there other programming languages (and/or language communities) that have a similar approach to hacking as Ruby / the Ruby community?

By this I mean that it encourages experimenting, exploration, "having fun", offering possibly many ways to do something, shaping the language, maybe programming as art, etc. And less of an emphasis on, e.g., doing things "the right way", programming language theory, strict enforcement of rules, etc.

For example, Python's power and flexibility is roughly equivalent to Ruby's, but the design philosophy (and the community's) is very different.

Some languages that I can think of that come closer to "the Ruby spirit", at least in some ways, are Perl, Logo and Io. Anybody know of other languages out there that fit the bill as well or better than these?

7 comments

[ 4.5 ms ] story [ 54.1 ms ] thread
Haskell is surprisingly fun to hack about in. You've got a fast dev environment, a huge selection of libraries to play with, and a syntax that can pretty much be manipulated into any style of programming you want. It's also one of the few languages in which you can tell your code works by how sexy and sleek it is.

It doesn't get as much press for tweakability as Ruby, but you can definitely muddle and muck around in Haskell for the sheer sake of creating something.

Check out #haskell on Freenode. Between the category-theoretical arguments, you'll find plenty of hacking for the sake of hacking.

edit: check out http://www.willamette.edu/~fruehr/haskell/evolution.html and tell me you don't think such a flexible language requires a sense of play.

Besides Haskell, lots of rubyists have diversified into clojure, scala, and erlang. FP is a powerful paradigm, you can start looking at STM and actor models. There's 3 main FP "lineages", lisp, haskell and ML. Also, F# is a really nice implementation from what I've read about it (I haven't bought VS 2010 yet).

To be fair, when you're getting into concurrent structures, you have a fundamental conflict with the OP's criteria. (Scala and haskell will teach you a lot about language design.)

"less of an emphasis on, e.g., doing things "the right way", programming language theory, strict enforcement of rules"

-------------

Some other language i find interesting, tho i haven't written much or any code:

factor, ioke, objective-C, J, common lisp, scheme

------------

sounds like you shd go to emerging languages:

http://emerginglangs.com/speakers/

I second gtani's suggestion of clojure. It's a lisp that takes some of the pain out of lisp by using fewer parentheses where possible, and different kinds of parentheses (round, square and squiggly) so it's a little easier to eyeball where groupings start and end. Also, good support and interconversion of highly useful data types: vector, hashmap and set, among other things.

It's very FP but you can mutate state explicitly if you insist. It runs on the JVM so performance is very good (much faster than Ruby and Groovy) and Java interop is excellent, even better than with Scala. So you have access to the whole wealth of Java library code.

A big advantage is the very strong concurrency support. Laziness and FP give you some multi-core goodness with no effort, and the STM functionality gives you cleaner and more foolproof inter-activity synchronization.

In other words, recommended.

Clojure is nice (I have been using it more often for customer work). For me, Clojure still lacks the totally immersive feeling of using (as examples) Gambit-C with Marc Feeley's Emacs support (unbelievably sweet error handling/debugger) or Common Lisp with Slime. Clojure with swank-clojure is nice, but is still running in second place.

All that said, given a free choice, I use Ruby for most tasks.

> For example, Python's power and flexibility is roughly equivalent to Ruby's, but the design philosophy (and the community's) is very different.

I'm a Python guy and I notice that too. Ruby has a great sense of 'everyone can make stuff using Ruby! It's fun and easy'.

Being fun and easy is true of Python too - you have finance guys, natural language guys, and web people, none of whom have traditional computer science backgrounds. But they often exist in their own groups, and they find Python by themselves. There's no _why showing people cool stuff in a fun way, no 'hey use our deployment tool, it's easy and fun' in the Python world - or at least, a lot less than Ruby land.

What do you think of a meetup for people who make stuff, using Python? Maybe a couple talks about things that people have made, with the aim being that by the end of it the audience knows enough to make the thing themselves, then drinking.

When it comes to experimenting, exploration, "having fun" then Perl's ACME::* modules are prime example of this!

ACME modules range from making your code invisible (ACME::Bleach) to calculating whether you're drunk or not! (ACME::Drunk) :)

ref: http://search.cpan.org/search?query=acme%3A%3A*&mode=all

Perl has a long history of twisting reality. Here is just one example which may blow your mind, Damian Conway's OSCON 2008 keynote. Look out for part about adding "time travelling" positronic variables to Perl: http://blip.tv/file/1145545/