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
270
Real World Objects
ympbyc
2
3.2k
ClojureScriptで変わるクライアントサイドWeb
ympbyc
0
920
Purely Functional Smalltalk-72
ympbyc
1
9.8k
Other Decks in Programming
See All in Programming
SwiftUI Viewの責務分離
elmetal
PRO
2
280
若手バックエンドエンジニアが Elasticsearch を使ってみた話
hott0mott0
1
100
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.9k
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
2k
クックパッド検索システム統合/Cookpad Search System Consolidation
giga811
0
170
CIBMTR振り返り+敗北から学ぶコンペの取り組み方反省
takanao
0
130
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
130
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
9
1.6k
技術を改善し続ける
gumioji
0
180
Domain-Driven Design (Tutorial)
hschwentner
13
22k
バッチを作らなきゃとなったときに考えること
irof
2
560
はじめての Go * WASM * OCR
sgash708
1
120
Featured
See All Featured
Done Done
chrislema
182
16k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Rails Girls Zürich Keynote
gr2m
94
13k
A Tale of Four Properties
chriscoyier
158
23k
Writing Fast Ruby
sferik
628
61k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Code Review Best Practice
trishagee
67
18k
Six Lessons from altMBA
skipperchong
27
3.6k
Why Our Code Smells
bkeepers
PRO
336
57k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
GraphQLの誤解/rethinking-graphql
sonatard
69
10k
Fireside Chat
paigeccino
35
3.2k
Transcript
LittleSmallscript
Minori Yamashita <ympbyc@gmail.com>
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