Sinatra in 8 lines
github.com
github.com
<@insomnia> it only takes three commands to install Gentoo
<@insomnia> cfdisk /dev/hda && mkfs.xfs /dev/hda1 && mount /dev/hda1 /mnt/gentoo/ && chroot /mnt/gentoo/ && env-update && . /etc/profile && emerge sync && cd /usr/portage && scripts/bootsrap.sh && emerge system && emerge vim && vi /etc/fstab && emerge gentoo-dev-sources && cd /usr/src/linux && make menuconfig && make install modules_install && emerge gnome mozilla-firefox openoffice && emerge grub && cp /boot/grub/grub.conf.sample /boot/grub/grub.conf && vi /boot/grub/grub.conf && grub && init 6
<@insomnia> that's the first one ['rack', 'tilt', 'backports', :INT, :TERM].map{|l|(l==l.to_s)?(require(l)):(trap(l){$r.stop})}
$n=Sinatra=Module.new{$a,$o,$d,$h,$s,$f,$p=Rack::Builder.new,Object,:define_method,Hash,/@@ *([^\n]+)\n(((?!@@)[^\n]*\n)*)/m,File,4567;Application=$a}
%w[get post put delete].map{|m|$o.send($d,m){|u,&b|$a.map(u){run->(e){[200,{"Content-Type"=>"text/html"},[$a.instance_eval(&b)]]}}}}
Tilt.mappings.map{|k,v|$o.send($d,k){|n,*o|$t||=$f.read(caller.first[/^[^:]+/]).scan($s).inject({}){|h,(a,b,c)|h[a]=b;h};v.new(*o){(n.to_s==n)?(n):($t[n.to_s])}.render($a,o[0].try(:[],:locals)||{})}}
%w[set enable disable configure helpers use register].map{|m|$o.send($d,m){|*_,&b|b.try(:[])}};at_exit{Rack::Handler.get("webrick").run($a,:Port=>$p){|s|$r=s}}
['params', 'session', Rack::Session::Cookie, Rack::Lock].map{|m|(m==m.to_s)?($o.send($d,m){$q.send(m)}):($a.use(m))}
$o.send($d,:before){|&b|$a.use(Rack::Config,&b)};before{|e|$q=Rack::Request.new(e);$q.params.dup.map{|k,v|params[k.to_sym]=v}}
puts "== Almost #$n/No Version has taken the stage on #$p for development with backup from Webrick"> wrap at 200 characters to make it readable on a terminal
What happened to the days of 80 character line limits?
Subtracting two for `diff` output, I hard-wrap all of my source-code and documentation files at column 113 exactly, and have for quite a while. It results in some quite sane output, in my opinion: https://github.com/elliottcable/Paws.c/blob/d2a5f3f/Source/P...
There are, of course, arguments to be made about source code itself; arguments you didn’t generally need to worry about at 78 characters, but that start to come into play when given that extra 35 columns; you need to start worrying about whether a given line of code is sane or readable once it starts to stretch towards 113 characters. There’s some situations where that’s perfectly normal and looks fine; but there’s also several where that indicates a serious problem in your code’s style. It’s just one more thing to think about while you design your source code.
I would have assumed that this sort of thing was simply an unquantifiable aesthetic preference (as long as you're below the char width of the screen, of course). I'm very interested in learning more about how you can come up with a 'right' answer to this sort of question, since I struggle with similar problems all the time (website layouts, etc).
I now write better (i.e. flatter) code that is easier to compare to my other (better :-P) code.
Highly recommended.
I much prefer _why.
In all seriousness, they both were(are) awesome ruby developers and I wish they would come back and code more. We still use mongrel for our Rails app where I work and I've used shoes to develop a desktop client for our application.
Which for some, make him an asshole.