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
CSC509 Lecture 11
javiergs
PRO
0
180
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
1
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
Ethereum_.pdf
nekomatu
0
460
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
A Philosophy of Restraint
colly
203
16k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fireside Chat
paigeccino
34
3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Agile that works and the tools we love
rasmusluckow
327
21k
BBQ
matthewcrist
85
9.3k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Unsuck your backbone
ammeep
668
57k
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