Permalink
Browse files

Add first version of italian translation

  • Loading branch information...
1 parent c3e97fa commit 7d94c54ad7a3e83b7624e91980b0e654db8222f2 @gcapizzi gcapizzi committed Mar 5, 2012
Showing with 3,508 additions and 0 deletions.
  1. +1 −0 rakelib/web.rake
  2. +11 −0 web/_layouts/doc_it.html
  3. +176 −0 web/doc/it/appendix-a-glossary.markdown
  4. +51 −0 web/doc/it/appendix-b-reading-list.markdown
  5. +103 −0 web/doc/it/bootstrapping.markdown
  6. +55 −0 web/doc/it/build-system.markdown
  7. +36 −0 web/doc/it/bytecode-compiler.markdown
  8. +10 −0 web/doc/it/bytecode-compiler/ast.markdown
  9. +14 −0 web/doc/it/bytecode-compiler/compiler.markdown
  10. +10 −0 web/doc/it/bytecode-compiler/customization.markdown
  11. +39 −0 web/doc/it/bytecode-compiler/encoder.markdown
  12. +131 −0 web/doc/it/bytecode-compiler/generator.markdown
  13. +69 −0 web/doc/it/bytecode-compiler/packager.markdown
  14. +62 −0 web/doc/it/bytecode-compiler/parser.markdown
  15. +50 −0 web/doc/it/bytecode-compiler/transformations.markdown
  16. +42 −0 web/doc/it/bytecode-compiler/writer.markdown
  17. +89 −0 web/doc/it/contributing.markdown
  18. +18 −0 web/doc/it/contributing/communication.markdown
  19. +108 −0 web/doc/it/contributing/style-guide.markdown
  20. +20 −0 web/doc/it/getting-started.markdown
  21. +64 −0 web/doc/it/getting-started/building.markdown
  22. +54 −0 web/doc/it/getting-started/requirements.markdown
  23. +33 −0 web/doc/it/getting-started/running-rubinius.markdown
  24. +69 −0 web/doc/it/getting-started/troubleshooting.markdown
  25. +17 −0 web/doc/it/how-to.markdown
  26. +53 −0 web/doc/it/how-to/commit-to-github.markdown
  27. +42 −0 web/doc/it/how-to/fix-a-failing-spec.markdown
  28. +37 −0 web/doc/it/how-to/translate-documentation.markdown
  29. +55 −0 web/doc/it/how-to/write-a-blog-post.markdown
  30. +23 −0 web/doc/it/how-to/write-a-ruby-spec.markdown
  31. +138 −0 web/doc/it/how-to/write-a-ticket.markdown
  32. +30 −0 web/doc/it/how-to/write-benchmarks.markdown
  33. +98 −0 web/doc/it/how-to/write-documentation.markdown
  34. +7 −0 web/doc/it/index-of-terms.markdown
  35. +72 −0 web/doc/it/index.markdown
  36. +9 −0 web/doc/it/jit.markdown
  37. +28 −0 web/doc/it/memory-system.markdown
  38. +67 −0 web/doc/it/memory-system/garbage-collector.markdown
  39. +336 −0 web/doc/it/memory-system/object-layout.markdown
  40. +62 −0 web/doc/it/ruby.markdown
  41. +9 −0 web/doc/it/ruby/blocks-and-procs.markdown
  42. +9 −0 web/doc/it/ruby/class-variables.markdown
  43. +9 −0 web/doc/it/ruby/classes-and-modules.markdown
  44. +9 −0 web/doc/it/ruby/constants.markdown
  45. +55 −0 web/doc/it/ruby/global-variables.markdown
  46. +9 −0 web/doc/it/ruby/instance-variables.markdown
  47. +9 −0 web/doc/it/ruby/local-variables.markdown
  48. +9 −0 web/doc/it/ruby/methods.markdown
  49. +9 −0 web/doc/it/ruby/scripts.markdown
  50. +38 −0 web/doc/it/specs.markdown
  51. +9 −0 web/doc/it/specs/compiler.markdown
  52. +9 −0 web/doc/it/specs/rubyspec.markdown
  53. +15 −0 web/doc/it/systems.markdown
  54. +9 −0 web/doc/it/systems/c-api.markdown
  55. +94 −0 web/doc/it/systems/concurrency.markdown
  56. +9 −0 web/doc/it/systems/ffi.markdown
  57. +9 −0 web/doc/it/systems/io.markdown
  58. +9 −0 web/doc/it/systems/primitives.markdown
  59. +13 −0 web/doc/it/tools.markdown
  60. +130 −0 web/doc/it/tools/debugger.markdown
  61. +242 −0 web/doc/it/tools/memory-analysis.markdown
  62. +329 −0 web/doc/it/tools/profiler.markdown
  63. +12 −0 web/doc/it/virtual-machine.markdown
  64. +9 −0 web/doc/it/virtual-machine/custom-dispatch-logic.markdown
  65. +13 −0 web/doc/it/virtual-machine/instructions.markdown
  66. +43 −0 web/doc/it/what-is-rubinius.markdown
View
@@ -15,6 +15,7 @@ namespace :web do
'de',
'es',
'fr',
+ 'it',
'ja',
'pl',
'pt-br',
View
@@ -0,0 +1,11 @@
+---
+layout: doc
+base_dir: /doc/it/
+lang: it
+lang_label: Lingue
+previous_label: Precedente
+next_label: Successivo
+up_label: Su
+toc_text: Indice
+---
+ {{ content }}
@@ -0,0 +1,176 @@
+---
+layout: doc_it
+title: Appendix A - Glossary
+previous: How-To - Translate Documentation
+previous_url: how-to/translate-documentation
+next: Appendix B - Reading List
+next_url: appendix-b-reading-list
+review: true
+---
+
+Definitions of terms and phrases used in the Ruby programming language and in
+this implementation. See also "The Ruby Programming Language" by Flanagan and
+Matsumoto [O'Reilly 2008] and "Programming Ruby: The Pragmatic Programmer's
+Guide" 2nd or 3rd Edition by Thomas et al [The Pragmatic Programmers
+2005-2008]
+
+
+* _method lookup or method resolution_
+
+ The rule is simple: Take the object located in the class slot of the object
+ (which is not always the return value of Object#class; if the object has one,
+ it'll be the singleton class) and begin searching.
+
+ Searching goes up the superclass chain until the superclass is nil.
+
+ In which case, redo lookup for method_missing. If we fail to find
+ method_missing, fail tragically.
+
+ +----------------+
+ | nil |
+ +----------------+
+ ^
+ | superclass
+ |
+ +----------------+
+ | Object |
+ +----------------+
+ ^
+ | superclass
+ |
+ +----------------+
+ | Module |
+ +----------------+
+ ^
+ | superclass
+ |
+ +----------------+
+ | Class |
+ +----------------+
+ ^
+ | superclass
+ |
+ +----------------+
+ | SingletonClass |
+ | (Object) |
+ +----------------+
+ ^
+ | superclass
+ |
+ +-------------+ +----------------+
+ | F | -----------------> | SingletonClass |
+ +-------------+ singleton class | (F) |
+ +----------------+
+
+
+ class Class
+ def wanker
+ puts 'you are'
+ end
+ end
+
+ class F
+ def self.bloke
+ wanker
+ end
+ end
+
+ 1. Resolve method 'wanker' -- search method_tables in:
+
+ 1. SingletonClass(F)
+ 1. SingletonClass(Object)
+ 1. Class
+
+ Found
+
+
+* _method_table_
+
+ A data structure in every class (and module) that contains the methods defined
+ for that class.
+
+ In Rubinius, a class's method_table is an instance of LookupTable.
+
+
+* _MatzRuby_
+
+ See MRI
+
+
+* _MRI_
+
+ Matz's Ruby Interpreter or Matz's Ruby Implementation. A short name to refer
+ to the official implementation of Ruby. See <http://ruby-lang.org>.
+
+
+* _private send_
+
+ A method call that has no explicit lexical receiver. The receiver of the
+ call is +self+. For example:
+
+ class A
+ private
+ def you_are_mine
+ end
+ end
+
+ class B < A
+ def sunshine
+ you_are_mine
+ end
+ end
+
+ class C
+ def dear
+ today = B.new
+ today.you_are_mine
+ end
+ end
+
+ The call to +you_are_mine+ in the method +sunshine+ is a private send. The
+ call to +today.you_are_mine+ will not succeed because private methods cannot
+ have an explicit receiver. In this case, the object +today+ is the explicit
+ receiver.
+
+
+* _singleton class_
+
+ Every object in Ruby can have one, although they are only created as
+ necessary. The singleton class holds the method and constant tables that
+ belong only to a particular object instance. For example, the method
+ +hello+ defined below exists only in the singleton class for +obj+.
+
+ obj = Object.new
+ def obj.hello
+ puts 'hi'
+ end
+
+ Since all classes in Ruby are also objects, they can have singleton classes.
+ The methods called "class methods" are just methods in the method_table of
+ the class's singleton class. The method +honk+ exists in the singleton class
+ for the class +Car+.
+
+ class Car
+ def self.honk
+ end
+ end
+
+ In Rubinius, singleton classes are all instances of the class
+ SingletonClass. The singleton class for an object can be obtained by calling
+ the +singleton_class+ method. The overall arrangement of concepts involved
+ here is sometimes referred to as the 'Meta-Object Protocol' or +MOP+.
+
+
+* _superclass_
+
+ The class that a particular class immediately inherits from. The class Object
+ is the superclass of all classes that do not inherit explicitly from a class.
+
+ class A
+ end
+
+ class B < A
+ end
+
+ Class A inherits from Object. In other words, A.superclass == Object. Class B
+ inherits explicitly from class A. So, B.superclass == A.
@@ -0,0 +1,51 @@
+---
+layout: doc_it
+title: Appendix B - Reading List
+previous: Appendix A - Glossary
+previous_url: appendix-a-glossary
+next: Terms Index
+next_url: terms-index
+review: true
+---
+
+Building virtual machines in general and programming language implementations
+in particular requires some knowledge. Rubinius' goal is to lower the barrier
+by keeping as much as possible in Ruby but to hack on the garbage collector you
+have to understand what's going on behind the curtains.
+
+This page contains references to books, online lectures, blog posts and any
+other publications you may find useful for working on Rubinius.
+
+NOTE that some of these links refer to outdated information about Rubinius.
+
+## Virtual machine
+
+ * [Smalltalk-80: language and its implementation](http://tinyurl.com/3a2pdq)
+ by Goldberg, Robson, Harrison (aka "The Blue Book"), implementation
+ chapters from part IV are [available online](http://tinyurl.com/6zlsd)
+ * [Virtual machines](http://tinyurl.com/3ydkqg) by Iain D. Craig
+ * Great posts by Adam Gardiner: [introduction](http://tinyurl.com/35y2jh),
+ [How send sites work](http://tinyurl.com/34c6e8)
+
+
+## Garbage collection
+
+ * [Garbage Collection: Algorithms for Automatic Dynamic Memory
+ Management](http://tinyurl.com/3dygmo) by Richard Jones
+ * [Garbage collection lectures](http://tinyurl.com/2mhek4)
+
+
+## Primitive methods
+
+ * [Ruby extensions and Smalltalk
+ primitives](http://talklikeaduck.denhaven2.com/articles/2007/06/04/ruby-extensions-vs-smalltalk-primitives)
+ * [Guide to Squeak
+ primitives](http://www.fit.vutbr.cz/study/courses/OMP/public/software/sqcdrom2/Tutorials/SqOnlineBook_(SOB)/englisch/sqk/sqk00083.htm)
+
+
+## FFI
+
+ * [Implementing File#link using
+ FFI](http://redartisan.com/2007/10/11/rubinius-coding)
+ * [Rubinius' foreign function
+ interface](http://blog.segment7.net/articles/2008/01/15/rubinius-foreign-function-interface)
@@ -0,0 +1,103 @@
+---
+layout: doc_it
+title: Bootstrapping
+previous: Build System
+previous_url: build-system
+next: Virtual Machine
+next_url: virtual-machine
+---
+
+Bootstrapping is the process of building up functionality of the system until
+all Ruby code can be executed. There are seven stages to the bootstrap process:
+
+ 1. VM: The virtual machine is able to load and execute bytecode, send
+ messages (i.e. look up and execute methods), and all primitive functions
+ are available, but not yet hooked up as Ruby methods.
+
+ The Class class has to be manually set up this early in the process by
+ setting its class to be itself and its superclass to be Module. In
+ addition to Class and Module, a couple of other base classes are created
+ here including Object, Tuple, LookupTable, and MethodTable.
+
+ Now that classes can be defined, 35 or so built in classes are told to
+ initialize themselves, symbols for top level methods (:object_id, :call,
+ :protected, etc) are created, basic exceptions are defined, and
+ primitives are registered. Finally IO gets hooked up. Also at this stage,
+ several fundamental Ruby methods are bound to primitives.
+
+ At this point there is enough defined behavior to begin to load up the
+ rest of the runtime kernel which is all defined in ruby. This has to be
+ done in several passes as the language grows.
+
+ 2. alpha: This starts the loading of Ruby code. The ability to open classes
+ and modules and define methods exists. The minimum functionality to
+ support the following methods is implemented in kernel/alpha.rb:
+
+ attr_reader :sym
+ attr_writer :sym
+ attr_accessor :sym
+ private :sym
+ protected :sym
+ module_function :sym
+ include mod
+
+ Also, it is possible to raise exceptions and cause the running process to
+ exit. This stage lays the foundation for the next two stages.
+
+ 3. bootstrap: This stage continues to add the minimum functionality to
+ support loading platform and common. The primitive functions are added
+ for most of the kernel classes.
+
+ 4. platform: The FFI (foreign function interface) system is implemented and
+ Ruby method interfaces to platform-specific functions are created. Once
+ this is set up, platform specific things such as pointers, file access,
+ math, and POSIX commands are attached.
+
+ 5. common: The vast majority of the Ruby core library classes are
+ implemented. The Ruby core classes are kept as implementation-neutral as
+ possible. Also, most of the functionality for Rubinius specific classes
+ is added.
+
+ 6. delta: Final versions of methods like #attr_reader, etc. are added. Also,
+ implementation-specific versions of methods that override the versions
+ provided in common are added.
+
+ 7. loader: The compiled version of kernel/loader.rb is run.
+
+ The final stage sets up the life cycle of a ruby process. It starts by
+ connecting the VM to the system, sets up load paths, and reads
+ customization scripts from the home directory. It traps signals, and
+ processes command line arguments.
+
+ After that, it either runs the script passed to it from the command line
+ or boots up the interactive ruby shell. When that finishes, it runs any
+ at_exit blocks that had been registered, finalizes all objects, and
+ exits.
+
+## Load Order
+
+The files in the kernel directories bootstrap, platform, common, and delta,
+implement the respective bootstrapping stages above. The order in
+which these directories are loaded is specified in runtime/index.
+
+When an rbc file is loaded, code at the script level and in class or module
+bodies is executed. For instance, when loading
+
+ class SomeClass
+ attr_accessor :value
+ end
+
+the call to #attr_accessor will be run. This requires that any code called in
+script, class, or module bodies be loaded before the file that calls the code.
+The kernel/alpha.rb defines most of the code that will be needed at the script
+or module level. However, other load order dependencies exist between some of
+the platform, common, delta, and compiler files.
+
+These load order dependencies are addressed by the load_order.txt file located
+in each of the kernel/\*\* directories. If you modify code that adds a load
+order dependency, you must edit the load_order.txt files to place the depended
+on file above the file that depends on it. Also, if you add a new file to one
+of the kernel directories, you must add the file name to the load_order.txt
+file in that directory. These files are copied to the appropriate runtime/\*\*
+directories during build. During each of the bootstrap stages above, the VM
+loads the files listed in load_order.txt in order.
Oops, something went wrong.

0 comments on commit 7d94c54

Please sign in to comment.