SlideShare a Scribd company logo
1 of 46
Download to read offline
Mary Had a Little λ
Stephen Chin (@steveonjava)
Java Technology Ambassador
JDK 8 Feature Overview
Java for Everyone
•  Profiles for constrained devices
•  JSR 310 - Date & Time APIs
•  Non-Gregorian calendars
•  Unicode 6.2
•  ResourceBundle.
•  BCP47 locale matching
• Globalization & Accessibility
Innovation
•  Lambda aka Closures
•  Language Interop
•  Nashorn
Core Libraries
•  Parallel operations for core
collections APIs
•  Improvements in functionality
•  Improved type inference
Security
•  Limited doPrivilege
•  NSA Suite B algorithm support
•  SNI Server Side support
•  DSA updated to FIPS186-3
•  AEAD JSSE CipherSuites
Tools
•  Compiler control & logging
•  JSR 308 - Annotations on
Java Type
•  Native app bundling
•  App Store Bundling tools
Client
• Deployment enhancements
• JavaFX 8
• Java SE Embedded support
• Enhanced HTML5 support
• 3D shapes and attributes
• Printing
General Goodness
•  JVM enhancements
•  No PermGen limitations
•  Performance lmprovements
Coordinated Platform Upgrade with Lambda
>  Language
l  Lambda Expressions (closures)
l  Interface Evolution with default methods
>  Libraries
l  Bulk data operations on Collections
l  More library support for parallelism
>  JVM
l  Default methods
l  Enhancements to invokedynamic
4
Download JDK 8 Early Access Release
IDE Support for Lambdas
5
for	
  (Shape	
  s	
  :	
  shapes)	
  {	
  
	
  	
  if	
  (s.getColor()	
  ==	
  BLUE)	
  
	
  	
  	
  	
  s.setColor(RED);	
  
}	
  
shapes.forEach(s	
  -­‐>	
  {	
  
	
  	
  if	
  (s.getColor()	
  ==	
  BLUE)	
  
	
  	
  	
  	
  s.setColor(RED);	
  
});	
  
Extension Methods
interface	
  Collection<T>	
  {	
  
	
  	
  default	
  void	
  forEach(Block<T>	
  action)	
  {	
  
	
  	
  	
  	
  Objects.requireNonNull(action);	
  
	
  	
  	
  	
  for	
  (T	
  t	
  :	
  this)	
  
	
  	
  	
  	
  	
  	
  action.apply(t);	
  
	
  	
  }	
  
	
  
	
  	
  //	
  Rest	
  of	
  Collection	
  methods…	
  
}	
  
Lambda Syntax
>  (int	
  a,	
  int	
  b)	
  -­‐>	
  {	
  return	
  a	
  +	
  b;	
  }	
  
>  (a,	
  b)	
  -­‐>	
  a	
  +	
  b	
  
>  a	
  -­‐>	
  a	
  *	
  a	
  
>  ()	
  -­‐>	
  a	
  
>  ()	
  -­‐>	
  {	
  System.out.println("done");	
  }	
  
8
Method References
>  Objects::toString	
  
>  Object::toString	
  
>  obj::toString	
  
>  Object::new	
  
obj	
  -­‐>	
  Objects.toString(obj)	
  
	
  
obj	
  -­‐>	
  obj.toString()	
  
	
  
()	
  -­‐>	
  obj.toString()	
  
	
  
()	
  -­‐>	
  new	
  Object()	
  
9
Functional Interfaces
@FunctionalInterface	
  
	
  
@FunctionalInterface	
  
interface	
  Sum	
  {	
  
	
  	
  int	
  add(int	
  a,	
  int	
  b);	
  
}	
  
	
  
sum	
  =	
  (a,	
  b)	
  -­‐>	
  a	
  +	
  b;	
  
sum	
  =	
  Integer::sum;	
  
10
11
Vanishing Circles
!
Application Skeleton
public	
  class	
  VanishingCircles	
  extends	
  Application	
  {	
  
	
  	
  public	
  static	
  void	
  main(String[]	
  args)	
  {	
  
	
  	
  	
  	
  Application.launch(args);	
  
	
  	
  }	
  
	
  	
  @Override	
  
	
  	
  public	
  void	
  start(Stage	
  primaryStage)	
  {	
  
	
  	
  	
  	
  primaryStage.setTitle("Vanishing	
  Circles");	
  
	
  	
  	
  	
  Group	
  root	
  =	
  new	
  Group();	
  
	
  	
  	
  	
  Scene	
  scene	
  =	
  new	
  Scene(root,	
  800,	
  600,	
  Color.BLACK);	
  
	
  	
  	
  	
  [create	
  the	
  circles…]	
  
	
  	
  	
  	
  root.getChildren().addAll(circles);	
  
	
  	
  	
  	
  primaryStage.setScene(scene);	
  
	
  	
  	
  	
  primaryStage.show();	
  
	
  	
  	
  	
  [begin	
  the	
  animation…]	
  
	
  	
  }	
  
}	
  
Create the Circles
List<Circle>	
  circles	
  =	
  new	
  ArrayList<Circle>();	
  
for	
  (int	
  i	
  =	
  0;	
  i	
  <	
  50;	
  i++)	
  {	
  
	
  	
  final	
  Circle	
  circle	
  =	
  new	
  Circle(150);	
  
	
  	
  circle.setCenterX(Math.random()	
  *	
  800);	
  
	
  	
  circle.setCenterY(Math.random()	
  *	
  600);	
  
	
  	
  circle.setFill(new	
  Color(Math.random(),	
  Math.random(),	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random(),	
  .2));	
  
	
  	
  circle.setEffect(new	
  BoxBlur(10,	
  10,	
  3));	
  
	
  	
  circle.setStroke(Color.WHITE);	
  
	
  	
  [setup	
  binding…]	
  
	
  	
  [setup	
  event	
  listeners…]	
  
	
  	
  circles.add(circle);	
  
}	
  
13
Create the Circles
List<Circle>	
  circles	
  =	
  Streams.generate(()	
  -­‐>	
  {	
  
	
  	
  final	
  Circle	
  circle	
  =	
  new	
  Circle(150);	
  
	
  	
  circle.setCenterX(Math.random()	
  *	
  800);	
  
	
  	
  circle.setCenterY(Math.random()	
  *	
  600);	
  
	
  	
  circle.setFill(new	
  Color(Math.random(),	
  Math.random(),	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random(),	
  .2));	
  
	
  	
  circle.setEffect(new	
  BoxBlur(10,	
  10,	
  3));	
  
	
  	
  circle.setStroke(Color.WHITE);	
  
	
  	
  [setup	
  binding…]	
  
	
  	
  [setup	
  event	
  listeners…]	
  
	
  	
  return	
  circle;	
  
}).limit(50).collect(Collectors.toList());	
  
14
Setup Binding
circle.strokeWidthProperty().bind(Bindings	
  
	
  	
  .when(circle.hoverProperty())	
  
	
  	
  .then(4)	
  
	
  	
  .otherwise(0)	
  
);	
  
15
Setup Event Listeners
circle.addEventHandler(MouseEvent.MOUSE_CLICKED,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  new	
  EventHandler<MouseEvent>()	
  {	
  
	
  	
  public	
  void	
  handle(MouseEvent	
  t)	
  {	
  
	
  	
  	
  	
  KeyValue	
  collapse	
  =	
  new	
  KeyValue(circle.radiusProperty(),	
  0);	
  
	
  	
  	
  	
  new	
  Timeline(new	
  KeyFrame(Duration.seconds(3),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  collapse)).play();	
  
	
  	
  }	
  
});	
  
16
Lambda-ized Event Listeners
circle.addEventHandler(MouseEvent.MOUSE_CLICKED,	
  e	
  -­‐>	
  {	
  
	
  	
  KeyValue	
  collapse	
  =	
  new	
  KeyValue(circle.radiusProperty(),	
  0);	
  
	
  	
  new	
  Timeline(new	
  KeyFrame(Duration.seconds(3),	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  collapse)).play();	
  
});	
  
17
Begin the Animation
Timeline	
  moveCircles	
  =	
  new	
  Timeline();	
  
for	
  (Circle	
  circle	
  :	
  circles)	
  {	
  
	
  	
  KeyValue	
  moveX	
  =	
  new	
  KeyValue(circle.centerXProperty(),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random()	
  *	
  800);	
  
	
  	
  KeyValue	
  moveY	
  =	
  new	
  KeyValue(circle.centerYProperty(),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random()	
  *	
  600);	
  
	
  	
  moveCircles.getKeyFrames().add(new	
  KeyFrame(Duration.seconds(40),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  moveX,	
  moveY));	
  
}	
  
moveCircles.play();	
  
18
Lambda-ized Begin the Animation
Timeline	
  moveCircles	
  =	
  new	
  Timeline();	
  
circles.forEach(circle	
  -­‐>	
  {	
  
	
  	
  KeyValue	
  moveX	
  =	
  new	
  KeyValue(circle.centerXProperty(),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random()	
  *	
  800);	
  
	
  	
  KeyValue	
  moveY	
  =	
  new	
  KeyValue(circle.centerYProperty(),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Math.random()	
  *	
  600);	
  
	
  	
  moveCircles.getKeyFrames().add(new	
  KeyFrame(Duration.seconds(40),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  moveX,	
  moveY));	
  
});	
  
moveCircles.play();	
  
19
Mary Had a Little Lambda
Mary had a little lambda
Whose fleece was white as snow
And everywhere that Mary went
Lambda was sure to go!
https://github.com/steveonjava/MaryHadALittleLambda
Generating Streams
From a collection:
>  anyCollection.stream();	
  
Known set of objects:
>  Stream.of("bananas",	
  "oranges",	
  "apples");
Numeric range:
>  IntStream.range(0,	
  50)
Iteratively:
>  Stream.iterate(Color.RED,	
  	
  
>  	
  	
  c	
  -­‐>	
  Color.hsb(c.getHue()	
  +	
  .1,	
  c.getSaturation(),	
  	
  
>  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  c.getBrightness()));	
  
21
Let's Create Some Barn Animals!
SpriteView	
  tail	
  =	
  s.getAnimals().isEmpty()	
  ?	
  
	
  	
  s	
  :	
  s.getAnimals().get(s.getAnimals().size()	
  -­‐	
  1);	
  
	
  
s.getAnimals().addAll(	
  
	
  	
  Stream.iterate(tail,	
  SpriteView.Lamb::new)	
  
	
  	
  	
  	
  .substream(1,	
  8)	
  
	
  	
  	
  	
  .collect(Collectors.toList())	
  
);	
  
22
23
Filtering Streams
Predicate Expression
>  public	
  interface	
  Predicate<T>	
  {	
  
>  	
  	
  public	
  boolean	
  test(T	
  t);	
  
>  }	
  
Filter out minors
>  adults	
  =	
  attendees.filter(a	
  -­‐>	
  a.getAge()	
  >=	
  1.8)	
  
24
Rainbow-colored Lambs!
s.getAnimals().stream()	
  
	
  	
  .filter(a	
  -­‐>	
  a.getNumber()	
  %	
  4	
  ==	
  2)	
  
	
  	
  .forEach(a	
  -­‐>	
  a.setColor(Color.YELLOW));	
  
s.getAnimals().stream()	
  
	
  	
  .filter(a	
  -­‐>	
  a.getNumber()	
  %	
  4	
  ==	
  3)	
  
	
  	
  .forEach(a	
  -­‐>	
  a.setColor(Color.CYAN));	
  
s.getAnimals().stream()	
  
	
  	
  .filter(a	
  -­‐>	
  a.getNumber()	
  %	
  4	
  ==	
  0)	
  
	
  	
  .forEach(a	
  -­‐>	
  a.setColor(Color.GREEN));	
  
25
26
Filtering Collections
Collection.removeIf
>  Removes all elements that match the predicate
List.replaceAll
>  In-place filtering and replacement using an unary operator
ObservableCollection.filtered
>  Returns a list filtered by a predicate this is also Observable
27
Picky Eaters…
	
  
Predicate<SpriteView>	
  pure	
  =	
  
	
  	
  a	
  -­‐>	
  a.getColor()	
  ==	
  null;	
  
	
  
mealsServed.set(mealsServed.get()	
  +	
  
	
  	
  s.getAnimals().filtered(pure).size()	
  
);	
  
	
  
s.getAnimals().removeIf(pure);	
  
28
29
Mapping Streams
Applies a Map Function to each element:
>  Function<?	
  super	
  T,	
  ?	
  extends	
  R>	
  
Result: List is the same size, but may be a different type.
30
Single Map
s.getAnimals().setAll(	
  
	
  	
  s.getAnimals().stream()	
  
	
  	
  	
  	
  .map(sv	
  -­‐>	
  new	
  Eggs(sv.getFollowing())	
  
	
  	
  	
  	
  .collect(Collectors.toList())	
  
);	
  
31
Or a Double Map!
s.getAnimals().setAll(	
  
	
  	
  s.getAnimals().stream()	
  
	
  	
  	
  	
  .map(SpriteView::getFollowing)	
  
	
  	
  	
  	
  .map(Eggs::new)	
  
	
  	
  	
  	
  .collect(Collectors.toList())	
  
);	
  
32
33
Flat Map
Applies a One-to-Many Map Function to each element:
>  Function<? super T, ? extends Stream<? extends R>>
And then flattens the result into a single stream.
Result: The list may get longer and the type may be different.
34
Hatching Eggs
s.getAnimals().setAll(	
  
	
  	
  s.getAnimals().stream()	
  
	
  	
  	
  	
  .flatMap(SpriteView.Eggs::hatch)	
  
	
  	
  	
  	
  .collect(Collectors.toList())	
  
);	
  
35
36
Reduce
Reduces a list to a single element given:
>  Identity: T
>  Accumulator: BinaryOperator<T>
Result: List of the same type, but only 1 element left.
37
And the (formerly little) Fox ate them all!
	
  Double	
  mealSize	
  =	
  shepherd.getAnimals().stream()	
  
	
  	
  .map(SpriteView::getScaleX)	
  
	
  	
  .reduce(0.0,	
  Double::sum);	
  
	
  
setScaleX(getScaleX()	
  +	
  mealSize	
  *	
  .2);	
  
setScaleY(getScaleY()	
  +	
  mealSize	
  *	
  .2);	
  
shepherd.getAnimals().clear();	
  
38
39
Mary Had a Little Lambda Project
>  Open-source project to demonstrate lambda features
>  Visual representation of streams, filters, and maps
40
https://github.com/steveonjava/MaryHadALittleLambda
Other APIs Being Upgraded for Lambdas
>  IO/NIO
l  Walk trees
>  Date/Time
l  JSR-310
>  Reflection
>  Concurrency
>  + Lots of little changes everywhere
41
Lambdas and JavaFX 3D
42
=
Lambdas and Raspberry Pi
Stephen Chin
tweet: @steveonjava
blog: http://steveonjava.com
nighthacking.com
Real Geeks
Live Hacking
NightHacking Tour
Graphics Image Credits
>  Mary image by Terra-chan:
http://www.rpgmakervx.net/index.php?showtopic=29404
>  Lamb image by Mack:
http://www.rpgmakervx.net/index.php?showtopic=15704
>  Chicken, Church, Barn, and Coop image by LovelyBlue:
http://l0velyblue.deviantart.com/art/Chicken-203764427
>  Fox image by PinedaVX:
http://www.rpgmakervx.net/index.php?showtopic=9422
>  Nest image derived from Lokilech's Amselnest:
http://commons.wikimedia.org/wiki/File:Amselnest_lokilech.jpg
>  Background image by Victor Szalvay:
http://www.flickr.com/photos/55502991@N00/172603855
45
Safe Harbor Statement
The preceding is intended to outline our general product
direction. It is intended for information purposes only, and
may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing
decisions. The development, release, and timing of any
features or functionality described for Oracle s products
remains at the sole discretion of Oracle.

More Related Content

What's hot

The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 33 of 196
The Ring programming language version 1.7 book - Part 33 of 196The Ring programming language version 1.7 book - Part 33 of 196
The Ring programming language version 1.7 book - Part 33 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84Mahmoud Samir Fayed
 
PHP and MySQL Tips and tricks, DC 2007
PHP and MySQL Tips and tricks, DC 2007PHP and MySQL Tips and tricks, DC 2007
PHP and MySQL Tips and tricks, DC 2007Damien Seguy
 
λ | Lenses
λ | Lensesλ | Lenses
λ | LensesOpen-IT
 
The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84Mahmoud Samir Fayed
 
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinAsync code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinFabio Collini
 
Swift for TensorFlow - CoreML Personalization
Swift for TensorFlow - CoreML PersonalizationSwift for TensorFlow - CoreML Personalization
Swift for TensorFlow - CoreML PersonalizationJacopo Mangiavacchi
 
[131]해커의 관점에서 바라보기
[131]해커의 관점에서 바라보기[131]해커의 관점에서 바라보기
[131]해커의 관점에서 바라보기NAVER D2
 
On the Impossibility of Batch Update for Cryptographic Accumulators
On the Impossibility of Batch Update for Cryptographic AccumulatorsOn the Impossibility of Batch Update for Cryptographic Accumulators
On the Impossibility of Batch Update for Cryptographic AccumulatorsPhilippe Camacho, Ph.D.
 

What's hot (20)

The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
 
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210
 
The Ring programming language version 1.7 book - Part 33 of 196
The Ring programming language version 1.7 book - Part 33 of 196The Ring programming language version 1.7 book - Part 33 of 196
The Ring programming language version 1.7 book - Part 33 of 196
 
The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
 
The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
 
PHP and MySQL Tips and tricks, DC 2007
PHP and MySQL Tips and tricks, DC 2007PHP and MySQL Tips and tricks, DC 2007
PHP and MySQL Tips and tricks, DC 2007
 
Functional Scala 2020
Functional Scala 2020Functional Scala 2020
Functional Scala 2020
 
λ | Lenses
λ | Lensesλ | Lenses
λ | Lenses
 
The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212
 
Xm lparsers
Xm lparsersXm lparsers
Xm lparsers
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84
 
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinAsync code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
 
Swift for TensorFlow - CoreML Personalization
Swift for TensorFlow - CoreML PersonalizationSwift for TensorFlow - CoreML Personalization
Swift for TensorFlow - CoreML Personalization
 
[131]해커의 관점에서 바라보기
[131]해커의 관점에서 바라보기[131]해커의 관점에서 바라보기
[131]해커의 관점에서 바라보기
 
On the Impossibility of Batch Update for Cryptographic Accumulators
On the Impossibility of Batch Update for Cryptographic AccumulatorsOn the Impossibility of Batch Update for Cryptographic Accumulators
On the Impossibility of Batch Update for Cryptographic Accumulators
 
Alternate JVM Languages
Alternate JVM LanguagesAlternate JVM Languages
Alternate JVM Languages
 

Viewers also liked

Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Stephen Chin
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java WorkshopStephen Chin
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic ShowStephen Chin
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the CloudStephen Chin
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi LabStephen Chin
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXStephen Chin
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistStephen Chin
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadStephen Chin
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionRaspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionStephen Chin
 
Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsStephen Chin
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleStephen Chin
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and DevicesStephen Chin
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)Stephen Chin
 
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Stephen Chin
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Stephen Chin
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids WorkshopStephen Chin
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosStephen Chin
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopStephen Chin
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopStephen Chin
 

Viewers also liked (20)

Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java Workshop
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the Cloud
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
DukeScript
DukeScriptDukeScript
DukeScript
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFX
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionRaspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch Version
 
Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 

Similar to Mary Had a Little λ (QCon)

Retro gaming with lambdas stephen chin
Retro gaming with lambdas   stephen chinRetro gaming with lambdas   stephen chin
Retro gaming with lambdas stephen chinNLJUG
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen ChinHacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chinjaxconf
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)Stephen Chin
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Leonardo Borges
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184Mahmoud Samir Fayed
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iiiNiraj Bharambe
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...GeeksLab Odessa
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonAlex Payne
 
The Ring programming language version 1.5.3 book - Part 40 of 184
The Ring programming language version 1.5.3 book - Part 40 of 184The Ring programming language version 1.5.3 book - Part 40 of 184
The Ring programming language version 1.5.3 book - Part 40 of 184Mahmoud Samir Fayed
 
Scala introduction
Scala introductionScala introduction
Scala introductionvito jeng
 
RESTful API using scalaz (3)
RESTful API using scalaz (3)RESTful API using scalaz (3)
RESTful API using scalaz (3)Yeshwanth Kumar
 
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security TeamsAaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teamscentralohioissa
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202Mahmoud Samir Fayed
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 SpringKiyotaka Oku
 

Similar to Mary Had a Little λ (QCon) (20)

Retro gaming with lambdas stephen chin
Retro gaming with lambdas   stephen chinRetro gaming with lambdas   stephen chin
Retro gaming with lambdas stephen chin
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen ChinHacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iii
 
Coding in Style
Coding in StyleCoding in Style
Coding in Style
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
The Ring programming language version 1.5.3 book - Part 40 of 184
The Ring programming language version 1.5.3 book - Part 40 of 184The Ring programming language version 1.5.3 book - Part 40 of 184
The Ring programming language version 1.5.3 book - Part 40 of 184
 
Scala introduction
Scala introductionScala introduction
Scala introduction
 
RESTful API using scalaz (3)
RESTful API using scalaz (3)RESTful API using scalaz (3)
RESTful API using scalaz (3)
 
Spark workshop
Spark workshopSpark workshop
Spark workshop
 
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security TeamsAaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 

More from Stephen Chin

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2Stephen Chin
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java CommunityStephen Chin
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideStephen Chin
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java DevelopersStephen Chin
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCStephen Chin
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingStephen Chin
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Stephen Chin
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)Stephen Chin
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkStephen Chin
 

More from Stephen Chin (9)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi Hacking
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Mary Had a Little λ (QCon)

  • 1. Mary Had a Little λ Stephen Chin (@steveonjava) Java Technology Ambassador
  • 2. JDK 8 Feature Overview Java for Everyone •  Profiles for constrained devices •  JSR 310 - Date & Time APIs •  Non-Gregorian calendars •  Unicode 6.2 •  ResourceBundle. •  BCP47 locale matching • Globalization & Accessibility Innovation •  Lambda aka Closures •  Language Interop •  Nashorn Core Libraries •  Parallel operations for core collections APIs •  Improvements in functionality •  Improved type inference Security •  Limited doPrivilege •  NSA Suite B algorithm support •  SNI Server Side support •  DSA updated to FIPS186-3 •  AEAD JSSE CipherSuites Tools •  Compiler control & logging •  JSR 308 - Annotations on Java Type •  Native app bundling •  App Store Bundling tools Client • Deployment enhancements • JavaFX 8 • Java SE Embedded support • Enhanced HTML5 support • 3D shapes and attributes • Printing General Goodness •  JVM enhancements •  No PermGen limitations •  Performance lmprovements
  • 3. Coordinated Platform Upgrade with Lambda >  Language l  Lambda Expressions (closures) l  Interface Evolution with default methods >  Libraries l  Bulk data operations on Collections l  More library support for parallelism >  JVM l  Default methods l  Enhancements to invokedynamic
  • 4. 4 Download JDK 8 Early Access Release
  • 5. IDE Support for Lambdas 5
  • 6. for  (Shape  s  :  shapes)  {      if  (s.getColor()  ==  BLUE)          s.setColor(RED);   }   shapes.forEach(s  -­‐>  {      if  (s.getColor()  ==  BLUE)          s.setColor(RED);   });  
  • 7. Extension Methods interface  Collection<T>  {      default  void  forEach(Block<T>  action)  {          Objects.requireNonNull(action);          for  (T  t  :  this)              action.apply(t);      }        //  Rest  of  Collection  methods…   }  
  • 8. Lambda Syntax >  (int  a,  int  b)  -­‐>  {  return  a  +  b;  }   >  (a,  b)  -­‐>  a  +  b   >  a  -­‐>  a  *  a   >  ()  -­‐>  a   >  ()  -­‐>  {  System.out.println("done");  }   8
  • 9. Method References >  Objects::toString   >  Object::toString   >  obj::toString   >  Object::new   obj  -­‐>  Objects.toString(obj)     obj  -­‐>  obj.toString()     ()  -­‐>  obj.toString()     ()  -­‐>  new  Object()   9
  • 10. Functional Interfaces @FunctionalInterface     @FunctionalInterface   interface  Sum  {      int  add(int  a,  int  b);   }     sum  =  (a,  b)  -­‐>  a  +  b;   sum  =  Integer::sum;   10
  • 12. Application Skeleton public  class  VanishingCircles  extends  Application  {      public  static  void  main(String[]  args)  {          Application.launch(args);      }      @Override      public  void  start(Stage  primaryStage)  {          primaryStage.setTitle("Vanishing  Circles");          Group  root  =  new  Group();          Scene  scene  =  new  Scene(root,  800,  600,  Color.BLACK);          [create  the  circles…]          root.getChildren().addAll(circles);          primaryStage.setScene(scene);          primaryStage.show();          [begin  the  animation…]      }   }  
  • 13. Create the Circles List<Circle>  circles  =  new  ArrayList<Circle>();   for  (int  i  =  0;  i  <  50;  i++)  {      final  Circle  circle  =  new  Circle(150);      circle.setCenterX(Math.random()  *  800);      circle.setCenterY(Math.random()  *  600);      circle.setFill(new  Color(Math.random(),  Math.random(),                                                        Math.random(),  .2));      circle.setEffect(new  BoxBlur(10,  10,  3));      circle.setStroke(Color.WHITE);      [setup  binding…]      [setup  event  listeners…]      circles.add(circle);   }   13
  • 14. Create the Circles List<Circle>  circles  =  Streams.generate(()  -­‐>  {      final  Circle  circle  =  new  Circle(150);      circle.setCenterX(Math.random()  *  800);      circle.setCenterY(Math.random()  *  600);      circle.setFill(new  Color(Math.random(),  Math.random(),                                                        Math.random(),  .2));      circle.setEffect(new  BoxBlur(10,  10,  3));      circle.setStroke(Color.WHITE);      [setup  binding…]      [setup  event  listeners…]      return  circle;   }).limit(50).collect(Collectors.toList());   14
  • 15. Setup Binding circle.strokeWidthProperty().bind(Bindings      .when(circle.hoverProperty())      .then(4)      .otherwise(0)   );   15
  • 16. Setup Event Listeners circle.addEventHandler(MouseEvent.MOUSE_CLICKED,                                                  new  EventHandler<MouseEvent>()  {      public  void  handle(MouseEvent  t)  {          KeyValue  collapse  =  new  KeyValue(circle.radiusProperty(),  0);          new  Timeline(new  KeyFrame(Duration.seconds(3),                                                                collapse)).play();      }   });   16
  • 17. Lambda-ized Event Listeners circle.addEventHandler(MouseEvent.MOUSE_CLICKED,  e  -­‐>  {      KeyValue  collapse  =  new  KeyValue(circle.radiusProperty(),  0);      new  Timeline(new  KeyFrame(Duration.seconds(3),                                                          collapse)).play();   });   17
  • 18. Begin the Animation Timeline  moveCircles  =  new  Timeline();   for  (Circle  circle  :  circles)  {      KeyValue  moveX  =  new  KeyValue(circle.centerXProperty(),                                                                    Math.random()  *  800);      KeyValue  moveY  =  new  KeyValue(circle.centerYProperty(),                                                                    Math.random()  *  600);      moveCircles.getKeyFrames().add(new  KeyFrame(Duration.seconds(40),                                                                                                moveX,  moveY));   }   moveCircles.play();   18
  • 19. Lambda-ized Begin the Animation Timeline  moveCircles  =  new  Timeline();   circles.forEach(circle  -­‐>  {      KeyValue  moveX  =  new  KeyValue(circle.centerXProperty(),                                                                    Math.random()  *  800);      KeyValue  moveY  =  new  KeyValue(circle.centerYProperty(),                                                                    Math.random()  *  600);      moveCircles.getKeyFrames().add(new  KeyFrame(Duration.seconds(40),                                                                                                moveX,  moveY));   });   moveCircles.play();   19
  • 20. Mary Had a Little Lambda Mary had a little lambda Whose fleece was white as snow And everywhere that Mary went Lambda was sure to go! https://github.com/steveonjava/MaryHadALittleLambda
  • 21. Generating Streams From a collection: >  anyCollection.stream();   Known set of objects: >  Stream.of("bananas",  "oranges",  "apples"); Numeric range: >  IntStream.range(0,  50) Iteratively: >  Stream.iterate(Color.RED,     >     c  -­‐>  Color.hsb(c.getHue()  +  .1,  c.getSaturation(),     >                                                                     c.getBrightness()));   21
  • 22. Let's Create Some Barn Animals! SpriteView  tail  =  s.getAnimals().isEmpty()  ?      s  :  s.getAnimals().get(s.getAnimals().size()  -­‐  1);     s.getAnimals().addAll(      Stream.iterate(tail,  SpriteView.Lamb::new)          .substream(1,  8)          .collect(Collectors.toList())   );   22
  • 23. 23
  • 24. Filtering Streams Predicate Expression >  public  interface  Predicate<T>  {   >     public  boolean  test(T  t);   >  }   Filter out minors >  adults  =  attendees.filter(a  -­‐>  a.getAge()  >=  1.8)   24
  • 25. Rainbow-colored Lambs! s.getAnimals().stream()      .filter(a  -­‐>  a.getNumber()  %  4  ==  2)      .forEach(a  -­‐>  a.setColor(Color.YELLOW));   s.getAnimals().stream()      .filter(a  -­‐>  a.getNumber()  %  4  ==  3)      .forEach(a  -­‐>  a.setColor(Color.CYAN));   s.getAnimals().stream()      .filter(a  -­‐>  a.getNumber()  %  4  ==  0)      .forEach(a  -­‐>  a.setColor(Color.GREEN));   25
  • 26. 26
  • 27. Filtering Collections Collection.removeIf >  Removes all elements that match the predicate List.replaceAll >  In-place filtering and replacement using an unary operator ObservableCollection.filtered >  Returns a list filtered by a predicate this is also Observable 27
  • 28. Picky Eaters…   Predicate<SpriteView>  pure  =      a  -­‐>  a.getColor()  ==  null;     mealsServed.set(mealsServed.get()  +      s.getAnimals().filtered(pure).size()   );     s.getAnimals().removeIf(pure);   28
  • 29. 29
  • 30. Mapping Streams Applies a Map Function to each element: >  Function<?  super  T,  ?  extends  R>   Result: List is the same size, but may be a different type. 30
  • 31. Single Map s.getAnimals().setAll(      s.getAnimals().stream()          .map(sv  -­‐>  new  Eggs(sv.getFollowing())          .collect(Collectors.toList())   );   31
  • 32. Or a Double Map! s.getAnimals().setAll(      s.getAnimals().stream()          .map(SpriteView::getFollowing)          .map(Eggs::new)          .collect(Collectors.toList())   );   32
  • 33. 33
  • 34. Flat Map Applies a One-to-Many Map Function to each element: >  Function<? super T, ? extends Stream<? extends R>> And then flattens the result into a single stream. Result: The list may get longer and the type may be different. 34
  • 35. Hatching Eggs s.getAnimals().setAll(      s.getAnimals().stream()          .flatMap(SpriteView.Eggs::hatch)          .collect(Collectors.toList())   );   35
  • 36. 36
  • 37. Reduce Reduces a list to a single element given: >  Identity: T >  Accumulator: BinaryOperator<T> Result: List of the same type, but only 1 element left. 37
  • 38. And the (formerly little) Fox ate them all!  Double  mealSize  =  shepherd.getAnimals().stream()      .map(SpriteView::getScaleX)      .reduce(0.0,  Double::sum);     setScaleX(getScaleX()  +  mealSize  *  .2);   setScaleY(getScaleY()  +  mealSize  *  .2);   shepherd.getAnimals().clear();   38
  • 39. 39
  • 40. Mary Had a Little Lambda Project >  Open-source project to demonstrate lambda features >  Visual representation of streams, filters, and maps 40 https://github.com/steveonjava/MaryHadALittleLambda
  • 41. Other APIs Being Upgraded for Lambdas >  IO/NIO l  Walk trees >  Date/Time l  JSR-310 >  Reflection >  Concurrency >  + Lots of little changes everywhere 41
  • 44. Stephen Chin tweet: @steveonjava blog: http://steveonjava.com nighthacking.com Real Geeks Live Hacking NightHacking Tour
  • 45. Graphics Image Credits >  Mary image by Terra-chan: http://www.rpgmakervx.net/index.php?showtopic=29404 >  Lamb image by Mack: http://www.rpgmakervx.net/index.php?showtopic=15704 >  Chicken, Church, Barn, and Coop image by LovelyBlue: http://l0velyblue.deviantart.com/art/Chicken-203764427 >  Fox image by PinedaVX: http://www.rpgmakervx.net/index.php?showtopic=9422 >  Nest image derived from Lokilech's Amselnest: http://commons.wikimedia.org/wiki/File:Amselnest_lokilech.jpg >  Background image by Victor Szalvay: http://www.flickr.com/photos/55502991@N00/172603855 45
  • 46. Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.