Enviar búsqueda
Cargar
zsh symbolic programming
•
0 recomendaciones
•
1,814 vistas
Hideaki Miyake
Seguir
Vista de diapositivas
Denunciar
Compartir
Vista de diapositivas
Denunciar
Compartir
1 de 76
Descargar ahora
Descargar para leer sin conexión
Recomendados
php.js
php.js
Kenta USAMI
【Excelデータ入力の技】確定した漢字を再度変換し直す
【Excelデータ入力の技】確定した漢字を再度変換し直す
H S
Scaletta 2
Scaletta 2
Ergys Estrefi
20130216 シェル芸爆破デスマッチ勉強会
20130216 シェル芸爆破デスマッチ勉強会
Ryuichi Ueda
20130413シェル芸勉強会スライド
20130413シェル芸勉強会スライド
Ryuichi Ueda
Ultra piet
Ultra piet
京大 マイコンクラブ
Pietのエディタを作った話
Pietのエディタを作った話
京大 マイコンクラブ
20130223 OSC Tokyo/Spring
20130223 OSC Tokyo/Spring
Ryuichi Ueda
Recomendados
php.js
php.js
Kenta USAMI
【Excelデータ入力の技】確定した漢字を再度変換し直す
【Excelデータ入力の技】確定した漢字を再度変換し直す
H S
Scaletta 2
Scaletta 2
Ergys Estrefi
20130216 シェル芸爆破デスマッチ勉強会
20130216 シェル芸爆破デスマッチ勉強会
Ryuichi Ueda
20130413シェル芸勉強会スライド
20130413シェル芸勉強会スライド
Ryuichi Ueda
Ultra piet
Ultra piet
京大 マイコンクラブ
Pietのエディタを作った話
Pietのエディタを作った話
京大 マイコンクラブ
20130223 OSC Tokyo/Spring
20130223 OSC Tokyo/Spring
Ryuichi Ueda
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Más contenido relacionado
Destacado
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Destacado
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
zsh symbolic programming
1.
zsh で
記号プログラミング 2011年1月8日 mollifier
2.
自己紹介
はてな : id mollifier twitter : @mollifier 神戸のプログラマ
3.
好きなもの
zsh vim vimperator Ubuntu
4.
ブログとか
はてなダイアリー http://d.hatena.ne.jp/mollifier/ twitter http://twitter.com/mollifier slideshare http://www.slideshare.net/mollifier github https://github.com/mollifier
5.
zsh で記号 プログラミングに挑戦
6.
例えばこんな時 ...
7.
よし、 プログラムを 書くぞ!
8.
あああ!!!
9.
キーボードが 壊れてしまった!
10.
アルファベットと 数字のキーが効かない!
11.
今日中に Hello World
を 納品しないと 会社が潰れてしまうのに!
12.
記号のキーだけは使える んだけど、 記号だけでどうやって Hello World を書けばい いんだ
13.
その仕事、 俺に任せて みないか
14.
というわけで
15.
記号プログラミングとは
16.
アルファベット、 数字を使わずに 記号だけで プログラムを書くこと
17.
いろいろあります
18.
これは何でしょうか? ''=~('(?{'.('[[).[|`%,,/`[/ [@$'^'+)@@/^(@@@@@,@),@').'!
"})')
19.
Perl の Hello world!でした
% perl kigou.pl Hello world!
20.
いろんな言語で 記号プログラミングされ ています
21.
シェルの中でも 最強の zsh
22.
当然 記号プログラミング でも最強
23.
今日は zsh で 記号プログラミングに 挑戦
24.
記号だけで Hello, world! を 出力します
25.
ソースコード
26.
:;__=$?;((___=!__));((____=___+___)); ((_____=____+___));((______=_____+___)); ((_______=______+___));((________=____*_____)); ((_________=________+___)); ((__________=____*______)); ((___________=_____*_____));____________=$(% |& >& $___);$____________[-$______]$____________[- $____$____]$____________[-$_______]$____________[- $___$_________]
"$__$___$___$__ $__$___$______$_______$__$___$_______$______ $__$___$_______$______ $__$___$_______$_________, $__$___$________$_________ $__$___$_______$_________$__$___$________$____ $__$___$_______$______$__$___$______$______!"
27.
記号だけで 読みやすいですね
28.
解説
29.
最終的に echo "Hello, world!" を実行したい
30.
その前にまず 0 から
9 までの数字を作る
31.
これで 0 : __=$?
32.
: は何もしないコマンド。 戻り値は 0
なので それを __ という変数に代入 : __=$?
33.
0 を否定すると 1 ((___=!__))
34.
あとは足し算。 1 + 1
で 2 ((____=___+___))
35.
2 + 1
で 3 ((_____=____+___))
36.
順番に 9 まで作る
37.
次に "Hello, world!" の部分
38.
実は Ascii コードで 書ける %
echo "0101" A
39.
8進数の Ascii コード
で書けば OK echo "0110014501540154 0157, 0167015701620 1540144!"
40.
数字はさっき作ったので
41.
記号に置き換える echo "$__$___$___$__ $__$___$______$_______ $__$___$_______$______ $__$___$_______$______ $__$___$_______$_________, $__$___$________$_________ $__$___$_______$_________ $__$___$________$____ $__$___$_______$______ $__$___$______$______!"
42.
この Ascii コードで 表せるという機能
43.
普段は全く役に立たない
44.
まさに記号プログラミン グのためにある機能
45.
右の文字列の部分は 記号で表せた
46.
でもまだ echo が残ってる
47.
ここで、突然ですが zsh で %
コマンドを 実行
48.
zsh -c '%'
49.
zsh:fg:1: no job control
in this shell.
50.
エラーメッセージが 出力された
51.
よーく見ると... zsh:fg:1: no job control
in this shell.
52.
よーく見ると... zsh:fg:1: no job control
in this shell.
53.
e c h
o の 4文字が! zsh:fg:1: no job control in this shell.
54.
これだ!!
55.
このエラーメッセージ を変数に代入する msg=$(% 2>&1)
56.
2 と 1
を記号に置き 換えて... msg=$(% $____>&$___)
57.
リダイレクトできない! msg=$(% $____>&$___) no job
control in this shell.
58.
リダイレクトの左側は 変数に置き換えれない msg=$(% $____>&$___)
これがだめ
59.
いったん変形する msg=$(% 2>&1 |
cat)
60.
置き換え可能 msg=$(% 2>&1 |
cat) msg=$(% |& cat)
61.
さらに変形する msg=$(% |& cat
>& 1)
62.
この cat は省略可能 msg=$(%
|& cat >& 1) msg=$(% |& >& 1)
63.
コマンドを指定せずに リダイレクトだけ書く と cat コマンドを指 定したことになる %
ls ~ | > home.txt
64.
この機能も普段は 全く役に立たない
65.
記号プログラミングを やると どうでもいいことばか り覚えてしまう
66.
ここまで来たので msg=$(% |& >&
1)
67.
変数名と 1 を
記号に置き換える ____________=$(% |& >& $___)
68.
エラーメッセージを 変数に代入できた
69.
文字列の一部分には 添え字でアクセスできる $____________[-4] #=> e
70.
これで echo が作れる $____________[-4] $____________[-22] $____________[-5] $____________[-17]
71.
添え字の数字を 記号に置き換えると...
72.
:;__=$?;((___=!__));((____=___+___)); ((_____=____+___));((______=_____+___)); ((_______=______+___));((________=____*_____)); ((_________=________+___)); ((__________=____*______)); ((___________=_____*_____));____________=$(% |& >& $___);$____________[-$______]$____________[- $____$____]$____________[-$_______]$____________[- $___$_________]
"$__$___$___$__ $__$___$______$_______$__$___$_______$______ $__$___$_______$______ $__$___$_______$_________, $__$___$________$_________ $__$___$_______$_________$__$___$________$____ $__$___$_______$______$__$___$______$______!"
73.
できた!
74.
いざ実行
75.
みなさんも 記号プログラミングに 挑戦してみてください
76.
ありがとうございました
Descargar ahora