The document discusses C++ language features and implementation details. It begins with an overview of object memory layouts for simple classes, single inheritance, and virtual functions. It then covers function calling conventions and how compilers convert function calls, including virtual function calls. Finally, it discusses passing and returning objects from functions and the use of temporary objects. The document provides insights into how various C++ language features are implemented under the hood.
This talk aims to be a gentle introduction to Refinement types in Scala. The talk will also introduce many related topics in the subculture of Typelevel programming in FP like Type theory, Generics (Shapeless), Optics (Monocle) and Law-based testing.
Why refinement types?
When 'String' just doesn't cut it anymore. By encoding validation into a type at the edge-of-the-system layer of your application, you can build your core domain logic without having to worry much about type-safety.
Who is it for?
Ajay would be revisiting the necessary foundations at the beginning of the talk, so beginners are welcome. People who have worked on Scala before would be able to appreciate the power of refined types more.
This document provides an overview and preview of JavaScript concepts that will be covered in 3 parts, including language basics, functions, and inheritance and modules. The first part covers JavaScript types, syntax, objects, arrays, and inheritance. The second part focuses on functions, including defining functions, parameters, scope, closures, and object-oriented patterns. The third part discusses method chaining, augmenting built-in objects, and different inheritance patterns in JavaScript.
Sentence-to-Code Traceability Recovery with Domain OntologiesShinpei Hayashi
The document describes a technique for recovering traceability between natural language sentences and source code using domain ontologies. An automated tool was implemented and evaluated on a case study using the JDraw software. Results showed the technique worked well, recovering traceability between 7 sentences and code with higher accuracy than without using the ontology. The ontology helped improve recall and detect traceability in cases where word similarity alone did not work well. Future work is needed to evaluate on larger cases and domains.
This set of slides introduces the reader to the concept of regular types, i.e., user-defined types whose semantics closely resembles that of built-in types. The notion of regular types proved crucial for the development of the C++ Standard Template Library, and it is currently employed in next-gen C++ libraries such as Eric Niebler's range-v3. The presentation serves as a gentle introduction to the topic, and discusses which requirements must be satisfied for a type to be regular. In particular, the concept of equality-preserving copy and assignment is presented, as well as how to define ordering relations that satisfy the requirements of strictness, transitivity and comparability (i.e., that adhere to the trichotomy law).
Talk @ RubyConfIndia 2012. Ruby is a pure object oriented and really a beautiful language to learn and practice.
But most of us do not bother to know or care about what happens behind the scene when we write some ruby code. Say creating a simple Array, Hash, class, module or any object. How does this map internally to C code ?
Ruby interpreter is implemented in C and I will talk about the Interpreter API that we as ruby developers
should be aware of. The main purpose of the presentation is to understand the efforts and complexity behind
the simplicity offered. I would also like to touch upon the difference in implementation of some core data structures
in different ruby versions. Having known a part of C language implementation behind Ruby, I would also like to throw some light upon when and why would we need to write some ruby extensions in C.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, and objects. It discusses JavaScript's misunderstood nature due to its name, design errors in early implementations, and use in browsers. Some key points made include: JavaScript is a functional language; it uses prototypal inheritance instead of classes; all values are objects except for primitive values; and functions are first-class objects that can be assigned and passed around.
Kotlin: A pragmatic language by JetBrainsJigar Gosar
A pragmatic language for JVM and Android.
Combines OO and functional features.
Focused on interoperability, safety, clarity, tooling support.
Open Source.
Works everywhere where Java works.
Key focus on interoperability and seamless support for mixed Java+Kotlin projects.
This talk aims to be a gentle introduction to Refinement types in Scala. The talk will also introduce many related topics in the subculture of Typelevel programming in FP like Type theory, Generics (Shapeless), Optics (Monocle) and Law-based testing.
Why refinement types?
When 'String' just doesn't cut it anymore. By encoding validation into a type at the edge-of-the-system layer of your application, you can build your core domain logic without having to worry much about type-safety.
Who is it for?
Ajay would be revisiting the necessary foundations at the beginning of the talk, so beginners are welcome. People who have worked on Scala before would be able to appreciate the power of refined types more.
This document provides an overview and preview of JavaScript concepts that will be covered in 3 parts, including language basics, functions, and inheritance and modules. The first part covers JavaScript types, syntax, objects, arrays, and inheritance. The second part focuses on functions, including defining functions, parameters, scope, closures, and object-oriented patterns. The third part discusses method chaining, augmenting built-in objects, and different inheritance patterns in JavaScript.
Sentence-to-Code Traceability Recovery with Domain OntologiesShinpei Hayashi
The document describes a technique for recovering traceability between natural language sentences and source code using domain ontologies. An automated tool was implemented and evaluated on a case study using the JDraw software. Results showed the technique worked well, recovering traceability between 7 sentences and code with higher accuracy than without using the ontology. The ontology helped improve recall and detect traceability in cases where word similarity alone did not work well. Future work is needed to evaluate on larger cases and domains.
This set of slides introduces the reader to the concept of regular types, i.e., user-defined types whose semantics closely resembles that of built-in types. The notion of regular types proved crucial for the development of the C++ Standard Template Library, and it is currently employed in next-gen C++ libraries such as Eric Niebler's range-v3. The presentation serves as a gentle introduction to the topic, and discusses which requirements must be satisfied for a type to be regular. In particular, the concept of equality-preserving copy and assignment is presented, as well as how to define ordering relations that satisfy the requirements of strictness, transitivity and comparability (i.e., that adhere to the trichotomy law).
Talk @ RubyConfIndia 2012. Ruby is a pure object oriented and really a beautiful language to learn and practice.
But most of us do not bother to know or care about what happens behind the scene when we write some ruby code. Say creating a simple Array, Hash, class, module or any object. How does this map internally to C code ?
Ruby interpreter is implemented in C and I will talk about the Interpreter API that we as ruby developers
should be aware of. The main purpose of the presentation is to understand the efforts and complexity behind
the simplicity offered. I would also like to touch upon the difference in implementation of some core data structures
in different ruby versions. Having known a part of C language implementation behind Ruby, I would also like to throw some light upon when and why would we need to write some ruby extensions in C.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, and objects. It discusses JavaScript's misunderstood nature due to its name, design errors in early implementations, and use in browsers. Some key points made include: JavaScript is a functional language; it uses prototypal inheritance instead of classes; all values are objects except for primitive values; and functions are first-class objects that can be assigned and passed around.
Kotlin: A pragmatic language by JetBrainsJigar Gosar
A pragmatic language for JVM and Android.
Combines OO and functional features.
Focused on interoperability, safety, clarity, tooling support.
Open Source.
Works everywhere where Java works.
Key focus on interoperability and seamless support for mixed Java+Kotlin projects.
Lifting The Veil - Reading Java Bytecode During LunchtimeAlexander Shopov
This document discusses reading Java bytecode during lunchtime. It provides an overview of key concepts related to the Java Virtual Machine (JVM) like threads, frames, stacks, local variables, constant pools, and bytecode instructions. It then dives into examining specific bytecode instructions like load, store, math, object, and return operations. The document encourages learning to read bytecode as it allows understanding how Java functions at a lower level and can help with tasks like job interviews, debugging compiler issues, and tracking Java language vs platform evolution.
This document discusses reading Java bytecode and provides examples of how to interpret bytecode instructions and method signatures. It introduces key concepts of the Java Virtual Machine (JVM) like frames, stacks, local variables, and bytecode instructions. It also demonstrates how to decompile classes and interpret example bytecode snippets using the javap tool. The document is intended to help readers understand how Java code is executed at the bytecode level.
This document provides an overview of Groovy, a dynamic language for the Java Virtual Machine. It discusses Groovy's features like properties, closures, and integration with Java. The document outlines what's new in Groovy 1.5, including Java 5 features like annotations and generics. It also covers how to integrate Groovy in applications using mechanisms like the GroovyShell and GroovyClassLoader. The presentation aims to help attendees learn about Groovy and how they can use it in their projects.
The document summarizes the evolution and future directions of the C# programming language. It discusses new features in recent versions such as generics in C# 2.0, language integrated query in C# 3.0, and dynamic programming in C# 4.0. It also covers trends toward declarative programming, concurrency, and compiler as a service. The presentation provides examples and demos of new C# 4.0 features like dynamic typing, optional and named parameters, and covariance and contravariance.
The document discusses techniques that JavaScript engines use to optimize performance, including:
- Just-in-time compilation to generate optimized native machine code from JavaScript bytecode. This includes tracing optimizations and register allocation.
- Inline caching to speed up property lookups by caching the results of previous lookups.
- Type inference to determine types statically to avoid slow dynamic checks.
- Built-in optimizations in engines like V8 such as hidden classes, precise garbage collection, and Crankshaft, its optimizing compiler.
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.
Detecting Occurrences of Refactoring with Heuristic SearchShinpei Hayashi
This document describes a technique for detecting refactorings between two versions of a program using heuristic search. Refactorings are detected by generating intermediate program states through applying refactorings, and finding a path from the original to modified program that minimizes differences. Structural differences are used to identify likely refactorings. Candidate refactorings are evaluated and applied to generate new states, with the search terminating when the state matches the modified program. A supporting tool was developed and a case study found the technique could correctly detect an actual series of refactorings between program versions.
This document discusses how to write Ruby extensions using the Crystal programming language. Crystal compiles to efficient native code and has static typing like C, but with a Ruby-like syntax. The document explains how to define Crystal classes and methods, bind them to Ruby using C bindings, and compile the extension so it can be required from Ruby. Key points covered include declaring modules and functions in a C library, converting between Ruby and Crystal types, defining Ruby classes and methods from Crystal, and initializing the extension so it integrates with Ruby. The goal is to leverage Crystal's performance while still writing code in a Ruby-like way using the same interfaces as a C extension.
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...Coen De Roover
Presentation at the Postdoctoral symposium of the 2011 International Conference on Software Maintenance, accompanying the paper
http://soft.vub.ac.be/Publications/2011/vub-soft-tr-11-11.pdf
The document summarizes key features of the Pizza programming language and compiler, which extended Java with functional programming capabilities. The Pizza language added parametric polymorphism (generics), first-class functions, and algebraic datatypes to Java. The Pizza compiler translated Pizza code into Java bytecode. It supported features like pattern matching on algebraic datatypes through translation into Java classes with tag fields. The document provides examples and explanations of how each Pizza feature was implemented.
Actor model which is currently trending in software development is a popular design approach when it comes to complex applications. Many systems written in Erlang (Akka framework) are designed with actor model in their core. But Erlang and Akka are managed environments and safe programming languages. Is it worth using actor model in C++? If yes, where to look and what to use? The talk will cover all these topics.
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
This document discusses an automated recommender system for refining Ekeko/X transformations. It begins by introducing logic meta-programming and how it allows querying a "database" of program information using logic relations. Templates with meta-variables and directives are used to specify transformations, and formal operators define ways to mutate templates. A genetic search evaluates templates based on precision, recall, partial matches, and directive usage to recommend refinements for better specifying transformations.
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Shinpei Hayashi
This document presents an approach for generating assertion code from the Object Constraint Language (OCL) using model transformations. The approach constructs a hierarchy of programming languages based on their structural similarities. This allows rules for translating OCL to be reused across multiple implementation languages, saving approximately 50% of the effort compared to creating individual translators. An evaluation implemented the approach in Maude and demonstrated its ability to generate code for Java, Python, Haskell and O'Haskell from a single OCL specification.
[OLD VERSION, SEE DESCRIPTION FOR NEWER VERSION LINK] Hot C++: Rvalue Referen...Andrey Upadyshev
Newer version: https://www.slideshare.net/oliora/hot-c-rvalue-references-and-move-semantics-155638600
Detailed presentation of rvalue references and move semantics introduced in C++11.
Extended version of "Hot C++11, Part 1: Rvalue References And Move Semantics".
The document discusses learning Ruby by reading its source code. It provides an overview of Ruby's basic object structure, with every object having an RBasic struct containing flags and a klass pointer. It describes the various structs used to represent different Ruby object types like integers, floats, strings, arrays, and classes. It details how Ruby uses singleton classes to implement class and instance methods. The document also explores Ruby's approach to class inheritance and module inclusion by examining how method lookup and class hierarchies are represented internally. It encourages spelunking the C source code to better understand how Ruby works under the hood.
The document discusses the history and development of the Haskell programming language over 15 years. It summarizes key events like the initial meeting that kicked off Haskell in 1987, the release of the first Haskell report in 1990, and the standardization of Haskell 98. It also reflects on important aspects of Haskell like laziness, monads, and the process of language design by committee and community.
Latest C++ Interview Questions and AnswersDaisyWatson5
Q: Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible?
A: There is nothing like Virtual Constructor. The Constructor can‟t be virtual as the constructor is a code which is responsible for creating an instance of a class and it can‟t be delegated to any other object by virtual keyword means.
Q: What is constructor or ctor?
A: Constructor creates an object and initializes it. It also creates vtable for virtual functions. It is different from other methods in a class.
Q: What about Virtual Destructor?
A: Yes there is a Virtual Destructor. A destructor can be virtual as it is possible as at runtime depending on the type of object caller is calling to, proper destructor will be called.
Q: What is the difference between a copy constructor and an overloaded assignment operator?
A: A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.
Q: Can a constructor throws an exception? How to handle the error when the constructor fails? A:The constructor never throws an error.
Q: What is default constructor?
A: Constructor with no arguments or all the arguments has default values.
Mirah is a small, fast JVM language that uses Ruby syntax but compiles to Java bytecode. It was created by Charles Oliver Nutter, the creator of JRuby, who wanted to write Java code using a language as expressive as Ruby. Mirah has Ruby's syntactic sugar but is statically typed and compiled like Java, without runtime modification. It uses type inference and macros to provide Ruby-like conveniences while compiling to a small footprint without needing a runtime library, making it suitable for mobile applications. Developers can get started with Mirah by installing it with RVM and writing code that looks like Ruby but compiles to Java classes.
This document provides an introduction to meta-programming in C++. It discusses how templates allow programs to generate other programs at compile-time, providing higher levels of abstraction, design, and efficiency. It covers key concepts like generic programming, functional programming idioms, template template parameters, and how control structures can be expressed with templates. Examples demonstrate how meta-programming can be used for tasks like loop unrolling, conversion checking, and computing dot products via recursion. Important C++ meta-programming libraries like Loki and Boost are also summarized.
Inheritance and type casting allows creating new classes from existing classes. Virtual functions allow dynamic binding at runtime rather than compile time. Dynamic casting uses the dynamic_cast operator to cast polymorphic objects between base and derived classes. Runtime type information provides information about an object's type at runtime to enable dynamic binding and casting.
The document discusses inheritance, virtual functions, and dynamic casting in C++. It explains that inheritance allows a new class to inherit attributes from a base class. Virtual functions allow dynamic binding at runtime rather than compile time. Dynamic casting uses the dynamic_cast operator to cast polymorphic objects, ensuring the cast is valid based on inheritance. Downcasting and cross casting between unrelated base classes is also possible using dynamic_cast. RTTI provides type information at runtime that can be accessed via typeid.
Lifting The Veil - Reading Java Bytecode During LunchtimeAlexander Shopov
This document discusses reading Java bytecode during lunchtime. It provides an overview of key concepts related to the Java Virtual Machine (JVM) like threads, frames, stacks, local variables, constant pools, and bytecode instructions. It then dives into examining specific bytecode instructions like load, store, math, object, and return operations. The document encourages learning to read bytecode as it allows understanding how Java functions at a lower level and can help with tasks like job interviews, debugging compiler issues, and tracking Java language vs platform evolution.
This document discusses reading Java bytecode and provides examples of how to interpret bytecode instructions and method signatures. It introduces key concepts of the Java Virtual Machine (JVM) like frames, stacks, local variables, and bytecode instructions. It also demonstrates how to decompile classes and interpret example bytecode snippets using the javap tool. The document is intended to help readers understand how Java code is executed at the bytecode level.
This document provides an overview of Groovy, a dynamic language for the Java Virtual Machine. It discusses Groovy's features like properties, closures, and integration with Java. The document outlines what's new in Groovy 1.5, including Java 5 features like annotations and generics. It also covers how to integrate Groovy in applications using mechanisms like the GroovyShell and GroovyClassLoader. The presentation aims to help attendees learn about Groovy and how they can use it in their projects.
The document summarizes the evolution and future directions of the C# programming language. It discusses new features in recent versions such as generics in C# 2.0, language integrated query in C# 3.0, and dynamic programming in C# 4.0. It also covers trends toward declarative programming, concurrency, and compiler as a service. The presentation provides examples and demos of new C# 4.0 features like dynamic typing, optional and named parameters, and covariance and contravariance.
The document discusses techniques that JavaScript engines use to optimize performance, including:
- Just-in-time compilation to generate optimized native machine code from JavaScript bytecode. This includes tracing optimizations and register allocation.
- Inline caching to speed up property lookups by caching the results of previous lookups.
- Type inference to determine types statically to avoid slow dynamic checks.
- Built-in optimizations in engines like V8 such as hidden classes, precise garbage collection, and Crankshaft, its optimizing compiler.
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.
Detecting Occurrences of Refactoring with Heuristic SearchShinpei Hayashi
This document describes a technique for detecting refactorings between two versions of a program using heuristic search. Refactorings are detected by generating intermediate program states through applying refactorings, and finding a path from the original to modified program that minimizes differences. Structural differences are used to identify likely refactorings. Candidate refactorings are evaluated and applied to generate new states, with the search terminating when the state matches the modified program. A supporting tool was developed and a case study found the technique could correctly detect an actual series of refactorings between program versions.
This document discusses how to write Ruby extensions using the Crystal programming language. Crystal compiles to efficient native code and has static typing like C, but with a Ruby-like syntax. The document explains how to define Crystal classes and methods, bind them to Ruby using C bindings, and compile the extension so it can be required from Ruby. Key points covered include declaring modules and functions in a C library, converting between Ruby and Crystal types, defining Ruby classes and methods from Crystal, and initializing the extension so it integrates with Ruby. The goal is to leverage Crystal's performance while still writing code in a Ruby-like way using the same interfaces as a C extension.
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...Coen De Roover
Presentation at the Postdoctoral symposium of the 2011 International Conference on Software Maintenance, accompanying the paper
http://soft.vub.ac.be/Publications/2011/vub-soft-tr-11-11.pdf
The document summarizes key features of the Pizza programming language and compiler, which extended Java with functional programming capabilities. The Pizza language added parametric polymorphism (generics), first-class functions, and algebraic datatypes to Java. The Pizza compiler translated Pizza code into Java bytecode. It supported features like pattern matching on algebraic datatypes through translation into Java classes with tag fields. The document provides examples and explanations of how each Pizza feature was implemented.
Actor model which is currently trending in software development is a popular design approach when it comes to complex applications. Many systems written in Erlang (Akka framework) are designed with actor model in their core. But Erlang and Akka are managed environments and safe programming languages. Is it worth using actor model in C++? If yes, where to look and what to use? The talk will cover all these topics.
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
This document discusses an automated recommender system for refining Ekeko/X transformations. It begins by introducing logic meta-programming and how it allows querying a "database" of program information using logic relations. Templates with meta-variables and directives are used to specify transformations, and formal operators define ways to mutate templates. A genetic search evaluates templates based on precision, recall, partial matches, and directive usage to recommend refinements for better specifying transformations.
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Shinpei Hayashi
This document presents an approach for generating assertion code from the Object Constraint Language (OCL) using model transformations. The approach constructs a hierarchy of programming languages based on their structural similarities. This allows rules for translating OCL to be reused across multiple implementation languages, saving approximately 50% of the effort compared to creating individual translators. An evaluation implemented the approach in Maude and demonstrated its ability to generate code for Java, Python, Haskell and O'Haskell from a single OCL specification.
[OLD VERSION, SEE DESCRIPTION FOR NEWER VERSION LINK] Hot C++: Rvalue Referen...Andrey Upadyshev
Newer version: https://www.slideshare.net/oliora/hot-c-rvalue-references-and-move-semantics-155638600
Detailed presentation of rvalue references and move semantics introduced in C++11.
Extended version of "Hot C++11, Part 1: Rvalue References And Move Semantics".
The document discusses learning Ruby by reading its source code. It provides an overview of Ruby's basic object structure, with every object having an RBasic struct containing flags and a klass pointer. It describes the various structs used to represent different Ruby object types like integers, floats, strings, arrays, and classes. It details how Ruby uses singleton classes to implement class and instance methods. The document also explores Ruby's approach to class inheritance and module inclusion by examining how method lookup and class hierarchies are represented internally. It encourages spelunking the C source code to better understand how Ruby works under the hood.
The document discusses the history and development of the Haskell programming language over 15 years. It summarizes key events like the initial meeting that kicked off Haskell in 1987, the release of the first Haskell report in 1990, and the standardization of Haskell 98. It also reflects on important aspects of Haskell like laziness, monads, and the process of language design by committee and community.
Latest C++ Interview Questions and AnswersDaisyWatson5
Q: Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible?
A: There is nothing like Virtual Constructor. The Constructor can‟t be virtual as the constructor is a code which is responsible for creating an instance of a class and it can‟t be delegated to any other object by virtual keyword means.
Q: What is constructor or ctor?
A: Constructor creates an object and initializes it. It also creates vtable for virtual functions. It is different from other methods in a class.
Q: What about Virtual Destructor?
A: Yes there is a Virtual Destructor. A destructor can be virtual as it is possible as at runtime depending on the type of object caller is calling to, proper destructor will be called.
Q: What is the difference between a copy constructor and an overloaded assignment operator?
A: A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.
Q: Can a constructor throws an exception? How to handle the error when the constructor fails? A:The constructor never throws an error.
Q: What is default constructor?
A: Constructor with no arguments or all the arguments has default values.
Mirah is a small, fast JVM language that uses Ruby syntax but compiles to Java bytecode. It was created by Charles Oliver Nutter, the creator of JRuby, who wanted to write Java code using a language as expressive as Ruby. Mirah has Ruby's syntactic sugar but is statically typed and compiled like Java, without runtime modification. It uses type inference and macros to provide Ruby-like conveniences while compiling to a small footprint without needing a runtime library, making it suitable for mobile applications. Developers can get started with Mirah by installing it with RVM and writing code that looks like Ruby but compiles to Java classes.
This document provides an introduction to meta-programming in C++. It discusses how templates allow programs to generate other programs at compile-time, providing higher levels of abstraction, design, and efficiency. It covers key concepts like generic programming, functional programming idioms, template template parameters, and how control structures can be expressed with templates. Examples demonstrate how meta-programming can be used for tasks like loop unrolling, conversion checking, and computing dot products via recursion. Important C++ meta-programming libraries like Loki and Boost are also summarized.
Inheritance and type casting allows creating new classes from existing classes. Virtual functions allow dynamic binding at runtime rather than compile time. Dynamic casting uses the dynamic_cast operator to cast polymorphic objects between base and derived classes. Runtime type information provides information about an object's type at runtime to enable dynamic binding and casting.
The document discusses inheritance, virtual functions, and dynamic casting in C++. It explains that inheritance allows a new class to inherit attributes from a base class. Virtual functions allow dynamic binding at runtime rather than compile time. Dynamic casting uses the dynamic_cast operator to cast polymorphic objects, ensuring the cast is valid based on inheritance. Downcasting and cross casting between unrelated base classes is also possible using dynamic_cast. RTTI provides type information at runtime that can be accessed via typeid.
This document provides an overview of object-oriented programming concepts using C++. It discusses key OOP concepts like objects, classes, encapsulation, inheritance, polymorphism, and dynamic binding. It also covers C++ specific topics like functions, arrays, strings, modular programming, and classes and objects in C++. The document is intended to introduce the reader to the fundamentals of OOP using C++.
Xtext is a framework for developing textual domain-specific languages and text-based programming languages. It uses Eclipse, EMF, and ANTLR to provide features like parsing, code generation, validation, and editing support. Xtext allows defining the grammar of a language and generates artifacts like parsers, indexers, and editors. It supports integration with other Eclipse technologies and allows customizing various parts of the language workflow through extension points and dependency injection.
Sven and I are going to classify Xtext compared to other concepts and frameworks and demonstrate its capabilities with a refined version of an example I presented in London the week before. After that we discuss the versatile possibilities for extending and customizing the framework and finish with an exciting outlook.
The document discusses key aspects of the Java programming language including its history, design goals, syntax, types, classes, inheritance, exceptions, generics and the Java Virtual Machine. It notes that Java was created as a simpler alternative to C++ that is object-oriented, automatically memory managed and portable across platforms via bytecode execution on the JVM.
Programming Android Application in Scala.Brian Hsu
The document discusses using Scala to develop Android applications. Scala allows satisfying three desires at once: REPL, scripting, and compiling. It supports traits for mixin composition, functional programming, static typing with duck typing. SBT is introduced as a build tool for Scala/Android projects that does not require configuration and supports continuous compilation with an Android plugin. Live demos show installing SBT/SBT-Android and creating a sample Scala/Android project. Some limitations of Scala with Android like accessing static protected Java fields are also mentioned.
This document provides an overview of memory management concepts in Java and C++, including pointers, the heap, stack, activation records, classes and objects. It discusses how objects are allocated in memory in both languages, with objects in Java being referenced by pointers on the stack and allocated on the heap, while in C++ objects can be allocated on the stack or heap. The document also covers issues like memory leaks in C++ if objects are not deleted from the heap, and garbage collection handling object deletion in Java. Methods and calling conventions are compared between the two languages.
The document provides an introduction and overview of the C# programming language. It covers topics such as types, expressions, declarations, classes, structs, namespaces, assemblies, attributes, threads, and XML comments. It compares C# to languages like Java and C++, and outlines new features in C# like reference and output parameters, objects on the stack, rectangular arrays, and generics. It also provides a basic "Hello World" example and discusses how C# programs are typically structured across multiple files.
The document discusses the SWIG tool, which allows C/C++ code to be integrated with scripting languages like Perl, Python, and Tcl. SWIG works by taking C/C++ header files, wrapping the code in a wrapper module, and compiling it into an extension that can then be used from the scripting language. While SWIG handles many common C/C++ features automatically, interface building can sometimes be challenging due to issues like pointer ambiguity, preprocessor macros, or advanced C++ features that SWIG may not fully support.
The document provides information about Swift Core, which includes the core libraries and functionality of the Swift programming language. It lists some of the key Swift libraries like swiftAST and swiftLLVMParses. It also describes the documentation build process and lists important files that define the language like Attr.def, Builtin.def, and MappedTypes.def. The document outlines how to install and develop Swift in Xcode and highlights some core language functions.
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Tudor Dragan
Kotlin is a powerful language, but it also comes with its traps and pitfalls. This presentation is about uncovering the very nice features and strange particularities that the language has to offer.
Kirill Shabordin, CTO, Social Quantum
Is Lua a panacea or a dead end? Is OOP necessary for gamedev? How many Lua scripters does it take to change a light bulb?
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...lennartkats
Language extensions increase programmer productivity by providing concise, often domain-specific syntax, and support for static verification of correctness, security, and style constraints. Language extensions can often be realized through translation to the base language, supported by preprocessors and extensible compilers. However, various kinds of extensions require further adaptation of a base compiler's internal stages and components, for example to support separate compilation or to make use of low-level primitives of the platform (e.g., jump instructions or unbalanced synchronization). To allow for a more loosely coupled approach, we propose an open compiler model based on normalization steps from a high-level language to a subset of it, the core language. We developed such a compiler for a mixed Java and (core) bytecode language, and evaluate its effectiveness for composition mechanisms such as traits, as well as statement-level and expression-level language extensions.
The document provides an overview of JavaScript including its built-in data types, objects like String, Math, Date, and Array, control structures like if/else and for loops, operators, and global functions. It describes the properties and methods for common JavaScript objects and covers topics like operators, control flow, and functions in JavaScript. The TA information is also included for contacting the instructor with any questions.
This document provides an overview of JavaScript topics covered in Tutorial 5, including:
- JavaScript vs JScript
- Built-in data types and objects like String, Math, Number, Boolean, and Date
- Control structures like if/else statements and for/while loops
- Operators, global functions, events, and DOM hierarchy
- Communicating between JavaScript and Java applets
- Recommended sites for further JavaScript and dynamic HTML information
Jug trojmiasto 2014.04.24 tricky stuff in java grammar and javacAnna Brzezińska
This document discusses various language tricks and quirks in Java, including:
1) The "&" operator can be used for casting lambdas to make them serializable or satisfy multiple interfaces as type bounds for generics.
2) The "|" operator allows catching multiple exception types in a single catch block, introduced in JDK7.
3) Hexadecimal floating point literals avoid decimal rounding issues.
4) String literals can be used in switch statements starting in JDK7.
5) Lambda functions were introduced in JDK8, including recursion, method references, and serialization tricks.
6) Some compiler quirks are discussed related to generics and autoboxing behavior.
The main body of work related to supporting dynamic languages on the JVM at Oracle today is done within the Nashorn project. While on the surface it looks like we're busy creating a JavaScript runtime, in reality JavaScript is only the beginning, and not the ultimate goal. Nashorn has served as the proving ground for new approaches for implementing a dynamic language on top of the JVM, and we're eager to – once solidified – crystallize these into a reusable dynamic language implementer's toolkit. We have faced challenges of optimally mapping JavaScript local variables to JVM types (or: "hey, there's a static type inference algorithm in your dynamic language compiler"), doing liveness analysis, cutting up methods too large to fit into a single JVM method, efficiently representing large array and object literals in compiled code, creating a system for on-demand compilation of several type-specialized variants of the same function, and more. Along the way, we have reached the limits of our initial internal representation (fun fact: you can't do liveness analysis on an AST. We learned it the hard way.) and started sketching up an intermediate representation that would be easy to emit from a dynamic language compiler, and that could be taken over by a toolchain to perform the operations described above then on it and finally output standard Java bytecode for JIT to take over. Elevator pitch: like LLVM, but for dynamic languages on the JVM.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfTechgropse Pvt.Ltd.
In this blog post, we'll delve into the intersection of AI and app development in Saudi Arabia, focusing on the food delivery sector. We'll explore how AI is revolutionizing the way Saudi consumers order food, how restaurants manage their operations, and how delivery partners navigate the bustling streets of cities like Riyadh, Jeddah, and Dammam. Through real-world case studies, we'll showcase how leading Saudi food delivery apps are leveraging AI to redefine convenience, personalization, and efficiency.
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
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.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
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
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.
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
24. Function Object
Member Function pointer Temporal Object dynamic_cast
Function pointer
Pass By Reference Pure Virtual Class RTTI
typeid
Overloading Pass By Value Pure Virtual Function
Copy Constructor
Virtual Function Multiple Inheritance
Constructor Dynamic Binding
Inheritance
Exception
Destructor
Class Virtual Inheritance
Friend
Template
String
Adaptor
Namespace
STL
Operator New RAII Iterator Function Template Class Template
Template Specialization
Memory Management
Partial Specialization
Smart Pointer
Reference Preprocessor
Template Meta Programming
31. Timeline
2011
1980 1989 C++11
C with class CFront 2.0 1992
HP C++ Lambda Expression
Class Multiple Inheritance Automatic Type
Inheritance Abstract Class Exception Threading
1983 - 1986 1991 1996
C++ - CFront 1.1 CFront 3.0 C++ 98/03
Virtual Function Template STL
Overloading Namespace
Reference
47. C++ is deterministic
• Destructing is determinate
- No GC
• Performance is predictable
- C++ is fast only when coders are experts
- Java is almost as fast, much higher
productivity
48. Where the Focus Is
Efficiency Flexibility Abstraction Productivity
C non-goal non-goal
C++ non-goal
at the at the
Java, C#
expense of expense of
49. Conclusion
• There are only two kinds of languages
- The ones people always complain about
- The ones nobody uses
• C++ is an undoubted success
• One language doesn’t fit all
- Important to known when and when not
52. 简单对象
class Animal {
public:
void Run();
private:
char* name;
int age;
char sex;
};
53. 简单对象
class Animal { name
public:
void Run();
private: age
char* name;
int age;
char sex;
}; Sex Alignment
54. 单一继承
class Animal {
public:
void Run();
private:
char* name;
int age;
char sex;
};
class Lion : public Animal {
private:
char* address;
};
55. 单一继承
class Animal { address
public:
void Run();
private: name
char* name;
int age;
char sex;
}; age
class Lion : public Animal {
private:
char* address; Sex Alignment
};
73. 简单类型函数调用
int sum(int a, int b) {
int result = a + b;
return result;
}
int main(int argc, char* argv[])
{
sum(1, 4);
return 0;
}
* 调用栈与机器架构有 , 这里以x86为例.
74. 简单类型函数调用
...
int sum(int a, int b) {
int result = a + b; 4
return result;
}
1
int main(int argc, char* argv[])
{
sum(1, 4);
return 0;
}
* 调用栈与机器架构有 , 这里以x86为例.
75. 简单类型函数调用
...
int sum(int a, int b) {
int result = a + b; 4
return result;
}
1
int main(int argc, char* argv[])
{ Return Address
sum(1, 4);
return 0;
}
* 调用栈与机器架构有 , 这里以x86为例.
76. 简单类型函数调用
...
int sum(int a, int b) { 5
int result = a + b; eax 4
return result;
}
1
int main(int argc, char* argv[])
{ Return Address
sum(1, 4);
return 0;
} ebp Saved ebp
esp sum
* 调用栈与机器架构有 , 这里以x86为例.
98. 静态变量初始化
Animal animal("Lion"); void __sti_ii() {
animal.Animal::Animal();
int Foo() { num = Foo();
... }
}
void __std_ii() {
int num = Foo(); animal.Animal::~Animal();
}
99. inline vs. iterator
vector<int>::iterator it = vec.begin();
vector<int>::iterator end = vec.end(); for (vector<int>::iterator it = vec.begin();
for (; it != end; ++it) { it != vec.end(); ++it) {
} }
100. inline vs. iterator
vector<int>::iterator it = vec.begin();
vector<int>::iterator end = vec.end(); for (vector<int>::iterator it = vec.begin();
for (; it != end; ++it) { it != vec.end(); ++it) {
it = vec.erase(it); it = vec.erase(it);
} }
101. inline vs. iterator
vector<int>::iterator it = vec.begin();
vector<int>::iterator end = vec.end(); for (vector<int>::iterator it = vec.begin();
for (; it != end; ++it) { it != vec.end(); ++it) {
it = vec.erase(it); it = vec.erase(it);
} }
103. Prove I t!
• Only Code Never Lies
• Assembly Language
• g++
- -S
• nm
104. References
• Bjarne Stroustrup. 1994. The Design And
Evolution of C++
• Stanley B. Lippman. 1996. Inside the C++
Object Model
• Scott Meyers. 2006. Effective C++
• 陈硕. 2012. C++工程实践