The document discusses the history and evolution of JavaScript from its origins in 1995 as a scripting language for web browsers called Mocha, to becoming JavaScript and being rewritten in a week to be more like Java, to its use today with features like classes and arrow functions. It provides an example of a LCMCalculator class written in modern JavaScript syntax to calculate the lowest common multiple of two numbers.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/2a2Djbp.
Gerard Sans explains RxJS' data architecture based on reactive programming, exploring Observables API using RxJS koans and unit tests. RxJS 5 focuses on performance and usability. Filmed at qconlondon.com.
Gerard Sans is a multi-talented Computer Science Engineer specialised in Web. He has lived and worked for all sorts of companies in Germany, Brazil, UK and Spain. He enjoys running AngularJS Labs London, mentoring AngularJS students, participating in the community, giving talks and writing technical articles at Medium.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/2a2Djbp.
Gerard Sans explains RxJS' data architecture based on reactive programming, exploring Observables API using RxJS koans and unit tests. RxJS 5 focuses on performance and usability. Filmed at qconlondon.com.
Gerard Sans is a multi-talented Computer Science Engineer specialised in Web. He has lived and worked for all sorts of companies in Germany, Brazil, UK and Spain. He enjoys running AngularJS Labs London, mentoring AngularJS students, participating in the community, giving talks and writing technical articles at Medium.
서버 개발자가 바라 본 Functional Reactive Programming with RxJava - SpringCamp2015NAVER / MusicPlatform
youtube : https://youtu.be/E_Bgv9upahI
비동기 이벤트 기반의 라이브러리로만 생각 했던 RxJava가 지금 이 시대 프로그래머에게 닥쳐 올 커다란 메시지라는 사실을 알게 된 지금. 현장에서 직접 느낀 RxJava의 본질인 Function Reactive Programming(FRP)에 대해 우리가 잘 아는 Java 이야기로 풀어 보고 ReactiveX(RxJava) 개발을 위한 서버 환경에 대한 이해와 SpringFramework, Netty에서의 RxJava를 어떻게 이용 하고 개발 했는지 공유 하고자 합니다.
Part presentation, part debate about the future of the language while touching base on the current state of the industry with respect to ES6/ES2015, and the possibilities of using it today in web applications and frameworks, the different options, and the things to keep in mind. Additionally, we will do a walk-through on the new features included in ES7/ES2016 draft, and those that are being discussed for ES8/ES2017.
Emerging Languages: A Tour of the HorizonAlex Payne
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.
Community-driven Language Design at TC39 on the JavaScript Pipeline Operator ...Igalia
By Daniel Ehrenberg.
Slides at https://docs.google.com/presentation/d/1bpvESaWtNnhXV0a95b6GWHhhqUVnGCIPcs37ngqx4Uo/edit#slide=id.g38b91fc952_0_103
Following ES6, TC39 is working with the broader JS developer community to continue evolving the JavaScript programming language. The pipeline operator `x |> f |> g` is an early stage, community-driven proposal to make it easier to compose multiple functions, inspired by similar syntax in other programming language and frameworks like RxJS. In this talk, I'll explain how TC39 works and how this proposal is being carefully developed with extensive feedback and opportunities for you to get involved.
(c) WorkerConf 2018
28th June 2018 (Dornbirn, Austria)
https://worker.sh/
Shift Remote FRONTEND: Reactivity in Vue.JS 3 - Marko Boskovic (Barrage)Shift Conference
In previous versions of Vue we needed abstracted patterns like Higher Order Components (HOC), mixins or props to implement reactivity. The new functional API gives us the ability to encapsulate and reuse logic across multiple components without those abstracted patterns.
This talk covers how to integrate D3 with SVG & Angular to create awesome visualisations, leveraging the modularity of D3 and it's data binding, with angular data binding and the reusability of directives.
Source code for this talk:
https://github.com/adamkleingit/d3-svg-angular
SOLID principles in practice: the Clean ArchitectureFabio Collini
The Clean Architecture has been formalized by Robert C. Martin in 2012, it's quite new even if it's based on the SOLID principles (presented for the first time in early 2000). The biggest benefit that we get using this architecture is the code testability, indeed it separates the application code from the code connected to external factor (that usually is more difficult to test).
In this talk we'll see a practical example of how to apply the SOLID principle, in particular, the dependency inversion.
서버 개발자가 바라 본 Functional Reactive Programming with RxJava - SpringCamp2015NAVER / MusicPlatform
youtube : https://youtu.be/E_Bgv9upahI
비동기 이벤트 기반의 라이브러리로만 생각 했던 RxJava가 지금 이 시대 프로그래머에게 닥쳐 올 커다란 메시지라는 사실을 알게 된 지금. 현장에서 직접 느낀 RxJava의 본질인 Function Reactive Programming(FRP)에 대해 우리가 잘 아는 Java 이야기로 풀어 보고 ReactiveX(RxJava) 개발을 위한 서버 환경에 대한 이해와 SpringFramework, Netty에서의 RxJava를 어떻게 이용 하고 개발 했는지 공유 하고자 합니다.
Part presentation, part debate about the future of the language while touching base on the current state of the industry with respect to ES6/ES2015, and the possibilities of using it today in web applications and frameworks, the different options, and the things to keep in mind. Additionally, we will do a walk-through on the new features included in ES7/ES2016 draft, and those that are being discussed for ES8/ES2017.
Emerging Languages: A Tour of the HorizonAlex Payne
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.
Community-driven Language Design at TC39 on the JavaScript Pipeline Operator ...Igalia
By Daniel Ehrenberg.
Slides at https://docs.google.com/presentation/d/1bpvESaWtNnhXV0a95b6GWHhhqUVnGCIPcs37ngqx4Uo/edit#slide=id.g38b91fc952_0_103
Following ES6, TC39 is working with the broader JS developer community to continue evolving the JavaScript programming language. The pipeline operator `x |> f |> g` is an early stage, community-driven proposal to make it easier to compose multiple functions, inspired by similar syntax in other programming language and frameworks like RxJS. In this talk, I'll explain how TC39 works and how this proposal is being carefully developed with extensive feedback and opportunities for you to get involved.
(c) WorkerConf 2018
28th June 2018 (Dornbirn, Austria)
https://worker.sh/
Shift Remote FRONTEND: Reactivity in Vue.JS 3 - Marko Boskovic (Barrage)Shift Conference
In previous versions of Vue we needed abstracted patterns like Higher Order Components (HOC), mixins or props to implement reactivity. The new functional API gives us the ability to encapsulate and reuse logic across multiple components without those abstracted patterns.
This talk covers how to integrate D3 with SVG & Angular to create awesome visualisations, leveraging the modularity of D3 and it's data binding, with angular data binding and the reusability of directives.
Source code for this talk:
https://github.com/adamkleingit/d3-svg-angular
SOLID principles in practice: the Clean ArchitectureFabio Collini
The Clean Architecture has been formalized by Robert C. Martin in 2012, it's quite new even if it's based on the SOLID principles (presented for the first time in early 2000). The biggest benefit that we get using this architecture is the code testability, indeed it separates the application code from the code connected to external factor (that usually is more difficult to test).
In this talk we'll see a practical example of how to apply the SOLID principle, in particular, the dependency inversion.
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.
What is ES6/ES2015, and what does it mean for Javascript development? What does the new syntax look like, and how can we use it today? Featuring side-by-side comparisons!
Slides from talk given at Ithaca Web Group and GORGES on CoffeeScript.
The focus is on explaining to people who haven't tried it yet that it's more than syntactic sugar. There are several real life code examples but they were explained verbally so they may not be super helpful if you don't know CoffeeScript yet.
It's an overview, not a tutorial.
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...Matt Moores
There are many approaches to Bayesian computation with intractable likelihoods, including the exchange algorithm, approximate Bayesian computation (ABC), thermodynamic integration, and composite likelihood. These approaches vary in accuracy as well as scalability for datasets of significant size. The Potts model is an example where such methods are required, due to its intractable normalising constant. This model is a type of Markov random field, which is commonly used for image segmentation. The dimension of its parameter space increases linearly with the number of pixels in the image, making this a challenging application for scalable Bayesian computation. My talk will introduce various algorithms in the context of the Potts model and describe their implementation in C++, using OpenMP for parallelism. I will also discuss the process of releasing this software as an open source R package on the CRAN repository.
Clojure is a new dialect of LISP that runs on the Java Virtual Machine (JVM). As a functional language, it offers great benefits in terms of programmer productivity; as a language that runs on the JVM, it also offers the opportunity to reuse existing Java libraries. Simon’s interest is in using Clojure to build desktop applications with the Java Swing GUI library. In this presentation Simon discusses how the power of Clojure can be applied to Swing, and whether it hits the sweet spot.
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.
This contains all the slides used in Silicon Valley Code Camp presentation on Sunday Oct 4, 10:45 session on "Amazing new features in JavaScript". At the end ut also includes the last year presentation covering ES 5
As present at FluentConf 2014 on March 11th, 2014.
AngularJS is one of the most popular, and powerful, JavaScript frameworks for building rich client-side applications. AngularJS is both simultaneously both simple to use and extremely full featured. With AngularJS a little goes a long way, but to make the most of it, you need to know what you’re doing.
In this workshop we will build a complex application to help exercise all of the salient points of the AngularJS framework.
Topics covered include, ngResource, directives, fitlers, routing, templates, controllers, testing, and more.
Code can be found at: https://github.com/markbates/fluent-2014
Presented at LA Ruby Conf on February 8th, 2014. A high level overview of Go, golang, and how it relates to Ruby. Packages such as Martini, Lineman.js, sqlx, Ginkgo, and more are covered.
Presented at RubyConf 11/10/2013
Introduced in Ruby 2.0, TracePoint is meant to help developers better instrument their code for debugging and performance reasons, but there's more to TracePoint than that!
In this talk we'll learn about TracePoint while building several example projects. Once we know the basics we'll use TracePoint to do things to Ruby that we couldn't have done otherwise.
By the end of this talk you'll be able to frighten and amaze your friends when you show them things like true abstract classes and interfaces in Ruby, just like Java! Yikes!
The world of JavaScript client-side frameworks is overflowing with contenders vying for the crown, but which one do you choose for your next project? Which one has what it takes?
In this talk we’ll look at the “Big 3”, AngularJS, Ember.js, and Backbone.js. We’ll compare them head to head, toe to toe. We’ll look at the pros and cons of each one. How do they handle form bindings? Talking to APIs? Code organization? Routing? Etc?
Who’ll come out victorious in this battle of the JavaScript frameworks, or will we all just come out bloodied and bruised on the other side? Guess we’ll find out!
Presented at Confoo (Montreal, Cananda)
Let's spend some time seeing how easy it can be to set up Mocha and Chai, a testing framework for JavaScript/CoffeeScript, in your application. We'll learn how to test that our jQuery or Backbone code is doing what it supposed to. It's really not as hard as you think it might be.
Presented at Confoo (Montreal, Canada) on 3/1/2013
In this talk I’ll show you how to build your application and get a working, well tested, and useable API in the process, with almost no extra overhead. I’ll also show you how to do it without making your controllers a mess of respond_to blocks. If anything, you’re controllers will become cleaner and leaner.
Presented on 8/14/2012 at BostonRb. This talk provides a nice intro and overview of what RubyMotion is and whether or not it's worth incorporating into your development toolkit.
Testing JavaScript/CoffeeScript with Mocha and ChaiMark
Presented at the Burlington Ruby Conference on July 28th.
Learn just how easy it is to test your JavaScript and CoffeeScript code. Don't be scared by events, DOM interactions, or AJAX requests any more!
Testing your JavaScript and/or CofffeeScript applications is not nearly as difficult as you think. Learn how to quickly setup Jasmine in your Rails application and start testing your *script applications now!
A fun filled tour through distributed programming with the Ruby standard library.
Presented on February 2nd, 2012 at RubyFuza in Cape Town, South Africa.
Distributed Programming with Ruby/Rubyconf 2010Mark
This talk will guide you through the various different aspects of building distributed applications with Ruby. While this talk will not do a deep dive into any technology we will look at libraries that ship with Ruby, such as DRb and Rinda, as well as other 3rd party libraries that are available, during the discussion and examples. We'll talk about remote method invocation (RMI), message queues, asynchronous tasks, map reduce, and background jobs, just to name a few. The discussion will include what those terms all mean and when and where you may want to use a particular technology.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
8. “I need to come up with a scripting language
for web browsers.
I know! I'll make it cool and Lispy!”
Dramatic Re-enactment (1995)
Friday, June 7, 13
10. “Yeah, So... Java is getting really popular.
So we're going to need you to rewrite your
language into something a bit more Java-
esque and name it something like JavaScript.
Yeah, and we're going to need it in a week.
Thanks, that'd be great.”
Dramatic Re-enactment (1995)
Friday, June 7, 13
11. function
LCMCalculator(x,
y)
{
var
checkInt
=
function(x)
{
if
(x
%
1
!==
0)
{
throw
new
TypeError(x
+
"
is
not
an
integer");
}
return
x;
};
this.a
=
checkInt(x)
this.b
=
checkInt(y);
}
LCMCalculator.prototype
=
{
constructor:
LCMCalculator,
gcd:
function()
{
var
a
=
Math.abs(this.a),
b
=
Math.abs(this.b),
t;
if
(a
<
b)
{
t
=
b;
b
=
a;
a
=
t;
}
while
(b
!==
0)
{
t
=
b;
b
=
a
%
b;
a
=
t;
}
this['gcd']
=
function()
{
return
a;
};
return
a;
},
"lcm":
function()
{
var
lcm
=
this.a
/
this.gcd()
*
this.b;
this.lcm
=
function()
{
return
lcm;
};
return
lcm;
},
toString:
function()
{
return
"LCMCalculator:
a
=
"
+
this.a
+
",
b
=
"
+
this.b;
}
};
function
output(x)
{
document.body.appendChild(document.createTextNode(x));
document.body.appendChild(document.createElement('br'));
}
[
[25,
55],
[21,
56],
[22,
58],
[28,
56]
].map(function(pair)
{
return
new
LCMCalculator(pair[0],
pair[1]);
}).sort(function(a,
b)
{
return
a.lcm()
-‐
b.lcm();
}).forEach(function(obj)
{
output(obj
+
",
gcd
=
"
+
obj.gcd()
+
",
lcm
=
"
+
obj.lcm());
});
Friday, June 7, 13
14. function
LCMCalculator(x,
y)
{
var
checkInt
=
function(x)
{
if
(x
%
1
!==
0)
{
throw
new
TypeError(x
+
"
is
not
an
integer");
}
return
x;
};
this.a
=
checkInt(x)
this.b
=
checkInt(y);
}
LCMCalculator.prototype
=
{
constructor:
LCMCalculator,
gcd:
function()
{
var
a
=
Math.abs(this.a),
b
=
Math.abs(this.b),
t;
if
(a
<
b)
{
t
=
b;
b
=
a;
a
=
t;
}
while
(b
!==
0)
{
t
=
b;
b
=
a
%
b;
a
=
t;
}
this['gcd']
=
function()
{
return
a;
};
return
a;
},
"lcm":
function()
{
var
lcm
=
this.a
/
this.gcd()
*
this.b;
this.lcm
=
function()
{
return
lcm;
};
return
lcm;
},
toString:
function()
{
return
"LCMCalculator:
a
=
"
+
this.a
+
",
b
=
"
+
this.b;
}
};
function
output(x)
{
document.body.appendChild(document.createTextNode(x));
document.body.appendChild(document.createElement('br'));
}
[
[25,
55],
[21,
56],
[22,
58],
[28,
56]
].map(function(pair)
{
return
new
LCMCalculator(pair[0],
pair[1]);
}).sort(function(a,
b)
{
return
a.lcm()
-‐
b.lcm();
}).forEach(function(obj)
{
output(obj
+
",
gcd
=
"
+
obj.gcd()
+
",
lcm
=
"
+
obj.lcm());
});
Friday, June 7, 13
15. class
LCMCalculator
constructor:
(x,
y)
-‐>
checkInt
=
(x)
-‐>
if
x
%
1
isnt
0
throw
new
TypeError(x
+
"
is
not
an
integer")
return
x
@a
=
checkInt(x)
@b
=
checkInt(y)
gcd:
-‐>
a
=
Math.abs(@a)
b
=
Math.abs(@b)
t
=
undefined
if
a
<
b
t
=
b
b
=
a
a
=
t
while
b
isnt
0
t
=
b
b
=
a
%
b
a
=
t
this["gcd"]
=
-‐>
a
return
a
lcm:
-‐>
lcm
=
@a
/
@gcd()
*
@b
@lcm
=
-‐>
lcm
return
lcm
toString:
-‐>
"LCMCalculator:
a
=
#{@a},
b
=
#{@b}"
output
=
(x)
-‐>
document.body.appendChild
document.createTextNode(x)
document.body.appendChild
document.createElement("br")
[[25,
55],
[21,
56],
[22,
58],
[28,
56]].map((pair)
-‐>
new
LCMCalculator(pair[0],
pair[1])
).sort((a,
b)
-‐>
a.lcm()
-‐
b.lcm()
).forEach
(obj)
-‐>
output
"obj
#{gcd}
=
#{obj.gcd()},
lcm
=
#{obj.lcm()}"
Friday, June 7, 13
18. “A little language that compiles into JavaScript.”
What is CoffeeScript?
Friday, June 7, 13
19. “A little language that compiles into JavaScript.”
Easily integrates with your current JavaScript
What is CoffeeScript?
Friday, June 7, 13
20. “A little language that compiles into JavaScript.”
Easily integrates with your current JavaScript
Easier to read, write, maintain, refactor, etc...
What is CoffeeScript?
Friday, June 7, 13
21. “A little language that compiles into JavaScript.”
Easily integrates with your current JavaScript
Easier to read, write, maintain, refactor, etc...
A Hybrid languages like Ruby and Python.
What is CoffeeScript?
Friday, June 7, 13
22. “A little language that compiles into JavaScript.”
Easily integrates with your current JavaScript
Easier to read, write, maintain, refactor, etc...
A Hybrid languages like Ruby and Python.
Helpful.
What is CoffeeScript?
Friday, June 7, 13
23. Not Magic!
Limited by what JavaScript can already do
What CoffeeScript Is
Not?
Friday, June 7, 13
24. “I’m happy writing JavaScript.
I don’t need to learn another language.”
Friday, June 7, 13
28. .MODEL SMALL
.STACK 64
.DATA
VAL1 DB 01H
VAL2 DB 01H
LP DB 00H
V1 DB 00H
V2 DB 00H
NL DB 0DH,0AH,'$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV AH,01H
INT 21H
MOV CL,AL
SUB CL,30H
SUB CL,2
MOV AH,02H
MOV DL,VAL1
ADD DL,30H
INT 21H
MOV AH,09H
LEA DX,NL
INT 21H
MOV AH,02H
MOV DL,VAL2
ADD DL,30H
INT 21H
MOV AH,09H
LEA DX,NL
INT 21H
DISP:
MOV BL,VAL1
ADD BL,VAL2
MOV AH,00H
MOV AL,BL
MOV LP,CL
MOV CL,10
DIV CL
MOV CL,LP
MOV V1,AL
MOV V2,AH
MOV DL,V1
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,V2
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,VAL2
MOV VAL1,DL
MOV VAL2,BL
MOV AH,09H
LEA DX,NL
INT 21H
LOOP DISP
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
Friday, June 7, 13
29. .MODEL SMALL
.STACK 64
.DATA
VAL1 DB 01H
VAL2 DB 01H
LP DB 00H
V1 DB 00H
V2 DB 00H
NL DB 0DH,0AH,'$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV AH,01H
INT 21H
MOV CL,AL
SUB CL,30H
SUB CL,2
MOV AH,02H
MOV DL,VAL1
ADD DL,30H
INT 21H
MOV AH,09H
LEA DX,NL
INT 21H
MOV AH,02H
MOV DL,VAL2
ADD DL,30H
INT 21H
MOV AH,09H
LEA DX,NL
INT 21H
DISP:
MOV BL,VAL1
ADD BL,VAL2
MOV AH,00H
MOV AL,BL
MOV LP,CL
MOV CL,10
DIV CL
MOV CL,LP
MOV V1,AL
MOV V2,AH
MOV DL,V1
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,V2
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,VAL2
MOV VAL1,DL
MOV VAL2,BL
MOV AH,09H
LEA DX,NL
INT 21H
LOOP DISP
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
Assembly
Friday, June 7, 13
30. #include <stdio.h>
int fibonacci()
{
int n = 100;
int a = 0;
int b = 1;
int sum;
int i;
for (i = 0; i < n; i++)
{
printf("%dn", a);
sum = a + b;
a = b;
b = sum;
}
return 0;
}
C
Friday, June 7, 13
31. public static void fibonacci() {
int n = 100;
int a = 0;
int b = 1;
for (int i = 0; i < n; i++) {
System.out.println(a);
a = a + b;
b = a - b;
}
}
Java
Friday, June 7, 13
32. def fibonacci
a = 0
b = 1
100.times do
printf("%dn", a)
a, b = b, a + b
end
end
Ruby
Friday, June 7, 13
33. “I can write an app just as well in Java
as I can in Ruby, but damn it if Ruby
isn’t nicer to read and write!”
Friday, June 7, 13
36. $(function() {
success = function(data) {
if (data.errors != null) {
alert("There was an error!");
} else {
$("#content").text(data.message);
}
};
$.get('/users', success, 'json');
});
$ ->
success = (data) ->
if data.errors?
alert "There was an error!"
else
$("#content").text(data.message)
$.get('/users', success, 'json')
JavaScript CoffeeScript
Friday, June 7, 13
37. Syntax Rules
No semi-colons (ever!)
No curly braces*
No ‘function’ keyword
Relaxed parentheses
Whitespace significant formatting
Friday, June 7, 13
38. # Not required without arguments:
noArg1 = ->
# do something
# Not required without arguments:
noArg2 = () ->
# do something
# Required with Arguments:
withArg = (arg) ->
# do something
Parentheses Rules
# Required without arguments:
noArg1()
noArg2()
# Not required with
arguments:
withArg("bar")
withArg "bar"
Friday, June 7, 13
51. Functions
p = (name) ->
console.log "Hello #{name}"
p('FluentConf 2013')
Friday, June 7, 13
52. Functions
var p;
p = function(name) {
return console.log("Hello " + name);
};
p('FluentConf 2013');
Friday, June 7, 13
53. Loops &
Comprehensions
for someName in someArray
console.log someName
for key, value of someObject
console.log "#{key}: #{value}"
Friday, June 7, 13
54. Loops &
Comprehensions
var key, someName, value, _i, _len;
for (_i = 0, _len = someArray.length; _i < _len; _i++) {
someName = someArray[_i];
console.log(someName);
}
for (key in someObject) {
value = someObject[key];
console.log("" + key + ": " + value);
}
Friday, June 7, 13
65. Extending Classes
class Manager extends Employee
salary: ->
"#{super} w/ $10k Bonus"
manager = new Manager()
console.log manager.salary() # "$250,000 w/ $10k Bonus"
Friday, June 7, 13
66. Extending Classes
var Manager, manager,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ =
parent.prototype; return child; };
Manager = (function(_super) {
__extends(Manager, _super);
Manager.name = 'Manager';
function Manager() {
var _base;
Manager.__super__.constructor.apply(this, arguments);
}
Manager.prototype.salary = function() {
return "" + Manager.__super__.salary.apply(this, arguments) + " w/ $10k Bonus";
};
return Manager;
})(Employee);
manager = new Manager();
console.log(manager.salary());
Friday, June 7, 13
67. Bound Functions
class User
constructor: (@name) ->
sayHi: ->
console.log "Hello #{@name}"
bob = new User('bob')
mary = new User('mary')
log = (callback)->
console.log "about to execute callback..."
callback()
console.log "...executed callback"
log(bob.sayHi)
log(mary.sayHi)
Friday, June 7, 13
68. Bound Functions
about to execute callback...
Hello undefined
...executed callback
about to execute callback...
Hello undefined
...executed callback
Friday, June 7, 13
69. class User
constructor: (@name) ->
sayHi: ->
console.log "Hello #{@name}"
bob = new User('bob')
mary = new User('mary')
log = (callback)->
console.log "about to execute callback..."
callback()
console.log "...executed callback"
log(bob.sayHi)
log(mary.sayHi)
Bound Functions
Friday, June 7, 13
70. class User
constructor: (@name) ->
sayHi: ->
console.log "Hello #{@name}"
bob = new User('bob')
mary = new User('mary')
log = (callback)->
console.log "about to execute callback..."
callback()
console.log "...executed callback"
log(bob.sayHi)
log(mary.sayHi)
Bound Functions
Friday, June 7, 13
71. class User
constructor: (@name) ->
sayHi: =>
console.log "Hello #{@name}"
bob = new User('bob')
mary = new User('mary')
log = (callback)->
console.log "about to execute callback..."
callback()
console.log "...executed callback"
log(bob.sayHi)
log(mary.sayHi)
Bound Functions
Friday, June 7, 13
72. Bound Functions
about to execute callback...
Hello bob
...executed callback
about to execute callback...
Hello mary
...executed callback
Friday, June 7, 13
85. Once upon a mignight dreary while I pondered, weak and weary,
Over many quaint and curious volume of forgotten lore -
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
"'Tis some visiter". I muttered, "tapping at my chamber door" -
"only this and nothing more."
Ah distinctly I remember it was in the bleak December;
And each separate dying ember wrought its ghost upon the floor.
Eagerly I wished the morrow - vainly I had sought to borrow,
From my books surcease of sorrow - sorrow For the lost Lenore -
For the rare and radiant maiden whom the angels name Lenore -
Nameless here For evermore
The Raven
Friday, June 7, 13
86. The Raven
var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length;
i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
while (I(pondered, weak && weary, Over(many(quaint && curious(volume in
forgotten(lore - While(I(nodded, nearly(napping, suddenly(there(came(a(tapping,
As in some(one(gently(rapping, rapping(at(my(chamber(door)))))))))))))))))))) {
Once(upon(a(mignight(dreary))));
}
"'Tis some visiter".I(muttered, "tapping at my chamber door" - "only this and
nothing more.");
Ah(distinctly(I(remember(it(__indexOf.call(the(bleak(December)), was) >= 0)))));
And(each(separate(dying(ember(wrought(its(ghost(upon(the(floor.Eagerly(I(wished(
the(morrow - vainly(I(had(sought(to(borrow, From(my(books(surcease in sorrow -
sorrow(For(the(lost(Lenore - For(the(rare &&
radiant(maiden(whom(the(angels(name(Lenore -
Nameless(here(For(evermore)))))))))))))))))))))))))))))))))))));
Friday, June 7, 13
87. What Didn’t I Cover?
Default Arguments
Ranges
Splatted Arguments
Scoping
Security
Strict Mode
Fixes common
‘mistakes’
Operators
The `do` keyword
Source Maps
Plenty more!
Friday, June 7, 13