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
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
2
670
Refactor your code - refactor yourself
xosofox
1
260
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
330
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Security_for_introducing_eBPF
kentatada
0
110
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Featured
See All Featured
Bash Introduction
62gerente
608
210k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Producing Creativity
orderedlist
PRO
341
39k
It's Worth the Effort
3n
183
28k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Navigating Team Friction
lara
183
15k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
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