The document discusses key concepts in C++ including:
1. The main() function is the entry point of a C++ program and can call other functions defined in the source code.
2. main() returns an int value to the operating system. Functions can also return values and references.
3. Functions help reduce code size, save memory, and improve readability and reusability. Parameters can be passed by value or reference.
4. Inline functions provide faster execution by inserting the function code directly into the calling function. They are best for short functions without loops.
The document provides information about differences between C# and C++ programming languages. It discusses key differences in areas such as pointers, references, classes and structs, accessing native code, destruction handling, operator overloading, preprocessor directives, and exceptions. It also covers C# features like delegates, events, attributes, properties, and configuration management using XML files. The document is intended to help C++ programmers transition to C# development.
The document provides an overview of the C++ programming language. It discusses the history and development of C++, with key points being that C++ was created by Bjarne Stroustrup in 1983 as an extension of C to support object-oriented programming. It then covers some of the main differences between C and C++, uses of C++, advantages and disadvantages, standard libraries, basic C++ structures like data types, variables, operators, functions, arrays, and pointers.
This document discusses new features in C# 8.0 including readonly members, default interface methods, pattern matching enhancements, using declarations, static local functions, disposable ref structs, nullable reference types, asynchronous streams, indices and ranges, null-coalescing assignment, unmanaged constructed types, stackalloc in nested expressions, enhancement of interpolated verbatim strings, and more. It provides code examples and explanations of how to use these new features.
1. Inline functions are small functions whose code is inserted at the call site instead of generating a function call. This avoids overhead of function calls but increases code size.
2. Function overloading allows different functions to have the same name but different parameters. The compiler determines which version to call based on argument types.
3. C++ classes allow defining data types that bundle together data members and member functions that can access them. Classes support data hiding and inheritance.
Pointers,virtual functions and polymorphism cpprajshreemuthiah
This document discusses key concepts in object-oriented programming in C++ including polymorphism, pointers, pointers to objects and derived classes, virtual functions, and pure virtual functions. Polymorphism allows one name to have multiple forms through function and operator overloading as well as virtual functions. Pointers store the memory address of a variable rather than the data. Pointers can be used with objects, arrays, strings, and functions. Virtual functions allow calling a derived class version of a function through a base class pointer. Pure virtual functions define an abstract base class that cannot be instantiated.
The document discusses key concepts in C++ including:
1. The main() function is the entry point of a C++ program and can call other functions defined in the source code.
2. main() returns an int value to the operating system. Functions can also return values and references.
3. Functions help reduce code size, save memory, and improve readability and reusability. Parameters can be passed by value or reference.
4. Inline functions provide faster execution by inserting the function code directly into the calling function. They are best for short functions without loops.
The document provides information about differences between C# and C++ programming languages. It discusses key differences in areas such as pointers, references, classes and structs, accessing native code, destruction handling, operator overloading, preprocessor directives, and exceptions. It also covers C# features like delegates, events, attributes, properties, and configuration management using XML files. The document is intended to help C++ programmers transition to C# development.
The document provides an overview of the C++ programming language. It discusses the history and development of C++, with key points being that C++ was created by Bjarne Stroustrup in 1983 as an extension of C to support object-oriented programming. It then covers some of the main differences between C and C++, uses of C++, advantages and disadvantages, standard libraries, basic C++ structures like data types, variables, operators, functions, arrays, and pointers.
This document discusses new features in C# 8.0 including readonly members, default interface methods, pattern matching enhancements, using declarations, static local functions, disposable ref structs, nullable reference types, asynchronous streams, indices and ranges, null-coalescing assignment, unmanaged constructed types, stackalloc in nested expressions, enhancement of interpolated verbatim strings, and more. It provides code examples and explanations of how to use these new features.
1. Inline functions are small functions whose code is inserted at the call site instead of generating a function call. This avoids overhead of function calls but increases code size.
2. Function overloading allows different functions to have the same name but different parameters. The compiler determines which version to call based on argument types.
3. C++ classes allow defining data types that bundle together data members and member functions that can access them. Classes support data hiding and inheritance.
Pointers,virtual functions and polymorphism cpprajshreemuthiah
This document discusses key concepts in object-oriented programming in C++ including polymorphism, pointers, pointers to objects and derived classes, virtual functions, and pure virtual functions. Polymorphism allows one name to have multiple forms through function and operator overloading as well as virtual functions. Pointers store the memory address of a variable rather than the data. Pointers can be used with objects, arrays, strings, and functions. Virtual functions allow calling a derived class version of a function through a base class pointer. Pure virtual functions define an abstract base class that cannot be instantiated.
pointers, virtual functions and polymorphisms in c++ || in cppgourav kottawar
The document discusses pointers, virtual functions, and polymorphism in C++. It covers early binding/compile-time polymorphism using function overloading and operator overloading. Late binding/run-time polymorphism is achieved using virtual functions, where the appropriate function version is selected at runtime based on the object. Pointer to objects and using the arrow operator -> to access members through object pointers is described. Memory allocation for single and array objects using new is also covered.
The document discusses several built-in functions in C/C++ including fmod(), gotoxy(), putchar(), and strlen(). Fmod() returns the remainder of dividing two floating point numbers. Gotoxy() moves the cursor to a specified location on the screen. Putchar() displays a single character on screen. Strlen() returns the length of a string by counting the characters. Examples of code using each function are provided.
C# is similar to C++ but easier to use, as it does not support pointers, multiple inheritance, header files or global variables. Everything must live within a class or struct. The basic syntax will be familiar to C++ programmers. Key features include properties, interfaces, foreach loops, and delegates for event handling. Properties allow custom getter and setter logic and are preferred over public fields. Delegates provide a type-safe way to link methods, and events build on this to prevent issues with multicast delegates. Generics and assemblies are analogous to C++ templates and deployment units.
Functions allow programmers to structure C++ programs into modular segments of code to perform individual tasks. There are two types of functions: library functions and user-defined functions. User-defined functions are defined using a return type, function name, and parameters. Functions can be called by value or by reference and can also be inline, recursive, or friend functions.
1. The document discusses various concepts related to functions in C++ such as function prototypes, passing arguments by reference, default arguments, inline functions, function overloading, and friend functions.
2. It provides examples to explain concepts like passing arguments by reference allows altering the original variable values, a friend function can access private members of a class, and function overloading allows using the same function name for different tasks based on the argument types.
3. The key benefits of concepts like inline functions, passing by reference, and function overloading are also summarized.
Abstract Base Class and Polymorphism in C++Liju Thomas
Connect with me through Facebook and twitter for more details:http://www.facebook.com/lijuthomas24, http://www.twitter.com/lijuthomas24
This ppt explains the concept of abstract base class and Polymorphism in C++
This document discusses the key elements of a minimal C program, including the main function header, return statements, standard libraries, variables, input/output functions, and debugging tools. It explains that a basic C program contains an int main function within curly brackets that typically returns 0, and may include standard libraries like stdio.h for input/output. Variables are declared with data types and assigned values through statements. Common errors like syntax issues or logical bugs can be debugged using tools like gdb.
C++ allows function overloading which means defining multiple functions with the same name but different parameters. The compiler determines which definition to call based on the types of arguments passed. Functions can be overloaded based on the number or type of arguments but not the return type alone. The example demonstrates overloading the num() function to accept an int, float, or int and float as arguments.
Domain specific languages - progressive f sharp tutorials nyc 2012Phillip Trelford
The document discusses domain-specific languages (DSLs) and provides examples of using F# to define internal and external DSLs for testing. It includes an example of an internal DSL using NaturalSpec and an external DSL using Gherkin. It also lists additional resources for learning more about parsing tools like FParsec, FSLex, and FsYacc that can be used to implement DSLs in F#.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
Pure virtual function and abstract classAmit Trivedi
This document discusses pure virtual functions and abstract classes. It provides an introduction and schedule, then covers rules for virtual functions, pure virtual functions, virtual base classes, virtual destructors, abstract classes, and limitations of virtual functions. It also discusses the difference between early binding and late binding.
#OOP_D_ITS - 4th - C++ Oop And Class StructureHadziq Fabroyir
1. C++ classes represent groups of similar instances, with fields that define each instance and methods that operate on instances.
2. The document discusses class access modifiers like public and private, and how they control access to class fields and methods. It also covers class methods like accessors, mutators, and static fields.
3. Class constructors and destructors allow initialization and cleanup of class instances, running automatically when instances are created and destroyed.
Operator overloading allows operators like + and - to have different implementations depending on the types of their operands. It allows user-defined types to be manipulated using the same syntax as built-in types. The document discusses various aspects of operator overloading like overloading unary, binary, and stream insertion/extraction operators. It also covers type conversions between basic and user-defined types using constructors and conversion functions. Restrictions on which operators can be overloaded and how different conversion scenarios are handled are explained.
The document discusses constructors in C++. It explains that constructors allow objects to initialize themselves when they are created by allocating memory. The default constructor is called automatically when an object is created and has the same name as the class with no arguments and no return type. Parameterized constructors can be used to initialize objects with different values by passing arguments. Constructor overloading allows multiple constructors with different parameters. Copy constructors are used to create a new object that is a copy of an existing object. Destructors are used to destroy objects and free allocated memory.
Accessing loosely structured data from F# and C#Tomas Petricek
Slides from my talk at GOTO 2011. The presentation discusses how to bridge the impedance mismatch between the structure used in programming languages (classes, records, unions, ...) and structure used in data sources (database schema, XML file or JSON document). The talk shows how to solve this problem at three scales - using dynamic typing, by defining structure explicitly and using F# type providers.
Virtual Functions support dynamic binding and object-oriented programming. A class that declares or inherits a virtual function is called a polymorphic class.
This document provides a summary of C# versions and new features introduced in C# 7.0, 7.1, 7.2, and 7.3. It discusses features such as binary literals, digit separators, local functions, out variables, tuples, deconstruction, discards, ref returns and locals, pattern matching, expression-bodied members, throw expressions, and more. It also briefly previews some planned features for C# 8.0 like asynchronous streams/sequences, records, ranges, and nullable reference types.
The document provides an introduction to the basics of C++, including a brief history of C and C++, comparing C and C++, and providing a simple C++ "Hello World" program example. C++ was created by Bjarne Stroustrup in 1979 as an enhancement to the C language by adding object-oriented programming capabilities while still maintaining efficiency and flexibility. The document outlines some key differences between C and C++, such as C++ supporting object-oriented programming, classes, and templates while maintaining similar performance to C.
Virtual functions allow objects of derived classes to be referenced by pointers or references to the base class. This allows polymorphic behavior where calling code does not need to know the exact derived class, but the correct overridden function for that derived class will be called at runtime. Some key points:
- Virtual functions provide runtime polymorphism in C++. The correct function to call is determined by the actual object type, not the reference/pointer type.
- Pure virtual functions are declared in a base class but provide no definition - derived classes must override these to be instantiable.
- Constructors cannot be virtual but destructors can, and it is important to make base class destructors virtual to ensure proper cleanup
This document discusses using a tagless final embedded domain specific language (eDSL) approach to build a functional API for the imperative WebGL graphics library. It describes wrapping WebGL calls in IO as one solution but notes issues with separation of concerns and testing. The document then introduces tagless final as a way to define algebras that model WebGL operations and can have multiple interpreters. It provides examples of defining console, key-value store, and prompt algebras and combining them. The document concludes that tagless final allows defining interactions through algebras that can be composed, layered and have multiple interpreters for flexibility and testability while working at an extra level of abstraction.
The document outlines concepts covered in a programming languages course, including syntax and semantics, names and bindings, data types, functional programming, polymorphism, parsing and interpretation, modular programming, concurrency, and domain-specific languages. It also lists various languages as examples, such as Scala, JavaScript, C, and internal DSLs in languages like Haskell and Ruby. Finally, it discusses domain-specific languages and provides examples including spreadsheet formulas, query languages, graph layout languages, web languages, game scripting languages, and modeling languages.
pointers, virtual functions and polymorphisms in c++ || in cppgourav kottawar
The document discusses pointers, virtual functions, and polymorphism in C++. It covers early binding/compile-time polymorphism using function overloading and operator overloading. Late binding/run-time polymorphism is achieved using virtual functions, where the appropriate function version is selected at runtime based on the object. Pointer to objects and using the arrow operator -> to access members through object pointers is described. Memory allocation for single and array objects using new is also covered.
The document discusses several built-in functions in C/C++ including fmod(), gotoxy(), putchar(), and strlen(). Fmod() returns the remainder of dividing two floating point numbers. Gotoxy() moves the cursor to a specified location on the screen. Putchar() displays a single character on screen. Strlen() returns the length of a string by counting the characters. Examples of code using each function are provided.
C# is similar to C++ but easier to use, as it does not support pointers, multiple inheritance, header files or global variables. Everything must live within a class or struct. The basic syntax will be familiar to C++ programmers. Key features include properties, interfaces, foreach loops, and delegates for event handling. Properties allow custom getter and setter logic and are preferred over public fields. Delegates provide a type-safe way to link methods, and events build on this to prevent issues with multicast delegates. Generics and assemblies are analogous to C++ templates and deployment units.
Functions allow programmers to structure C++ programs into modular segments of code to perform individual tasks. There are two types of functions: library functions and user-defined functions. User-defined functions are defined using a return type, function name, and parameters. Functions can be called by value or by reference and can also be inline, recursive, or friend functions.
1. The document discusses various concepts related to functions in C++ such as function prototypes, passing arguments by reference, default arguments, inline functions, function overloading, and friend functions.
2. It provides examples to explain concepts like passing arguments by reference allows altering the original variable values, a friend function can access private members of a class, and function overloading allows using the same function name for different tasks based on the argument types.
3. The key benefits of concepts like inline functions, passing by reference, and function overloading are also summarized.
Abstract Base Class and Polymorphism in C++Liju Thomas
Connect with me through Facebook and twitter for more details:http://www.facebook.com/lijuthomas24, http://www.twitter.com/lijuthomas24
This ppt explains the concept of abstract base class and Polymorphism in C++
This document discusses the key elements of a minimal C program, including the main function header, return statements, standard libraries, variables, input/output functions, and debugging tools. It explains that a basic C program contains an int main function within curly brackets that typically returns 0, and may include standard libraries like stdio.h for input/output. Variables are declared with data types and assigned values through statements. Common errors like syntax issues or logical bugs can be debugged using tools like gdb.
C++ allows function overloading which means defining multiple functions with the same name but different parameters. The compiler determines which definition to call based on the types of arguments passed. Functions can be overloaded based on the number or type of arguments but not the return type alone. The example demonstrates overloading the num() function to accept an int, float, or int and float as arguments.
Domain specific languages - progressive f sharp tutorials nyc 2012Phillip Trelford
The document discusses domain-specific languages (DSLs) and provides examples of using F# to define internal and external DSLs for testing. It includes an example of an internal DSL using NaturalSpec and an external DSL using Gherkin. It also lists additional resources for learning more about parsing tools like FParsec, FSLex, and FsYacc that can be used to implement DSLs in F#.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
Pure virtual function and abstract classAmit Trivedi
This document discusses pure virtual functions and abstract classes. It provides an introduction and schedule, then covers rules for virtual functions, pure virtual functions, virtual base classes, virtual destructors, abstract classes, and limitations of virtual functions. It also discusses the difference between early binding and late binding.
#OOP_D_ITS - 4th - C++ Oop And Class StructureHadziq Fabroyir
1. C++ classes represent groups of similar instances, with fields that define each instance and methods that operate on instances.
2. The document discusses class access modifiers like public and private, and how they control access to class fields and methods. It also covers class methods like accessors, mutators, and static fields.
3. Class constructors and destructors allow initialization and cleanup of class instances, running automatically when instances are created and destroyed.
Operator overloading allows operators like + and - to have different implementations depending on the types of their operands. It allows user-defined types to be manipulated using the same syntax as built-in types. The document discusses various aspects of operator overloading like overloading unary, binary, and stream insertion/extraction operators. It also covers type conversions between basic and user-defined types using constructors and conversion functions. Restrictions on which operators can be overloaded and how different conversion scenarios are handled are explained.
The document discusses constructors in C++. It explains that constructors allow objects to initialize themselves when they are created by allocating memory. The default constructor is called automatically when an object is created and has the same name as the class with no arguments and no return type. Parameterized constructors can be used to initialize objects with different values by passing arguments. Constructor overloading allows multiple constructors with different parameters. Copy constructors are used to create a new object that is a copy of an existing object. Destructors are used to destroy objects and free allocated memory.
Accessing loosely structured data from F# and C#Tomas Petricek
Slides from my talk at GOTO 2011. The presentation discusses how to bridge the impedance mismatch between the structure used in programming languages (classes, records, unions, ...) and structure used in data sources (database schema, XML file or JSON document). The talk shows how to solve this problem at three scales - using dynamic typing, by defining structure explicitly and using F# type providers.
Virtual Functions support dynamic binding and object-oriented programming. A class that declares or inherits a virtual function is called a polymorphic class.
This document provides a summary of C# versions and new features introduced in C# 7.0, 7.1, 7.2, and 7.3. It discusses features such as binary literals, digit separators, local functions, out variables, tuples, deconstruction, discards, ref returns and locals, pattern matching, expression-bodied members, throw expressions, and more. It also briefly previews some planned features for C# 8.0 like asynchronous streams/sequences, records, ranges, and nullable reference types.
The document provides an introduction to the basics of C++, including a brief history of C and C++, comparing C and C++, and providing a simple C++ "Hello World" program example. C++ was created by Bjarne Stroustrup in 1979 as an enhancement to the C language by adding object-oriented programming capabilities while still maintaining efficiency and flexibility. The document outlines some key differences between C and C++, such as C++ supporting object-oriented programming, classes, and templates while maintaining similar performance to C.
Virtual functions allow objects of derived classes to be referenced by pointers or references to the base class. This allows polymorphic behavior where calling code does not need to know the exact derived class, but the correct overridden function for that derived class will be called at runtime. Some key points:
- Virtual functions provide runtime polymorphism in C++. The correct function to call is determined by the actual object type, not the reference/pointer type.
- Pure virtual functions are declared in a base class but provide no definition - derived classes must override these to be instantiable.
- Constructors cannot be virtual but destructors can, and it is important to make base class destructors virtual to ensure proper cleanup
This document discusses using a tagless final embedded domain specific language (eDSL) approach to build a functional API for the imperative WebGL graphics library. It describes wrapping WebGL calls in IO as one solution but notes issues with separation of concerns and testing. The document then introduces tagless final as a way to define algebras that model WebGL operations and can have multiple interpreters. It provides examples of defining console, key-value store, and prompt algebras and combining them. The document concludes that tagless final allows defining interactions through algebras that can be composed, layered and have multiple interpreters for flexibility and testability while working at an extra level of abstraction.
The document outlines concepts covered in a programming languages course, including syntax and semantics, names and bindings, data types, functional programming, polymorphism, parsing and interpretation, modular programming, concurrency, and domain-specific languages. It also lists various languages as examples, such as Scala, JavaScript, C, and internal DSLs in languages like Haskell and Ruby. Finally, it discusses domain-specific languages and provides examples including spreadsheet formulas, query languages, graph layout languages, web languages, game scripting languages, and modeling languages.
This document discusses C# language features from versions 1 through 6 and previews features planned for C# 7. It provides a brief history of C# and highlights key new capabilities introduced in each version such as generics, LINQ, asynchronous programming and dynamic features. It also summarizes upcoming C# 7 features like local functions, records, and pattern matching. The document aims to inform developers about the evolution of C# and new capabilities that improve productivity.
The document provides an introduction to functional programming with F#. It discusses configuring the environment, the basics of the F# language, and building a text adventure game. Some key points covered include: the differences between functional and object-oriented programming; defining values, functions, and types in F#; pattern matching; working with lists, sequences, and other data structures; and applying concepts like mapping, filtering, and piping to collections. The document concludes by proposing a final exercise to build a text adventure game using the functional programming concepts discussed.
The document discusses new features in Visual Studio 2010 and .NET Framework 4.0, including an improved IDE, new language features in C# 4.0, and the Managed Extensibility Framework. It provides examples of using Parallel LINQ, named and optional parameters in C#, and asynchronous programming in F#.
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
The document summarizes Ibis, an open source Python framework for data analysis that provides a high-level language for expressing data transformations and analytics independently of backend execution engines like Pandas or Spark. It introduces Ibis by comparing different approaches to scaling data science workflows from Pandas on a single machine to distributed systems. It then demonstrates how to express the same data preparation and analysis logic in Ibis and have it execute on different backends like Pandas or PySpark without code changes. The document shows how Ibis compilers translate expressions to backend-specific code to enable seamless transition between backends.
The document discusses reviewing object-oriented design patterns. It begins with definitions of design patterns and their history. It then covers the core tenets of OOP like encapsulation, abstraction, inheritance, polymorphism. Specific patterns like singleton, command, and dependency injection are explained with examples. The document stresses principles for good design like avoiding duplication, loose coupling, single responsibility.
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016STX Next
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
StxNext Lightning Talks - Feb 12, 2016
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice when it comes to Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and on the other - keeping short compile times.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up an Android-kotlin project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin usage is presented and the language is compared to SCALA and SWIFT.
This document introduces a domain specific language (DSL) called Zeoflow for defining data pipelines that can run on different distributed compute engines like Spark, Dataflow, and BigQuery. The DSL aims to standardize all actions in the system and separate the platform logic from the domain logic, allowing code and functionality to be reused across different runtimes. The document discusses designing the DSL to have an AST-like structure and monadic behavior. It also describes how the DSL is lifted into a Free monad to separate it from interpreters. Finally, it provides examples of writing business logic programs using the DSL and interpreting them using state monads to run on Spark.
The document discusses Java 8 lambda expressions and how they improved Java by allowing for anonymous functions. It provides examples of code before and after Java 8 that demonstrate lambda expressions providing a clearer syntax compared to anonymous inner classes. Specifically, it shows how lambda expressions allowed sorting a list of strings in a more readable way. It also discusses how functions can be treated as data by being passed as parameters or returned from other functions.
This document provides an overview of key object-oriented programming concepts including classes and objects, inheritance, encapsulation, polymorphism, interfaces, abstract classes, and design patterns. It discusses class construction and object instantiation. Inheritance is described as both exposing implementation details and potentially breaking encapsulation. Composition is presented as an alternative to inheritance. The document also covers method overriding, overloading, and duck typing as forms of polymorphism. Finally, it briefly introduces common design principles like SOLID and patterns like delegation.
The document discusses various Kotlin language features and how they are compiled down to bytecode. It explains concepts like lowering, de-sugaring, and decompiling Kotlin programs. Specific language features summarized include free functions, nested functions, extension methods, data classes, object declarations, companion objects, and lambdas with receivers. The document shows how each feature compiles by decompiling example Kotlin code.
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
This document discusses the evolution of asynchronous programming on the .NET platform. It covers early approaches using Begin/End methods and event-based patterns in .NET 1.0. It then discusses improvements with yield in .NET 2.0/C# 2.0 and async workflows in F# for .NET 3.0. It also covers the Reactive Framework for .NET 4.0 which treats asynchronous computations as push-based collections. Finally, it discusses potential future improvements in C# vNext.
The document discusses how the Kotlin compiler fakes or lies about certain Kotlin language features by decompiling the bytecode produced by the Kotlin compiler. It provides examples of how free functions, nested functions, primary constructors, extension methods, destructuring, object declarations, companion objects, enumerations, delegated properties, lambdas with receivers, and more are implemented under the hood by the compiler through bytecode tricks and deception. The document is intended to look under the hood of the Kotlin compiler and Java bytecode to understand how certain Kotlin features are implemented that don't have a direct mapping to Java.
This document summarizes a presentation about exploring SharePoint with the F# programming language. It discusses the history and characteristics of functional programming and F#, including that F# is a functional-first language developed by Microsoft Research. It also covers how to use the F# Client Object Model to connect to and query SharePoint, including loading references, creating a client context, and querying sites, lists, and list items. The presentation demonstrates iterating through lists and items and retrieving properties.
The document discusses using Go and Ruby FFI to improve performance when processing large amounts of data in parallel. It provides an example of calculating depreciation for over 500,000 vehicle data points. Calling Go code from Ruby using FFI can process the data over 10x faster than using Sidekiq alone by leveraging Go's goroutines for parallelism with less memory usage. Complexities of FFI like memory management and pointer handling are also briefly covered.
Programming Languages: some news for the last N yearsRuslan Shevchenko
This document discusses programming languages and their evolution. It covers topics like syntax, type systems, dependent types, and effects tracking. It suggests that while new academic ideas in programming languages take over a decade on average to see wider adoption, trends in industry include integrating other paradigms into mainstream languages and replacing C++ with alternatives like D or Rust. The document also questions what new academic or open source ideas may become part of industry programming in the future.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
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
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
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!
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
2. Why Use F# ?
• Less Code
• Easier to reason about the code
• Easier to multi-thread.
• You get to say “monad”
3. Why Did We Use F# : Immutability
By default, F# Record Types are immutable
type Point = {
X: int
Y: int
}
class Point
{
Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; private set; }
public int Y { get; private set; }
}
4. Why Did We Use F#: Value Equality
F# records have structural (value) equality.
Classes have reference equality by default, but can implement value equality.
type Point = {
X: int
Y: int
}
public class Point : IEquatable<Point>
{
public Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; private set; }
public int Y { get; private set; }
public bool Equals(Point other)
{
…
5. public class Point : IEquatable<Point>
{
public Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; private set; }
public int Y { get; private set; }
public bool Equals(Point other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return X == other.X && Y == other.Y;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((Point) obj);
}
public override int GetHashCode()
{
unchecked
{
return (X*397) ^ Y;
}
}
public static bool operator ==(Point left, Point right)
{
return Equals(left, right);
}
public static bool operator !=(Point left, Point right)
{
return !Equals(left, right);
}
}
6. Why Did We Use F#:
Functional is the New SOLID
(or the end/goal of SI at least)
public interface IWidgetFactory
{
Widget Create(T1 t1, T2 t2);
}
http://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/
7. Base
Type1 Type2
Base
Type1 Type2
BaseA
Type1 Type2
BaseB
Inheritance Composition
Refactored Composition
Why Did We Use F#:
Emergence of Functional Style with
Composition over Inheritance
10. Putting the Pieces Together
Requirement Technological Solution
Distributed Communication between company
server and Azure
NServiceBus
Db Access (SQL Azure) F# (Sql) Dbml Type Provider
Website (Azure) Nancy
Unit Testing FsUnit, FsCheck
Browser Aurelia
Website Security BrockAllen.MembershipReboot, IdentityServer3
11.
12. class Shipment
{
public void Depart(T1 d)
{
// mutate _state
}
public void Arrive(T2 a)
{
// mutate _state
}
private State _state
}
type Shipment {
// state of shipment: record type
}
type Operation =
Depart of T1
Arrive of T2
let depart (d: T1) (s: Shipment) : Shipment =
// departs shipment s, and returns a new
// instance of Shipment in departed state
let arrive (a: T2) (s: Shipment) : Shipment =
// arrives shipment s, and returns a new
// instance of Shipmente in arrived state
let apply (operation: Operation) (shipment: Shipment)
: Shipment =
match operation with
| Depart(d) -> depart d shipment
| Arrive(a) -> arrive a shipment
Domain Code: C# and F#
13. Domain
Shipment DB (SQL Azure)
DAL
Composition Root
Bus (NSB)
NServiceBus Handlers
Nsb to Domain Transforms
14. Domain
Shipment DB (SQL Azure)
DAL
Composition Root
type Shipment
type Operation
apply:
Shipment -> Operation -> Shipment
… other entities
Bus (NSB)
NServiceBus Handlers
(ICmd -> unit)
Nsb to Domain Transforms
ICmd -> ShipmentEntity.Operation
Sql Type Provider
type dbContext.Shipment
type Dal.Shipment
dbContext.Shipment -> Dal.Shipment ->
Domain.Shipment
C# syntax
int GetHashCode(string s)
{
...
}
F# syntax
let GetHashCode (s: string) : int =
...
or just
let GetHashCode s =
...
F# function signature
GetHashCode: string -> int
15. Domain
Shipment DB (SQL Azure)
DAL
Composition Root
type Shipment
type Operation
apply:
Shipment -> Operation -> Shipment
(ShipmentEntity.fs)
… other entities
Bus (NSB)
NServiceBus Handlers
(ICmd -> unit)
NsbHandlers.fs
Nsb to Domain Transforms
ICmd -> ShipmentEntity.Operation
(NsbToDomainTransform.fs)
Sql Type Provider
type dbContext.Shipment
type Dal.Shipment
dbContext.Shipment -> Dal.Shipment ->
Domain.Shipment
ShipmentViewModelDal.fs
16. Pattern Hints
• Making illegal states unrepresentable with single case unions.
http://fsharpforfunandprofit.com/posts/designing-with-types-making-
illegal-states-unrepresentable/
• Do not throw exceptions.
http://fsharpforfunandprofit.com/rop/
18. Resources
http://fsharpforfunandprofit.com
One of the best, practically oriented F# resources.
http://blog.ploeh.dk/
Mark Seeman’s blog. Regularly blogs on F#.
https://www.youtube.com/watch?v=MHvr71T_LZw
Domain-Driven Design, Event Sourcing and CQRS with F# and
EventStore
Syme et. al., Expert F# 4.0
Petricek, Real-World Functional Programming With Examples in F# and C#
Editor's Notes
Some blog posts related to this talk on the blog.
Why we were interested in using F# (and why you might also be interested)
What were some of the practical problems in actually getting an F# project underway.
Was it worth it?
Some commonly given reasons.
What were OUR major reaons.
Style of programming:
use of value objects (immutable with value equality)
event store like approaches
Generated by Resharper of course…
Let’s not get diverted by the less code = better issue
But: code is communication, and there is a lot of code here to communicate something (and a lot of code to go wrong).
SOLID
Single Responsibility
a class should only have one responsibility
Open/Closed
Liskov substitution
Interface Segregation
a class should not be dependent on anything more than necessary
Dependency Inversion
(e.g. a class with single responsibility of persistence or reading/writing to a db, say a repository,
one responsibility, could give it two interface roles, read, and write)
Emergence of smaller classes with less methods (but more classes)
Static methods (trying to dream up static class names when a namespace would suffice)
Linq chains (with static methods).
Mark Seeman: Role based interface/classes (ISP) following the SRP push in the direction of an interface with one method.
As composition is used more often, the reduction of specifically object-oriented features further reduces the need to be using an object oriented language
Rule of thumb: use composition over inheritance.
Some guidelines:
do not use inheritance simply because there are common set of properties between objects, unless those properties truly reflect a common model item.
do not use inheritance simply to gain access to common functionality required by two objects.
carefully consider whether you really need inheritance if you are not mutating common base state with common methods, or as directed by common methods.
if you are only using common base state, this state can still be provided as function parameters.
How do I get my distributed, website-front end project which must persist something into Azure, and using webjobs?
How do I go from that elegent F# code I keep seeing, with all the promise of no-null land and easy to reason about, to a product?
How do I go from that immutable, pure functional business, into a product which inevitably mutates something (usually the db, but inevitably some user output, unless you want a completely inert product).
Database Access (SQL)
Distributed Communication (Bus)
Website
Unit/Integration Testing
Pros
use familiar frameworks in dev and production (along with familiar prod. tooling)
Can pick up F# libraries as one feels comfortable
Cons:
C# interop code tends to be non-functional, can be messy, and is amongst the first code written
May need C# to F# anti-corruption layer between outer parts of program (where frameworks interact) and core domain code to get the full benefits of F#
Need to think about 2 styles of F#: purely functional, object-oriented/imperative. Try to keep them separate, but does put another burden on learning.
Domain code: pure functional F#
Main blocks of code.
Nature of code in each block can be quite different.
(bit on right: C#/F# syntax explanation)
Composition Root:
Includes some framework code (e.g. Nsb UnitOfWork)
Includes minimal use of IOC container, mostly because we were using Nsb and Nancy.
Most composition occurred within the handlers, or the top level Get/Post functions on the nancy module.
Keep C# interop code separate from F#
Consider anti-corruption against C#
Single Responsibility functions will tend to fall naturally into composable layers – keep the responsibilities separated.
How does one mutate the database : i.e. mutate the db based on an immutable domain.
PROJECT LAYOUT- NOTABLE FEATURES:
No directories
Typically what would go in multiple C# files goes in one F# file.
F# files must be in dependency order (NO CYCLIC DEPENDENCIES)
Single Case Unions: equivalent of forcing use of a constructor.
Exceptions are not functional. Just don’t
Cons:
Slower development time
Whether a significant factor another issue.
You are learning a new language, that comes at some cost.
Team will inevitably be at different stages of F# usage (kind of like other languages, but even more exaggerated)
C# interop: yuck.
Pros:
Benefits of immutability, value equality, functional push towards single responsibility, composition
No nulls.
Easier to refactor (I think). The strong alliance between types and functions make moving things around a whole lot easier.
No cyclic dependencies: yes really it is a good thing.
Easier to reason about code.
It will make you a better programmer. Choose your paradigm (functional/OO) and stick with it.
Either paradigm can be done in F# or C#
Both paradigms can easily coexist in one program (preferably just not together).
Focus on which one – the code as communication will be clearer.