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
近況報告とかLiveScript(オマケ)とか
Search
Ayumu Sato
November 03, 2012
Programming
1
520
近況報告とかLiveScript(オマケ)とか
大なごやJS Vol.4 発表資料(ぶん投げた内容で申し訳ない次第)
Ayumu Sato
November 03, 2012
Tweet
Share
More Decks by Ayumu Sato
See All by Ayumu Sato
Web 開発の長距離走と持続可能性 - TechFeed Experts Night#31 〜 フロントエンドアーキテクチャの現状と未来
ahomu
1
150
控えめな App Router と持続可能な開発 - PWA Night vol.59
ahomu
11
2.7k
GPT 生成物の評価、運用 toC 企画でのハードルと勘所
ahomu
0
250
副業をきっかけに 切り拓くキャリア形成
ahomu
1
110
Webフロントエンドと アーキテクチャ事情の持論を喋る
ahomu
2
1.6k
SPA/MPA 議論の俯瞰と 現代における設計のポイント - #tfcon 2022 フロントエンド設計
ahomu
4
3.5k
#TECHPLAY Talk - 理想的な Web のため MUST 駆動で主語が大きくなったキャリア
ahomu
0
210
最近の Web パフォーマンス改善について知っておきたいコト
ahomu
50
19k
Web フロントエンドで大切なことはすべて Audits が教えてくれた
ahomu
1
580
Other Decks in Programming
See All in Programming
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
CSC509 Lecture 12
javiergs
PRO
0
160
イベント駆動で成長して委員会
happymana
1
320
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
CSC509 Lecture 11
javiergs
PRO
0
180
最新TCAキャッチアップ
0si43
0
140
Ethereum_.pdf
nekomatu
0
460
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Navigating Team Friction
lara
183
14k
Designing Experiences People Love
moore
138
23k
Bash Introduction
62gerente
608
210k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Adopting Sorbet at Scale
ufuk
73
9.1k
KATA
mclloyd
29
14k
Transcript
ۙگใࠂͳͲ ؼলͨ͠ͷͰൃද͠·͢ EBJ/BHPZB+4WPM Saturday, November 3, 12
!BIPNV ϚʔΫΞοϓΤϯδχΞ גࣜձࣾαΠόʔΤʔδΣϯτ ॴଐ͗ͯ͢Α͘Θ͔Βͳ͍ ৄ͘͠IUUQBIPNV Saturday, November 3, 12
એͱ͍͏͔͓༠͍ #BDLCPOFKT"EWFOU$BMFOEBS IUUQXXXBEWFOUBSPSH DBMFOEBST ۭ͖·͘ΓͳͷͰμϨ͔ʂʂʂ Saturday, November 3, 12
ࠓ ౦ژʹస৬ˍҾͬӽͯ͠ϲ݄ ࣗͷৼΓฦΓ͔Ͷ͓ͯ࣌ؒΛഈआ ͶΉ͘ͳͬͨΒεϛϚηϯ Saturday, November 3, 12
ਃ͠༁ OFX ܕͳ͍Ͱ͢ Ϟϩʹ8FCܥͰ͢ ੜʑ͘͠+BWB4DSJQUॻ͘Α ͔͠͠۩ମతͳ࣮ͳ͍ʂ Saturday, November 3, 12
Θͨ͘͠͝ͱ Saturday, November 3, 12
+PCT ϓϩδΣΫτͷϑϩϯτ։ൃ ηϛφʔͷ४උ ࣾษڧձͷ։࠵ͱ͔ڭ׆ಈ ࣾπʔϧͷࡐྉूΊ FUD Saturday, November 3, 12
͍·࡞ͬͯΔͷ ίϛϡχςΟαʔϏε γϯάϧϖʔδΞϓϦ #BDLCPOFͱ".%Ͱɺ.71ͳײ͡ αʔόαΠυͷ"1*ઃܭ͝ʹΐΓ 1IPOF(BQӽ͠8FC7JFX Saturday, November 3, 12
*OUFSFTU ϑϩϯτ༻ͷࣗಈԽ +4FSͷੜ࢈ํ๏ ڭҭ Ϟδϡϥʔͳ+BWB4DSJQU ґଘཧ 3FRVJSFKT 4OPDLFUT ςετΒ-JOUΒ࣭ཧ Saturday,
November 3, 12
ϥΠϒϥϦͱ͔ πʔϧ͖͔ͩΒհ Saturday, November 3, 12
FH #BDLCPOFMPEBTI 3FRVJSFKT ;FQUP OFFENBLFCFPXO (SVOU MPDBMEFWFMPQNFOU +BTNJOF 4JOPO XJUI5FTUFN
1IBOUPNKT Saturday, November 3, 12
;FQUP ϑΝΠϧαΠζ͕খ͍͞ͷਖ਼ٛʂ K2VFSZޓͳ%0.CBTFE-JC Ϗϧυඞཁ pMUFSͱ͔GBEF*Oͱ͔ BKBYͷΓ%FGFSSFEͰͳ͍ Ұ෦͍ϝιουGPSLͯ͠վࡁ Saturday, November 3,
12
#BDLCPOFKT 7JFX͕ଠΔ ʅɹɾɹТɹɾɹA 3PVUFS7JFX.PEFMͷओै VOEFSTDPSFґଘMPEBTIͰஔ நԽͨ͠ϥούΛ࡞༧ఆ IUUQTHJUIVCDPNNBSJPOFUUFKTCBDLCPOFNBSJPOFUUF IUUQTHJUIVCDPNDIBQMJOKTDIBQMJO Saturday, November
3, 12
3FRVJSFKT ".% "TZODISPOPVT.PEVMF%FpOJUJPO Ϟδϡʔϧ୯ҐͰॻ͘ͷʹΑΖ͍͠ ίʔϧελοΫ͕ͭΒ͍ 1SPEVDUJPOBMNPOEͰݻΊΔ SFRVJSFKT͔Β"KBYྨΛൈ͍ͨͭ ܰྔ Saturday,
November 3, 12
+BTNJOF ͳΜ͔ͩΜͩͰৗ༻ϙδγϣϯ KBTNJOFBTZOD KBTNJOFKRVFSZ %0..BUDIFS 4JOPO 4UVC .PDL ৭ʑͯ͠UFTUFNͰճͯ͠Δ Saturday,
November 3, 12
(SVOU +4Ͱಈ͘ϙʔλϒϧͳϏϧυπʔϧ ࣗಈϏϧυྨͷҰݩԽ͘Μ -PDBM4FSWFSͱ-JWF3FMPBEͱ͔ OPEFͰλεΫॻ͚Δ͔ΒϥΫ ࣾͰڭதʢΘΓͱॱௐʣ Saturday, November 3, 12
1IBOUPNKT ओʹϔουϨεςετ༻ )"3 )551"SDIJWF औͬͯZTMPX ͰධՁɺͱ͔ଞͷ༻్ߟ͑த εΫϦʔϯΩϟϓνϟͱ͔ KTEPNͱ͔[PNCJFKT͋ΔͶ Saturday, November
3, 12
όϥϯεײ ͭͷ࣠ΛόϥϯεΑ͘ ͋ͨΒ͍ٕ͠ज़ख๏ΛֶͿ طଘͷރΕͨπʔϧΛ׆͔͢ ࣾͰγΣΞ͠ͳ͍ͱҙຯ͕ͳ͍ 3%ͷίετߴͭ͘͘ Saturday, November 3, 12
͜͜ͰऴΘΔͱ ͋Μ·ΓͳͷͰBMU+4 Saturday, November 3, 12
ߦ͖ͷόεͰௐͨ ษڧձυϦϰϯͳௐ Saturday, November 3, 12
-JWF4DSJQU IUUQMJWFTDSJQUOFU Saturday, November 3, 12
0WFSWJFX $PGGFF]$PDP]-JWF4DSJQU "EETNBOZGFBUVSFTUPBTTJTUJO GVODUJPOBMTUZMFQSPHSBNNJOH )BTNBOZJNQSPWFNFOUTGPS PCKFDUPSJFOUFEBOEJNQFSBUJWF QSPHSBNNJOH Saturday, November 3,
12
4UBOEBSE-JCSBSZ QSFMVEFMT IUUQHL[HJUIVCDPNQSFMVEFMT CBTFEJOQBSUPGGPGQSFMVEFIT BVUPNBUJDBMMZJNQPSU VTFEPSQSFMVEFPQUJPO QSFMVEFCSPXTFSNJOKT GPSCSPXTFS Saturday, November
3, 12
5FYU&EJUPS4VQQPSU WJNMT WJN MJWFTDSJQUNPEF FNBDT -JWF4DSJQUUNCVOEMF FUD GPS5FYU.BUF $IPDPMBU BOE4VCMJNF5FYU
8JMMCF4PVSDF.BQ Saturday, November 3, 12
(FUUJOH4UBSUFE Saturday, November 3, 12
Πϯετʔϧ % npm install -g LiveScript Saturday, November 3, 12
ରܕ % lsc --interactive --prelude livescript> [1 2 3] |>
map (* 2) |> sum 10 Saturday, November 3, 12
ίϯύΠϧ % lsc --prelude --output ./ file.ls # create ./file.js
Saturday, November 3, 12
4ZOUBY'FBUVSF Saturday, November 3, 12
ఆ > const SHOULD = 'BE' 'BE' > SHOULD =
'NOT' SyntaxError: redeclaration of constant "SHOULD" on line 1 Saturday, November 3, 12
෦ద༻ͱϝϯόΞΫηε > people = [{name: 'hoge'}, {name: 'fuga'}, {name: 'piyo'}]
> people |> map (.name) |> filter (in ['hoge', 'fuga']) [ 'hoge', 'fuga' ] Saturday, November 3, 12
είʔϓ > a = 123 123 > do -> a
= 456 456 > a 123 Saturday, November 3, 12
ԋࢉࢠ > unique [1, 1, 0] .length 2 > array
= [1, 1, 0] > unique array or not empty array # in coffee # (unique array) or not (empty array) Saturday, November 3, 12
แදه &4 1UZIPO )BTLFMMϥΠΫ livescript> [a * b for a
in [1, 2, 3] for b in [10, 20, 40]] [ 10, 20, 40, 20, 40, 80, 30, 60, 120 ] coffee> (a * b for a in [1, 2, 3] for b in [10, 20, 40]) [ [ 10, 20, 30 ], [ 20, 40, 60 ], [ 40, 80, 120 ] ] Saturday, November 3, 12
ύλʔϯϚον # func(n, list) Ͱ list ͷઌ಄͔Β n ݸฦ͢ #
list͕ۭͩͬͨΓn͕0ҎԼͰ͋Ε [] Λฦ͢ take (n,[x,...xs]:list) -> | n <= 0 => [] | empty list => [] | otherwise => [x] +++ take n - 1,xs Saturday, November 3, 12
ΧϦʔ > times = (x,y) --> x*y [Function] function (){
var params = args ? args.concat() : []; return params.push.apply(params, arguments) < f.length && arguments.length ? curry$.call(this, f, params) : f.apply(this, params); } > times 2,3 6 > double = times 2 > double 5 10 Saturday, November 3, 12
ฏ͍ͨBTZOD data <-! $.get 'ajaxtest' $ \.result .html data processed
<-! $.get 'ajaxprocess', data $ \.result .append processed $.get('ajaxtest', function(data){ $('.result').html(data); $.get('ajaxprocess', data, function(processed){ $('.result').append(processed); }); }); Saturday, November 3, 12
༨ஊ Saturday, November 3, 12
+BWB4DSJQUWJBXJLJQFEJB JavaScriptωοτεέʔϓίϛϡχέʔγϣϯζ ͷϒϨϯμϯɾΞΠΫʹΑͬͯ։ൃ͞ΕɺNetscape Navigator 2.0Ͱ࣮͞Εͨɻ։ൃॳ LiveScriptͱݺΕ͍͕ͯͨʢதུʣωοτεέʔ ϓͱαϯɾϚΠΫϩγεςϜζ͕ۀఏܞ͍ͯͨ͠ࣄ ͋ͬͨͨΊɺJavaScriptͱ͍͏໊લʹมߋ͞Εͨ Saturday, November
3, 12
"SUJDMFT 1BVM.JMMFSņ'VODUJPOBMQSPHSBNNJOHJO+BWB4DSJQU FDPTZTUFN IUUQQBVMNJMMSDPNQPTUTGVODUJPOBMQSPHSBNNJOHJOKBWBTDSJQUFDPTZTUFN 'VODUJPOBM1SPHSBNNJOHJO+BWB4DSJQUVTJOH-JWF4DSJQUBOE QSFMVEFMT IUUQHL[HJUIVCDPN-JWF4DSJQUCMPHGVODUJPOBMQSPHSBNNJOHJOKBWBTDSJQUVTJOHMJWFTDSJQUBOE QSFMVEFMTIUNM 3FBTPOTUP4XJUDIGSPN$PGGFF4DSJQUUP-JWF4DSJQU IUUQHL[HJUIVCDPN-JWF4DSJQUCMPHUFOSFBTPOTUPTXJUDIGSPNDPGGFFTDSJQUIUNM
1PXFSGVMK2VFSZXJUI-JWF4DSJQU IUUQMJWFTDSJQUOFUCMPHQPXFSGVMKRVFSZXJUIMJWFTDSJQUIUNM Saturday, November 3, 12
͓͠·͍ Saturday, November 3, 12