[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Other languages to try?

Adam Gardner

5/26/2009 5:56:00 AM

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.blo...
[2] http://steve.yegge.googlepages.com/...
--
Posted via http://www.ruby-....

19 Answers

Tony Arcieri

5/26/2009 6:20:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

On Mon, May 25, 2009 at 11:56 PM, Adam Gardner <adam.oddfellow@gmail.com>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_j...

Or you could try Reia: http://wiki.reia...

--
Tony Arcieri
medioh.com

Tom Cloyd

5/26/2009 7:07:00 AM

0

Tony Arcieri wrote:
> On Mon, May 25, 2009 at 11:56 PM, Adam Gardner <adam.oddfellow@gmail.com>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_j...
>
> Or you could try Reia: http://wiki.reia...
>
>
Hey - thanks for this. Sound VERY interesting - and that youtube thing
was incredibly funny.

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Bill Kelly

5/26/2009 7:26:00 AM

0


From: "Adam Gardner" <adam.oddfellow@gmail.com>
>
> 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_c...

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

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

5/26/2009 8:49:00 AM

0

2009/5/26 Adam Gardner <adam.oddfellow@gmail.com>:

> 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


--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestprac...

Eleanor McHugh

5/26/2009 10:34:00 AM

0

On 26 May 2009, at 06:56, Adam Gardner 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.source...), an object-
oriented language based on goal-directed evaluation with generators.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-...
----
raise ArgumentError unless @reality.responds_to? :reason


Diego Virasoro

5/26/2009 10:37:00 AM

0

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

5/26/2009 11:29:00 AM

0

Diego Virasoro 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.
--
Posted via http://www.ruby-....

Bill Kelly

5/26/2009 11:41:00 AM

0


From: "Eleanor McHugh" <eleanor@games-with-brains.com>
>
> 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 Thompson

5/26/2009 11:55:00 AM

0

On Tue, May 26, 2009 at 02:56:24PM +0900, Adam Gardner 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.
>
> 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.blo...
> [2] http://steve.yegge.googlepages.com/...
> --
> Posted via http://www.ruby-....
>

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

Srijayanth Sridhar

5/26/2009 12:01:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

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