What language features does Ruby borrow from CLU? [closed] - ruby

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have read in Ola Bini's blog that Ruby has influenced by CLU language, but besides the multiple assignment I'm not sure what other influences exist. Any guidance and simple examples would be most appreciative.

The only time matz ever mentioned CLU was when talking about iterators. Everything else is more or less directly from Smalltalk, Lisp, Flavors and Perl. Singleton classes seem to be unique to Ruby, though they are related to Smalltalk's metaclasses.

Depends on how abstract you want to get: CLU had iterators, exceptions, memory management, and was sort-of OO.
It was actually kind of interesting.

Related

Ruby on Rails marketability [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've been researching about Ruby on Rails and its marketability today. How does it compare to the other programming languages (like JAVA)? Would it be a really great time to learn it now? Will it be beneficial for me to learn this as my primary programming language?
I just wanted to know the highs and lows for this technology before I dive in and start learning.
Your opinions would be appreciated.
The name of the programming language is Ruby. Ruby on Rails is an awesome framework for fast, efficient building of web applications.
Ruby is an interpreted language in opposition to Java or C#, which are compiled.
With Ruby there's no need for type definition or type casting, no semicolons at the end of the line, no parentheses for method invocations, operators overload, getters/setters automatically available for all instance variables and many, many more. (copied from here)
I think that the learning curve with ruby is very steep.
But, after all, all the above is just an opinion ... my opinion. And you're question "Would it be a really great time to learn it now?" is answered by the pragmatic programmers: Learn a new programming language every year. So, why not starting learn Ruby now?

Do any computer languages not use a stack? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Do any computer languages not use a stack data structure to keep track of execution progress?
Or is the use of this data structure an emergent requirement stemming from something inherent to most computer languages or turing machines?
With a traditional "C-style" stack, certain language features are difficult or impossible to implement. For example, closures can't easily be implemented with a traditional stack because closures require a pointer to an old activation record to work correctly and that memory is automatically reclaimed in a C-style stack. As another example, generators and coroutines need their own memory to store local variables and relative offset information and therefore can't easily be implemented if you use a standard stack implementation.
Hope this helps!

Advanced Rudimentary Computing? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Lets say that my definition of 'rudimentary programming' refers to the fundamental tools employed for a computer to perform a task.
Considering programming rudiments, the learning spectrum usually looks something like this:
Variables, data types and variable memory
Arrays/Lists and their manipulation
Looping and conditionals
Functions
Classes
Multi threading/processing
Streams (hard-disk and web)
My question is, have I missed any of the major rudiments? Is there a 'next' to the spectrum that still eludes me?
I think you missed the most important one: algorithms. Understanding the complexity, know the situation to use them, why use them and more important, how to implement them.
I'm pretty sure that you already know a lot about algorithms but if you think that your tool-knowledge (aka the programming languages) are good enough, you should start focus, more, on the algorithms.
A great book to start is: Introduction to Algorithms, from Thomas H. Cormen

First programming language to have an interactive shell? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Out of sheer curiosity and the pursuit of trivia, I couldn't find an answer on Google quickly.
Dear fellow programmers, what is the first programming language to provide an interactive shell?
I can't prove other systems weren't earlier but the LISP REPL construct is one common name given to this style of interpreter.
The LISP I Programmers Manual from 1960 (PDF) includes a mention on page 2 that is apropos:
Enlargements of the basic system are available for various purposes. The compiler version of the LISP system can be used to compile S-expressions into machine code. Values of compiled functions are computed about 60 times faster than the S-expressions for the functions could be interpreted and evaluated. The LISP-compiler system uses about half of the 32,000 memory.

How to measure the size of a Ruby object? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm having Memcache problems and I was wondering what is the best way to know how big the objects I create are.
The only solution I have is to put them into Memcache which display their size in bytes (by the way, can I customize Memcache's output? I want readable kilobytes…).
Thank you,
Kevin
The excellent Eigenclass blog had an interesting article on that once:
http://web.archive.org/web/20120126022146/http://eigenclass.org/R2/writings/object-size-ruby-ocaml
There also was a good discussion on ruby-talk, which led to some code by Robert Klemme (Ruby Best Practices):
http://www.ruby-forum.com/topic/156648
http://www.pastie.org/217131
Plugging the values from the first article into the script might get you started and is probably quite educational.
You could also check out memprof, though it's more about object references and finding memory leaks than actual sizes:
http://github.com/ice799/memprof

Resources