The document discusses generic programming in D and related concepts. It defines generic programming as finding the most general algorithm representation with the narrowest requirements and widest guarantees. This allows algorithms to be reused for different data types. It provides examples of implementing generic minimum and argminimum functions in D. The document also discusses how generic programming relates to generative programming, with code generation at compile-time using D's capabilities for compile-time evaluation and code injection via mixins.
This document discusses four cool things about the D programming language: turtles all the way down scoping, a safe subset for memory safety, an approach to purity with pure functions, and generative programming using mixin for code generation. The speaker will cover each of these topics in the presentation.
The document is a presentation about optimizing algorithms using sentinel values. It discusses using sentinels to optimize linear searches, partition algorithms, and other algorithms. Sentinels allow modifying algorithms to avoid indexing and boundary checks, improving performance by up to 30% in some cases. The presentation emphasizes that introspection techniques like static if are needed to implement sentinels generically.
Walter Bright, creator of the D programming language, delivers the opening keynote of the D Programming Language Conference 2013, 1-3 May 2013, Menlo Park, CA.
For more details including a link to the talk's recording, check http://dconf.org/talks/bright.html
This document discusses gate level modeling in Verilog HDL. It covers structural modeling using gate primitives like AND, OR, NOT, etc. It describes how to instantiate gates and model combinational logic circuits. It discusses inertial and transport delays. It also covers hazards that can occur in gate networks and their effects. The document outlines objectives like describing structural modeling, gate primitives, modeling gates, specifying delays, and hazards and their effects.
The document discusses the C programming language. It notes that C is commonly used for embedded systems as it produces efficient code and is portable across processors. The history of C is described, including its origins in the late 1960s/early 1970s at Bell Labs as a system programming language derived from B and BCPL. Examples of Hello World and Euclid's algorithm in C are provided to illustrate basic C syntax and constructs. Key aspects of C like types, expressions, functions, and memory management are summarized.
This document provides an introduction to C programming over 13 pages. It covers the purpose and schedule of the lectures, differences between C and Java, C program structure, keywords, variables, data types, and more. The main points are that the lectures will provide a crash course in C with an emphasis on differences from Java, cover practical examples and topics related to C programming, and include history, language overview, pointers, memory management, compiling and debugging.
KLEE is a symbolic virtual machine built on LLVM that generates automatic tests with high coverage by using symbolic execution and constraint solving. It is the successor to a similar tool called EXE and uses STP as its constraint solver. KLEE allows testing programs with symbolic inputs to achieve high code coverage and find bugs.
This document discusses four cool things about the D programming language: turtles all the way down scoping, a safe subset for memory safety, an approach to purity with pure functions, and generative programming using mixin for code generation. The speaker will cover each of these topics in the presentation.
The document is a presentation about optimizing algorithms using sentinel values. It discusses using sentinels to optimize linear searches, partition algorithms, and other algorithms. Sentinels allow modifying algorithms to avoid indexing and boundary checks, improving performance by up to 30% in some cases. The presentation emphasizes that introspection techniques like static if are needed to implement sentinels generically.
Walter Bright, creator of the D programming language, delivers the opening keynote of the D Programming Language Conference 2013, 1-3 May 2013, Menlo Park, CA.
For more details including a link to the talk's recording, check http://dconf.org/talks/bright.html
This document discusses gate level modeling in Verilog HDL. It covers structural modeling using gate primitives like AND, OR, NOT, etc. It describes how to instantiate gates and model combinational logic circuits. It discusses inertial and transport delays. It also covers hazards that can occur in gate networks and their effects. The document outlines objectives like describing structural modeling, gate primitives, modeling gates, specifying delays, and hazards and their effects.
The document discusses the C programming language. It notes that C is commonly used for embedded systems as it produces efficient code and is portable across processors. The history of C is described, including its origins in the late 1960s/early 1970s at Bell Labs as a system programming language derived from B and BCPL. Examples of Hello World and Euclid's algorithm in C are provided to illustrate basic C syntax and constructs. Key aspects of C like types, expressions, functions, and memory management are summarized.
This document provides an introduction to C programming over 13 pages. It covers the purpose and schedule of the lectures, differences between C and Java, C program structure, keywords, variables, data types, and more. The main points are that the lectures will provide a crash course in C with an emphasis on differences from Java, cover practical examples and topics related to C programming, and include history, language overview, pointers, memory management, compiling and debugging.
KLEE is a symbolic virtual machine built on LLVM that generates automatic tests with high coverage by using symbolic execution and constraint solving. It is the successor to a similar tool called EXE and uses STP as its constraint solver. KLEE allows testing programs with symbolic inputs to achieve high code coverage and find bugs.
These slides contain an introduction to Symbolic execution and an introduction to KLEE.
I made this for a small demo/intro for my research group's meeting.
This presentation of ROBO INDIA comprises all of the elements that must be known to learn the programming language C.
This ppt also explains all these topics in details.
We welcome all you views and queries. Please write us, we are found at-
website: http://roboindia.com
mail: info@roboindia.com
This PPT is intended to provide a thorough coverage of verilog HDL concepts based on fundamental principles of digital design. This is the basic fundamental concept for the programming of the digital electronics.
Dynamic Type Inference for Gradual Hindley–Milner TypingYusuke Miyazaki
This document describes dynamic type inference (DTI) for gradually typed languages with Hindley-Milner type inference. DTI infers types for type variables left undecided by compile-time type inference by instantiating type variables during evaluation based on the types of values. The approach is formalized in a blame calculus λBDTI that extends a simply typed lambda calculus with type variables, casts for runtime type checking, and a reduction relation for DTI. Properties like soundness and completeness of DTI and the gradual guarantee are proven for λBDTI.
Temporal logic and functional reactive programmingSergei Winitzki
In my day job, most bugs come from imperatively implemented reactive programs. Temporal Logic and FRP are declarative approaches that promise to solve my problems. I will briey review the motivations behind
and the connections between temporal logic and FRP. I propose a rather "pedestrian" approach to propositional linear-time temporal logic (LTL), showing how to perform calculations in LTL and how to synthesize programs from LTL formulas. I intend to explain why LTL largely failed to
solve the synthesis problem, and how FRP tries to cope.
FRP can be formulated as a -calculus with types given by the propositional intuitionistic LTL. I will discuss the limitations of this approach, and outline the features of FRP that are required by typical application programming scenarios. My talk will be largely self-contained and should be understandable to anyone familiar with Curry-Howard and functional programming.
What features of modern programming languages allow you to maximise creativity and express solutions to problems elegantly and efficiently. This is a summary of features of the latest languages and how they help.
EdSketch: Execution-Driven Sketching for JavaLisa Hua
Sketching is a relatively recent approach to program synthesis, which has shown much promise. The key idea in sketching is to allow users to write partial programs that have “holes” and provide test harnesses or reference implementations, and let synthesis tools create program fragments that the holes such that the resulting complete program has the desired functionality. Traditional solutions to the sketching problem perform a translation to SAT and employ CEGIS. While e ective for a range of programs, when applied to real applications, such translation-based approaches have a key limitation: they require either translating all relevant libraries that are invoked directly or indirectly by the given sketch – which can lead to impractical SAT problems – or creating models of those libraries – which can require much manual effort.
is paper introduces execution-driven sketching, a novel approach for synthesis of Java programs using a backtracking search that is commonly employed in so ware model checkers. e key novelty of our work is to introduce effective pruning strategies to effciently explore the actual program behaviors in presence of libraries and to provide a practical solution to sketching small parts of real-world applications, which may use complex constructs of modern languages, such as reflection or native calls. Our tool EdSketch embodies our approach in two forms: a stateful search based on the Java PathFinder model checker; and a stateless search based on re-execution inspired by the VeriSoft model checker. Experimental results show that EdSketch’s performance compares well with the well-known SAT-based Sketch system for a range of small but complex programs, and moreover, that EdSketch can complete some sketches that require handling complex constructs.
what engineers don't know (but probably mathematicians do)budi rahardjo
Engineers can improve the performance and efficiency of cryptographic applications by applying mathematical solutions, transformations, and tricks. For example, fast exponentiation algorithms and loop unrolling optimizations can help with the computationally intensive task of using large prime numbers in public-key cryptography. While hardware constraints of some devices pose challenges, mathematicians provide approaches like these that engineers can implement to better secure systems and products.
This talk will cover various aspects of Logic Programming. We examine Logic Programming in the contexts of Programming Languages, Mathematical Logic and Machine Learning.
We will we start with an introduction to Prolog and metaprogramming in Prolog. We will also discuss how miniKanren and Core.Logic differ from Prolog while maintaining the paradigms of logic programming.
We will then cover the Unification Algorithm in depth and examine the mathematical motivations which are rooted in Skolem Normal Form. We will describe the process of converting a statement in first order logic to clausal form logic. We will also discuss the applications of the Unification Algorithm to automated theorem proving and type inferencing.
Finally we will look at the role of Prolog in the context of Machine Learning. This is known as Inductive Logic Programming. In that context we will briefly review Decision Tree Learning and it's relationship to ILP. We will then examine Sequential Covering Algorithms for learning clauses in Propositional Calculus and then the more general FOIL algorithm for learning sets of Horn clauses in First Order Predicate Calculus. Examples will be given in both Common Lisp and Clojure for these algorithms.
Pierre de Lacaze has over 20 years’ experience with Lisp and AI based technologies. He holds a Bachelor of Science in Applied Mathematics and Computer Science and a Master’s Degree in Computer Science. He is the president of LispNYC.org
The document discusses intermediate code generation in compilers. It describes how compilers generate intermediate code representations after parsing source code. Intermediate representations allow separating the front-end and back-end of compilers, facilitating code optimization and retargeting compilers to different architectures. Common intermediate representations discussed include abstract syntax trees, postfix notation, static single assignment form, and three-address instructions. The document also provides examples of generating three-address code using syntax-directed translation.
The document discusses iterators in the C++ Standard Template Library (STL) and proposes an alternative "range-based" design without iterators. Some key points:
1. Iterators in the STL have advantages like efficiency but also drawbacks like being verbose, unsafe, and having a poor interface.
2. Ranges were introduced to address some iterator issues but still rely on iterators underlying.
3. The document proposes defining ranges as the primitive structure instead of iterators, with range primitives that do not require iteration under the hood. This could avoid iterator issues while maintaining efficiency.
4. Examples show how algorithms like find() could be defined to operate on ranges instead of iter
(chapter 1) A Concise and Practical Introduction to Programming Algorithms in...Frank Nielsen
These are the slides accompanying the textbook:
A Concise and Practical Introduction to Programming Algorithms in Java
by Frank Nielsen
Published by Springer-Verlag (2009), Undergraduate textbook in computer science (UTiCS series)
ISBN: 978-1-84882-338-9
http://www.lix.polytechnique.fr/~nielsen/JavaProgramming/
http://link.springer.com/book/10.1007%2F978-1-84882-339-6
The document provides tips for coding contests, including using consistent coding conventions, writing similar code similarly to avoid bugs, learning common code snippets, writing code on paper before typing it, leveraging standard libraries to avoid reinventing solutions, and using integrated development environments for features like autocomplete and error checking. It also discusses issues like integer overflow and underflow, properties to check for graphs, and techniques for solving geometry problems precisely using concepts like epsilon for floating point comparisons.
This document summarizes a presentation on domain-specific language features given by Ted Kaminski and Eric Van Wyk. It discusses the challenges of composable syntax and semantics when developing language extensions. Context-aware scanning is presented as a way to address challenges in scanning by communicating between the scanner and parser based on the parser's current context. Modular analyses are discussed as being important for guaranteeing the composability of language extensions.
1. A compiler translates a program written in a source language into an equivalent program in a target language. It performs analysis and synthesis phases.
2. The analysis phase includes lexical analysis, syntax analysis, and semantic analysis to create an intermediate representation.
3. The synthesis phase includes intermediate code generation, code optimization, and code generation to create the target program.
4. Compiler construction techniques are useful for many tasks beyond just compilation, such as natural language processing.
On being a professional software developerAnton Kirillov
This document discusses being a professional software developer. It begins by introducing the author and agenda. It then defines a software developer and quotes perspectives on software engineering. Subsequent sections discuss the importance of skills like mathematics and abstraction. It provides examples of data structures and algorithms applications. Sections also cover programming languages, theoretical computer science, and applied computer science. The document emphasizes lifelong learning and enjoying the developer community.
The document discusses compilers and web applications. It begins by stating that writing web applications involves many technologies like HTML, CSS, JavaScript frameworks, databases, and more. In contrast, writing a compiler mainly involves processing source code through phases like lexing, parsing, type checking, and code generation. The document focuses on the code generation and semantic analysis phases of compilers. It provides examples of Crystal code for a compiler and explains key concepts like the Program object that holds compiled program data.
The document discusses the phases of a compiler and analyzing source code semantically. It explains that semantic analysis involves processing the abstract syntax tree (AST) to perform type checking and declaration of types, methods, etc. The key phases are the top-level phase which declares classes, modules, and other top-level items, and the semantic visitor which analyzes nodes in the AST while tracking the current type and looking up declarations.
The document discusses compilers and web applications. It begins by stating that writing web applications involves many technologies like HTML, CSS, JavaScript frameworks, databases, and more. In contrast, writing a compiler mainly involves processing source code through phases like lexing, parsing, type checking, and code generation. The document focuses on the semantic analysis phase, noting it involves processing the abstract syntax tree and is easier than writing a web application since it only deals with one language rather than multiple technologies. It provides details on the Crystal compiler's implementation and organization.
A Replay Approach to Software ValidationJames Pascoe
The document discusses a replay approach to software validation using regular expressions in C++11 and Python. It describes replaying log files to recreate events and find bugs faster. It also explains how regular expressions can be used to parse log files and validate replayed logs by comparing them to the originals. Regular expressions in C++11 and Python are compatible, which is useful for cross-language validation tools.
These slides contain an introduction to Symbolic execution and an introduction to KLEE.
I made this for a small demo/intro for my research group's meeting.
This presentation of ROBO INDIA comprises all of the elements that must be known to learn the programming language C.
This ppt also explains all these topics in details.
We welcome all you views and queries. Please write us, we are found at-
website: http://roboindia.com
mail: info@roboindia.com
This PPT is intended to provide a thorough coverage of verilog HDL concepts based on fundamental principles of digital design. This is the basic fundamental concept for the programming of the digital electronics.
Dynamic Type Inference for Gradual Hindley–Milner TypingYusuke Miyazaki
This document describes dynamic type inference (DTI) for gradually typed languages with Hindley-Milner type inference. DTI infers types for type variables left undecided by compile-time type inference by instantiating type variables during evaluation based on the types of values. The approach is formalized in a blame calculus λBDTI that extends a simply typed lambda calculus with type variables, casts for runtime type checking, and a reduction relation for DTI. Properties like soundness and completeness of DTI and the gradual guarantee are proven for λBDTI.
Temporal logic and functional reactive programmingSergei Winitzki
In my day job, most bugs come from imperatively implemented reactive programs. Temporal Logic and FRP are declarative approaches that promise to solve my problems. I will briey review the motivations behind
and the connections between temporal logic and FRP. I propose a rather "pedestrian" approach to propositional linear-time temporal logic (LTL), showing how to perform calculations in LTL and how to synthesize programs from LTL formulas. I intend to explain why LTL largely failed to
solve the synthesis problem, and how FRP tries to cope.
FRP can be formulated as a -calculus with types given by the propositional intuitionistic LTL. I will discuss the limitations of this approach, and outline the features of FRP that are required by typical application programming scenarios. My talk will be largely self-contained and should be understandable to anyone familiar with Curry-Howard and functional programming.
What features of modern programming languages allow you to maximise creativity and express solutions to problems elegantly and efficiently. This is a summary of features of the latest languages and how they help.
EdSketch: Execution-Driven Sketching for JavaLisa Hua
Sketching is a relatively recent approach to program synthesis, which has shown much promise. The key idea in sketching is to allow users to write partial programs that have “holes” and provide test harnesses or reference implementations, and let synthesis tools create program fragments that the holes such that the resulting complete program has the desired functionality. Traditional solutions to the sketching problem perform a translation to SAT and employ CEGIS. While e ective for a range of programs, when applied to real applications, such translation-based approaches have a key limitation: they require either translating all relevant libraries that are invoked directly or indirectly by the given sketch – which can lead to impractical SAT problems – or creating models of those libraries – which can require much manual effort.
is paper introduces execution-driven sketching, a novel approach for synthesis of Java programs using a backtracking search that is commonly employed in so ware model checkers. e key novelty of our work is to introduce effective pruning strategies to effciently explore the actual program behaviors in presence of libraries and to provide a practical solution to sketching small parts of real-world applications, which may use complex constructs of modern languages, such as reflection or native calls. Our tool EdSketch embodies our approach in two forms: a stateful search based on the Java PathFinder model checker; and a stateless search based on re-execution inspired by the VeriSoft model checker. Experimental results show that EdSketch’s performance compares well with the well-known SAT-based Sketch system for a range of small but complex programs, and moreover, that EdSketch can complete some sketches that require handling complex constructs.
what engineers don't know (but probably mathematicians do)budi rahardjo
Engineers can improve the performance and efficiency of cryptographic applications by applying mathematical solutions, transformations, and tricks. For example, fast exponentiation algorithms and loop unrolling optimizations can help with the computationally intensive task of using large prime numbers in public-key cryptography. While hardware constraints of some devices pose challenges, mathematicians provide approaches like these that engineers can implement to better secure systems and products.
This talk will cover various aspects of Logic Programming. We examine Logic Programming in the contexts of Programming Languages, Mathematical Logic and Machine Learning.
We will we start with an introduction to Prolog and metaprogramming in Prolog. We will also discuss how miniKanren and Core.Logic differ from Prolog while maintaining the paradigms of logic programming.
We will then cover the Unification Algorithm in depth and examine the mathematical motivations which are rooted in Skolem Normal Form. We will describe the process of converting a statement in first order logic to clausal form logic. We will also discuss the applications of the Unification Algorithm to automated theorem proving and type inferencing.
Finally we will look at the role of Prolog in the context of Machine Learning. This is known as Inductive Logic Programming. In that context we will briefly review Decision Tree Learning and it's relationship to ILP. We will then examine Sequential Covering Algorithms for learning clauses in Propositional Calculus and then the more general FOIL algorithm for learning sets of Horn clauses in First Order Predicate Calculus. Examples will be given in both Common Lisp and Clojure for these algorithms.
Pierre de Lacaze has over 20 years’ experience with Lisp and AI based technologies. He holds a Bachelor of Science in Applied Mathematics and Computer Science and a Master’s Degree in Computer Science. He is the president of LispNYC.org
The document discusses intermediate code generation in compilers. It describes how compilers generate intermediate code representations after parsing source code. Intermediate representations allow separating the front-end and back-end of compilers, facilitating code optimization and retargeting compilers to different architectures. Common intermediate representations discussed include abstract syntax trees, postfix notation, static single assignment form, and three-address instructions. The document also provides examples of generating three-address code using syntax-directed translation.
The document discusses iterators in the C++ Standard Template Library (STL) and proposes an alternative "range-based" design without iterators. Some key points:
1. Iterators in the STL have advantages like efficiency but also drawbacks like being verbose, unsafe, and having a poor interface.
2. Ranges were introduced to address some iterator issues but still rely on iterators underlying.
3. The document proposes defining ranges as the primitive structure instead of iterators, with range primitives that do not require iteration under the hood. This could avoid iterator issues while maintaining efficiency.
4. Examples show how algorithms like find() could be defined to operate on ranges instead of iter
(chapter 1) A Concise and Practical Introduction to Programming Algorithms in...Frank Nielsen
These are the slides accompanying the textbook:
A Concise and Practical Introduction to Programming Algorithms in Java
by Frank Nielsen
Published by Springer-Verlag (2009), Undergraduate textbook in computer science (UTiCS series)
ISBN: 978-1-84882-338-9
http://www.lix.polytechnique.fr/~nielsen/JavaProgramming/
http://link.springer.com/book/10.1007%2F978-1-84882-339-6
The document provides tips for coding contests, including using consistent coding conventions, writing similar code similarly to avoid bugs, learning common code snippets, writing code on paper before typing it, leveraging standard libraries to avoid reinventing solutions, and using integrated development environments for features like autocomplete and error checking. It also discusses issues like integer overflow and underflow, properties to check for graphs, and techniques for solving geometry problems precisely using concepts like epsilon for floating point comparisons.
This document summarizes a presentation on domain-specific language features given by Ted Kaminski and Eric Van Wyk. It discusses the challenges of composable syntax and semantics when developing language extensions. Context-aware scanning is presented as a way to address challenges in scanning by communicating between the scanner and parser based on the parser's current context. Modular analyses are discussed as being important for guaranteeing the composability of language extensions.
1. A compiler translates a program written in a source language into an equivalent program in a target language. It performs analysis and synthesis phases.
2. The analysis phase includes lexical analysis, syntax analysis, and semantic analysis to create an intermediate representation.
3. The synthesis phase includes intermediate code generation, code optimization, and code generation to create the target program.
4. Compiler construction techniques are useful for many tasks beyond just compilation, such as natural language processing.
On being a professional software developerAnton Kirillov
This document discusses being a professional software developer. It begins by introducing the author and agenda. It then defines a software developer and quotes perspectives on software engineering. Subsequent sections discuss the importance of skills like mathematics and abstraction. It provides examples of data structures and algorithms applications. Sections also cover programming languages, theoretical computer science, and applied computer science. The document emphasizes lifelong learning and enjoying the developer community.
The document discusses compilers and web applications. It begins by stating that writing web applications involves many technologies like HTML, CSS, JavaScript frameworks, databases, and more. In contrast, writing a compiler mainly involves processing source code through phases like lexing, parsing, type checking, and code generation. The document focuses on the code generation and semantic analysis phases of compilers. It provides examples of Crystal code for a compiler and explains key concepts like the Program object that holds compiled program data.
The document discusses the phases of a compiler and analyzing source code semantically. It explains that semantic analysis involves processing the abstract syntax tree (AST) to perform type checking and declaration of types, methods, etc. The key phases are the top-level phase which declares classes, modules, and other top-level items, and the semantic visitor which analyzes nodes in the AST while tracking the current type and looking up declarations.
The document discusses compilers and web applications. It begins by stating that writing web applications involves many technologies like HTML, CSS, JavaScript frameworks, databases, and more. In contrast, writing a compiler mainly involves processing source code through phases like lexing, parsing, type checking, and code generation. The document focuses on the semantic analysis phase, noting it involves processing the abstract syntax tree and is easier than writing a web application since it only deals with one language rather than multiple technologies. It provides details on the Crystal compiler's implementation and organization.
A Replay Approach to Software ValidationJames Pascoe
The document discusses a replay approach to software validation using regular expressions in C++11 and Python. It describes replaying log files to recreate events and find bugs faster. It also explains how regular expressions can be used to parse log files and validate replayed logs by comparing them to the originals. Regular expressions in C++11 and Python are compatible, which is useful for cross-language validation tools.
Skiron - Experiments in CPU Design in DMithun Hunsur
This document discusses Skiron, an experimental CPU design project implemented in the D programming language. It provides an overview of Skiron, which simulates a RISC-inspired instruction set architecture. It describes the idioms and patterns used in D to define the instruction set and encoding in a way that is self-documenting and allows different parts of the software to stay in sync. It also discusses lessons learned, such as issues with delegates, as well as potential improvements to D's metaprogramming capabilities and standard library support for @nogc code. Realizing Skiron in hardware with an FPGA and making it self-hosting are presented as future goals.
The code example shows 10 threads concurrently manipulating shared data of 100 vectors with 10 numbers each, by randomly swapping two positions in two random vectors using Clojure's Software Transactional Memory (STM) to ensure consistency across 100,000 iterations per thread, without any numbers getting lost due to the transactions. It initializes the vectors, defines a swap and report function, runs the threads concurrently swapping values, and reports the results.
Prolog is a logic programming language invented in the 1970s. It uses a declarative programming paradigm where programs describe relations and logic, rather than algorithms. The document provides an introduction to Prolog, covering its key features like facts, rules, questions, terms, backtracking, recursion, and lists. It also discusses resolution and unification, depth first search, scope, type systems, and bindings in Prolog. Examples demonstrate implementing the Towers of Hanoi problem and a non-deterministic finite state automaton in Prolog.
The document provides an overview of being a professional software developer. It discusses that developers' essence involves computer science skills like math and abstraction. It emphasizes polyglot programming and evolving skills over time. Code samples are provided in different languages for FizzBuzz to illustrate concepts. The talk recommends enjoying community through meetups and conferences, sharing knowledge, and not fearing exploration to continuously improve skills.
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.
Similar to Generic Programming Galore Using D (20)
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
"Choosing proper type of scaling", Olena SyrotaFwdays
Imagine an IoT processing system that is already quite mature and production-ready and for which client coverage is growing and scaling and performance aspects are life and death questions. The system has Redis, MongoDB, and stream processing based on ksqldb. In this talk, firstly, we will analyze scaling approaches and then select the proper ones for our system.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
How information systems are built or acquired puts information, which is what they should be about, in a secondary place. Our language adapted accordingly, and we no longer talk about information systems but applications. Applications evolved in a way to break data into diverse fragments, tightly coupled with applications and expensive to integrate. The result is technical debt, which is re-paid by taking even bigger "loans", resulting in an ever-increasing technical debt. Software engineering and procurement practices work in sync with market forces to maintain this trend. This talk demonstrates how natural this situation is. The question is: can something be done to reverse the trend?
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
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!
The Microsoft 365 Migration Tutorial For Beginner.pptxoperationspcvita
This presentation will help you understand the power of Microsoft 365. However, we have mentioned every productivity app included in Office 365. Additionally, we have suggested the migration situation related to Office 365 and how we can help you.
You can also read: https://www.systoolsgroup.com/updates/office-365-tenant-to-tenant-migration-step-by-step-complete-guide/
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
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.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3Data Hops
Free A4 downloadable and printable Cyber Security, Social Engineering Safety and security Training Posters . Promote security awareness in the home or workplace. Lock them Out From training providers datahops.com
4. What is Generic Programming?
c 2011 Andrei Alexandrescu 4 / 33
5. What is Generic Programming?
• Find most general algorithm representation
◦ Narrowest requirements
◦ Widest guarantees
◦ Big-O() encapsulation should be a crime
◦ No need to regress to hand-written code
c 2011 Andrei Alexandrescu 4 / 33
6. What is Generic Programming?
• Find most general algorithm representation
◦ Narrowest requirements
◦ Widest guarantees
◦ Big-O() encapsulation should be a crime
◦ No need to regress to hand-written code
• Define types to implement said requirements
c 2011 Andrei Alexandrescu 4 / 33
7. What is Generic Programming?
• Find most general algorithm representation
◦ Narrowest requirements
◦ Widest guarantees
◦ Big-O() encapsulation should be a crime
◦ No need to regress to hand-written code
• Define types to implement said requirements
• Leverage the algorithm for ultimate reuse
c 2011 Andrei Alexandrescu 4 / 33
8. What is Generic Programming?
• Find most general algorithm representation
◦ Narrowest requirements
◦ Widest guarantees
◦ Big-O() encapsulation should be a crime
◦ No need to regress to hand-written code
• Define types to implement said requirements
• Leverage the algorithm for ultimate reuse
• ...
• Profit!
c 2011 Andrei Alexandrescu 4 / 33
9. What is Generic Programming?
• Find most general algorithm representation
◦ Narrowest requirements
◦ Widest guarantees
◦ Big-O() encapsulation should be a crime
◦ No need to regress to hand-written code
• Define types to implement said requirements
• Leverage the algorithm for ultimate reuse
• ...
• Profit!
´
• Arguably one of the noblest endeavors of our metier
c 2011 Andrei Alexandrescu 4 / 33
10. Generic Programming
• “Write once, instantiate anywhere”
◦ Specialized implementations welcome
• Prefers static type information and static expansion
(macro style)
• Fosters strong mathematical underpinnings
◦ Minimizing assumptions common theme in math
• Tenuous relationship with binary interfaces
• Starts with algorithms, not interfaces or objects
• “Premature encapsulation is the root of some
derangement”
c 2011 Andrei Alexandrescu 5 / 33
11. Warmup: the “dream min”
• Should work at efficiency comparable to hand-written
code
• Take variadic arguments: min(a, b, ...)
◦ Avoid nonsensical calls min() and min(a)
• Work for all ordered types and conversions
• Decline incompatible types, without prejudice
c 2011 Andrei Alexandrescu 6 / 33
12. First prototype
auto min(L, R)(L lhs, R rhs) {
return rhs < lhs ? rhs : lhs;
}
auto a = min(x, y);
• This function is as efficient as any specialized,
handwritten version (true genericity)
• Deduction for argument types and result type
c 2011 Andrei Alexandrescu 7 / 33
13. Variadic arguments
auto min(T...)(T x) {
static if (x.length > 2)
return min(min(x[0], x[1]), x[2 .. $]);
else
return x[0] > x[1] ? x[1] : x[0];
}
...
auto m = min(a + b, 100, c);
• x is not an array
• This is not classic recursion
c 2011 Andrei Alexandrescu 8 / 33
14. Reject nonsensical calls
auto min(T...)(T x) if (x.length > 1) {
...
}
• Rejects calls with 0 or 1 arguments
• Allows other overloads to take over, e.g. min element
over a collection
• More work needed
◦ Only accept types with a valid intersection
◦ Only accept types comparable with ”<”
c 2011 Andrei Alexandrescu 9 / 33
15. Common type
• Task: Given a list of types, find the common type of all
template CommonType(T...)
{
static if (T.length == 1)
alias T[0] CommonType;
else
static if (is(typeof(1 ? T[0].init : T[1].init) U))
alias CommonType!(U, T[2 .. $]) CommonType;
else
alias void CommonType;
}
// Usage
static assert(is(CommonType!(int, short, long) == long));
c 2011 Andrei Alexandrescu 10 / 33
16. Using CommonType
auto min(T...)(T x)
if (x.length > 1
&& is(typeof(CommonType!T.init < CommonType!T.init)
== bool))
{
static if (x.length > 2)
return min(min(x[0], x[1]), x[2 .. $]);
else
return x[0] > x[1] ? x[1] : x[0];
}
c 2011 Andrei Alexandrescu 11 / 33
17. How about min over many elements?
auto min(R)(R range)
if (isInputRange!R &&
is(typeof(range.front < range.front) == bool))
{
auto result = range.front;
range.popFront();
foreach (e; range) {
if (e < result) result = e;
}
return result;
}
auto m = [ 1, 5, 2, 0, 7, 9 ].min();
• Works over anything that can be iterated
c 2011 Andrei Alexandrescu 12 / 33
18. How about argmin now?
auto argmin(alias fun, R)(R r)
if (isInputRange!R &&
is(typeof(fun(r.front) < fun(r.front)) == bool))
{
auto result = r.front;
auto cache = fun(result);
r.popFront();
foreach (e; r) {
auto cand = fun(e);
if (cand > cache) continue;
result = e;
cache = cand;
}
return result;
}
c 2011 Andrei Alexandrescu 13 / 33
19. argmin
auto s = ["abc", "a", "xz"];
auto m = s.argmin!((x) => x.length);
• Works on anything iterable and any predicate
• Predicate is passed by alias
• No loss of efficiency
c 2011 Andrei Alexandrescu 14 / 33
21. Generative programming
• In brief: code that generates code
• Generic programming often requires algorithm
specialization
• Specification often present in a DSL
c 2011 Andrei Alexandrescu 16 / 33
22. Embedded DSLs
Force into host language’s syntax?
c 2011 Andrei Alexandrescu 17 / 33
23. Embedded DSLs
• Formatted printing?
c 2011 Andrei Alexandrescu 18 / 33
24. Embedded DSLs
• Formatted printing?
• Regular expressions?
c 2011 Andrei Alexandrescu 18 / 33
25. Embedded DSLs
• Formatted printing?
• Regular expressions?
• EBNF?
c 2011 Andrei Alexandrescu 18 / 33
26. Embedded DSLs
• Formatted printing?
• Regular expressions?
• EBNF?
• PEG?
c 2011 Andrei Alexandrescu 18 / 33
28. Embedded DSLs
• Formatted printing?
• Regular expressions?
• EBNF?
• PEG?
• SQL?
• . . . Pasta for everyone!
c 2011 Andrei Alexandrescu 18 / 33
29. Embedded DSLs
Here: use with native grammar
Process during compilation
Generate D code accordingly
c 2011 Andrei Alexandrescu 19 / 33
30. Compile-Time Evaluation
• A large subset of D available for compile-time evaluation
ulong factorial(uint n) {
ulong result = 1;
foreach (i; 2 .. n) result *= i;
return result;
}
...
auto f1 = factorial(10); // run-time
static f2 = factorial(10); // compile-time
c 2011 Andrei Alexandrescu 20 / 33
31. Code injection with mixin
mixin("writeln("hello, world");");
mixin(generateSomeCode());
• Not as glamorous as AST manipulation but darn
effective
• Easy to understand and debug
• Now we have compile-time evaluation AND mixin. . .
c 2011 Andrei Alexandrescu 21 / 33
39. Compile-time regular expressions
• GSoC project by Dmitry Olshansky: FReD
• Fully UTF capable, no special casing for ASCII
• Two modes sharing the same backend:
auto r1 = regex("^.*/([^/]+)/?$");
static r2 = ctRegex!("^.*/([^/]+)/?$");
• Run-time version uses intrinsics in a few places
• Static version generates specialized automaton, then
compiles it
c 2011 Andrei Alexandrescu 29 / 33
42. Summary
• Generic/generative programming—long unattained
promise
• D’s angle
◦ Powerful base language
◦ Type manipulation
◦ Compile-time evaluation
◦ Code generation
c 2011 Andrei Alexandrescu 32 / 33
43. Grill the Speaker!
More about ranges? • Thought the talk was
boring • Intriguing! • He lost me at mixin •
Awesome • Went over my head • Meh • I wonder
how I can implement binary search • What’s for
dinner? • Accent is bothersome • Real
programmers use C • Must. . . control. . . fist. . .
of. . . death. . .
c 2011 Andrei Alexandrescu 33 / 33