Explain in a simple term to start building your own Ruby DSL. This is the slide that was presented in Ruby conf 2017 bangladesh, rubybd.org. I would recommend to go through the google slide as this has some animation to help you understand how ruby code block works.
https://goo.gl/HgwbyU
The document provides information about a mentoring program run by Baabtra-Mentoring Partner including a trainee's typing speed progress over 3 weeks, jobs applied to with current statuses, an introduction to functions in Javascript covering definitions, advantages, examples, and local and global variables. Contact details for Baabtra are also provided at the end.
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD? reactima
Functional programming in JavaScript can be difficult for several reasons:
1) Imperative programming habits from loops and conditionals make functional concepts like pure functions, immutability, and function chaining hard to adopt.
2) Lack of understanding of modern JavaScript features like map, filter, reduce, and concepts like currying, partial application, and tail call optimization.
3) Unfamiliar math terms like functors, applicatives, and monads that describe functional patterns intimidate many developers.
4) Most developers want to just see code examples rather than study underlying functional concepts.
This document provides an overview of Elixir and Phoenix for Rubyists. It begins with background on Elixir, comparing it to Ruby and emphasizing its focus on concurrency, scalability and fault tolerance. It then covers Phoenix, describing it as a server-side web framework similar to Rails but with improved performance. Key differences between Phoenix and Rails highlighted are Phoenix's use of channels for real-time functionality and its clearer request cycle. The document concludes by outlining the directory structure for a new Phoenix project and promising a live coding demo of a simple Phoenix app.
This document discusses protocols in Swift. It defines a protocol as a blueprint of methods, properties, and requirements that can be adopted by classes, structures, and enumerations. Protocols like Equatable, Comparable, and CollectionType are built-in to Swift and provide common functionality. The document provides examples of built-in protocols and how protocol extensions allow adding functionality to existing protocols.
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
This presentation is about JavaScript Promise. Topics covered in this session are:
1. Asynchronous processing in JavaScript
2. Callbacks and Callback hell
3. Promises arrive in JavaScript!
4. Constructing a Promise
5. Promise states
6. Promises chaining and transformation
7. Error handling
8. Promise.all() and Promise.race()
This document provides information about a Java 8 Bootcamp training conducted by Mohamed Ben Hassine. It outlines the key topics that will be covered in the training including an introduction to lambda expressions, Java 8 Stream API, new date and time API, Nashorn JavaScript engine, and other Java 8 features. It also provides a brief history of Java releases and versions. The training will use an example project of building an employee management application to demonstrate and apply the Java 8 concepts over the course.
This document discusses callback functions in JavaScript. A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action. Callback functions allow asynchronous code execution in JavaScript by performing tasks without blocking subsequent code from running. Common examples of callbacks include functions used in event handling and asynchronous operations like AJAX requests.
Explain in a simple term to start building your own Ruby DSL. This is the slide that was presented in Ruby conf 2017 bangladesh, rubybd.org. I would recommend to go through the google slide as this has some animation to help you understand how ruby code block works.
https://goo.gl/HgwbyU
The document provides information about a mentoring program run by Baabtra-Mentoring Partner including a trainee's typing speed progress over 3 weeks, jobs applied to with current statuses, an introduction to functions in Javascript covering definitions, advantages, examples, and local and global variables. Contact details for Baabtra are also provided at the end.
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD? reactima
Functional programming in JavaScript can be difficult for several reasons:
1) Imperative programming habits from loops and conditionals make functional concepts like pure functions, immutability, and function chaining hard to adopt.
2) Lack of understanding of modern JavaScript features like map, filter, reduce, and concepts like currying, partial application, and tail call optimization.
3) Unfamiliar math terms like functors, applicatives, and monads that describe functional patterns intimidate many developers.
4) Most developers want to just see code examples rather than study underlying functional concepts.
This document provides an overview of Elixir and Phoenix for Rubyists. It begins with background on Elixir, comparing it to Ruby and emphasizing its focus on concurrency, scalability and fault tolerance. It then covers Phoenix, describing it as a server-side web framework similar to Rails but with improved performance. Key differences between Phoenix and Rails highlighted are Phoenix's use of channels for real-time functionality and its clearer request cycle. The document concludes by outlining the directory structure for a new Phoenix project and promising a live coding demo of a simple Phoenix app.
This document discusses protocols in Swift. It defines a protocol as a blueprint of methods, properties, and requirements that can be adopted by classes, structures, and enumerations. Protocols like Equatable, Comparable, and CollectionType are built-in to Swift and provide common functionality. The document provides examples of built-in protocols and how protocol extensions allow adding functionality to existing protocols.
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
This presentation is about JavaScript Promise. Topics covered in this session are:
1. Asynchronous processing in JavaScript
2. Callbacks and Callback hell
3. Promises arrive in JavaScript!
4. Constructing a Promise
5. Promise states
6. Promises chaining and transformation
7. Error handling
8. Promise.all() and Promise.race()
This document provides information about a Java 8 Bootcamp training conducted by Mohamed Ben Hassine. It outlines the key topics that will be covered in the training including an introduction to lambda expressions, Java 8 Stream API, new date and time API, Nashorn JavaScript engine, and other Java 8 features. It also provides a brief history of Java releases and versions. The training will use an example project of building an employee management application to demonstrate and apply the Java 8 concepts over the course.
This document discusses callback functions in JavaScript. A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action. Callback functions allow asynchronous code execution in JavaScript by performing tasks without blocking subsequent code from running. Common examples of callbacks include functions used in event handling and asynchronous operations like AJAX requests.
The document provides an introduction to asynchronous JavaScript. It discusses callbacks and their disadvantages like callback hell. Promises are introduced as a better way to handle asynchronous code by making it easier to write and chain asynchronous operations. Async/await is described as syntactic sugar that allows asynchronous code to be written more readably in a synchronous style using await and try/catch. Key aspects like the event loop, microtask queue, and Promise methods like all and race are explained. Overall the document aims to help understand what makes asynchronous code different and newer methods like promises and async/await that improve handling asynchronous operations in JavaScript.
Slides for the talk given at the Berlin PHP user group meetup
How to guarantee consistency of PHP GraphQL implementation to the schema definition with the help of code generation.
This course teaches you the concepts of Angular. You will learn how to utilize Components, Annotations, Views, Event Handlers, Directives and more. In Angular everything is a Component and this course takes a component-centric approach. We will use Components as the main point of discussion and you will learn about other concepts in Angular in the context of Components.
This document provides an overview of Elixir's type system and static type checking tools. It discusses why types sometimes have a bad reputation, describes Elixir's weak dynamic typing, and covers typespecs, Dialyxr static analysis, defining custom types like structs, and parametric polymorphism. The presentation aims to demonstrate how Elixir's types can help structure code and catch bugs without boilerplate or losing expressiveness.
This document introduces Elm, a functional programming language for building front-end web applications. It discusses that Elm is 4 years old, compiles to JavaScript, and focuses on simplicity and functional reactive programming. It notes Elm's characteristics like being functional, using ML syntax, immutability, and pure functions. It then compares using just JavaScript to using Elm and other options. It describes tools like the Elm compiler, package manager, and development environment. It also provides examples of Elm code for a counter app and discusses testing, effects, and JavaScript interoperability in Elm.
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.Never write another getter or equals method again.
After watching this you will be able to give answer on following Questions
What is lombok?
Why to use project Lombok?
How to integrate/plug lombok project jar with you Eclipse ID?
How to use lombok maven project?
What is @Getter/@Setter annotation in Lombok java?
How Project Lombok works?
What is @NonNull annotation?
What is @ToString annotation?
How to generate Equals and Hashcode using Lombok?
Check all lombok java example
What are the benefits/advantages of using lombok?
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
This document discusses JavaScript patterns related to error objects, the console, minimizing globals, implied globals, deleting variables, accessing the global object, the single var pattern, variable hoisting, loops, types, literals, and primitives. It provides tips on throwing errors, using the console, declaring variables, loops, type conversion, and literals versus constructors.
The introduction of Project Lombok, a combination compile-time and development-time code generator, has made Java POJO verbosity history. Add Lombok to your daily coding practices, and you won't go back.
1) The document discusses advanced JavaScript topics like hoisting, strict mode, functions as objects, prototypes, closures, and important JavaScript functions like call, apply, bind.
2) It provides examples of hoisting, strict mode, best practices for avoiding globals and type comparisons, and functions, objects, and prototypes.
3) Important JavaScript functions covered include timing functions like setTimeout and setInterval, global objects like window, location, and navigator, and newer JavaScript versions and APIs.
Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
JavaScript functions allow code to be reused and run when invoked. Functions are defined using the function keyword and name and can take parameters. To call a function, its name is written and the code inside will execute. Functions can return values and be invoked from events, code, or automatically. They allow code reuse and running code with different arguments to produce different results.
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!scalaconfjp
Macros allow code to generate code by replacing expressions during compilation. They enable simplifying code and improving efficiency. While macros are powerful, their implementation can be complex, requiring knowledge of compiler internals. The scala.meta library aims to simplify metaprogramming by representing programs as trees without losing information, making macros easier to write without deep compiler expertise.
This document discusses the benefits of using TypeScript, a superset of JavaScript that adds static type checking and compiler-checked syntax. It provides several examples of how TypeScript catches errors through type checking, such as passing arguments of the wrong type or missing required properties. It also notes that the TypeScript community has provided type declarations for thousands of JavaScript libraries to enable safer usage. While TypeScript adds types, code written in it is still valid JavaScript that can be migrated to over time without rewriting existing code.
This document provides an overview of JavaScript including:
1. How JavaScript code can be embedded in HTML pages using <script> tags internally or externally.
2. How JavaScript code is executed, with code outside of functions running on page load and code in functions only running when called.
3. The structure of JavaScript functions and how they are used to return values.
4. How external JavaScript files can be used to store common functions for reuse across multiple HTML pages.
5. The basic language elements of JavaScript like variables, data types, and operators.
Functions are blocks of code that perform tasks and can be reused. Large projects require functions to organize code and avoid repetition. Functions accept input, process it, and return output. Functions can be built-in to PHP or user-defined. User-defined functions are created using the function keyword and can accept arguments passed by value or reference. Arrays allow storing multiple values and are indexed with keys and values. Arrays can be numerically or associatively indexed.
1. The document discusses functional programming in Scala, focusing on why FP is useful, its core concepts, and tools like for-comprehensions, Try and Either.
2. It explains key FP concepts like pure functions, referential transparency, and how Scala supports both functional and imperative styles.
3. Functional programming enables testability, reusability, parallelism and comprehension through immutable data and higher-order functions. The document also covers tools like for-comprehensions for working with collections and Try/Either for handling errors in a functional way.
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
The document describes a domain specific language (DSL) for specifying tests of a MiniBar simulation using the Specter testing framework in C#. It provides an example context and specifications to test that drinking a beer does not throw an exception, that drinking 5 beers results in a $-5 balance, and that drinking more than 10 beers throws an exception indicating the user is drunk. The specifications are translated to NUnit test methods with asserts to test the MiniBar behavior.
This document discusses ways to create lightweight Ruby solutions by simplifying frameworks and components. It suggests replacing ActiveRecord with the simpler and faster Sequel ORM. It also recommends using Zepto.js instead of jQuery for mobile apps, and Rack and Sinatra to build lightweight web apps instead of full Rails applications. Benchmarks show these lightweight approaches can significantly improve performance compared to default Rails. Tools mentioned that aid lightweight development include Pow for local web serving and rbenv for Ruby version management. The document concludes by reminding developers not to see Ruby as the only solution and to consider other languages like Erlang, Scala and C++ for certain problems.
The document provides an introduction to asynchronous JavaScript. It discusses callbacks and their disadvantages like callback hell. Promises are introduced as a better way to handle asynchronous code by making it easier to write and chain asynchronous operations. Async/await is described as syntactic sugar that allows asynchronous code to be written more readably in a synchronous style using await and try/catch. Key aspects like the event loop, microtask queue, and Promise methods like all and race are explained. Overall the document aims to help understand what makes asynchronous code different and newer methods like promises and async/await that improve handling asynchronous operations in JavaScript.
Slides for the talk given at the Berlin PHP user group meetup
How to guarantee consistency of PHP GraphQL implementation to the schema definition with the help of code generation.
This course teaches you the concepts of Angular. You will learn how to utilize Components, Annotations, Views, Event Handlers, Directives and more. In Angular everything is a Component and this course takes a component-centric approach. We will use Components as the main point of discussion and you will learn about other concepts in Angular in the context of Components.
This document provides an overview of Elixir's type system and static type checking tools. It discusses why types sometimes have a bad reputation, describes Elixir's weak dynamic typing, and covers typespecs, Dialyxr static analysis, defining custom types like structs, and parametric polymorphism. The presentation aims to demonstrate how Elixir's types can help structure code and catch bugs without boilerplate or losing expressiveness.
This document introduces Elm, a functional programming language for building front-end web applications. It discusses that Elm is 4 years old, compiles to JavaScript, and focuses on simplicity and functional reactive programming. It notes Elm's characteristics like being functional, using ML syntax, immutability, and pure functions. It then compares using just JavaScript to using Elm and other options. It describes tools like the Elm compiler, package manager, and development environment. It also provides examples of Elm code for a counter app and discusses testing, effects, and JavaScript interoperability in Elm.
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.Never write another getter or equals method again.
After watching this you will be able to give answer on following Questions
What is lombok?
Why to use project Lombok?
How to integrate/plug lombok project jar with you Eclipse ID?
How to use lombok maven project?
What is @Getter/@Setter annotation in Lombok java?
How Project Lombok works?
What is @NonNull annotation?
What is @ToString annotation?
How to generate Equals and Hashcode using Lombok?
Check all lombok java example
What are the benefits/advantages of using lombok?
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
This document discusses JavaScript patterns related to error objects, the console, minimizing globals, implied globals, deleting variables, accessing the global object, the single var pattern, variable hoisting, loops, types, literals, and primitives. It provides tips on throwing errors, using the console, declaring variables, loops, type conversion, and literals versus constructors.
The introduction of Project Lombok, a combination compile-time and development-time code generator, has made Java POJO verbosity history. Add Lombok to your daily coding practices, and you won't go back.
1) The document discusses advanced JavaScript topics like hoisting, strict mode, functions as objects, prototypes, closures, and important JavaScript functions like call, apply, bind.
2) It provides examples of hoisting, strict mode, best practices for avoiding globals and type comparisons, and functions, objects, and prototypes.
3) Important JavaScript functions covered include timing functions like setTimeout and setInterval, global objects like window, location, and navigator, and newer JavaScript versions and APIs.
Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
JavaScript functions allow code to be reused and run when invoked. Functions are defined using the function keyword and name and can take parameters. To call a function, its name is written and the code inside will execute. Functions can return values and be invoked from events, code, or automatically. They allow code reuse and running code with different arguments to produce different results.
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!scalaconfjp
Macros allow code to generate code by replacing expressions during compilation. They enable simplifying code and improving efficiency. While macros are powerful, their implementation can be complex, requiring knowledge of compiler internals. The scala.meta library aims to simplify metaprogramming by representing programs as trees without losing information, making macros easier to write without deep compiler expertise.
This document discusses the benefits of using TypeScript, a superset of JavaScript that adds static type checking and compiler-checked syntax. It provides several examples of how TypeScript catches errors through type checking, such as passing arguments of the wrong type or missing required properties. It also notes that the TypeScript community has provided type declarations for thousands of JavaScript libraries to enable safer usage. While TypeScript adds types, code written in it is still valid JavaScript that can be migrated to over time without rewriting existing code.
This document provides an overview of JavaScript including:
1. How JavaScript code can be embedded in HTML pages using <script> tags internally or externally.
2. How JavaScript code is executed, with code outside of functions running on page load and code in functions only running when called.
3. The structure of JavaScript functions and how they are used to return values.
4. How external JavaScript files can be used to store common functions for reuse across multiple HTML pages.
5. The basic language elements of JavaScript like variables, data types, and operators.
Functions are blocks of code that perform tasks and can be reused. Large projects require functions to organize code and avoid repetition. Functions accept input, process it, and return output. Functions can be built-in to PHP or user-defined. User-defined functions are created using the function keyword and can accept arguments passed by value or reference. Arrays allow storing multiple values and are indexed with keys and values. Arrays can be numerically or associatively indexed.
1. The document discusses functional programming in Scala, focusing on why FP is useful, its core concepts, and tools like for-comprehensions, Try and Either.
2. It explains key FP concepts like pure functions, referential transparency, and how Scala supports both functional and imperative styles.
3. Functional programming enables testability, reusability, parallelism and comprehension through immutable data and higher-order functions. The document also covers tools like for-comprehensions for working with collections and Try/Either for handling errors in a functional way.
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
The document describes a domain specific language (DSL) for specifying tests of a MiniBar simulation using the Specter testing framework in C#. It provides an example context and specifications to test that drinking a beer does not throw an exception, that drinking 5 beers results in a $-5 balance, and that drinking more than 10 beers throws an exception indicating the user is drunk. The specifications are translated to NUnit test methods with asserts to test the MiniBar behavior.
This document discusses ways to create lightweight Ruby solutions by simplifying frameworks and components. It suggests replacing ActiveRecord with the simpler and faster Sequel ORM. It also recommends using Zepto.js instead of jQuery for mobile apps, and Rack and Sinatra to build lightweight web apps instead of full Rails applications. Benchmarks show these lightweight approaches can significantly improve performance compared to default Rails. Tools mentioned that aid lightweight development include Pow for local web serving and rbenv for Ruby version management. The document concludes by reminding developers not to see Ruby as the only solution and to consider other languages like Erlang, Scala and C++ for certain problems.
Ruby on Rails is a web application framework that is designed to make programming web applications easier and more enjoyable. It includes features like an object-relational mapper called Active Record that allows database rows to be represented as objects, conventions that reduce configuration, and support for test-driven development. Rails is built on Ruby, an interpreted object-oriented programming language, and aims to be programmer friendly and allow powerful applications to be built quickly. Several experts praise Rails for lowering the barriers to entry for programming and being a well-thought-out framework.
Ruby is an object-oriented programming language created in 1993, while Rails is a web application framework built using Ruby. The document provides an overview of Ruby and Rails, including what Rails is and its key advantages such as convention over configuration, don't repeat yourself (DRY) principles, and object-relational mapping (ORM). It also demonstrates creating a sample Rails application and using the Spree e-commerce gem.
This document provides an introduction and overview of Ruby and Ruby on Rails (RoR). It discusses that Ruby is an object-oriented programming language created in 1993, and RoR is a web application framework built on Ruby. It outlines the structure of a basic RoR application, including models, views, controllers, and databases. It also provides examples of generating scaffolds and basic RoR commands.
Ruby is a dynamic, open source programming language that was created in 1993 by Yukihiro Matsumoto who wanted to ensure that programming is simple, practical and enjoyable. It combines object-oriented and imperative programming and provides automatic memory management. Some key aspects of Ruby include being dynamically typed, following the principle of least surprise, and being multi-paradigm supporting object-oriented, functional and imperative programming.
Introduction to Ruby on Rails by Rails Core alumnus Thomas Fuchs.
Originally a 3-4 hour tutorial, 150+ slides about Rails, Ruby and the ecosystem around it.
Fast Web Applications Development with Ruby on Rails on OracleRaimonds Simanovskis
This document provides an overview of Ruby on Rails and how it can be used to develop fast web applications with an Oracle database backend. It discusses key Rails concepts like MVC architecture and Active Record. It also demonstrates how to connect Rails to Oracle using gems like ruby-oci8, activerecord-oracle_enhanced-adapter, and ruby-plsql to access Oracle data types, stored procedures, and full-text search capabilities. The document concludes with deployment options and pointers to related sessions.
The document discusses RSpec, a behavior-driven development framework for Ruby. It provides two frameworks: a story framework for describing application-level behavior and a spec framework for describing object-level behavior. The document then discusses testing Rails applications, including testing models and controllers. It provides an example of generating a model, migration, and test for a Book model.
This document provides an overview of the Ruby programming language and the Ruby on Rails web application framework. It discusses key features of Ruby like being object-oriented, dynamic, and readable. It then explains what Rails is and some of its core components like ActiveRecord, ActionPack, and ActiveSupport. The document also demonstrates how to work with models, database relationships, and migrations in Rails.
This document provides an overview of building a basic real-time chat application using Phoenix and compares it to building the same application with Rails. It demonstrates setting up routes, controllers, models, views, and channels for a Phoenix chat app, as well as the equivalent Rails code. Key differences between Phoenix and Rails like Ecto vs ActiveRecord and Phoenix channels vs ActionCable are highlighted. The document aims to build a minimum viable chat app in 15 minutes to showcase Phoenix's productivity.
An entry-level introduction to Rails (circa 1.13) I gave at Rochester on Rails. Covers the history, reasons you may use it in a project, and basic architecture.
"ClojureScript journey: from little script, to CLI program, to AWS Lambda fun...Julia Cherniak
In this talk, I’d like to show that engineer, in order to make progress, should develop its own “outside the box” thinking. Experienced programmer regardless of the language ought to look at things from various standpoints outside the commonly used paradigm. This allows her to choose the proper strategy which fits the task, customer’s requirements, saves time and money. Having our product as an example, I’d like to show new language and new methods, which are not that frequently used in the mainstream. I believe this will broaden the horizon of the conference audience.
Introduction to Rails - presented by Arman Ortegaarman o
This document provides an introduction to Ruby on Rails presented by Arman Ortega. It outlines what will be covered including an overview of Ruby and Rails, the concept of convention over configuration in Rails, and performing CRUD (create, read, update, delete) operations. It then demonstrates creating a sample blog application in Rails and provides links for additional learning resources.
This document discusses how domain-specific languages (DSLs) can be used to make Java code more readable and maintainable. It describes different types of DSLs including external and internal DSLs built with Java and scripting languages. It also discusses JetBrains MPS, a language workbench that provides a new approach for building DSLs without relying on a specific output language. DSLs allow raising the level of abstraction and separating stable and changing parts of code. Fluent APIs and internal DSLs in Java provide readability benefits, while scripting languages allow further readability through features like closures and list literals.
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)lennartkats
Modern IDEs increase developer productivity by incorporating many different kinds of editor services. These can be purely syntactic, such as syntax highlighting, code folding, and an outline for navigation; or they can be based on the language semantics, such as in-line type error reporting and resolving identifier declarations. Building all these services from scratch requires both the extensive knowledge of the sometimes complicated and highly interdependent APIs and extension mechanisms of an IDE framework, and an in-depth understanding of the structure and semantics of the targeted language. This paper describes Spoofax/IMP, a meta-tooling suite that provides high-level domain-specific languages for describing editor services, relieving editor developers from much of the framework-specific programming. Editor services are defined as composable modules of rules coupled to a modular SDF grammar. The composability provided by the SGLR parser and the declaratively defined services allows embedded languages and language extensions to be easily formulated as additional rules extending an existing language definition. The service definitions are used to generate Eclipse editor plugins. We discuss two examples: an editor plugin for WebDSL, a domain-specific language for web applications, and the embedding of WebDSL in Stratego, used for expressing the (static) semantic rules of WebDSL.
This document provides tips for optimizing Rails applications. It discusses using caching at the page, action, and fragment level. It also covers using background jobs to offload processing, optimizing database queries with includes and indexes, and leveraging assets like sprites, CSS, JavaScript minification, and gzipping. Metal and Rack middleware are presented as alternatives to Rails for high performance needs.
Ruby is a dynamic programming language that focuses on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. Ruby on Rails (Rails) is a web application framework written in Ruby that uses the model-view-controller (MVC) pattern. Rails emphasizes conventions over configurations and provides structures for working with databases, web services, and generating web pages. Everything in Ruby is an object, including basic data types, which gives the language flexibility.
Similar to RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL (20)
RubyConf Bangladesh 2017 - Core Ruby: How it worksRuby Bangladesh
This document describes the process Ruby code goes through before being executed:
1. Tokenization breaks the code into individual tokens like integers, identifiers, keywords.
2. Parsing uses grammar rules to organize the tokens into an abstract syntax tree (AST) that represents the code structure.
3. Compilation converts the AST into bytecode that the Ruby virtual machine (YARV) can execute for improved performance over interpreting the AST directly.
RubyConf Bangladesh 2017 - Speed up your API/backendRuby Bangladesh
Speed is an important feature for APIs. Measuring performance is key, using tools like ruby-prof and rack-mini-profiler. The slowest parts should be profiled and improved, such as relying more on databases and caching with Redis. Libraries may need upgrading or replacing. Background processing can help. CDNs and infrastructure can further boost speed. Benchmarking shows which solutions work best.
RubyConf Bangladesh 2017 - Which language should I chooseRuby Bangladesh
The document discusses which programming language someone should learn. It considers popular languages like Java, C++, Python, and JavaScript. It recommends choosing a language based on the types of problems someone wants to solve and their interests, rather than recommendations alone. The document emphasizes learning programming fundamentals like data structures and algorithms before focusing on a single language. It also stresses staying up to date with trends and using best practices like testing.
Rubyconf Bangladesh 2017 - Lets start coding in RubyRuby Bangladesh
This document introduces Ruby programming concepts through code examples. It covers Ruby basics like variables, numbers, strings, symbols, constants, methods, arrays, hashes, classes and modules. It also discusses the Ruby ecosystem including RVM/rbenv, RubyGems, Bundler and Git/GitHub. The document compares Ruby and Ruby on Rails, lists popular editors for Ruby and provides references for further reading.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
2. You know basic Ruby
OR get you interested to know Ruby
Feel free to ask questions
Will only scratch the surface
After this, you can write a basic Ruby DSL
Expectations
4. describe '#destroy'
context 'when resource is found'
it 'has 200 status code if logged in'
expect response to respond with 200
end
end
end
DSL ???
Test
X
5. DSL you might have seen in Ruby
describe '#destroy' do
context 'when resource is found' do
it 'has 200 status code if logged in' do
expect(response).to respond_with 200
end
end
end
RSpec
6. DSL you might have seen in Ruby
create_table :users do |t|
t.string :name
t.attachment :avatar
t.timestamps
end
DB Migrations
7. DSL you might have seen in Ruby
Rails.application.routes.draw do
root 'pages#home'
resources :pages, only: [:index, :show]
end
Rails Routing
17. class Report
def initialize(&block)
puts "Header"
instance_eval &block
puts "Footer"
end
def my_print(str)
puts str
end
end
Ruby instance_eval - 02
Report.new do
my_print "From block"
end
REPL
18. class Report
def initialize(data, &block)
@data = data; @columns = []
instance_eval &block
end
def column(column_name) @columns << column_name end
def print
@data.each { |row| @columns.each { |column| puts row[column] } }
end
end
Ruby instance_eval - 03
19. data = [
{name: 'Jitu', age: 34},
{name: 'Razeen', age: 3}
]
report = Report.new(data) do
column :name
end
report.print()
Ruby instance_eval - 03
Jitu
Razeen
REPL
20. My experience
In one of the rails project I worked on had a tons of reports, which needed the
following features
Queries, which are easy to understand and change
Filters
Pagination
Generate PDF, CSV, and email those reports
Generate graph in HTML and in PDF
21. DSL for generating reports
def index
reporter(Invoice.scoped) do
filter :title, type: :text
filter :created_at, type: :date
column :title { |invoice| link_to invoice.title, invoice }
column :total_paid, show_total: true
column :total_charged, show_total: true
column :paid
end
end
24. References
Link to this slide
Blogs
DSL QandA by Martin Fowler
Creating a Ruby DSL, by Leigh Halliday
Source code
Source codes for this slide
query_report gem
Editor's Notes
We should set the expectations that you should have from this talk. And also what I expect from the audience.
What is DSL anyway!!
It would be great if we could write in plain english to express our business logic. And business domain, that even the business people might understand.
Ruby is pretty close to a plain english language with a touch of programmer’s syntax.
You might have see these DSLs, or even used them a lot if you have worked with Rails.
DSL means Domain Specific Language. It does not mean that it is a different language where you would have to write your own parser and context free grammar. It means that your code embraces the business domain. And it is clearly understood by reading the code how the business works.