midi - like json
on / off which note
gem install midilib
gem install midiator
achaeopteryx
lambda - evals on call
foo.bar = lambda { return "bar" }
foo.bar[]
- inject, probability matrix (associating things w/ probability)
- pages == inbound_links
- probability distribution
- probability matrix (5 lines)
- python, where's the dick jokes?
Prediction using Bayes' theorem
P = F/T
Probabilistic Reasoning in Internet Systems by Judea Pearl
Probability of Raining
using Reason
drum machine - t/f
drum probability hash, array of floats
note number - the sample note number
the float - ceiling (red/green light gate)
midi patch bay
awesome live music
lambda involvement
lots ways to make apps, lots ways to serve apps
- env - hash (cgi-like headers, rack-specific vars)
- Apps - object that responds to #call
- Response - #=> [status, headers, body]
calls #call(app) and returns response so wrapper can use the response
Rack::Builder.[use, map, run]
#to_app (rack url map)
Rack::Handler::WEBrick.run app
uses Rack::Builder
Which app to run? Like Sinatral DSL
Rack::Lint & Rack::ShowExceptions
racksh
Rack::Bug
Rack::Debug
rack/lib
rack-contrib
app -> requirements vs requirements -> app
basic plan -> (app -> modularity) x N
alias_method_chain
modularity - reduce assumption to increase reuse
reuse case exists?
include application.routes.route_helpers
Don't hardcode, store things in global
class_attribute :perform_caching
Controller -> ViewPathSet -> ViewPath -> Template
github.com/paul
- persistent connections - prevent recreating/deconstructing tcp connections
- User Agent
- Origin Server
- Caching Proxy
expires - datetime something is stale after
response.headers['Expires']
max-age - number of seconds something should live
last-modified / if-modified-since
e-tag / if-none-match
fresh_when
last_modified = Somrero.max(:updated_at)
if stale?(:last_modified -> last_modified)
...
end
Vary header - except header
Cache-Control: public, private(intermediate should not cache), no-cache, no-store
guidelines for using HTTP
HATEOAS - Hypertext As The Engine Of Application State
Sessions - cookies for AUTH? Vary on the cookie, cache is less effective
... Who turned off the lights? =_=;;
ruby-processing
def setup; end # runs once
def draw
background 255
fill rand(255), rand(255), rand(255)
save "something.png"
exit
end # loops until exit
18mb gem...
rp5 ... ...
using beanstalkd to queue jobs to generate images
video processing, tag video
using efficient workers to distribute: 2d images, 3d images, audio & video
Book by Hugo Gernsback
100M connection in Japan
Better hardware
Software trend
Dec 21, 1995 - Ruby public release version 0.95
Extreme Language Design - if something is good, use everywhere (all or none)
mixins are good, only allow single inheritence
- dRuby / Rinda
- Message Queue
- multi-core
- small -> embedding - smaller implementation (alternative?), atomic ruby
- improve NArray (/w libjit)
- MPI Ruby
- AOT Compiler
- more modular
- Selector Namespace - limit the effectiveness of name overriding
- scoped mathn, for example
- more functional
Traits - operational combination of features (methods) (module operation +,-)
defmacro