apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<imperator> MY COMPUTER HAS BEEN HACKED
<imperator> no seriously, which one of you fucked around with my compiler?
__Big0__ has quit [Remote host closed the connection]
__Big0__ has joined #ruby-lang
<banisterfiend> |\/|3
anonymuse has quit [Quit: Linkinus - http://linkinus.com]
<rue> *5m4c|<*
* imperator glares accusingly at rue and banisterfiend
<dorei> imperator: internet is full of cyber dangers these days
<banisterfiend> lots of preverts
<dorei> and bullies
<imperator> have this in my .bash_profile: export CFLAGS='--std=c99'
<imperator> don't remember why i put it there now, but clearly it was important
<banisterfiend> and insipid californians with anti-sexist agendas
Averna has joined #ruby-lang
<dorei> imperator: c99 is magic
retro|cz has joined #ruby-lang
mjio has quit []
<zenspider> less magic than c89 or pre-ansi... __UGH__
<zenspider> sure! it must be an int!
<imperator> dorei, http://replygif.net/336
hakunin_ has joined #ruby-lang
Guest14150 has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
davidbalbert is now known as davidbalber|away
urbanmonk has joined #ruby-lang
hakunin has quit [Ping timeout: 245 seconds]
datanoise has quit [Ping timeout: 256 seconds]
__butch__ has quit [Remote host closed the connection]
__Big0__ has quit [Remote host closed the connection]
KM has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
KM is now known as Guest85463
felipe has quit [Ping timeout: 248 seconds]
spuk has quit [*.net *.split]
zenspider has quit [*.net *.split]
tenderlove has quit [*.net *.split]
jashank_ has quit [*.net *.split]
rwjblue_ has quit [*.net *.split]
rhizmoe has joined #ruby-lang
certainty has joined #ruby-lang
wudofyr has quit [*.net *.split]
fuzzy8balls has quit [*.net *.split]
knu has quit [*.net *.split]
akamike has quit [*.net *.split]
thejspr_ has quit [*.net *.split]
Gate has quit [*.net *.split]
CoverSlide has quit [*.net *.split]
pbjorklund has quit [*.net *.split]
Muz has quit [*.net *.split]
totallymike has quit [*.net *.split]
earthquake has quit [Ping timeout: 248 seconds]
KillerFox has quit [Ping timeout: 248 seconds]
banisterfiend is now known as banister`sleep
robbyoconnor has quit [Ping timeout: 245 seconds]
KU0N has quit [Ping timeout: 248 seconds]
certainty has quit [Ping timeout: 248 seconds]
rhizmoe has quit [Ping timeout: 248 seconds]
eban has quit [Ping timeout: 248 seconds]
scrr has quit [Ping timeout: 248 seconds]
eban has joined #ruby-lang
scrr_ has joined #ruby-lang
kuon has joined #ruby-lang
BigFatFa1ty has left #ruby-lang [#ruby-lang]
KillerFox has joined #ruby-lang
datanoise has joined #ruby-lang
techlife has quit [Ping timeout: 264 seconds]
<zzak_> my resume comes with security vulns, thanks obama
* imperator launches a drone strike at zzak_
idkazuma has quit [Remote host closed the connection]
<dorei> java enabled resume? :p
<imperator> nah, he used eval somewhere
techlife has joined #ruby-lang
spuk has joined #ruby-lang
jashank_ has joined #ruby-lang
wudofyr has joined #ruby-lang
tenderlove has joined #ruby-lang
rwjblue_ has joined #ruby-lang
zenspider has joined #ruby-lang
knu has joined #ruby-lang
akamike has joined #ruby-lang
pbjorklund has joined #ruby-lang
CoverSlide has joined #ruby-lang
thejspr_ has joined #ruby-lang
Gate has joined #ruby-lang
totallymike has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
Muz has joined #ruby-lang
* ggreer <3 C89
<ggreer> (well, at least compared to other versions of C)
<banister`sleep> ggreer: what do you prefer about c89 vs c99 ?
<banister`sleep> c99 just seems better in every way
rsl has quit [Quit: Computer has gone to sleep.]
<dorei> but uint8_t,uint16_t,etc is magic :)
<dorei> less porting nightmares
<ggreer> with c89 I can keep the whole language in my head. it's a stupid, simple language
<banister`sleep> strict c89 sucks
<ggreer> c99 has lots of useful stuff, but I find myself constantly looking at docs
<ggreer> side note: ag is c89
<dorei> c89 is k&r c?
<ggreer> depends on the edition of the book, I think
<ggreer> a modern copy of the C book is probably all c89
mrsolo has quit [Quit: Leaving]
bantic has quit [Read error: Connection reset by peer]
fragamus has quit [Ping timeout: 248 seconds]
bantic has joined #ruby-lang
bantic has quit [Client Quit]
nXqd has joined #ruby-lang
jarib has joined #ruby-lang
jarib has quit [Changing host]
jarib has joined #ruby-lang
marr has quit [Ping timeout: 264 seconds]
cored has quit [Ping timeout: 272 seconds]
ivanoats has joined #ruby-lang
miquella has quit [Remote host closed the connection]
nXqd has quit [Ping timeout: 245 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
pkrnj has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Xzyx987X has quit [Ping timeout: 245 seconds]
jpwhiting has joined #ruby-lang
sailias has joined #ruby-lang
nkr has quit [Quit: Linkinus - http://linkinus.com]
<jpwhiting> hey all, I'm trying to get a ruby rails application to run on ubuntu 12.10 using ubuntu packages for all ruby gems
<jpwhiting> already had to package ruby-rack 1.1.6 since ubuntu only comes with 1.4.1 which is too new for ruby-rails 2.3
<zzak_> install the gems package and install them yourself
Mon_Ouie has quit [Ping timeout: 264 seconds]
<jpwhiting> now I'm getting a problem in the custom_require.rb saying it can't find initializer
<zzak_> (if you must use synaptic)
* jpwhiting needs to use only packages, not gems
<jpwhiting> I need to be able to say "install ubuntu/debian packages x, y, and z, tweak the configuration file X and it will run"
<jpwhiting> no gem install blah messing stuff up or whatnot
<zenspider> oh look... it must be 2005
<zzak_> thats unfortunate
<jpwhiting> zzak_: why is it unfortunate?
<zenspider> you're making a rails app that'll ONLY run on ubuntu?
<jpwhiting> why does ruby have to be installed by gem?
<jpwhiting> zenspider: I'm packaging obs server to work on debian/ubuntu yes
<zzak_> you can you can use rack 1.4.x with rails 2.3.14
<jpwhiting> it's already packaged on suse
<jpwhiting> zzak_: yep, I realize that, that's why I packaged ruby-rack 1.1.6 :)
<zzak_> you said "since ubuntu only comes with 1.4.1 which is too new for ruby-rails 2.3"
<jpwhiting> the trouble is when I run rake --trace db:setup it can't find ruby-rails 2.3's initializer.rb
<zzak_> but that is wrong
<zzak_> nvm
<zzak_> do any rails commands work?
<jpwhiting> zzak_: dunno, how do I check
Honeycomb has joined #ruby-lang
<zenspider> this seems like a #rubyonrails issue
<zzak_> "rails --help"
<zzak_> that too
<jpwhiting> zzak_: inside irb require 'rubygems' works, then require 'rails' fails
<zzak_> did you install ruby-rails-2.3 package?
Mon_Ouie has joined #ruby-lang
ivanoats has quit [Ping timeout: 272 seconds]
<jpwhiting> zzak_: yep
<jpwhiting> require 'rails' gives "LoadError: no such file to load -- rails
<jpwhiting> in /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
<zzak_> then try submitting a bug to launchpad: https://launchpad.net/ubuntu/+source/ruby-rails-2.3
sailias has quit [Read error: Connection reset by peer]
<zzak_> afaik, it should just work if you install that package
<jpwhiting> gem list does show rails (2.3.14
sailias has joined #ruby-lang
wardrop has quit [Ping timeout: 272 seconds]
<jpwhiting> zzak_: yes, the problem is it doesn't "just work" I've heard from a few places that the ubuntu/debian packaging of ruby is bad, and I'm finding out myself why
<zzak_> try reporting the bug to launchpad or the ubuntu q&a forum
<jpwhiting> now I need to fix it and provide patches to ubuntu probably with fixes
bousquet has joined #ruby-lang
<jpwhiting> but first I need it to work locally so I know what the problem is :) so then I can give them patches that fix the issues
NemesisD has quit [Ping timeout: 264 seconds]
<zzak_> i think zenspider is right, you're barking up the wrong tree. try #ubuntu or #rubyonrails if you cant get help on launchpad or via ubuntu community resources
<jpwhiting> k, /me asks on rubyonrails, thx
sailias has quit [Client Quit]
pkrnj has quit [Quit: Computer has gone to sleep.]
lsegal has joined #ruby-lang
<jpwhiting> zzak_: why did you say "but that is wrong" doesn't ruby-rails 2.3 require ruby-rack ~>1.1.0 ?
<jpwhiting> i.e. ruby-rack 1.4.1 wont work
mistym has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<zenspider> sounds like the ruby-rails package either doesn't install railties properly (or at all)
<zenspider> jpwhiting: he also said n/m
pkrnj has joined #ruby-lang
<zenspider> I sorta like the idea at ubuntu packages a too new version of rack and a too old version of rails and they don't play together well. :)
<jpwhiting> zenspider: ah, ok
<jpwhiting> hmm, the only railties package is ruby-railties-3.2
<jpwhiting> that goes with ruby-rails 3.2 not 2.3 right?
<zenspider> yup
pkrnj has quit [Client Quit]
<zenspider> ah
<zenspider> no
<jpwhiting> no?
<zenspider> the problem is much easier
<zenspider> there is no "rails" to require in 2.3
<zenspider> so your test is a false negative
io_syl has quit [Quit: Computer has gone to sleep.]
levifig has quit [Excess Flood]
<jpwhiting> rails 2.3 doesn't provide a gem or something to require?
<zenspider> do: require "rails/version"
<jpwhiting> require 'rails/2.3.14' fails the same way
mistym has quit [Remote host closed the connection]
<jpwhiting> oh, or do you mean require 'rails', '2.3.14'
levifig has joined #ruby-lang
<zenspider> no, I mean require "rails/version"
<jpwhiting> rails/version ? interesting, ok
pkrnj has joined #ruby-lang
levifig has quit [Excess Flood]
Xzyx987X has joined #ruby-lang
<jpwhiting> so require 'rails/version' works fine, but rake --trace db:setup still fails because it can't find initializer
<zenspider> so now you know you have it installed correctly
<zenspider> can you require "initializer" ?
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<jpwhiting> nope
<jpwhiting> same error as I get from rake
<jpwhiting> LoadError: no such file to load -- initializer
levifig has joined #ruby-lang
<zenspider> well... I'm looking at 2.3.9 and there is both a lib/initializer.rb and lib/rails/version.rb in railties
<zenspider> so maybe you still have a packaging issue
<zenspider> you'll have to probe the package for that
Honeycomb has quit [Quit: Leaving.]
gregmore_ has quit [Ping timeout: 245 seconds]
<jpwhiting> yes, I also have /usr/lib/ruby/vendor_ruby/rails/version.rb
cirenyc has joined #ruby-lang
<jpwhiting> zenspider: strace rake --trace db:setup shows it's looking for initializer.rb in /usr/share/rubygems-integration/1.8/gems etc.
cirenyc has quit [Client Quit]
<jpwhiting> but it's in /usr/lib/ruby/vendor_ruby/
<zenspider> jesus ubuntu fucks everything up
<jpwhiting> indeed
<jpwhiting> btw, which distro are you using?
<zenspider> so it looks like you have a pathing issue
<zenspider> make sure that directory is in your $LOAD_PATH
<jpwhiting> exactly
<jpwhiting> any idea how I can fix it? does ruby use env variables?
<jpwhiting> RUBY_LOAD_PATH or just LOAD_PATH?
<zenspider> don't assume I use a "distro". I work primarily on osx and freebsd
<jpwhiting> ah, gotcha
<jpwhiting> cool
<zenspider> jpwhiting: well... I assume if you can require "rails/version" that SOMETHING is pointing you at that directory... or you have something REALLY messed up like a mix of gems and packages
<zenspider> actually... worry about the latter
<jpwhiting> mix of gems and packages? that's definitely possible?
<jpwhiting> mix of gems and packages? that's definitely possible.
<jpwhiting> I did gem install at one point to try to get this to "just work" but it didn't :)
<jpwhiting> I nuked everything from /var/lib/gems though, so shouldn't have any gems left around
<jpwhiting> though I did find rails was in /usr/local/bin, so maybe some things are still there...
<zenspider> I'm guessing you don't have vendor_ruby in your pathing, but you DO have some mix of gems
<zenspider> tho how you don't have initializer... maybe you have something in the 2.2 series installed. I don't remember when the initializer stuff come to fruition
pabloh has quit [Quit: Saliendo]
<jpwhiting> initializer is itself a gem?
<jpwhiting> I thought it was just part of ruby-rails 2.3
<jpwhiting> but that was just a guess since ruby-rails-2.3 provided an initializer.rb file
<jpwhiting> I don't see any initializer ruby gem though
mistym has joined #ruby-lang
Domon has joined #ruby-lang
<jpwhiting> zenspider: how can I tell what paths I do have?
<jpwhiting> LOAD_PATH is the only thing with vendor_ruby in it, and only because I just added it
<jpwhiting> for environment variables
<zenspider> initializer is just a file in railties
<jpwhiting> ok, that's what I was thinking, ok
<zenspider> why ubuntu installs stuff into a directory that they don't have added to their packaged ruby is beyond me
<jpwhiting> gem env shows /usr/share/rubygems-integration/1.8
pkrnj has quit [Quit: Computer has gone to sleep.]
<jpwhiting> in GEM PATHS
<zenspider> that's fine
<jpwhiting> zenspider: maybe they have added it to their packaged ruby
<jpwhiting> how can I check
<zenspider> but that isn't the path you have above
<zenspider> you checked
<zenspider> you had to add the directory to $LOAD_PATH
<jpwhiting> ah, the strace
<zenspider> which means they didn't
<jpwhiting> even adding it to LOAD_PATH didn't help
<jpwhiting> what's supposed to set LOAD_PATH ?
<zenspider> I have yet to say LOAD_PATH
<zenspider> I've said $LOAD_PATH _every_ time
<jpwhiting> oh
<jpwhiting> not a bash environment variable?
<jpwhiting> i.e. export LOAD_PATH=blah
<jpwhiting> echo $LOAD_PATH
<zenspider> we're not in #bash, we're in #ruby-lang
<zenspider> ruby sets $LOAD_PATH with a bunch of stuff calculated at compile time
<jpwhiting> ok
<jpwhiting> how do I set $LOAD_PATH then?
<zenspider> rubygems adds a ton to it, based on gem activations during runtime
<zenspider> jpwhiting: presumably... you use a non-broken ruby with non-broken packages
<zenspider> either the gem packaging is broken or the ruby is
<jpwhiting> ok, where does non-broken ruby with non-broken packages set $LOAD_PATH ?
<zenspider> you can run with `ruby -Idir:dir:dir` manually
<zenspider> it sets it at startup time
<zenspider> if you were using rubygems, this would be a nonissue. you'd require a file, rubygems finds it, adds the loadpath, and then forwards the require up
<jpwhiting> zenspider: interesting, I'm beginning to think the best way to go forward is to install only rubygems then in the obs-api postinst run gem1.8 install rails
<jpwhiting> and go
MehLaptop has joined #ruby-lang
<jpwhiting> forget about these silly broken beyond belief debian/ubuntu ruby packages
<zenspider> not to say that ubuntu didn't also break their rubygems... I think they mostly just neutered updating
<jpwhiting> it's possible
<jpwhiting> anyway, I'll change my approach tomorrow and see how far that gets me
<jpwhiting> thanks for the pointers
<zenspider> good luck
<jpwhiting> thanks
datanoise has quit [Ping timeout: 255 seconds]
ilyam has quit [Quit: ilyam]
iamjarvo has joined #ruby-lang
mjio has joined #ruby-lang
wardrop has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 276 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
krohrbaugh has quit [Quit: Leaving.]
priodev has quit [Ping timeout: 264 seconds]
kuon has quit [Quit: Linkinus - http://linkinus.com]
cirenyc has joined #ruby-lang
priodev has joined #ruby-lang
cyri_ has quit [Ping timeout: 276 seconds]
sn0wb1rd has joined #ruby-lang
datanoise has joined #ruby-lang
swav has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
sebasoga has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby-lang
soypirate has quit [Ping timeout: 256 seconds]
gregmore_ has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
srbaker has joined #ruby-lang
joevandyk has joined #ruby-lang
gregmore_ has quit [Ping timeout: 272 seconds]
srbaker has quit [Ping timeout: 240 seconds]
srbaker has joined #ruby-lang
datanoise has joined #ruby-lang
__Big0__ has joined #ruby-lang
levifig has quit [Excess Flood]
levifig has joined #ruby-lang
__Big0__ has quit [Remote host closed the connection]
bousquet has quit [Remote host closed the connection]
pr0ton has quit [Quit: pr0ton]
joevandyk has quit [Quit: joevandyk]
wardrop has left #ruby-lang [#ruby-lang]
__Big0__ has joined #ruby-lang
chendo_ has quit [Ping timeout: 264 seconds]
chendo_ has joined #ruby-lang
hasimo has quit [Remote host closed the connection]
myobie has joined #ruby-lang
ilyam has joined #ruby-lang
hasimo has joined #ruby-lang
kgrz has joined #ruby-lang
lsegal` has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
hasimo has quit [Remote host closed the connection]
bluepojo_ has joined #ruby-lang
krohrbaugh has joined #ruby-lang
hasimo has joined #ruby-lang
bluepojo has quit [Ping timeout: 276 seconds]
lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
bluepojo_ has quit [Ping timeout: 240 seconds]
intellitech has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
fire has joined #ruby-lang
jnoon has quit []
datanoise has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby-lang
jnoon has joined #ruby-lang
__Big0___ has joined #ruby-lang
myobie has quit [Quit: myobie]
dorei has quit []
__Big0__ has quit [Ping timeout: 260 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
hasimo has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: I will be right back]
datanoise has joined #ruby-lang
noesis has quit [Read error: Connection reset by peer]
S2kx has joined #ruby-lang
S2kx has quit [Remote host closed the connection]
MehLaptop has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 0.4.0]
hasimo has joined #ruby-lang
sush24 has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
r0bgleeson has quit [Quit: WeeChat 0.3.8]
__Big0___ has quit [Remote host closed the connection]
mjio has quit []
drbrain has quit [Read error: Connection reset by peer]
urbanmonk has left #ruby-lang [#ruby-lang]
drbrain has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
pkrnj has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
dc5ala has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
xalei has quit [Ping timeout: 260 seconds]
tomzx_mac has quit [Ping timeout: 264 seconds]
sebasoga has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
dankest has joined #ruby-lang
drbrain has quit [Ping timeout: 276 seconds]
drumond19 has quit [Remote host closed the connection]
dankest has quit [Quit: Linkinus - http://linkinus.com]
ritek has joined #ruby-lang
rippa has joined #ruby-lang
kgrz has joined #ruby-lang
zomgbie has joined #ruby-lang
dc5ala has quit [Ping timeout: 276 seconds]
mjio has joined #ruby-lang
mjio has quit [Client Quit]
ryanf has quit [Quit: leaving]
NemesisD has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
drbrain has joined #ruby-lang
mercwithamouth has quit [Remote host closed the connection]
mercwithamouth has joined #ruby-lang
torrieri has joined #ruby-lang
kgrz has joined #ruby-lang
felipe has joined #ruby-lang
QaDeS has joined #ruby-lang
ryanf has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
fire has quit [Ping timeout: 276 seconds]
rue has quit [Remote host closed the connection]
fire has joined #ruby-lang
xcombelle has joined #ruby-lang
fire has quit [Excess Flood]
kgrz has quit [Quit: Computer has gone to sleep.]
mistym has quit [Remote host closed the connection]
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
kgrz has joined #ruby-lang
rue has joined #ruby-lang
fire has joined #ruby-lang
fire has quit [Excess Flood]
Mon_Ouie has joined #ruby-lang
sebasoga has quit [Quit: Computer has gone to sleep.]
rue has quit [Remote host closed the connection]
fire has joined #ruby-lang
datanoise has quit [Ping timeout: 250 seconds]
io_syl has joined #ruby-lang
fire has quit [Ping timeout: 272 seconds]
Rarrikins_m has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
<eam> I have a hash and I'd like to eval an ERB template with the hash keys exported as variable names with their corresponding values
<eam> what's the easiest way to do that?
Rarrikins has quit [Ping timeout: 256 seconds]
<apeiros_> create an openstruct with it and eval in the binding of that
iamjarvo has quit [Quit: Leaving.]
<eam> aaah
<eam> thanks
fire has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
nXqd has joined #ruby-lang
sepp2k has joined #ruby-lang
NemesisD has quit [Ping timeout: 272 seconds]
datanoise has joined #ruby-lang
Honeycomb has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 276 seconds]
apeiros_ has quit [Remote host closed the connection]
nXqd has quit [Ping timeout: 264 seconds]
nXqd has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
runeb has joined #ruby-lang
runeb has quit [Ping timeout: 250 seconds]
nXqd has quit [Read error: Connection reset by peer]
nXqd has joined #ruby-lang
beho has joined #ruby-lang
nXqd has quit [Ping timeout: 245 seconds]
nXqd has joined #ruby-lang
dcwu has joined #ruby-lang
jigfox has quit [Quit: jigfox]
Honeycomb has quit [Quit: Leaving.]
workmad3 has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 276 seconds]
workmad3 has quit [Quit: leaving]
ilyam has quit [Quit: ilyam]
postmodern has quit [Quit: Leaving]
Averna has quit [Quit: Leaving.]
Honeycomb has joined #ruby-lang
benlovell has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
pepper_chico has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
fire has quit [Ping timeout: 260 seconds]
beho has quit [Remote host closed the connection]
zmack has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
marr has joined #ruby-lang
runeb has joined #ruby-lang
jxie has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
r0bby has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
runeb has quit [Ping timeout: 248 seconds]
robbyoconnor has quit [Ping timeout: 245 seconds]
xcombelle has quit [Remote host closed the connection]
jigfox has joined #ruby-lang
wallclockbuilder has joined #ruby-lang
Criztian has joined #ruby-lang
scottj has joined #ruby-lang
barttenbrinke has joined #ruby-lang
kristofferrr has joined #ruby-lang
gnufied has joined #ruby-lang
ryanf has quit [Quit: leaving]
maxmanders has joined #ruby-lang
anildigital_work has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
Tn6o has joined #ruby-lang
retro|cz has quit [Ping timeout: 252 seconds]
zomgbie has quit [Ping timeout: 256 seconds]
setmeaway2 has joined #ruby-lang
adambeynon has joined #ruby-lang
joooooo has quit [Ping timeout: 264 seconds]
setmeaway2 has quit [Ping timeout: 272 seconds]
Axsuul has quit [Ping timeout: 240 seconds]
jashank_ has quit [Changing host]
jashank_ has joined #ruby-lang
jashank_ is now known as jashank
anildigital_work has joined #ruby-lang
setmeaway has joined #ruby-lang
francisfish has joined #ruby-lang
kgrz has joined #ruby-lang
beho has joined #ruby-lang
sush24 has joined #ruby-lang
datanoise has joined #ruby-lang
solars has joined #ruby-lang
<yorickpeterse> morning
mytrile has joined #ruby-lang
runeb has joined #ruby-lang
datanoise has quit [Ping timeout: 245 seconds]
alessio_rocco has joined #ruby-lang
Tn6o has quit [Ping timeout: 245 seconds]
judofyr has joined #ruby-lang
torrieri has quit [Quit: Linkinus - http://linkinus.com]
dcwu has quit [Quit: Leaving.]
gnufied has quit [Quit: Leaving.]
beiter has joined #ruby-lang
toretore has joined #ruby-lang
gnufied has joined #ruby-lang
<whitequark> moo
<judofyr> moo moo
<apeiros_> bleeeh
<yorickpeterse> Since when did this turn into #farm-lang?
Honeycomb has quit [Quit: Leaving.]
<jaska> oink
dbck has joined #ruby-lang
Tn6o has joined #ruby-lang
Rarrikins has joined #ruby-lang
Rarrikins_m has quit [Ping timeout: 250 seconds]
<injekt> andrewvos: no always wanted to though
<injekt> eam: I'd use an openstruct too but fwiw if you use erubis you can just pass the hash in
vlad_starkov has joined #ruby-lang
<andrewvos> injekt: Wow you answer that now
<injekt> andrewvos: i went to bed early lol
<andrewvos> injekt: Dude I ate the best fillet I have ever had in my life, last night
dbck has quit [Quit: Bye bye.]
<injekt> andrewvos: :D
charliesome has joined #ruby-lang
<injekt> there's one in london eh?
<andrewvos> yeah there's a few here
<injekt> ah yeah actually i remember seeing one ac piccadilly a few weeks ago when I went to watch the footy
<injekt> ah there's a ton in london, which one did you eat at?
<andrewvos> that one
<injekt> oh nice
<judofyr> haha
<judofyr> nice
<andrewvos> what a coincidence
<injekt> :D
<andrewvos> it is the best one I think
<andrewvos> well, I like it the most
<injekt> want
<andrewvos> went with my girlfriend, and the tables are far away from other people so you don't have some drunk twat banker near you
<andrewvos> which is always good
<injekt> yeah i hate it when tables are too close
<andrewvos> yeah
<andrewvos> makes it awkward
<judofyr> injekt: where are you located again?
<judofyr> so many names, so many places…
<injekt> judofyr: just outside of london
<judofyr> injekt: oh, so I was right (I thought London-ish)
<injekt> judofyr: you were :)
<judofyr> \o/
<injekt> company is canadian based and I travel there too, but still live around here
<andrewvos> injekt is a chav
<injekt> haha
<injekt> where is my flat cap
<andrewvos> :)
<andrewvos> that's posh
<injekt> heh
<injekt> sorry where is my strap back
<injekt> :D
<injekt> my head is too big for hats
<injekt> lol I wrote a library yesterday and it wasn't until I finished it I realized I spelled the name of it wrong throughout the entire thing
<injekt> derp
runeb is now known as Guest71309
Guest71309 has quit [Killed (pratchett.freenode.net (Nickname regained by services))]
Tn6o has quit [Quit: Lost terminal]
AndChat| has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 276 seconds]
<dominikh> injekt: we wouldn't expect any different :P
<injekt> glad im not disappointing anyone
<dominikh> son, you're disappointing everyone :P
<injekt> dominikh: shouldn't you be in uni?
<injekt> not learning anything
<dominikh> injekt: got about a month until lectures start again
<dominikh> wrote my last exam 2 days ago
<injekt> what you doing until then?
<dominikh> write a lot of lisp :D
<injekt> D:
<dominikh> hitting 1k soon :>
<injekt> 1k what?
<dominikh> loc
<injekt> whatcha writing?
<dominikh> still tweaking go-mode for emacs, and writing one or two extensions to that as well
<dominikh> got my go-mode into the Go repo now :>
<injekt> :D
<dominikh> first and probably only contribution to a google project ever: lisp.
<injekt> bet you didn't see that coming
<dominikh> considering I didn't know any real lisp a month ago, yeah :P
<apeiros_> dominikh: 1k? and without counting the parens? :-p
<injekt> aren't most lisp parens on the same damn lines as everything else to make it more confusing anyway?
<apeiros_> I'd write closing parens onto a separate line each
<apeiros_> just to fuck with the reader ^^
<injekt> it would work
<apeiros_> oh, unindented of course
<injekt> my brain hurts just thinking about that
sttau has joined #ruby-lang
<dominikh> apeiros_: the parens go on the same lines as code :P
dhruvasagar has quit [Ping timeout: 248 seconds]
<apeiros_> bah, where's the fun in that?
<dominikh> I did have a couple closing parens on lines by themselves, code review quickly caught that :P
rippa has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
<injekt> I love that 2.0 added #to_h
sepp2k has joined #ruby-lang
<dominikh> couple years late
<injekt> couple? heh
<injekt> couple centuries
<dominikh> well, I don't care what it lacked before I started using it :P
<dominikh> at most 2 centuries :P
<injekt> yes
<injekt> 2 == couple
<dominikh> screw monogamy
retro|cz has joined #ruby-lang
<injekt> screw monopoly
<dominikh> <3 magnetic monopoles
<whitequark> this escalated quickly
<dominikh> that's how we roll
<injekt> bread roll.
<dominikh> drum roll
<injekt> money roll
<dominikh> payroll
<judofyr> rick roll!
<dominikh> damn
<injekt> troll
<injekt> :D
<judofyr> (blæh, I should have pasted http://www.youtube.com/watch?v=dQw4w9WgXcQ instead)
<dominikh> Unfortunately, this video is not available in Germany because it may contain music for which GEMA has not granted the respective music rights
<injekt> wtf kind of character is that
<injekt> haxing up your blahs
<yorickpeterse> dominikh: heh, works here
<injekt> lol germany
<dominikh> yorickpeterse: you're not german, are you :P
<judofyr> injekt: it's åwesome
<yorickpeterse> No, I'm from Glorious Netherlands
<dominikh> yeah... you don't have the inglorious GEMA
<dominikh> but hey, upside, we're safe from rick rolls
<yorickpeterse> we have BREIN and Buma/stemra
<judofyr> can gem name contain unicode chars?
<judofyr> gem install <snowman>
<dominikh> yorickpeterse: they don't want lolhuge amounts per view from youtube though :)
<dominikh> *amounts of money
<injekt> judofyr: yes
<dominikh> snowman is the funniest you can come up with? how about RTL code in your gem name
<yorickpeterse> Hm interesting, Gem::Specification also takes Korean letters
<injekt> maybe, i thought someone did it
<yorickpeterse> gem install ㅋㅋㅋㅋㅋ
<injekt> I guess not
<injekt> ☃
<judofyr> injekt: I did consider writing an "æsj" gem. not quite sure what it should do yet.
<judofyr> but that's how I roll
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
<injekt> bread roll
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<judofyr> drum roll
<injekt> steam roll
<yorickpeterse> steam roll
<yorickpeterse> gah fuck
<injekt> judofyr: too early man too early
<judofyr> injekt: that's what she said?
<yorickpeterse> hurrhurr
<judofyr> I wonder if a sort-of reverse-your-mom joke would work here: "that's what my mom said after she visited you"
<dominikh> reverse your mom jokes never work.
sttau has quit [Remote host closed the connection]
<injekt> reversing your mom never works.
chendo_ has quit [Ping timeout: 276 seconds]
<dominikh> your mom's so bloated, reverse engineering her is impossible?
chendo_ has joined #ruby-lang
<yorickpeterse> probably runs Windows
<dominikh> and probably has malware
mytrile has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
<yorickpeterse> go back to work already
<judofyr> sounds like a good idea
<judofyr> this whole reverse business isn't working out
<yorickpeterse> that's what he said
AndChat| has quit [Ping timeout: 256 seconds]
<dominikh> haha, wow
cultureulterior has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
<judofyr> this channel is useless today…
alessio_rocco has quit [Ping timeout: 240 seconds]
alessio_rocco has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
zomgbie has joined #ruby-lang
<injekt> :D
tomzx_mac has joined #ruby-lang
<andrewvos> today?
<dominikh> I just wrote another emacs package :(
<dominikh> someone help me
<yorickpeterse> related: http://i.imgur.com/WLzeQMj.png
<yorickpeterse> http://www.reddit.com/r/linux/comments/19veq8/acme_vs_emacs_vs_vim/ the comments here are even better
mytrile has joined #ruby-lang
<andrewvos> haha
<dominikh> you know, it's nice when emacs finally isn't the weirdest of the bunch anymore
<dominikh> and yes, I consider playing the moonlight sonata normal
beho_ has joined #ruby-lang
beho has quit [Read error: Operation timed out]
<yorickpeterse> Out of curiosity, is there a shorter way of doing `File.expand_path('../', __FILE__)`?
<yorickpeterse> (in 1.9)
<apeiros_> nope. only the obvious of implementing __dir__ yourself
<yorickpeterse> hmpf
<whitequark> why __dir__ and not __DIR__?..
<injekt> because they dont want to add more magic constants
<injekt> huge debate etc
<whitequark> __FILE__ isn't a constant
<injekt> it's not a method either
<whitequark> it would be a local variable/method name if not for the 'magic'
<apeiros_> literal! :-p
<injekt> right, thus labeled a 'magic constant'
<injekt> heh
<yorickpeterse> damn it, would've been nice if Ruby itself had _ similar to IRB
* apeiros_ would have preferred __DIR__ too
<injekt> me too
<apeiros_> and I don't care whether it's a keyword or a method
<apeiros_> and don't care with __FILE__ and __LINE__ either
<whitequark> ... maybe I should invite you to the development of foundry
<whitequark> (I'm going to make some breaking changes, yes.)
<yorickpeterse> http://pastie.org/6419997 hurrhurr
<whitequark> what the fuck
<yorickpeterse> translates to
<yorickpeterse> root = File.expand_path('../', __FILE__)
<yorickpeterse> $:.unshift(root) unless $:.include?(root)
<yorickpeterse> why? Because fuck you
<yorickpeterse> (inspired by http://vimeo.com/61087285)
Domon has quit [Remote host closed the connection]
<apeiros_> yorickpeterse: File.expand_path('..',__FILE__).tap{|x|$:=[x]|*$:}
<apeiros_> whoops, missed a *
<apeiros_> yorickpeterse: File.expand_path('..',__FILE__).tap{|x|$:=[x]|$:}
<apeiros_> hm, thinking of *…
<yorickpeterse> wat
<apeiros_> yorickpeterse: File.expand_path('..',__FILE__).tap{|*x|$:=x|$:}
<yorickpeterse> what the fuck
<apeiros_> wat wat? semi-happy smiley! :}
<injekt> loltap
<apeiros_> loltap++ :)
<whitequark> >> _=_?:
<dominikh> typical, apeiros_ would tap anything
<eval-in> whitequark => /tmp/execpad-00fed0b8a7b9/source-00fed0b8a7b9:2: syntax error, unexpected tLABEL (http://eval.in/12216)
<yorickpeterse> apeiros_: doesn't work
<apeiros_> whitequark: ?: is a string literal
<yorickpeterse> /tmp/test.rb:4:in `block in <main>': $: is a read-only variable (NameError)
<apeiros_> yorickpeterse: sure? why not? :(
<apeiros_> ohfuck
<apeiros_> replace then
sebasoga has joined #ruby-lang
<yorickpeterse> works if you use <<
<apeiros_> File.expand_path('..',__FILE__).tap{|*x|$:.replace x|$:}
Kichael has quit [Ping timeout: 260 seconds]
<yorickpeterse> File.expand_path('..',__FILE__).tap{|*x|$:<<x|$:}
banister`sleep has quit [Remote host closed the connection]
<apeiros_> yeah but that's stupid
<yorickpeterse> still too long though
<apeiros_> also wrong… you get an array as last element
<andrewvos> <3 compiling java projects
<andrewvos> FUN FUN FUN
<andrewvos> fridayyy fridayyy
<andrewvos> fun fun fun
<andrewvos> etc…
* apeiros_ senses sarcasm
emocakes has joined #ruby-lang
<andrewvos> please kill me
<andrewvos> someone
<yorickpeterse> k
<judofyr> fun fun fun fun, chicken for us to no eat, YEAH: http://www.youtube.com/watch?v=1GaKaGwch0U
alessio_rocco has quit [Ping timeout: 245 seconds]
beho_ has quit [Remote host closed the connection]
<apeiros_> andrewvos: hang in there. it's friday…
<yorickpeterse> I propose a new magic variable: $:?
sebasoga has quit [Ping timeout: 264 seconds]
alessio_rocco has joined #ruby-lang
<yorickpeterse> it contains the full path to the current file
<yorickpeterse> $:.include?($:?)??::$:.unshift($:?)
<yorickpeterse> DONE
<yorickpeterse> that would be so fucking glorious
<apeiros_> I vote for $¿ for that
<yorickpeterse> ha
dhruvasagar has quit [Ping timeout: 252 seconds]
<apeiros_> and $¡ instead of __dir__
<apeiros_> note, that's not a lowercase I
<andrewvos> hahahah that video judofyr
<apeiros_> I also propose that scripts starting with ⚡ automatically load 'golfing', which should be part of stdlib.
<andrewvos> apeiros_: whoa emoji
<andrewvos> how you do that
<apeiros_> unicode!
<andrewvos> apeiros_: teach me
<yorickpeterse> patience young grasshopper
<apeiros_> well, with osx, I have that nice menu, with all available symbols, and I just use that
<whitequark> and with linux, I have a compose key, which I could use as I wish
<yorickpeterse> I never remember my Linux key bindings
<yorickpeterse> andrewvos: is that you writing Ruby code?
<judofyr> andrewvos: I know right? lots of good stuff here: http://www.youtube.com/user/BadLipReading/videos?sort=p&view=0&flow=grid
<andrewvos> yorickpeterse: hey hey hey that's harsh man
sebasoga has joined #ruby-lang
<andrewvos> more like this yorickpeterse http://cl.ly/image/1f3K0l0o200M
nXqd has quit [Quit: leaving]
<yorickpeterse> please don't let it be a penis, please don't let it be a penis
nXqd has joined #ruby-lang
<yorickpeterse> oh, just some dumb person
sebasoga has quit [Ping timeout: 272 seconds]
<andrewvos> you wanted it to be a penis
sebasoga has joined #ruby-lang
smt has joined #ruby-lang
<andrewvos> pub lunch time!!
smt has quit [Client Quit]
smt has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
sebasoga has joined #ruby-lang
<dominikh> far better than a penis
zomgbie has quit [Ping timeout: 256 seconds]
sebasoga has quit [Ping timeout: 252 seconds]
nkr has joined #ruby-lang
sebasoga has joined #ruby-lang
r0bby has quit [Ping timeout: 240 seconds]
sebasoga has quit [Ping timeout: 252 seconds]
sebasoga has joined #ruby-lang
zomgbie has joined #ruby-lang
kristofferrr has quit [Quit: ❤]
sebasoga has quit [Ping timeout: 260 seconds]
sebasoga has joined #ruby-lang
jxie has quit [Quit: leaving]
MaddinXx has joined #ruby-lang
sebasoga has quit [Ping timeout: 248 seconds]
zomgbie has quit [Ping timeout: 248 seconds]
sebasoga has joined #ruby-lang
glebm has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
smt has quit [Ping timeout: 276 seconds]
sebasoga has quit [Ping timeout: 260 seconds]
sebasoga has joined #ruby-lang
cirenyc has joined #ruby-lang
KU0N has joined #ruby-lang
apeiros_ has quit []
sebasoga has quit [Ping timeout: 248 seconds]
sebasoga has joined #ruby-lang
beho has joined #ruby-lang
apeiros_ has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
cirenyc has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 260 seconds]
carloslopes has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
alessio_rocco has joined #ruby-lang
barttenbrinke has joined #ruby-lang
sailias has joined #ruby-lang
setmeaway has quit [Ping timeout: 264 seconds]
emocakes has quit [Quit: emocakes]
charliesome has quit [Ping timeout: 240 seconds]
dorei has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
io_syl has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby-lang
io_syl has joined #ruby-lang
<yorickpeterse> <3 ensure
sailias has quit [Quit: Leaving.]
madish has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
hasimo has quit [Remote host closed the connection]
wobblini has quit [Ping timeout: 255 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
hapster has joined #ruby-lang
anonymuse has joined #ruby-lang
io_syl has quit [Ping timeout: 272 seconds]
zomgbie has joined #ruby-lang
fire has joined #ruby-lang
zomgbie has quit [Ping timeout: 255 seconds]
zomgbie has joined #ruby-lang
skade has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 272 seconds]
alessio_rocco has joined #ruby-lang
mistym has joined #ruby-lang
chekcmate has joined #ruby-lang
<chekcmate> hi guys
<judofyr> hi!
cored has quit [Ping timeout: 248 seconds]
jerrytgarcia has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
kgrz has joined #ruby-lang
wmoxam has joined #ruby-lang
mistym has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 248 seconds]
levifig has quit [Excess Flood]
levifig has joined #ruby-lang
zomgbie has quit [Quit: Lost terminal]
<chekcmate> judofyr: how's it going?
<chekcmate> you alright?
<judofyr> yup, yup
alessio_rocco has quit [Ping timeout: 264 seconds]
<chekcmate> :)
alessio_rocco has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
dustint has joined #ruby-lang
<judofyr> chekcmate: you?
<chekcmate> judofyr: I'm fine, thanks - just found out the wonders of STDOUT.write + \r hehe
<judofyr> chekcmate: :D
<chekcmate> judofyr: what's your opinion on rubygems?
<chekcmate> => require 'rubygems' to be precise
<apeiros_> chekcmate: should use $stdout, not STDOUT
<judofyr> chekcmate: require 'rubygems' isn't needed in Ruby 1.9 :)
<apeiros_> (yes, silly, but this is one of the rare cases where the global is to be preferred over the constant)
<chekcmate> apeiros_: thanks for the hint!
<chekcmate> judofyr: meh... I hope we finish migrating to 1.9 soon ._.
<chekcmate> apeiros_: how come?
<apeiros_> chekcmate: a) all Kernel methods use the globals, b) you can reassign to $std* and keep the STD* constants as a backup
<chekcmate> apeiros_: I can understand b), but why is so positive about a)? could you point it out to me please?
<chekcmate> *what
zomgbie has joined #ruby-lang
<whitequark> chekcmate: std* are naturally globals
<whitequark> there is one per process. this is the definition of a global (variable).
<whitequark> the problem with using globals, usually, is that they needlessly restrict your code, more specifically the amount of instances of context corresponding to that code you may simultaneously have
<whitequark> in this case, it's not an issue.
rsl has joined #ruby-lang
<apeiros_> chekcmate: a) means you're consistent with how core/stdlib works if you use $std* vars
_protagoras271_ has quit [Remote host closed the connection]
<chekcmate> hm alright
<chekcmate> so $std* > STD* when it comes to this in ruby
sailias has joined #ruby-lang
levifig has quit [Excess Flood]
<judofyr> chekcmate: basically $stdout is what puts and print uses by default
<zomgbie> \q
<chekcmate> so this is like going the "direct way"?
zomgbie has quit [Quit: leaving]
<judofyr> chekcmate: STDOUT is *the* STDOUT (fd no. 1)
zomgbie has joined #ruby-lang
levifig has joined #ruby-lang
<judofyr> chekcmate: so I can do `$stdout = StringIO.new` if I want to capture all stdout from an app
hasimo has joined #ruby-lang
kurko_ has joined #ruby-lang
kurko_ has quit [Max SendQ exceeded]
zomgbie has left #ruby-lang [#ruby-lang]
kurko_ has joined #ruby-lang
kurko_ has quit [Max SendQ exceeded]
kurko_ has joined #ruby-lang
sailias has quit [Ping timeout: 272 seconds]
kristofferrr has joined #ruby-lang
hasimo has quit [Ping timeout: 248 seconds]
breakingthings has joined #ruby-lang
sebasoga has quit [Quit: Computer has gone to sleep.]
mistym has joined #ruby-lang
sebasoga has joined #ruby-lang
noop has quit [Remote host closed the connection]
sailias has joined #ruby-lang
rue has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
beho has quit [Read error: Operation timed out]
<chekcmate> judofyr: ok, I got it now, thanks! :)
sebasoga has quit [Ping timeout: 252 seconds]
<eam> injekt: thanks. I actually need compatibility with existing puppet templates so I'm stuck with erb
sebasoga has joined #ruby-lang
yfeldblum has joined #ruby-lang
sebasoga_ has joined #ruby-lang
dc5ala has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 252 seconds]
fire has quit [Quit: WeeChat 0.4.0]
sebasoga has quit [Ping timeout: 256 seconds]
alessio_rocco has joined #ruby-lang
sebasoga_ has quit [Read error: Connection reset by peer]
xeronic has joined #ruby-lang
sebasoga has joined #ruby-lang
gustavnils has joined #ruby-lang
sebasoga has quit [Ping timeout: 248 seconds]
sduckett has joined #ruby-lang
sebasoga has joined #ruby-lang
sebasoga has quit [Client Quit]
mistym has quit [Remote host closed the connection]
sebasoga has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
sebasoga has joined #ruby-lang
sebasoga has quit [Remote host closed the connection]
<yorickpeterse> I while ago I bumped into this Gem that supposedly makes it easier to write Ruby wrappers around command line apps. Does anybody know what Gem this could be?
engel has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby-lang
chekcmate has quit [Quit: Page closed]
enebo has joined #ruby-lang
rue has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 240 seconds]
kurko_ has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sebasoga has joined #ruby-lang
S1kx has quit [Quit: Leaving]
__Big0__ has joined #ruby-lang
yalue has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
krohrbaugh has quit [Read error: Connection reset by peer]
alessio_rocco has quit [Ping timeout: 255 seconds]
jerrytgarcia has quit [Read error: Connection reset by peer]
alessio_rocco has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
<injekt> yorickpeterse: enom?
<injekt> ah maybe not
<yorickpeterse> Eh no
<yorickpeterse> Basically it was this Gem that made it less of a pain to deal with options of external commands and such
<injekt> ah
<yorickpeterse> So that you don't have to do shit like Open3.popen3('git', 'clone', '--foo=bar') ...
<yorickpeterse> However, after searching for at least an hour I still can't find it
<apeiros_> yorickpeterse: I think nowadays you just use Process.spawn, no?
<apeiros_> but curious about that gem, i.e., how it makes it easier
zmack has quit [Remote host closed the connection]
<yorickpeterse> not sure if it's worth using but I want to at least take a look at it
<yorickpeterse> The alternative is that I instead write some Ruby code to create .deb files, which I can't be fucked doing
<yorickpeterse> (right now I wrap around fpm)
gnufied has quit [Quit: Leaving.]
<yorickpeterse> Fuck this, I'll just stick to open3
Criztian has joined #ruby-lang
sduckett has quit [Quit: leaving]
wallclockbuilder has quit [Read error: Connection reset by peer]
wallclockbuilder has joined #ruby-lang
mr_white_ has joined #ruby-lang
<yorickpeterse> Also god damn it, every libarchive binding is pretty much dead
<apeiros_> yorickpeterse: ping hanmac over in #ruby, he's working on one
<yorickpeterse> I know, but the last release of said Gem was in 2011
<yorickpeterse> and it doesn't support directories based on what I see in the commits
__Big0__ has quit [Remote host closed the connection]
__Big0__ has joined #ruby-lang
gnufied has joined #ruby-lang
<apeiros_> yorickpeterse: as far as I know, he's working on it right now. might be he doesn't push his local work…
mercwithamouth has joined #ruby-lang
jerrytgarcia has quit [Quit: Linkinus - http://linkinus.com]
glebm has joined #ruby-lang
outoftime has joined #ruby-lang
joevandyk has joined #ruby-lang
jigfox_ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
jigfox has quit [Ping timeout: 250 seconds]
jigfox_ is now known as jigfox
hasimo has joined #ruby-lang
beiter_ has joined #ruby-lang
beiter has quit [Ping timeout: 255 seconds]
beiter_ is now known as beiter
stoic_squirrel has joined #ruby-lang
stoic_squirrel has left #ruby-lang [#ruby-lang]
__Big0__ has quit [Remote host closed the connection]
__Big0__ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
nXqd has quit [Quit: leaving]
nXqd has joined #ruby-lang
scottj has left #ruby-lang [#ruby-lang]
alessio_rocco has quit [Ping timeout: 245 seconds]
beiter has quit [Ping timeout: 264 seconds]
alessio_rocco has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
<yorickpeterse> brrrr, #ruby feels different
datanoise has joined #ruby-lang
beiter has joined #ruby-lang
jonahR has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
|Vargas| has quit [Quit: ...]
mistym is now known as mistym_meeting
maxmanders has quit [Quit: Computer has gone to sleep.]
nXqd has quit [Ping timeout: 255 seconds]
ilyam has joined #ruby-lang
idkazuma has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 256 seconds]
nXqd has joined #ruby-lang
alessio_rocco has joined #ruby-lang
dhruvasagar has joined #ruby-lang
rue has joined #ruby-lang
<cored> I have a doubt
<cored> regarding the Ruby community in general, as far as I can see there are not a lot of tools
<cored> why people is rambling about productivity ?
srbaker has quit [Quit: Computer has gone to sleep.]
slyphon has joined #ruby-lang
<whitequark> cored: you don't necessarily need tools to enhance your productivity
<whitequark> as in, you could use Eclipse to do the tedious work of refactoring, _or_
<whitequark> you could make refactoring way less tedious so you won't need Eclipse.
<whitequark> also, there is quite a bit of tools. minitest/rspec/etc for testing, flog/flay (or codeclimate.com) for searching for complex code, etc.
rue has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
<gnufied> there is rubymine
<judofyr> whitequark: it is interesting though, how the Ruby community just doesn't believe in tools™
<cored> judofyr: agree
<cored> also there is another weird thing that I see
<whitequark> judofyr: there is no point in using tools (like in Java-world) against a dynamically typed language
<yorickpeterse> cored: define tools
<cored> I've been working professionaly with Ruby for about 3 years now, I've watch a lot of talks about TDD good practice and stuffs
<cored> but most of the people that I've work with are not following those practice
<judofyr> whitequark: ehm. Smalltalk is a dynamically typed language, and tools help there :)
<whitequark> judofyr: elaborate?
<cored> I've even search github profiles for people like Jim Weirich to see how is he is building his Rails apps, which in my imho that framework is doing more damage than good in the long wrong
<judofyr> whitequark: Smalltalk is basically one big tool (you can tweak your application as it's running)
<injekt> smalltalk debugger <333
<cored> yorickpeterse: I can compare things like Smalltalk dev env or .NET integration
<whitequark> judofyr: as far as I know, they first created themselves a problem (non-human-readable serialization for software) then heroically solved it
<whitequark> this is one valid approach indeed
<whitequark> but it replaces the edit-save-run-checkin approach with the tools operating upon a smalltalk image
<judofyr> cored: what's your background?
benlovell has quit [Quit: Computer has gone to sleep.]
<whitequark> cored: `framework` isn't doing anything. a framework making things easy will attract unexperienced programmers, which, after some point, make the whole field look unprofessional
<whitequark> not a single thing of what I've just described is inherently bad
<whitequark> especially when the framework is well designed (doesn't have a multitude of obvious flaws which prevent it to be used for its most common application)
zmike has joined #ruby-lang
__Big0__ has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
__Big0__ has joined #ruby-lang
<cored> judofyr: what do you mean by that?
<cored> whitequark: yes that's the pint
<judofyr> pint? yes please!
<cored> hehe
<cored> s/pint/point
<judofyr> cored: it seems to me that you're new to Ruby/Rails? I was just wondering what languages/frameworks you've been using earlier.
<whitequark> cored: what's the point?
<cored> whitequark: I just read Giles book regarding Rails and really I see most of this flaws myself
<whitequark> cored: summarize? I didn't read it.
<cored> whitequark: I don't think Rails is that well designed, if it's get in your way to build things, yes it's good for starting out but after 10 months what will happen with your mind
<cored> judofyr: oh, Java/.NET
<cored> whitequark: well basically, my point is that theory for ood is there already, but Ruby community seems to ignores it, just because of Rails
<cored> I think Rails way of doing things is the one provoking this, because I can't see a lot of people trying to do the right things on their apps
<cored> :-/
<whitequark> cored: I think we should begin with the fact that the model Java/.NET have by definition has not much to do with OO
alessio_rocco has quit [Ping timeout: 272 seconds]
<cored> no no
<cored> don't get me wrong
<cored> you are right on that part
<cored> you can build pretty awful stuffs in any env
alessio_rocco has joined #ruby-lang
<whitequark> ok. so what do you mean by Ruby OOD? Clearly it couldn't share much with Java OOD.
<whitequark> in particular, the thing DHH talks about is very very wrong in Java.
<cored> in Java?
<cored> well, in fact nop
<cored> in Java you should be doing DI, also I think it's helps to do it in Ruby because you centrialize the creation of objects for your app
<whitequark> in Java you can't avoid DI, of course
gnufied has quit [Quit: Leaving.]
<cored> the part I said about .NET it's was because Rails do pretty good things to start out, but in the long run you end up with a bad application from the pov of maintainability
<whitequark> the point is that DI is not a concept which stands on its own; it's a crutch designed to work around inflexibility of the language
<whitequark> cored: oh, I have an article about that
<cored> on the .NET front MS is doing an effort to teach the right way of doing things from the grown up
<cored> not showing oyu how to do a 15 blog because in the end
<cored> who is doing that?
<cored> whitequark: please, do share
<whitequark> cored: lemme find it
barttenbrinke has quit [Remote host closed the connection]
<whitequark> in the meanwhile: "15 minute blog" is very important
carloslopes has quit [Remote host closed the connection]
<cored> why ?
<whitequark> your $software should be focused on achieving its goal, in this case building websites, not on some abstract OO concepts or whatever. You invoke the concepts because you need them; they're not a goal but a tool
<cored> well
<cored> in that matter
<whitequark> "FrameworkX follows good object-oriented design and allows you to build websites." Bzzt. "FrameworkY lets you conveniently build websites (and also has good design)." Correct.
<cored> if your final goal is giving value your application when you see it as a developer shouldn't be shouting 'Rails' all over the place
<cored> because my business logic doesn't have anything to do with Rails
<cored> there is a very good talk regarding this from uncle bob
<whitequark> cored: separate your business logic into a service layer!
<whitequark> that's indeed very good practice
<cored> the thing is that I can't find his code or the way he do things with Rails
<cored> yes but you have to do a lot of hacks to accomplish that
jonahR has quit [Quit: jonahR]
<whitequark> and it's perfectly applicable to Rails apps; I use that, for example
<cored> I'm going into another route this days
<whitequark> cored: it depends. so far, I didn't really find it hacky.
<cored> Sinatra throwing Json, ember.js frontend
<cored> I'm hoping to get dm2 soon
<cored> and that will be my utopic stack on Ruby
<whitequark> dm2 is a thing to be desired
<whitequark> I wait for it too
tdy_ has quit [Ping timeout: 252 seconds]
__Big0__ has quit [Remote host closed the connection]
<whitequark> sinatra isn't exactly a jewel of design either
<cored> but the thing is that I see that a lot of people is talking about problems like slow tests
<judofyr> I've been waiting for 2 years or so :)
<cored> but when they try to solve those problems they do hacks
Rarrikins_h has joined #ruby-lang
<whitequark> cored: tests are slow because in essence, all rails tests are integration tests
<whitequark> due to AR
kgrz has quit [Quit: Computer has gone to sleep.]
<cored> whitequark: at least it's just a route engine it doesn't try to force things on me
<cored> whitequark: yes
<cored> whitequark: see the problem there
<whitequark> I'd happily jump over from AR to something better; but there isn't
<cored> that's really a shame and that's just drop down productivity
__Big0__ has joined #ruby-lang
<cored> :-(
<yorickpeterse> whitequark: Sequel
<whitequark> I absolutely agree
<cored> sorry guys
<whitequark> yorickpeterse: ew
<cored> I'm just suffering a lot
Rarrikins has quit [Ping timeout: 264 seconds]
<whitequark> cored: I understand your pain
<yorickpeterse> whitequark: ehm, wat? Sequel is pretty fucking awesome
<yorickpeterse> http://sequel.rubyforge.org/ this Sequel
<whitequark> cored: our tests ran for 1.5 minutes on my vastly overpowered notebook
<whitequark> cored: 9 minutes on travis
<cored> I really like Ruby the language a lot
<whitequark> and that's like 500 examples
<cored> that's not good
<whitequark> cored: my point is that people run around blaming rails; they shouldn't
mr_whit__ has joined #ruby-lang
<whitequark> AR is hacky and not that good; but it was when it first appeared, and it does its job
<whitequark> we need better libraries, we don't need pouring crap on existing ones
<whitequark> cored: the article http://edmundkirwan.com/general/junit.html
<yorickpeterse> hell, sequel even does filemaker
mr_white_ has quit [Ping timeout: 240 seconds]
<cored> whitequark: oh, no I'm not saying that Rails is crap or something like that
<cored> whitequark: I'm just saying that we already past the 15 blog
<cored> whitequark: a long time ago and Rails still the same in the sense of thinking that we are still building prototypes
<yorickpeterse> huh interesting, seems that's no longer the case
forrest has joined #ruby-lang
<whitequark> yorickpeterse: it has a dsl which hijacks self
<cored> whitequark: that's my point, so in that matter I think Rails should fall to another position and something more flexible should raise
<whitequark> I just can't stand them
<whitequark> cored: rails is insanely flexible
<yorickpeterse> or maybe I'm confusing it with Firebird, could be too
<whitequark> cored: you can replace practically any part of it and it'll work fine
<yorickpeterse> whitequark: as in?
<whitequark> yorickpeterse: the dsl? all this shit DB[:albums].select{function(:over, :args=>col1, :partition=>col2, :order=>col3){}}
<yorickpeterse> You don't even need that
<yorickpeterse> And that's a feature, one that is immensely powerful
<whitequark> yorickpeterse: I do if I want to construct more complex queries?
idkazuma has quit [Remote host closed the connection]
<whitequark> I'm exploiting Arel a lot in the project I've been working till this day
<whitequark> *I've been
<whitequark> AR isn't very powerful when it comes to queries, but it lets you to fall back to Arel everywhere
<yorickpeterse> tbh I don't see the problem with hijacking self there but opinions may differ
<whitequark> yorickpeterse: it's just a smell
<whitequark> like var $this in JS
<yorickpeterse> I consider having to use an underlying adapter a smell :)
<whitequark> yorickpeterse: huh?
<yorickpeterse> e.g. having to use the underlying mongo adapter because mongoid isn't clever enough in certain cases
<whitequark> yorickpeterse: arel isn't an adapter
<yorickpeterse> or Arel becaues AR is too stupid when you start doing joins
<whitequark> AR is for doing common things in a simple way, Arel is for making uncommon things possible
<cored> whitequark: I'm having a basic problem now
<whitequark> if sequel doesn't have includes(), I'm not interested
<cored> whitequark: with Rails for that matter, trying to use HAML instead of erb
<yorickpeterse> whitequark: ...it has?
<whitequark> yorickpeterse: ok
<cored> whitequark: I just added the haml-rails gem to the Gemfile and change all my erb files to be haml the layout is not getting render
<whitequark> cored: restarted the server?
idkazuma has joined #ruby-lang
<yorickpeterse> whitequark: it's called eager()
sn0wb1rd has quit [Quit: sn0wb1rd]
<cored> whitequark: yeap
<whitequark> yorickpeterse: you missed my point
<cored> whitequark: this is pretty basic stuff, don't know why is not working
<whitequark> yorickpeterse: there's a high-level interface and a low-level one. I don't see how it can/should be different
<whitequark> yorickpeterse: replace "having to use arel" with "having to use low-level interface of sequel"
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> Except for probably 98% of all cases you don't need to
<whitequark> cored: dunno. ask on #ror ?
<whitequark> yorickpeterse: in practice, I do
<whitequark> and a lot
<whitequark> people tend to dismiss learning SQL these days, for some weird reason
<ggreer> LEFT OUTER JOIN
<injekt> RIGHT INNER TUBE
<breakingthings> redundancy
<ggreer> :)
<breakingthings> SELECT promiscuity
<breakingthings> FROM yo_momma
<yorickpeterse> whitequark: if you really have to, sure. However, with AR/Arel I get the idea that you need to move to Arel a bit too fast
<breakingthings> That was the first SQL burn known to man, by the way.
<whitequark> yorickpeterse: no
<breakingthings> You're welcome.
<whitequark> yorickpeterse: I just like nontrivial queries
alessio_rocco has quit [Ping timeout: 264 seconds]
<whitequark> I favor a O(n) query which can be done by the RDBMS to yet another denormalization on any time of day
<whitequark> don't fucking treat postgres like a mongodb, it desires appreciation
alessio_rocco has joined #ruby-lang
slyphon has quit [Quit: slyphon]
alessio_rocco has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 248 seconds]
neverminding has joined #ruby-lang
soypirate has joined #ruby-lang
hasimo has quit [Remote host closed the connection]
rippa has joined #ruby-lang
jigfox has quit [Quit: jigfox]
zmike has quit [Quit: Выходжу]
Rarrikins_h_f has joined #ruby-lang
maxmanders has joined #ruby-lang
Rarrikins_h has quit [Ping timeout: 248 seconds]
sepp2k1 has joined #ruby-lang
carloslopes has joined #ruby-lang
sepp2k has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby-lang
ddfreyne has quit [Excess Flood]
sn0wb1rd has joined #ruby-lang
ddfreyne has joined #ruby-lang
nXqd has quit [Ping timeout: 250 seconds]
nazty has joined #ruby-lang
levifig has quit [Excess Flood]
tdy_ has joined #ruby-lang
apeiros_ has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
carloslopes has quit [Ping timeout: 260 seconds]
levifig has joined #ruby-lang
vmoravec_ has quit [Quit: Leaving]
zmack has joined #ruby-lang
mercwithamouth has joined #ruby-lang
zmack has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
jonahR has joined #ruby-lang
mbr_ has left #ruby-lang [#ruby-lang]
<yorickpeterse> Hm, I think I might've tackled the problem of determining return values from Ruby code
<yorickpeterse> basically C headers but in Ruby
sush24 has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
<yorickpeterse> http://pastie.org/6422701 this would take some work though
mbr has joined #ruby-lang
kristofferrr has quit [Quit: ❤]
<yorickpeterse> hmmmmm, that makes me excited
<andrewvos> eww
mr_whit__ has quit [Remote host closed the connection]
<yorickpeterse> andrewvos: it might take some work but it's the only reliable way that isn't slow as balls
<yorickpeterse> plus it would make dealing with meta mindfucks easier
<andrewvos> yorickpeterse: i only read te last thing you said
<yorickpeterse> oh
<yorickpeterse> ha
<whitequark> yorickpeterse: please
<whitequark> read the Diamondback Ruby article
<whitequark> it'll save you from duplicating the work done there
<yorickpeterse> which article, there are multiple ones including interviews
<whitequark> you don't everything from there (it's a dynamic verifier), but lots
<whitequark> hmm
<whitequark> except probably the profile-guided opt
<yorickpeterse> "When necessary, the programmer can provide DRuby with annotations that assign static types to dynamic code."
<whitequark> so?
<yorickpeterse> that's basically what I had in mind
<whitequark> well, yes? :D
<yorickpeterse> Ideally I'd use YARD tags, but not everybody uses YARD or documents their code to begin with
<yorickpeterse> nor would that work for the stdlib/core
<whitequark> I'm not recommending it to you because I'm high
<whitequark> but because it makes sense
<whitequark> yorickpeterse: druby figured stdlib/core out
sush24 has quit [Ping timeout: 260 seconds]
<whitequark> (actually in much the same way as yard did)
<whitequark> iirc
<zzak_> drb is already a thing :(
<yorickpeterse> oh god:
<yorickpeterse> when Fixnum: ###% x : Fixnum
skade has joined #ruby-lang
<whitequark> yorickpeterse: that is actually pretty cool
<whitequark> how it can assign types to particular SSA edges and not variable names
<whitequark> or actually the combination of both
<yorickpeterse> Thing is that that would require other people to add it to their docs
<yorickpeterse> errr, code
chendo_ has quit [Ping timeout: 255 seconds]
<yorickpeterse> which is never going to happen
<yorickpeterse> I was thinking of shipping a set of "headers" for core/stdlib and maybe some common Gems that I use
<whitequark> yorickpeterse: well, you're fine with it
<whitequark> a linter is only so good
<yorickpeterse> true
carloslopes has joined #ruby-lang
<yorickpeterse> I never aimed for the 100% since that's pretty darn difficult
<whitequark> yorickpeterse: that is straight down impossible
<yorickpeterse> I'd probably get an oscar for it
<whitequark> I can prove that for you :)
<yorickpeterse> maybe 2
<whitequark> the Ole Agesen thesis has a bunch of proofs for Self
chendo_ has joined #ruby-lang
<whitequark> actually they're pretty trivial anyway
* whitequark loves the word "actually", evidently
<yorickpeterse> I'd love for a bit more pedantic type system in Ruby
<yorickpeterse> At least being able to say "Object X *requires* method Y" would be nice, without having to write shit like assert_responds_to(:fuckyou)
<whitequark> yorickpeterse: read the paper about Typed Scheme. something like "gradual typing of scheme in presence of type annotations"
<whitequark> it does what you want
<whitequark> and yes, I can answer every question like that with "read paper X"
Stilo has joined #ruby-lang
<yorickpeterse> hehe, I figured
beiter has quit [Quit: beiter]
<whitequark> you're by far not the first one to think of that, or even to figure out some ways to do it
<yorickpeterse> I never assumed that was the case
* whitequark kinda did, a year ago. not explicitly, but well...
<yorickpeterse> In fact, quite the opposite. I expected (and still do) people to point and laugh
<whitequark> well, it turns out that no one has tried to do what I want to do with ruby
<whitequark> but they did it with self
<whitequark> and self ~ ruby
<whitequark> and smalltalk = ruby :)
<whitequark> research sponsored by sun microsystems, heh
mistym_meeting is now known as mistym
fragamus has joined #ruby-lang
barttenbrinke has joined #ruby-lang
rue has joined #ruby-lang
<whitequark> yorickpeterse: also remember the Object::Object::Object weirdness?
sush24 has joined #ruby-lang
<whitequark> turns out C++ has it too, which is hilarious for some reason
dc5ala has quit [Quit: Ex-Chat]
<yorickpeterse> wat
<yorickpeterse> (I knew about the first, not the latter)
<yorickpeterse> also: Object.methods(false).include?(:new) # => false
<yorickpeterse> To this day I haven't found out why .new isn't in the ancestor tree
<whitequark> hm
<whitequark> it's an instance method of Class
<yorickpeterse> But Class is not in the ancestor tree
<whitequark> um
skade has quit [Quit: Computer has gone to sleep.]
<whitequark> by calling a class method of Object, you're calling an instance method of Object's singleton class
<yorickpeterse> Object.ancestors # => [Object, PP::ObjectMixin, Kernel, BasicObject]
<whitequark> which inherits from Class
<yorickpeterse> hmmmm
fragamus has quit [Quit: Computer has gone to sleep.]
<whitequark> so you should be calling Object.singleton_class.ancestors
<whitequark> not Object.ancestors
<yorickpeterse> aah, there it is
<yorickpeterse> dirty bastards
barttenbrinke has quit [Ping timeout: 260 seconds]
<whitequark> it was even worse, heh
<yorickpeterse> what the fuck
<yorickpeterse> what was matz smoking?
<yorickpeterse> I need to bookmark this
<whitequark> yorickpeterse: the 1.9 model or the 1.8 one?
<whitequark> the 1.9 one is actually pretty sane
<yorickpeterse> the 1.8 one
<whitequark> indeed
<whitequark> that's some intense bullshit there
<whitequark> I never really figured it out
<whitequark> also hm
jigfox has joined #ruby-lang
<whitequark> >> class A;end; class B;end; B.singleton_class.ancestors
<eval-in> whitequark => [Class, Module, Object, Kernel, BasicObject] (http://eval.in/12249)
<whitequark> the diagram is lying (or, more likely, outdated)
<whitequark> yorickpeterse: do you have 1.9.... err... 1.9.0... handy... ?
tylersmith has joined #ruby-lang
<yorickpeterse> wait we have a eval bot? sweet
<yorickpeterse> whitequark: I don't have 1.9.0, no
jxie has joined #ruby-lang
cultureulterior has quit [Quit: cultureulterior]
<whitequark> yorickpeterse: yeah, I've convinced drbrain that it was cool to have it here
<whitequark> fsvo convinced
<banisterfiend> whitequark: here's one i did for 1.8.6 https://dl.getdropbox.com/u/239375/ruby-class-eigen.png
<whitequark> banisterfiend: oh I remember that
<whitequark> I think it's not clear enough
maxmanders has quit [Quit: Computer has gone to sleep.]
<eam> how do I get "erb -T -" using ERB directly?
<banisterfiend> whitequark: personally i find it easier to read than your one :P but i would i guess since i made it :)
<yorickpeterse> >> puts 'Destroy all humans!'
<eval-in> yorickpeterse => Destroy all humans!
<eval-in> nil (http://eval.in/12252)
<yorickpeterse> yay
<whitequark> banisterfiend: doesn't even have a legend :/
<banisterfiend> yeah it's part of a blog post taht explains it http://banisterfiend.wordpress.com/2008/11/25/a-complete-ruby-class-diagram/
<banisterfiend> but an actual baked-in legend might be good
<banisterfiend> "Hollow arrow-heads denote the ‘super class’ pointer and opaque arrow-heads denote the ‘class’ pointer. Blue ovals indicate regular classes and the grey their singleton classes."
<banisterfiend> bbl naptime
<rue> I thought that was a new C-family language
heftig has quit [Quit: Quitting]
<zzak_> naplang
<whitequark> napalm
<whitequark> excellent self-descriptive name for a new C-family lang
<rue> I thought like ->, -|>, o>, and so on
breakingthings has quit []
hasimo has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
setmeaway has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.90 [Firefox 16.0.1/20121026125834]]
<jpwhiting> hey all, if I use gem fetch delayed_job --version '<3.0' it grabs the delayed-job 2.1.4 gem, but then the gem2deb of that .gem file doesn't contain a .gemspec file
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jpwhiting> how do I create a .gemspec file for it?
__butch__ has joined #ruby-lang
skade has joined #ruby-lang
hasimo has quit [Ping timeout: 272 seconds]
<yorickpeterse> semantics question: if a linter detects errors in your code, should it exit with 0 or 1?
mistym is now known as mistym_lunch
<rue> yorickpeterse: Probably 1, even though it’s really a 0
<rue> I’m pretty sure it will be used with the &&-equivalent
<yorickpeterse> hmm
sush24 has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby-lang
sush24 has joined #ruby-lang
<jpwhiting> zzak_: any idea how to create a .gemspec file for a .gem that doesn't have one (maybe all .gem files don't contain .gemspec, I dunno)
heftig has joined #ruby-lang
fragamus has joined #ruby-lang
MaddinXx has joined #ruby-lang
slyphon has joined #ruby-lang
<banisterfiend> jpwhiting: Gem::Specification.find_all_by_name("your_gem").first.spec_file gives you the spec file
<jpwhiting> banisterfiend: if I do gem fetch delayed_job --version '<3.0' it only grabs the .gem no .gemspec
<banisterfiend> jpwhiting: the .gemspec is probably inside the .gem file
<jpwhiting> how do I extract it?
<jpwhiting> tar -xvf says implausibly old time stamp
sush24 has quit [Quit: This computer has gone to sleep]
<jpwhiting> gem2tgz works, but the resulting tarball doesn't contain a .gemspec file
QaDeS has quit [Quit: Ex-Chat]
<banisterfiend> jpwhiting: just install the gem and get the .gemspec using the code i showed above
swav has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
<jpwhiting> I don't want to install the .gem, I want to create a proper debian package from it
<jpwhiting> that includes the .gemspec file
<jpwhiting> I have to install the .gem to get something out of it?
mrsolo has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<banisterfiend> jpwhiting: tar -zxf worked for me
snarfmason has joined #ruby-lang
<banisterfiend> jpwhiting: and i now have a .gemspec
<whitequark> jpwhiting: ask the debian ruby packaging team
<whitequark> or better, apt-get source it
davidbalbert is now known as davidbalber|away
ilyam has quit [Quit: ilyam]
<jpwhiting> banisterfiend: ah, I must have done something wrong
<jpwhiting> ah, I thought it was a plain tarball, my bad
glebm has quit [Quit: Computer has gone to sleep.]
<jpwhiting> nope, delayed_job-2.1.4.gem is not a gzip format tarball
<jpwhiting> even redid gem fetch delayed_job --version '<3.0' to get a fresh .gem in case I broke it somehow
carloslopes has joined #ruby-lang
glebm has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
wyhaines has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
retro|cz has quit [Ping timeout: 272 seconds]
thone_ has joined #ruby-lang
ilyam has joined #ruby-lang
pr0ton has joined #ruby-lang
hahuang65 has joined #ruby-lang
thone has quit [Ping timeout: 252 seconds]
mistym_lunch is now known as mistym
jonahR has quit [Quit: jonahR]
mixandgo has joined #ruby-lang
<mixandgo> whats the best way to get offline docs ? I am having a hard time with ri... it doesn't find what I need it to
<whitequark> mixandgo: gem install yardoc; yard server --gems
<banisterfiend> mixandgo: i just use show-doc in pry :)
<banisterfiend> but that works too
<mixandgo> yardoc seems to be a browser thingy
<mixandgo> I'd prefer using the console/terminal
<drbrain> mixandgo: what isn't ri finding?
askoma_ has joined #ruby-lang
<mixandgo> drbrain: so I'm doing ri String and it gets me a MaRuKu::Strings (from gem maruku-0.6.1)
askoma_ has quit [Client Quit]
davidbalber|away is now known as davidbalbert
<drbrain> mixandgo: did you install ruby from rvm?
<mixandgo> yes
<mixandgo> I have a bunch of them
<drbrain> mixandgo: run `rvm docs generate`
<drbrain> rvm doesn't install the ri data by default
<mixandgo> oh
Mon_Ouie has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
fragamus has quit [Quit: Computer has gone to sleep.]
_protagoras271_ has joined #ruby-lang
rue has quit [Ping timeout: 276 seconds]
rue has joined #ruby-lang
<mixandgo> drbrain: thank you, I think this works
glebm has quit [Quit: Computer has gone to sleep.]
<drbrain> great!
sush24 has quit [Ping timeout: 252 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
skade has joined #ruby-lang
neverminding_ has joined #ruby-lang
Honeycomb has joined #ruby-lang
skade has quit [Client Quit]
sush24 has joined #ruby-lang
levifig has quit [Excess Flood]
neverminding has quit [Ping timeout: 240 seconds]
neverminding_ is now known as neverminding
Honeycomb has quit [Client Quit]
neverminding has quit [Read error: Connection reset by peer]
levifig has joined #ruby-lang
wallclockbuilder has quit [Remote host closed the connection]
neverminding_ has joined #ruby-lang
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
neverminding_ has quit [Read error: Connection reset by peer]
walbert has left #ruby-lang [#ruby-lang]
neverminding has joined #ruby-lang
neverminding has quit [Read error: Connection reset by peer]
neverminding has joined #ruby-lang
neverminding has quit [Read error: Connection reset by peer]
<heftig> >> puts 1
<eval-in> heftig => 1
<eval-in> nil (http://eval.in/12254)
breakingthings has joined #ruby-lang
<heftig> >> puts [*1..6].repeated_permutation(4).to_a.map{|x|x.sort[1..-1].inject(:+)}.group_by{|x|x}.map{|k,v|"%4d: %4d %s" % [k,v.count,"|"*(v.count/2)]}
<eval-in> heftig => 3: 1
<eval-in> 4: 4 ||
<eval-in> 5: 10 |||||
<eval-in> 7: 38 |||||||||||||||||||
<eval-in> 8: 62 |||||||||||||||||||||||||||||||
<eval-in> 6: 21 ||||||||||
<eval-in> 9: 91 |||||||||||||||||||||||||||||||||||||||||||||
<eval-in> 10: ... (http://eval.in/12255)
<heftig> wee histograms.
neverminding has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
beho has joined #ruby-lang
sockmonk has joined #ruby-lang
pr0ton has quit [Ping timeout: 245 seconds]
sebasoga has quit [Ping timeout: 256 seconds]
beho has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
io_syl has joined #ruby-lang
sebasoga has joined #ruby-lang
carloslopes has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
swav has joined #ruby-lang
skade has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
neverminding_ has joined #ruby-lang
Stilo has joined #ruby-lang
neverminding has quit [Ping timeout: 240 seconds]
neverminding_ is now known as neverminding
neverminding has quit [Read error: Connection reset by peer]
neverminding has joined #ruby-lang
snarfmason has quit [Quit: Textual IRC Client: www.textualapp.com]
aedorn has quit [Quit: Leaving]
sepp2k1 has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
nkr has quit [Quit: Linkinus - http://linkinus.com]
wallclockbuilder has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
pr0ton has joined #ruby-lang
neverminding_ has joined #ruby-lang
neverminding has quit [Read error: Connection reset by peer]
neverminding_ is now known as neverminding
Mon_Ouie has quit [Ping timeout: 248 seconds]
neverminding has quit [Read error: Connection reset by peer]
neverminding has joined #ruby-lang
carloslopes has joined #ruby-lang
wallclockbuilder has quit [Read error: Connection reset by peer]
wallclockbuilder has joined #ruby-lang
yalue has quit [Quit: Leaving]
carloslopes has quit [Remote host closed the connection]
wallclockbuilder has quit [Remote host closed the connection]
davidw has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
apeiros_ has joined #ruby-lang
<davidw> I have two nokogiri nodes. How do I grab everything between them?
<davidw> I'm grossed out by the idea of simply doing a string split, but it looks so much easier...
Nisstyre has quit [Quit: Leaving]
skade has quit [Ping timeout: 245 seconds]
davidbalbert is now known as davidbalber|away
<apeiros_> davidw: traverse with a good old until loop
skade has joined #ruby-lang
postmodern has joined #ruby-lang
ivanoats has joined #ruby-lang
jhn has joined #ruby-lang
davidbalber|away is now known as davidbalbert
fragamus has joined #ruby-lang
yfeldblum has joined #ruby-lang
snarfmason has joined #ruby-lang
snarfmason has quit [Client Quit]
S1kx has joined #ruby-lang
<lectrick> Is it even possible to design an ImmutableHash class?
jpwhiting has quit [Quit: Konversation terminated!]
QaDeS has joined #ruby-lang
<ryanf> lectrick: why not?
kakobrekla has joined #ruby-lang
<lectrick> ryanf: well, one potential problem is that if a variable which contains a hash is passed into a method, I don't think there's a way to, say, "autodup" the hash so that the reference to the hash's values in the previous context never changes, even if the method itself modifies the hash
sn0wb1rd has quit [Quit: sn0wb1rd]
<lectrick> ryanf: I suppose I could key it based off some unique binding identifier
kakobrekla has left #ruby-lang [#ruby-lang]
<lectrick> but that would slow things down quite a bit I would imagine
sush24 has quit [Ping timeout: 250 seconds]
<ryanf> lectrick: well, a "hash" is really a mapping of references to key objects -> references to values
<lectrick> actually, is there even a way to uniquely identify a context? binding.hash and binding.object_id constantly change
<ryanf> you can make the references immutable by not giving the hash an api for mutating them
NemesisD has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
<lectrick> ryanf: so basically just disabling []= on the hash and any child hashes?
<ryanf> lectrick: you'd probably want to just make a new container class from scratch, because hash has lots of destructive methods
<ryanf> or check out Hamster, which comes with an immutable hash class
<lectrick> ryanf: ah, you're right
<lectrick> holy shit, TIL about hamster
sush24 has joined #ruby-lang
sush24 has quit [Client Quit]
djwonk has joined #ruby-lang
joevandyk has joined #ruby-lang
<lectrick> "Hamster’s hash doesn’t provide an assignment (#[]=) method. The reason for this is simple yet irritating: Ruby assignment methods always return the assigned value, no matter what the method itself returns." Um, why couldn't he just modify []= to return self (or self copy) instead?
bluepojo has joined #ruby-lang
emocakes has joined #ruby-lang
<mistym> lectrick: Return value of assignment methods is always the assigned value and can't be overridden even with an explicit return in the method body.
<lectrick> mistym: wow. how did I not know this.
<lectrick> that is... incorrect design lol
rippa has quit [Read error: Connection reset by peer]
spinagon has joined #ruby-lang
fragamus has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lectrick> yup, i had to try it myself... ain't that a bitch
pr0ton has quit [Ping timeout: 264 seconds]
<lectrick> it's a method, why wouldn't it just return what the method returns... I'm rather shocked
<mistym> Assignment chaining would get weird if you could override that. a = b = 5, with a != b
<whitequark> lectrick: because you can do all sorts of strange things
<whitequark> especially with multiple assignment
<whitequark> like (a[1], b) = *c
<lectrick> is the advantage of that worth the cost? hrmm
<mistym> What's the use case for return value being different from assignment value?
sockmonk has quit [Ping timeout: 245 seconds]
<breakingthings> it would break lotsa stuff we sometimes take for granted.
<whitequark> lectrick: chaining of assignments is commonplace
djwonk has quit []
<mistym> breakingthings: Your name is appropriate
<whitequark> breaking it would break a very common assumption
<lectrick> your username is disturbingly relevant to that lol
<breakingthings> Language constructs get special treatment
<breakingthings> ye.
<breakingthings> that's why i do.
<lectrick> ok so I still don't see how it would break multiple assignment. in (a[1], b) = *c with a[1]= returning a instead of c.first, a[1] still gets modified just fine
<lectrick> a = b = 5, b=5 returns b (which has value 5), so then a = b which means a = 5 too, again I don't follow
<lectrick> mistym: ^
<lectrick> Now, if we're talking *c = (a[5]=2, 6), then yes, that would break. But how often is *that* actually done?
<mistym> lectrick: Ah, but say a = b['foo'] = 5 #=> a != 5; a == b
r0bgleeson has joined #ruby-lang
<mistym> lectrick: Your example of a = b = 5 could fail if someone redefined #=
<r0bgleeson> you can't redefine the assignment operator for lvars
<lectrick> can you even redefine = ? I didn't think you could
<r0bgleeson> you can define setters
<mistym> Yeah, that was a bad example.
<mistym> a = b.c = 5, rather than a = b = 5
<lectrick> I guess what I'm saying is, it would be nice if modifying what []= returned was available to ruby devs.
<mistym> I guess I feel like the lack of flexibility is made up for by the lack of flexibility
<lectrick> Modifying '=' itself is a whole 'nother topic...
<mistym> e.g. you can rely on what assignment does
<r0bgleeson> setters always return their argument, no matter what you return
<mistym> r0bgleeson: Right, the same with #[]= which we're talking about here
<r0bgleeson> i see, okay
<lectrick> mistym: yeah, I get it, in that later example (a = b.c = 5) but I feel like that's kind of code-smelly to begin with
<mistym> lectrick: True, and it's a pretty contrived example. I guess the point I'm trying to make is that knowing what assignment will do is common enough that being able to rely on it outweighs the lack of flexibility
<lectrick> Being able to override '=' would be interesting, you could basically have a variable that couldn't be reassigned or which could hook into its own reassignment
<lectrick> "being able to rely on it" aka just knowing your classes? That seems like a rationalization.
sailias has quit [Ping timeout: 272 seconds]
<breakingthings> lectrick: nobody likes an edge case
nXqd has joined #ruby-lang
<lectrick> class MyHash< Hash; def []=(*args); super; self; end; end; mh=MyHash.new; mh[:key]='value' #=> "value". That's just wrong. I explicitly returned something else, I'm writing a method, it just happens to override a builtin.
rue has quit [Read error: Connection reset by peer]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
pr0ton has joined #ruby-lang
jstemmer has quit [Remote host closed the connection]
neverminding has quit [Quit: neverminding]
<lectrick> breakingthings: what do you think of ^ then?
<breakingthings> lectrick: an interesting response, I'll give you that
<breakingthings> but []= being a language construct that ruby is nice enough to give you access to, I find it to be a special little bastard.
<lectrick> apparently it's a little too special
<breakingthings> maybe.
<breakingthings> but I think it's worth it to preserve consistency in what manifests itself as a language construct
<breakingthings> though I suppose it could be possible that this is entirely a matter of implementation, that ruby is actually wrapping your []= call in it's own that ignores the return value.
<breakingthings> possible that it's just never been thought of as being needed, but it's also possible that they are fully aware and ignore it for the consistency.
wmoxam has quit [Quit: leaving]
slyphon has quit [Quit: slyphon]
<lectrick> wouldn't "preserving consistency" mean that me overriding []= returns what I told it to return, just like overriding + would? class MyHash<Hash; def +(o); self; end; end; mh=MyHash.new; mh + 5 #=> {:key=>"value"}
<lectrick> breakingthings: ^
<breakingthings> lectrick: not to an API user
<breakingthings> []= manifests itself as a language construct
<breakingthings> you're not actually calling []= as a function directly
<breakingthings> ruby is calling it for you in it's assignment process
<lectrick> even if you override it?
<banisterfiend> breakingthings: its*
<banisterfiend> ;)
<breakingthings> banisterfiend: thanks.
<breakingthings> too tired for grams.
<lectrick> class MyHash< Hash; def []=(*args); 'Not calling super at all!'; end; end; mh=MyHash.new; mh[:key]='value' #=> "value"
<lectrick> Hrmph. Even if you don't even call super, you still get the assigned value back. Even if it does nothing :/
<breakingthings> Yeah.
<breakingthings> It's a language construct so it places itself above your needs.
<breakingthings> Not necessarily saying that's a good thing, or that it's the end-all-be-all,
<breakingthings> but that's how it is and I think there is potentially good reasons for doing so.
<lectrick> I know it's probably protocol and all, but as someone who just realized this for the first time, it looks a little ugly. Of course, that's just my opinion.
<breakingthings> Oh no, it's ugly from an API designer's standpoint.
<breakingthings> But it saves the utter confusion of someone running into language constructs acting awkwardly in edgecases
<lectrick> isn't everything "awkward" until it's the "new norm"?
<breakingthings> And sure, they would learn if they looked at that thing's API and saw what it was doing, but being a language construct it initially appears to ruby newbies as being above api override
<breakingthings> Again, I'm not saying you don't have valid reasons.
cored has quit [Remote host closed the connection]
<lectrick> :) Understood.
<breakingthings> Just saying that I think these ones are important too.
<breakingthings> :)
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
Stilo has joined #ruby-lang
fn_ has joined #ruby-lang
pkrnj has joined #ruby-lang
nXqd has quit [Remote host closed the connection]
ivanoats has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
__Big0__ has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
ddd has quit [Ping timeout: 245 seconds]
fn_ has quit [Ping timeout: 256 seconds]
ddd has joined #ruby-lang
carloslopes has quit [Ping timeout: 256 seconds]
ivanoats has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
pr0ton has quit [Ping timeout: 248 seconds]
ivanoats has quit [Ping timeout: 260 seconds]
joevandyk has joined #ruby-lang
wyhaines_ has joined #ruby-lang
wyhaines has quit [Read error: No route to host]
Rarrikins has joined #ruby-lang
Rarrikins_h_f has quit [Ping timeout: 248 seconds]
ivanoats has joined #ruby-lang
neverminding has joined #ruby-lang
slyphon has joined #ruby-lang
ivanoats has quit [Ping timeout: 245 seconds]
torrieri has quit [Quit: Leaving...]
pr0ton has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
forrest has quit [Quit: Leaving]
mixandgo has quit [Quit: mixandgo]
slyphon has quit [Ping timeout: 245 seconds]
jpwhiting has joined #ruby-lang
<jpwhiting> hey all, having a bit of confusion here, I'm trying to run a ruby rails application, but when I run rake --trace db:setup or load the web ui it says delayed_job < 3.0 isn't available
<jpwhiting> but gem list shows I have delayed_job 2.1.4
<jpwhiting> any idea how I can track down why it can't see that gem?
yfeldblum has quit [Ping timeout: 272 seconds]
solars has quit [Ping timeout: 260 seconds]
breakingthings has quit []
xeronic has quit []
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
outoftime has quit [Quit: Leaving]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
enebo has quit [Quit: enebo]
pkrnj has joined #ruby-lang
<theoros> why doesn't File.umask reflect the same file permissions created through %x[touch /tmp/foo], even though %x[umask;] matches bash shell `umask` output
mistym has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
dustint has quit [Ping timeout: 276 seconds]
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
<theoros> oh hm, no, sorry, the issue seems to be that File.open is not using File.umask
hasimo has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 272 seconds]
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ivanoats has quit [Ping timeout: 248 seconds]
Criztian has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
Xzyx987X has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
mistym has joined #ruby-lang
Rarrikins has quit [Ping timeout: 260 seconds]
kith_ has joined #ruby-lang
kith has quit [Read error: Operation timed out]
Rarrikins has joined #ruby-lang
<theoros> something even weirder, actually. umask in bash says files should come out as rwxr-xr-x but touch and redirection create them with rw-r--r-- so i guess my linux-fu is off
enebo has joined #ruby-lang
slyphon has joined #ruby-lang
davidw has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
anonymuse has quit [Quit: Leaving...]
<zenspider> theoros: show some code
<zenspider> umask in bash says files should come out as that IF they're created with 0777
pr0ton has quit [Quit: pr0ton]
<zenspider> if you're creating them with 0755, that'll have a different outcome
hasimo has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 264 seconds]
<theoros> zenspider: i think i was forgetting that umask restricts, it doesn't grant. so umask of 0022 won't necessarily allow write permissions on files
gregmore_ has joined #ruby-lang
<theoros> zenspider: and files are by default not executable, for security reasons
hasimo has joined #ruby-lang
yfeldblum has joined #ruby-lang
pr0ton has joined #ruby-lang
<theoros> which sort of scuppers my plan of using 0777 & ~File.umask with File.open to get "proper" defaults
<zenspider> correct
<theoros> i don't want to mandate file permissions in my program though
Rarrikins has quit [Ping timeout: 260 seconds]
<theoros> basically i'm using a Tempfile and i don't want g-rwx,o-rwx on it after i move it
<zenspider> I'm guessing you're overthinking this
<zenspider> the user sets their umask. you create a file. everyone is happy
<theoros> file upload --> Tempfile --> move it somewhere --> want to fix the modes to act as if i'd touch'd
<theoros> Tempfile comes out as 600 because it goes in /tmp, and 600 is for security
mercwith1mouth has joined #ruby-lang
<zenspider> so chmod it after you move it
<theoros> what value do i pick to pass to chmod without relying on ~File.umask?
<theoros> or do i just also negate all executable and be done with it
<zenspider> ~File.umask is fine
<zenspider> it is what you and it against that you need to think about
<zenspider> whatever is appropriate for the file
Criztian has quit [Remote host closed the connection]
<theoros> hm, well, i suppose so, although leaving them executable seems like a bad idea
<zenspider> soooo. don't and it against the execute bits
<zenspider> again... do what seems appropriate for the file, and then allow the user to mask out bits they don't want as well
<theoros> well, yeah :)
<zenspider> this isn't hard
<theoros> it felt like there'd be a way to say "give me the same defaults as if the shell had created this file"
<theoros> but the two issues of umask and what touch gives you are orthogonal
<zenspider> no... they're not
<theoros> okay not orthogonal, but
<zenspider> touch will do 0666 & ~File.umask, which is an appropriate permission for a regular read/write file, masked against the user's desired umask
hasimo_ has joined #ruby-lang
<zenspider> so in my case, with a umask of 0002 I get 0664
<theoros> right, i get that
<theoros> i guess what i'm trying to say is that i didn't quite realise touch masked against 0666 instead of 0777 :)
<zenspider> why the fuck would it?
<zenspider> that just doesn't even make sense
<theoros> couldn't see the forest for the trees.
torrieri has joined #ruby-lang
<theoros> i knew it, but not while i was thinking about File.umask and why values weren't matching touch && ls -la
methods has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
kain_ has joined #ruby-lang
hasimo has quit [Ping timeout: 245 seconds]
<theoros> clearly 0666 is a sane default, i'm not suggesting otherwise.
kain__ has joined #ruby-lang
kain has quit [Ping timeout: 252 seconds]
<zenspider> 0644 might be more sane. depends on the context
<theoros> sure
charliesome has joined #ruby-lang
<theoros> in this case, "sane" is "whatever touch or echo foo > bar would give"
apeiros_ has quit [Remote host closed the connection]
kain_ has quit [Ping timeout: 256 seconds]