Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby - Missed some core computer science world ?

Reply
Thread Tools

Ruby - Missed some core computer science world ?

 
 
Lucky Dev
Guest
Posts: n/a
 
      03-06-2011
I am doing ruby programming and been developing rails3 apps for some
time now (4-5 months). I am just wondering, if the ruby world is sooo
immersed in its beautiness and is not doing much to embrace cleverness
in ruby world.

I mean, the whole world of datastructures and algorithms, seems to have
much lower importance on a ruby programmer's mind. Is it so?

I am just enjoying ruby programming for the past few months, but I feel
that I've missed a lot of internal stuff in C, while was doing C
programming. Like, datastructures like trees, linked lists, etc., and
algorithms in C.

Also, I don't see much "good" books on datastructures and algorithms in
ruby or Have I missed to notice them in the market. Can you please point
me to good datasturctures and algorithms learning book using ruby.

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

 
Reply With Quote
 
 
 
 
Mike Stephens
Guest
Posts: n/a
 
      03-06-2011
Modern computers can have 100 cores and a zillion bytes of memory. There
is a lot less emphasis on how clever your program is. Who cares how your
hash is stored? All you want is the most convenient code, fastest to
build, easiest to maintain.

I can't imagine why any but the tiniest number of Rails users would ever
need a linked list.

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

 
Reply With Quote
 
 
 
 
Sandor Szuecs
Guest
Posts: n/a
 
      03-06-2011

On Mar 6, 2011, at 10:05 AM, Lucky Dev wrote:

> I mean, the whole world of datastructures and algorithms, seems to =

have
> much lower importance on a ruby programmer's mind. Is it so?


There was a GSOC called "algorithms" some time ago. Besides algorithms =
it
has datastructures like heap, rb_tree_map or trie.
I think the head of this project is now in a gem called =
grosser-algorithms.

All the best, Sandor Sz=FCcs
--




 
Reply With Quote
 
Lucky Dev
Guest
Posts: n/a
 
      03-06-2011
We can always say maintenance is more good than any other attribute. But
the scale in which we solve problems, will always be limited if we don't
give importance to algorithms and the like concepts, in Ruby.

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

 
Reply With Quote
 
Phillip Gawlowski
Guest
Posts: n/a
 
      03-06-2011
On Sun, Mar 6, 2011 at 10:05 AM, Lucky Dev <(E-Mail Removed)> wrote:
>
> I mean, the whole world of datastructures and algorithms, seems to have
> much lower importance on a ruby programmer's mind. Is it so?



Algorithms are algorithms, datastructures are datastructures. They
exist independent of the programming language used (now, if the
programming language of choice is up to the task is a different
matter, and not easy to answer).

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

 
Reply With Quote
 
Victor Deryagin
Guest
Posts: n/a
 
      03-06-2011
Lucky Dev <(E-Mail Removed)> writes:

> Also, I don't see much "good" books on datastructures and algorithms in
> ruby or Have I missed to notice them in the market. Can you please point
> me to good datasturctures and algorithms learning book using ruby.


http://cleveralgorithms.com - book on AI algorithms in ruby (free).

 
Reply With Quote
 
[::psyomn::]
Guest
Posts: n/a
 
      03-06-2011
Wow, that is really awesome. Thanks for sharing!

On Sun, Mar 06, 2011 at 10:38:32PM +0900, Victor Deryagin wrote:
> Lucky Dev <(E-Mail Removed)> writes:
>
> > Also, I don't see much "good" books on datastructures and algorithms in
> > ruby or Have I missed to notice them in the market. Can you please point
> > me to good datasturctures and algorithms learning book using ruby.

>
> http://cleveralgorithms.com - book on AI algorithms in ruby (free).
>


 
Reply With Quote
 
David Jacobs
Guest
Posts: n/a
 
      03-06-2011
[Note: parts of this message were removed to make it a legal post.]

Hamster is a good place to look for interesting data structures in Ruby:

https://github.com/harukizaemon/hamster
On Sunday, 6 March 2011 at 8:54 am, [:syomn::] wrote:
> Wow, that is really awesome. Thanks for sharing!
>
> On Sun, Mar 06, 2011 at 10:38:32PM +0900, Victor Deryagin wrote:
> > Lucky Dev <(E-Mail Removed)> writes:
> >
> > > Also, I don't see much "good" books on datastructures and algorithms in
> > > ruby or Have I missed to notice them in the market. Can you please point
> > > me to good datasturctures and algorithms learning book using ruby.

> >
> > http://cleveralgorithms.com - book on AI algorithms in ruby (free).

>


 
Reply With Quote
 
Robert Klemme
Guest
Posts: n/a
 
      03-07-2011
On Sun, Mar 6, 2011 at 10:05 AM, Lucky Dev <(E-Mail Removed)> wrote:
> I am just wondering, if the ruby world is sooo
> immersed in its beautiness and is not doing much to embrace cleverness
> in ruby world.
>
> I mean, the whole world of datastructures and algorithms, seems to have
> much lower importance on a ruby programmer's mind. Is it so?


Certainly not for me but it may be the case for the community on average.

> Also, I don't see much "good" books on datastructures and algorithms in
> ruby or Have I missed to notice them in the market. Can you please point
> me to good datasturctures and algorithms learning book using ruby.


Basically *any* good book on data structures and algorithms will do -
regardless of programming language used for examples. Transferring
examples from one language to another is usually easy to do. I never
grokked why Sedgewick wrote his algorithms books for all sorts of
programming languages. Note, I am not saying they are bad - actually
I believe they are pretty good. But I think he overdid it in terms of
programming languages.

With regard to lack of data structures, if you need a tree it can be as easy as

TreeNode = Struct.new :data, :left, :right, arent do
include Enumerable

def each(&b)
left and left.each(&b)
b[data]
right and right.each(&b)
self
end
end

But of course it depends on the use case how your tree will really
look like. I don't think you'll gain much by including a generic tree
in the standard library because it is so easy to implement and you
need specific code for every real tree anyway.

Kind regards

robert

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

 
Reply With Quote
 
Mike Stephens
Guest
Posts: n/a
 
      03-07-2011
Robert

Surely, when you elect to use objects, and you are inclined to use
things like .each or .sort, you are making a choice to move away from
worrying about data structures and algorithms?

There are of course still data structures and algorithms -rather like
the AI book mentioned above - but what people used to talk about in data
structures and algorithms were much more prosaic things which I suggest
are not of the same interest nowadays.

When someone says "Why aren't there more things about Ruby array
searches etc?" I think there is a case for saying we treat these more as
implementation details nowadays and typically only investigate the
details if a performance issue crops up, so look for a higher level of
abstraction when you move to Ruby.

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call for Papers: The 2009 World Congress in Computer Science,Computer Engineering, and Applied Computing (WORLDCOMP'09) A. M. G. Solo VHDL 0 11-24-2008 05:17 AM
Call for Papers: World Congress on Engineering and Computer Science (WCECS 2007) imecs__2007@iaeng.org Java 0 05-10-2007 11:57 AM
Call for Papers: World Congress on Engineering and Computer Science WCECS 2007 imecs__2007@iaeng.org Java 0 02-07-2007 09:48 AM
Call for Sessions Proposals: World Congress on Engineering and Computer Science WCECS 2007 imecs__2007@iaeng.org Java 0 09-20-2006 01:42 PM
Core Solo & Core Duo are not Core microarchitecture; 65nm Pentium M chips bigal Hardware 0 03-22-2006 11:24 AM



Advertisments