Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LittleSmallscript
Search
Minori Yamashita
November 03, 2012
Programming
2
1.4k
LittleSmallscript
LittleSmallscript the language compiles into JavaScript.
http://ympbyc.github.com/LittleSmallscript
Minori Yamashita
November 03, 2012
Tweet
Share
More Decks by Minori Yamashita
See All by Minori Yamashita
Cloxp @ Smalltalk Meetup
ympbyc
0
260
Real World Objects
ympbyc
2
3.1k
ClojureScriptで変わるクライアントサイドWeb
ympbyc
0
890
Purely Functional Smalltalk-72
ympbyc
1
9.7k
Other Decks in Programming
See All in Programming
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
940
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
Macとオーディオ再生 2024/11/02
yusukeito
0
370
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
RubyLSPのマルチバイト文字対応
notfounds
0
120
flutterkaigi_2024.pdf
kyoheig3
0
130
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Building an army of robots
kneath
302
43k
Producing Creativity
orderedlist
PRO
341
39k
Writing Fast Ruby
sferik
627
61k
Practical Orchestrator
shlominoach
186
10k
Adopting Sorbet at Scale
ufuk
73
9.1k
Optimizing for Happiness
mojombo
376
70k
Designing the Hi-DPI Web
ddemaree
280
34k
Unsuck your backbone
ammeep
668
57k
Visualization
eitanlees
145
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
890
Making Projects Easy
brettharned
115
5.9k
Transcript
LittleSmallscript
Minori Yamashita <
[email protected]
>
LittleSmallscript
LittleSmallscript Little Smalltalk Smalltalk-80 to your terminal http://smalltalk.org/versions/LittleSmalltalk.html ・Minimal ・Subset
of Smalltalk-80 language ・No graphical VM ・Scopes of instance variables ・Cascade ・Class syntax (v5)
LittleSmallscript Smalltalk-80 Dynamic Class-based Object Oriented Language http://en.wikipedia.org/wiki/Smalltalk ・Graphical VM
・Many forks ・Squeak ・Pharo ・Visual Works ... ・Syntax
LittleSmallscript Javascript Dynamic Prototype-based Object Oriented Language https://developer.mozilla.org/en-US/docs/JavaScript ・Web ・Server
・Mobile ・Everywhere ・Objects ・Libraries
Code
Object subclass:#Animal variables:#(#name). !Animal setName: nm name := nm !.
!Animal move: metre console log: name + ' moved ' + metre + 'm' !. Animal subclass:#Snake variables:#(). !Snake move console log: 'Slithering...'. Snake super:#move arguments:#(5) !. Snake new; setName:'Sammy the Python'; move
Feature
Feature 1. Syntax that is similar to Smalltalk's chunk format
2. Use Javascript functions and methods ・forEach, $, Object#keys ... 3. Compiles into clean JavaScript ・Human readable ・Easy to fallback to native JS
Why LittleSmallscript?
No C
for (i = 0; i < 5; ++i) { alert(i);
} while (x < 5) { --x } try {} catch (err) {err}
for (i = 0; i < 5; ++i) { alert(i);
} while (x < 5) { --x } try {} catch (err) {err}
(0 to:4) do:[:i| alert value:i ] [x < 5] whileTrue:[
x -= 1 ] [ ] tryCatch:[:err|err]
(0 to:4) do:[:i| alert value:i ] [x < 5] whileTrue:[
x -= 1 ] [ ] tryCatch:[:err|err]
Just self No self=this
Just !X y ...! No X.prototype.y
littlesmallscript --watch Compile in no time
LittleSmallscript
http://ympbyc.github.com/LittleSmallscript