Other languages to try?

So, I’ve been programming in Ruby for a good while now. Not an expert,
not by a long shot, by I know my way around.

I’ve also been reading a lot of Steve Yegge’s blog lately. Both his more
recent stuff [1], and his older, Amazon-era stuff [2]. Interesting
stuff.

One of the things that Yegge harps on a lot is how important practice is
for programmers, especially ‘cross-training’: that is, learning to use
languages other than your favorite, not just because they might be
useful in their own right, but because it will make you a better
programmer in any language.

I’ve decided to do as he suggests, but I’m unsure what I should start
with. Some languages I’m considering are:

  1. Lisp/Scheme
  2. Erlang
  3. Smalltalk
  4. C

I should note that I’m on OS X, and my primary concern is learning, not
necessarily making something meaningful (the exception being C, which
really has more of a grit-my-teeth-and-learn-it-because-it’s-useful
position on the list). I’m also somewhat time-limited, so the less time
I have to spend compiling and installing things, the more time I have to
play with code.

(Also, I know this is the Ruby list, not the Lisp, Smalltalk, etc list.
But I’m a Ruby programmer, and I want the perspective of other Ruby
programmers).

All that being said, what languages, other than Ruby, do people enjoy
and recommend?

[1] http://steve-yegge.blogspot.com/
[2] http://steve.yegge.googlepages.com/blog-rants

On Mon, May 25, 2009 at 11:56 PM, Adam G.
[email protected]wrote:

I’ve decided to do as he suggests, but I’m unsure what I should start
with. Some languages I’m considering are:

  1. Lisp/Scheme
  2. Erlang

Try ERLANG. It’s the functional language for men.
MUNCTIONAL!http://www.youtube.com/watch?v=1yH_j8-VVLo

Or you could try Reia: http://wiki.reia-lang.org/

Tony A. wrote:

Try ERLANG. It’s the functional language for men.
MUNCTIONAL!http://www.youtube.com/watch?v=1yH_j8-VVLo

Or you could try Reia: http://wiki.reia-lang.org/

Hey - thanks for this. Sound VERY interesting - and that youtube thing
was incredibly funny.

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< [email protected] >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

From: “Adam G.” [email protected]

I’ve decided to do as he suggests, but I’m unsure what I should start
with. Some languages I’m considering are:

  1. Lisp/Scheme
  2. Erlang
  3. Smalltalk
  4. C

I went on a spree recently and bought several books on Erlang, Haskell,
and Scheme.

“The Haskell School of Expression: Learning Functional Programming
through Multimedia” – Paul Hudak
“Purely Functional Data Structures” – Chris Okasaki
“Real World Haskell” – Bryan O’Sullivan
“Programming Erlang: Software for a Concurrent World” – Joe Armstrong
“The Scheme Programming Language, 3rd Edition” – R. Kent Dybvig
“The Little Schemer - 4th Edition” – Daniel P. Friedman
“The Seasoned Schemer” – Daniel P. Friedman

and also,

“JavaScript: The Good Parts” – Douglas Crockford

:slight_smile:

I’d been leaning toward Erlang because it’s being used in production
environments, and because of the accolades it gets for its
concurrency libraries / distributed computing capabilities.

I’d been leaning toward Scheme because I always wanted to learn
a Lisp dialect, with the code-is-data / metaprogramming / macro
syntax.

I’d been leaning toward Haskell because it is reputedly a notably
‘pure’ functional language, and apparently has some powerful
features in the way of type inferencing and lazy evaluation.

What finally tipped me toward Haskell, for now, was a couple
things over the past weekend. I was looking at amazon reviews
for Scheme books, for the third book in the “Little Schemer”
series, “The Reasoned Schemer”.

A particular review observed that the ideas in this Scheme book
could be expressed comparatively clearly and simply in Haskell,
demoing the ideas in code:
http://www.amazon.com/review/R2XSHA3S08XPZN/ref=cm_cr_rdp_perm

The review goes on to describe Haskell thusly:

If you're unfamiliar with Haskell, it's a type-inferencing, 

auto-currying
LISP with unparenthesised syntax where “f x” stands for functional
application, “[]” stands for empty list, “x:xs” for cons cell (x .
xs), and
parentheses are used for grouping of expressions. It is non-strict,
so lazy lists are used throughout, and everything is a delayed
lambda, calculated on “as-needed” basis. Having finally produced a
stream of solutions, we rely on Haskell to only calculate as much of
it as is actually requested by a user (usually one by one, as in
Prolog),
thus in effect performing depth-first search of a problem space.

So that piqued my interest, and I was pushed over the threshold
when I landed on this article:

Write Yourself a Scheme in 48 hours:
http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html

…which is a Haskell tutorial which implements a Scheme
interpreter.

Since for me this is practically the ideal way to learn a language
(I had previously been contemplating writing Lisp in Ruby in order
to learn Lisp) I figured this is great, I ought to be able to learn
quite a bit about Haskell and Scheme at the same time.

P.S. I would recommend learning C at some point, though, in any
case. You’ll have a head start there, in so much as a portion of
ruby’s standard library does mirror the C stdlib (printf, gets, etc.)
It’s hard for me to imagine getting by without knowing C.

Regards,

Bill

2009/5/26 Adam G. [email protected]:

All that being said, what languages, other than Ruby, do people enjoy
and recommend?

I haven’t used it yet but on my list Eiffel would be at the top
because it has a so much richer set of inheritance and other OO
features than any other language I know.

Playing with some functional language would also be fun but I cannot
recommend one.

Kind regards

robert

On 26 May 2009, at 06:56, Adam G. wrote:

All that being said, what languages, other than Ruby, do people enjoy
and recommend?

I don’t enjoy it so I probably shouldn’t recommend it, but C is
definitely the place to see how not to solve most programming problems
and hence a necessity for any multilingual programmer’s toolkit.

I’d also recommend Unicon (http://unicon.sourceforge.net/), an object-
oriented language based on goal-directed evaluation with generators.

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason

  1. Lisp/Scheme
  2. Erlang
  3. Smalltalk
  4. C

Personally I think Smalltalk is not that interesting any longer. Many
of its ideas are found in other languages, including Ruby. So if you
want to learn a new language for the experience, I wouldn’t go with
Smalltalk.

C is a pain, and I try to avoid as much as I can. If you have limited
time, C would not be a good choice… you will spend time compiling
and recompiling to fix some stupid pointer error… grrr… That said
if you want CV skills, C is definitely very important.

Lisp/Scheme and Erlang seem both pretty interesting. I’ve been meaning
to try something from the Lisp family for some time but so far I have
postponed the effort.

The one I am considering getting into and that may interest you is
Scala. It is useful in that it’s very close to Java so you get good
compilers and a strong community, plus you could use it for many jobs.
It takes several ideas from Ruby (I find the syntax similar) which I
find nice, but you can also have things like Actors (a la Erlang) via
its powerful libraries.

So personally I’d suggest:

  • Lisp/Scheme for the experience
  • Scala: a bit easier to approach and more useful while still exposing
    you to new ideas and worlds.

Hope that helps.

Diego

From: “Eleanor McHugh” [email protected]

I don’t enjoy it so I probably shouldn’t recommend it, but C is
definitely the place to see how not to solve most programming problems
and hence a necessity for any multilingual programmer’s toolkit.

:smiley: awesome

What I periodically daydream about is a portable
subset of ruby within ruby which is geared toward
displaying 1_000_000+ polygons on the screen at
60Hz (for example. {As we can do currently in C.})

I love the concept of RubyInline, (or the integration
of JRuby with Java), but instead of Java or C I would
die for being able to write some little loops in some
ruby sub-language (where things were as static typed
as necessary, but speed was #1 priority however it was
achieved.)

If I could write, like

gofast {
def (float) bsp_trace((BSP)game_level, (Vec3D)start, (Vec3D)dir)
(float) dist
# …
return dist
end
}

… and during the gofast { } ruby would drop into
a mode where it would either produce warnings or
errors if anything were dynamic… (at compile time)

Meaning Vec3D and BSP would in turn be required to
provide their own ‘gofast’ methods, … 'till we got
down to primitive types. . . . …

Of course, I’d still value knowing C 'cause there’s
so much of it out there, but I’d love to be able to
avoid dropping into it in my own apps… :slight_smile:

Regards,

Bill

Diego V. wrote:

C is a pain, and I try to avoid as much as I can. If you have limited
time, C would not be a good choice… you will spend time compiling
and recompiling to fix some stupid pointer error… grrr…

What you really gain from C - or better, machine code - is understanding
how your computer actually works.

C is just a thin layer above assembly language, and often each C
statement compiles to just a couple of machine ops. (gcc -S to see it).

If you want to try your hand at machine code, i386 is unfortunately a
very ugly one to start with. Perhaps you can find an emulator for one of
the old Motorola 8-bit processors (6800 or 6809); they had very concise
and simple instruction sets.

On Tue, May 26, 2009 at 02:56:24PM +0900, Adam G. wrote:

useful in their own right, but because it will make you a better
I should note that I’m on OS X, and my primary concern is learning, not
All that being said, what languages, other than Ruby, do people enjoy
and recommend?

[1] http://steve-yegge.blogspot.com/
[2] steve yegge - blog-rants

Posted via http://www.ruby-forum.com/.

Just my opinion, but I think a working knowledge of C is always handy

“…but C is definitely the place to see how not to solve most
programming
problems…”

Unless, you want to write real low level code or another language, like
Ruby
let’s say. My vote for C if you don’t already know it. It can be tedious
going from a rich language like Ruby, but hey, Buddha was a prince
before he
was enlightened, and perhaps the same could happen to you too.

Jayanth

On Tue, May 26, 2009 at 8:24 AM, Michael K. [email protected]
wrote:

Recently I have been toying around (Project Euler problems and such)
with Haskell, Smalltalk (Squeak), Scala and a bit of Clojure. Here are
some links you might find interesting…

Smalltalk:
http://www.squeak.org/
http://squeakbyexample.org/
http://www.seaside.st/

There’s also Pharo which is a fairly new fork of Squeak, which has for
one thing, changed the UI to be a bit less ‘different’.

http://www.pharo-project.org/home

I just found out about this a few days ago.


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

On Tue, May 26, 2009 at 09:01:02PM +0900, Srijayanth S. wrote:

“…but C is definitely the place to see how not to solve most programming
problems…”

Unless, you want to write real low level code or another language, like Ruby
let’s say. My vote for C if you don’t already know it. It can be tedious
going from a rich language like Ruby, but hey, Buddha was a prince before he
was enlightened, and perhaps the same could happen to you too.

Jayanth

Agreed, since nearly every other language (not just ruby) designed to
remedy

“…but C is definitely the place to see how not to solve most programming
problems…”
is written in C

Recently I have been toying around (Project Euler problems and such)
with Haskell, Smalltalk (Squeak), Scala and a bit of Clojure. Here are
some links you might find interesting…

Haskell:
http://learnyouahaskell.com/ (a bit like the Poignant Guide)
http://book.realworldhaskell.org/
Haskell - Wikibooks, open books for an open world
Write Yourself a Scheme in 48 Hours - Wikibooks, open books for an open world

Smalltalk:

http://squeakbyexample.org/
http://www.seaside.st/

Scala:
http://www.scala-lang.org/
http://www.scala-lang.org/node/104

Clojure:
https://peepcode.com/products/functional-programming-with-clojure

HTH,
Michael

On 26 May 2009, at 14:01, Reid T. wrote:

before he
is written in C
Or put another way, it’s all just 1s and 0s - even Ruby ;p

I’m therefore also going to suggest Forth (thinking in reverse polish
is educational) and assembly language. In particular an inexpensive
PIC developer kit is a great way to learn assembler and about embedded
systems at the same time, so a double win lol

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason

On Tue, May 26, 2009 at 2:39 PM, Rick DeNatale [email protected]
wrote:

There’s also Pharo which is a fairly new fork of Squeak, which has for
one thing, changed the UI to be a bit less ‘different’.

This looks interesting, thanks for the pointer! Have you had time to
play around with it yet?

Michael

On May 26, 2009, at 12:56 AM, Adam G. wrote:

So, I’ve been programming in Ruby for a good while now. Not an expert,
not by a long shot, by I know my way around.

[edited for brevity]

I should note that I’m on OS X, and my primary concern is learning,
not
necessarily making something meaningful (the exception being C, which
really has more of a grit-my-teeth-and-learn-it-because-it’s-useful
position on the list). I’m also somewhat time-limited, so the less
time
I have to spend compiling and installing things, the more time I
have to
play with code.

If you are “learning for yourself” then learning about the problems
for which languages were developed can be useful. So, learning C seems
important to me. Among other things, C is the answer to the question
“How do I write programs that are small, fast, and well-structured?”
Write the program to fit multiple word sizes across multiple
architectures with different OSes and you will appreciate the lure of
the Java Promise: write once, yada yada yada.

For the same reasons I would seriously consider both FOTRAN and
(gulp!) COBOL. The science communities are intimately acquainted with
FORTRAN, perhaps, more so than C. “How do I write a program that is
almost immediately graspable by a physicist?” FORTRAN is one answer to
that question.

There are still many, many lines of code written and running in COBOL.
“How do I write a program that can be read by and parsed by
Accountants?”

Of course, nowadays, no one cares that Accountants don’t read computer
programs of any kind. Dan Bricklin almost single handedly ended
COBOL’s reign, and not with another computer language. Too, processor
speed increases have made C’s “small and fast” less attractive because
the “well structured” part can be deucedly hard in C. FORTRAN is a
trip, pure and simple; and once you learn it (it takes all of a few
hours) you will be amazed that the science communities have stuck with
it.

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University

Eleanor McHugh [email protected] writes:

going from a rich language like Ruby, but hey, Buddha was a prince
is written in C
Not exactly. Nearly every implementation of a programming language
is written in themselves. Eg. gcc is written in C. SBCL is written
in Common Lisp. Free Pascal is written in Pascal. The Karlsruhe
Modula-2 Compiler MOCKA is written in Modula-2. Squeak the Smalltalk
implementation is written in Smalltalk. etc, etc, etc.

All these implementations only use C either to implement some low
level bootstrapping functions (in the same way that a unix kernel will
use some low level and bootstrapping routines written in assembler
instead of C), or include a compiler generating C code (since it’s a
passable portable high level assembler) to be able to target various
processors without entering in their details.

Having an implementation of a language so handicapped that it cannot
be written in itself is rather rare.

On Tue, May 26, 2009 at 11:26 AM, Adam G.
[email protected] wrote:

I’ve decided to do as he suggests, but I’m unsure what I should start
with. Some languages I’m considering are:

I’ve tried out a bunch of languages, but the one after ruby that seems
to have ‘stuck’ is PLT Scheme. Also on the ‘very interesting list’ are
Clojure (a genuinely new lisp, not a CL or Scheme dialect, that runs
on the JVM, has excellent concurrency support and a bunch of pragmatic
features like hash, vector and regex literals), D (C++ done right) and
OCaml (I’d really like to use it more, but my area of interest these
days is desktop applications, and I don’t like any of the GUI
toolkits).

martin

Bill K. wrote:

What I periodically daydream about is a portable
subset of ruby within ruby which is geared toward
displaying 1_000_000+ polygons on the screen at
60Hz (for example. {As we can do currently in C.})

I love the concept of RubyInline, (or the integration
of JRuby with Java), but instead of Java or C I would
die for being able to write some little loops in some
ruby sub-language (where things were as static typed
as necessary, but speed was #1 priority however it was
achieved.)

This was one of my original intents with Duby:

http://kenai.com/projects/duby/pages/Home

But I haven’t had time to get back to it. It’s a mostly Ruby-like syntax
but statically typed and as fast as Java. I had been working on a C
backend, but nobody doing C seemed interested at the time.

  • Charlie