A tour of a number of new programming languages, organized by the job they're best suited for. Presented at Philadelphia Emerging Technology for the Enterprise 2012.
This document summarizes the new features and goals of RxJS version 5, which aims to improve the modularity, performance, debugging, and extensibility of the RxJS library. Key changes include making RxJS fully modular, improving performance by reducing allocations and call stack sizes, enhancing debugging with simpler operator implementations, and allowing better extensibility through subclassing Observables and maintaining Subject bi-directionality. Simpler unit tests using marble diagrams are also highlighted.
Aplicações assíncronas no Android com Coroutines & JetpackNelson Glauber Leal
The document discusses asynchronous applications in Android using Coroutines & Jetpack. It introduces coroutines as lightweight threads that make asynchronous programming easier by replacing callbacks with suspending functions. It covers key coroutine concepts like Job, Context, Scope and Dispatcher. It also discusses how coroutines can be used with Lifecycle, ViewModel and WorkManager components in Jetpack to build asynchronous Android applications.
Lua is a lightweight scripting language that is easily embeddable. It incorporates many innovations from other languages like Python and Ruby. The document discusses Lua's core concepts including data types, tables, functions, environments, object orientation, and the C API. It provides code examples to demonstrate Lua's features like iterators, coroutines, metatables, and using Lua to configure applications by loading rules from a file.
Moore's Law may be dead, but CPUs acquire more cores every year. If you want to minimize response latency in your application, you need to use every last core - without wasting resources that would destroy performance and throughput. Traditional locks grind threads to a halt and are prone to deadlocks, and although actors provide a saner alternative, they compose poorly and are at best weakly-typed.
In this presentation, created exclusively for Scalar Conf, John reveals a new alternative to the horrors of traditional concurrency, directly comparing it to other leading approaches in Scala. Witness the beauty, simplicity, and power of declarative concurrency, as you discover how functional programming is the most practical solution to solving the tough challenges of concurrency.
This document provides an overview of Lua tables and their use as different data structures. It discusses how Lua tables can be used as arrays, hash tables, matrices, linked lists, stacks, queues, sets and more. It covers common table operations like creation, accessing and modifying elements, iterating over elements, and more. The document aims to explain how to adapt Lua tables to represent multiple data structures.
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...Philip Schwarz
Java’s records, sealed interfaces and text blocks are catching up with Scala’s case classes, sealed traits and multiline strings
Judge for yourself in this quick IDE-based visual comparison
of the Scala and Java translations of Martin Fowler’s refactored Javascript code.
This document provides an overview of ES6 features and how to set them up for use in Ruby on Rails applications. It describes key ES6 features such as let and const block scoping, template strings, destructuring assignment, default and rest parameters, loops and generators, enhanced object literals, Maps and Sets, arrow functions, modules, and classes. It then provides instructions for using the sprockets-es6 gem to transpile ES6 code to ES5 for use in Rails, as well as using Node.js and Gulp as an alternative approach.
Donner le goût du ReactiveCocoa. L’objectif de la présentation étant de nous expliquer comment migrer du code lié au KVO vers une implémentation ReactiveCocoa. Cette approche du KVO par ReactiveCocoa permet de comprendre très facilement les bases et l’intérêt de ce nouveau framework et de s’y mettre facilement et progressivement.
The document provides an overview of the ZIO library, which provides purely functional data structures and abstractions for effectful programs using monads. It describes ZIO's IO data type, which represents effectful programs that may fail, run forever, or produce a value. It also covers ZIO concepts like Refs (immutable references), Promises (asynchronous values that can be set once), and Queues (asynchronous FIFO queues for producers and consumers).
Utilizing Powerful Extensions for Analytics and OperationsNeo4j
The document discusses various ways to extend Neo4j's functionality through procedures, functions, and aggregation functions. It provides examples of loading data from external sources like databases and XML using procedures. User-defined procedures, functions, and aggregations allow custom logic to be added and invoked from Cypher. Over 400 procedures and functions are available through the APOC library for tasks like data integration, analytics, and more.
The document provides an introduction to RxJS (Reactive Extensions for JavaScript), which is a reactive programming library for asynchronous operations. It discusses key RxJS concepts like Observables, operators, and functional reactive programming. It also provides examples of using RxJS to handle events asynchronously and processing streams of data.
The GPars (Groovy Parallel Systems) project provides multiple abstractions for concurrent, parallel programming in Groovy and Java. Rather than dealing directly with threads, synchronization, and locks, or even the java.util.concurrent classes added in Java 5, the project allows you to think in terms of actors, data flows, or composable asynchronous functions (to name a few).
In this talk, I covered the basics of GPars, including what it's like to learn to use it. Although I've done a fair amount of concurrent programming, I've just started using GPars. As such, this talk should be suitable for Groovy beginners.
This document provides information about using MapKit and displaying map data in iOS applications. It discusses displaying maps, adding annotations and overlays like polygons and circles, handling gestures, and loading KML data. It includes code snippets in Objective-C for creating map views, annotations, overlays from KML, handling gestures, and displaying annotation views with custom images.
Time Series Meetup: Virtual Edition | July 2020InfluxData
This document summarizes an online meetup about anomaly detection using Median Absolute Deviation (MAD) in Flux. It includes an agenda with introductions, a talk on MAD, and time for Q&A. The talk explains how MAD works through numerical examples and uses common Flux functions like group(), drop(), median(), map(), and join(). It also provides instructions for writing custom Flux functions and packages and contributing them to the Flux codebase through testing and compilation.
ZIO: Powerful and Principled Functional Programming in ScalaWiem Zine Elabidine
This is an introduction of purely functional programming type safe abstractions that provide a variety of features for building asynchronous and concurrent applications data structures built on ZIO.
You'll learn by examples about the power of functional programming to solve the hard problems of software development in a principled, without compromises.
The perils and rewards of working on stuff that mattersAlex Payne
The document discusses the perils and rewards of working on projects that matter. It outlines four perils of taking on meaningful work: 1) dealing with the inherent difficulties of any project plus the challenges of the specific goal, 2) competing with or collaborating with established incumbents, 3) dealing with naysayers, and 4) interacting with investors. It also describes four potential rewards: 1) having a tangible positive impact, 2) an easier time recruiting others, 3) naturally gaining publicity, and 4) freely obtaining support. The document cautions that there is a major caveat to be aware of when taking on meaningful work.
The document discusses different approaches for organizing and structuring code for a web application and breaking a web application into multiple programs that communicate with each other. It begins with basic approaches like putting all code in one file or splitting into classes and files based on functionality. It then discusses more advanced approaches like using a database, cache, message queues, or remote procedure calls as the coordination point between components and how to structure applications using those approaches. It concludes by noting some additional challenges in web development like monitoring, deployment, and data management that weren't covered.
This document discusses how companies can leverage data to gain insights. It provides examples of tools that can be used to analyze data from both digital and physical touchpoints across owned, paid, and earned media. These tools, like Google Insights, Ad Planner, and Trends, can uncover insights about consumers, competitors, and what is driving brands. The document emphasizes that digital is an ecosystem and companies should identify how to use multi-channel data for optimization and understanding consumer journeys.
A presentation at Twitter's official developer conference, Chirp, about why we use the Scala programming language and how we build services in it. Provides a tour of a number of libraries and tools, both developed at Twitter and otherwise.
This speaker is a serial language enthusiast who has programmed in many languages for both work and personal projects. For their work at Twitter, they were looking to move away from primarily using Ruby due to performance and cultural issues it presented for building large systems. They settled on adopting Scala at Twitter as it met their personal criteria of being fast, functional, expressive, statically typed, concurrent, and beautiful to work with.
Introduction to Functional Programming with Scalapramode_ce
The document provides an introduction to functional programming with Scala. It outlines the following topics that will be covered: learning Scala syntax and writing simple programs; important functional programming concepts like closures, higher-order functions, purity, lazy evaluation, currying, tail calls, immutability, and type inference; and understanding the functional programming paradigm through Scala. It also provides some background information on Scala and examples of Scala code demonstrating various concepts.
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...GeeksLab Odessa
SubScript - это расширение языка Scala, добавляющее поддержку конструкций и синтаксиса аглебры общающихся процессов (Algebra of Communicating Processes, ACP). SubScript является перспективным расширением, применимым как для разработки высоконагруженных параллельных систем, так и для простых персональных приложений.
This is an quick introduction to Scalding and Monoids. Scalding is a Scala library that makes writing MapReduce jobs very easy. Monoids on the other hand promise parallelism and quality and they make some more challenging algorithms look very easy.
The talk was held at the Helsinki Data Science meetup on January 9th 2014.
Playing With Fire - An Introduction to Node.jsMike Hagedorn
node.js is an evented server-side Javascript framework powered by the Google V8 Javascript engine. It is a platform ideal for creating highly scalable web applications. It has the same simplicity of frameworks such as Sinatra, but is designed to be more peformant from the ground up. This performance is achieved by making all network I/O non blocking and all file I/O asynchronous. We will go over how that impacts the development experience, and walk through a simple web application. Javascript is foundational to this type of I/O because it is already evented by design. We will also take a brief look a similar evented frameworks such as ruby`s EventMachine.
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiInfluxData
When a large group of people change their habits, it can be tricky for infrastructures! Working from home and spending time indoor today means attending video calls and streaming movies and tv shows. This leads to increased internet traffic that can create congestion on the network infrastructure. So how do you get real-time visibility into your ISP connection? In this meetup, Mirko presents his setup based on a time series database and Raspberry Pi to better understand his ISP connection quality and speed — including upload and download speeds. Join us to discover how he does it using Telegraf, InfluxDB Cloud, Astro Pi, Telegram and Grafana! Finally, proof that your ISP connection is (or is not) as fast as it promises.
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
This reference will take you through simple and practical approach while learning C++ Programming language.
The document discusses techniques for writing readable code, including:
- Code should be easy for others to understand by using clear naming conventions, comments only where needed, and simple control flow.
- Surface-level readability can be improved through specific and unambiguous naming, consistent formatting, and avoiding overly long or generic names.
- Loops and logic should read like natural language to make the flow of execution easy to follow. This includes ordering conditional statements positively first and breaking down complex expressions.
- Code can be made more scannable through proper indentation and grouping of related lines together into blocks. Overall the goal is to minimize the time it takes someone new to understand the code.
This document discusses refactoring Java code to Clojure using macros. It provides examples of refactoring Java code that uses method chaining to equivalent Clojure code using the threading macros (->> and -<>). It also discusses other Clojure features like type hints, the doto macro, and polyglot projects using Leiningen.
The document provides an overview of several C++ concepts including basic syntax, compiling programs, argument passing, dynamic memory allocation, and object-oriented programming. It demonstrates simple C++ programs and functions. It discusses best practices like separating interface and implementation using header files. It also introduces C++ standard library features like vectors and the importance of avoiding unnecessary copying.
Async Redux Actions With RxJS - React Rally 2016Ben Lesh
Redux-observable allows combining RxJS and Redux by introducing Epics. Epics are Observable streams that handle asynchronous logic in response to Redux actions. This avoids callback hell and enables features like cancellation. An Epic takes an action stream, performs asynchronous operations like AJAX calls using RxJS, and dispatches result actions. This keeps Redux synchronous while managing complex async flows in a declarative and reusable way.
This document provides examples of functional JavaScript code using point-free style and typeclasses. It includes code snippets demonstrating:
- Composing functions using point-free style to remove unnecessary variables
- Implementing common typeclass methods like map, chain, and ap for a Container type
- Deriving typeclass instances for custom types to gain functionality like Functor, Applicative, Foldable
- Using typeclasses to compose functions operating on different container types in a uniform way
The document provides code samples but does not explain concepts in detail. It focuses on demonstrating point-free code and typeclass patterns through examples rather than performing in-depth explanations or performance analysis. Questions are provided at the end to prompt
The next version of JavaScript, ES6, is starting to arrive. Many of its features are simple enhancements to the language we already have: things like arrow functions, class syntax, and destructuring. But other features will change the way we program JavaScript, fundamentally expanding the capabilities of the language and reshaping our future codebases. In this talk we'll focus on two of these, discovering the the myriad possibilities of generators and the many tricks you can pull of with template strings.
This document provides an overview of the Scala programming language. Some key points:
- Scala runs on the Java Virtual Machine and was created by Martin Odersky at EPFL.
- It has been around since 2003 and the current stable release is 2.7.7. Release 2.8 beta 1 is due out soon.
- Scala combines object-oriented and functional programming. It has features like pattern matching, actors, XML literals, and more that differ from Java. Everything in Scala is an object.
Aplicações assíncronas no Android com Coroutines & JetpackNelson Glauber Leal
Para usufruir dos múltiplos núcleos existentes nos processadores dos smartphones atuais, podemos realizar chamadas assíncronas de modo a paralelizar o fluxo de execução da aplicação. Normalmente isso é feito por meio de threads e callbacks que acabam por adicionar uma complexidade ao código que pode comprometer sua leitura e manutenção. Nessa apresentação, veremos como utilizar a API de Coroutines do Kotlin em conjunto com diversas bibliotecas do Jetpack do Android de modo a implementar programação assíncrona forma simples e eficiente.
An introduction to cloud programming models and the Skywriting project. Talk originally given at the University of Cambridge, on 11th June 2010.
More information about the Skywriting project can be found here: http://www.cl.cam.ac.uk/netos/skywriting/
2 BytesC++ course_2014_c3_ function basics¶meters and overloadingkinan keshkeh
The document discusses functions in C++. It explains that functions can be defined in two ways: with declaration/calling/definition or with just declaration and definition. It provides examples of declaring a function that calculates the average of two numbers, calling that function, and defining the function. It also discusses local and global variables and their scopes. Finally, it lists some common predefined functions in C++ like sqrt, pow, abs, and rand.
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...Víctor Bolinches
Charla Universidad de Valencia - http://www.uv.es/
Cátedra de Capgemini 2016/17 - http://www.uv.es/capgeminiuv/sobre_nosotros.html
Asignatura : Programación avanzada y Lenguajes de programación
Título : Paradigma FP y OOP usando técnicas avanzadas de Programación
Apple's Swift has achieved the top place in Stack Overflow's "Most Loved" list of programming languages in its 2015 Developer Survey. Based on information gleaned from GitHub and Stack Overflow, analyst firm RedMonk has seen Swift's popularity ranking soar from 68 to 22 in an unprecedented 6 months.
The "Extreme Swift" event does not require advanced, or even any, knowledge of Swift. Learn about some of the more outrageous features of the language which help explain what the fuss is all about!
Never look at programming the same way again — even if you never end up writing a single line of Swift code in your life.
The document discusses the mobl programming language for building mobile web applications. Mobl is a statically-typed language that compiles to HTML and JavaScript. It aims to provide features for building reactive user interfaces and uses techniques like continuation-passing style and observables to support asynchronous programming in a synchronous-looking way. The document provides examples of coding common mobile app patterns like data binding, network requests, and user input handling in mobl.
Similar to Emerging Languages: A Tour of the Horizon (20)
"In this session, Twitter engineer Alex Payne will explore how the popular social messaging service builds scalable, distributed systems in the Scala programming language. Since 2008, Twitter has moved the development of its most critical systems to Scala, which blends object-oriented and functional programming with the power, robust tooling, and vast library support of the Java Virtual Machine. Find out how to use the Scala components that Twitter has open sourced, and learn the patterns they employ for developing core infrastructure components in this exciting and increasingly popular language."
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesAlex Payne
A whirlwind tour of the benefits of functional programming languages and how you can put them to work in your web application's architecture. Learn how to make the most of a rich type system, immutable data structures, and other features of languages like Scala, Erlang, Haskell, and OCaml. Find out where to get started with functional languages, and how they stack up when it comes to web app development.
How the technology we use to build the Web shapes the web. A look at the history, present, and future of the programming languages and tools used in web development, and how they've impacted the culture of the Web.
This document outlines the history and growth of a company from 2000 to 2007 and its plans for the future. It started with a few engineers and one operations person in 2000 and grew to over 45 employees and supported over 5,000 developers and 10,000 apps by today. Looking ahead, the company plans to improve its streaming API, OAuth support, customer support, consistency, and transparency.
The document summarizes Twitter's plans to improve its API platform. It discusses expanding the capabilities of the existing REST, Search, and Streaming APIs by adding features like per-status geolocation, Apple Push notifications, and versioning. It also outlines several new APIs in development, such as ones for address books, more streaming data types, and enhanced OAuth support. The document encourages developer feedback on Twitter's roadmap and priorities.
This document discusses the interaction design of APIs. It begins with an overview of what an API is and why the design of APIs matters to human-computer interaction researchers. The rest of the document focuses on a case study of the Twitter API, describing its features, how developers interact with it, and what makes it easy or frustrating to use. It concludes by discussing qualities of good API design, including explorability, predictability, and consistency, illustrated through additional examples.
The Twitter API: A Presentation to AdobeAlex Payne
The document summarizes Twitter's current API offerings and plans. It discusses Twitter's REST API, Search API, data mining feed, and upcoming Firehose access. Twitter plans to unify the Search and REST APIs in version 2.0 of their API and introduce community features to promote apps. The presentation provides an overview of Twitter's API history and capabilities.
The document discusses Twitter and its growth as a service. It notes that the previous week was Twitter's biggest in terms of page views and number of updates. Various topics are then discussed such as website design, communication, localization, usage examples, promotions, tracking, reporting, engineering challenges, and desired future features. The document ends by opening the discussion up to questions.
The document discusses designing APIs and lessons learned from Twitter and Stamen. It notes that most providers have adopted REST over SOAP and XML-RPC and provides an example Twitter API endpoint that returns user data in JSON format. The Twitter API itself comprises most of Twitter's web traffic, has over 1,600 developers and 400 credited applications using a variety of data formats like XML, JSON, RSS and Atom. The API was allowed to grow organically based on community feedback rather than being heavily promoted.
This document summarizes how Twitter scaled its infrastructure to handle increasing traffic loads. It describes how Twitter distributed various components like message processing, delivery, and its MySQL database across multiple servers with a total of 32 CPU cores. Traffic was initially 200-300 connections per second but spiked up to 11,000 connections per second. MySQL queries increased to 2,400 per second. To handle the higher loads, Twitter heavily cached content with memcache and denormalized databases.
Smart mobility refers to the integration of advanced technologies and innovative solutions to create efficient, sustainable, and interconnected transportation systems. It encompasses various aspects of transportation, including public transit, shared mobility services, intelligent transportation systems, electric vehicles, and connected infrastructure. Smart mobility aims to improve the overall mobility experience by leveraging data, connectivity, and automation to enhance safety, reduce congestion, optimize transportation networks, and minimize environmental impacts.
"Making .NET Application Even Faster", Sergey Teplyakov.pptxFwdays
In this talk we're going to explore performance improvement lifecycle, starting with setting the performance goals, using profilers to figure out the bottle necks, making a fix and validating that the fix works by benchmarking it. The talk will be useful for novice and seasoned .NET developers and architects interested in making their application fast and understanding how things work under the hood.
Choosing the Best Outlook OST to PST Converter: Key Features and Considerationswebbyacad software
When looking for a good software utility to convert Outlook OST files to PST format, it is important to find one that is easy to use and has useful features. WebbyAcad OST to PST Converter Tool is a great choice because it is simple to use for anyone, whether you are tech-savvy or not. It can smoothly change your files to PST while keeping all your data safe and secure. Plus, it can handle large amounts of data and convert multiple files at once, which can save you a lot of time. It even comes with 24*7 technical support assistance and a free trial, so you can try it out before making a decision. Whether you need to recover, move, or back up your data, Webbyacad OST to PST Converter is a reliable option that gives you all the support you need to manage your Outlook data effectively.
"Hands-on development experience using wasm Blazor", Furdak Vladyslav.pptxFwdays
I will share my personal experience of full-time development on wasm Blazor
What difficulties our team faced: life hacks with Blazor app routing, whether it is necessary to write JavaScript, which technology stack and architectural patterns we chose
What conclusions we made and what mistakes we committed
DefCamp_2016_Chemerkin_Yury-publish.pdf - Presentation by Yury Chemerkin at DefCamp 2016 discussing mobile app vulnerabilities, data protection issues, and analysis of security levels across different types of mobile applications.
Keynote : AI & Future Of Offensive SecurityPriyanka Aash
In the presentation, the focus is on the transformative impact of artificial intelligence (AI) in cybersecurity, particularly in the context of malware generation and adversarial attacks. AI promises to revolutionize the field by enabling scalable solutions to historically challenging problems such as continuous threat simulation, autonomous attack path generation, and the creation of sophisticated attack payloads. The discussions underscore how AI-powered tools like AI-based penetration testing can outpace traditional methods, enhancing security posture by efficiently identifying and mitigating vulnerabilities across complex attack surfaces. The use of AI in red teaming further amplifies these capabilities, allowing organizations to validate security controls effectively against diverse adversarial scenarios. These advancements not only streamline testing processes but also bolster defense strategies, ensuring readiness against evolving cyber threats.
The Zaitechno Handheld Raman Spectrometer is a powerful and portable tool for rapid, non-destructive chemical analysis. It utilizes Raman spectroscopy, a technique that analyzes the vibrational fingerprint of molecules to identify their chemical composition. This handheld instrument allows for on-site analysis of materials, making it ideal for a variety of applications, including:
Material identification: Identify unknown materials, minerals, and contaminants.
Quality control: Ensure the quality and consistency of raw materials and finished products.
Pharmaceutical analysis: Verify the identity and purity of pharmaceutical compounds.
Food safety testing: Detect contaminants and adulterants in food products.
Field analysis: Analyze materials in the field, such as during environmental monitoring or forensic investigations.
The Zaitechno Handheld Raman Spectrometer is easy to use and features a user-friendly interface. It is compact and lightweight, making it ideal for field applications. With its rapid analysis capabilities, the Zaitechno Handheld Raman Spectrometer can help you improve efficiency and productivity in your research or quality control workflows.
Connector Corner: Leveraging Snowflake Integration for Smarter Decision MakingDianaGray10
The power of Snowflake analytics enables CRM systems to improve operational efficiency, while gaining deeper insights into closed/won opportunities.
In this webinar, learn how infusing Snowflake into your CRM can quickly provide analysis for sales wins by region, product, customer segmentation, customer lifecycle—and more!
Using prebuilt connectors, we’ll show how workflows using Snowflake, Salesforce, and Zendesk tickets can significantly impact future sales.
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...Fwdays
.NET 8 brought a lot of improvements for developers and maturity to the Azure serverless container ecosystem. So, this talk will cover these changes and explain how you can apply them to your projects. Another reason for this talk is the re-invention of Serverless from a DevOps perspective as a Platform Engineering trend with Backstage and the recent Radius project from Microsoft. So now is the perfect time to look at developer productivity tooling and serverless apps from Microsoft's perspective.
Discovery Series - Zero to Hero - Task Mining Session 1DianaGray10
This session is focused on providing you with an introduction to task mining. We will go over different types of task mining and provide you with a real-world demo on each type of task mining in detail.
Self-Healing Test Automation Framework - HealeniumKnoldus Inc.
Revolutionize your test automation with Healenium's self-healing framework. Automate test maintenance, reduce flakes, and increase efficiency. Learn how to build a robust test automation foundation. Discover the power of self-healing tests. Transform your testing experience.
23. CLOJURESCRIPT
CLOJURE → JAVASCRIPT
(defmethod effect :swipe [element m]
(let [{:keys [start end time accel]} (standardize element m)]
(goog.fx.dom.Swipe. element
(apply array start)
(apply array end)
time
accel)))
DYNAMIC • FUNCTIONAL • LISP
24. DART
GOOGLE'S JAVASCRIPT REPLACEMENT
class Point {
num x, y;
Point(num this.x, num this.y);
Point scale(num factor) => new Point(x*factor, y*factor);
num distance() => Math.sqrt(x*x + y*y);
}
void main() {
Point a = new Point(2,3).scale(10);
print(a.distance());
}
CLASSES • GENERICS • OPTIONAL TYPING
25. ROY
FUNCTIONAL CODE INTO JAVASCRIPT
let traceMonad = {
return: x ->
console.log "Return:" x
x
bind: x f ->
console.log "Binding:" x
f x
}
console.log (do traceMonad
w <- 1
let x = 2
y <- 3
z <- 4
return w + x + y + z
)
MONADS • TYPE INFERENCE • PATTERN MATCHING
27. OPA
"A UNIFIED PLATFORM FOR WEB APPS"
function user_update(message x) {
line = <div class="row line">
<div class="span1 columns userpic" />
<div class="span2 columns user">{x.author}:</div>
<div class="span13 columns message">{x.text}</div>
</div>;
#conversation =+ line;
Dom.scroll_to_bottom(#conversation);
}
SOURCE-TO-SOURCE • OOP • METACLASSES
28. UR/WEB
"A DSL FOR WEB APPLICATIONS"
and imHere () =
userO <- getCookie username;
case userO of
None => return <xml>You don't have a cookie set!</xml>
| Some user =>
dml (DELETE FROM lastVisit WHERE User = {[user]});
dml (INSERT INTO lastVisit (User, When) VALUES ({[user]}, CURRENT_TIMESTAMP));
main ()
FUNCTIONAL • STATIC • METAPROGRAMMING
30. GO
REVENGE OF THE 1970s!
var sem = make(chan int, MaxOutstanding)
func handle(r *Request) {
sem <- 1 // Wait for active queue to drain.
process(r) // May take a long time.
<-sem // Done; enable next request to run.
}
func Serve(queue chan *Request) {
for {
req := <-queue
go handle(req) // Don't wait for handle to finish.
}
}
COMPILED • CONCURRENT • GARBAGE COLLECTED
31. RUST
"SAFE, CONCURRENT, PRACTICAL"
fn stringifier(from_parent: comm::port<uint>,
to_parent: comm::chan<str>) {
let mut value: uint;
do {
value = comm::recv(from_parent);
comm::send(to_parent, uint::to_str(value, 10u));
} while value != 0u;
}
COMPILED • OOP • FUNCTIONAL • STATIC
32. OOC
C + OBJECTS + MORE, COMPILING TO C99
main: func {
number := 42 // alloc an int on the stack
printf("number is %dn", number)
add(number&, 3)
printf("number is now %dn", number)
}
add: func (ptr: Int@, value: Int) {
ptr += value
}
SOURCE-TO-SOURCE • OOP • METACLASSES
34. FANCY
A DYNAMIC LANGUAGE ON RUBINIUS VM
require: "sinatra.fy"
configure: 'production with: {
disable: 'show_errors
enable: 'logging
}
before: {
"incoming request: #{request inspect}" println
}
def page: text {
"""
<h1>#{text}</h1>
"""
}
get: "/:p" do: |param| {
page: "Fancy web page: #{param}"
}
DYNAMIC • OOP • ACTORS
35. SLATE
A MODERN SMALLTALK
s@(Sequence traits) isPalindrome
[
s isEmpty
ifTrue: [True]
ifFalse: [(s first = s last) / [(s sliceFrom: 1 to: s indexLast - 1) isPalindrome]]
].
DYNAMIC • PROTOTYPES • STREAMS • MACROS
36. ELIXIR
"MODERN PROGRAMMING FOR THE ERLANG VM"
defmodule Hygiene do
defmacro interference do
quote do: var!(a) = 1
end
end
defmodule HygieneTest do
def go do
require Hygiene
a = 13
Hygiene.interference
a
end
end
DYNAMIC • PROTOCOLS • RECORDS • MACROS
42. BANDICOOT
A LANGUAGE FOR SET ALGEBRA
# selects fiction books from the input
fn Fiction(b: Books): Books
{
return b select(genre == "Fiction");
}
# calculates an average price of fiction books
fn FictionPrice(b: Books): rel {avgPrice: real}
{
# use of a temporary variable and a chained statement
res := b select(genre == "Fiction")
summary(avgPrice = avg(price, 0.0));
return res;
}
RELATIONAL • PERSISTENCY • DISTRIBUTED
43. QUIRREL
A LANGUAGE FOR ANALYTICS
clicks := load(//clicks)
views := load(//views)
clickthroughRate('page) :=
{page: 'page, ctr: count(clicks where clicks.pageId = 'page) /
count(views where views.pageId = 'page)}
clickthroughRate
[{"page":"page-4","ctr":0.5555555555555555555555555555555556},
{"page":"page-1","ctr":2.076923076923076923076923076923077}, ...]
DECLARATIVE • FUNCTIONAL • COMPOSABLE
45. WHEELER
"DIFFERENT"
transition (pattern print (string)) (action STDOUT)
print "Hello, world!"
// Hello World
"Hello, world!" print
// Hello World
transition (pattern fast car) (action print "ZOOM ZOOM")
fast car
// ZOOM ZOOM
car fast
// ZOOM ZOOM
NO VARIABLES • NO FUNCTIONS • NO OBJECTS