Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
49 Cards in this Set
- Front
- Back
Ruby |
dynamically-typed(duck typing), object-oriented, interpreted, scripting language. |
|
Duck Typing |
the type of an object is determined at run-time. Advantage: Simplifies code. Disadvantage: Loss of compile-time error checking. |
|
Method Calls (Ruby) |
When a message is sent to an object
|
|
Objects and Classes(Ruby) |
Everything in Ruby is an object.
|
|
Adding Methods to Objects(Ruby) |
In Ruby methods may be added to objects. These methods are called “singleton methods” |
|
The singleton class |
When a singleton method is defined, Ruby creates an anonymous class object and sets this as the classes new Class object and sets the original Class object as the superclass.
|
|
Modules |
Modules are also objects.
|
|
Including a Module(Ruby) |
When the statement:
|
|
Resolving Conflicts in Modules |
The chain of superclasses is a single-linked-list that acts as a Last-In-First-Out queue.
|
|
Blocks |
A block is a sequence of Ruby statements and expressions, optionally preceded with an argument list.
|
|
Procs |
A block is not an object.
|
|
The & operator |
If the last parameter of a method begins with a & character
|
|
lambdas |
A lambda is a Proc that is created using the lambda method or the -> operator.
|
|
Groovy |
Groovy is a optionally dynamically-typed, object-oriented, compiled, scripting language. |
|
Scripting language |
There is an implicit main method There are built-in methods to access the operating system |
|
Meta-Object Protocol (MOP) |
A Meta-Object Protocol (MOP) are the capabilities in a dynamic language (such as Groovy) that enable metaprogramming. |
|
The Groovy MOP consists of: |
reflection
|
|
MetaClass |
The MetaClass maintains the metadata about a Groovy class
|
|
Mixins |
A mixin is a class that is mixed in (merged) with another class.
|
|
Scala |
statically-typed, object-oriented, compiled, scripting language. |
|
Statically-typed |
Type of an object is determined at compile time
|
|
Traits |
Traits are classes that are meant to be added as a mixin to some other class.
|
|
Singleton Objects |
A singleton object with the same name as a class is known as a companion module.
|
|
Option Type |
The Option type is used to express values that might not be present.
|
|
Actors |
An actor is an object that processes incoming messages and executes actions associated with it.
|
|
The Actor trait |
The Actor trait has one abstract method:
|
|
Software Transactional Memory |
Turns the Java heap into a transactional dataset similar to database transactions.
|
|
State |
In imperative programming data is directly accessed and mutated.
|
|
PROLOG |
Prolog (PROgramming in LOGic*) is a declarative language.
|
|
Prolog Syntax |
facts Statements that are true
|
|
Clojure |
a compiled dynamic functional programming language based on LISP.
|
|
Data Types (Clojure) |
Numbers
|
|
Data Structures (Clojure) |
Lists, Maps, Vectors, Sets |
|
Higher-Order Functions |
A higher-order function is a function that takes a function as one of its arguments and/or returns a function as its result.
|
|
Macros |
When a function is called each of its arguments are evaluated.
|
|
Lazy Sequences |
The lazy-seq macro generates lazy sequences. (lazy-seq & body) The body is evaluated only when the seq function is called. |
|
Context Free Grammar |
A context free grammar consists of non-terminals and terminals
|
|
Type 3 — Regular |
The left-hand side of a production rule is a single non-terminal
|
|
Type 2 — Context Free |
The left-hand side of a production rule is a single non-terminal
|
|
Type 1 — Context Sensitive |
The left-hand side of a production rule consists of a sequence of terminals and non-terminals that contains at least one non-terminal.
|
|
Type 0 — Phrase Structured |
There is no restriction on either the left-hand side or the right-hand side of a production rule. |
|
Parsing |
Parsing is the process of determining how a sentence was generated by the grammar.
|
|
Abstract Syntax Tree |
An Abstract Syntax Tree is a tree that shows the structure of the sentence.
|
|
Lexer |
The Lexer parses the input into tokens.
|
|
Recursive Decent Parsing |
Given a context-free grammar one can construct a parser as follows:
|
|
Bottom-Up Parsing |
Bottom-up parsing constructs the parse tree starting at the leaves and working to the root.
|
|
LR Parsing Algorithm |
The LR parsing algorithm is state/input driven.
|
|
What is a Domain Specific Language |
A computer programming language of limited expressiveness focused on a particular domain.*
|
|
Types of DSLs |
Internal:
|