The document discusses Ruby programming language tools. It covers the Ruby language basics like its object oriented nature and syntax. It then discusses tools like gems, Bundler, and RVM. Gems allow distributing and sharing Ruby code and functionality. Bundler manages gem dependencies to ensure consistent environments. RVM allows isolating Ruby environments and versions to support different projects having independent Ruby configurations.
This document is a partial introduction to the Ruby programming language. It covers various Ruby concepts like objects, variables, methods, blocks, and more through a series of slides. The slides provide code examples and explanations to illustrate key elements of the Ruby language such as classes, operators, strings, arrays, hashes, and iterators.
A quick introduction to the object-oriented programming language Ruby, part of a full lecture on Programming Paradigms at UCL university in Belgium, focussing on the programming languages Smalltalk, Ruby and Java, with reflection and meta programming as underlying theme.
This document summarizes a seminar on Ruby programming. It introduces Ruby as a scripting language created by Yukihiro Matsumoto in the mid-1990s. Ruby is an object-oriented, dynamic language that allows for rapid development and prototyping. The seminar covers Ruby's history, overview, tools needed, differences from other languages, advantages like clean code and easy learning, disadvantages like slower development, and provides an example Ruby program to calculate factorials.
This technical talk introduces Ruby as a programming language. It provides an overview of Ruby's history, basic features, and differences from other languages like Java and PHP. The document also discusses Ruby on Rails, meta programming in Ruby, and resources for learning Ruby.
Ruby Programming Language - IntroductionKwangshin Oh
Ruby is an interpreted, object-oriented, and dynamically typed programming language. It was created in the 1990s by Yukihiro Matsumoto to enhance programmer productivity and have fun. Some key aspects include everything being an object, duck typing where objects are identified by their methods/attributes rather than type, and a focus on simplicity, readability, and productivity for programmers.
The document introduces Ruby and Rails. It discusses that Ruby is an object-oriented scripting language created by Matz to bring joy to programming. Rails is a web framework that makes building database-driven web applications easy through conventions like MVC, templates, and ORMs. The document then provides an overview of major Ruby features like objects, variables, arrays, hashes, symbols, blocks and iterators. It also demonstrates building a simple class in Ruby. Finally, it shows a quick demo of generating a TODO list application in Rails.
The document is an introduction to the Ruby programming language presented by Premshree Pillai. The presentation provides an overview of Ruby's history and basics, including its object-oriented nature, syntax, and comparisons to Perl and Python. It also provides resources for learning more about Ruby.
This document is a partial introduction to the Ruby programming language. It covers various Ruby concepts like objects, variables, methods, blocks, and more through a series of slides. The slides provide code examples and explanations to illustrate key elements of the Ruby language such as classes, operators, strings, arrays, hashes, and iterators.
A quick introduction to the object-oriented programming language Ruby, part of a full lecture on Programming Paradigms at UCL university in Belgium, focussing on the programming languages Smalltalk, Ruby and Java, with reflection and meta programming as underlying theme.
This document summarizes a seminar on Ruby programming. It introduces Ruby as a scripting language created by Yukihiro Matsumoto in the mid-1990s. Ruby is an object-oriented, dynamic language that allows for rapid development and prototyping. The seminar covers Ruby's history, overview, tools needed, differences from other languages, advantages like clean code and easy learning, disadvantages like slower development, and provides an example Ruby program to calculate factorials.
This technical talk introduces Ruby as a programming language. It provides an overview of Ruby's history, basic features, and differences from other languages like Java and PHP. The document also discusses Ruby on Rails, meta programming in Ruby, and resources for learning Ruby.
Ruby Programming Language - IntroductionKwangshin Oh
Ruby is an interpreted, object-oriented, and dynamically typed programming language. It was created in the 1990s by Yukihiro Matsumoto to enhance programmer productivity and have fun. Some key aspects include everything being an object, duck typing where objects are identified by their methods/attributes rather than type, and a focus on simplicity, readability, and productivity for programmers.
The document introduces Ruby and Rails. It discusses that Ruby is an object-oriented scripting language created by Matz to bring joy to programming. Rails is a web framework that makes building database-driven web applications easy through conventions like MVC, templates, and ORMs. The document then provides an overview of major Ruby features like objects, variables, arrays, hashes, symbols, blocks and iterators. It also demonstrates building a simple class in Ruby. Finally, it shows a quick demo of generating a TODO list application in Rails.
The document is an introduction to the Ruby programming language presented by Premshree Pillai. The presentation provides an overview of Ruby's history and basics, including its object-oriented nature, syntax, and comparisons to Perl and Python. It also provides resources for learning more about Ruby.
TypeProf for IDE: Enrich Development Experience without Annotationsmametter
The document discusses TypeProf for IDE, a VSCode extension powered by TypeProf, a static type analyzer for Ruby. It allows achieving aspects of modern development experience like on-the-fly error reporting and type inference without type annotations. The demo shows features like method signature hints, error reporting, and completion working through the language server protocol. Future work includes improving parser robustness and optimizing analysis performance.
This was my presentation from the MIX10 conference in Las Vegas introducing Ruby and IronRuby to .NET Developers. Covers intergration with CLR, BCL and Silverlight
RubyCocoa allows Ruby scripts to access and control Objective-C objects. It automatically creates Ruby proxy objects that are bridged to Objective-C classes, forwarding Ruby messages to instances of Objective-C classes. This allows mixing Ruby and Objective-C in the same source files. RubyCocoa is officially supported by Apple and supports key Cocoa features. To use it, one imports the RubyCocoa framework, subclasses NSObject in Ruby, and connects Ruby controllers to outlets and actions in Interface Builder. A demo showed controlling a Lego Mindstorms NXT robot via Bluetooth using the ruby-nxt gem.
IronPython combines the best of Python and .NET by allowing Python code to run on the .NET framework. Microsoft developed IronRuby and IronPython which implement Ruby and Python respectively on .NET. These dynamic languages are supported by the Dynamic Language Runtime (DLR) which provides a common environment for dynamic languages to run on .NET.
This document introduces Ruby as an open-source, multi-paradigm programming language created by Yukihiro Matsumoto. Ruby is interpreted, which means code is read and executed by an interpreter rather than being pre-compiled. The document provides instructions for installing Ruby on Windows, Mac OS X, and Linux. It recommends text editors for writing Ruby code and introduces the irb interactive shell for testing code. A simple "Hello, World" program is presented to demonstrate running Ruby code.
simulating a mobile robot platform and operating environment by ROS
- configure the platform on the simulator
- control the drone fly
- read measurements from different sensors mounted on the platform
- add items to the simulation environment
- apply a simple scenario: e.g. trajectory following or obstacle avoidance algorithm
The document describes a 3-day bootcamp for learning Ruby on Rails. Day 1 will cover fundamental Rails tools and components. Students will learn to set up their development environment, use version control with Git, and explore core Rails structures like models, views and controllers. Day 2 focuses on additional Rails techniques like scaffolding, internationalization and testing. Day 3 presents more advanced topics and full application examples to reinforce skills learned. The bootcamp aims to give students a working knowledge of Rails and resources for continuing their learning after the course.
IronRuby is a Ruby implementation that compiles Ruby code to .NET Intermediate Language. It allows Ruby code to run on the .NET Common Language Runtime and interoperate with .NET libraries. IronRuby was started by Microsoft but is now an open source project. It enables Ruby developers to build applications that integrate with existing .NET systems and libraries. However, IronRuby is still missing support for some Ruby standards like OpenSSL and has a lower test passing rate than MRI Ruby.
Presentation on IronRuby and the Dynamic Language Runtime (DLR) by Andre John Cruz at the Community Technology Update 2009 event in Singapore, 19 December 2009
This document provides an introduction and overview of Ruby and the Rails web framework. It outlines what Ruby and Rails are, why they are useful, and some of their major features. The document demonstrates Ruby concepts like objects, classes, and blocks through interactive examples. It also provides a brief demo of generating a TODO list application in Rails. Finally, it recommends resources for learning more about Ruby and Rails.
The document discusses bytecode manipulation in Java using ASM. It begins with an introduction to bytecode and ASM. It then covers classfile structure, reading and transforming bytecode with ASM visitors, and provides examples of renaming a class, adding a field, changing a method, fixing constructors, and adding an interface. The overall document serves as a tutorial for how to manipulate Java bytecode programmatically using the ASM framework.
How to develop the Standard Libraries of Ruby?Hiroshi SHIBATA
I maintain the RubyGems, Bundler and the standard libraries of the Ruby language. So, I've been extract many of the standard libraries to default gems and GitHub at Ruby 3.0. But the some of libraries still remains in only Ruby repository. I will describe these situation.
XRuby is a Ruby to Java compiler that compiles Ruby source code to Java bytecode. It allows Ruby code to run on the Java Virtual Machine for improved performance over interpretation. The XRuby compiler consists of a parser that converts Ruby code to an AST, and a code generator that produces Java bytecode. It provides dynamic language support structures to handle Ruby classes and methods in Java. XRuby is still in early development but allows most Ruby code to run faster on the JVM and provides tools for contributors to help advance the project.
A Static Type Analyzer of Untyped Ruby Code for Ruby 3mametter
- Matz's plan for Ruby 3 includes Ruby Signature (RBS), Type inference for non-annotated code (Type Profiler), and type checking for annotated code.
- RBS is the standard language for describing Ruby program types and will ship with Ruby 3. Type Profiler infers types for non-annotated Ruby code by running code in a "type-level".
- A demonstration of Type Profiler showed it generating prototypes of signatures for the ao.rb and optcarrot codebases in under a minute, though improvements are still needed to handle more language features.
The document provides an agenda and overview for a Ruby programming course. It covers reviewing homework, using Git branches, an introduction to the Ruby language, Ruby Gems, and IRB. It also discusses strings and variables in Ruby, creating objects, and an example of making a Mad Libs game. The homework is to complete a reading and Simon Says spec.
Enjoy Ruby Programming in IDE and TypeProfmametter
- TypeProf is a static type analyzer for Ruby that can infer types without annotations by analyzing code and tests.
- A new TypeProf extension for VSCode provides modern IDE features like on-the-fly type checking, method signature hints, and error reporting without needing type annotations.
- The extension demonstrates how TypeProf can enhance the development experience in Ruby by bringing features like autocompletion and error checking traditionally requiring type systems.
MacRuby is a Ruby implementation for Mac OS X that allows Ruby code to be compiled to native machine code. It uses the LLVM compiler infrastructure and integrates tightly with Cocoa and Objective-C. Some key features include using the same syntax as Ruby but with faster performance due to compilation, ability to build Mac desktop applications that can be submitted to the Mac App Store, and direct access to technologies like Grand Central Dispatch for concurrent programming. The future of MacRuby may involve continued integration of Ruby with technologies like LLVM and GCD.
Type Profiler: An Analysis to guess type signaturesmametter
This document discusses type profiling, which is a technique for extracting type information from Ruby code without requiring type annotations. It proposes three type profilers:
1. Static Analysis 1 (SA1) guesses type signatures for method parameters based on which methods are called on those parameters.
2. Static Analysis 2 (SA2) focuses on guessing types for built-in classes.
3. Dynamic Analysis (DA) enhances the existing RubyTypeInference tool by running test suites and monitoring method calls and returns to aggregate type information.
The document evaluates SA1 on a sample WEBrick codebase and finds some common failures in the guessed types. Overall, type profiling aims to extract type information automatically as an alternative
tDiary annual report 2009 - Sapporo Ruby Kaigi02Hiroshi SHIBATA
This document is the annual report for 2009 of tDiary, an open-source web diary application built using Ruby. It discusses updates made to tDiary in 2009, including releasing version 2.3.2 which added compatibility with Ruby 1.9, as well as plans for future versions including adopting testing frameworks like RSpec and Cucumber, migrating to use the Rack middleware interface, and adding support for XML-RPC and Atom/PubSubHubbub. It also promotes involvement with the tDiary project on GitHub and in the Japanese Ruby community.
This document appears to be a Beamer presentation that demonstrates various features of Beamer including growing slides, lists, columns, blocks, theorems, and tables. It uses overlays to reveal text and elements gradually on slides. The presentation also includes examples of locations of ice cream stores and how to get to them in a table.
This document provides solutions and explanations to queries from a previous LaTeX typesetting session. It addresses issues with landscape and lettersize document formatting, list customization using paralist, coloring text with color, removing page headers/footers, typesetting special characters, and inserting mathematical symbols, formulas, and structures like matrices, trigonometric functions, integrals, and piecewise functions. Examples and code snippets are given for each topic.
TypeProf for IDE: Enrich Development Experience without Annotationsmametter
The document discusses TypeProf for IDE, a VSCode extension powered by TypeProf, a static type analyzer for Ruby. It allows achieving aspects of modern development experience like on-the-fly error reporting and type inference without type annotations. The demo shows features like method signature hints, error reporting, and completion working through the language server protocol. Future work includes improving parser robustness and optimizing analysis performance.
This was my presentation from the MIX10 conference in Las Vegas introducing Ruby and IronRuby to .NET Developers. Covers intergration with CLR, BCL and Silverlight
RubyCocoa allows Ruby scripts to access and control Objective-C objects. It automatically creates Ruby proxy objects that are bridged to Objective-C classes, forwarding Ruby messages to instances of Objective-C classes. This allows mixing Ruby and Objective-C in the same source files. RubyCocoa is officially supported by Apple and supports key Cocoa features. To use it, one imports the RubyCocoa framework, subclasses NSObject in Ruby, and connects Ruby controllers to outlets and actions in Interface Builder. A demo showed controlling a Lego Mindstorms NXT robot via Bluetooth using the ruby-nxt gem.
IronPython combines the best of Python and .NET by allowing Python code to run on the .NET framework. Microsoft developed IronRuby and IronPython which implement Ruby and Python respectively on .NET. These dynamic languages are supported by the Dynamic Language Runtime (DLR) which provides a common environment for dynamic languages to run on .NET.
This document introduces Ruby as an open-source, multi-paradigm programming language created by Yukihiro Matsumoto. Ruby is interpreted, which means code is read and executed by an interpreter rather than being pre-compiled. The document provides instructions for installing Ruby on Windows, Mac OS X, and Linux. It recommends text editors for writing Ruby code and introduces the irb interactive shell for testing code. A simple "Hello, World" program is presented to demonstrate running Ruby code.
simulating a mobile robot platform and operating environment by ROS
- configure the platform on the simulator
- control the drone fly
- read measurements from different sensors mounted on the platform
- add items to the simulation environment
- apply a simple scenario: e.g. trajectory following or obstacle avoidance algorithm
The document describes a 3-day bootcamp for learning Ruby on Rails. Day 1 will cover fundamental Rails tools and components. Students will learn to set up their development environment, use version control with Git, and explore core Rails structures like models, views and controllers. Day 2 focuses on additional Rails techniques like scaffolding, internationalization and testing. Day 3 presents more advanced topics and full application examples to reinforce skills learned. The bootcamp aims to give students a working knowledge of Rails and resources for continuing their learning after the course.
IronRuby is a Ruby implementation that compiles Ruby code to .NET Intermediate Language. It allows Ruby code to run on the .NET Common Language Runtime and interoperate with .NET libraries. IronRuby was started by Microsoft but is now an open source project. It enables Ruby developers to build applications that integrate with existing .NET systems and libraries. However, IronRuby is still missing support for some Ruby standards like OpenSSL and has a lower test passing rate than MRI Ruby.
Presentation on IronRuby and the Dynamic Language Runtime (DLR) by Andre John Cruz at the Community Technology Update 2009 event in Singapore, 19 December 2009
This document provides an introduction and overview of Ruby and the Rails web framework. It outlines what Ruby and Rails are, why they are useful, and some of their major features. The document demonstrates Ruby concepts like objects, classes, and blocks through interactive examples. It also provides a brief demo of generating a TODO list application in Rails. Finally, it recommends resources for learning more about Ruby and Rails.
The document discusses bytecode manipulation in Java using ASM. It begins with an introduction to bytecode and ASM. It then covers classfile structure, reading and transforming bytecode with ASM visitors, and provides examples of renaming a class, adding a field, changing a method, fixing constructors, and adding an interface. The overall document serves as a tutorial for how to manipulate Java bytecode programmatically using the ASM framework.
How to develop the Standard Libraries of Ruby?Hiroshi SHIBATA
I maintain the RubyGems, Bundler and the standard libraries of the Ruby language. So, I've been extract many of the standard libraries to default gems and GitHub at Ruby 3.0. But the some of libraries still remains in only Ruby repository. I will describe these situation.
XRuby is a Ruby to Java compiler that compiles Ruby source code to Java bytecode. It allows Ruby code to run on the Java Virtual Machine for improved performance over interpretation. The XRuby compiler consists of a parser that converts Ruby code to an AST, and a code generator that produces Java bytecode. It provides dynamic language support structures to handle Ruby classes and methods in Java. XRuby is still in early development but allows most Ruby code to run faster on the JVM and provides tools for contributors to help advance the project.
A Static Type Analyzer of Untyped Ruby Code for Ruby 3mametter
- Matz's plan for Ruby 3 includes Ruby Signature (RBS), Type inference for non-annotated code (Type Profiler), and type checking for annotated code.
- RBS is the standard language for describing Ruby program types and will ship with Ruby 3. Type Profiler infers types for non-annotated Ruby code by running code in a "type-level".
- A demonstration of Type Profiler showed it generating prototypes of signatures for the ao.rb and optcarrot codebases in under a minute, though improvements are still needed to handle more language features.
The document provides an agenda and overview for a Ruby programming course. It covers reviewing homework, using Git branches, an introduction to the Ruby language, Ruby Gems, and IRB. It also discusses strings and variables in Ruby, creating objects, and an example of making a Mad Libs game. The homework is to complete a reading and Simon Says spec.
Enjoy Ruby Programming in IDE and TypeProfmametter
- TypeProf is a static type analyzer for Ruby that can infer types without annotations by analyzing code and tests.
- A new TypeProf extension for VSCode provides modern IDE features like on-the-fly type checking, method signature hints, and error reporting without needing type annotations.
- The extension demonstrates how TypeProf can enhance the development experience in Ruby by bringing features like autocompletion and error checking traditionally requiring type systems.
MacRuby is a Ruby implementation for Mac OS X that allows Ruby code to be compiled to native machine code. It uses the LLVM compiler infrastructure and integrates tightly with Cocoa and Objective-C. Some key features include using the same syntax as Ruby but with faster performance due to compilation, ability to build Mac desktop applications that can be submitted to the Mac App Store, and direct access to technologies like Grand Central Dispatch for concurrent programming. The future of MacRuby may involve continued integration of Ruby with technologies like LLVM and GCD.
Type Profiler: An Analysis to guess type signaturesmametter
This document discusses type profiling, which is a technique for extracting type information from Ruby code without requiring type annotations. It proposes three type profilers:
1. Static Analysis 1 (SA1) guesses type signatures for method parameters based on which methods are called on those parameters.
2. Static Analysis 2 (SA2) focuses on guessing types for built-in classes.
3. Dynamic Analysis (DA) enhances the existing RubyTypeInference tool by running test suites and monitoring method calls and returns to aggregate type information.
The document evaluates SA1 on a sample WEBrick codebase and finds some common failures in the guessed types. Overall, type profiling aims to extract type information automatically as an alternative
tDiary annual report 2009 - Sapporo Ruby Kaigi02Hiroshi SHIBATA
This document is the annual report for 2009 of tDiary, an open-source web diary application built using Ruby. It discusses updates made to tDiary in 2009, including releasing version 2.3.2 which added compatibility with Ruby 1.9, as well as plans for future versions including adopting testing frameworks like RSpec and Cucumber, migrating to use the Rack middleware interface, and adding support for XML-RPC and Atom/PubSubHubbub. It also promotes involvement with the tDiary project on GitHub and in the Japanese Ruby community.
This document appears to be a Beamer presentation that demonstrates various features of Beamer including growing slides, lists, columns, blocks, theorems, and tables. It uses overlays to reveal text and elements gradually on slides. The presentation also includes examples of locations of ice cream stores and how to get to them in a table.
This document provides solutions and explanations to queries from a previous LaTeX typesetting session. It addresses issues with landscape and lettersize document formatting, list customization using paralist, coloring text with color, removing page headers/footers, typesetting special characters, and inserting mathematical symbols, formulas, and structures like matrices, trigonometric functions, integrals, and piecewise functions. Examples and code snippets are given for each topic.
1) A PhD student must stay focused on their research goals and methodology to complete their degree in a timely manner. Many distractions like helping others excessively or non-academic activities can derail their progress.
2) It is important to build professional relationships with supervisors and peers based on mutual respect. Students should avoid bootlicking behaviors and assert themselves when needed.
3) Facilities and resources at research institutes should be used judiciously for academic purposes only. Personal matters and non-academic activities do not belong in labs or other professional settings.
The document discusses writing scientific reports and theses using LaTeX. It covers page layout features in LaTeX including page sizes and margins, line spacing, headers and footers, and page numbering. It also discusses formatting figures, tables, and equations in LaTeX. The document provides examples of code for formatting chapter and section headings, references, and the title page.
This document provides an introduction to concepts and applications of Global Navigation Satellite Systems (GNSS). It outlines topics to be covered, including basic concepts, collecting geospatial data, introducing GNSS, applications and software, resources, and acknowledgements. The introduction discusses the long history of human navigation from ancient to modern times. It will cover mathematical concepts required to understand GNSS such as Taylor series expansion, Jacobian, and least squares adjustment. Older surveying techniques for collecting geospatial data involved chains, tapes, sextants, theodolites and autolevels, while modern methods include GNSS.
The document discusses typesetting mathematics in LaTeX. It covers topics like inline and display math, numbered and multiline equations, fractions, roots, sums and integrals, matrices, and Greek letters. The document is from a LaTeX workshop introducing mathematical typesetting and aims to provide examples of how to represent various mathematical expressions in LaTeX.
This is a practical demostration of Watershed Analysis with GRASS. This follows a click-this and click-that approach, followed by questions and exercises.
This document provides an overview of the field of Geoinformatics and some of its key branches and applications. It discusses fundamental concepts like making maps, enabling navigation, and enabling decision making. It also summarizes key areas like remote sensing, cartography, surveying, photogrammetry, GPS, and GIS. Finally, it outlines some of the presenter's research interests in LiDAR data processing and visualization.
Level Slicing and Map Calculation studied here. Done using GRASS GIS software, an open source resource. This is the second part of the laboratory series on GRASS GIS.
Kedudukan siswa dalam kelompok dan mencari nilai akhirmuhamad khanif
Dokumen tersebut membahas tentang berbagai cara menentukan kedudukan siswa dalam kelas berdasarkan nilai akademiknya, meliputi pengurutan sederhana, persentase, standar deviasi, dan z-score. Metode penentuan nilai akhir siswa juga dibahas, seperti menggunakan rumus tertentu yang melibatkan nilai tes formatif dan sumatif.
The document provides an introduction to LaTeX typesetting through a series of examples and exercises. It discusses LaTeX basics like the document structure, preamble contents, and document classes. The first exercise has the reader create a basic LaTeX file that lists the first 10 prime numbers. The second exercise builds on this by adding document labels in the preamble and using \maketitle to display the title. Throughout, the document gives syntax examples and guides the reader in compiling and viewing their LaTeX files.
This document is a tutorial on using Beamer to create presentations in LaTeX. It covers topics like adding sections and subsections, using lists with pause, creating blocks, itemize lists, and dynamic highlighting. Examples are provided throughout to demonstrate how to implement these features in Beamer code. The last section shows how to divide a presentation frame into multiple columns.
This document discusses using the beamer package in LaTeX to create presentations. It begins with an introduction and outline. It then covers topics like calling the beamer class, setting themes, adding a logo, and inserting slide numbers. It demonstrates how to create a title frame and frame with table of contents. Later sections discuss creating multi-column slides, adding text blocks, including figures and tables with subcaptions, and techniques for basic animations. The document includes code examples for many of the presentation elements discussed.
This document provides an introduction to LaTeX and Beamer for presentations. It discusses what LaTeX is, why it should be used, available LaTeX editors, how LaTeX works and its syntax. It also covers LaTeX document classes, common commands, packages and their usage. Finally, it introduces Beamer, the LaTeX document class for creating presentations, and available Beamer themes.
Este documento é um relatório de Shiquan Wang do Instituto em 02 de julho de 2013 sobre testar a conversão de um arquivo Beamer PDF para um arquivo PowerPoint. O relatório contém uma estrutura de slides com um frame principal dividido em blocos, com itens enumerados dentro do primeiro bloco.
How to use LaTeX and Beamer to prepare presentation for SlideshareVesa Linja-aho
LaTeX and Beamer are great tools when preparing slides which contain mathematical formulas, circuit diagrams and that kind of stuff. However, to eliminate some nasty characteristics, few simple tricks are necessary.
This document provides a tutorial on using Beamer, a LaTeX class for creating presentations. It covers topics such as templates, frames, sections and subsections, text formatting, and more. The tutorial includes examples of basic frame code and explains how to use special frames like the title page and table of contents. Sections are declared between frames to organize the presentation structure and content. Common text commands and environments from LaTeX, like emphasis and verbatim, can be used within frames. Overall, the tutorial serves as an introduction to the key features and functionality of the Beamer class.
These slides are the first amongst the series of documents made by me as a part of a LaTeX workshop. Provided for free as a help for researchers and document makers.
The document discusses Ruby programming language features and tools. It covers the basics of Ruby including its object oriented nature, simple syntax, types, classes and inheritance. It also discusses why developers love Ruby, including its attribute methods, blocks, and use of gems. The document then covers tools like Bundler for managing gem dependencies and RVM for managing Ruby versions and isolating gem environments.
The document discusses why Ruby is a beloved programming language and development environment. It covers Ruby's object oriented features, syntax like blocks that make code cleaner, and the robust ecosystem of libraries known as gems. It also describes tools like Bundler that manage gem dependencies and RVM that allows isolating Ruby versions and gems for different projects.
Perl is a high-level, general purpose programming language that was introduced in 1987 and remains widely used today. It draws inspiration from languages like C, sed, awk, and grep. The document provides an introduction to Perl's history and basics, including variables, conditionals, loops, regular expressions, subroutines and objects. It highlights advantages like the comprehensive CPAN module library, strong Unicode support, testing culture, and job opportunities. The author works at Nestoria, where Perl powers their property search engine, handling tasks like XML parsing, geocoding, and image processing.
Ruby is an easy programming language to learn. It is often used as a stepping stone to learning Rails, a popular web framework. Ruby is currently the 13th most popular language according to the TIOBE index and is experiencing growing demand and a large ecosystem to support developers.
- The document discusses Ruby meta programming and provides information about the author such as their Twitter handle and blog. It then covers topics like what Ruby is, differences between Ruby and other languages, and new concepts in Ruby like symbols, variables, and object-oriented principles.
This document provides an overview of Elasticsearch including:
- Elasticsearch is a database server that is implemented using RESTful HTTP/JSON and is easily scalable. It is based on Lucene.
- Features include being schema-free, real-time, easy to extend with plugins, automatic peer discovery in clusters, failover and replication, and community support.
- Terminology includes index, type, document, and field which make up the data structure inside Elasticsearch. Searches can be performed across multiple indices.
- Elasticsearch works using full-text searching via inverted indexing and analysis. Analysis extracts terms from text through techniques like removing stopwords, lowercase conversion, and stemming.
- Elasticsearch can be accessed in a RESTful manner
Code for Startup MVP (Ruby on Rails) Session 1Henry S
This document provides an agenda and overview for a workshop on learning to code for startup MVPs using Ruby on Rails. The agenda covers reviewing a previous session, learning Ruby basics like syntax and semantics through practice, and introducing Rails models using ORM and SQL. It also provides instructions for setting up development environments on Windows, Mac, and Linux systems, installing Git for version control, and an overview of concepts covered in the previous session like the web architecture, Git/GitHub, Rails and Ruby, and deploying to Heroku.
On the path to become a jr. developer short versionAntonelo Schoepf
This document provides an introduction to learning Ruby as a programming language. It discusses Ruby's origins in Japan and how it aims to make programming feel natural. The document then covers some basic Ruby concepts like object-oriented programming, classes, objects, and inheritance. It provides examples of classes, objects, and methods. Useful links are also included for learning more about Ruby.
The document discusses Rust's efforts to define a formal grammar for its syntax by developing a lexer and parser. It notes that previously Rust had no defined grammar, and the existing lexer had problems. The author worked to define lexical and parser grammars, write tests for the lexer, and explore parser generator tools to build an LL(1) parser for Rust based on the new grammars. Future work includes finishing the LL(1) parser, improving documentation of the grammar, and integrating the generated parser into the Rust compiler.
This document introduces Ruby and Rails. It provides an overview of what Ruby and Rails are, why they are useful, and some of their major features. Key aspects covered include Ruby being an object-oriented scripting language, Rails making database-driven web app development easy, and demonstrations of building a TODO list app in Rails. The document recommends resources for learning more about Ruby and Rails.
Rubinius is an implementation of the Ruby programming language that aims to improve on MRI (the standard Ruby interpreter) by making Ruby faster and more memory efficient. It does this by compiling Ruby code to machine instructions for faster execution, using more lightweight objects that use less memory, and having a more advanced garbage collector. The presenters discuss Rubinius' goals of providing a drop-in replacement for MRI with better performance and memory usage in order to allow Ruby to be used for more and larger applications. They demonstrate how Rubinius can improve the scalability of Ruby applications.
Ruby on Rails - Pengenalan kepada “permata” dalam pengaturcaraan edthix
The document introduces Ruby on Rails as a web application framework built on Ruby programming language that aims to increase programmer enjoyment and productivity through principles like convention over configuration and Don't Repeat Yourself. It discusses the history and philosophies of both Ruby and Rails, provides examples of Ruby code and Rails features like scaffolding and RESTful design, and demonstrates building a simple departments and employees tracking system using Rails.
The document outlines why the author started using Ruby and provides an overview of the Ruby programming language and Ruby on Rails web application framework. It discusses how Ruby is a dynamic, object-oriented language designed to be elegant and efficient. Ruby on Rails makes it easy to build database-backed web applications according to the MVC pattern. The document also covers the Ruby ecosystem including interpreters, frameworks, libraries and tools, and discusses the future of Ruby and Rails.
This document summarizes a presentation about the future of the Rake gem and domain-specific languages (DSLs) in Ruby.
The presentation discusses:
1. How Rake works as a Make-like program implemented in Ruby syntax with tasks and dependencies. Rake files use standard Ruby syntax.
2. Examples of common patterns for building internal DSLs in Ruby using class/module methods, method definition, implicit/explicit code blocks, and instance evaluation.
3. How popular Ruby gems like Rake, Bundler, and Thor use DSL techniques and inherit from each other to provide domain-specific interfaces.
This document provides an overview of the Ruby programming language by outlining various chapters and sections that cover topics such as:
- What Ruby is and its origins
- Language features like being fully object-oriented and dynamically typed
- Supported operating systems and installation options
- Using tools like IRB, RDoc, and Ri
- Language fundamentals around scripts, functions, blocks, and naming conventions
- Built-in datatypes like numbers, strings, booleans, and collections
- Operators, branching statements, loops, and iterators
身為工程師,一定聽過編輯器之神 - Vim, 而很多人雖然使用過 Vim,卻因為學習門檻而沒有繼續深入,無法體會到它 的威力,實在有點可惜,因此講者這次嘗試用較易於理解的方式來說明 Vim 最核心的功能——編輯,當理解了 Vim 編輯的設計方式之後,使用者將可以輕易的做出數以千計的操作組合,來進行精確且直覺的游標移動與文字編輯,同時也會介紹 Vim 在開發 Ruby & Rails 上適合的配置。
內容不會涉及太多 Vim 獨有的功能,希望除了 Vim 使用者外,其他編輯器的使用者也能夠透過 Vim mode 來體驗 Vim 的強大之處。
Ruby is a dynamic, open source programming language created in 1993 by Yukihiro Matsumoto. It was influenced by Perl, Smalltalk, Python and Lisp. Ruby supports object-oriented, imperative, and functional programming styles. Everything in Ruby is an object and has flexible typing. Ruby also features open classes and duck typing. It gained popularity with the release of the Ruby on Rails framework in 2004.
This document provides an introduction to the Ruby programming language. It discusses that Ruby is a dynamic, object-oriented scripting language with features like duck typing, open classes, literal syntax for arrays and hashes, mixins, closures, and operator overloading. It also covers Ruby concepts like dynamic and static typing, using Ruby in scripting, Ruby's terse syntax, and how the interactive REPL environment works.
From Programming to Modeling And Back AgainMarkus Voelter
This document discusses programming languages and modeling. It notes that programming languages are not expressive, high-level, abstract, domain-specific, or modular enough. It proposes addressing this by using modeling with higher-level, domain-specific concepts and notations, and code generation from models. However, modeling and programming tools have traditionally been separate worlds. The document envisions a future where modeling and programming are integrated by mixing models and programs, and developing languages and tools that support programming at different levels of abstraction from different viewpoints. Enabling technologies could include advanced parser generators and projectional editing, while available tools mentioned include Eclipse Xtext and JetBrains' Meta Programming System for developing domain-specific languages.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Project Management Semester Long Project - Acuityjpupo2018
Acuity is an innovative learning app designed to transform the way you engage with knowledge. Powered by AI technology, Acuity takes complex topics and distills them into concise, interactive summaries that are easy to read & understand. Whether you're exploring the depths of quantum mechanics or seeking insight into historical events, Acuity provides the key information you need without the burden of lengthy texts.
1. The Language Tools
Ruby: Why We Love It
https://github.com/Kelsin/ruby-presentation
Christopher Giroir
November 8th, 2011
Christopher Giroir Ruby: Why We Love It
2. The Language Tools
1 The Language
Basics
Why We Love It
Gems
2 Tools
Bundler
RVM
Christopher Giroir Ruby: Why We Love It
3. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
4. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
5. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
6. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
7. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
8. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
9. The Language Tools
Basics
Overview
Inspired by Smalltalk (which I love)
Also draws from Perl, Eiffel, Ada and LISP
Includes a REPL
Built for developers as a language they would love to use
Dynamic, strict, reflective, object oriented
Everything is an expression (even statements)
Everything is executed imperatively (even declarations)
Christopher Giroir Ruby: Why We Love It
10. The Language Tools
Basics
Object Oriented
Everything is an object
Single Inheritance
Modules can be mixed in
Dynamic Dispatch
Christopher Giroir Ruby: Why We Love It
11. The Language Tools
Basics
Object Oriented
Everything is an object
Single Inheritance
Modules can be mixed in
Dynamic Dispatch
Christopher Giroir Ruby: Why We Love It
12. The Language Tools
Basics
Object Oriented
Everything is an object
Single Inheritance
Modules can be mixed in
Dynamic Dispatch
Christopher Giroir Ruby: Why We Love It
13. The Language Tools
Basics
Object Oriented
Everything is an object
Single Inheritance
Modules can be mixed in
Dynamic Dispatch
Christopher Giroir Ruby: Why We Love It
14. The Language Tools
Basics
Simple Code
1 5.times { print "Hello" }
This outputs:
1 Hello
2 Hello
3 Hello
4 Hello
5 Hello
6 => 5
Christopher Giroir Ruby: Why We Love It
15. The Language Tools
Basics
Simple Code
1 5.times { print "Hello" }
This outputs:
1 Hello
2 Hello
3 Hello
4 Hello
5 Hello
6 => 5
Christopher Giroir Ruby: Why We Love It
16. The Language Tools
Basics
Types
1 # Strings
2 s = ’Testing’
3
4 # Interpreted Strings
5 t = "Double #{str}"
6
7 # Symbols
8 sym = :chris
9
10 # Arrays
11 a = [1,2,3]
12
13 # Hashes
14 h = { :key => ’value’, :chris => ’awesome’ }
Christopher Giroir Ruby: Why We Love It
17. The Language Tools
Basics
Classes
1 class Box
2 def initialize(w,h,d)
3 @width = w
4 @height = h
5 @depth = d
6 end
7
8 def volume
9 @width * @height * @depth
10 end
11 end
12
13 box = Box.new(2,2,2)
14 box.volume # => 8
Christopher Giroir Ruby: Why We Love It
18. The Language Tools
Basics
Simple Inheritance
1 class JackInTheBox < Box
2 def initialize(msg)
3 @msg = msg
4 super(3,3,3)
5 end
6
7 def open
8 puts @msg
9 end
10 end
11
12 jbox = JackInTheBox.new(’Surprise!’)
13 jbox.volume # => 27
14 jbox.open # prints ’Surprise!’
Christopher Giroir Ruby: Why We Love It
19. The Language Tools
Basics
Control
1 while true == false
2 if var == 5
3 break
4 end
5
6 begin
7 var - 1
8 end while var < 4
9
10 next if var == 6
11 end
Christopher Giroir Ruby: Why We Love It
20. The Language Tools
Basics
Blocks
1 [1,2,3].each { |n| puts n }
This outputs:
1 1
2 2
3 3
4 => [1,2,3]
Christopher Giroir Ruby: Why We Love It
21. The Language Tools
Basics
Blocks
1 [1,2,3].each { |n| puts n }
This outputs:
1 1
2 2
3 3
4 => [1,2,3]
Christopher Giroir Ruby: Why We Love It
22. The Language Tools
Basics
Block Syntax
1 5.upto(10) { |n| puts n }
This is exactly the same as the following:
1 5.upto(10) do |n|
2 puts n
3 end
Christopher Giroir Ruby: Why We Love It
23. The Language Tools
Why We Love It
Attribute Methods
1 class Person
2 def name
3 @name
4 end
5 def social=(s)
6 @social = s
7 end
8 def age
9 @age
10 end
11 def age=(a)
12 @age = a
13 end
14 end
Christopher Giroir Ruby: Why We Love It
24. The Language Tools
Why We Love It
The Easy Way
1 class Person
2 attr_reader :name
3 attr_writer :social
4 attr_accessor :age
5 end
Christopher Giroir Ruby: Why We Love It
25. The Language Tools
Why We Love It
The Easy Way Explained
1 class Person
2 attr_reader :name
3 attr_writer :social
4 attr_accessor :age
5 end
Ruby syntax allows method calls without ()
Result is clean and looks like a language feature
Christopher Giroir Ruby: Why We Love It
26. The Language Tools
Why We Love It
The Easy Way Explained
1 class Person
2 attr_reader :name
3 attr_writer :social
4 attr_accessor :age
5 end
Ruby syntax allows method calls without ()
Result is clean and looks like a language feature
Christopher Giroir Ruby: Why We Love It
27. The Language Tools
Why We Love It
We can implement this ourselves
Untested code, please do not copy:
1 class Object
2 def self.attr_reader(var)
3 class_eval <<-METHODS
4 def #{var}
5 @#{var}
6 end
7 METHODS
8 end
9 end
Christopher Giroir Ruby: Why We Love It
28. The Language Tools
Why We Love It
We can implement this ourselves
Untested code, please do not copy:
1 class Object
2 def self.attr_reader(var)
3 class_eval <<-METHODS
4 def #{var}
5 @#{var}
6 end
7 METHODS
8 end
9 end
Christopher Giroir Ruby: Why We Love It
29. The Language Tools
Why We Love It
Why Blocks
1 (map (lambda (n)
2 (+ n 5))
3 ’(1 2 3))
Becomes:
1 [1,2,3].map do |n|
2 n + 5
3 end
Results in:
1 => [6,7,8]
Christopher Giroir Ruby: Why We Love It
30. The Language Tools
Gems
Modules
1 module Voice
2 def say(msg)
3 puts msg
4 end
5 end
6
7 class Person
8 include Voice
9 end
10
11 p = Person.new
12 p.say(’Hello’) # prints ’Hello’
Christopher Giroir Ruby: Why We Love It
31. The Language Tools
Gems
Using Gems
Require loads in files
1 require ’saver’ # pulls in ’saver.rb’
Gems allow us to not deal with paths
1 require ’rubygems’
2 require ’saver’
3
4 class Item
5 include Saver
6 end
Christopher Giroir Ruby: Why We Love It
32. The Language Tools
Gems
Writing Gems
1 Gem::Specification.new do |s|
2 s.name = "saver"
3 s.version = Saver::VERSION
4 s.authors = ["Christopher Giroir"]
5 s.email = ["kelsin@valefor.com"]
6 s.homepage = "http://kelsin.github.com/saver/"
7
8 s.files = ‘git ls-files‘.split("n")
9 s.require_paths = ["lib"]
10
11 s.add_dependency ’activesupport’, ’~> 3.0.0’
12 s.add_dependency ’mongo_mapper’
13 end
Christopher Giroir Ruby: Why We Love It
33. The Language Tools
Bundler
Why Bundler?
Many projects (i.e. rails apps) are not gems themselves
They do have gem dependencies
Easy way to install and keep track of these dependencies
Making sure ONLY the proper gems are used
Christopher Giroir Ruby: Why We Love It
34. The Language Tools
Bundler
Why Bundler?
Many projects (i.e. rails apps) are not gems themselves
They do have gem dependencies
Easy way to install and keep track of these dependencies
Making sure ONLY the proper gems are used
Christopher Giroir Ruby: Why We Love It
35. The Language Tools
Bundler
Why Bundler?
Many projects (i.e. rails apps) are not gems themselves
They do have gem dependencies
Easy way to install and keep track of these dependencies
Making sure ONLY the proper gems are used
Christopher Giroir Ruby: Why We Love It
36. The Language Tools
Bundler
The Gemfile
1 source ’http://tools1.savewave.com/rubygems’
2 source ’http://rubygems.org’
3
4 gem ’rails’, ’3.0.7’
5
6 gem ’sw-model’, ’0.13.0’
7
8 group :development, :test do
9 gem "rspec"
10 end
Christopher Giroir Ruby: Why We Love It
37. The Language Tools
Bundler
Using Bundler
1 # Install the gems from the Gemfile
2 bundle install
3
4 # Update gems to new versions
5 bundle update
6
7 # Execute command with proper gems
8 bundle exec rake spec
In your ruby code
1 require "rubygems"
2 require "bundler/setup"
3 require "saver"
Christopher Giroir Ruby: Why We Love It
38. The Language Tools
Bundler
Gemfile.lock
When you initially install versions are saved to Gemfile.lock
After they are only updated on bundle update
SHOULD be checked into version control
Protects from version updates
Christopher Giroir Ruby: Why We Love It
39. The Language Tools
Bundler
Gemfile.lock
When you initially install versions are saved to Gemfile.lock
After they are only updated on bundle update
SHOULD be checked into version control
Protects from version updates
Christopher Giroir Ruby: Why We Love It
40. The Language Tools
Bundler
Gemfile.lock
When you initially install versions are saved to Gemfile.lock
After they are only updated on bundle update
SHOULD be checked into version control
Protects from version updates
Christopher Giroir Ruby: Why We Love It
41. The Language Tools
RVM
Why RVM?
Different projects might use different versions of rails
Different projects might use different ruby interpreters
Ruby
JRuby
Rubinus
While bundler helps, complete gem isolation is better!
It’s nice to keep your system ruby separate and not update it
Christopher Giroir Ruby: Why We Love It
42. The Language Tools
RVM
Why RVM?
Different projects might use different versions of rails
Different projects might use different ruby interpreters
Ruby
JRuby
Rubinus
While bundler helps, complete gem isolation is better!
It’s nice to keep your system ruby separate and not update it
Christopher Giroir Ruby: Why We Love It
43. The Language Tools
RVM
Why RVM?
Different projects might use different versions of rails
Different projects might use different ruby interpreters
Ruby
JRuby
Rubinus
While bundler helps, complete gem isolation is better!
It’s nice to keep your system ruby separate and not update it
Christopher Giroir Ruby: Why We Love It
44. The Language Tools
RVM
Why RVM?
Different projects might use different versions of rails
Different projects might use different ruby interpreters
Ruby
JRuby
Rubinus
While bundler helps, complete gem isolation is better!
It’s nice to keep your system ruby separate and not update it
Christopher Giroir Ruby: Why We Love It
45. The Language Tools
RVM
Using RVM
1 # Install the default 1.9.2 ruby interpretor
2 rvm install 1.9.2
3
4 # Switch to using 1.9.2
5 rvm use 1.9.2
6
7 # List installed rubies
8 rvm list
Christopher Giroir Ruby: Why We Love It
46. The Language Tools
RVM
RVM Gemsets
1 # Create a new gemset
2 rvm gemset create savingstar-web
3
4 # List gemsets
5 rvm gemset list
6
7 # Switch to a ruby and gemset together
8 rvm use 1.9.2@savingstar-web
Christopher Giroir Ruby: Why We Love It
47. The Language Tools
RVM
.rvmrc
A .rvmrc file per project allows you to say which ruby and
gemset to use
Should be in source control. Helps RVM users out, ignored for
others
It’s a shell script that’s executed everytime you cd (very
unsafe)
Makes life very easy however!
1 rvm use 1.9.2@saveingstar-web --create
Christopher Giroir Ruby: Why We Love It
48. The Language Tools
RVM
.rvmrc
A .rvmrc file per project allows you to say which ruby and
gemset to use
Should be in source control. Helps RVM users out, ignored for
others
It’s a shell script that’s executed everytime you cd (very
unsafe)
Makes life very easy however!
1 rvm use 1.9.2@saveingstar-web --create
Christopher Giroir Ruby: Why We Love It
49. The Language Tools
RVM
.rvmrc
A .rvmrc file per project allows you to say which ruby and
gemset to use
Should be in source control. Helps RVM users out, ignored for
others
It’s a shell script that’s executed everytime you cd (very
unsafe)
Makes life very easy however!
1 rvm use 1.9.2@saveingstar-web --create
Christopher Giroir Ruby: Why We Love It
50. The Language Tools
RVM
.rvmrc
A .rvmrc file per project allows you to say which ruby and
gemset to use
Should be in source control. Helps RVM users out, ignored for
others
It’s a shell script that’s executed everytime you cd (very
unsafe)
Makes life very easy however!
1 rvm use 1.9.2@saveingstar-web --create
Christopher Giroir Ruby: Why We Love It
51. The Language Tools
RVM
.rvmrc
A .rvmrc file per project allows you to say which ruby and
gemset to use
Should be in source control. Helps RVM users out, ignored for
others
It’s a shell script that’s executed everytime you cd (very
unsafe)
Makes life very easy however!
1 rvm use 1.9.2@saveingstar-web --create
Christopher Giroir Ruby: Why We Love It