Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
LightningTalk GOLO MixIT 2013
Search
Philippe CHARRIERE
November 04, 2013
Programming
70
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LightningTalk GOLO MixIT 2013
Philippe CHARRIERE
November 04, 2013
More Decks by Philippe CHARRIERE
See All by Philippe CHARRIERE
The Plan v3 pour BDX.io
k33g
1
210
Le Plan
k33g
0
220
Prog Fonctionnelle 🐑
k33g
1
400
Apéro fonctionnel
k33g
0
130
Scala Facile
k33g
0
300
Golo, the Tiny Language that gives super powers
k33g
0
150
Golo, the Tiny Language that gives super powers
k33g
0
310
Apéro Fonctionnel
k33g
0
280
Programmation fonctionnelle 🐑 en JS
k33g
2
300
Other Decks in Programming
See All in Programming
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.4k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.1k
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
160
Press start. Python's next generation.
willingc
PRO
3
330
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
770
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
1.7k
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
130
Family mrubyの進捗
kishima
1
110
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.9k
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
140
AIの中の人になってみる
htkym
0
170
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Prompt Engineering for Job Search
mfonobong
0
450
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
AI: The stuff that nobody shows you
jnunemaker
PRO
9
980
Accessibility Awareness
sabderemane
1
210
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Navigating Weather and Climate Data
rabernat
0
510
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
on peut aussi prendre du plaisir en codant ...
• Un nouveau langage de script dans la JVM (>=7)
• à base d’InvokeDynamic • créé par @jponge http://golo-lang.org/ Golo ?
Encore un langage pour la JVM !?! Oui mais •
SIMPLE, facilité d’apprentissage • LEGER (<270 KB tout mouillé) • EN SYMBIOSE totale avec Java • EVOLUTIF : né pour être modifié
points abordés • 4 éléments de langage • La cohabitation
Golo & Java • Comment “Augmenter” Golo • L’Ecosystème Golo
4 éléments de langage
❶ λ, closures
-‐> let world = |who, where| {
return who + " from " + where } let hello = |who| -‐> "Hello, " + who world(hello("John Carter"), "Mars")
andThen ? let welcome = (|who| -‐> "Hello,
" + who): andThen(|who, where| -‐> who + " from " + where) welcome("John Carter", "Mars")
❷ Class augmentation
augment augment java.util.ArrayList { ! function each =
|this, iterator| { for(var i=0, i < this:size(), i = i + 1{ iterator(this:get(i)) } } }
augment let list = ArrayList() list:add("A Princess
of Mars") list:add("The Gods of Mars") list:add("The Chessmen of Mars") list:each(|item|-‐>println(item))
❸ DynamicObjects —
let dad = DynamicObject() :name("Bugs") :define("hello",
|this| -‐> "I'm "+ this:name()) let mum = DynamicObject() :name("Lola"):hair("pink") let baby = DynamicObject() :mixin(dad):mixin(mum) :name("Babs") println( baby:hello() + ", my hair are " + baby:hair() ) ! #I'm Babs, my hair are pink
❹ Workers “les threads ULTRA faciles”
let enHouse = WorkerEnvironment.builder(): withCachedThreadPool() let
worker1 = enHouse:spawn(|message| { println("w1 : " + message) foreach (i in range(0, 10)) { println("w1 : " + i) } }) let worker2 = enHouse:spawn(|message| { println(message) foreach (i in range(0, 10)) { println("w2 : " +i) } if message:equals("shutdown") {enHouse:shutdown()} }) worker1:send("go") worker2:send("go"):send("go again"):send("shutdown")
Golo — Java
1 classe java ... package acme.looniversity; public
class Toon { private String name = null; private static int counter = 0; public String getName() { return name;} public Toon(String name) { this.name = name; counter+=1; } public static int getCounter() { return counter; } }
... utilisée en Golo import acme.looniversity.Toon function
main = |args| { let elmira = Toon("Elmira Duff") let buster = Toon("Buster Bunny") println( elmira:getName() +" "+ buster:getName() ) println( Toon.getCounter() ) }
Compiler du Golo ... module org.fortytwo.H2G2 function
theAnswer = |args...| -‐> 42 ! #goloc -‐output classes 42.golo #cd classes/ #jar -‐cf 42.jar org/fortytwo/H2G2.class
... L’utiliser en java import org.fortytwo.*; public
class Main { public static void main(String[] args) { System.out.println( H2G2.theAnswer() + " " + H2G2.theAnswer("6b13 × 9b13") + " " + H2G2.theAnswer(54) ); } } ! //42 42 42
Et aussi : Golo Class Loader ➼ Applications scriptables
“Augmenter” Golo trop simple, même pour moi
git clone https://github.com/ golo-‐lang/golo-‐lang.git public class Predefined {
public static int theAnswer() { return 42; } public static int theAnswer(Object question) { return theAnswer(); } rake special:bootstrap
Et hop ! println( theAnswerToLife() + "
" + theAnswerToLife("6b13 × 9b13") + " " + theAnswerToLife(54) ) ! # 42 42 42
Ecosystème
Ecosystème Serveurs d’application Outils d’install° Installation via Homebrew par @rlespinasse
Installation via RPM par @hgomez Librairies Golosa par @danielpetisme Mais aussi GoloHttpServer par @titimoby Vert.x-Golo par @julienviet Fast 1 “mini” Play Plugin Gradle par @marcinerdmann Plugin Jenkins par @danielpetisme
Tout ça pour dire • Faites du Golo, vous allez
redécouvrir Java • Faites des projets, faites les connaître • Suivez Golo, il est évolue • ET MERCI A @jponge :)