Elixir is a dynamic, functional language designed for building scalable and maintainable applications. It leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems. Elixir compiles to Erlang bytecode and provides developers' productivity through amazing tooling and documentation while enabling concurrency programming without locks or semaphores. The document then provides examples of Elixir types, functions, macros, and tools like Mix and Phoenix.
Eugene Pirogov talks about “Origins of Elixir” during #pivorak Lviv Ruby MeetUp 2016
Details:
“For the past 6 years I've been programming in Ruby. Began shifting from Ruby to Elixir during a sabbatical. Started doing programming exercises in Elixir as well as contributing to Elixir language and variety of small libraries in the ecosystem. I'm a strong believer that Elixir, being backed by immensely powerful, robust and battle-tested Erlang VM will take over the world of web development.” - that’s what Eugene says.
This document outlines the 7 stages of unit testing: 1) Shock & Disbelief, 2) Denial, 3) Anger, 4) Bargain, 5) Guilt, 6) Depression, 7) Acceptance & Hope. It provides examples of different types of unit tests like testing return values, state changes, and behaviors using stubs, mocks and dependency injection. It also discusses improving test quality by following rules, prioritizing coverage, and measuring it, as well as integrating other test types and using CI/CD as developers progress through the stages towards acceptance of unit testing.
Introduction to Ruby On Rails Killer wannabe: Elixir - a functional concurrent, distributed language compiled to Erlang VM. Presentation from #wrug on 30th of June.
Elixir is a functional, concurrent, and immutable programming language that is influenced by Ruby and Erlang. It has many similarities to Ruby including syntax, metaprogramming capabilities, and features like heredocs and string interpolation. However, Elixir is functional and immutable by default, supports concurrency through the actor model and distribution across nodes, and includes powerful features like pattern matching, pipe operator, and guard clauses. The Elixir ecosystem also benefits from OTP for building reliable and scalable systems.
This document summarizes the basics of memory management in Python. It discusses key concepts like variables, objects, references, and reference counting. It explains how Python uses reference counting with generational garbage collection to manage memory and clean up unused objects. The document also covers potential issues with reference counting like cyclic references and threads, and how the global interpreter lock impacts multi-threading in Python.
The fundamentals and advance application of Node will be covered. We will explore the design choices that make Node.js unique, how this changes the way applications are built and how systems of applications work most effectively in this model. You will learn how to create modular code that’s robust, expressive and clear. Understand when to use callbacks, event emitters and streams.
Elixir is a dynamic, functional language designed for building scalable and maintainable applications. It leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems. Elixir compiles to Erlang bytecode and provides developers' productivity through amazing tooling and documentation while enabling concurrency programming without locks or semaphores. The document then provides examples of Elixir types, functions, macros, and tools like Mix and Phoenix.
Eugene Pirogov talks about “Origins of Elixir” during #pivorak Lviv Ruby MeetUp 2016
Details:
“For the past 6 years I've been programming in Ruby. Began shifting from Ruby to Elixir during a sabbatical. Started doing programming exercises in Elixir as well as contributing to Elixir language and variety of small libraries in the ecosystem. I'm a strong believer that Elixir, being backed by immensely powerful, robust and battle-tested Erlang VM will take over the world of web development.” - that’s what Eugene says.
This document outlines the 7 stages of unit testing: 1) Shock & Disbelief, 2) Denial, 3) Anger, 4) Bargain, 5) Guilt, 6) Depression, 7) Acceptance & Hope. It provides examples of different types of unit tests like testing return values, state changes, and behaviors using stubs, mocks and dependency injection. It also discusses improving test quality by following rules, prioritizing coverage, and measuring it, as well as integrating other test types and using CI/CD as developers progress through the stages towards acceptance of unit testing.
Introduction to Ruby On Rails Killer wannabe: Elixir - a functional concurrent, distributed language compiled to Erlang VM. Presentation from #wrug on 30th of June.
Elixir is a functional, concurrent, and immutable programming language that is influenced by Ruby and Erlang. It has many similarities to Ruby including syntax, metaprogramming capabilities, and features like heredocs and string interpolation. However, Elixir is functional and immutable by default, supports concurrency through the actor model and distribution across nodes, and includes powerful features like pattern matching, pipe operator, and guard clauses. The Elixir ecosystem also benefits from OTP for building reliable and scalable systems.
This document summarizes the basics of memory management in Python. It discusses key concepts like variables, objects, references, and reference counting. It explains how Python uses reference counting with generational garbage collection to manage memory and clean up unused objects. The document also covers potential issues with reference counting like cyclic references and threads, and how the global interpreter lock impacts multi-threading in Python.
The fundamentals and advance application of Node will be covered. We will explore the design choices that make Node.js unique, how this changes the way applications are built and how systems of applications work most effectively in this model. You will learn how to create modular code that’s robust, expressive and clear. Understand when to use callbacks, event emitters and streams.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
Modern Programming in Java 8 - Lambdas, Streams and Date Time APIGanesh Samarthyam
This presentation provides a comprehensive overview of modern programming in Java. It focuses only on Java 8 features: Lambdas, Streams and Date Time API. It also briefly covers refactoring legacy Java code to Java 8.
A presentation at Twitter's official developer conference, Chirp, about why we use the Scala programming language and how we build services in it. Provides a tour of a number of libraries and tools, both developed at Twitter and otherwise.
Are you an intermediate Python developer looking to level up? Luckily, Python provides us with a unique set of tools to make our code more elegant and readable. I’ll share practical pythonic solutions for supercharging your code with tools like Decorators, Context Managers, and NamedTuples.
👉 Watch the video: https://www.youtube.com/watch?v=WiQqqB9MlkA 👈
Elegant Solutions for Everyday Python Problems - Pycon 2018
Are you an intermediate python developer looking to level up? Luckily, python provides us with a unique set of tools to make our code more elegant and readable by providing language features that make your code more intuitive and cut down on repetition. In this talk, I’ll share practical pythonic solutions for supercharging your code.
Specifically, I'll cover:
What magic methods are, and show you how to use them in your own code.
When and how to use partial methods.
An explanation of ContextManagers and Decorators, as well as multiple techniques for implementing them.
How to effectively use NamedTuples, and even subclass and extend them!
Lastly, I'll go over some example code that ties many of these techniques together in a cohesive way. You'll leave this talk feeling confident about using these tools and techniques in your next python project!
Slides from the 30 minutes long version of "Wait, IPython can do that?!" presentation. I'm talking about some basic and advanced uses of IPython. For a a longer, 45 minutes long version of the slides, check: https://www.slideshare.net/SebastianWitowski/wait-ipython-can-do-that-154464752
Ruby is designed to make programmers happy by providing simplicity, openness, and an object-oriented yet dynamic programming experience. It aims to focus on humans rather than machines. Ruby promotes productivity through conventions that speed development and testing. Programmers enjoy coding in Ruby due to its immediate feedback and morale boost. Ruby has broad utility across web, text, and GUI applications and is platform agnostic, running on most operating systems.
- IPython can do powerful things beyond normal Python like dynamic object introspection, input/output caching, magic functions, and custom configurations.
- Magic functions allow extending IPython's capabilities, some examples include %timeit for timing code, %run for loading scripts, and cell magics for different languages.
- Extensions allow packaging and sharing magic functions, and there are many existing extensions for tasks like SQL, Neo4j, and Django.
- IPython is highly configurable through profiles and configuration files to customize things like startup behavior, key bindings, and extensions loaded.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
Introduction to Erlang/(Elixir) at a Webilea Hands-On SessionAndré Graf
Slides used for introducing and training Erlang/Elixir at the Webilea Hands-On event (http://www.meetup.com/webilea/events/170710572/).
Following topics are more or less covered:
1. very short introduction to the language
2. people try some Erlang over at http://tryerlang.org
3. 'Let it crash'
4. Playing with spawn/link/monitor
5. quick intro to gen_sever and supervisor behaviour
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
This slide shows you how to use Akka cluster in Java.
Source Code: https://github.com/jiayun/akka_samples
If you want to use the links in slide, please download the pdf file.
Ruby 2.0 introduced several new features including keyword arguments, lazy enumerators, module#prepend, and default UTF-8 encoding. Keyword arguments allow defining method parameters with a new syntax for named arguments. Lazy enumerators let huge or infinite arrays be handled by controlling execution flow on the right side of enumerations. Module#prepend inserts a module in front of a class's ancestor chain, opposite of include. The default encoding was changed to UTF-8 to support all characters.
The document discusses serializing EMF models with Xtext. It covers:
- The new Xtext serializer is better than the old one in terms of errors, performance and deprecation.
- Serialization is used for quickfixes, refactoring, persistence, generators and more. It guarantees syntactical correctness and handles comments/whitespace.
- The serializer must parse a serialized model back to the original, and serialize modifications with minimal textual diffs. Ambiguities can cause parsing/serialization mismatches.
- The architecture uses state machines and observer pattern. Hooks allow customizing cross-references, keywords, values and more during serialization.
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
Functional Thinking - Programming with Lambdas in Java 8Ganesh Samarthyam
Functional programming is on the rise. Almost all major and mainstream languages support functional programming features, including C++, Java, Swift, and Python, and Visual Basic. With Java 8’s lambda functions, Java now supports functional programming. Moving to functional programming can result in significantly better code and productivity gains. However, it requires a paradigm shift: you need to move away from imperative and object-oriented thinking to start thinking functionally. That’s what this workshop will help you achieve: it will help you make your shift towards functional programming. The workshop will introduce lambda functions in Java with examples from Java library itself. Presented in OSI Days 2015 workshop - http://osidays.com/osidays/shifting-to-functional-programming-lambdas-for-java-developers/
The document summarizes key points from a presentation titled "Effective Python Programming - OSCON 2005". It discusses Python fundamentals like namespaces, duck typing and exceptions. It also covers structured programming techniques in Python like iterators, generators, for/else loops and try/finally blocks. The presentation emphasizes writing effective code that makes use of Python features and follows best practices.
This document provides an overview of learning Python in three hours. It covers installing and running Python, basic data types like integers, floats and strings. It also discusses sequence types like lists, tuples and strings, including accessing elements, slicing, and using operators like + and *. The document explains basic syntax like comments, indentation and naming conventions. It provides examples of simple functions and scripts.
The document discusses Erlang/Elixir and OTP. It describes Erlang as a dynamically typed, concurrent, functional language created at Ericsson in 1986 that compiles to bytecode and uses lightweight processes and message passing. It also describes OTP as a set of design guidelines and libraries for building fault-tolerant distributed systems that has been battle tested for over 30 years. Elixir is presented as a modern language with the same principles as Erlang but with improved syntax and tooling. Examples are given of using Elixir for websites, mobile backends, IoT, and more.
This document provides an overview of Elixir and the Phoenix framework. It discusses how Elixir runs on the Erlang VM and inherits properties like high availability and distribution. Phoenix is introduced as a web framework for Elixir that focuses on productivity, reliability, and speed. Key Phoenix concepts like the request pipeline, router, controllers, models and views are briefly outlined.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
Modern Programming in Java 8 - Lambdas, Streams and Date Time APIGanesh Samarthyam
This presentation provides a comprehensive overview of modern programming in Java. It focuses only on Java 8 features: Lambdas, Streams and Date Time API. It also briefly covers refactoring legacy Java code to Java 8.
A presentation at Twitter's official developer conference, Chirp, about why we use the Scala programming language and how we build services in it. Provides a tour of a number of libraries and tools, both developed at Twitter and otherwise.
Are you an intermediate Python developer looking to level up? Luckily, Python provides us with a unique set of tools to make our code more elegant and readable. I’ll share practical pythonic solutions for supercharging your code with tools like Decorators, Context Managers, and NamedTuples.
👉 Watch the video: https://www.youtube.com/watch?v=WiQqqB9MlkA 👈
Elegant Solutions for Everyday Python Problems - Pycon 2018
Are you an intermediate python developer looking to level up? Luckily, python provides us with a unique set of tools to make our code more elegant and readable by providing language features that make your code more intuitive and cut down on repetition. In this talk, I’ll share practical pythonic solutions for supercharging your code.
Specifically, I'll cover:
What magic methods are, and show you how to use them in your own code.
When and how to use partial methods.
An explanation of ContextManagers and Decorators, as well as multiple techniques for implementing them.
How to effectively use NamedTuples, and even subclass and extend them!
Lastly, I'll go over some example code that ties many of these techniques together in a cohesive way. You'll leave this talk feeling confident about using these tools and techniques in your next python project!
Slides from the 30 minutes long version of "Wait, IPython can do that?!" presentation. I'm talking about some basic and advanced uses of IPython. For a a longer, 45 minutes long version of the slides, check: https://www.slideshare.net/SebastianWitowski/wait-ipython-can-do-that-154464752
Ruby is designed to make programmers happy by providing simplicity, openness, and an object-oriented yet dynamic programming experience. It aims to focus on humans rather than machines. Ruby promotes productivity through conventions that speed development and testing. Programmers enjoy coding in Ruby due to its immediate feedback and morale boost. Ruby has broad utility across web, text, and GUI applications and is platform agnostic, running on most operating systems.
- IPython can do powerful things beyond normal Python like dynamic object introspection, input/output caching, magic functions, and custom configurations.
- Magic functions allow extending IPython's capabilities, some examples include %timeit for timing code, %run for loading scripts, and cell magics for different languages.
- Extensions allow packaging and sharing magic functions, and there are many existing extensions for tasks like SQL, Neo4j, and Django.
- IPython is highly configurable through profiles and configuration files to customize things like startup behavior, key bindings, and extensions loaded.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
Introduction to Erlang/(Elixir) at a Webilea Hands-On SessionAndré Graf
Slides used for introducing and training Erlang/Elixir at the Webilea Hands-On event (http://www.meetup.com/webilea/events/170710572/).
Following topics are more or less covered:
1. very short introduction to the language
2. people try some Erlang over at http://tryerlang.org
3. 'Let it crash'
4. Playing with spawn/link/monitor
5. quick intro to gen_sever and supervisor behaviour
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
This slide shows you how to use Akka cluster in Java.
Source Code: https://github.com/jiayun/akka_samples
If you want to use the links in slide, please download the pdf file.
Ruby 2.0 introduced several new features including keyword arguments, lazy enumerators, module#prepend, and default UTF-8 encoding. Keyword arguments allow defining method parameters with a new syntax for named arguments. Lazy enumerators let huge or infinite arrays be handled by controlling execution flow on the right side of enumerations. Module#prepend inserts a module in front of a class's ancestor chain, opposite of include. The default encoding was changed to UTF-8 to support all characters.
The document discusses serializing EMF models with Xtext. It covers:
- The new Xtext serializer is better than the old one in terms of errors, performance and deprecation.
- Serialization is used for quickfixes, refactoring, persistence, generators and more. It guarantees syntactical correctness and handles comments/whitespace.
- The serializer must parse a serialized model back to the original, and serialize modifications with minimal textual diffs. Ambiguities can cause parsing/serialization mismatches.
- The architecture uses state machines and observer pattern. Hooks allow customizing cross-references, keywords, values and more during serialization.
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
Functional Thinking - Programming with Lambdas in Java 8Ganesh Samarthyam
Functional programming is on the rise. Almost all major and mainstream languages support functional programming features, including C++, Java, Swift, and Python, and Visual Basic. With Java 8’s lambda functions, Java now supports functional programming. Moving to functional programming can result in significantly better code and productivity gains. However, it requires a paradigm shift: you need to move away from imperative and object-oriented thinking to start thinking functionally. That’s what this workshop will help you achieve: it will help you make your shift towards functional programming. The workshop will introduce lambda functions in Java with examples from Java library itself. Presented in OSI Days 2015 workshop - http://osidays.com/osidays/shifting-to-functional-programming-lambdas-for-java-developers/
The document summarizes key points from a presentation titled "Effective Python Programming - OSCON 2005". It discusses Python fundamentals like namespaces, duck typing and exceptions. It also covers structured programming techniques in Python like iterators, generators, for/else loops and try/finally blocks. The presentation emphasizes writing effective code that makes use of Python features and follows best practices.
This document provides an overview of learning Python in three hours. It covers installing and running Python, basic data types like integers, floats and strings. It also discusses sequence types like lists, tuples and strings, including accessing elements, slicing, and using operators like + and *. The document explains basic syntax like comments, indentation and naming conventions. It provides examples of simple functions and scripts.
The document discusses Erlang/Elixir and OTP. It describes Erlang as a dynamically typed, concurrent, functional language created at Ericsson in 1986 that compiles to bytecode and uses lightweight processes and message passing. It also describes OTP as a set of design guidelines and libraries for building fault-tolerant distributed systems that has been battle tested for over 30 years. Elixir is presented as a modern language with the same principles as Erlang but with improved syntax and tooling. Examples are given of using Elixir for websites, mobile backends, IoT, and more.
This document provides an overview of Elixir and the Phoenix framework. It discusses how Elixir runs on the Erlang VM and inherits properties like high availability and distribution. Phoenix is introduced as a web framework for Elixir that focuses on productivity, reliability, and speed. Key Phoenix concepts like the request pipeline, router, controllers, models and views are briefly outlined.
Distributed Model Validation with EpsilonSina Madani
Scalable performance is a major challenge with current model management tools. As the size and complexity of models and model management programs increases and the cost of computing falls, one solution for improving performance of model management programs is to perform computations on multiple computers. The developed prototype demonstrates a low-overhead data-parallel approach for distributed model validation in the context of an OCL-like language. The approach minimises communication costs by exploiting the deterministic structure of programs and can take advantage of multiple cores on each (heterogenous) machine with highly configurable computational granularity. Performance evaluation shows linear improvements with more machines and processor cores, being up to 340x faster than the baseline sequential program with 88 computers.
The document introduces data structures and algorithms, explaining that a good computer program requires both an efficient algorithm and an appropriate data structure. It defines data structures as organized ways to store and relate data, and algorithms as step-by-step processes to solve problems. Additionally, it discusses why studying data structures and algorithms is important for developing better programs and software applications.
These are my slides from a mini Clojure tutorial presented at the "7 Languages in 7 Months" meetup group. The first part of the presentation faithfully presents material from Bruce Tate book, and the second part covers the more advanced topics of state management and macros
Repeating History...On Purpose...with ElixirBarry Jones
A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
This document provides information on various programming language concepts like object-oriented programming, data types, loops, and control flow statements in C++. It defines key OOP concepts like encapsulation, inheritance, and polymorphism. It also explains C++ data types, common loop structures like for, while, and do-while loops, and control statements like break and continue.
This document provides an overview of OTP (Open Telecom Platform) concepts in Elixir. It discusses processes, behaviours like GenServer and Supervisor, and how they help build robust applications. Process supervision trees are shown to illustrate how processes can be organized hierarchically. An example calculator application is used to demonstrate evolving a basic script into a module, then implementing GenServer and Supervisor behaviours to integrate it with OTP. This provides message passing, naming, and fault tolerance. The talk concludes that OTP is easy to implement and the behaviours handle difficult tasks, making distributed, concurrent applications robust.
Thread vs Process
scheduling
synchronization
The thread begins execution with the C/C run-time library startup code.
The startup code calls your main or WinMain and execution continues until the main function returns and the C/C library code calls ExitProcess.
Reflection is the ability of a managed code to read its own metadata for the purpose of finding assemblies, modules and type information at runtime. The classes that give access to the metadata of a running program are in System.Reflection.
System.Reflection namespace defines the following types to analyze the module's metadata of an assembly:
Assembly, Module, Enum, ParameterInfo, MemberInfo, Type, MethodInfo, ConstructorInfo, FieldInfo, EventInfo, and PropertyInfo
This document provides an overview of Apex and Force.com development. It covers Apex language basics, data types, collections, exceptions, asynchronous execution, database integration, triggers, debugging, limits, and unit testing. Key topics include the similarities between Apex and Java, SOQL, DML statements, polymorphism in Apex, and the requirements to deploy code changes to production.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
This document discusses parallel programming in .NET and provides an overview of the Task Parallel Library (TPL) and Parallel LINQ (PLINQ). It notes that multicore processors have existed for years but many developers are still writing single-threaded programs. The TPL scales concurrency dynamically across cores and handles partitioning work. PLINQ can improve performance of some queries by parallelizing across segments. Tasks represent asynchronous operations more efficiently than threads. The document provides examples of implicit and explicit task creation and running tasks in parallel using Parallel.Invoke or Task.Run.
This presentation covers the understanding of system calls for various resource management and covers system calls for file management in details. The understanding of using system calls helps to start with working with device driver programming on Unix/Linux OS.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
This document provides an overview of interprocess communication (IPC) structures. It discusses pipes, which allow for one-directional data flow between related processes using file descriptors. It also covers FIFOs which are similar to pipes but use pathnames and can be accessed by unrelated processes. The document outlines the main XSI IPC structures - message queues for communication via linked lists of messages, semaphores for controlling access to shared resources, and shared memory for processes to access the same memory region. It provides details on how each IPC structure is created, accessed, and removed in UNIX systems.
Desired language characteristics – Data typing .pptx4132lenin6497ram
This document discusses various topics related to programming languages and tools for real-time systems. It explores desired language characteristics for real-time systems like readability, modularity, and support for meeting deadlines. It also covers data typing, control structures, hierarchical decomposition using blocks, procedures and functions. Additional topics include packages, error handling, multitasking, low-level programming, scheduling and experimental languages. Examples of languages used for real-time systems are given like C, C++, Ada, Assembly and Python.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
2. Characteristics of Functional Programming
• Avoids mutable data & changing state
• Higher-order functions
• Declarative style of code
• Functional programming method focuses on results, not the process
• It does not support iteration like loop statements and conditional statements
like If-Else
3. Why should I learn FP?
• Easier handling of Concurrent programs
• Clearer Testing & Debugging
• Better maintainability
• Easier to understand
• Offers better modularity with a shorter code
• Hot code deployment and fault tolerance
4. Functional Programing vs OOP
• Definition: Based on Functions ~ Objects
• Data: Uses immutable data ~ mutable data
• Programming Model: Declerative ~ Imperative
• Support: Supports Parallel Programming ~ Not Support Parallel Programming
• Execution: can be in any order ~ should be in particular order
• Iteration: Recursion ~ Loops
• Basic Elements: Variables & Functions ~ Objects & Methods
5. What is Elixir
• Elixir is a dynamic, functional language for building scalable and
maintainable applications.
• Elixir leverages the Erlang VM(BEAM), known for running low-latency,
distributed and fault-tolerant systems.
• Created by José Valim circa 2012. Former Rails Core Team member.
• Compiles to Erlang bytecode.
• Can call to any Erlang library with no performans penalty.
6. Elixir Features
• Enables developers’ productivity by offering amazing tooling and beautiful
documentation.
• The Elixir programming language wraps functional programming with immutable
state and an actor-based approach to concurrency in a tidy, modern syntax.
• In particular, immutable data structures help concurrency quite a lot, and
pattern matching is great for writing declarative code.
• Elixir has dynamic typing. Types are checked in run-time, not during compilation.
• We can do concurrency programming without having to use abstractions such as
locks or semaphores.
7. Concurrency
• Elixir uses lightweight threads of execution (called processes).
• These are isolated, run across all CPUs, and communicate through
messages.
• Together with the immutability of data that comes from the functional nature
of the language, this makes it less hard to write concurrent programs in Elixir.
8. Scalability
• These same processes allow us to scale systems easily
• Horizontally (adding more machines to the cluster)
• Vertically (using the available resources of the machine more efficiently).
9. Fault Tolerance
• Elixir and Erlang have a unique approach to fault-tolerance.
• While things sometimes inevitably fail in production, lightweight processes can
be quickly restarted by the supervisor system.
11. Data Structures
• Tuples: Elements contiguously in memory.
• {:reply, 123}
• Linked List: like arrays & values can be any type.
• [1, 2, 3] ++ [4, 5, 6]
• Binaries: Strings are UTF-8 encoded binaries.
• <<104, 101, 108, 108, 111>> (hello)
• Maps
• %{ key => value, key => value }
• Charlist: list of integers where all the integers are valid code points
• ‘hello' ++ ‘ world'
12. Functions
• Anonymous functions
• Can be passed as argument
• add = fun (a,b) -> a + b end
add.(3,4)
• Named functions
• Just defined in module
• Can be called without “.”
13. Pattern Matching
• a = 1 meaning is no assigning, is binding variable. Left hand side is equal to
right hand side.
• Elixir allows rebinding a variable
• a = 1
a = 2
• [ a, b, _ ] = [ 1, 2, 3 ]
• Pin operator(“^”), a variable’s existing value rather than rebinding the variable
• [ ^a , 2 , 3 ] = [1 , 2 , 3 ]
14. Guards
• A way to augment pattern matching with more complex checks.
• Guards start with the when keyword.
• Where used:
• function clauses
def foo(term) when is_integer(term), do: term
def foo(term) when is_float(term), do: round(term)
15. Guards
• case expressions
case x do
1 -> :one
2 -> :two
n when is_integer(n) and n > 2 -> :larger_than_two
end
• anonymous functions
larger_than_two? = fn
n when is_integer(n) and n > 2 -> true
n when is_integer(n) -> false
end
16. Pipe Operator
• It takes the output from the expression on its left side and passes it as the first
argument to the function call on its right side.
iex> Enum.map(List.flatten([1, [2], 3]), fn x -> x * 2 end)
translates to
iex> [1, [2], 3] |> List.flatten() |> Enum.map(fn x -> x * 2 end)
[2, 4, 6]
17. Enum
• Enum module provides a huge range of functions to transform, sort, group,
filter and retrieve items from enumerables.
• All the functions in the Enum module are eager.
• Enum module can work with any data type that implements the Enumerable
protocol.
iex> Enum.map(1..3, fn x -> x * 2 end)
[2, 4, 6]
iex> Enum.reduce(1..3, 0, &+/2)
6
18. Stream
• As an alternative to Enum.
• Supports lazy operations.
• Instead of generating intermediate lists, streams build a series of
computations.
• useful when working with large, possibly infinite collections.
iex> odd? = &(rem(&1, 2) != 0)
iex> 1..100_000 |> Stream.map(&(&1 * 3)) |> Stream.filter(odd?)
#Stream<[enum: 1..100000, funs: […]]>
19. Processes
• In Elixir, all code runs inside processes.
• Processes are isolated from each other run concurrent to one another.
• Communicate via message passing.
• Processes are not only the basis for concurrency in Elixir, but they also
provide the means for building distributed and fault-tolerant programs.
• Processes in Elixir are extremely lightweight in terms of memory and CPU.
• May be tens or even hundreds of thousands of processes running
simultaneously.
20. Process - Spawn
• The basic mechanism for spawning new processes.
• Returns a PID(process identifier).
• The spawned process will execute the given function and exit after the
function is done.
iex> pid = spawn fn -> 1 + 2 end
#PID<0.44.0>
iex> Process.alive?(pid)
false
21. Process - send & receive message
• When a message is sent to a process, the message is stored in the process
mailbox.
• If there is no message in the mailbox matching any of the patterns, the current
process will wait until a matching message arrives.
iex> send self(), {:hello, "world"}
{:hello, "world"}
iex> receive do
…> {:hello, msg} -> msg
...> {:world, _msg} -> "won't match"
...> end
"world"
22. Process - Links
• When a process dies parent process doesn’t die, because processes are
isolated.
• If we want the failure in one process to propagate to another one, we should
link them.
• Tasks build on top of the spawn functions to provide better error reports and
introspection.
iex(1)> Task.start fn -> raise “oops"end
{:ok, #PID<0.55.0>}
23. Module Attributes
• They serve to annotate the module, often with information to be used by the
user or the VM.
• @moduledoc, @doc, @behaviour, @before_compile
• They work as constants that read at compilation time and not at runtime
• They work as a temporary module storage to be used during compilation.
24. Structs
• Structs are extensions built on top of maps that provide compile-time checks
and default values.
• Structs take the name of the module they’re defined in.
25. Protocols
• A mechanism to achieve polymorphism in Elixir.
• Protocols allow us to extend the original behavior for as many data types as
we need.
26. Comprehensions
• Comprehensions groups common to loop over an Enumerable, often
filtering out some results and mapping values into another list tasks in to for
special form.
• A comprehension is made of three parts: generators, filters, and
collectables.
• Generators support pattern matching to filter.
• The result of a comprehension can be inserted into different data structures by
passing the :into option.
27. try, catch, and rescue
• Elixir has three error mechanisms: errors, throws, and exits.
• Errors (or exceptions) are used when exceptional things happen.
• Errors can be rescued using the try/rescue construct.
• Elixir developers rarely use try/rescue construct.
• Instead of rescuing an error, we’d rather “fail fast” since the supervision tree
will guarantee.
28. try, catch, and rescue
• Throws, a value can be thrown and later be caught.
• It is not possible to retrieve a value unless by using throw and catch.
• Exit, when a process dies, it sends an exit signal listened by supervisor.
• After, it’s necessary to ensure that a resource is cleaned up after some action
that could potentially raise an error.
29. Typespecs
• Elixir is a dynamically typed language, so all types in Elixir are checked at
runtime.
• Elixir comes with typespecs, which are a notation used for:
• @spec, declaring typed function signatures -> document function
signatures.
• @type, declaring custom types -> increase its readability.
30. Behaviours
• Define a set of functions that have to be implemented by a module.
• Ensure that a module implements all the functions in that set.
• Must implement all the functions defined with the @callback attribute.
31. Mix
• Mix is a build tool that ships with Elixir that provides tasks for creating,
compiling, testing your application, managing its dependencies and much
more.
• To create first project:
• $ mix new kv --module KV
• To start iex session inside the project:
• $ iex -S mix
• To run tests
• $ mix test
32. OTP
• OTP (Open Telecom Platform) is a set of libraries that ships with Erlang. But
it isn’t used just for telecom nowadays.
• OTP defined as three components: Erlang itself, set of libraries, set of
system design principles.
• It certainly solves many problems that includes application discovery, failure
detection and management, hot code swapping, and server structure.
33. Agent
• Simple wrappers around state.
• If all you want from a process is to keep state, agents are a great fit.
• Everything that is inside the function we passed to the agent happens in the
agent process.
34. GenServer
• A behaviour module for implementing the server of a client-server relation.
• GenServer(Generic Server) is a process and it can be used to keep state,
execute code asynchronously and so on.
• The advantage of using a GenServer, it will have a standard set of interface
functions and include functionality for tracing and error reporting. It will also
fit into a supervision tree.
• There are two types of requests you can send to a GenServer
• call: synchronous and the server must send a response back.
• cast: asynchronous, the server won’t send a response back and therefore
the client won’t wait for one.
35. Supervisor
• A supervisor is a process which supervises other processes, which we refer to
as child processes.
• Used to build a hierarchical process structure called a supervision tree.
• Supervision trees provide fault-tolerance and encapsulate how our
applications start and shutdown.
• The act of supervising a process includes three distinct responsibilities
• start child processes.
• restart a child process, either because it terminated abnormally
• shutting down the child processes when the system is shutting down.
36. ETS
• ETS(Erlang Term Storage) is a cache mechanism.
• ETS allows us to store any Elixir term in an in-memory table.
• Access controls:
• public — Read/Write available to all processes.
• protected — Read available to all processes. Only writable by owner
process. This is the default.
• private — Read/Write limited to owner process.