Forum: Ruby Other languages to try?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adam G. (Guest)
on 2009-05-26 09:56
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
Tony A. (Guest)
on 2009-05-26 10:20
(Received via mailing list)
On Mon, May 25, 2009 at 11:56 PM, Adam G.
<removed_email_address@domain.invalid>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/
Tom C. (Guest)
on 2009-05-26 11:07
(Received via mailing list)
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
<< removed_email_address@domain.invalid >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bill K. (Guest)
on 2009-05-26 11:27
(Received via mailing list)
From: "Adam G." <removed_email_address@domain.invalid>
>
> 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

:)


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

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_...

...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
Robert K. (Guest)
on 2009-05-26 12:49
(Received via mailing list)
2009/5/26 Adam G. <removed_email_address@domain.invalid>:

> 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
Eleanor McHugh (Guest)
on 2009-05-26 14:34
(Received via mailing list)
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
Diego V. (Guest)
on 2009-05-26 14:40
(Received via mailing list)
> 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
Brian C. (Guest)
on 2009-05-26 15:29
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.
Bill K. (Guest)
on 2009-05-26 15:41
(Received via mailing list)
From: "Eleanor McHugh" <removed_email_address@domain.invalid>
>
> 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.

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


Regards,

Bill
Reid T. (Guest)
on 2009-05-26 15:55
(Received via mailing list)
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] http://steve.yegge.googlepages.com/blog-rants
> --
> Posted via http://www.ruby-forum.com/.
>

Just my opinion, but I think a working knowledge of C is always handy
Srijayanth S. (Guest)
on 2009-05-26 16:01
(Received via mailing list)
"..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
Michael K. (Guest)
on 2009-05-26 16:26
(Received via mailing list)
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/
http://en.wikibooks.org/wiki/Haskell
http://en.wikibooks.org/wiki/Write_Yourself_a_Sche...

Smalltalk:
http://www.squeak.org/
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-programmi...

HTH,
Michael
Rick D. (Guest)
on 2009-05-26 16:41
(Received via mailing list)
On Tue, May 26, 2009 at 8:24 AM, Michael K. 
<removed_email_address@domain.invalid>
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
Reid T. (Guest)
on 2009-05-26 17:03
(Received via mailing list)
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
Michael K. (Guest)
on 2009-05-26 17:30
(Received via mailing list)
On Tue, May 26, 2009 at 2:39 PM, Rick DeNatale 
<removed_email_address@domain.invalid>
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
Eleanor McHugh (Guest)
on 2009-05-26 18:24
(Received via mailing list)
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
Charles J. (Guest)
on 2009-05-26 18:47
(Received via mailing list)
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
Pascal J. Bourguignon (Guest)
on 2009-05-26 19:06
(Received via mailing list)
Eleanor McHugh <removed_email_address@domain.invalid> 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.
Martin DeMello (Guest)
on 2009-05-26 19:24
(Received via mailing list)
On Tue, May 26, 2009 at 11:26 AM, Adam G.
<removed_email_address@domain.invalid> 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
Charles Oliver N. (Guest)
on 2009-05-28 21:37
(Received via mailing list)
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
This topic is locked and can not be replied to.