Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rubyで簡単♪Quineの作り方
Search
けんぼー
July 26, 2015
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rubyで簡単♪Quineの作り方
ゆるふわRuby勉強会Chofu.rb(おためし版)(
http://connpass.com/event/17259/
)で発表したものです。
完成が間に合いませんでした。
けんぼー
July 26, 2015
Other Decks in Programming
See All in Programming
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.3k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
360
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
160
Java 27新機能 / Java 27 new features
kishida
2
220
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
130
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
JRuby: Past, Present, and Future
headius
0
230
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
570
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
setup-vp GitLab対応の裏側
naokihaba
0
160
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
Building AI with AI
inesmontani
PRO
1
1.3k
A designer walks into a library…
pauljervisheath
211
25k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
For a Future-Friendly Web
brad_frost
184
10k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
Prompt Engineering for Job Search
mfonobong
0
500
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Transcript
None
Rubyで簡単♪ Quineの作り方
Quineとは何か ・ 自分自身を出力するプログラム ・ チューリング完全の言語なら何でも出来る (例) ↓ 実行 ↓
基本的な作り方 1. 文字列を変数に代入する 2. 1.を展開して表示させる
イメージ s = 「putsで表示する内容」 puts “s = 「sの内容」\n puts 「sの内容」”
↓ 文字列リテラルとか特殊文字の扱いはどーする?
一行にするとこうなる 1. sに文字列を代入 2. sの内容を実行 a. putsで以下を表示 i. 元のコードの前半と同じ’eval s=’
ii. 変数sを呼び出す iii. inspectメソッドでリテラルを復元 結論:evalってスゴイ、改めてそう思った。
おわり
このままじゃ面白くない ↓ そうだ、AA作ろう。
文字を追加してみる