Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #2287 > unrolled thread
| Started by | 7stud -- <bbxx789_05ss@yahoo.com> |
|---|---|
| First post | 2011-04-04 20:17 -0500 |
| Last post | 2011-04-06 19:30 -0500 |
| Articles | 16 — 8 participants |
Back to article view | Back to comp.lang.ruby
functional languages -- any recommendations? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-04 20:17 -0500
Re: functional languages -- any recommendations? Josh Cheek <josh.cheek@gmail.com> - 2011-04-04 22:37 -0500
Re: functional languages -- any recommendations? Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-05 00:29 -0500
Re: functional languages -- any recommendations? Tony Arcieri <tony.arcieri@medioh.com> - 2011-04-05 00:47 -0500
Re: functional languages -- any recommendations? Peter Hickman <peterhickman386@googlemail.com> - 2011-04-05 03:47 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 03:54 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 04:13 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 05:14 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 07:43 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 08:09 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 10:36 -0500
Re: functional languages -- any recommendations? serialhex <serialhex@gmail.com> - 2011-04-05 11:21 -0500
Re: functional languages -- any recommendations? Tony Arcieri <tony.arcieri@medioh.com> - 2011-04-05 12:30 -0500
Re: functional languages -- any recommendations? serialhex <serialhex@gmail.com> - 2011-04-06 13:04 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-06 14:08 -0500
Re: functional languages -- any recommendations? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-06 19:30 -0500
| From | 7stud -- <bbxx789_05ss@yahoo.com> |
|---|---|
| Date | 2011-04-04 20:17 -0500 |
| Subject | functional languages -- any recommendations? |
| Message-ID | <e5d09644917d0fada5c50cf47289944f@ruby-forum.com> |
Haskell, Scala, or Erlang? Which one is the best? -- Posted via http://www.ruby-forum.com/.
[toc] | [next] | [standalone]
| From | Josh Cheek <josh.cheek@gmail.com> |
|---|---|
| Date | 2011-04-04 22:37 -0500 |
| Message-ID | <BANLkTi=6NOZyNafBWgeV+Ox46+7F0NRjgQ@mail.gmail.com> |
| In reply to | #2287 |
[Note: parts of this message were removed to make it a legal post.] On Mon, Apr 4, 2011 at 8:17 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote: > Haskell, Scala, or Erlang? Which one is the best? > > I don't know, but I did enjoy Try Haskell (http://tryhaskell.org/) It's based off of _why's Try Ruby. It goes pretty quick, though I already had a pretty good idea how it should work and what to expect. Haskell will be my next language (okay, after I put some time into JavaScript) because I'm fascinated by its laziness and its type system (that, aside from all the stuff that comes from being functional). I also intend to put some time into Clojure, which I've played with a few times.
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-04-05 00:29 -0500 |
| Message-ID | <BANLkTikxbXcmVZg_-t_jvzVDchyQJMroCw@mail.gmail.com> |
| In reply to | #2287 |
On Tue, Apr 5, 2011 at 3:17 AM, 7stud -- <bbxx789_05ss@yahoo.com> wrote: > > Haskell, Scala, or Erlang? Which one is the best? That would depend on what you mean with "best". AFAIK, of the three you mentioned, Erlang is in widest use, but that doesn't mean that it is "the best", either (but it'll be easier to find real-world examples). And just to make a bad situation worse, let me throw out Clojure, for when you are dealing with a JVM, F# if you are dealing with .NET (I have no idea about Mono support), or Scheme if you are coming from a LISPing background (pardon the pun). -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Tony Arcieri <tony.arcieri@medioh.com> |
|---|---|
| Date | 2011-04-05 00:47 -0500 |
| Message-ID | <BANLkTikKt747g6T1g6njQTX4wRF0Pr2gXw@mail.gmail.com> |
| In reply to | #2287 |
[Note: parts of this message were removed to make it a legal post.] On Mon, Apr 4, 2011 at 7:17 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote: > Haskell, Scala, or Erlang? Which one is the best? Erlang is surprisingly close to Ruby in ways you would not believe. -- Tony Arcieri Medioh! Kudelski
[toc] | [prev] | [next] | [standalone]
| From | Peter Hickman <peterhickman386@googlemail.com> |
|---|---|
| Date | 2011-04-05 03:47 -0500 |
| Message-ID | <BANLkTinBk+SXMNm_xPL14z=uGvbHUnCbtQ@mail.gmail.com> |
| In reply to | #2297 |
You could add Clojure to that list, it would probably be a better (more marketable) skill to acquire than erlang or haskell and less of a learning curve than scala (YMMV). But you could probably pick up erlang pretty fast regardless.
[toc] | [prev] | [next] | [standalone]
| From | Brian Candler <b.candler@pobox.com> |
|---|---|
| Date | 2011-04-05 03:54 -0500 |
| Message-ID | <617b8fb66a6d5b29c72d55b8aaa35687@ruby-forum.com> |
| In reply to | #2287 |
7stud -- wrote in post #990914: > Haskell, Scala, or Erlang? Which one is the best? I'd say Erlang would be the easiest to get your head round. It lets you create lightweight processes which can send explicit messages to each other, and keep their own state. This is pretty similar to the concept of "objects", except because it uses real message passing, it eliminates many of the problems of threads. Furthermore, your processes could be on the same machine or on different ones, and nothing changes in the code. Calling a function in Erlang can have side effects (in particular, the sending of a message), and hence it's not a true functional language. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-05 04:13 -0500 |
| Message-ID | <20110405101339.52fe20a5@fractal> |
| In reply to | #2287 |
On Tue, 5 Apr 2011 10:17:39 +0900
7stud -- <bbxx789_05ss@yahoo.com> wrote:
> Haskell, Scala, or Erlang? Which one is the best?
What about Racket, the descendent of PLT scheme?
http://racket-lang.org/
I'd say it's just as good for learning about functional programming as
the others, but it also makes it easy to write something useful.
For instance, it has a nifty DSL for writing web-sites. Unimaginatively
of me, here is an example from their home page:
#lang web-server/insta
;; A "hello world" web server
(define (start request)
(response/xexpr)
'(html
(body "Hello World")))
The standard libraries include a web-server, and if you use that DSL,
it'll start it up for you, and just serve your site, no extra
configuration required. Which is pretty cool for learning at least.
It comes with OpenGL too, which is great if you like writing games :D
Also, it supports objects and classes, so you won't into the problems
described below.
Not so many libraries as Scala and Haskell though. And slower too.
You can tell I'm a "fan-boy". I swear I'm not a PLT plant!
But on to the others:
Haskell doesn't have the feature called inheritance in Object Oriented
Languages*.
Living without objects is okay, but it means you can't create a new
data-type that inherits members from another data-type.
It has other mechanisms for code-reuse, but sometimes things which
would be really simple with, for example, a template method, into a bit
of an exercise in formal logic. Still, that's okay because that's
pretty much how you program the whole of the system in Haskell.
Haskell has a really cool macro system called Meta-Haskell. It's
basically like an interface to a compiler front-end so you can create,
explore or transform a Haskell abstract syntax tree, or fragments
thereof. It's super-awesome :D
Erlang doesn't have inheritance either but it doesn't become an exercise
in logic the same way because it doesn't have static-typing.
IIRC their structures are just transformed into a vector or something at
compile time, there's no real notion of a member of a data-structure.
I really like erlang though, the syntax is cool. Commas.
Apologies for the long post!
* Haskellers would probably call inheritance "sub-type polymorphism",
sitting in their tweed and smoking their pipes, etc.
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-05 05:14 -0500 |
| Message-ID | <20110405111450.6c6c9d5d@fractal> |
| In reply to | #2312 |
On Tue, 5 Apr 2011 18:13:44 +0900 Johnny Morrice <spoon@killersmurf.com> wrote: > Haskell doesn't have the feature called inheritance in Object Oriented > Languages*. > > Living without objects is okay, but it means you can't create a new > data-type that inherits members from another data-type. > > It has other mechanisms for code-reuse, but sometimes things which > would be really simple with, for example, a template method, into a > bit of an exercise in formal logic. Still, that's okay because that's > pretty much how you program the whole of the system in Haskell. Now that I think about it, the template method is a bad example. In Haskell you can inherit from abstract interfaces - you can't inherit from a data structure. So you can easily have a template method, it's just that it would have to defined as part of the abstract interface. So each child that implements the template would have to implement the interface. Then since you can't inherit from the data type, the children must be a whole new type which has the parent as a member, and pass that to the template method. At this point any functions which could have been run on the parent will now have to be reclared for the child :( Then again with the separation of code and data you start to consider if that really is the structure of your program. But usually by that time in Ruby, I'm already done! In conclusion, I'm too stupid to program in Haskell. If you choose it, good luck. Cheers, Johnny
[toc] | [prev] | [next] | [standalone]
| From | Brian Candler <b.candler@pobox.com> |
|---|---|
| Date | 2011-04-05 07:43 -0500 |
| Message-ID | <8fc6df58b77b681f2a9e1e7819be15ba@ruby-forum.com> |
| In reply to | #2312 |
Johnny M. wrote in post #990966: > Erlang doesn't have inheritance either but it doesn't become an exercise > in logic the same way because it doesn't have static-typing. > IIRC their structures are just transformed into a vector or something at > compile time, there's no real notion of a member of a data-structure. You're probably thinking of "records", which are basically just named offsets into a tuple. There are proper data structures too, such as "dict" which is somewhat like a ruby Hash. It can be a bit overwhelming at first having all the different built-in types: tuple, list, binary (when you'd just use Array in ruby) > I really like erlang though, the syntax is cool. Commas. It takes some grokking as to when you need a comma, when you need a semicolon, and when you need a dot. Erlang has great semantics and terrible syntax. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-05 08:09 -0500 |
| Message-ID | <20110405140930.02946183@fractal> |
| In reply to | #2332 |
On Tue, 5 Apr 2011 21:43:42 +0900 Brian Candler <b.candler@pobox.com> wrote: > You're probably thinking of "records", which are basically just named > offsets into a tuple. Hey yeah I was! > There are proper data structures too, such as "dict" which is > somewhat like a ruby Hash. I have should said I meant user defined data structures. > It can be a bit overwhelming at first having all the different > built-in types: tuple, list, binary (when you'd just use Array in > ruby) binary is not so unusual, kinda like bytestrings in python, or Haskell., Except in Haskell a bytestring is user defined rather than built in. > > I really like erlang though, the syntax is cool. Commas. > > It takes some grokking as to when you need a comma, when you need a > semicolon, and when you need a dot. Erlang has great semantics and > terrible syntax. Okay, I concede the point. I am utterly wrong. But I still enjoy the asthetics. It's sort of like a sentence in English.
[toc] | [prev] | [next] | [standalone]
| From | Brian Candler <b.candler@pobox.com> |
|---|---|
| Date | 2011-04-05 10:36 -0500 |
| Message-ID | <fa95e106231ba4c15a77a15711055eb0@ruby-forum.com> |
| In reply to | #2337 |
Johnny M. wrote in post #991021: >> > I really like erlang though, the syntax is cool. Commas. >> >> It takes some grokking as to when you need a comma, when you need a >> semicolon, and when you need a dot. Erlang has great semantics and >> terrible syntax. > > Okay, I concede the point. I am utterly wrong. No, not at all. I made my point badly: *I* find Erlang's syntax to be terrible, but syntax is clearly a very personal choice. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | serialhex <serialhex@gmail.com> |
|---|---|
| Date | 2011-04-05 11:21 -0500 |
| Message-ID | <BANLkTinBF8OvJQ92pJPTfXOtPgpt71H_jw@mail.gmail.com> |
| In reply to | #2352 |
[Note: parts of this message were removed to make it a legal post.] If you're lookng into haskell, you could give huburis a try (I dont have a link right now, but its on github by a guy named mark watton) it let's you run haskel code/programs within ruby. Not what you want if you're aiming for that "pure functional" feel, but I thought i'd mention it. hex an Android sent this On Apr 5, 2011 11:37 AM, "Brian Candler" <b.candler@pobox.com> wrote: Johnny M. wrote in post #991021: >> > I really like erlang though, the syntax is cool. Commas. >> >> It takes some grokking as to wh... No, not at all. I made my point badly: *I* find Erlang's syntax to be terrible, but syntax is clearly a very personal choice. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Tony Arcieri <tony.arcieri@medioh.com> |
|---|---|
| Date | 2011-04-05 12:30 -0500 |
| Message-ID | <BANLkTikkZvQrkz89h=CzYSB3Wvh3pHLvKA@mail.gmail.com> |
| In reply to | #2352 |
[Note: parts of this message were removed to make it a legal post.] On Tue, Apr 5, 2011 at 9:36 AM, Brian Candler <b.candler@pobox.com> wrote: > No, not at all. I made my point badly: *I* find Erlang's syntax to be > terrible, but syntax is clearly a very personal choice. I'm annoyed by there being 4 different types of statement endings, 3 of which look like ant turds -- Tony Arcieri Medioh! Kudelski
[toc] | [prev] | [next] | [standalone]
| From | serialhex <serialhex@gmail.com> |
|---|---|
| Date | 2011-04-06 13:04 -0500 |
| Message-ID | <BANLkTi=dPqmrWVPjkiS+MYBmA6_0crPjaA@mail.gmail.com> |
| In reply to | #2287 |
[Note: parts of this message were removed to make it a legal post.]
i think you are totally wrong about #{language_you_use} because
#{feature_i_think_sucks} makes the language unintelligible. personally i
find #{language_i_use} to be the uber be-all-end-all of languages.
though i do agree that #{current_thread} is kind of wonky :P
hex
#{hex.laughs_maniacally}
On Wed, Apr 6, 2011 at 1:52 PM, Jim Wise <jwise@draga.com> wrote:
> 7stud -- <bbxx789_05ss@yahoo.com> writes:
>
> > Haskell, Scala, or Erlang? Which one is the best?
>
> I'd say #{language_i_use} is by far the easiest of these to pick up. A
> lot of people use #{one_of_the_others} because of #{some_feature}, but
> it's more of a pain to use. In particular #{language_i_use} is a lot
> like Ruby in ways that will surprise you.
>
> I'd stay away from #{the_third_one}, because it has much more of a
> learning curve.
>
> Also, have you considered #{language_not_mentioned}? It's particularly
> neat if you're using #{some_system}.
>
> --
> Jim Wise
> jwise@draga.com
>
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-06 14:08 -0500 |
| Message-ID | <20110406200840.70391c08@fractal> |
| In reply to | #2390 |
On Thu, 7 Apr 2011 03:04:54 +0900
serialhex <serialhex@gmail.com> wrote:
> i think you are totally wrong about #{language_you_use} because
> #{feature_i_think_sucks} makes the language unintelligible.
> personally i find #{language_i_use} to be the uber be-all-end-all of
> languages.
>
> though i do agree that #{current_thread} is kind of wonky :P
> hex
>
> #{hex.laughs_maniacally}
>
Oh dear, we're onto meta-recommendations.
(Anyway the language I use is clearly better (as long as you like
parenthesis))
Some others tried to be serious; they tried to write in a sensible way,
but were actually writing in Erlang.
And as I said my personal opinion is that haskell = hard.
/hangs self
[toc] | [prev] | [next] | [standalone]
| From | 7stud -- <bbxx789_05ss@yahoo.com> |
|---|---|
| Date | 2011-04-06 19:30 -0500 |
| Message-ID | <b2b42284e0ea1a16e2e15b6f451141bd@ruby-forum.com> |
| In reply to | #2395 |
Johnny M. wrote in post #991283: > > And as I said my personal opinion is that haskell = hard. > I made it to chapter 5 of Real World Haskell before drowning in a real world JSON example. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.ruby
csiph-web