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
『品質』という言葉が嫌いな理由
korimu
0
160
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
チームリードになって変わったこと
isaka1022
0
200
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
250
技術を根付かせる / How to make technology take root
kubode
1
250
DROBEの生成AI活用事例 with AWS
ippey
0
130
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
GoとPHPのインターフェイスの違い
shimabox
2
190
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
640
color-scheme: light dark; を完全に理解する
uhyo
5
390
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
12
4.1k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Making Projects Easy
brettharned
116
6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
A Philosophy of Restraint
colly
203
16k
Automating Front-end Workflow
addyosmani
1368
200k
Statistics for Hackers
jakevdp
797
220k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building Your Own Lightsaber
phodgson
104
6.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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