Ruby Under a Microscope und über 1,5 Millionen weitere Bücher verfügbar für Amazon Kindle. Erfahren Sie mehr
  • Alle Preisangaben inkl. MwSt.
Nur noch 6 auf Lager (mehr ist unterwegs).
Verkauf und Versand durch Amazon.
Geschenkverpackung verfügbar.
Menge:1
Ruby Under a Microscope: ... ist in Ihrem Einkaufwagen hinzugefügt worden
+ EUR 3,00 Versandkosten
Gebraucht: Gut | Details
Verkauft von farbenmischer
Zustand: Gebraucht: Gut
Kommentar: ungelesen, Umschlag leicht verschmutzt, Innenteil in Ordnung, sonst guter Zustand
Ihren Artikel jetzt
eintauschen und
EUR 6,50 Gutschein erhalten.
Möchten Sie verkaufen?
Zur Rückseite klappen Zur Vorderseite klappen
Anhören Wird wiedergegeben... Angehalten   Sie hören eine Probe der Audible-Audioausgabe.
Weitere Informationen
Alle 2 Bilder anzeigen

Ruby Under a Microscope: An Illustrated Guide to Ruby Internals (Englisch) Taschenbuch – 30. November 2013


Alle 2 Formate und Ausgaben anzeigen Andere Formate und Ausgaben ausblenden
Amazon-Preis Neu ab Gebraucht ab
Kindle Edition
"Bitte wiederholen"
Taschenbuch
"Bitte wiederholen"
EUR 24,95
EUR 21,94 EUR 21,00
52 neu ab EUR 21,94 4 gebraucht ab EUR 21,00

Hinweise und Aktionen

  • Sie suchen preisreduzierte Fachbücher von Amazon Warehouse Deals? Hier klicken.

  • Sichern Sie Ihre Daten kostengünstig und sicher im europäischen Amazon Web-Services-Rechenzentrum. So einfach geht‘s

Jeder kann Kindle Bücher lesen — selbst ohne ein Kindle-Gerät — mit der KOSTENFREIEN Kindle App für Smartphones, Tablets und Computer.


Produktinformation


Mehr über den Autor

Entdecken Sie Bücher, lesen Sie über Autoren und mehr

Produktbeschreibungen

Über den Autor und weitere Mitwirkende

Well-known for his coding expertise and passion for the Ruby programming language, Pat Shaughnessy writes tutorials and blogs at http://patshaughnessy.net/. He also Ruby applications at management consulting firm McKinsey & Co. Shaughnessy is a regular presenter on the Ruby conference circuit, and his articles and presentations have been featured in the Ruby Weekly newsletter, the Ruby5 podcast, and The Ruby Show.

Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?


In diesem Buch (Mehr dazu)
Ausgewählte Seiten ansehen
Buchdeckel | Copyright | Inhaltsverzeichnis | Auszug | Stichwortverzeichnis | Rückseite
Hier reinlesen und suchen:

Kundenrezensionen

Es gibt noch keine Kundenrezensionen auf Amazon.de
5 Sterne
4 Sterne
3 Sterne
2 Sterne
1 Sterne

Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)

Amazon.com: 9 Rezensionen
14 von 15 Kunden fanden die folgende Rezension hilfreich
A technical deep dive that remains fun and enjoyable 17. November 2013
Von Federico Lucifredi - Veröffentlicht auf Amazon.com
Format: Taschenbuch
Ruby Under a Microscope is a remarkable dissection of the internals of Ruby's runtime environment. Definitely too much for the casual user, but an absolute must for the power user - the dissection of how hash tables work in Ruby "under the hood" is worth the book in of itself. Coverage of the innards of the runtime's garbage collection process is equally useful.

The experiments the author carries out throughout the book to show the language's behavior, or to measure performance, are not only great explanation of how things operate, they are entertaining to read - at least for those with a performance tuning eye or a desire to really understand what is going on. I love it, I have seen this done in class, I have done it myself, but it is a teaching model rarely seen in writing that fits this technically deep subject very well.

Fans of lisp will appreciate the credit that the author gives the venerable language for closures and for McCarthy's garbage collection algorithm, among other things.

The book is richly illustrated, and the diagrams help a great deal in following the details being discussed - as you can imagine, pointers^Hreferences are everywhere, and diagrams really make decoding the lay of the land much easier.

A minor negative, looks like No Starch used a lighter paper choice than their regular, thick heavy paper - a fancy attribute of their books that I have come to look forward to. I would expect this was done to limit the heft of this particular tome, that at 330-plus pages would have come out rather thick in the usual paper choice.
4 von 4 Kunden fanden die folgende Rezension hilfreich
Relevant and mandatory - Akin to K&R's 'C' reference, or Windows Internals for the Windows OS for the Ruby developer 5. Januar 2014
Von Richard T. Kingslan - Veröffentlicht auf Amazon.com
Format: Taschenbuch
Ruby has become a major player in application and (by extension) Web development due to the easy to acquire skills to use the language, the expansive library sets due to the open source nature and the integration and support on nearly any platform.

Me, being a Windows OS guy, I look to major references like Microsoft Press’ “Windows Internals” to understand how things really work – not just at the surface – but why something does what it does. For example, if the distributed processing calls (DPC) result in interrupts consuming the processor, I know I’m usually looking at a driver or hardware problem.

“Ruby – Under a Microscope” is much like “Windows Internals” in that the how and why of Ruby is revealed.

What should be clear from the idea of an in-depth, deep technical details book – this isn’t for the beginner, like Microsoft Press’ “Windows Internals” isn’t for the newbie Windows OS user. If you don’t know what DPCs are and what they do – knowledge of DPCs is pretty much useless. To get the full value from this book, you should already be an experienced Ruby programmer (or have depth in similar languages). What the experienced developer will get from this book is the details that will allow them to extract more power from Ruby, better understanding of why things happen, and how to better use Ruby to solve the really hard problems.

Now that we’re past the “who this book is for” part, there is one more thing to understand before you decide that this is of value to you: Exactly WHICH Ruby are we talking about? Yes, Ruby is available on nearly all platforms. However, this is because some hard working people wanted to make sure that the language was widely available, and these hard working people made it available on platforms other than what the original Ruby was developed for.

So, how do you know which version of Ruby this book is focused on? The book is focused on the Matz (Yukihiro “Matz” Matsumoto) Ruby Interpreter, written in C. Other implementations are discussed, and these are discussed in the context of how others implemented the language that Matz created in 1993.

The book treats Ruby as a science study, much like a scientist would study microbes (“…Under a Microscope”, get it?). Instead of looking at organisms, the book looks at the base elements of Ruby: The actual ‘C’ source code. If you’re a computer science major, this is nothing new. The source code is studied to understand what Ruby does to perform the tasks that you give it. As you go through the book and look at Ruby at the very base elements, you can gain a complete understanding of how computers really work. There is nothing more basic than the process of providing information to a computing machine and seeing how the actual process of creating tokens, parsing of tokens, compiling into an intermediate format, and then passing onto the virtual machine (YARV – Yet Another Ruby Virtual Machine) that interfaces at the machine level. Once the processing is complete, understanding how to receive the output, convert it back into something that the programming language can understand is absolutely vital to knowing why things work. And, probably most importantly, knowing what’s wrong when they don’t work.

This is the real goal of “Ruby: Under a Microscope”. Providing understandable information for the knowledgeable programmer to gain a deep understanding of what Ruby is, what it does, and how it attains the goals that it sets for itself. This opens the door wide open for those that want to add to the language with libraries and extensions – which is the real power of a successful language: Expansion by anyone with a great idea.
8 von 10 Kunden fanden die folgende Rezension hilfreich
Very approachable look at Ruby language implementation 22. November 2013
Von IADev - Veröffentlicht auf Amazon.com
Format: Taschenbuch
This book is not for learning Ruby syntax or about building websites. Instead, it focuses on how Ruby does work under the covers. Explanations use diagrams and are clear overall. While the author does point out C files and some C code, understanding of the material does not depend on C knowledge as noted in the introduction. In my opinion, this is a great work for those trying to bridge the gap between using a programming language and really starting to think about how it works. I would say that the best audience for the book would be those who have some interest in compiler or language design. If you have already focused on such areas in formal course work, you probably won't come across as an in-depth theory approach, in my opinion, in this material (for example if you have the "Dragon Book" sitting on your reference shelf). However, the treatment is very approachable for the interested casual learner to pick up and understand subjects like tokenization and parsing and leave one with a solid foundation. The first 9 chapters focus on CRuby but chapters are also included on JRuby and Rubinius. I appreciated the author's use of "Experiments" such as showing how to use Ripper and RubyVM::InstructionSequence from your own Ruby programs. It's one thing to be able to see an example of YARV instructions for a canned book example but it is even more powerful to have the tools to get the output of your own custom scripts and modifications.

Overall conclusion: Very approachable look at Ruby language implementation. Having been interested in compliers, I found this a great introduction into this specific CS topic. It was also nice to see the book use a real language for the examples. I found the book unlike any other programming book I had read on Ruby and enjoyed the practical look under the hood of Ruby.

Disclaimer: I got a copy of this book for review as part of O'Reilly blogger program.
3 von 3 Kunden fanden die folgende Rezension hilfreich
See the wiring under the board 12. Februar 2014
Von Michael Larsen - Veröffentlicht auf Amazon.com
Format: Kindle Edition
Let's start with a disclaimer. I'm not a Computer Science major, nor did I complete a Computer Science course of study in school. I'm a software tester, and one that finds themselves frequently using programming languages of various stripes for various purposes. Ruby is one of the most popular languages in current use, and for many, it's a language that allows them to learn some basic terms, some programming constructs, and then lets them just use it. It's clean, it's elegant, it's almost simple. It's a language that invites the user to just go with it.

For some, though, there's that sense of curiosity... what is my Ruby program really doing? How can I see what the system is actually doing with my code? What's going on underneath the hood? If such explorations interest you, then "Ruby Under a Microscope" by Pat Shaughnessy tackles that subject handily.

A word of warning going in. This is not a general language book. You will not learn much about programming in Ruby here. You should have a decent understanding of what Ruby syntax looks like and how it works. Having said that, you don't need to have years of experience with Ruby to appreciate this book for what it does. It takes some key areas of the language, and through examples, some small programs, and a variety of tools, lets you see and understand what Ruby actually looks like up close and personal.

Chapter 1 focuses on how Ruby understand the text that you type into your Ruby program. Ruby converts your source code first into tokens, and then converts that input stream into an "abstract syntax tree”. Through tools like “Ripper”, you can see this process and watch it in something resembling natural language (well, kind of. It’s still debug code, but it’s a lot less intimidating than one might think.

Chapter 2 covers how Ruby compiles code. Wait, isn’t Ruby a “scripting language, no compiler required? With 1.8 and earlier, yes, but with 1.9 and up, Ruby is compiled just like many other languages we are familiar with. The difference? Ruby does it automatically. You never need to invoke the compiler. Ruby also has its own “virtual machine” (YARV, or "Yet Another Ruby Virtual Machine) that it compiles its bytecode for. Ultimately, the byte code for YARV is what we witness running.

Chapter 3 goes into greater detail about how YARV runs our code. By comparing the steps necessary to run a simple program, we can compare the time it takes to run a program in Ruby 1.8 (which doesn’t have a compile sequence, it just runs) and Ruby 1.9 and 2.0, which do have compile sequences. For simple and brief interactions, it actually looks like Ruby 1.8 performs better, but for longer runs with more iterations, 1.9 and 2.0 have a huge advantage over 1.8 by virtue of its compile cycle.

Chapter 4 focuses more attention on the virtual machine and how control structures and methods are handled within the YARV. If statements, for loops and calls to various methods demonstrate how ruby breaks down the instructions, as well as how it utilizes its internal calls to “jump” from one piece of code to another. Ruby categorizes methods into 11 types, and labels its built-in methods as CFUNC methods, meaning they are implemented in C. Ruby also uses a hash to keep track of the number of arguments, her labels and what their default values should be.

Chapter 5 looks at objects and classes, specifically, Ruby’s internal objects and classes. Each Ruby object is, ultimately, a class pointer paired with an array of instance variables, and everything in Ruby is an object. Several generic objects are shown, along with their C structures (RString, RArray, RRegexp, etc.), and demonstrate how they, likewise, are also simple combinations of a class pointer and instance variables. Classes are a little more involved. Each Ruby class can be defined as Ruby object (with its class pointer & instance variables) plus method definitions, attribute names, a constants table and a “superclass” pointer.

Chapter 6 brings us deeper into methods and constants, specifically how these aspects are found and represented. Ruby lets a programmer look at programs with two contrasting paradigms. Code can be organized through classes and super-classes, or it can be organized through "lexical scope". Which approach makes the most sense? it depends on what you want to have your program accomplish.

Chapter 7 gets into one of the key attributes of Ruby internals, the Hash Table. These are interesting data structures that allow a program to return values quickly, and to automatically increase in size as more elements are added. the chapter takes a deep dive into Ruby’s hash function and how it allows for elements to be accessed quickly.

Chapter 8 covers blocks, and how the Blocks concept in Ruby borrows from the “closure” idea first prosed in the Lisp language several decades back. Blocks can be defined as “a combination of a function and an environment to use when calling that function”. Using “lambda”, a block can become a data value that can be passed, saved, and reused.

Chapter 9 discusses Metaprogramming, a means to program in a way that code can inspect and change itself, dynamically. In other words, by referencing itself, your program can change itself! I’ll admit, this is one of the aspects of Ruby (or any language) that I have trouble getting my head around, and while I won’t claim to have mastery of these ideas after this chapter, I feel I have a little better feel for what’s happening.

Chapter 10 takes us into the Java realm and shows us Ruby implemented in Java, as opposed to how we’ve been interacting with it thus far in C. The flow is similar, but each Ruby script gets compiled into a Java executable, and then is physically run by the Java Virtual Machine. We see how “Jay” parses the lines of code (much the way Bison does for MRI). By monitoring Java’s Just In time Compiler, we can see which class and structures are called whenever we create a script and run it. We can also see where, by focusing on various “hot spots in our program and compiling them into Java, we can save time in key areas compared to C implemented MRI.

Chapter 11 introduces Rubinious, a version of Ruby implemented with Ruby. Well, it’s actually a virtual machine using C++ to run Ruby code. What makes it different is that, rather than relying on C or Java Structures for the built in classes, Rubinious does it with Ruby code. What does this mean? we can see how Ruby works internally without having to know C or Java. It’s all done in Ruby, and we can see how by reading the source code.

Chapter 12 explores Ruby’s Garbage Collection, and how it differs, and is similar, in MRI, JRuby and Rubinious. Garbage collection helps us with three processes; allocating memory for use by new objects, identifying which objects a program is no longer using, and reclaiming memory from unused objects. Various programs and examples demonstrate which objets are mapped where, and how to see when they are deallocated and their memory freed. Various algorithms for the various virtual machines are explored, but this is just a cursory overview of all the options and how they are implemented. Still, it’s an interesting view into a process that many of us take for granted because Ruby and many other languages basically let us take them for granted.

Bottom Line:

"Ruby Under a Microscope" does something fairly ambitious. It attempts to write a system internals book in a language that non computer scientists can readily understand. While there are numerous code snippets and examples to try and examine, the ability to look at the various Ruby internals and systems and see how they fit together can be accomplished by someone with general skills and basic familiarity with programming at the script level (which for many of us is as far as we typically get). An old saying says you can’t tell where yo hare going if you don’t know where you’ve been. Similarly, we can’t expect to get the most out of languages like ruby without having a more clear idea what’s happening under the hood. It’s entirely possible to work with Ruby and never learn some of this stuff, but having a guide like "Ruby Under a Microscope” opens up a variety of avenues, and does so in a way that will make the journey interesting and, dare I say it, even a little fun.
4 von 5 Kunden fanden die folgende Rezension hilfreich
Essential reading for the Rubyist who wants to know how the magic works. 25. November 2013
Von Sephiroth - Veröffentlicht auf Amazon.com
Format: Taschenbuch
Can't put it down! 1/3 of the way through in just a day. Not too dry, gives you just the right amount of info without droning on or leaving things out. Makes clear what's going on under the hood. The author's passion for exploration and experimentation really comes across, and is likely to infect the readers with a desire to do some poking around of their own. Does not require knowledge of C, but includes numerous sidebars and notes for the C-initiated as a bonus. Doesn't just declare things to be so and leave it at that; includes references to and snippets from the source files, plus Ruby code you can execute to put the theories to the test (e.g., what does this actually compile to, what performance gains will we really see).

If you are new to Ruby, don't get this book... yet. Once you are building Real Software in Ruby and have already gone through a few higher-level books, this one will be there to fill a missing essential spot on your shelf. If you're using Ruby in the field and need/want to know the how and why of Ruby's performance, quirks, etc., you need this book. Check out the author's web site as well; you can see where this book came from, as the author's site is crammed full of "under-a-microscope" explorations and experiments, some of which go even deeper than this tome's already elucidating explanations.
Waren diese Rezensionen hilfreich? Wir wollen von Ihnen hören.