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
910
Purely Functional Smalltalk-72
ympbyc
1
9.7k
Other Decks in Programming
See All in Programming
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
500
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
480
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
210
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
1
140
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
130
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Spatial Rendering for Apple Vision Pro
warrenm
0
110
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
useSyncExternalStoreを使いまくる
ssssota
6
1.1k
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
220
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Six Lessons from altMBA
skipperchong
27
3.5k
Typedesign – Prime Four
hannesfritz
40
2.4k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Designing Experiences People Love
moore
138
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Language of Interfaces
destraynor
154
24k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
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