z, ? | toggle help (this) |
space, → | next slide |
shift-space, ← | previous slide |
d | toggle debug mode |
## <ret> | go to slide # |
c, t | table of contents (vi) |
f | toggle footer |
r | reload slides |
n | toggle notes |
p | run preshow |
/* obligatory Perl joke (omitted for brevity) */
$ signore prego
// sometimes I believe compiler ignores all my comments
$ signore prego Lisp
Lisp: from the people who didn’t bring you AI.
$ signore prego Python
If I wanted just one way of doing things, I would
have joined the army, not get involved in computers.
[Abigail, hates-software]
$ signore prego Ruby
Cloud is to datacenter what Ruby is to assembler.
[DevOps Borat]
$ signore prego Python Ruby
Python has three idiomatic ways to flatten a list, depending
on who you ask. Two are O(n²). Ruby has one way. It’s O(n).
[Gary Bernhardt]
$ signore prego Python Ruby
‘I swear, Ruby has more syntax for creating strings than Python has total.’
‘"what" + %[are] + <<STR you STR + %q(talking) + 'about?'’
[Gary Bernhardt, Jeff Forcier]
$ signore prego Lisp ~Python Ruby
I love Ruby’s optional parentheses. Lisp doesn’t have optional parentheses.
[Jamis Buck]
$ signore pronto Lisp
text?
(What the world needs (I think) is not (a Lisp (with fewer parentheses))
but (an English (with more.)))
author?
Brian Hayes
source?
The Semicolon Wars
subject?
(What the world needs (I think) is not (a Lisp (with
fewer parentheses)) but (an English (with more.)))
[Brian Hayes, The Semicolon Wars]
map ,ss G?^-- $<CR><Down>dG:r! signore prego<CR>Go<CR><CR><Esc>
map ,ss G?^-- $<CR><Down>dG:r! signore prego<CR>Go<CR><CR><Esc>
map ,st G?^-- $<CR><Down>dG:r! signore prego tech<CR>Go<CR><CR><Esc>
map ,ss G?^-- $<CR><Down>dG:r! signore prego<CR>Go<CR><CR><Esc>
map ,st G?^-- $<CR><Down>dG:r! signore prego tech<CR>Go<CR><CR><Esc>
map ,se G?^-- $<CR><Down>dG:r! signore prego en<CR>Go<CR><CR><Esc>
map ,ss G?^-- $<CR><Down>dG:r! signore prego<CR>Go<CR><CR><Esc>
map ,st G?^-- $<CR><Down>dG:r! signore prego tech<CR>Go<CR><CR><Esc>
map ,se G?^-- $<CR><Down>dG:r! signore prego en<CR>Go<CR><CR><Esc>
map ,slp G?^-- $<CR><Down>dG:r! signore prego pl ~tech<CR>Go<CR><CR><Esc>
# it’s in the standard library
# and has Marshal and YAML backends
require 'yaml/store'
store = YAML::Store.new 'sigs.yml'
# sigs are author + text structures
Sig = Struct.new(:author, :text)
# sigs are author + text structures
Sig = Struct.new(:author, :text)
store.transaction do
store['db'] ||= []
end
# sigs are author + text structures
Sig = Struct.new(:author, :text)
store.transaction do
store['db'] ||= []
store['db'] << Sig.new('Tim Pope',
'I wonder if the guy that wrote BigDecimal#inspect has ' +
'a tragic backstory that explains why he hates humanity.')
end
# sigs are author + text structures
Sig = Struct.new(:author, :text)
store.transaction do # a read/write transaction…
store['db'] ||= []
store['db'] << Sig.new('Tim Pope',
'I wonder if the guy that wrote BigDecimal#inspect has ' +
'a tragic backstory that explains why he hates humanity.')
store['db'] << Sig.new('Pаul Bаttley',
'I’d love to see an honest Ruby job ad. ‘You will spend half ' +
'your time running bundle install & the other half facepalming.’')
end # …is atomically committed here
# read-only transactions can be concurrent
# and raise when you try to write anything
store.transaction(true) do
store['db'].each do |sig|
puts sig.text
puts '-- ' + sig.author
puts
end
end
$ ruby sigs.rb
I wonder if the guy that wrote BigDecimal#inspect has
a tragic backstory that explains why he hates humanity.
-- Tim Pope
I’d love to see an honest Ruby job ad. ‘You will spend half
your time running bundle install & the other half facepalming.’
-- Pаul Bаttley
$ cat sigs.yml
---
db:
- !ruby/struct:Sig
author: Tim Pope
text: I wonder if the guy that wrote BigDecimal#inspect
has a tragic backstory that explains why he hates humanity.
- !ruby/struct:Sig
author: Pаul Bаttley
text: I’d love to see an honest Ruby job ad. ‘You will spend half
your time running bundle install & the other half facepalming.’