apeiros changed the topic of #ruby to: Ruby 2.1.0-p0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org|| Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<centrx> rubidious, What is the output of ruby -v
<benzrf> when would you use : centrx ?
yasushi has quit [Remote host closed the connection]
<benzrf> i dont know anything about : besides symbols
<centrx> rubidious, also whoa, it looks like are you using an extremely old version of Rails/active support?
<benzrf> o-o
mocfive has joined #ruby
jonno11 has quit [Quit: Textual IRC Client: www.textualapp.com]
monkegjinni has quit [Remote host closed the connection]
<rubidious> centrx: I'm trying to adapt this old code to a new server
<rubidious> it is not going well
<rubidious> (it's not my code)
jonno11 has joined #ruby
alexherbo2 has joined #ruby
<centrx> The Rails installation is almost seven years old
fgo has joined #ruby
monkegjinni has joined #ruby
bigkevmcd has joined #ruby
<rubidious> yes I figured it was easier to install the old rails version
<centrx> Is the code really that old?
<rubidious> I don't know, but there are more errors when I use an updated (2.3.14) rails than with this one :P
x1337807x has joined #ruby
<centrx> rubidious, If that is the technique you are using, run it on Ruby 1.8.7
aspires has joined #ruby
<rubidious> I can try
<centrx> You are going to have a lot of errors if you use a newer version of Ruby
<centrx> What is the general plan?
jlast has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<rubidious> so far mess with rake until I can get boot.rb working (check)
alexherbo2 has quit [Client Quit]
<centrx> rubidious, Probably a lot of security vulnerabilities in a Rails from that long ago...
mansi has joined #ruby
<rubidious> definitely
mansi has quit [Client Quit]
<rubidious> like I said it's not my server or my code I'm just helping someone out
monkegjinni has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<centrx> Okay
gigetoo has quit [Remote host closed the connection]
<centrx> rubidious, Ruby 1.8 will fix this error specifically
w4pm has joined #ruby
<rubidious> ok
freeone3000 has joined #ruby
tyl has joined #ruby
agjacome has joined #ruby
drumusician has quit [Ping timeout: 240 seconds]
<freeone3000> I have a problem with passenger not loading on apache2. This the right place?
<shevy> \o/
<shevy> long live 1.8.x
<shevy> rubidious it is a debian based system right?
gigetoo has joined #ruby
<rubidious> yes
pu22l3r_ has joined #ruby
<rubidious> I think 1.8 is installed I just can't find it
<rubidious> oh nevermind heh
<shevy> hehe
<shevy> default debian systems will always have a symlink at /usr/bin/ruby
<rubidious> I think I saw it in alternatives on my way through /bin
alexherbo2 has joined #ruby
<shevy> now it is my turn to ask... via File.stat() you can get a lot of information like
<shevy> #<File::Stat dev=0x801, ino=585900, mode=0100644
mojjojo has quit [Quit: mojjojo]
coca_rails has joined #ruby
<shevy> but how to obtain mode? when I run .mode, I get another number
mando has joined #ruby
law has left #ruby [#ruby]
<shevy> 33188
mojjojo has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
pu22l3r_ has quit [Remote host closed the connection]
<bnagy> >> 33188.to_s 8
<eval-in> bnagy => "100644" (https://eval.in/93643)
<bnagy> octal, son
<shevy> aaaah
<shevy> cool thanks
<bnagy> leading 0 indicates octal. Kind of wacked, but there it is
dodosan has joined #ruby
<bnagy> >> 0100644
<eval-in> bnagy => 33188 (https://eval.in/93644)
ndrei has joined #ruby
aspires has quit []
i_s has joined #ruby
aspires has joined #ruby
devinus has quit [Ping timeout: 245 seconds]
byprdct has joined #ruby
b00stfr3ak has quit [Ping timeout: 260 seconds]
<centrx> >> sprintf("%o", s.mode)
<eval-in> centrx => undefined local variable or method `s' for main:Object (NameError) ... (https://eval.in/93645)
mikepack has quit [Remote host closed the connection]
dodosan has quit [Ping timeout: 252 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<Jason> hmm. how do I do an activerecord migration outside of rails?
bradhe has joined #ruby
<centrx> Jason, What would that be like
<centrx> Jason, Can't you just use rake?
<bnagy> Jason: I would still recommend asking in #rubyonrais
<bnagy> because basically nobody else uses AR
<shevy> you guys really use rake?
burlyscudd has joined #ruby
cfinley has joined #ruby
mneorr_ has joined #ruby
baroquebobcat has joined #ruby
<benzrf> how can i change pry's colors -.-
<havenwood> benzrf: gem install pry-theme
<benzrf> its black color is almost the same as my bgy
<centrx> shevy, What's wrong with rake?
<benzrf> *bg
george2 has quit [Remote host closed the connection]
<benzrf> which is an issue >:o
<benzrf> havenwood: now what
em0ral has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
<havenwood> benzrf: edit your ~/.pryrc to select the theme you want: Pry.config.theme = 'railscasts'
<shevy> centrx dunno, I find that I don't seem to use it. I get around by just invoking methods in my .rb files and my classes that solve given problem sets
mneorr has quit [Ping timeout: 245 seconds]
<shevy> (from the commandline)
<rubidious> well using ruby 1.8.7 didn't seem to help
<benzrf> Array#concat is append+merge right
pu22l3r_ has joined #ruby
<benzrf> *mutating +=
<centrx> shevy, rake organizes similar functions into namespaces, and does not require knowing different filenames
<centrx> shevy, May be more useful for released software with myriad functionality, like Rails
<shevy> hmm
george2 has joined #ruby
burlyscudd has quit [Ping timeout: 251 seconds]
<centrx> benzrf, Pretty sure concat is just append
<benzrf> o:
marr has quit [Ping timeout: 248 seconds]
<shevy> benzrf irb seems to confirm your statement
<benzrf> >> a = []; a.concat [1, 2, 3]; a
<eval-in> benzrf => [1, 2, 3] (https://eval.in/93651)
<benzrf> >> a = [4, 5, 6]; a.concat [1, 2, 3]; a
<eval-in> benzrf => [4, 5, 6, 1, 2, 3] (https://eval.in/93652)
<centrx> rubidious, What is the error now:
<shevy> but why use concat when you can use <<
willb1 has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 248 seconds]
<benzrf> >> a = [4, 5, 6]; a << [1, 2, 3]; a
<eval-in> benzrf => [4, 5, 6, [1, 2, 3]] (https://eval.in/93653)
rubist has joined #ruby
<benzrf> ^different
<shevy> ah
<rubidious> centrx: same one :x
<shevy> indeed
<rubidious> I can't be sure it has anything to do with ruby though
<rubidious> there is so much wrong
Brolen has joined #ruby
<rubist> hy i have a question i m a newbie in objet development
Hanmac has joined #ruby
<centrx> rubidious, Are you sure you are actually running with the 1.8 copy, and not still running with the 1.9 copy?
<benzrf> rubist: sup yo
<rubist> what is the signification of parameters = {}
<shevy> rubidious won't be easy either way, after all you use debian which won't play well with gem :)
<benzrf> rubist: explain
<centrx> I have never had a problem with gems on Debian
<shevy> rubist that is a hash
mojjojo has quit [Quit: mojjojo]
lfox has quit [Quit: ZZZzzz…]
<rubist> shevy, so he tak all params of the hash
<shevy> rubist who is he
<centrx> rubidious, var = {} creates an empty hash
<rubidious> centrx I ahven't restarted my server, but I checked -v and I changed the symlinks so yeah it's 1.8
<centrx> rubist, rather
<centrx> rubidious, Well if you haven't restarted it it is running the same software it was running before
ndrei has quit [Read error: Operation timed out]
yfeldblum has quit [Remote host closed the connection]
<shevy> centrx if you install gems on debian, they will end up in some /var/lib path right?
<rubidious> well I ran rake
<rubidious> to test
<centrx> shevy, Yes
ner0x has quit [Quit: Leaving]
EngierkO has joined #ruby
<rubidious> part of my problem is it can't find rails
bbttxu has quit [Quit: bbttxu]
zz_karupanerura is now known as karupanerura
brennanMKE has quit [Ping timeout: 272 seconds]
<shevy> rubidious hehe
<rubist> ALL : thanks for your explication
freeone3000 has quit [Quit: Konversation terminated!]
<shevy> rubidious knowing where binaries are is the first step to a solution
<shevy> if all else fails, find / -name rails should always yield the right answer
<rubidious> well boot.rb is supposed to find it
<rubidious> no I know where it is
<shevy> \o/
<rubidious> boot.rb just can't find it
rootshift has joined #ruby
<rubidious> or at least that's oen of the problems that I may or may not have solved
<shevy> you could try to modify boot.rb, early in the file add a: p $LOAD_PATH
<shevy> where is rails on your system btw?
<rubidious> /usr/bin/local
<shevy> aaaah
<rubidious> but I have another gem of rails
<shevy> aaaaaaaaaah
<rubidious> 1.2.3
yfeldbl__ has joined #ruby
<rubidious> which I need to run
matchaw_ has joined #ruby
<shevy> perhaps it finds both but only runs the first one it can find
george2 has quit [Ping timeout: 252 seconds]
<centrx> If it is actually outputting the exact same error message, then it is still running on ruby 1.9, because the message still has the "1.9.1" directory
matchaw has quit [Ping timeout: 248 seconds]
<rubidious> it was earlier but I can't be sure man, this is so messed up
coca_rails has quit [Remote host closed the connection]
<rubidious> I'm now trying to fix a different possibly relate dproblem
coca_rails has joined #ruby
robscomputer_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
<rubidious> all of my gems appear to be in a 1.9.1 directory though :x
matchaw_ has quit [Read error: Operation timed out]
<centrx> rubidious, Use rvm or uninstall 1.9
danijoo has quit [Read error: Connection reset by peer]
willb1 has joined #ruby
matchaw has joined #ruby
danijoo has joined #ruby
dogweather has quit []
Nogbit has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<shevy> centrx didn't you say before that all your gems work on debian, now you suggest rvm ;)
coca_rails has quit [Ping timeout: 240 seconds]
lethjakman has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Ping timeout: 252 seconds]
<shevy> debian doesn't make people happy!
octoberry has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
<centrx> shevy, If you want to use multiple installations of Ruby, use RVM, no matter the distro
mneorr_ has quit [Remote host closed the connection]
<havenwood> rubidious: update-alternatives --config ruby && update-alternatives --config gem
<centrx> shevy, Debian has made me happy for 15 years!
mneorr has joined #ruby
<havenwood> rubidious: if you want to use Debian's pkgs
predator217 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DaZ has quit [Read error: Operation timed out]
wiku5_ has joined #ruby
<rubidious> havenwood: thanks, I'll give it a shot
<rubidious> I think I'm goign to try to just port their code to a newer rails
DaZ has joined #ruby
Virtualize has joined #ruby
<rubidious> their codebase is smaller than the rails stuff
Lewix has quit [Remote host closed the connection]
<havenwood> rubidious: usually a little custom code hiding somewhere in the monolith, Rails specific stuff is better in #rubyonrails
nobitanobi has quit [Read error: Connection reset by peer]
<rubidious> oh I was in #rails
<rubidious> cool
<havenwood> rubidious: super common mistake!
predator117 has quit [Ping timeout: 248 seconds]
<havenwood> people come here saying "#rails is empty so..."
<shevy> it's not empty!
<shevy> almost 200 idlers there
mneorr has quit [Ping timeout: 245 seconds]
<havenwood> heh
baroquebobcat has joined #ruby
<rubidious> one less now
billy_ran_away has quit [Ping timeout: 272 seconds]
mojjojo has joined #ruby
nathancahill_ has joined #ruby
rezzack1 has joined #ruby
nathancahill has quit [Ping timeout: 264 seconds]
nathancahill_ is now known as nathancahill
rezzack has quit [Ping timeout: 248 seconds]
Wolland has quit [Remote host closed the connection]
robscomputer_ has quit [Remote host closed the connection]
robscomputer has joined #ruby
Megtastique has joined #ruby
burlyscudd has joined #ruby
kitak has joined #ruby
billy_ran_away has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
trickyhero has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
bearjew has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
burlyscudd1 has joined #ruby
tylersmith has quit [Remote host closed the connection]
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby
<pragmatism> Has anyone in here used Goliath with EM's EM.error_handler?
trickyhero has joined #ruby
burlyscudd1 has quit [Client Quit]
Brolen has quit [Remote host closed the connection]
burlyscudd has joined #ruby
i_s has quit [Remote host closed the connection]
jailbot has quit []
fgo has quit [Remote host closed the connection]
simoz7 has joined #ruby
falood has joined #ruby
rezzack1 has quit [Quit: Leaving.]
rezzack has joined #ruby
simoz6 has quit [Ping timeout: 248 seconds]
robustus has quit [Ping timeout: 245 seconds]
havenwood has quit []
Amart41 has joined #ruby
kbouwser has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
robustus has joined #ruby
mneorr has joined #ruby
asteros has quit [Quit: asteros]
asteros has joined #ruby
Amart41 has quit [Ping timeout: 272 seconds]
bean__ has joined #ruby
bean__ has quit [Client Quit]
nowthatsamatt has joined #ruby
habanany has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 245 seconds]
centrx has quit [Quit: Leaving]
nowthatsamatt has quit [Client Quit]
<wiku5_> hey, just wondering, what's a better alternative to truecrypt that doesn't use fuse?
aspires has quit []
* soahccc wonders if women are better in writing threaded applications... multitasking and all
gregf has quit [Quit: WeeChat 0.4.2]
tuttinator has joined #ruby
skoilk has quit [Quit: Connection closed for inactivity]
tuttinator has quit [Client Quit]
bradhe has joined #ruby
tkuchiki has joined #ruby
subbyyy_ has joined #ruby
subbyyy has quit [Read error: Connection reset by peer]
dodosan has joined #ruby
habanany has quit [Ping timeout: 260 seconds]
mojjojo has quit [Quit: mojjojo]
skulker has joined #ruby
stkowski has joined #ruby
aspires has joined #ruby
griffindy has joined #ruby
<benzrf> i had a problem and i tried to solve it with multithreading
<benzrf> now have i problems two
duggiefresh has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
dodosan has quit [Ping timeout: 240 seconds]
<shevy> soahccc I think you'd need to analyze the global pattern here - is the multitasking really making them faster/more efficient? how about the focus and the maximum yield of quality in code
<shevy> like how active the brain is at the time and how efficient
sepp2k has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
trickyhero has quit [Remote host closed the connection]
sambao21 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
luckyruby has joined #ruby
benzrf has left #ruby [#ruby]
sparrovv has quit [Remote host closed the connection]
CaptainJet has quit []
<bnagy> or we could just say that there is absolutely no credible basis for supposing that gender has any implicit effect of any kind of programming whatsoever
<Jason> 34
<Jason> oop
whomp_ has quit [Ping timeout: 240 seconds]
Jetchisel has joined #ruby
coca_rails has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
banjara has quit [Quit: Leaving.]
brennanMKE has quit [Remote host closed the connection]
superscott[8] has joined #ruby
lesliewen has quit [Quit: Leaving.]
brennanMKE has joined #ruby
<shevy> bnagy but there is a huge gender gap in programming!
jfelchner has quit [Ping timeout: 240 seconds]
<bnagy> yeah and there aren't many black polo players either.
brennanMKE has quit [Remote host closed the connection]
sassamo_ has quit [Remote host closed the connection]
<jonah> lol
brennanMKE has joined #ruby
sassamo has joined #ruby
mojjojo has joined #ruby
Megtastique has quit []
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefresh has quit [Remote host closed the connection]
jfelchner has joined #ruby
<pontiki> just being capable of multitasking doesn't confer understanding of how to make something multitasking
<pontiki> i think that is still a rare form of understanding
brennanM_ has joined #ruby
robert_ has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Read error: Connection reset by peer]
trickyhero has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
brennanM_ has quit [Remote host closed the connection]
mojjojo has quit [Client Quit]
jonno11 has joined #ruby
brennanMKE has joined #ruby
sassamo_ has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
griffindy has joined #ruby
Justin4770 has left #ruby [#ruby]
brennanMKE has quit [Ping timeout: 252 seconds]
coderhs has quit [Ping timeout: 245 seconds]
<luckyruby> anyone doing stripe's ctf?
<pragmatism> I was thinking about it
<shevy> what is that
<luckyruby> I'm barely on the leaderboard for level0. https://stripe-ctf.com/leaderboard/0
<bnagy> too busy with uctf and crypto challenges
Brolen has joined #ruby
coca_rails has quit [Remote host closed the connection]
<luckyruby> i think i have to use another language
guardianx has quit [Remote host closed the connection]
coca_rails has joined #ruby
wolfman has quit [Ping timeout: 264 seconds]
superscott[8] has quit [Quit: superscott[8]]
Barrin6 has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
mikesplain has joined #ruby
coca_rails has quit [Ping timeout: 240 seconds]
mlpinit_ has quit [Remote host closed the connection]
soulcake has joined #ruby
meatherly has joined #ruby
Guest8424 has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 265 seconds]
Wolland has joined #ruby
MacGruber has joined #ruby
<MacGruber> sups folks
<MacGruber> ruby n00b
<Jason> puts "hi"
<rubidious> do capitalized variables (DEFAULT_LANG) have special meaning in ruby?
<pragmatism> rubidious: constants?
<pragmatism> The interpreter will warn you if you attempt to mutate
mikesplain has quit [Quit: WeeChat 0.4.2]
<shevy> rubidious only the first character is important
mikesplain has joined #ruby
<Jason> pragmatism is correct,
<Jason> (irb):1: warning: previous definition of XYZ was here
<Jason> :)
<shevy> rubidious ALL_CAPS are usually used for most plain constants like FOO = 'hi there'
<shevy> but you could use Foo = 'x' too
<pragmatism> shevy: no
<pragmatism> Foo looks like a class name
<pragmatism> convention!
<shevy> ruby parser won't care
<pragmatism> The coders reading it will
mikesplain has quit [Client Quit]
<shevy> I don't read other people's code, it is too awful to endure :)))
simoz7 has quit [Ping timeout: 265 seconds]
xjiujiu has joined #ruby
<shevy> rubidious, the ruby parser will complain about certain attempts:
mikesplain has joined #ruby
<pragmatism> uh
<shevy> >> class x; end
<eval-in> shevy => /tmp/execpad-b67f452f89d6/source-b67f452f89d6:2: class/module name must be CONSTANT ... (https://eval.in/93679)
coca_rails has joined #ruby
brennanMKE has joined #ruby
meatherly has quit []
<shevy> pragmatism I really think there is a lot of ugly ruby code out there
zxd has quit [Ping timeout: 240 seconds]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
okapi14 has quit [Read error: Connection reset by peer]
luckyruby has quit [Remote host closed the connection]
Jetchisel has quit [Ping timeout: 252 seconds]
luckyruby has joined #ruby
meatherly has joined #ruby
mikesplain has quit [Client Quit]
wiku5_ has quit [Quit: WeeChat 0.3.8]
mikesplain has joined #ruby
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whomp has joined #ruby
chipotle has joined #ruby
iamsean has quit [Quit: iamsean]
mikesplain has quit [Client Quit]
<soahccc> I sometimes don't know anymore why I have coded something they way I've done it :(
whomp has quit [Ping timeout: 245 seconds]
w4pm has quit [Ping timeout: 264 seconds]
coca_rails has quit [Remote host closed the connection]
voodoofish4301 has quit [Quit: Leaving.]
coca_rails has joined #ruby
falood has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
pu22l3r_ has joined #ruby
<soahccc> shevy: On a scale from 1 (bad) - 10 (good), how would you rate this dirty workaround? https://gist.github.com/2called-chaos/8571489
v1n has quit [Ping timeout: 272 seconds]
tylersmith has joined #ruby
bradhe has joined #ruby
mikesplain has joined #ruby
coca_rails has quit [Ping timeout: 240 seconds]
lfox has joined #ruby
snath has joined #ruby
MJBrune has joined #ruby
amclain has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
droid has joined #ruby
jfelchner has quit [Ping timeout: 240 seconds]
kbouwser has quit [Quit: Textual IRC Client: www.textualapp.com]
tylersmith has quit [Ping timeout: 272 seconds]
subbyyy_ has quit [Ping timeout: 248 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
jfelchner has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
xjiujiu has joined #ruby
dodosan has joined #ruby
araujo has joined #ruby
dodosan has quit [Read error: Connection reset by peer]
wtfitsme has quit [Ping timeout: 252 seconds]
dodosan has joined #ruby
synergy_ has quit [Ping timeout: 265 seconds]
Hobogrammer has quit [Read error: Operation timed out]
<rubidious> if a constant like that 'DEFAULT_LANG' is not defined, where would be a good place to define it?
kpshek has joined #ruby
<rubidious> it's all over the place in this app
<rubidious> but I can't see where to properly define it
mando_ has joined #ruby
troyready has quit [Ping timeout: 272 seconds]
centrx has joined #ruby
hiall_ has quit [Quit: hiall_]
mando has quit [Ping timeout: 272 seconds]
mocfive has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 264 seconds]
pu22l3r_ has quit [Remote host closed the connection]
mocfive has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
julweber has quit [Remote host closed the connection]
xjiujiu has joined #ruby
trickyhero has quit [Ping timeout: 252 seconds]
Korvin has joined #ruby
skulker has quit [Remote host closed the connection]
brunops has joined #ruby
skulker has joined #ruby
<Korvin> is there a way to get a pointer to a pointer in ruby?
<Korvin> or I guess a reference to a reference
<Korvin> so changing the value of a variable changes everything referencing that variable
burlyscudd has joined #ruby
andll has joined #ruby
vlad_starkov has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<rubidious> syntax error (means I'm doing something right!)
xjiujiu has joined #ruby
<rubidious> establish_connection ( :adapter => 'mysql', :database => @@website, :host => 'localhost', .... )
<rubidious> rails complains about the spaces
<rubidious> for some reaons
<rubidious> reason*
<rubidious> ruby 1.9.1
yacks has joined #ruby
* Nilium shrugs since it's rails
<rubidious> syntax error, unexpected tASSOC, expecting ')'
<rubidious> ...ablish_connection ( :adapter => 'mysql', :database => @@webs...
r0b0f377 has joined #ruby
skulker has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Quit: Leaving...]
james_d_h has joined #ruby
<rubidious> hah!
falood has joined #ruby
<rubidious> ==> instead of =>
<rubidious> oh nevermind
w4pm has joined #ruby
<godd2> People actually use class variables?
shevy has joined #ruby
gja has joined #ruby
james_d_h has quit [Client Quit]
binaryhat has joined #ruby
nari has joined #ruby
_reset has quit [Quit: Leaving...]
senayar_ has quit [Remote host closed the connection]
reset has joined #ruby
senayar has joined #ruby
baroquebobcat has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
baroquebobcat has joined #ruby
<Korvin> I'm trying to get an array contain the same string objects as another array, but sorted
xjiujiu has joined #ruby
asteros has quit [Quit: asteros]
vlad_starkov has quit [Remote host closed the connection]
asteros has joined #ruby
asteros has quit [Client Quit]
reset has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
p8952 has quit [Ping timeout: 272 seconds]
trickyhero has joined #ruby
pu22l3r_ has joined #ruby
magoo has quit [Ping timeout: 252 seconds]
krz has joined #ruby
<jeregrine> whats the best way to return a string UNALTERED from a ruby script into a bash script?
<jeregrine> puts is bastardizing it
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
mocfive has quit [Remote host closed the connection]
xjiujiu has joined #ruby
mocfive has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
mocfive has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
sambao21 has joined #ruby
sergicles has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<MacGruber> hmm - have a rack version error due to more than version of rack being installed on a system but i can;t really uninstall the higher version
Hanmac has quit [Ping timeout: 272 seconds]
<centrx> Korvin, Array#sort
<centrx> MacGruber, Use RVM
<MacGruber> My gem specifies rack 1.4.2 but my sinatra app is trying to use the higher version
<Xuisce> MacGruber: aka MacGyver
<MacGruber> yep
sambao21 has quit [Ping timeout: 245 seconds]
<Korvin> centrx: the important part was getting a separate array object containing the references to the same strings
<MacGruber> @centrx - I'm using RVM
<MacGruber> but pretty new to ruby so not sure whats going on here
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
yacks has quit [Ping timeout: 272 seconds]
julweber has joined #ruby
binaryhat has quit [Quit: Leaving]
xjiujiu has joined #ruby
xjiujiu has quit [Max SendQ exceeded]
XBlackHatX has joined #ruby
yacks has joined #ruby
<bricker`LA> MacGruber: You should run `rackup` with `bundle exec rackup` so it uses the version specified in your Gemfile
<bricker`LA> MacGruber: right now you're just using what version is installed globally
xjiujiu has joined #ruby
<MacGruber> got it
<bricker`LA> or, in the current RVM ruby set anyways
<MacGruber> so basically thats not how i should be starting the app
digifiv5e is now known as guyz
<bricker`LA> MacGruber: that's right.
dodosan has quit [Remote host closed the connection]
<centrx> Korvin, That is a Rails/ActiveSupport method on Array, but if you are not using Rails you can copy the logic
<MacGruber> this is for running the app to be served for usage, wasn't sure if bundle exec was correct in that case
axl_ has quit [Quit: axl_]
axl_ has joined #ruby
mando_ has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
sski has joined #ruby
mando has joined #ruby
<centrx> Korvin, Which for an array of strings would just be: map { |s| s.dup }
bradhe has joined #ruby
<Korvin> map is what I needed actually
<Korvin> because I needed to iterate over an array while grabbing the reference to the strings it contains
<Korvin> thanks
<centrx> map it is!
<bnagy> Korvin: it should just work
<bnagy> look:
<Korvin> bnagy: ?
julweber has quit [Ping timeout: 252 seconds]
_mtr has joined #ruby
<bnagy> >> a=["foo", "bar"]; b=a; b.sort!; b.first.upcase!; [b,a]
<eval-in> bnagy => [["BAR", "foo"], ["BAR", "foo"]] (https://eval.in/93691)
jonahR has quit [Quit: jonahR]
nateberkopec has joined #ruby
mando has quit [Ping timeout: 272 seconds]
<bnagy> or maybe even more obvious:
<bnagy> >> a=["foo", "bar"]; b=a; b=b.sort; b.first.upcase!; [b,a]
<eval-in> bnagy => [["BAR", "foo"], ["foo", "BAR"]] (https://eval.in/93692)
<bnagy> same strings.
bradhe has quit [Ping timeout: 252 seconds]
<Korvin> ah
<Korvin> that's easy
<Korvin> thanks
<bnagy> np
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
phipes has joined #ruby
v1n has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL has left #ruby [#ruby]
snath has quit [Ping timeout: 260 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
jfelchner has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
luckyrub_ has joined #ruby
jfelchner has joined #ruby
andll has quit [Remote host closed the connection]
alexfreidah has quit [Ping timeout: 264 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
senayar_ has joined #ruby
luckyruby has quit [Ping timeout: 272 seconds]
xjiujiu has joined #ruby
subbyyy_ has joined #ruby
simoz7 has joined #ruby
jonah has quit [Remote host closed the connection]
senayar has quit [Read error: Operation timed out]
senayar_ has quit [Remote host closed the connection]
snath has joined #ruby
burlyscudd has quit [Quit: Leaving.]
mary5030 has joined #ruby
duggiefresh has quit [Remote host closed the connection]
digital-ghost has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
smathieu has quit [Remote host closed the connection]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
smathieu has joined #ruby
dukz has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
vlad_starkov has joined #ruby
subbyyy_ has quit [Ping timeout: 272 seconds]
Hobogrammer has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
Brolen has quit [Remote host closed the connection]
aspires has quit []
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
luckyrub_ has quit [Quit: Leaving...]
luckyruby has joined #ruby
zxq9 has quit [Quit: Konversation terminated!]
nateberkopec has joined #ruby
Azure has quit [Read error: Connection reset by peer]
allen_on_c has joined #ruby
Azure has joined #ruby
fijimunkii has joined #ruby
mr_red has quit [Quit: Bye :)]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
luckyruby has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
p8952 has joined #ruby
luckyruby has joined #ruby
Akuma has quit [Ping timeout: 272 seconds]
zz_anildigital is now known as anildigital
Akuma has joined #ruby
sassamo_ has quit [Remote host closed the connection]
sassamo has joined #ruby
freerobby has joined #ruby
mikesplain has quit [Remote host closed the connection]
cg433n has joined #ruby
Hobogrammer_ has joined #ruby
cg433n has left #ruby [#ruby]
griffindy has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
Hobogrammer has quit [Ping timeout: 252 seconds]
dukz has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 252 seconds]
XBlackHatX has quit [Quit: Leaving]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
aryaching has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
xjiujiu has joined #ruby
aryaching_ has joined #ruby
dukz has joined #ruby
mr_red has joined #ruby
browndawg has quit [Client Quit]
nateberkopec has quit [Ping timeout: 272 seconds]
ryantm has joined #ruby
subbyyy_ has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
aryaching_ has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
em0ral has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
aryaching has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
dukz_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
gener1c has quit [Disconnected by services]
gener1c_ has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
mando has joined #ruby
agjacome has quit [Quit: leaving]
xjiujiu has joined #ruby
Kricir has joined #ruby
dukz has quit [Ping timeout: 272 seconds]
craigp has joined #ruby
craigp has quit [Remote host closed the connection]
centrx has quit [Quit: Leaving]
kobain has quit [Ping timeout: 260 seconds]
kobain_ has joined #ruby
sassamo has joined #ruby
burlyscudd has quit [Quit: Leaving.]
ewnd9 has joined #ruby
magoo has joined #ruby
braincrash has quit [Quit: bye bye]
trickyhero has quit [Ping timeout: 240 seconds]
jfelchner has quit [Ping timeout: 240 seconds]
mando has quit [Ping timeout: 272 seconds]
trickyhero has joined #ruby
tuttinator has joined #ruby
anildigital is now known as zz_anildigital
krz has quit [Quit: WeeChat 0.4.2]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
braincrash has joined #ruby
krz has joined #ruby
xjiujiu has joined #ruby
iamsean has joined #ruby
simoz7 has quit [Ping timeout: 240 seconds]
fire has joined #ruby
magoo has quit [Client Quit]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dukz has joined #ruby
w4pm has quit [Read error: Operation timed out]
kobain_ has quit []
dik_dak has joined #ruby
dukz_ has quit [Ping timeout: 260 seconds]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sensen has joined #ruby
sassamo has quit [Ping timeout: 252 seconds]
MattStratton has joined #ruby
george2 has joined #ruby
Kricir has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 252 seconds]
end_guy has quit [Remote host closed the connection]
craigp has joined #ruby
yfeldbl__ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
trickyhero has quit [Ping timeout: 245 seconds]
bthesorceror has joined #ruby
craigp has quit [Ping timeout: 248 seconds]
<george2> what's the simplest way to return the highest value in a hash? (For hash [:a => 2, :b => 1, :d => 3], return 3)
narcan has joined #ruby
meatherly has quit [Remote host closed the connection]
<bnagy> >> {:a => 2, :b => 1, :d => 3}.values.max
<eval-in> bnagy => 3 (https://eval.in/93742)
<george2> of course there's a values.max :)
jonah has joined #ruby
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
iamsean has quit [Quit: iamsean]
chipotle has joined #ruby
sambao21 has joined #ruby
<bnagy> >> Enumerable.instance_methods.include? :max
<eval-in> bnagy => true (https://eval.in/93744)
<bnagy> Array includes Enumerable
sambao21 has quit [Client Quit]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
axl_ has quit [Quit: axl_]
tylersmith has joined #ruby
jtdowney has joined #ruby
aspires has joined #ruby
yfeldblum has quit [Remote host closed the connection]
trickyhero has joined #ruby
tejas has joined #ruby
subbyyy_ has quit [Ping timeout: 252 seconds]
angusiguess has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
sree has joined #ruby
bthesorceror has quit [Remote host closed the connection]
gja has quit [Ping timeout: 245 seconds]
krz has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
Amart41 has joined #ruby
Korvin has quit [Quit: Leaving...]
wolfman has joined #ruby
angusiguess has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
iamsean has joined #ruby
Galgorth has joined #ruby
xjiujiu has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
zz_anildigital is now known as anildigital
dseitz has joined #ruby
anildigital is now known as zz_anildigital
Spami has quit [Quit: This computer has gone to sleep]
Amart41 has quit [Ping timeout: 272 seconds]
angusiguess has quit [Ping timeout: 240 seconds]
lfox has quit [Quit: ZZZzzz…]
aryaching has joined #ruby
vpretzel has quit [Quit: Adios!]
yasushi has joined #ruby
Wolland has quit [Remote host closed the connection]
dukz_ has joined #ruby
bradhe has joined #ruby
byprdct has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
fire has joined #ruby
jlast has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
dukz has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
sethen has quit [Quit: Leaving...]
JGreG has joined #ruby
CaptainJet has quit []
krz has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
sassamo has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
smathieu has quit [Remote host closed the connection]
JGreG has quit [Remote host closed the connection]
Wolland has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
malcolmva has quit [Ping timeout: 272 seconds]
xjiujiu has quit [Read error: Connection reset by peer]
mando has joined #ruby
Deele has joined #ruby
trickyhero has quit [Ping timeout: 248 seconds]
pu22l3r_ has quit [Remote host closed the connection]
mando has quit [Ping timeout: 272 seconds]
tyl has joined #ruby
sree has quit [Ping timeout: 272 seconds]
<sickweezle> I was hoping to put this off longer, but it looks like I need to learn how the heck the ruby search path works. :/
shedd has joined #ruby
aryaching_ has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
mary5030 has quit [Remote host closed the connection]
Jetchisel has joined #ruby
Jdubs has quit [Remote host closed the connection]
angusiguess has joined #ruby
malcolmva has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
alexfreidah has joined #ruby
dukz has joined #ruby
tuttinator has quit [Quit: Leaving...]
fijimunkii has quit [Ping timeout: 240 seconds]
hiall_ has joined #ruby
ahmedelgabri has joined #ruby
mikepack has quit [Remote host closed the connection]
zz_anildigital is now known as anildigital
dukz_ has quit [Ping timeout: 265 seconds]
alexfreidah has quit [Ping timeout: 240 seconds]
trickyhero has joined #ruby
x1337807x has joined #ruby
<sickweezle> in my project root, I have spec/lib/link_handler_spec.rb which using "require 'link_handler'" loaded lib/link_handler.rb w/o issue
cfinley has quit [Ping timeout: 272 seconds]
<sickweezle> trying the same with spec/plugins/link_watcher_spec.rb can't load plugins/link_watcher.rb using "require 'link_watcher'"
kpshek has quit []
aryaching has joined #ruby
<sickweezle> I suppose I should clarify that this is using 'bundle exec rspec'
dukz has quit [Remote host closed the connection]
dodosan has joined #ruby
aryaching_ has quit [Ping timeout: 252 seconds]
dukz has joined #ruby
sparrovv has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
godd2 has quit [Ping timeout: 252 seconds]
dukz has quit [Ping timeout: 248 seconds]
trickyhero has quit [Quit: Leaving]
sparrovv has quit [Ping timeout: 252 seconds]
x1337807x has quit [Client Quit]
jlast has quit [Remote host closed the connection]
sree has joined #ruby
chipotle has joined #ruby
yasushi has quit [Remote host closed the connection]
crazymykl has joined #ruby
tonni has quit [Remote host closed the connection]
sree has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 264 seconds]
craigp has joined #ruby
sree has joined #ruby
nateberkopec has joined #ruby
brennanMKE has joined #ruby
b00stfr31k has joined #ruby
sree has quit [Read error: Connection reset by peer]
kure has joined #ruby
freerobby has quit [Quit: Leaving.]
sree has joined #ruby
<pontiki> sickweezle: is plugins in your load path?
relme has joined #ruby
nateberkopec has quit [Ping timeout: 248 seconds]
brennanMKE has quit [Ping timeout: 260 seconds]
<sickweezle> I have no idea.
<sickweezle> :(
b00stfr31k has quit [Quit: leaving]
<sickweezle> If it is something I have to set, I wouldn't think that lib or plugins are in the load path.
relme has quit [Quit: Quit]
keen___ has joined #ruby
bradhe has joined #ruby
keen__ has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
<sickweezle> Okay. Yeah. Neither are in my load paths.
Liothen has quit [Quit: System of a down……]
<sickweezle> er, load path
<sickweezle> $LOAD_PATH from inside bundle exec irb doesn't include them
vlad_starkov has joined #ruby
agent_white has joined #ruby
mocfive has joined #ruby
<agent_white> Evenin folks
sree has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 264 seconds]
<agent_white> So odd question: Can I not pass ARGV args to a script and immediately call puts...gets afterward?
<agent_white> inside the script*
<Nilium> Eh?
mmcdaris has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
mmcdaris has quit [Client Quit]
<pontiki> of course you can
vlad_starkov has joined #ruby
<agent_white> Here's the gist: https://gist.github.com/jakenotjacob/8573593
<pontiki> why would you imagine you couldn't?
<agent_white> pontiki: iono, I think I may be doing something wrong. But if you pass in ARGV values to the above script, it fails
<agent_white> But if you pass nothing in, then it runs fine!
dayepa has quit [Ping timeout: 252 seconds]
<Nilium> That's an interesting error.
dukz has joined #ruby
<agent_white> the "asdf" is from me trying to run it as "./script.rb asdf asf"
jtdowney has quit []
<pontiki> you better look at the date
<agent_white> pontiki: Too many '.' operators?
<agent_white> Otherwise I'm not sure what's wrong with it.
<sickweezle> ahhh ... I see now. rspec adds ./lib to the load path. :/
<sickweezle> As I run rspec from the root of my project, which has lib under it, so that is the magic...
sensen has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 260 seconds]
dayepa has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
mando has joined #ruby
BrixSat has quit [Remote host closed the connection]
v10energy has quit [Ping timeout: 252 seconds]
BrixSat has joined #ruby
<bnagy> agent_white: huh, that's weird
<pontiki> agent_white: i don't get this
<bnagy> basically gets is confused
<bnagy> use STDIN.gets
<pontiki> oh oh
<pontiki> it's because of ARGF isn't it
<bnagy> yeah
<bnagy> for the old ruby oneliner perl style crap that nobody has used for 10 years
Hanmac has joined #ruby
agent_white has quit [Ping timeout: 245 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<pontiki> my god, what was i doing yesterday???
agent_white has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
<agent_white> pontiki: Not sure if you responded, I got DC'ed :/
<BraddPitt> how do i uninstall a gem?
<bnagy> agent_white: use STDIN.gets
<pontiki> agent_white: bnagy got it. it's because of ARGF. you have to use STDIN.gets
v1n has quit [Ping timeout: 252 seconds]
<BraddPitt> oh, gem uninstall <gem name> ?
<agent_white> bnagy: Huh... what's the deal behind that?
<agent_white> bnagy/pontiki: Thank you, btw :D
mando has quit [Ping timeout: 272 seconds]
<bnagy> it's so you can pipeline stuff I guess
<bnagy> if in doubt just explicitly use the handle you want
phansch has joined #ruby
lethjakman has joined #ruby
<agent_white> bnagy: Ahhh alrighty! Never knew that there was more than one implementation of gets :P
<agent_white> Thanks for the help!
ewnd9 has quit [Remote host closed the connection]
Parker0 has joined #ruby
tejas has quit [Quit: This computer has gone to sleep]
sensen has joined #ruby
coderhs has joined #ruby
razibog has joined #ruby
<agent_white> ... and would this be the best way to make sure that variable exists?
dukz_ has joined #ruby
<agent_white> tags = STDIN.gets.chomp or raise "Must provide post title."
<pontiki> what do tags have to do with the title?
<agent_white> pontiki: I was about to say, I was reading the wrong line. But nevermind, I figured it out ;P
<agent_white> typing to the wrong line*
dukz has quit [Ping timeout: 245 seconds]
kaldrenon has joined #ruby
Jdubs has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pranny has joined #ruby
noop has joined #ruby
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
lpvb has joined #ruby
<lpvb> whats the best GUI library for ruby that isn't shoes?
kaldrenon has quit [Ping timeout: 245 seconds]
pranny1 has joined #ruby
<bnagy> swing
monkegjinni has joined #ruby
jzinedine has joined #ruby
dayepa1 has joined #ruby
dayepa has quit [Ping timeout: 245 seconds]
sensen_ has joined #ruby
zipper has joined #ruby
julweber has joined #ruby
<lpvb> anything else?
sensen has quit [Ping timeout: 240 seconds]
pranny has quit [Ping timeout: 252 seconds]
Loaft has quit [Ping timeout: 248 seconds]
byprdct has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
tagrudev has joined #ruby
angusiguess has joined #ruby
julweber has quit [Ping timeout: 252 seconds]
rezzack has quit [Ping timeout: 245 seconds]
aspires has quit []
Loaft has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
dawkirst has joined #ruby
godd2 has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
Loaft has quit [Ping timeout: 240 seconds]
ahmedelgabri has quit [Remote host closed the connection]
bradhe has joined #ruby
Barrin6 has quit [Quit: Leaving]
mengu has joined #ruby
pranny has joined #ruby
pranny1 has quit [Ping timeout: 248 seconds]
lemonsparrow has joined #ruby
yasushi has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
Loaft has joined #ruby
sergicles has quit [Quit: sergicles]
jzinedine has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yasushi has quit [Ping timeout: 248 seconds]
apeiros has quit [Read error: Connection reset by peer]
future28 has joined #ruby
apeiros has joined #ruby
<future28> Hey, I am new to ruby. I have read a file in using f = File.read("my_file") and I now want to print the file using %q(f), however this is taking literal f. How can I make it print the file f?
havenwood has joined #ruby
<bnagy> print f ?
<future28> bnagy: I want to use the %q modifier to escape all quotes
apeiros_ has joined #ruby
<habhooB> that's not how it works
apeiros has quit [Read error: Connection reset by peer]
<future28> Could you help me?
<habhooB> future28: use the String#gsub method on each line of the file
<habhooB> to replace quotes
gja has joined #ruby
<bnagy> what do you want to happen?
<future28> I'm wanting to put the quotes in the form \"yes\"
<future28> ^
<bnagy> so you want a file containing "yes" you want to now get a 7 byte string?
<bnagy> from a 4 byte file
<future28> Yes
stryek has quit [Ping timeout: 260 seconds]
<bnagy> you could print f.inspect but that will change assorted other stuff
<bnagy> or just use tr or gsub, as suggested above
<habhooB> future28: do you want to save the modified file, or just print it?
khfeng has joined #ruby
<future28> Not saving the file - I will read the file in, pass the string to a function
<future28> that function will do stuff..
heftig has quit [Quit: Quitting]
<bnagy> start with this:
<bnagy> >> '"a"'.size
<eval-in> bnagy => 3 (https://eval.in/93806)
<bnagy> then mess with tr or whatever until you get a string that's 5 bytes
<bnagy> then do the same thing to the string you got from your file. Easy.
<bnagy> use irb to play around. Or pry.
<future28> Just out of curiosity, is there a way to pass a string into the %q or %Q modifiers?
<future28> Or does it need to be a literal
<bnagy> %Q lets you do interpolation I think
<bnagy> big Q not q
<future28> Hmm nevermind, turns out I do not even need to do it in the first place, the function is not breaking
<future28> goodnews I guess
<future28> Thanks for the help
<future28> WEhile I am here, is there a way to basically say "For all files in a directory, do xyz"
apeiros_ has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
yfeldblum has joined #ruby
dukz has joined #ruby
IceDragon has quit [Quit: Space~~~]
<future28> Nevermind, got it
yacks has quit [Read error: Operation timed out]
Doc_X has quit [Read error: Connection reset by peer]
Doc_IX has joined #ruby
tylersmith has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
ewnd9 has joined #ruby
dukz_ has quit [Ping timeout: 272 seconds]
krz has quit [Ping timeout: 265 seconds]
aryaching has joined #ruby
subbyyy_ has joined #ruby
jzinedine has joined #ruby
dodosan has quit [Remote host closed the connection]
troyready has joined #ruby
Soda has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
Zespre_ is now known as chihhsin_cloud
jzinedine has quit [Client Quit]
Xeago has joined #ruby
krz has joined #ruby
subbyyy_ has quit [Ping timeout: 252 seconds]
zipper has quit [Remote host closed the connection]
zipper has joined #ruby
alexfreidah has joined #ruby
artmann has quit [Quit: http://quassel-irc.org - Chatta smidigt. Överallt.]
future28 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
binw has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
dukz_ has joined #ruby
artmann has joined #ruby
bal has joined #ruby
sree has joined #ruby
mocfive has quit [Remote host closed the connection]
alexfreidah has quit [Ping timeout: 272 seconds]
mocfive has joined #ruby
shedd has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
dukz has quit [Ping timeout: 252 seconds]
agent_white has joined #ruby
h_kon has joined #ruby
binw has joined #ruby
ahmedelgabri has joined #ruby
iamdoo2 has joined #ruby
iamdoo2 has quit [Client Quit]
nateberkopec has joined #ruby
amclain has quit [Quit: Leaving]
iamdoo2 has joined #ruby
iamdoo2 has quit [Client Quit]
mocfive has quit [Ping timeout: 272 seconds]
phansch has quit [Quit: Leaving]
aryaching has quit [Ping timeout: 240 seconds]
iamdoo2 has joined #ruby
JohnBat26 has joined #ruby
renklaf has joined #ruby
dukz has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
fire has joined #ruby
user258467 has joined #ruby
sergicles has joined #ruby
dukz_ has quit [Ping timeout: 264 seconds]
sergicles has quit [Client Quit]
apeiros has joined #ruby
jprovazn has joined #ruby
craigp has quit [Remote host closed the connection]
angusiguess has joined #ruby
bradhe has joined #ruby
fire has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
khfeng has quit [Ping timeout: 248 seconds]
angusiguess has quit [Ping timeout: 240 seconds]
maximveksler has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
raar has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
rdark has joined #ruby
raar is now known as Guest18860
lxsameer has joined #ruby
<lxsameer> hi guys is there any gem that allow me to create a template for new projects ? something like rails app templates ?
lethjakman has quit [Ping timeout: 252 seconds]
RoxasShadowRS has joined #ruby
phipes has quit [Remote host closed the connection]
andikr has joined #ruby
jonah has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 248 seconds]
Nanuq has quit [Quit: .]
<havenwood> lxsameer: creating a gem?
droid has quit [Quit: Leaving.]
<lxsameer> havenwood: no i want to create an application which create other apps structure
iamsean has quit [Quit: iamsean]
kure has quit [Read error: Connection reset by peer]
kure has joined #ruby
yarou has quit [Ping timeout: 252 seconds]
achru has joined #ruby
Hanmac1 has joined #ruby
dukz_ has joined #ruby
<apeiros> lxsameer: incomplete - https://github.com/apeiros/directory_template
<lxsameer> apeiros: thanks
<apeiros> you're welcome to contribute :)
<lxsameer> apeiros: sure
Hanmac has quit [Ping timeout: 265 seconds]
<chipotle> good morning :)
khfeng has joined #ruby
<lxsameer> apeiros: is it ok to bother you with question about this project ?
<havenwood> g'night! i'm dozing off at the keyboard
havenwood has quit []
anildigital is now known as zz_anildigital
shedd has joined #ruby
dukz has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 252 seconds]
zxd has joined #ruby
ktun has quit [Remote host closed the connection]
Hobogrammer_ has quit [Ping timeout: 252 seconds]
shedd has quit [Ping timeout: 264 seconds]
dawkirst has quit [Ping timeout: 245 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
dukz_ has quit [Remote host closed the connection]
lemonsparrow has quit [Ping timeout: 272 seconds]
mando has joined #ruby
Mission-Critical has joined #ruby
aganov has joined #ruby
ahmedelgabri has quit [Ping timeout: 240 seconds]
ahmedelg_ has joined #ruby
zxd has quit [Ping timeout: 245 seconds]
zxd_ has joined #ruby
dukz has joined #ruby
mando has quit [Ping timeout: 252 seconds]
gja has quit [Quit: This computer has gone to sleep]
ahmedelg_ has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
mehlah has joined #ruby
chipotle has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has left #ruby [#ruby]
chipotle has joined #ruby
achru has quit [Remote host closed the connection]
dawkirst has joined #ruby
puppeh has left #ruby ["Leaving..."]
tvw has joined #ruby
ndrei has joined #ruby
mengu has quit [Remote host closed the connection]
julweber has joined #ruby
tylersmith has joined #ruby
dik_dak has quit [Remote host closed the connection]
Mission-Critical is now known as MissionCritical
zigomir has joined #ruby
zigomir has quit [Remote host closed the connection]
zigomir has joined #ruby
bambuka has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
nateberkopec has joined #ruby
Nanuq has joined #ruby
Nanuq has quit [Client Quit]
tylersmith has quit [Ping timeout: 240 seconds]
claymore has joined #ruby
blaxter_ has joined #ruby
rubist has quit [Ping timeout: 252 seconds]
einarj has joined #ruby
ahawkins has joined #ruby
monkegjinni has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
brunops has quit [Ping timeout: 260 seconds]
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
sree has quit [Remote host closed the connection]
zigomir has quit []
nateberkopec has quit [Ping timeout: 260 seconds]
Xiti` has joined #ruby
RoxasShadowRS has quit [Read error: Connection reset by peer]
RoxasShadowRS has joined #ruby
brandonblack has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
Nanuq has joined #ruby
brandonblack has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
ivanoats has quit [Ping timeout: 246 seconds]
fumduq has quit [Ping timeout: 260 seconds]
Xiti has quit [Ping timeout: 246 seconds]
a-priori has quit [Ping timeout: 246 seconds]
Cork has quit [Ping timeout: 272 seconds]
tesuji has joined #ruby
ivanoats has joined #ruby
bradhe has joined #ruby
vlad_starkov has joined #ruby
<apeiros> lxsameer: sure
<apeiros> lxsameer: just be aware that when I'm at work, replies might take a while
blackmesa has joined #ruby
<lxsameer> apeiros: thanks
<apeiros> (like this one)
Cork has joined #ruby
noname001__ has joined #ruby
zxd_ is now known as zxd
Es0teric has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Ping timeout: 240 seconds]
nathancahill has quit [Quit: nathancahill]
sree has joined #ruby
angusiguess has joined #ruby
poulson has joined #ruby
zz_anildigital is now known as anildigital
ylluminate has joined #ruby
anildigital is now known as zz_anildigital
yfeldblum has joined #ruby
ndrei has quit [Read error: Operation timed out]
<bal> can someone recommend me a good book to learn latest ruby ?
<dseitz> pickaxe
sree has quit [Client Quit]
ktun has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
bal has quit [Quit: bal]
mercwithamouth has quit [Ping timeout: 272 seconds]
jonno11 has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby
shime has joined #ruby
blaxter_ is now known as blaxter
troessner has joined #ruby
achru has joined #ruby
mupkoo_ has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Client Quit]
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
julweber has quit [Remote host closed the connection]
dfranciosi has joined #ruby
ndrei has joined #ruby
bal has joined #ruby
mupkoo has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
LekeFly has joined #ruby
shedd has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
ahmedelgabri has joined #ruby
gja has joined #ruby
aryaching has joined #ruby
Deejay_ has joined #ruby
nvrch has joined #ruby
ntz has joined #ruby
h_kon is now known as hkon_
olivier_bK has joined #ruby
shedd has quit [Ping timeout: 260 seconds]
bricker`LA has quit [Read error: Connection reset by peer]
bricker`LA has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
roolo has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
brandonblack has quit [Ping timeout: 252 seconds]
julweber has joined #ruby
mando has joined #ruby
camilasan has joined #ruby
brandonblack has joined #ruby
daxroc has joined #ruby
julweber has quit [Remote host closed the connection]
lkba has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
daxroc1 has joined #ruby
daxroc has quit [Read error: Connection reset by peer]
mehlah has quit [Quit: Leaving...]
ahmedelgabri has joined #ruby
Hanmac1 is now known as Hanmac
DouweM has quit [Ping timeout: 272 seconds]
mando has quit [Ping timeout: 272 seconds]
bluenemo has joined #ruby
braincrash has quit [*.net *.split]
araujo has quit [*.net *.split]
matchaw has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
Kabaka has quit [*.net *.split]
Kruppe has quit [*.net *.split]
xiphias has quit [*.net *.split]
timonv has joined #ruby
<maximveksler> do I need to require 'StringIO' ?
<maximveksler> I'm getting errors trying to use it
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
daxroc has joined #ruby
<Hanmac> maximveksler: yes and its require 'stringio'
daxroc1 has quit [Ping timeout: 265 seconds]
<maximveksler> Hanmac: Thank you (again). Works now.
Asher has quit [Quit: Leaving.]
<maximveksler> I like StringIO << much better then s = s + "something"
JBreit has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
nateberkopec has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kabaka has joined #ruby
<Hanmac> String has << too
g0bl1n has joined #ruby
bigkevmcd has joined #ruby
braincrash has joined #ruby
matchaw has joined #ruby
Kruppe has joined #ruby
xiphias has joined #ruby
tesuji has quit [Excess Flood]
<agent_white> but stringio is hawtsauz
francisfish has joined #ruby
g0bl1n has quit [Max SendQ exceeded]
atraylen has joined #ruby
Lewix has quit [Remote host closed the connection]
<maximveksler> hawtsauz ?
senayar has joined #ruby
<agent_white> Hot sauce!
<agent_white> I like hot sauce, I don't know about you.
tesuji has joined #ruby
braincrash has quit [*.net *.split]
matchaw has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
Kruppe has quit [*.net *.split]
xiphias has quit [*.net *.split]
<maximveksler> Oh, well I'm not a native english speaker.
<maximveksler> I dig hot things too. I'm good with you.
matchaw has joined #ruby
<maximveksler> ;)
bigkevmcd has joined #ruby
Kruppe has joined #ruby
alexfreidah has joined #ruby
braincrash has joined #ruby
<agent_white> maxim: I thought so! I need to remember at this time (2:00am, US) there are many people who don't speak English natively :)
Asher has joined #ruby
hkon_ has left #ruby [#ruby]
rdark has quit [Quit: leaving]
JBreit has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
<maximveksler> it's easy to forget about the rest of the world. We have the same problem here in Tel Aviv vs the rest of Israel. We "Tel Avivans" are considered to be disconnected from the rest of the country because we mostly focused about what's happening inside the city.
<agent_white> maximvksler: We American's forget the most :( It is sad how little effort we put into learning another language. (I know Spanish OK, but not well! :P )
luckyruby has quit [Remote host closed the connection]
<agent_white> maxumveksler: I hope to visit there someday!
<maximveksler> agent_white: I've visited SF last year
camilasan has quit [Remote host closed the connection]
<maximveksler> been to tech crunch disrupt and all...
camilasan has joined #ruby
dodosan has joined #ruby
lemonsparrow has joined #ruby
<agent_white> maximveksler: I'm jealous! I have family there! But I've visited only once when I was little.
<maximveksler> where are you from?
alexfreidah has quit [Ping timeout: 252 seconds]
<agent_white> maximveksler: Denver, Colorado! You need to visit here sometime... beautiful mountains, friendly people :)
michael_mbp has quit [Quit: ZNC - http://znc.sourceforge.net]
<maximveksler> I would love to do cost to cost in America, but then I would love to spend my whole life traveling from place to place.
bradhe has joined #ruby
cub1c_ has quit [Ping timeout: 260 seconds]
shedd has joined #ruby
michael_mbp has joined #ruby
puppeh has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
<puppeh> will MRI lift the GIL if one thread is writing to an FTP connection (Net::FTP.open(SERVER, USER, PASS) do |ftp|... etc)
<puppeh> ?
<agent_white> maximveksler: Me too. I would just love to travel to Europe... I have never been anywhere but Canada/US/Mexico :P
cub1c_ has joined #ruby
mehlah has joined #ruby
<maximveksler> Well how old are you?
rootshift has joined #ruby
camilasan has quit [Ping timeout: 252 seconds]
<agent_white> 22!
<maximveksler> oh, so your golden. at the age of 22 all I've seen was Russia (where I was born) and Israel (to where we moved).
<maximveksler> I've started traveling only at the age of 28.
mehlah_ has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
<maximveksler> agent_white: my tip: Embrace yourself into Burning Man community, you will discover a world of beauty and you will get to learn much more about the world.
bradhe has quit [Ping timeout: 240 seconds]
mehlah has quit [Read error: Connection reset by peer]
shedd has quit [Ping timeout: 252 seconds]
<agent_white> maximveksler: Oh wow! I have friends who have been to Burning Man! They loved it! Sounds very friendly, to say the least :)
atraylen has quit [Ping timeout: 248 seconds]
iamdoo2_ has joined #ruby
<maximveksler> how do I write something like this: if "Word."[-1,1] in [".!]?"] then print "Found a sentence that the last char is . or ? and co.."
ghr has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
drumusician has joined #ruby
skaflem has joined #ruby
jonah has joined #ruby
camilasan has joined #ruby
<maximveksler> Anyone?
Hanmac1 has joined #ruby
angusiguess has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
aryaching has quit [Ping timeout: 272 seconds]
iamdoo2_ has quit [Remote host closed the connection]
<tobiasvl> maximveksler: exactly what's your question in how to do that?
nari has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
dodosan has quit [Remote host closed the connection]
jonah has quit [Ping timeout: 272 seconds]
<maximveksler> How to write the syntax, I don't know ruby very well. I want to extract the last char from a string, and check if the extracted char is a member of a group of chars I will define.
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
dawkirst has joined #ruby
<apeiros> maximveksler: str =~ /[characters here]\z/
dangerousdave has joined #ruby
<maximveksler> cool
<canton7> if %w{" . ! ] ?}.include?("Word."[-1])
<maximveksler> What's the \z does ?
<apeiros> maximveksler: alternatively: ['c', 'h', 'a', 'r', 's'].include?(str[-1,1])
kenndel_ has joined #ruby
<canton7> is another way
angusiguess has quit [Ping timeout: 252 seconds]
ephemerian has joined #ruby
<agent_white> "hello".include? "o"
<apeiros> and as canton7 just showed, you can write ['c', 'h', 'a', 'r', 's'] shorter as %w[c h a r s]
<agent_white> #=> true
<apeiros> agent_white: no, that doesn't do what he asked
<waxjar> use end_with?
troyready has quit [Remote host closed the connection]
<apeiros> and end_with? doesn't accept a group of characters
hiall_ has quit [Quit: hiall_]
<waxjar> it does iirc
shime has quit [Ping timeout: 245 seconds]
<apeiros> sure?
<waxjar> not 100%
<agent_white> apeiros: Aye, I was just showing him the reverse :)
mengu has quit [Remote host closed the connection]
<apeiros> ah, indeed, it does
<apeiros> curious whether that changed
<apeiros> ok, end_with? may then actually be the nicest solution
SHyx0rmZ has joined #ruby
<maximveksler> thanks guys, many useful tips from this chat
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<apeiros> TIL
yfeldblum has quit [Ping timeout: 245 seconds]
<maximveksler> where can I read bout the %w thing?
<apeiros> maximveksler: google for "zenspiders quickref"
<canton7> "Word.".end_with?('.', '"', '!', '?', ']')
<agent_white> maximveksler: ["a", "b", "c"] == %w[a b c]
<apeiros> it covers all of rubys syntax in a very succinct way
xiphias has joined #ruby
<apeiros> agent_white: actually, that'd be == %W ;-)
<apeiros> %w == single quotes
<apeiros> %W == double quotes
kenndel has quit [Ping timeout: 272 seconds]
<canton7> or "Word.".end_with?(*%w{. " ! ? ]})
<agent_white> apeiros: both work?
<apeiros> both work differently
<agent_white> Ahhhh
<canton7> %w is ['c', 'h'], %W is ["c", "h"]
<apeiros> just as single quotes and double quotes work differently
pranny has quit [Quit: Leaving.]
<agent_white> apeiros: Thanks for the heads up :)
<apeiros> yw
<canton7> same with %Q vs %q
<apeiros> TIT (today I taught)
<maximveksler> So what is the difference in ' vs " ?
<apeiros> canton7: funny enough, I actually prefer plain % over %Q
<tobiasvl> apeiros: lol. tit
<agent_white> apeiros: +2 for zenspider :)
<canton7> interpolation occurs within "" but not ''
Al__ has joined #ruby
gja has quit [Ping timeout: 252 seconds]
karupanerura is now known as zz_karupanerura
<canton7> apeiros, mm, I'm undecided
<apeiros> class evals look nice with it - almost like a code block :)
<apeiros> class_eval %{ my code }
heftig has joined #ruby
dukz has quit [Read error: Connection reset by peer]
<canton7> and sequences such as \n work within "" but not '' - e.g. puts "hi\n" vs puts 'hi\n'
<maximveksler> canton7: got it. thanks.
dukz has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<agent_white> maximvekler: For instance... escape characters: '\n' #=> "\\n" . "\n" #=> "\n"
<apeiros> >> [%w[#{1+1} hello\nworld hi\ dude], %W[#{1+1} hello\nworld hi\ dude]]
<eval-in> apeiros => [["\#{1+1}", "hello\\nworld", "hi dude"], ["2", "hello\nworld", "hi dude"]] (https://eval.in/94043)
timonv has joined #ruby
<apeiros> dem differences ^
tesuji has quit [Read error: Connection reset by peer]
tesuji has joined #ruby
shaunbaker has joined #ruby
Advocation has joined #ruby
timonv has quit [Remote host closed the connection]
gja has joined #ruby
jonno11 has joined #ruby
shedd has joined #ruby
relix has joined #ruby
TMM has joined #ruby
eka has joined #ruby
ferr has joined #ruby
dukz_ has joined #ruby
jlebrech has joined #ruby
klaut has joined #ruby
Xeago has joined #ruby
eka has quit [Client Quit]
aaronmcadam has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
aaronmcadam has quit [Remote host closed the connection]
<agent_white> !gn
SHyx0rmZ has quit [Ping timeout: 265 seconds]
eka has joined #ruby
aaronmcadam has joined #ruby
<maximveksler> so why doesn't it work ? if "Word.".end_with?('.', '"', '!', '?', ']’) then puts "cool"; end
<agent_white> Goodnight all :)
marr has joined #ruby
agent_white has quit [Quit: leaving]
<maximveksler> also, why they "?" at the end of end_with ?
<apeiros> because it's part of the method name
dukz has quit [Ping timeout: 272 seconds]
<maximveksler> or really? WOW
<apeiros> i.e., you could also ask "why `e` at the start of end_with?" ;-)
Xeago_ has joined #ruby
<apeiros> !, ? and = are valid as last character of a method name
shaunbaker has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 272 seconds]
Hanmac has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<maximveksler> apeiros: surprised but got it. cool.
<maximveksler> kind of confusing though. Looks like a syntax of some kind.
<maximveksler> anyway, the second question is why doesn't it work?
francisfish has quit [Remote host closed the connection]
<maximveksler> I think it was supposed to print cool in my example above but it didnt
Hanmac1 has quit [Ping timeout: 252 seconds]
mojjojo has joined #ruby
<Hanmac> >> "Word.".end_with?('.', '"', '!', '?', ']')
<eval-in> Hanmac => true (https://eval.in/94049)
<Hanmac> 20>> "Word.".end_with?('.', '"', '!', '?', ']')
<eval-in> Hanmac => true (https://eval.in/94050)
<Hanmac> maximveksler: works for me ,P
mupkoo has quit [Remote host closed the connection]
<apeiros> maximveksler: your last quote in your pasted code looks suspicious
<apeiros> -> ']’ istead of ']'
<apeiros> *instead
mupkoo has joined #ruby
<Hanmac> yeah it looks like the ' is falling down the cliff ] :P
Hiall has joined #ruby
<apeiros> your prompt tells you that you're in an unfinished quote
<apeiros> '> # <-- unfinished single quote
krz has quit [Ping timeout: 272 seconds]
<apeiros> "> # <-- unfinished double quote
<apeiros> hit ctrl-C and try again
<apeiros> (ctrl-C will return you from any unfinished statements)
nateberkopec has joined #ruby
krz has joined #ruby
<maximveksler> awesome.
<maximveksler> learned yet another small thing about ruby :)
torstein has joined #ruby
Jdubs has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tesuji has quit [Read error: Connection reset by peer]
<torstein> I'm completely stumped trying to run bundle install for a rails app. http://pastebin.com/YF0zU2M6
<torstein> it complains that: /usr/bin/ruby2.1: invalid option -P (-h will show valid options) (RuntimeError)
<torstein> when trying to build native extensions for atomic
mupkoo has quit [Ping timeout: 240 seconds]
claymore has quit [Quit: Leaving]
<torstein> does anyone know what ruby -P is supposed to do?
Amart41 has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
Azure has quit [Read error: Connection reset by peer]
<apeiros> torstein: `man ruby` probably knows
Azure has joined #ruby
<shevy> hmm -P does not exist in 1.9.x
<torstein> identical ruby install (provisioned the same way using ansible) works fine
timonv has joined #ruby
<torstein> there is a lower case ruby -p
renklaf has quit []
<shevy> ya, for loops
<torstein> but flags are case sensitive
vlad_starkov has quit [Remote host closed the connection]
dawkirst has joined #ruby
<shevy> Fetching: atomic-1.1.14.gem (100%)
<shevy> Building native extensions. This could take a while...
<shevy> Successfully installed atomic-1.1.14
<shevy> works for me fine. but I do not use bundler, so perhaps that is why
ahmedelgabri has joined #ruby
<shevy> You don't have write permissions for the /usr/lib/ruby/gems/2.1.0 directory.
<shevy> very unusual error and also very unusual path
<shevy> no wait
<shevy> the path is fine
Amart41 has quit [Ping timeout: 260 seconds]
<torstein> oh, ignore the first command, thats unrelated
<torstein> tried to bundle install as root
<shevy> hmm which gem fails?
bradhe has joined #ruby
mojjojo has quit [Quit: mojjojo]
<torstein> what do you mean?
<shevy> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
coderhs has quit [Ping timeout: 252 seconds]
<Hanmac> torstein: "Results logged to /var/lib/jenkins/jobs/myproject/workspace/vendor/bundle/ruby/2.1.0/extensions/x86-linux/2.1.0/atomic-1.1.14/gem_make.out"
<shevy> what a monster path
<shevy> 15x /
<shevy> Hanmac are you finally using bundler regularly? :)
<torstein> contents of gem_make.out is the same as the error message:
<torstein> /usr/bin/ruby2.1 extconf.rb
<torstein> /usr/bin/ruby2.1: invalid option -P (-h will show valid options) (RuntimeError)
<torstein> extconf failed, exit code 1
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> not that i know of ;P (i am still have to much to do with rwx ... and currently no Mac to test it :/)
vlad_starkov has joined #ruby
<shevy> and where is that extconf.rb file?
florentferry has joined #ruby
<torstein> I'm guessing thats /var/lib/jenkins/jobs/WoofBet Play Development/workspace/vendor/bundle/ruby/2.1.0/gems/atomic-1.1.14/ext/extconf.rb
<torstein> oh, not so secret project name anymore
puppeh has left #ruby ["Leaving..."]
bradhe has quit [Ping timeout: 240 seconds]
mehlah_ is now known as mehlah
<Hanmac> torstein: hm i looked in the atomic o got from rubygems, and there is no -P ... does yours have -P inside?
Davey has joined #ruby
dawkirst has quit [Ping timeout: 248 seconds]
zeeraw has joined #ruby
shedd has joined #ruby
mojjojo has joined #ruby
tesuji has joined #ruby
<shevy> ok so you say that this extconf.rb file is part of atomic-1.1.14
<shevy> the content of that extconf.rb is http://pastie.org/pastes/8659836/text
<shevy> what happens if you go to that path and do: "ruby extconf.rb" ?
falood has quit [Remote host closed the connection]
<shevy> for me, it creates a Makefile that can be used with "make"
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
<shevy> also, is /usr/bin/ruby2.1 a symlink?
<Hanmac> torstein: what does "gem env" shows you?
Squarepy has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
<torstein> here is some more info: http://pastebin.com/g7xpMijH
workmad3 has joined #ruby
Heskie has joined #ruby
<shevy> you should go to the path and run ruby extconf.rb
<shevy> if it works and no -P option is pulled in, you can be quite sure that bundler somehow adds -P
<torstein> it works, simple puts "createing Makefile"
phansch has joined #ruby
sski has quit [Remote host closed the connection]
<torstein> can I just run make and build it manually?
sski has joined #ruby
<torstein> not too familiar with the inner workings of rubygems
francisfish has joined #ruby
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby
angusiguess has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
rdark has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
zipper has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #ruby
<shevy> it creates a Makefile
<shevy> the Makefile is used by the command "make"
yfeldblum has joined #ruby
iamdoo2 has joined #ruby
<shevy> extconf.rb works even without gems
phansch has quit [Ping timeout: 245 seconds]
sski has quit [Ping timeout: 272 seconds]
relix has joined #ruby
<shevy> In this example it creates the shared library atomic_reference.so
<shevy> "make" and "make install" would install this .so usually
<shevy> torstein perhaps you found a bug in bundler, there are bundle experts on #bundler channel
phansch has joined #ruby
<shevy> Hanmac I think I found a bug on http://rubydoc.info/
<torstein> I'll ask them :)
angusiguess has quit [Ping timeout: 245 seconds]
shime has joined #ruby
<shevy> Does anyone know who maintains rubydoc.info ?
dawkirst has quit [Ping timeout: 245 seconds]
<Hanmac> it is maintrained? ;P i thought it was autogenerated ;P
ckinni has joined #ruby
iamdoo2 has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
existensil has joined #ruby
Lewix has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<existensil> its weird that #rubyonrails is older than this channel by more than 2 full years
ckinni has quit [Client Quit]
Lewix has joined #ruby
pranny has joined #ruby
<tobiasvl> #ruby-lang is the official ruby channel though
Davey has quit [Quit: Computer has gone to sleep.]
<shevy> existensil it really is? cool ...
<shevy> I always thought that #ruby is the most ancient one of them all
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<existensil> unless freenode is lying
<existensil> oddly, even #pry is older than #ruby. i don't see how that's possible.
<tobiasvl> what about #ruby-lang though
<existensil> same age as #ruby, per freenode join message
<shevy> hmm what join message
<existensil> Channel #ruby created Sun Nov 26 01:42:45 2006
<shevy> cool
<existensil> i get that in my irssi client when i join a channel
<shevy> seems as if my client doesn't show it
<shevy> xchat here
vlad_starkov has quit [Remote host closed the connection]
<workmad3> existensil: awesome, the time there seems to take account of your system timezone :) I get 'Channel #ruby created Sun Nov 26 06:42:45 2006'
mojjojo has quit [Quit: mojjojo]
Advocation has quit [Quit: Advocation]
<existensil> great, workmad3, now anyone can figure out my local time and that i'm still up at almost 6am
<workmad3> hehe
bigkevmcd has quit [Quit: Ex-Chat]
pranny has quit [Ping timeout: 272 seconds]
<workmad3> existensil: maybe you just woke up early?
<existensil> guess i blew that cover story
monkegjinni has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
monkegjinni has joined #ruby
dawkirst has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
shedd has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
shedd has quit [Ping timeout: 265 seconds]
Speed has joined #ruby
nateberkopec has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
mando has joined #ruby
pranny has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
diegoviola has joined #ruby
phansch has quit [Ping timeout: 252 seconds]
pranny has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 240 seconds]
mando has quit [Ping timeout: 245 seconds]
ckinni has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craigp has joined #ruby
pranny has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
mehlah has quit [Quit: Leaving...]
shredding has joined #ruby
phansch has joined #ruby
mupkoo has joined #ruby
vlad_starkov has joined #ruby
drumusician has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
ckinni has quit [Client Quit]
ktosiek_ is now known as ktosiek
ckinni has joined #ruby
camilasan has quit [Remote host closed the connection]
dawkirst has joined #ruby
monkegjinni has joined #ruby
camilasan has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Ping timeout: 272 seconds]
mercwithamouth has joined #ruby
gja has joined #ruby
vlad_starkov has joined #ruby
alexfreidah has joined #ruby
colonolGron has joined #ruby
sski has joined #ruby
thomasxie has joined #ruby
jtdowney has joined #ruby
gja has quit [Client Quit]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colonolGron has left #ruby [#ruby]
camilasan has quit [Ping timeout: 264 seconds]
ckinni has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
jonah has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
jprovazn_ has joined #ruby
relix has joined #ruby
alexfreidah has quit [Ping timeout: 272 seconds]
ckinni has quit [Client Quit]
zipper has joined #ruby
ckinni has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
ckinni has quit [Client Quit]
jonah has quit [Ping timeout: 245 seconds]
shedd has joined #ruby
ckinni has joined #ruby
nvrch has quit [Quit: nvrch]
<shevy> hehehe
<shevy> workmad3 discovers your ultimate secrets
ckinni has quit [Client Quit]
<shevy> like what you did last summer (and why workmad3 cares)
<shevy> BECAUSE HE WAS SITTING IN HIS ROOM ALL SUMMER LONG!!!
dawkirst has quit [Ping timeout: 265 seconds]
<shevy> coding coding and more coding
punkzio has joined #ruby
<shevy> he wasn't even to greet other people... his mouth was trying to do: puts 'hi there...' but out came only a stutter
ckinni has joined #ruby
<shevy> and I can't type apparently either
sensen_ has quit [Quit: leaving]
charlies_ is now known as charliesome
shedd has quit [Ping timeout: 248 seconds]
Matriks has joined #ruby
ckinni has quit [Client Quit]
angusiguess has joined #ruby
sylvain____2 has joined #ruby
Lewix has quit [Remote host closed the connection]
nvrch has joined #ruby
<sylvain____2> Hey rubyers - I am looking for a neat way to do this in one line: https://gist.github.com/ccapndave/8577089
kitak has quit [Remote host closed the connection]
ckinni has joined #ruby
shaunbaker has joined #ruby
zipper has quit [Remote host closed the connection]
zipper has joined #ruby
shaunbak_ has joined #ruby
<Hanmac1> sylvain____2: so you want "1.0.1" => "1.0.2" ?
Hanmac1 is now known as Hanmac
<sylvain____2> Hanmac Right
mengu has quit [Ping timeout: 264 seconds]
<Hanmac> >> "1.0.1".succ
<eval-in> Hanmac => "1.0.2" (https://eval.in/94082)
ckinni has quit [Client Quit]
<sylvain____2> Hanmac Is that right? Will that always work?
<Hanmac> sylvain____2: yes and it also can do magic
Guest18860 has quit [Ping timeout: 264 seconds]
<Hanmac> >> "1.0.9".succ
<eval-in> Hanmac => "1.1.0" (https://eval.in/94083)
<sylvain____2> Hanmac Ah right - but I don't want it going 1.0.9 -> 1.1.0
<Hanmac> >> "1.0.09".succ
<eval-in> Hanmac => "1.0.10" (https://eval.in/94084)
<sylvain____2> Hanmac I want 1.0.9 -> 1.0.10
ckinni has joined #ruby
zipper has quit [Client Quit]
<sylvain____2> > "1.0.99".succ
<sylvain____2> Hey
<sylvain____2> How do you make this evaluate stuff?
raar has joined #ruby
mojjojo has joined #ruby
<tobiasvl> >>
<eval-in> tobiasvl => nil (https://eval.in/94085)
<tobiasvl> lol
<sylvain____2> >>"1.0.99".succ
<eval-in> sylvain____2 => "1.1.00" (https://eval.in/94086)
zipper has joined #ruby
raar is now known as Guest16042
<sylvain____2> Hanmac yeah - its not quite what I need; I want the tiny version number to increment indefinitely - the major and minor numbers will be changed manually
mavcunha has joined #ruby
<sylvain____2> Hanmac Its for a auto-deploy system so the tiny numbers could get really big
<Hanmac> >>"1.0.9".gsub(/\d+\Z/){|s|s.to_i.succ}
<eval-in> Hanmac => "1.0.10" (https://eval.in/94087)
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sylvain____2> >>"1.0.99".gsub(/\d+\Z/){|s|s.to_i.succ}
<eval-in> sylvain____2 => "1.0.100" (https://eval.in/94088)
<sylvain____2> Now we're cooking
ckinni has quit [Client Quit]
shaunbaker has quit [Ping timeout: 245 seconds]
<sylvain____2> Thanks very much!
ckinni has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Read error: Connection reset by peer]
zipper has quit [Client Quit]
yfeldblum has joined #ruby
iamdoo2 has joined #ruby
ckinni has quit [Client Quit]
colonolGron has joined #ruby
ckinni has joined #ruby
ckinni has quit [Client Quit]
dawkirst has joined #ruby
mikecmpbll has joined #ruby
vt102 has quit [Remote host closed the connection]
ckinni has joined #ruby
iamdoo2 has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
colonolGron has quit [Client Quit]
ckinni has quit [Client Quit]
mercwithamouth has joined #ruby
colonolGron has joined #ruby
camilasan has joined #ruby
timonv has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
ckinni has joined #ruby
mojjojo has quit [Quit: mojjojo]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
ckinni has quit [Client Quit]
alexherbo2 has joined #ruby
phansch has quit [Ping timeout: 252 seconds]
ckinni has joined #ruby
dawkirst has quit [Ping timeout: 272 seconds]
agjacome has joined #ruby
tedstriker has joined #ruby
colonolGron has left #ruby [#ruby]
timonv has quit [Ping timeout: 264 seconds]
monkegjinni has quit [Remote host closed the connection]
ckinni has quit [Client Quit]
colonolGron has joined #ruby
monkegjinni has joined #ruby
ckinni has joined #ruby
timonv has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
alexherbo2 has quit [Client Quit]
roolo has quit [Remote host closed the connection]
ckinni has quit [Client Quit]
ahmedelgabri has joined #ruby
roolo has joined #ruby
ckinni has joined #ruby
colonolGron has quit [Client Quit]
monkegjinni has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #ruby
colonolGron has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
mupkoo has quit []
ckinni has quit [Client Quit]
sylvain____2 is now known as ccapndave
mupkoo has joined #ruby
ccapndave has quit [Quit: Nettalk6 - www.ntalk.de]
nateberkopec has joined #ruby
ckinni has joined #ruby
ferr has quit [Read error: No route to host]
ixti has quit [Ping timeout: 246 seconds]
phansch has joined #ruby
ckinni has quit [Client Quit]
gja has quit [Quit: This computer has gone to sleep]
shedd has joined #ruby
ckinni has joined #ruby
ckinni has quit [Client Quit]
nateberkopec has quit [Ping timeout: 245 seconds]
Amart41 has joined #ruby
drumusician has joined #ruby
ckinni has joined #ruby
dawkirst has joined #ruby
mojjojo has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
colonolGron has quit [Quit: leaving]
ckinni has quit [Client Quit]
mando has joined #ruby
colonolGron has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
iamdoo2 has joined #ruby
ckinni has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Amart41 has quit [Read error: Operation timed out]
danijoo has joined #ruby
gja has joined #ruby
ckinni has quit [Client Quit]
bradhe has joined #ruby
ckinni has joined #ruby
zxd has quit [Ping timeout: 272 seconds]
jtdowney has quit []
jbermudes has joined #ruby
ckinni has quit [Client Quit]
mando has quit [Ping timeout: 272 seconds]
lkba has joined #ruby
iamdoo2 has quit [Ping timeout: 260 seconds]
claymore has joined #ruby
relix has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
gnephiak has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
ahmedelgabri has quit [Remote host closed the connection]
mupkoo has quit []
KillerFox has quit [Ping timeout: 252 seconds]
jbermudes has left #ruby ["WeeChat 0.3.8"]
relix has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 252 seconds]
Xiti` has quit [Quit: Leaving]
mengu has joined #ruby
zipper has joined #ruby
mojjojo has quit [Quit: mojjojo]
shaunbak_ has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
Xiti has joined #ruby
shredding has quit [Quit: shredding]
phansch has quit [Ping timeout: 264 seconds]
Wolland has quit [Remote host closed the connection]
zxd has joined #ruby
colonolGron has quit [Quit: leaving]
colonolGron has joined #ruby
EngierkO has joined #ruby
EngierkO has quit [Max SendQ exceeded]
monkegjinni has joined #ruby
dagobah has joined #ruby
colonolGron has quit [Client Quit]
kaldrenon has joined #ruby
colonolGron has joined #ruby
ixti has joined #ruby
Kneferilis has quit [Ping timeout: 272 seconds]
EngierkO has joined #ruby
EngierkO has quit [Max SendQ exceeded]
colonolGron has quit [Client Quit]
EngierkO has joined #ruby
colonolGron has joined #ruby
phansch has joined #ruby
kaldrenon has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
shedd has joined #ruby
rudisimo has quit [Remote host closed the connection]
rudisimo has joined #ruby
phansch has quit [Ping timeout: 252 seconds]
shedd has quit [Ping timeout: 260 seconds]
Advocation has joined #ruby
rudisimo has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
KillerFox has joined #ruby
ctp has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
ckinni has joined #ruby
diegoviola has joined #ruby
dukz has joined #ruby
dukz_ has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
dukz has quit [Read error: Connection reset by peer]
dukz_ has joined #ruby
dukz_ has quit [Remote host closed the connection]
dukz has joined #ruby
yfeldblum has joined #ruby
dukz has quit [Remote host closed the connection]
gja has joined #ruby
poulson has quit [Ping timeout: 245 seconds]
Xeago_ has quit [Remote host closed the connection]
colonolGron has quit [Quit: leaving]
phansch has joined #ruby
colonolGron has joined #ruby
poulson has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
sergicles has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
gja has quit [Quit: This computer has gone to sleep]
Vitor has joined #ruby
shime has quit [Ping timeout: 252 seconds]
ahmedelgabri has joined #ruby
max96at has joined #ruby
Kneferilis has joined #ruby
Xeago has joined #ruby
sski has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
e_ has joined #ruby
mojjojo has joined #ruby
sski has joined #ruby
<e_> hey guys. when writing a custom matcher for rspec, I was wondering that when chaining methods will rspec guarantuee execution order of those methods? Or should my matcher work regardless of the order in which methods are called?
<e_> (if that is documented somewhere I'd love to be pointed to the right documentation)
nateberkopec has joined #ruby
pushpak has joined #ruby
roidelapluie has quit [Changing host]
roidelapluie has joined #ruby
colonolGron has left #ruby [#ruby]
pranny has quit [Quit: Leaving.]
pranny has joined #ruby
blaxter has quit [Quit: foo]
pranny has quit [Read error: Connection reset by peer]
sski has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
billy_ran_away has quit [Ping timeout: 260 seconds]
ktun has quit [Read error: Connection reset by peer]
ntz has left #ruby [#ruby]
ktun has joined #ruby
seoNinjaWarrior has joined #ruby
griffindy has joined #ruby
angusiguess has joined #ruby
Speed has left #ruby ["WeeChat 0.4.2"]
nari has joined #ruby
nateberkopec has quit [Ping timeout: 248 seconds]
billy_ran_away has joined #ruby
dawkirst has joined #ruby
shedd has joined #ruby
bradhe has joined #ruby
razibog has quit [Ping timeout: 248 seconds]
hamakn has quit [Remote host closed the connection]
Baluse has quit [Ping timeout: 260 seconds]
phansch has quit [Ping timeout: 248 seconds]
ahmedelgabri has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
hamakn has joined #ruby
MacGruber has quit [Read error: Connection reset by peer]
MacGruber has joined #ruby
mando has joined #ruby
Macaveli has joined #ruby
shedd has quit [Ping timeout: 260 seconds]
fire has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
hamakn has quit [Remote host closed the connection]
Baluse has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
yalue has joined #ruby
Amart41 has joined #ruby
phansch has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
vpretzel has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
mando has quit [Ping timeout: 272 seconds]
shredding has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
kevinykc_ has joined #ruby
vongrippen has quit [Remote host closed the connection]
mdpatrick has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
garybrett has joined #ruby
shaunbaker has joined #ruby
sickweezle has quit [Ping timeout: 252 seconds]
sickweezle has joined #ruby
mehlah has joined #ruby
decoponio has joined #ruby
kevinykchan has quit [Ping timeout: 252 seconds]
jonah has joined #ruby
vt102 has joined #ruby
RaCx has quit [Ping timeout: 245 seconds]
dawkirst has quit [Ping timeout: 265 seconds]
canton7-mac has joined #ruby
mojjojo has quit [Quit: mojjojo]
jkamenik has joined #ruby
falood has joined #ruby
vongrippen has joined #ruby
jonah has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has quit [Remote host closed the connection]
_Andres has joined #ruby
Megtastique has joined #ruby
mojjojo has joined #ruby
alexfreidah has joined #ruby
cg433n has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
shaunbaker has quit [Remote host closed the connection]
tonni has joined #ruby
RaCx has joined #ruby
sambao21 has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
cg433n has left #ruby [#ruby]
mercwithamouth has quit [Ping timeout: 240 seconds]
alexfreidah has quit [Ping timeout: 264 seconds]
dkamioka has joined #ruby
tkuchiki has quit [Remote host closed the connection]
diegoviola has joined #ruby
tkuchiki has joined #ruby
e_ has left #ruby [#ruby]
dkamioka_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
gijsje has joined #ruby
vlad_starkov has joined #ruby
Macaveli has quit [Quit: Leaving]
dawkirst has joined #ruby
Macaveli has joined #ruby
<gijsje> anyone here into simple_form? i'm trying to add a class to a label element in the initializer
vlad_starkov has quit [Read error: Connection reset by peer]
dkamioka has quit [Ping timeout: 240 seconds]
<gijsje> in the wrapper i mean
<canton7-mac> rails question?
timonv has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<gijsje> uhh :D
vlad_starkov has quit [Remote host closed the connection]
mark_locklear has joined #ruby
<gijsje> is that forbidden?
Macaveli has quit [Client Quit]
tkuchiki has quit [Ping timeout: 245 seconds]
<canton7-mac> you're more likely to get help in #rubyonrails
Macaveli has joined #ruby
moax has joined #ruby
<canton7-mac> the people that hang out here are more core ruby, less rails
shedd has joined #ruby
* workmad3 hides his rails-ness
<canton7-mac> *tend to be more core ruby, less rails
vlad_starkov has joined #ruby
<gijsje> "you need to be identified with services" .. sign is that channel tight?
timonv has joined #ruby
<gijsje> *sigh
<workmad3> gijsje: you need to be registered and signed in with nickserv to talk in there, yes
<canton7-mac> quite a few channels take that approach
<workmad3> gijsje: like with many 'official' channels (e.g. #ruby-lang)
florentferry has quit [Ping timeout: 248 seconds]
clamstar has joined #ruby
hamakn has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mlpinit has joined #ruby
intuxicated has joined #ruby
<gijsje> thanks for the help guys
Hanmac has quit [Ping timeout: 245 seconds]
mlpinit has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 265 seconds]
dawkirst has quit [Ping timeout: 272 seconds]
timonv has quit [Ping timeout: 240 seconds]
Matriks has quit [Remote host closed the connection]
Hanmac has joined #ruby
diegoviola has quit [Ping timeout: 265 seconds]
tonni has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
rudisimo has joined #ruby
ewnd9 has joined #ruby
Advocation has joined #ruby
danshultz has joined #ruby
baba has joined #ruby
fire has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
yarou has joined #ruby
baba is now known as fire
SoWN has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
SoWN has left #ruby [#ruby]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
monkegjinni has joined #ruby
nateberkopec has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
droid has joined #ruby
pushpak has quit [Read error: Connection reset by peer]
camilasan has quit [Remote host closed the connection]
dawkirst has joined #ruby
camilasan has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
kpshek has joined #ruby
prc1 has joined #ruby
rmorello has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
prc has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 272 seconds]
ItSANgo has quit [Quit: Leaving...]
ozgun has joined #ruby
mengu has quit [Remote host closed the connection]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fede_ has joined #ruby
duggiefresh has joined #ruby
dukz has joined #ruby
ndrei has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
<Killerkeksdose> Hi guys i need some help. I want to create Directory with "FileUtils.mkdir_p(path)" and want to add the uid/gid to it with "FileUtils.chown(uid, gid, path)". But chown doesnt work cause i have no root rights in my Test and i dont want to start my Test with sudo - what can i do ? :/
Hanmac1 has joined #ruby
<workmad3> Killerkeksdose: err... not much
v0n has joined #ruby
Xeago has quit [Remote host closed the connection]
<canton7-mac> ruby can't magically get around filesystem constraints
bradhe has joined #ruby
kaldrenon has joined #ruby
<workmad3> Killerkeksdose: or, if it could, that would be a bug in the file system permissions that would be patched really quickly
dblessing has joined #ruby
<Killerkeksdose> so i should refactor my test and use maybe something like fakefs ?
spyderman4g63 has joined #ruby
moax has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
falood has quit [Ping timeout: 265 seconds]
ItSANgo has joined #ruby
araujo has quit [Read error: Operation timed out]
yacks has joined #ruby
araujo has joined #ruby
coderhs has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
coderhs has quit [Client Quit]
clamstar has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
mengu has joined #ruby
asmodlol has quit [Remote host closed the connection]
moax has joined #ruby
timonv has joined #ruby
shedd has joined #ruby
clamstar has joined #ruby
<lectrick> So if I want to write a rack middleware that uses activerecord, is there a smart way to handle DB connection pooling?
Hanmac1 has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
mando has joined #ruby
vlad_starkov has joined #ruby
lemonsparrow has quit [Ping timeout: 272 seconds]
<Killerkeksdose> so there is no simple solution in ruby like asking for a password in test for sudo - to get root rights and execute chown on a directory ?
falood has joined #ruby
Hanmac has joined #ruby
craigp has quit [Remote host closed the connection]
iamdoo2 has joined #ruby
<workmad3> Killerkeksdose: that would be a really annoying test anyway
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
dawkirst has joined #ruby
blaxter_ has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
dkamioka_ has quit [Remote host closed the connection]
DaniG2k has joined #ruby
Matriks has joined #ruby
<workmad3> Killerkeksdose: and in all honesty, would you want to run a test (that could be buggy and therefore trash your filesystem) with sudo access so it can really do damage? :)
jerius has joined #ruby
timonv has quit [Remote host closed the connection]
<workmad3> Killerkeksdose: what you could consider is catching the permission error on the chown and logging it out as a skipped test due to lack of permissions
mando has quit [Ping timeout: 272 seconds]
alexfreidah has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
iamdoo2 has quit [Ping timeout: 245 seconds]
<Killerkeksdose> workmad3: hum - sounds good to me. Not a final solution but its something :) thanks sir.
gijsje has quit []
<workmad3> Killerkeksdose: you may want to consider pushing something like that into the main codebase too, so your script doesn't just bomb out if run without sudo ;)
mercwithamouth has quit [Ping timeout: 272 seconds]
duggiefresh has quit [Remote host closed the connection]
fire has quit [Quit: WeeChat 0.4.1]
mojjojo has quit [Quit: mojjojo]
fire has joined #ruby
fire is now known as Guest31108
kevinykc_ has quit [Quit: Computer has gone to sleep.]
Guest31108 has quit [Client Quit]
yasushi has joined #ruby
baba has joined #ruby
Davey has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
shaunbaker has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
lfox has joined #ruby
Butcho has joined #ruby
Butcho has quit [Max SendQ exceeded]
Butcho has joined #ruby
ndrei has joined #ruby
ffranz has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
ckinni has joined #ruby
timonv_ has joined #ruby
ahmedelgabri has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
Heskie has quit []
gregf has joined #ruby
andikr has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
Hanmac1 has joined #ruby
shime has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
<shevy> sudo is a sign of weakness
asmodlol has joined #ruby
vlad_starkov has joined #ruby
francisfish has joined #ruby
shedd has joined #ruby
w|t has left #ruby ["Textual IRC Client: www.textualapp.com"]
camilasan has quit [Ping timeout: 272 seconds]
AlSquirrel has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
blaxter_ has quit [Quit: foo]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tharindu has joined #ruby
tkuchiki has joined #ruby
sassamo has joined #ruby
freerobby has joined #ruby
ktosiek_ has joined #ruby
ktosiek has quit [Ping timeout: 245 seconds]
<maximveksler> Hey guys, just wanted to say thanks for helping me to write srt_forHuman.rb https://github.com/maximveksler/subtitles
octoberry has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
brunops has joined #ruby
falood has quit [Remote host closed the connection]
falood has joined #ruby
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
monkegjinni has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
nateberkopec has joined #ruby
nomenkun has quit [Ping timeout: 252 seconds]
Advocation has quit [Quit: Advocation]
dawkirst has joined #ruby
stryek has joined #ruby
angusiguess has joined #ruby
falood has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
tyl has joined #ruby
thomasxie has quit [Ping timeout: 272 seconds]
scarolan has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
wiku5_ has joined #ruby
ebeip90 has joined #ruby
ferr has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
tharindu has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 252 seconds]
<shevy> wat
<shevy> srt
<shevy> is this for subtitles
<shevy> I once wrote a script that changes the positions in a .srt file, in order to correct audio dis-sync
krz has joined #ruby
bradhe has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
snath has quit [Ping timeout: 272 seconds]
koalallama has left #ruby [#ruby]
iamsean has joined #ruby
duggiefresh has joined #ruby
octoberry has quit [Ping timeout: 252 seconds]
nari has quit [Ping timeout: 272 seconds]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tannerburson has joined #ruby
amundj has joined #ruby
mikepack has joined #ruby
bluOxigen has joined #ruby
mikecmpbll has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
dawkirst has quit [Ping timeout: 264 seconds]
isieo__ has joined #ruby
maxime75 has joined #ruby
Hanmac has joined #ruby
lxsameer has quit [Quit: Leaving]
isieox has quit [Ping timeout: 272 seconds]
Butcho has quit [Quit: Textual IRC Client: www.textualapp.com]
jtdowney has joined #ruby
timonv_ has quit [Remote host closed the connection]
dfranciosi has quit [Remote host closed the connection]
kobain has joined #ruby
Hanmac1 has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
Karpuragauram has joined #ruby
ferr has quit [Ping timeout: 272 seconds]
griffindy has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
orionstein_away is now known as orionstein
bthesorceror has joined #ruby
meatherly has joined #ruby
Kricir has joined #ruby
burlyscudd has quit [Quit: Leaving.]
julweber has joined #ruby
ahmedelgabri has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
malkomalko has joined #ruby
Karpuragauram has quit [Client Quit]
ahmedelgabri has quit [Remote host closed the connection]
camilasan has joined #ruby
ndrei has quit [Read error: Operation timed out]
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
jonah has joined #ruby
ahmedelgabri has joined #ruby
asmodlol has quit [Remote host closed the connection]
SCommette has joined #ruby
Es0teric has joined #ruby
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shedd has joined #ruby
timonv has joined #ruby
Wolland has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
angusiguess has joined #ruby
dukz has quit [Remote host closed the connection]
IceDragon has joined #ruby
jedimind has joined #ruby
jonah has quit [Ping timeout: 260 seconds]
ahmedelg_ has joined #ruby
jedimind has quit [Max SendQ exceeded]
nfk has quit [Quit: yawn]
eliasp has quit [Ping timeout: 272 seconds]
JPascal has quit [Quit: Textual IRC Client: www.textualapp.com]
dawkirst has joined #ruby
thealch3m1st has joined #ruby
jedimind has joined #ruby
ahmedelgabri has quit [Ping timeout: 245 seconds]
iamdoo2 has joined #ruby
shedd has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 264 seconds]
cjsarette has quit [Ping timeout: 272 seconds]
drumsrgr8forn8 has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
Hertz has joined #ruby
sailias has joined #ruby
mikepack has quit [Remote host closed the connection]
mansi has joined #ruby
iamdoo2 has quit [Ping timeout: 272 seconds]
mlpinit has joined #ruby
blaxter has joined #ruby
dfranciosi has joined #ruby
burlyscudd has joined #ruby
ktun has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 248 seconds]
Macaveli has joined #ruby
ktun has joined #ruby
andikr has quit [Remote host closed the connection]
<Hertz> If I have a when clause that matches a regex like /XPT|XYZ|WXA/ . Are ther any way to know which string was matched?
ndrei has joined #ruby
maletor has joined #ruby
eliasp has joined #ruby
wolfman has quit [Ping timeout: 248 seconds]
Brolen has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
DaniG2k has quit [Quit: leaving]
marr has quit [Ping timeout: 245 seconds]
ckinni has joined #ruby
interactionjaxsn has joined #ruby
iamdoo2 has joined #ruby
nateberkopec has joined #ruby
<apeiros> Hertz: split it up into 3 when statements instead?
<shevy> hmm
<apeiros> Hertz: alternatively use capturing groups. but that solution is ugly IMO
<shevy> Hertz there may be some $ set for the match
jobewan has joined #ruby
<Hertz> apeiros: I was kind of trying to cut out the numbers of when statements byt doing this. I'll take a look in capturing groups.
<apeiros> I don't know what you mean by "cut out the numbers"
<workmad3> Hertz: if you did '/(XPT|XYZ|WXA)/' then I'd expect the actual match to be in $1
shaunbaker has joined #ruby
<apeiros> your expectation would be correct, workmad3
<workmad3> apeiros: I'm guessing he wanted to reduce the number of cases in a case statement down
<apeiros> workmad3: meh
<workmad3> yeah, meh :)
<Hertz> apeiros: exactly what workmad3 said
<apeiros> for static regexes at least
achru has quit [Remote host closed the connection]
<workmad3> Hertz: how many statements are you avoiding with this?
shaunbak_ has joined #ruby
camilasa_ has quit [Remote host closed the connection]
achru has joined #ruby
mikepack has joined #ruby
camilasan has joined #ruby
<workmad3> Hertz: as in, is the reduced readability of a regex union with $1 worth a reduction of 1 or 2 statements? or are you losing more like 10-20 statements? :)
Davey has quit [Quit: Computer has gone to sleep.]
<Hertz> workmad3: there are 27 but they are kind of releated in groups of three
sassamo has quit [Remote host closed the connection]
<workmad3> Hertz: ah, so you'd drop 27 down to 9?
sassamo has joined #ruby
<Hertz> workmad3: That's what I hope to do
<shevy> anyone remembers why one wants to use STDOUT.flush
dawkirst has joined #ruby
mengu has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<hoelzro> lots of reasons
<hoelzro> well, specifically for STDOUT, if you're prompting a user with an incomplete line
shaunbak_ has quit [Remote host closed the connection]
achru has quit [Read error: Connection reset by peer]
<apeiros> shevy: should use $stdout, not STDOUT
<Hertz> workmad3: but I wasn't really looking for the match itself. What I want to know is if the match happen because of XPT or because of XYZ or because of WXA.
shaunbaker has quit [Ping timeout: 245 seconds]
shedd has joined #ruby
Wolland has quit []
<apeiros> Hertz: if you paste your code, we can suggest refactorings
<apeiros> *gist
duggiefresh has quit [Read error: Connection reset by peer]
sergicles has quit [Quit: sergicles]
vlad_starkov has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
camilasan has quit [Ping timeout: 248 seconds]
akam-it has joined #ruby
timonv has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 245 seconds]
tagrudev has quit [Remote host closed the connection]
slick-[horndog] is now known as slick-hd
achru has joined #ruby
yasushi has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
shredding has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
<Hertz> apeiros: I'll use the capturing groups
<Hertz> apeiros: shevy workmad3 Thank you for the help
rippa has joined #ruby
shedd has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
sergicles has joined #ruby
shredding has joined #ruby
echevemaster has quit [Ping timeout: 246 seconds]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
brunops has quit [Quit: leaving]
camilasan has joined #ruby
angusigu1ss has joined #ruby
echevemaster has joined #ruby
ohwhoa has joined #ruby
bradhe has joined #ruby
yfeldblum has joined #ruby
timonv_ has joined #ruby
pu22l3r_ has joined #ruby
benzrf has joined #ruby
<benzrf> hey
<benzrf> how can i cycle an array to a given length?
<benzrf> i.e. [1, 2].hypothetical(3) # => [1, 2, 1]
kure_ has joined #ruby
DouweM has joined #ruby
<apeiros> .cycle.first(N)
<canton7-mac> [1, 2].cycle.take(N)
<benzrf> <_<
<benzrf> derp
<apeiros> >> [1,2].cycle.first(10)
<eval-in> apeiros => [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] (https://eval.in/94268)
<apeiros> I don't see the point of take. why was it introduced? o0
angusigu1ss has quit [Ping timeout: 245 seconds]
dawkirst has quit [Ping timeout: 265 seconds]
IceyEC has joined #ruby
dkamioka has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
<canton7-mac> consistency with other languages? Although it doesn't have #skip...
IceyEC has quit [Client Quit]
MrZYX|off is now known as MrZYX
jlast has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
IceyEC has joined #ruby
<apeiros> and its implementation differs from first (and not just the argument-less part)
kure has quit [Ping timeout: 248 seconds]
<apeiros> take is `return rb_ary_subseq(obj, 0, len);`
<apeiros> first is `return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);`
<benzrf> >> [1, 2, 3, 4].zip %w/a b c/
<eval-in> benzrf => [[1, "a"], [2, "b"], [3, "c"], [4, nil]] (https://eval.in/94272)
<benzrf> hneh
<tobiasvl> >> [].first
<eval-in> tobiasvl => nil (https://eval.in/94273)
ebetancourt has joined #ruby
<tobiasvl> >> [].take(1)
<eval-in> tobiasvl => [] (https://eval.in/94274)
<apeiros> >> [].first(1)
<eval-in> apeiros => [] (https://eval.in/94275)
axl_ has joined #ruby
pushpak has joined #ruby
<tobiasvl> doh
<apeiros> with an argument, they behave exactly the same
<benzrf> >> [1, 2, 3, 4].zip %w/a b/.cycle
<eval-in> benzrf => [[1, "a"], [2, "b"], [3, "a"], [4, "b"]] (https://eval.in/94277)
<benzrf> :D
burlyscudd has quit [Quit: Leaving.]
pietr0 has quit [Quit: pietr0]
mando has joined #ruby
<DouweM> that's pretty neat
julweber has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
spyderma_ has joined #ruby
Al__ has quit [Quit: Al__]
camilasan has joined #ruby
thesheff17 has joined #ruby
Al__ has joined #ruby
mark_locklear has quit [Ping timeout: 264 seconds]
iamsean has quit [Quit: iamsean]
punkzio has quit [Quit: Leaving]
w4pm has joined #ruby
<benzrf> hmm
<benzrf> is there a method for removing 1 element from an array, but it returns a new array?
spyderman4g63 has quit [Ping timeout: 245 seconds]
<benzrf> i.e. %w/this that the other/.popthing(1) == %w/this the other/ but does not mutate
<apeiros> "removing" is vague
<apeiros> ary.tap(&:pop) # remove from tail
<apeiros> ary[0..-2] # without the last element
<benzrf> hrm
<benzrf> bah
geggam has joined #ruby
camilasan has quit [Ping timeout: 264 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
burlyscudd has joined #ruby
<benzrf> why isnt andand core
<benzrf> ;-;
<benzrf> #me is handy
deception has joined #ruby
freezey has joined #ruby
<benzrf> it is like tap but less dumb
hamakn has quit [Remote host closed the connection]
araujo has quit [Read error: Connection reset by peer]
<apeiros> what's #me?
browndawg has joined #ruby
dukz has joined #ruby
nomenkun has joined #ruby
<benzrf> basically it returns a proxy which always returns self
<benzrf> i.e.
<benzrf> [1, 2, 3].me.delete_at(1) # => [1, 3]
dawkirst has joined #ruby
mary5030 has joined #ruby
<shevy> lol
mary5030 has quit [Remote host closed the connection]
<shevy> array.me.is.stupid?
mojjojo has joined #ruby
<shevy> "monkey".i.is_a.monkey?
mary5030 has joined #ruby
<benzrf> your mother was a monkey
Amart41 has quit []
<shevy> your father was a hamster!
<apeiros> i.r.baboon
zxd has quit [Ping timeout: 272 seconds]
w4pm has quit [Ping timeout: 245 seconds]
AndrewMartin has joined #ruby
kevinykchan has joined #ruby
ckinni has joined #ruby
mojjojo has quit [Client Quit]
marr has joined #ruby
humani has joined #ruby
droid has quit [Quit: Leaving.]
<AndrewMartin> Hey can anyone help me with hooking up my RoR to a local MySQL DB on MAMP
tylersmith has joined #ruby
<shevy> rails attack!
sassamo has joined #ruby
<shevy> AndrewMartin the rails users are mostly on the #RubyOnRails channel
<AndrewMartin> ahhhh got it thanks man
apeiros has quit [Remote host closed the connection]
<shevy> Hanmac: gem install rwx
<shevy> ERROR: Could not find a valid gem 'rwx' (>= 0) in any repository
baroquebobcat has joined #ruby
<benzrf> rails is for people who cannot write custom HTTP servers
<benzrf> B)
moax has quit [Ping timeout: 264 seconds]
<shevy> Hanmac: bug!
shedd has joined #ruby
apeiros has joined #ruby
arctarus has joined #ruby
<shevy> benzrf
<shevy> did you write custom HTTP server
<benzrf> nomenkun:
<benzrf> *no
<shevy> :(
<shevy> I was going to trick you
<nomenkun> :)
<shevy> if the answer would have been yes, I would have asked for the gem
<benzrf> i am untrickable
<benzrf> my prankster's gambit is unprecedentedly high
Zubin has joined #ruby
<shevy> that's a word with truly many 'e's
<benzrf> yup
kevind_ has joined #ruby
gja has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
havenwood has joined #ruby
mikepack has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
apeiros has quit [Ping timeout: 252 seconds]
prc1 has quit [Ping timeout: 252 seconds]
byprdct has joined #ruby
Zubin has quit [Read error: Connection reset by peer]
fijimunkii has joined #ruby
senj has joined #ruby
sassamo has quit [Remote host closed the connection]
camilasan has joined #ruby
mordocai has quit [Remote host closed the connection]
digital-ghost has joined #ruby
monkegjinni has quit [Remote host closed the connection]
julweber has joined #ruby
sassamo has joined #ruby
acrussell has joined #ruby
baordog_ has joined #ruby
einarj has quit [Remote host closed the connection]
_tpavel has joined #ruby
ferr has joined #ruby
baordog_ is now known as baordog
sassamo has quit [Ping timeout: 252 seconds]
malkomalko has quit []
acrussell has left #ruby [#ruby]
zz_anildigital is now known as anildigital
dennis__ has quit [Quit: Connection closed for inactivity]
ferr has quit [Client Quit]
einarj has joined #ruby
AndrewMartin is now known as Amart41
ZKM has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
phansch has quit [Quit: Leaving]
aryaching has joined #ruby
george2|chakra has joined #ruby
<havenwood> benzrf: for line 2 would this do?: _, *m = matrix.dup
<havenwood> oh, nvm
<benzrf> havenwood: oh wouldnt it
<benzrf> I was not thinking
einarj has quit [Remote host closed the connection]
george2 has quit [Ping timeout: 248 seconds]
anildigital is now known as zz_anildigital
lethjakman has joined #ruby
sassamo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
mansi has quit [Read error: Connection reset by peer]
<havenwood> benzrf: maybe i should look *after* having coffee but i don't see any problems
<benzrf> yay
mansi has joined #ruby
dorei has joined #ruby
zz_anildigital is now known as anildigital
maxime75 has quit [Quit: Quitte]
vlad_starkov has joined #ruby
zipper has quit [Quit: leaving]
george2|chakra has quit [Ping timeout: 272 seconds]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dorei> hello, let's say that i have a class only with class methods, how can i exec a block on that context?
vlad_starkov has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
monkegjinni has joined #ruby
shedd has joined #ruby
apeiros has joined #ruby
<benzrf> dorei: have you tried class_exec
<dorei> nop, let me try it
fijimunkii has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Quitting]
<benzrf> >> muh_block = proc {private :to_s}; Fixnum.class_exec &muh_block; 3.to_s
<eval-in> benzrf => private method `to_s' called for 3:Fixnum (NoMethodError) ... (https://eval.in/94287)
<dorei> it works, thanks :)
<benzrf> np
griffindy has joined #ruby
zcreative has joined #ruby
mojjojo has joined #ruby
bradhe has joined #ruby
kleinerdrache has joined #ruby
spyderma_ has quit [Ping timeout: 272 seconds]
Mon_Ouie has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
aryaching_ has joined #ruby
fijimunkii has joined #ruby
angusigu1ss has joined #ruby
bal has quit [Quit: bal]
aryaching has quit [Ping timeout: 240 seconds]
yasushi has quit [Remote host closed the connection]
momomomomo has joined #ruby
ephemerian has quit [Quit: Leaving.]
dseitz has joined #ruby
SCommette has quit [Quit: SCommette]
noname001__ has quit [Ping timeout: 272 seconds]
ryantm has quit [Ping timeout: 252 seconds]
tharindu has joined #ruby
aspires has joined #ruby
angusigu1ss has quit [Ping timeout: 272 seconds]
ghr has quit [Quit: Computer has gone to sleep.]
diegoviola has joined #ruby
user258467 has quit [Quit: Quitte]
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
rmorello has quit [Quit: Textual IRC Client: www.textualapp.com]
nomenkun has quit [Ping timeout: 272 seconds]
iamdoo2 has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
maletor has joined #ruby
george2 has joined #ruby
moax has joined #ruby
snath has joined #ruby
mikesplain has joined #ruby
<neoice> I'm still pretty new to Ruby. if I had 2 or 3 scripts with a bunch of commonality (similar initialization for logging/config/data output), what would be a good route towards refactoring them to remove the code duplication?
axl_ has quit [Quit: axl_]
intuxicated_ has joined #ruby
jonah has joined #ruby
<neoice> should I go learn about Modules? should I just make some sort of Base class and inherit from that?
pen has joined #ruby
aganov has quit [Remote host closed the connection]
aspires has quit [Remote host closed the connection]
intuxicated has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
<havenwood> neoice: Best to start with a Module and only use a Class if needed.
Lewix has joined #ruby
bthesorceror has quit [Remote host closed the connection]
m8 has joined #ruby
sergicles has quit [Quit: sergicles]
<neoice> havenwood: have any good docs for getting started with Module or should I just start with ruby-doc and irb?
<banister> neoice http://pryrepl.org
axl_ has joined #ruby
zcreative has quit [Ping timeout: 272 seconds]
<rubidious> hi. I want to make sure I'm interpreting this correctly: string.gsub(/[^ \n]+/) will match any instance of ^ ' ' or \n of length 1 or more?
<neoice> banister: I'm actually using `pry` in this Gemfile :P
mikesplain_ has joined #ruby
<havenwood> neoice: +1 Pry
tkuchiki has quit [Remote host closed the connection]
<rubidious> or is the ^ a special character meaning beginning of line in this case?
axl_ has quit [Client Quit]
mikesplain has quit [Ping timeout: 248 seconds]
mikesplain_ is now known as mikesplain
kleinerdrache has quit [Quit: Ex-Chat]
DaniG2k has joined #ruby
zcreative has joined #ruby
achru has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
achru has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
julweber has quit [Remote host closed the connection]
sassamo has quit [Remote host closed the connection]
<DouweM> rubidious: [abc] means any of a, b and c. [^abc] means anything *but* any of a, b and c
mercwithamouth has quit [Ping timeout: 265 seconds]
francisfish has quit [Remote host closed the connection]
jlebrech has quit [Quit: Konversation terminated!]
Megtastique has quit []
shredding has quit [Quit: shredding]
bluenemo has quit [Remote host closed the connection]
sassamo has joined #ruby
<DouweM> rubidious: if you want the literal ^, put it somewhere else in the group, or escape it
baba has left #ruby ["WeeChat 0.4.1"]
maletor has quit [Quit: Computer has gone to sleep.]
nathancahill has joined #ruby
<rubidious> oh right
<rubidious> I I knew that
<rubidious> ugh
pietr0 has joined #ruby
<rubidious> thanks DouweM
nfk has joined #ruby
Hobogrammer has joined #ruby
<DouweM> np
jajaja has joined #ruby
mojjojo has quit [Quit: mojjojo]
LiohAu has joined #ruby
achru has quit [Ping timeout: 272 seconds]
mojjojo has joined #ruby
Es0teric has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
pel_daniel has joined #ruby
jajaja has left #ruby [#ruby]
hamakn has joined #ruby
ahawkins has quit [Remote host closed the connection]
afhammad has joined #ruby
baroquebobcat has joined #ruby
dagobah has quit [Quit: Leaving...]
sassamo has quit [Ping timeout: 252 seconds]
Al__ has quit [Quit: Al__]
RaCx_ has joined #ruby
mansi has quit [Remote host closed the connection]
Brolen has quit [Remote host closed the connection]
linojon has joined #ruby
RaCx has quit [Ping timeout: 252 seconds]
RaCx_ is now known as RaCx
mansi has joined #ruby
senj has quit [Ping timeout: 252 seconds]
Brolen has joined #ruby
<linojon> is there an easy way to render a numeric like 13.649999999999999 to the "appropriate" number of places, e.g. in this case 13.65 , but if it were 13.499999999 it'd show as 13.5 etc
nowthatsamatt has joined #ruby
daxroc has quit [Ping timeout: 245 seconds]
Megtastique has joined #ruby
<workmad3> linojon: if you just want a string, you can use "%.2f" % float to get 2 decimal place precision
<mikecmpbll> linojon: round(2)?
Kricir has quit [Remote host closed the connection]
hamakn has quit [Ping timeout: 240 seconds]
<workmad3> >> "%.2f" % 13.499999
<eval-in> workmad3 => "13.50" (https://eval.in/94324)
zamn_ has joined #ruby
<workmad3> >> 13.49999.round(2)
<eval-in> workmad3 => 13.5 (https://eval.in/94325)
<linojon> mikecmpbll: but i don't know if it needs 2 or 3 or 1 etc places
<workmad3> >> 13.49999.round(3)
<eval-in> workmad3 => 13.5 (https://eval.in/94326)
<mikecmpbll> :/
kleinerdrache has joined #ruby
<workmad3> >> 13.634999.round(3)
<eval-in> workmad3 => 13.635 (https://eval.in/94327)
<linojon> hmm
<DaniG2k> "%.2f" % 13.49999999 <---thats nice :D
<mikecmpbll> how can you not know how many places?
<mikecmpbll> lol
Vitor has quit [Read error: No route to host]
IceDragon has quit [Quit: Space~~~]
Brolen has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 260 seconds]
<workmad3> DaniG2k: only if you don't need localisation ;)
mikepack has quit [Remote host closed the connection]
<DaniG2k> workmad3 what do you mean
kleinerdrache has quit [Client Quit]
mercwithamouth has joined #ruby
<workmad3> DaniG2k: if you needed to print out e.g. the appropriate decimal separator based on the locale, you'd need a different construct
<DouweM> "." isn't the decimal seperator everywhere
<DouweM> :)
<DouweM> and *separator
<DaniG2k> oh right
<linojon> thx, i think round actually works how i wanted, didn't realize that
<workmad3> DaniG2k: many countries use ',' as the decimal separator and '.' as the group separator, e.g. 10.000,34
mikesplain_ has joined #ruby
ndrei has joined #ruby
lsmola_ has quit [Ping timeout: 272 seconds]
mikesplain has quit [Ping timeout: 245 seconds]
mikesplain_ is now known as mikesplain
<mikecmpbll> yeah, i assumed it was just your bad explanation. you always want to round to the same number of decimal places, but you didn't want the trailing 0's displayed?
styped has joined #ruby
ozgun has quit [Quit: Leaving]
<mikecmpbll> :p
Deejay_ has quit [Read error: Operation timed out]
<apeiros> workmad3: I actually still like our format best: 10'000.34
duggiefresh has quit [Remote host closed the connection]
kevind__ has joined #ruby
Es0teric has joined #ruby
<neoice> is it appropriate to put `require`s within a Module? is there any reason to not use `require` in every file that needs it?
<DouweM> apeiros: whose format is that?
<apeiros> DouweM: swiss
<apeiros> neoice: it's pointless
<workmad3> apeiros: evil
duggiefresh has joined #ruby
Xeago has joined #ruby
<apeiros> neoice: put your requires at the top of your file
<LiohAu> I'm really bad with ruby, and I'm still trying to fix a conflict in two gem dependencies, can anybody assist me ? The error message is the following : "Unable to activate selenium-webdriver-2.39.0, because rubyzip-0.9.9 conflicts with rubyzip (~> 1.0) (Gem::LoadError)"
<DouweM> apeiros: ah. I kind of like it as well
olivier_bK has quit [Quit: Quitte]
<apeiros> workmad3: why evil? at least there you won't confuse thousands and decimal separators :)
camilasan has quit []
<zamn_> Hi, how do I get user input that is not stripped? i.e. i'm passing as a param to my ruby program a absolute file path and don't want to require the person to escape the slashes
<workmad3> apeiros: because ' is used to indicate 'primed' variables ;)
<workmad3> apeiros: e.g. f'(x) is the primed (usually differentiated) function f of x ;)
<apeiros> zamn_: on the command line? that's not solvable by ruby, as that depends on your shell.
yfeldblum has quit [Remote host closed the connection]
<apeiros> i.e., the requirement of escaping stuff happens outside of ruby - before ruby even runs
<apeiros> workmad3: and who uses numbers as function or variable name? :-p
pen has quit [Remote host closed the connection]
<workmad3> apeiros: bah, you and your logic :)
<DouweM> LiohAu: check out the zip-zip gem
<mikecmpbll> lmao
troyready has joined #ruby
<shevy> zamn_ user input is only available in ARGV
<apeiros> workmad3: yeah, damned details. I should stop obsessing over them!
<workmad3> apeiros: damn straight you should! stop obsessing over details and ruin your ability at coding!
LekeFly has joined #ruby
<godd2> shevy and $*
<shevy> what is $*
<apeiros> godd2: we pretend you never said that
IceDragon has joined #ruby
kevind_ has quit [Ping timeout: 252 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
* apeiros is a member of the death-to-all-globals group
<godd2> apparently I'm not allowed to tell you. Must be the first rule of global variables.
iamdoo2 has joined #ruby
<apeiros> additionally I'm a member of the more-death-to-all-cryptic-globals group
mikepack has joined #ruby
<LiohAu> DouweM: "beginner" means I don't even know what you mean by "checkout"
<shevy> 84552380
<shevy> 84552380
<shevy> $* == ARGV
net_mask has quit [Remote host closed the connection]
<DouweM> LiohAu: hah, not a programming term in this case. just "check it out"/"look it up"
<Senjai> There are totally awesome uses of global variables.. for DEBUGGING purposes only ofc. Like profiling code
<workmad3> shevy: it's ruby pretending to be bash
<LiohAu> ok, but why ?
<shevy> and perl
<apeiros> Senjai: everything you can solve with a global, you can solve better with a constant.
<workmad3> I'm sure perl was pretending to be bash too ;)
<godd2> the only programming lingo version of 'checkout' I can think of is for a repository
<apeiros> (applies to ruby - other languages may differ)
<godd2> er, branch in git
<shevy> apeiros how about $stdout vs. STDOUT
mikesplain has quit [Ping timeout: 248 seconds]
<Senjai> apeiros: Indeed, but constants don't have the fancy smancy $, fashion over function!
<havenwood> LiohAu: You're using bundler and a Gemfile to resolve dependencies?
<LiohAu> DouweM: I don't need another gem, I'm using multiple gems, that depends on different rubyzip versions at the same time
<shevy> yeah Senjai
mupkoo_ has quit [Remote host closed the connection]
<shevy> the non-use of $ makes constants sexier
duggiefresh has quit [Ping timeout: 265 seconds]
<godd2> shevy Id wager he's okay with it since $stdout isn't as cryptic as $! or $* or even $&
<shevy> and I am speaking louder to my computer
<apeiros> shevy: my recommendation of using $stdout stems from how ruby works. I'd prefer something like IO.stdout=/IO.stdout
CaptainJet has joined #ruby
<shevy> GOD_DAMN_WORK_NOW = true
<LiohAu> havenwood: no, i'm a perfect beginner, I did not understand a word of what is this "bundler" thing used for
<shevy> apeiros hmm IO.stdout works?
<apeiros> no
<zamn_> apeiros: thanks, forgot about bash silliness :P
<DaniG2k> perfect beginner
<apeiros> it doesn't exist
<shevy> awww :(
<DaniG2k> he's humble, i like that
<havenwood> LiohAu: http://bundler.io/
<apeiros> that's how I'd solve what ruby does
maletor has joined #ruby
<havenwood> LiohAu: worth a read ^
<apeiros> within current ruby scope, that is
mikesplain has joined #ruby
dkamioka has quit [Remote host closed the connection]
<LiohAu> no, that does not mean that I did not already read the website :)
fire has joined #ruby
<DouweM> LiohAu: I know. zip-zip fixes the conflicts between those versions
<LiohAu> that just means, that I don't understand how it could help me
<shevy> LiohAu so you mastered bundler
<workmad3> LiohAu: bundler is for dependency management
<DouweM> LiohAu: I've actually had the same problem a little while
roolo has quit [Remote host closed the connection]
<godd2> >> "Hello computer" =~ / [a-z]{2}/; $&
<eval-in> godd2 => " co" (https://eval.in/94331)
<shevy> LiohAu don't worry, I am still trying to find out how bundler helps me myself
zamn_ has left #ruby [#ruby]
<apeiros> godd2: I love how self-explaining $& is
<godd2> it's short for "and that's the match!"
<shevy> godd2 I am scared by these &
<workmad3> LiohAu: more specifically, the problem of keeping transitive dependencies (the dependencies of dependencies) under control when those dependencies are specified loosly and without having to explicitly list every single transitive dependency and version out by hand
monkegjinni has quit [Remote host closed the connection]
<apeiros> godd2: you mean "and that's the matched string!"
<shevy> they get auto-set like magic and disappear like vaporized water
<havenwood> LiohAu: I usually try deleting the Gemfile.lock and re-bundling first.
<apeiros> godd2: because "and that's the match!" is $~
<DouweM> apeiros: I love this blogpost for including English names: http://jimneath.org/2010/01/04/cryptic-ruby-global-variables-and-their-meanings.html
<shevy> godd2 I meant $
iamdoo2 has quit [Ping timeout: 245 seconds]
<workmad3> *loosely
<DouweM> havenwood: it's a very specific issue with different versions of rubyzip, that probably won't do ;)
<shevy> ok let's learn that blog's content
Hobogrammer_ has joined #ruby
<havenwood> DouweM: aye
mikepack_ has joined #ruby
<shevy> (1) $: is a shorthand for $LOAD_PATH
nvrch has quit [Quit: nvrch]
<apeiros> DouweM: ugh, the author seems to think === was a string ==…
<LiohAu> I understand that If I have a gem A, that needs a version 1 of a gem C, and a gem B that needs a version 2 of C, a dependency management thing can help. But If the gem A and B are used by a gem D, how could this last one be executing two versions of C at the same time ?
claymore has quit [Ping timeout: 252 seconds]
<shevy> (2) $0 contains the name of the ruby program being run
<havenwood> DaniG2k: bad gem author, bad!
<havenwood> DaniG2k: sry, MT
<apeiros> DouweM: somebody should tell him he wants equal?
<shevy> (3) $* is shorthand for ARGV
<DouweM> apeiros: hah
<shevy> (wtf... "shorthand" ... 2 chars vs 4 ....)
<workmad3> LiohAu: it can't, that would be an unresolvable dependency graph
<LiohAu> Ok great, this is what I seem to have
nfk has quit [Quit: yawn]
<godd2> shevy it's useful if you're playing Ruby GOlf
<apeiros> s/was a string ==/was a strict ==/
<shevy> how can the perl guys remember that all?
<shevy> godd2 I hate golfing
<workmad3> LiohAu: however, gems can have looser requirements, e.g. gem A could depend on gem C >= version 1, gem B could require version 1
<havenwood> shevy: then you can write code like: $** ''
mikepack has quit [Read error: Connection reset by peer]
<havenwood> shevy: (join elements of ARGV)
<shevy> havenwood I can use perl!!!
smathieu has joined #ruby
<workmad3> LiohAu: so gem D, depending on gem A and gem B has a transitive dependency on gem C... through gem A, it needs version >= 1, and through gem B it needs version 1
<godd2> like how using x%2<1 is one fewer character than x%2==0
<LiohAu> workmad3: Yes this is the case I have, how can I fix this, or at least hard code somewhere another dependency version ?
<shevy> omg
<benzrf> >> $*
<eval-in> benzrf => [] (https://eval.in/94333)
<benzrf> ??
<shevy> what is x%2<1
humani has quit [Quit: Leaving]
<godd2> it will return true if x is even
<DouweM> shevy: % is the modulo operator
claymore has joined #ruby
<shevy> >> $*.object_id
<eval-in> shevy => 551192190 (https://eval.in/94334)
<shevy> >> ARGV.object_id
<eval-in> shevy => 547858030 (https://eval.in/94335)
Hobogrammer has quit [Read error: Operation timed out]
<shevy> hmmmm
<havenwood> $** ''
rubyracer has joined #ruby
<LiohAu> omg use your shell :(
<LiohAu> it's unreadable ^^
<shevy> my irb says otherwise
<shevy> is eval-in lying to me?
<DaniG2k> that website was handy
<DaniG2k> really useful
<DaniG2k> seems very .... perlish
<godd2> lol can you make eval-in pass parameters to the script it runs?
<workmad3> shevy: no, they're separate runs of the ruby process
<shevy> ah
<DouweM> >> $*.object_id == ARGV.object_id
<eval-in> DouweM => true (https://eval.in/94336)
<workmad3> ^^
<DouweM> shevy: there you go
bradhe has joined #ruby
<shevy> if they accidentally have the same object_id
<shevy> CAN I BREAK EVAL-IN?!
<rubidious> when I do 'a = b', how can I ensure that a different copy is made? (ie if I change b at at later date, a stays the same)
vlad_starkov has joined #ruby
<shevy> rubidious .dup
<DouweM> rubidious: Ruby is pass by reference, not value
vlad_starkov has quit [Remote host closed the connection]
<DouweM> rubidious: in that case, .dup or .clone explicitly
<rubidious> cool
<godd2> shevy probably not. eval-in is probably running under safe level 3
binw_ has joined #ruby
<shevy> damn safe levels
vlad_starkov has joined #ruby
<shevy> php did without them!
<godd2> php does without a lot of things...
ohwhoa has quit [Quit: woah!]
mojjojo has quit [Quit: mojjojo]
<shevy> hehe
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> ##php :Cannot join channel (+r) - you need to be identified with services
<shevy> php does without me too :(
<godd2> >> $SAFE
<eval-in> godd2 => 0 (https://eval.in/94338)
monkegjinni has joined #ruby
<godd2> uh oh
SilentHobo has joined #ruby
wtfitsme has joined #ruby
<shevy> godd2 perhaps it cheats
<LiohAu> workmad3, DouweM, shevy: http://pastebin.com/CsvE78H1 < dependency graph
<LiohAu> If you think that bundler can solve that, then i'll use it
humani has joined #ruby
<LiohAu> (with your help :P)
<DouweM> LiohAu: please install the zip-zip gem. it solves that problem specifically
DaniG2k has quit [Quit: leaving]
<shevy> LiohAu sorry, can't help you with bundler, I do not use it myself
<shevy> LiohAu I simply use "gem" alone
mojjojo has joined #ruby
<LiohAu> DouweM: but how installing another gem that is not related can solve that problem ? oO
<havenwood> shevy: `gem -g Gemfile` ftw!
aryaching has joined #ruby
<havenwood> gem install -g Gemfile**
<DouweM> LiohAu: because it is related. please check what the gem does
<DouweM> "In Gem hell migrating to RubyZip v1.0.0? Include zip-zip in your Gemfile and everything's coming up roses!"
<DouweM> That's its description. It's a bit of a hack, but it works great
bradhe has quit [Ping timeout: 245 seconds]
binw has quit [Ping timeout: 251 seconds]
chipotle has joined #ruby
<shevy> havenwood that works as well?
frank____ has joined #ruby
<LiohAu> DouweM: it did not change anything
arietis has joined #ruby
<LiohAu> I just installed it
Hanmac1 has joined #ruby
<frank____> test
frank____ has left #ruby [#ruby]
<shevy> frank____ failed! go back to start
<havenwood> shevy: yup, part of RubyGems swallowing Bundler :) the merge is underway
<shevy> havenwood good!
<shevy> ELIMINATE BUNDLER!!!
shime has quit [Ping timeout: 245 seconds]
<shevy> Lower your bytes!
<shevy> You will be assimilated!
SCommette has joined #ruby
Hobogrammer_ has quit [Ping timeout: 248 seconds]
<LiohAu> How can it change anything ? I'm not using rubyzip myself, i depends on gems that depends on rubyzip, so I don't see how I could solve the problem without changing the require/includes in the gems I depends on
aryaching_ has quit [Ping timeout: 265 seconds]
<workmad3> LiohAu: could you gist your Gemfile and your Gemfile.lock instead of that please?
Hanmac has quit [Ping timeout: 260 seconds]
julweber has joined #ruby
<DouweM> LiohAu: yeah, you're right. what that gem does is make sure gems that depend on old versions of rubyzip will be able to work with the new version, but I'm afraid I'm not sure either how to massage those gems into accepting the new rubyzip version in the first place
<LiohAu> workmad3: how can I get that ?
baroquebobcat has quit [Quit: baroquebobcat]
<DouweM> LiohAu: sorry, I may have made some assumptions
<workmad3> LiohAu: in your project you have a Gemfile and a Gemfile.lock if you're using bundler
tedstriker has quit [Quit: Anti-Fraping status set.]
octoberry has joined #ruby
<workmad3> LiohAu: could you put them in a gist on gist.github.com? :)
<shevy> LiohAu show us what you got!
<havenwood> LiohAu: If you read the Bundler page you'd know what a Gemfile was and where to find it. You said you read it, read it again.
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<shevy> he read it but he did not understand it!
<LiohAu> i'm not using bundler, i'm not doing any ruby project, i'm using gem written by other people (cucumber, calabash, and watir-webdriver especially, and they depends on a lot of other gems)
apeiros has quit [Remote host closed the connection]
<shevy> good! don't use bundler!
<shevy> go do "gem install name"
<shevy> hurry up!
rayners has joined #ruby
<shevy> even "gem install rails" can work :)
Czupa has joined #ruby
<LiohAu> I'm not a ruby developer, I don't think I need all these things, don't make me setup a lot of things for nothing
nbouscal has quit [Ping timeout: 253 seconds]
<godd2> gem install rails --no-rdoc --no-ri for me
apeiros has joined #ruby
stef_204 has quit [Ping timeout: 260 seconds]
mando has quit [Remote host closed the connection]
rmorello has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
mando has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
yacks has quit [Quit: Leaving]
mr_red has left #ruby ["bye :)"]
tharindu has quit [Read error: Connection reset by peer]
<LiohAu> really don't you think that bundler is for people that are actually creating gems or applications, (or maybe websites with rails?) and that have multiple versions to manage in their different projects?
tharindu has joined #ruby
angusigu1ss has joined #ruby
styped has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<LiohAu> I'm only writting cucumber features, to automate websites and mobile application testing, I really think bundler won't help me
<workmad3> LiohAu: I personally think it's useful for anything that uses ruby
<shevy> LiohAu I think bundler is for noone
vlad_starkov has quit [Remote host closed the connection]
<workmad3> LiohAu: and I'll continue to think so until the way rubygems loads gems is altered significantly enough that it can do an 'all-at-once' resolution of gems to get the right gems loaded :)
<shevy> LiohAu it came from the rails ecosystem
<godd2> Lol job posting for Ruby on Rails Tech lead with 10+ years of experience.
<apeiros> workmad3: since you declare which gems in the gemfile, you can achieve that same feat by having a requires file :-p
mr_red has joined #ruby
troessner has quit [Quit: Leaving]
<workmad3> apeiros: that doesn't solve the transitive dependency locking issue
<apeiros> workmad3: and if your "thing" is a gem, you can read your gems dependencies and require those
kure_ has quit [Read error: Connection reset by peer]
SCommette has quit [Ping timeout: 252 seconds]
Columcille has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
kure_ has joined #ruby
<apeiros> hm? rubygems allows to activate specific versions too…
<apeiros> don't need bundler for that
<shevy> can gem output a dependency graph?
<shevy> like a cute little scii tree
<shevy> *ascii
<apeiros> that's what the `Kernel#gem` method does
<workmad3> apeiros: no, but for transitive dependencies you'd need to list out all transitive dependencies as explicit requires in order to handle it
<LiohAu> I don't have time to lose with the troll/war you're doing with "bundler vs not bundler", I just think that I don't need a dependency manager, I only use 1 software with ruby it's calabash (that depends on a lot of gems), but I won't mix any versions, so I don't have a dependencies problem, the problem that I have right now, can't be solved except by hardcoding the file that contains the dependencies of the gems I'm using
<apeiros> workmad3: I think I don't follow
Voodoofish430 has joined #ruby
mikepack_ has quit [Remote host closed the connection]
mityaz has joined #ruby
nbouscal has joined #ruby
<workmad3> apeiros: gem A uses rubyzip and relies on rubyzip >= 1.0.0, gem B uses rubyzip and relies on rubyzip ~> 1.0.0. Both rubyzip 1.0.0 and 1.1.0 are installed
<workmad3> apeiros: in a requires file, you'd get a different result if you loaded gem A before gem B, compared to gem B before gem A
v10energy has joined #ruby
<apeiros> workmad3: just as with bundler, you can specifically activate 1.0
_tpavel has quit [Quit: Leaving]
<workmad3> apeiros: namely, gem A first, gem B blows up
<apeiros> and then order doesn't matter
sepp2k has joined #ruby
baroquebobcat has joined #ruby
angusigu1ss has quit [Ping timeout: 265 seconds]
duggiefresh has joined #ruby
<workmad3> apeiros: yes, but then you need to explicitly state all transitive dependencies
<workmad3> apeiros: basically, you need to resolve the graph to a suitable version by hand
<apeiros> workmad3: just as with bundler too…
<workmad3> apeiros: no
<workmad3> apeiros: bundler does that for you
<apeiros> o0
<workmad3> apeiros: it's kinda the whole point of bundler
Al__ has joined #ruby
edwardly has quit [Ping timeout: 264 seconds]
<LiohAu> I want to tell gem A "shut the fuck up" and try to use 1.1.0, OR the reverse (saying gem B to use 1.0.0)
craigp has joined #ruby
<workmad3> apeiros: bundler will look at gem A and gem B, see that gem A needs >= '1.0.0', gem B needs ~> 1.0.0 and determine that rubyzip 1.0.0 is suitable for both, *and only use that*
edwardly has joined #ruby
<workmad3> apeiros: *without* you saying explicitly that you want rubyzip 1.0.0 in your Gemfile ;)
<apeiros> workmad3: if you'd specify in a gemspec that you depend on A and B, rubygems won't resolve that properly?
canton7-mac has quit [Quit: Leaving]
stef_204 has joined #ruby
<workmad3> apeiros: yes, but not in a project that lacks a gemspec
<workmad3> apeiros: e.g. just a command line script
duggiefresh has quit [Read error: Connection reset by peer]
duggiefr_ has joined #ruby
<apeiros> well, if it lacks a Gemfile, bundler won't do it either…
<workmad3> no, but you can add a Gemfile
allen_on_c has quit [Quit: Leaving]
<apeiros> no, but you can add a .gemspec
<apeiros> and now?
<workmad3> apeiros: you then need to package that as a .gemspec
<workmad3> apeiros: err, as a gem
<apeiros> so you miss a command to just install dependencies listed in the .gemspec?
alex__c2022 has joined #ruby
Ziarkaen has joined #ruby
<shevy> LiohAu it is as far as I know based on require, and require does not allow dependencies
<apeiros> as opposed of installing the stuff as a gem
<LiohAu> There is this file "…./specifications/selenium-webdriver-2.39.0.gemspec" that contains "s.add_dependency(%q<rubyzip>, ["~> 1.0"])" can't I just change the "~>" by "=>" here ?
<workmad3> apeiros: I'd also miss the lockfile to make sure that the same versions were installed on other machines :)
<shevy> LiohAu you can but then you must rebuild the gem
mojjojo has quit [Quit: mojjojo]
<LiohAu> how c?
<LiohAu> how* ?
<shevy> LiohAu: gem build *.gemspec
<apeiros> workmad3: ok, the lockfile is a point
<workmad3> apeiros: I consider the Gemfile to be a declaration of what you need to provision an application personally, rather than just dependencies ;)
<apeiros> I think I'll read through wycatz' post later
vlad_starkov has joined #ruby
<alex__c2022> getting "sh: ruby: not found" error but only when I try to run thin as daemon. If I run ruby -v, everything works as expected. Any ideas?
edwardly has quit [Read error: Operation timed out]
<workmad3> apeiros: while gemspec is (and rightly so) just a declaration of dependencies for a library
noop has joined #ruby
blandflakes has joined #ruby
<shevy> alex__c2022 where is ruby on your system
i_s has joined #ruby
<shevy> alex__c2022 and where is your site dir path of ruby (also show "gem env", ideally all in a pastie)
SCommette has joined #ruby
arctarus has quit [Remote host closed the connection]
<LiohAu> shevy: once I did the build, should i re-install ?
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clamstar has quit [Quit: Computer has gone to sleep.]
bthesorceror has joined #ruby
VTLob has joined #ruby
<workmad3> apeiros: wheras a Gemfile is a declaration of what you need and where to get it from, and the Gemfile.lock is a resolved, complete version of the unresolved, highlights only Gemfile :)
iamsean has joined #ruby
duggiefr_ has quit [Ping timeout: 252 seconds]
tonni has joined #ruby
<alex__c2022> it works as expected except when i try to run thin web server as daemon
<workmad3> LiohAu: just a quick thing - what gems are you explicitly using? calabash-common and selenium-webdriver?
<alex__c2022> which is very strange
intuxicated_ is now known as intuxicated
x1337807x has joined #ruby
anildigital is now known as zz_anildigital
intuxicated is now known as Guest66169
vlad_starkov has quit [Remote host closed the connection]
styped has joined #ruby
vlad_starkov has joined #ruby
Txandy has joined #ruby
nifty has joined #ruby
mmcdaris has joined #ruby
Kricir has joined #ruby
moax has quit []
duggiefresh has joined #ruby
Kricir has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
Kricir has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 248 seconds]
edwardly has joined #ruby
Hobogrammer_ has joined #ruby
octoberry has quit [Ping timeout: 264 seconds]
<LiohAu> workmad3: The main gems I'm using are calabash-cucumber (iOS) / calabash-android, they depends on cucumber which depends on gherkin which depends on rubyzip >= 1.0.0 and everything works well in this case.
<LiohAu> The problem comes when I try to require a new gem "watir-webdriver" at the same time, watir-webdriver, depends on selenium-webdriver and this last one depends on rubyzip ~> 1.0
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
rootshift has joined #ruby
<apeiros> workmad3: well, some functionality of bundler will be integrated into rubygems anyway
botter1 has joined #ruby
subbyyy_ has joined #ruby
SilentHobo has quit [Read error: Operation timed out]
bricker`LA has quit [Ping timeout: 272 seconds]
clamstar has joined #ruby
Guest66169 has quit [Quit: Leaving]
<workmad3> LiohAu: ok then... do 'gem install bundler', then add this (https://gist.github.com/8583579) as your Gemfile in the base of your project directory (so where you're storing your features, etc). Then do 'bundle install' and run stuff with 'bundle exec <whatever>'
intuxicated_ has joined #ruby
<workmad3> LiohAu: I just tested that out locally, and it can find a valid graph :)
<workmad3> apeiros: yeah, there's definitely bits of bundler that belong in rubygems
banjara has joined #ruby
<workmad3> apeiros: but not all of it, IMO :)
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Liothen has joined #ruby
<workmad3> apeiros: rubygems should have the stuff along the lines of 'I depend on X, Y and Z' while bundler should, IMO, have the information about where to get X, Y and Z from
<LiohAu> workmad3: well finally solved the problem
SilentHobo has joined #ruby
<LiohAu> sudo gem uninstall selenium-webdriver --version '2.38.0' + sudo gem install selenium-webdriver --version '2.35.1' < this selenium gem does not depends on a stupid rubyzip version
<workmad3> LiohAu: 2.39.0 seems to be fine with rubyzip 1.1.0 too
cjsarette has joined #ruby
<LiohAu> workmad3: hm, I need the one that is fine with rubyzip 0.9.9 no ?
SCommette has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
<workmad3> LiohAu: according to how bundler resolves things, 1.1.0 should be fine
TMM has quit [Quit: Ex-Chat]
ahmedelgabri has joined #ruby
<LiohAu> well I'll keep your gist
<Veejay> Hello everyone. What do you think it's the best way to verify that a user-provided link doesn't 404? Right now, I'm making a HEAD request to the URI using Net::HTTP and checking the response, but some websites (ahem linkedin) return HTTP status 999 even though the page actually exists... is there a more fool-proof way to achieve that?
stack_push has joined #ruby
SCommette has joined #ruby
<LiohAu> and if I get trouble with this selenium old version, i'll install bundler and will come back here to disturb you :)
edwardly has quit [Ping timeout: 252 seconds]
stack_push has quit [Client Quit]
humani has quit [Quit: Leaving]
mansi has joined #ruby
banjara has quit [Ping timeout: 264 seconds]
Hobogrammer_ has quit [Ping timeout: 252 seconds]
humani has joined #ruby
edwardly has joined #ruby
InstaGrams5 has joined #ruby
yano has quit [Quit: WeeChat, The Better IRC Client -- http://weechat.org/]
ahmedelg_ has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
mib_mib has joined #ruby
styped has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
InstaGrams5 has left #ruby [#ruby]
teddyp1cker has joined #ruby
spyderman4g63 has joined #ruby
phansch has joined #ruby
colonolGron has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
heidi has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
mocfive has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<shevy> ack
<shevy> bundler users should go to #bundler
<Hanmac> shevy: rwx comes when its ready ... so a little bit earlier than Half
<Hanmac> Life3
<shevy> phew
yano has joined #ruby
ewnd9 has quit [Ping timeout: 252 seconds]
mmcdaris has quit [Quit: mmcdaris]
<havenwood> Veejay: response.code != 404
<shevy> for a moment I was scared you'd say rwx will come right after the linux desktop made it to snatch a whole year for itself
edwardly has quit [Ping timeout: 272 seconds]
styped has joined #ruby
styped has quit [Max SendQ exceeded]
<havenwood> Veejay: but yeah, since 999 isn't "ok" you could just check `response.ok? || response.code == 999`
mrfrost has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
mmcdaris has joined #ruby
timonv has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 248 seconds]
dukz has quit [Remote host closed the connection]
wtfitsme has quit [Quit: wtfitsme]
dukz has joined #ruby
burlyscudd has quit [Quit: Leaving.]
iamsean has quit [Quit: iamsean]
Jdubs has joined #ruby
blaxter has quit [Ping timeout: 260 seconds]
bricker_ has joined #ruby
bricker_ is now known as bricker`work
kobain has quit [Ping timeout: 272 seconds]
mikesplain has quit [Quit: mikesplain]
x1337807x has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Spami has joined #ruby
mikesplain has joined #ruby
<Veejay> havenwood: Yeah, but then it gets hairy with some special corner cases, I wanted something simple to warn users that they'd break a link on their page.
mikepack has quit [Ping timeout: 248 seconds]
<Veejay> Doesn't really matter anyway, thanks
mib_mib has quit [Ping timeout: 272 seconds]
Txandy has quit [Quit: Leaving...]
iamdoo2 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
rezzack has joined #ruby
dukz has quit [Ping timeout: 248 seconds]
frank____ has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
dkamioka has joined #ruby
bradhe has joined #ruby
g0bl1n has joined #ruby
jonah has quit [Remote host closed the connection]
banjara has joined #ruby
mark_locklear has joined #ruby
sambao21 has joined #ruby
kpshek has quit []
mikepack has joined #ruby
iamdoo2 has quit [Ping timeout: 245 seconds]
julweber has quit [Remote host closed the connection]
edwardly has joined #ruby
mrfrost has quit [Quit: Leaving]
daixtr has joined #ruby
gr33n7007h has joined #ruby
humani has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 264 seconds]
garybrett has quit [Quit: Leaving...]
humani has joined #ruby
DrShoggoth has joined #ruby
ponbiki has quit [Read error: Operation timed out]
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
Brolen has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
francisfish has joined #ruby
byprdct has joined #ruby
edwardly has quit [Read error: Operation timed out]
gnephiak has quit [Quit: Konversation terminated!]
carraroj has joined #ruby
jonah has joined #ruby
yfeldblu_ has joined #ruby
colonolGron has quit [Quit: leaving]
axl_ has joined #ruby
teddyp1cker has quit []
shanlar- has quit [Ping timeout: 252 seconds]
ponbiki has joined #ruby
reset has joined #ruby
ponbiki is now known as Guest63085
<miah> moin
RaCx has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
angusigu1ss has joined #ruby
Brolen has quit []
iamsean has joined #ruby
daixtr has left #ruby [#ruby]
jasonwebster has joined #ruby
akam-it has quit [Remote host closed the connection]
edwardly has joined #ruby
mmcdaris has left #ruby [#ruby]
<shevy> Hanmac cool. though who knows
noop has quit [Ping timeout: 272 seconds]
SHyx0rmZ has joined #ruby
brian____ has joined #ruby
angusigu1ss has quit [Ping timeout: 265 seconds]
SilentHobo is now known as Hobogrammer
shedd has quit [Remote host closed the connection]
<Hanmac> shevy the best part: "for analyses they treat facebook like a plague" ;P
kpshek has joined #ruby
burlyscudd has joined #ruby
w4pm has joined #ruby
ephemerian has joined #ruby
browndawg has left #ruby [#ruby]
standyro1 has joined #ruby
devinus has joined #ruby
asmodlol has joined #ruby
niklasb has joined #ruby
dik_dak has joined #ruby
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
nanoyak has joined #ruby
burlyscudd1 has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
rdark has quit [Quit: leaving]
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
vlad_starkov has joined #ruby
wtfitsme has joined #ruby
<sweeper> yea. I don't see amazon going that way just because they're so diverse
<sweeper> facebook...is just facebook :P
Xeago has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ktosiek_ is now known as ktosiek
<Hanmac> yeah with facebook you feel happy because you have a asocial disorder ;P
mikepack has quit [Remote host closed the connection]
jtdowney has quit []
<shevy> well
<shevy> there are people who care about facebook
stryek has quit [Ping timeout: 265 seconds]
<shevy> like Hanmac
<shevy> and there are people who don't
<shevy> like sweeper
<shevy> Hanmac here is my idea
momomomomo has joined #ruby
<shevy> Hanmac based on the require line alone, we can modify the behaviour of modules that are pulled in
x1337807x has quit [Ping timeout: 240 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
diegoviola has quit [Read error: Operation timed out]
mikepack has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
Kricir_ has joined #ruby
avril14th has joined #ruby
yfeldblu_ has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
ktun_ has joined #ruby
jprovazn_ has quit [Quit: Odcházím]
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
RaCx has quit [Ping timeout: 272 seconds]
Kricir__ has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
x1337807x has joined #ruby
_Andres has joined #ruby
txdv has quit [Read error: Connection reset by peer]
yfeldbl__ has joined #ruby
mehlah has quit [Quit: Leaving...]
pu22l3r_ has quit [Remote host closed the connection]
dfranciosi has quit [Remote host closed the connection]
venkat has joined #ruby
txdv has joined #ruby
pu22l3r_ has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Remote host closed the connection]
pu22l3r_ has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
clamstar has joined #ruby
Kricir_ has quit [Ping timeout: 252 seconds]
ktun has quit [Ping timeout: 264 seconds]
_Andres has quit [Read error: Connection reset by peer]
dkamioka has quit [Remote host closed the connection]
yfeldblu_ has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
edwardly has quit [Ping timeout: 264 seconds]
colonolGron has joined #ruby
jonah has quit [Remote host closed the connection]
RaCx has joined #ruby
RaCx has quit [Remote host closed the connection]
Shidash has joined #ruby
RaCx has joined #ruby
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
Virtualize|away has joined #ruby
DouweM has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has joined #ruby
_Andres has joined #ruby
avril14th has quit [Remote host closed the connection]
pen has joined #ruby
cj3kim has quit [Remote host closed the connection]
_Andres has quit [Client Quit]
smathieu has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
smathieu has joined #ruby
edwardly has joined #ruby
Txandy has joined #ruby
bradhe has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
devinus has quit [Read error: Connection reset by peer]
devinus_ has joined #ruby
spyderman4g63 has quit [Ping timeout: 252 seconds]
pen has quit [Ping timeout: 245 seconds]
Al__ has quit [Quit: Al__]
diegoviola has joined #ruby
edwardly has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
iamdoo2 has joined #ruby
<pragmatism> What kind of caring?
<pragmatism> Sweet, passionate, social-network addiction/love?
rootshift has joined #ruby
<shevy> pragmatism like an old lover
<pragmatism> Gross
<pragmatism> Loose and fleshy?
Kricir__ has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
wtfitsme_ has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
spyderman4g63 has joined #ruby
iamdoo2 has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
edwardly has joined #ruby
colonolGron has quit [Quit: leaving]
tauebel has joined #ruby
banjara has quit [Quit: Leaving.]
wtfitsme has quit [Ping timeout: 260 seconds]
wtfitsme_ is now known as wtfitsme
<bricker`work> :|
mikepack has joined #ruby
aspires has quit []
recurrence has joined #ruby
pen has joined #ruby
vlad_starkov has quit []
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
dsferreira has joined #ruby
vlad_starkov has joined #ruby
Kricir has joined #ruby
decoponio has quit [Quit: Leaving...]
tharindu has quit [Quit: Leaving...]
tauebel has quit [Quit: Leaving.]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
ktun_ has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
sambao21 has quit [Quit: Computer has gone to sleep.]
ktun has joined #ruby
momomomomo has joined #ruby
Ziarkaen has quit [Remote host closed the connection]
Hiall has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
jonah has joined #ruby
<shevy> pragmatism yes and sick
mlpinit_ has joined #ruby
<shevy> so now it's time to go back to ruby
<shevy> who wants to talk about really cool gems?
<Jdubs> shevy, get a job bro
<Jdubs> :P
stkowski has joined #ruby
ahmedelgabri has quit []
<shevy> ok Jdubs is out
<shevy> anyone else
banjara has joined #ruby
<Jdubs> LOL
edwardly has quit [Ping timeout: 260 seconds]
<Jdubs> shevy i like to HTTParty
<shevy> hmm
<Jdubs> hehe
<shevy> you are just abusing the name :(
<Jdubs> :(
edwardly_ has joined #ruby
whomp has joined #ruby
<shevy> these jokes will just be worse than Hanmac's jokes
mlpinit has quit [Ping timeout: 260 seconds]
<apeiros> Jdubs: I don't know that gem, "get_a_job", what's it do?
humani has quit [Quit: Leaving]
<Jdubs> Sadly, I've become a front end guy now
<Jdubs> I'm a traitor :(
<Jdubs> Apeiros lol :P
<Jdubs> Wasn't my choice though
<shevy> you are putting makeup on the pig?
senayar has joined #ruby
<shevy> fancy CSS effects
<shevy> super stylish rainbows
<shevy> and totally useless javascript alerts
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RaCx has joined #ruby
humani has joined #ruby
DouweM has joined #ruby
humani has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
benzrf has left #ruby [#ruby]
<dsferreira> Hi. I'm trying to figure out how best design a library where I would like to have an Interface class (class MyLIb). And then I will have several classes (class A, class B, class C, ...). I would like to access at the MyLib.new instance level, instances of A.new, B.new, C.new and make this instances available between each other. What would be the best pattern to achieve this?
x1337807x has joined #ruby
klaut has joined #ruby
_root has joined #ruby
Kricir has quit [Remote host closed the connection]
freezey has joined #ruby
Kricir has joined #ruby
_root has quit [Client Quit]
<Jdubs> shevy lol
RaCx has quit [Client Quit]
<Jdubs> i prefer backend
<Jdubs> but my job moved me frontend
mercwithamouth has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
<Jdubs> its not my fault!
<Jdubs> pls love me :(
<havenwood> dsferreira: please announce when you're cross posting
<Jdubs> Anyways gtg to work guys cya!
<pragmatism> dependency injection with a manager class
* Jdubs salutes Shevy and Apeiros
Jdubs has quit []
<dsferreira> havenwood, annonce? like what?
Kricir has quit [Remote host closed the connection]
octoberry has joined #ruby
<havenwood> dsferreira: I'm cross posting this in #ruby-lang, but... here:
senayar_ has joined #ruby
<havenwood> dsferreira: and likewise in other channels, so someone trying to help knows there is a cross discussion
Kricir has joined #ruby
<havenwood> or don't cross post :P
<dsferreira> havenwood: ok. it's in #ruby, #ruby-lang, #nyruby, #austin-ruby
<dsferreira> haven wood, It's a hard subject to get feedback
clamstar has quit [Quit: Computer has gone to sleep.]
<havenwood> dsferreira: Are you dead set on interfaces being an inherited class? Consider making it a module and using mixins?
<dsferreira> It needs to be an instance
<havenwood> ah
senayar has quit [Ping timeout: 248 seconds]
<dsferreira> It depends on input params
<dsferreira> And each instance will have it's own state
kirun has joined #ruby
mansi has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
Fractional has joined #ruby
<havenwood> Do you maybe need an additional class/module to hold shared state?
mehlah has joined #ruby
mansi has joined #ruby
Uranio has joined #ruby
<dsferreira> The final output will depend on the input information
<dsferreira> havenwood, how do you mean?
<Uranio> hi, wich is the latest version of the "pickaxe book" (Programming ruby)
<havenwood> dsferreira: maybe i misread, let me reread what you wrote
<apeiros> Uranio: http://pragprog.com/book/ruby/programming-ruby I'd guess the website knows…
<Uranio> apeiros: thanks, let me see...
motto has joined #ruby
shaunbaker has quit [Ping timeout: 260 seconds]
robert_ has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
<havenwood> dsferreira: hard to say that abstractly. are you asking how to inform A, B, and C which instance of the interface they're sharing?
klaut has quit [Remote host closed the connection]
<havenwood> dsferreira: any shareable code? or design stage?
m8 has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 252 seconds]
<dsferreira> havenwood: I'm afraid not. But the concept its pretty straight forward. I just don't know what would be the best design. I will put some code in a gist.
shaunbaker has joined #ruby
poulson has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
Es0teric has quit [Quit: Computer has gone to sleep.]
shadoi has joined #ruby
burlyscudd1 has quit [Quit: Leaving.]
doodlehaus has joined #ruby
intuxicated_ has quit [Read error: Connection reset by peer]
<Uranio> apeiros: sorry, any place where download the ".pdf"?? I'm in Cuba and can't pay for it
jailbot has joined #ruby
<apeiros> Uranio: I'm sorry, piracy is not welcome here
hetre85_ has quit [Ping timeout: 272 seconds]
<Uranio> Programming Ruby 1.9 & 2.0 (4th edition): The Pragmatic Programmers' Guide
<Uranio> apeiros: ok, sorry then
<dsferreira> The thing in this is that I would like to have @b as the same object in both MyLib, A, and C instances.
<dsferreira> I don't know if that makes any sense.
<apeiros> Uranio: older versions of it are available for free, e.g. on ruby-doc.com
<dsferreira> Another thing would be how to make things so that we wouldn't have to pass type to every initialise method
burlyscudd has joined #ruby
<apeiros> Uranio: whoops, ruby-doc.org I meant
<Uranio> yep.. I have older versions already. thanks anyway
yfeldbl__ has quit [Read error: Connection reset by peer]
<apeiros> most of its content still applies. a couple of blogs cover the more important differences.
fire has quit [Quit: WeeChat 0.4.1]
yfeldblum has joined #ruby
tuttinator has joined #ruby
kpshek has quit []
atmosx has joined #ruby
Eiam has joined #ruby
tvw has quit []
<pragmatism> Why isn't my rescue block catching an exception raised in a fiber?
venkat has quit []
panchiniak has joined #ruby
kpshek has joined #ruby
<Uranio> pragmatism: it is the rescue inside the fiber? our outside?
<pragmatism> begin; Fiber.new { raise Exception }.resume; rescue; end;
bricker`work has quit [Quit: leaving]
<pragmatism> Exception there isn't caught
<pragmatism> Outside
jerius has quit [Ping timeout: 252 seconds]
mikesplain_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mikesplain has quit [Ping timeout: 245 seconds]
mikesplain_ is now known as mikesplain
jlast_ has joined #ruby
jerius has joined #ruby
<griffindy> it looks to be because it's Exception, and not a StandardError
<Uranio> begin; Fiber.new { raise ArgumentError }.resume; rescue; end
<griffindy> which makes sense, because bare default won't rescue Exception
Soda has joined #ruby
<Uranio> pragmatism: use rescue Exception or throw an ArgumentError instead
jonah has quit [Remote host closed the connection]
<Fractional> Would you name a parameter being a index startpos or start_pos?
<Uranio> pragmatism: begin; Fiber.new { fail }.resume; rescue; end
sambao21 has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
afhammad has quit []
bricker_ has joined #ruby
bricker_ is now known as bricker`work
<pragmatism> Uranio: I'll give that shot. What's the difference? Don't both of those inherit from Exception?
Hobogrammer has quit [Ping timeout: 252 seconds]
octoberry has quit [Ping timeout: 265 seconds]
pu22l3r_ has quit [Remote host closed the connection]
<Uranio> pragmatism: sorry, my english is very bad, I do not know how to explain it :-/
gr33n7007h has quit [Quit: Leaving]
bradhe has joined #ruby
<dsferreira> havenwood: Did you saw the code sample?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
octoberry has joined #ruby
coderhs has joined #ruby
clamstar has joined #ruby
danman has joined #ruby
heidi has quit [Quit: Leaving.]
w4pm has quit [Ping timeout: 245 seconds]
edwardly_ has quit [Ping timeout: 252 seconds]
jonah has joined #ruby
<pragmatism> Uranio: no worries :) thanks for the asssit
<pragmatism> assist
alvaro_o has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
DefV has quit [Read error: Operation timed out]
yfeldblum has quit [Remote host closed the connection]
kevinykchan has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
<havenwood> dsferreira: no, looking now
Vivekananda has quit [Quit: Ex-Chat]
shedd has joined #ruby
octoberry has quit [Ping timeout: 260 seconds]
w4pm has joined #ruby
timonv has quit [Remote host closed the connection]
<alex__c2022> $PROGRAM_NAME returns "ruby /home/ubuntu/.../thin start" on one of my servers but "/home/ubuntu/.../thin start" on another
<alex__c2022> any ideas
<alex__c2022> ?
cj3kim has joined #ruby
emptymag00 has quit [Ping timeout: 245 seconds]
<Uranio> alex__c2022: I guest you "exec" in one and send as argument to ruby in the other
<Uranio> could we see your sheebang?
DefV has joined #ruby
<alex__c2022> will have to dig for it, it's not in my code. It's thin gem
dorei has quit []
<Uranio> your use "./thin start" or "ruby thin start" en both? or diferent ways in each server?
<Fractional> Would you name a parameter for a function that is a index startpos or start_pos?
mando_ has joined #ruby
crazedpsyc has quit [Quit: ZNC - http://znc.in]
<shevy> wat
shaunbaker has quit [Remote host closed the connection]
<alex__c2022> i use "RACK_ENV=foo thin start -C thin.yml" in both
<shevy> you mean an argument to a method?
<alex__c2022> foo changes though
jtdowney has joined #ruby
<Uranio> Fractional: start_pos? would return true or false, I guest and index is a number
jtdowney has quit [Max SendQ exceeded]
<Fractional> shevy: Yes
Megtastique has quit []
<shevy> Fractional start_pos but that is because I have bad eyesight and appreciate visual separators
jtdowney has joined #ruby
<Fractional> Uranio: def binarysearch(array, value, startpos, endpos)
<DouweM> Fractional: go with underscores
monkegjinni has quit [Remote host closed the connection]
<Fractional> Do you think it should be start_pos or startpos respectively endpos or end_pos?
<havenwood> dsferreira: On line 11 are you really wanting to create a new instance of B or you really want to assign @b to the instance you created in MyLib?
<Uranio> I would now use "?" :-/
<apeiros> Fractional: clearly start_pos. separate words.
<Fractional> Douwem, Shevy, Uranio, Apeiros: Thank you guys! :)
<shevy> Uranio, yes but with or without _ in addition to that :D
<shevy> def cleanupeverythingandthenexitwithafriendlymessage
<Uranio> taste like C :-/ without the _
<Fractional> Same with function name?
edwardly has joined #ruby
<dsferreira> havenwood: that is the current design. But we aim to use the same instance variable in the classes we need it.
<DouweM> Fractional: yup
panchiniak has quit [Ping timeout: 272 seconds]
<shevy> Fractional try to be as short as possible when possible
<Fractional> Thanks guys! Really appreciate your help! :D
<shevy> the best code is the one that never has to be written
<dsferreira> havenwood: Plus we would like to get rid of the type variable argument somehow.
<Uranio> xD
<shevy> of course you may miss out on features but features can also bring in bugs
mando has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
<dsferreira> havenwood: The type argument will be common to all classes.
<havenwood> dsferreira: maybe consider having MyLib expose an `attr_reader @a, @b, @c` and instantiate A with `@b = my_lib.b`?
crazedpsyc has joined #ruby
<Uranio> alex__c2022: and both rubies are the same version? are also the same version racks?
mando_ has quit [Ping timeout: 248 seconds]
<alex__c2022> yea, i think i found the issue though... it's in the shebang
<dsferreira> havenwood: Then if you change the status of @b in let's say class A will it be propagated to the instance that is being handled in class C?
<alex__c2022> #!/usr/bin/env ruby VS #!/usr/bin/env ruby_executable_hooks
<alex__c2022> although it's the same version of thin :/
<Uranio> a mistery...
<havenwood> dsferreira: yes, if they're all referencing that same `my_lib.b`
<alex__c2022> This file was generated by RubyGems.
<alex__c2022> maybe ruby gems is to blame
<Uranio> alex__c2022: let me ask the stuip cuestion ot hte day: "did you tried to reinstall it?"
<dsferreira> haven wood. Ok. Then we would have to pass my_lib to all the classes.
atraylen has joined #ruby
<havenwood> dsferreira: hm, yes
<alex__c2022> Uranio: yes
* Uranio alex__c2022 sorry the typos
<dsferreira> havenwood, but that would not be a problem I guess.
<alex__c2022> Uranio: tried reinstalling and tried upgrading to latest
yfeldblum has joined #ruby
MattStratton has joined #ruby
zcreative has joined #ruby
em0ral has joined #ruby
<dsferreira> havenwood, Let me update the code to see if you agree with the solution.
<Uranio> I guest he problem shall only fall on the ruby_executable_hooks
yfeldblum has quit [Remote host closed the connection]
sassamo has joined #ruby
brian____ has quit [Quit: brian____]
<alex__c2022> seems like it
<havenwood> dsferreira: i really don't know, heh - afraid i'm missing too much context to be helpful yet
Doc_IX is now known as Doc_X
brian____ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
cj3kim has quit [Remote host closed the connection]
<dsferreira> havenwood: What do you think? https://gist.github.com/dsferreira/8585681
emptymag00 has joined #ruby
camilasan has joined #ruby
blandflakes has quit [*.net *.split]
uzo has quit [*.net *.split]
LastWhisper has quit [*.net *.split]
LiohAu has quit [*.net *.split]
<nvll> What do you think it's better, rvm or rbenv?
yfeldblum has joined #ruby
<havenwood> nvll: chruby
sambao21 has joined #ruby
<griffindy> +1 chruby
mansi has joined #ruby
<nvll> for local development too?
hetre85 has joined #ruby
mansi has quit [Remote host closed the connection]
<havenwood> yup
vlad_starkov has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
<nvll> ok, I'll test it
Megtastique has joined #ruby
pu22l3r_ has joined #ruby
<havenwood> dsferreira: i just don't know, may be worth considering
<dsferreira> havenwood: I'm playing with it now.
<dsferreira> havenwood: Will you stay longer?
<dsferreira> havenwood: I will try to revert to you ASAP. Thanks.
yfeldblum has quit [Remote host closed the connection]
<havenwood> just eating lunch, i'm around
<dsferreira> havenwood: ok, cheers
danijoo has quit [Quit: Leaving...]
cong has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
aspires has joined #ruby
ctp_ has joined #ruby
ctp_ has quit [Client Quit]
jonah has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 252 seconds]
dblessing has quit [Quit: dblessing]
Hanmac has quit [Ping timeout: 272 seconds]
<cong> i need openssl but it won't compile until it find native_thread.h
<cong> NMAKE : fatal error U1073: don't know how to make '/thread_native.h'
<Uranio> locate native_thread.h
<cong> oh and i'm compiling for ruby-2.1 on mswin32
adi3009 has joined #ruby
<Uranio> ups...
tvw has joined #ruby
<Uranio> you will need god's help
<cong> ah okay
<cong> no one seems to know any of these things but yet these things seem to get in somehow
aspires has quit [Read error: Connection reset by peer]
ctp has quit [Ping timeout: 272 seconds]
Hanmac has joined #ruby
aspires has joined #ruby
<Uranio> please, still traying, native_thread.h must be in some where insde the whatever would be windows compiler, so try to put it more close
<Uranio> I guest it is in a diferent dir where normally shall be
kevinykchan has quit [Read error: Connection reset by peer]
Hanmac1 has quit [Ping timeout: 265 seconds]
kevinykchan has joined #ruby
carraroj has joined #ruby
Hanmac1 has joined #ruby
timonv has joined #ruby
g0bl1n has quit [Ping timeout: 272 seconds]
tvw has quit [Client Quit]
tvw has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
jailbot has quit [Remote host closed the connection]
allaire has joined #ruby
vlad_starkov has joined #ruby
tehgeek has joined #ruby
RaCx has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
shaunbaker has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<tehgeek> Hey all, experienced C programmer here, not nearly as experienced with Ruby. This question might seem very stupid...(cont'd)
* Jason muches popcorn
<Jason> haha
<tehgeek> ...I would like to define a list of exit codes with readable names, without having to write the integer values themselves (these are boilerplate stuff, and manually having to write them out has no place in a modern-day, high-level language, IMHO). In C I would just create an "enum" starting at 1...
francisfish has quit [Remote host closed the connection]
<tehgeek> but there seems to be no equivalent in Ruby, at least not built-in. Any thoughts on what would be the best way to go about this? I can't seem to find much help on the Googles, oddly enough. This seems to me like it should be a pretty fundamental thing.
Megtastique has quit []
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adi3009 has quit [Quit: Textual IRC Client: www.textualapp.com]
ebetancourt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DouweM> tehgeek: use constants or a Symbol to Integer hash
kevinykchan has quit [Read error: Connection reset by peer]
<cong> oh i know. 5.times do |e| define_const names.shift, e; end something like that
<tehgeek> DouweM: Right, but can I do this without having to type all the numbers into the code?
kevinykchan has joined #ruby
<DouweM> right, Ruby does not have any built in structure for a C-style enum with automatically incremented integer values. you could hack something like it like cong proposes
Megtastique has joined #ruby
jailbot has joined #ruby
vlad_starkov has joined #ruby
<waxjar> [:succes, :reason_one, :reason_two].index(:reason_one) ?
<tehgeek> hmm, that seems like a reasonable idea, so I could make an object called "names" containing the names, then loop through defining them
mansi has joined #ruby
<havenwood> >> Hash[1.upto(3).zip [:ok, :omgwtfbbq, :flying]]
<eval-in> havenwood => {1=>:ok, 2=>:omgwtfbbq, 3=>:flying} (https://eval.in/94437)
<DouweM> waxjar: hah, that's pretty nice. Hadn't even thought of that
<tehgeek> waxjar: ahh, I like that one :) makes success equal to 0
<tehgeek> think I'll go with that, thanks :)
<tehgeek> eval-in: that still runs into my "have to write the integer values for every exception into the code" complaint
Hobogrammer has joined #ruby
ckinni has joined #ruby
<DouweM> eval-in is a bot; havenwood wrote the code that triggered eval-in's response ;)
<havenwood> tehgeek: ah, just getting what you meant
nanoyak has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Read error: Connection reset by peer]
mando has joined #ruby
clamstar is now known as rx
jlast_ has quit [Remote host closed the connection]
asmodlol has quit [Remote host closed the connection]
jlast has joined #ruby
<tehgeek> DouweM: oh lol
<tehgeek> oops
tauebel has joined #ruby
chipotle_ has joined #ruby
bradhe has joined #ruby
jlast has quit [Read error: Connection reset by peer]
jlast has joined #ruby
x1337807x has joined #ruby
timonv has quit [Remote host closed the connection]
ffranz has quit [Ping timeout: 245 seconds]
Kabaka has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
jlast has quit [Remote host closed the connection]
chipotle has quit [Ping timeout: 245 seconds]
chipotle_ has quit [Remote host closed the connection]
afhammad has joined #ruby
jlast has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
binw_ has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
mikesplain_ has joined #ruby
mikesplain has quit [Ping timeout: 252 seconds]
mikesplain_ is now known as mikesplain
vlad_starkov has quit [Remote host closed the connection]
tauebel has quit [Ping timeout: 245 seconds]
tauebel1 has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
Kabaka has joined #ruby
_Andres has joined #ruby
Squarepy has quit [Quit: Leaving]
top4o has joined #ruby
x1337807_ has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
atraylen has quit [Ping timeout: 240 seconds]
danshult_ has joined #ruby
<shevy> hmm Hanmac1
yalue has quit [Quit: Leaving]
binw has joined #ruby
x1337807_ has quit [Client Quit]
x1337807x has quit [Ping timeout: 272 seconds]
tauebel1 has quit [Ping timeout: 245 seconds]
DaniG2k has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
benzrf has joined #ruby
Rix has quit [Ping timeout: 252 seconds]
<benzrf> rubies!
claymore has joined #ruby
smathieu has joined #ruby
Lewix has quit [Remote host closed the connection]
mlpinit_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
postmodern has left #ruby ["Leaving"]
skaflem has quit [Quit: Leaving]
<shevy> hey benzrf
mlpinit has joined #ruby
<shevy> are you actually working on projects
<shevy> :)
mercwithamouth has joined #ruby
<benzrf> nope =D
niklasb has quit [Ping timeout: 272 seconds]
jonah has joined #ruby
simoz7 has joined #ruby
DaniG2k has quit [Ping timeout: 272 seconds]
achru has joined #ruby
Uranio has quit [Quit: WeeChat 0.3.2]
w4pm has joined #ruby
iamdoo2 has joined #ruby
Czupa has quit [Remote host closed the connection]
iamdoo2 has quit [Read error: Connection reset by peer]
iamdoo2 has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
deception has quit [Quit: Goodbye]
Txandy is now known as Txandy|away
Matriks has quit [Read error: Connection reset by peer]
Matriks has joined #ruby
ndrei has joined #ruby
<bnagy> fascinating
mityaz has quit [Quit: See ya!]
<bnagy> (scrollback, not benzrf)
<shevy> lol
<shevy> amazing
<shevy> (the world, not benzrf)
mikepack_ has quit [Remote host closed the connection]
danshult_ has quit [Remote host closed the connection]
heftig has joined #ruby
danshultz has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<bnagy> tehgeek: what are you actually trying to do, btw?
standyro1 has quit [Ping timeout: 248 seconds]
momomomomo has joined #ruby
<MrZYX> tehgeek: ^ - I can't come up with something where exit codes in ruby would make sense
<bnagy> right
DaniG2k has joined #ruby
<bnagy> apart from at exit.. and those exit codes are 'normal' ones
<tehgeek> MrZYX: What? Surely I'm misinterpreting you. An exit code from a terminated program in general can be very useful
<tehgeek> MrZYX: Doesn't matter what language the thing is written in
ndrei has quit [Ping timeout: 240 seconds]
<MrZYX> ah, process exit codes. I guess I just don't write complex enough CLI applications
<benzrf> hah
<bnagy> you can signal handle, although not very well, and exit(status) afaik
heidi has joined #ruby
<tehgeek> If it's a thing with multiple possible failure points, and is a single piece of a large, many-process system, a distinct exit code for every possible failure point is invaluable
SHyx0rmZ has quit [Ping timeout: 240 seconds]
<waxjar> exit for success, exit 1 for no success :p
<bnagy> INVALUABLE BY JOVE
<tehgeek> Such as in our case...I work for LROC (Lunar Reconnaissance Orbiter Camera) team, where we have a huge processing pipeline that takes images of the lunar surface and runs them through all kinds of different massagers, all automated
<tehgeek> if something goes wrong and there's no exit code, who knows what the hell happened
<tehgeek> and some of those pieces are written in Ruby :)
danshultz has quit [Ping timeout: 245 seconds]
<waxjar> ruby goes to space!
<tehgeek> waxjar: "1" is not an informative enough message when there are a million things that can go wrong over a many-process course of automatic activity :P
Rix has joined #ruby
nanoyak has joined #ruby
<cong> hehehe it's compiling.
<bnagy> properly designed ruby will rarely just die for more than one reason
mneorr_ has joined #ruby
<bnagy> in fact you can pretty much ensure that to be the case
charliesome has joined #ruby
<bnagy> so, there are at_exit{} blocks, but ime they never run IRL
<shevy> future robots exploring the universe will be written in RRuby
<shevy> RobotRuby
<bnagy> so yeah, you can trap all the normal signals, and you can exit with an int as a status, if you like
mrchris has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
<bnagy> the rest is better done with exception handling
wtfitsme has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
<benzrf> shevy i am sure that by that time we will be using much nicer languages than ruby
<mrchris> Hi All. I have the text within the body tags of a html document and I need a way to split the document into 2 halfs without splitting it in the middle of another element. Can anyone think of a way?
achru has quit []
Txandy|away is now known as Txandy
mlpinit has joined #ruby
DaniG2k has quit [Quit: leaving]
SHyx0rmZ has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
<MrZYX> why do you need to split in half? what's the underlying problem?
mneorr has quit [Ping timeout: 245 seconds]
<shevy> benzrf who will design these languages?
Xeago has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
sparrovv has joined #ruby
<benzrf> shevy: who knows
fede_ has quit [Ping timeout: 272 seconds]
<mrchris> MrZYX: I need to embedd the beginning of the document within the div of another html document. Splitting the html at a random point causes the HTML on the page to go screwy.
blackmesa has joined #ruby
kevinykchan has joined #ruby
<tehgeek> bnagy: I still don't get what you're trying to say about Ruby, specifically. In a many-process automated pipeline with numerous potential failure points, where if something goes wrong, we want it to stop so we can investigate, exit codes are very useful. It doesn't matter what language the thing is written in
alex88 has joined #ruby
<shevy> benzrf will it be you :D
<MrZYX> mrchris: I think I'd try to first parse it with Nokogiri or something
pu22l3r_ has quit [Ping timeout: 272 seconds]
<bnagy> I'm saying that that's a unix overall process design, not a ruby design
rezzack has quit [Ping timeout: 272 seconds]
zeade has joined #ruby
<mrchris> MrZYX: that's what I was thinkning
<bnagy> if ruby people built such a thing no process would ever exit
MattStratton has quit [Ping timeout: 252 seconds]
<benzrf> shevy: probably not
<benzrf> shevy: maybe
<benzrf> who knows
<bnagy> errors would be propagated oob somehow
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
maletor has quit [Ping timeout: 272 seconds]
justsee has joined #ruby
justsee has joined #ruby
<bnagy> so I have no real beef with a unixy pipeline, but in that case just use exit(n)
<shevy> benzrf lol you gave 3 different answers...
<bnagy> just saying, no ruby people would do it that way, which is why everyone is looking at you funny
<benzrf> shevy: TIMTOWTAI
justsee has quit [Client Quit]
<bnagy> like I do massive pipeline-based distributed processing of stuff for a living
<bnagy> but I have never used an exit code ever
iMe has quit [Quit: Bye Bye]
ctp has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
Xeago has quit [Ping timeout: 264 seconds]
<tehgeek> bnagy: Problem with just doing exit(n) is that if you're editing some ruby code and you want to throw in another exit(n), but you've got an exit(20) above your section and there's an exit(21) down below, now you need to write exit(22) and it just gets helter-skelter
<bnagy> and again, I emphasise that I don't think your approach is wrong or bad, just non-ruby
<bnagy> exit is exit. There Can Be Only One
<tehgeek> bnagy: Also, keep in mind I'm not really a Ruby guy, I'm much more of a C guy, I'm just stuck editing some Ruby code atm :) (not that that's a bad thing, I *really* love a lot of what little I've seen of the language)
rezzack has joined #ruby
<cong> i'm getting a LoadError: 5: Access is denied
<Nilium> Should just write all the Ruby in C.
MOZGIII has joined #ruby
<dsferreira> havenwood: This is the result of my play: https://gist.github.com/dsferreira/8585681
mrchris has quit [Ping timeout: 245 seconds]
rayners has quit [Ping timeout: 272 seconds]
devinus_ is now known as devinus
<dsferreira> It's working like a sharm. Cheers.
mikepack has quit [Remote host closed the connection]
syamajala has joined #ruby
LastWhisper has joined #ruby
<tehgeek> Nilium: Haha, I wouldn't mind, if it weren't for the time it would take to reinvent the wheel, we already have this code, and it does a lot :P
<havenwood> dsferreira: nice ;)
<Nilium> Well, there's the C API.
Squarepy has joined #ruby
maletor has joined #ruby
<dsferreira> havenwood, Very good indeed. Thanks for the hint. Sometimes the best solutions are the easiest ones.
rayners has joined #ruby
end_guy has joined #ruby
rootshift has joined #ruby
asteros has joined #ruby
<bnagy> tehgeek: so.. you're talking about killing a ruby process by signal, right?
<bnagy> like something bad has happened somewhere and you want to shut everything down?
centrx has joined #ruby
araujo has joined #ruby
<tehgeek> bnagy: Not by signal, no. Let's say we're trying to process an image and something went wrong in the database, like maybe the footprint coordinates don't look good. Time to abort and notify the ops team. Or maybe we're having trouble reading a file we need to be able to read, so we abort and notify ops.
dunckr has joined #ruby
<tehgeek> But we like to be able to distinguish between those problems.
<tehgeek> if I were designing this from the ground up, my guess is the "Ruby way" would be to just send an exception string
<tehgeek> which sounds fine to me
<tehgeek> the problem is
<tehgeek> this is an already existing setup, and the ops team is used to exit codes that signify things, and we don't want to change it :P
<tehgeek> otherwise I would
<tehgeek> :P
vlad_starkov has joined #ruby
alex88 has quit [Quit: Leaving...]
prc has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
havenn has joined #ruby
mark_locklear has quit [Ping timeout: 252 seconds]
<bnagy> maybe just define a bunch of useful exceptions MyExcept < StandardError, handle the ones you can
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> and then in your toplevel handler look the class up in a hash, get a code and exit with it for anything that's considered unrecoverable
mavcunha has quit [Quit: Computer has gone to sleep.]
simoz7 has quit [Ping timeout: 272 seconds]
* Nilium can't quite figure out why his 3D math gem has more downloads than his GLFW 3 bindings gem
burlyscudd has quit [Quit: Leaving.]
<bnagy> are you threaded ( because that makes it slightly more complicated )
mneorr_ has quit [Remote host closed the connection]
standyro1 has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
simoz7 has joined #ruby
mneorr has joined #ruby
emptymag00 has quit [Ping timeout: 272 seconds]
<tehgeek> bnagy: I just ended up going with the "hash that translates to integer" idea, I put the whole hash at the top of the code in an easy to find, unified spot, and gave them all meaningful names (as symbols) for later in the code. I liked waxjar's idea better, but that wasn't going to work because the exit codes in this thing start at 60 for some unearthly reason, and we want to keep it the same for the ops :P
<bnagy> anyway I guess my suggestion is to stick with exceptions and only convert to a status at the last possible moment
mneorr has quit [Remote host closed the connection]
<tehgeek> by "ops" I mean the people who actually deal with the spacecraft instrument and the images it sends back, and know nothing about good software practices :)
mneorr has joined #ruby
<bnagy> the good thing about using actual exceptions is that you can map more than one exception to a single status
<tehgeek> bnagy: Again, would gladly do that if that would work for our ops team, :P
w4pm has quit [Ping timeout: 245 seconds]
<bnagy> I don't see a problem? They get a status
Fractional has quit [Quit: Leaving]
sailias has quit [Read error: Operation timed out]
<bnagy> I'm proposing just using rubyish handling until you determine a problem is definitely fatal, then looking up an exception class
<tehgeek> bnagy: They want to get the same statuses they've always gotten
<bnagy> cause the class is an object
<bnagy> no worries
<bnagy> just a matter of writing the hash
brian____ has quit [Quit: brian____]
mikepack has joined #ruby
<bnagy> {BadCheeseColorError => 62}
kpshek has quit []
<tehgeek> bnagy: Right, but at that point, I've already written a hash and we don't really have a use for the exceptions (although I acknowledge they might be a lot better, objectively) because we've already got statuses, and the ops want their status codes no matter what
<waxjar> i think what bnagy means is rescue any exceptions from "main" and map them to an exit code in the rescue block
<tehgeek> so exceptions would just be extra shit
<bnagy> blah blah rescue; exit(lookup[$!.class])
bradhe has joined #ruby
<waxjar> instead of using exit codes within your objects
alex88 has joined #ruby
<bnagy> so you don't have to contort your exception handling until you know it's time to throw your toys out of the pram anyway
arkiant has joined #ruby
po10 has quit [Ping timeout: 272 seconds]
Hanmac has joined #ruby
Virtualize|away has quit [Quit: Leaving...]
coderhs has quit [Ping timeout: 252 seconds]
<havenn> >> exit_codes = [:ok, :mooninites, :dust]; Hash[exit_codes.zip(60.upto(60 + exit_codes.size.pred))]
<eval-in> havenn => {:ok=>60, :mooninites=>61, :dust=>62} (https://eval.in/94460)
<havenn> tehgeek: ^
zoidberg- has joined #ruby
<zoidberg-> Hello, can someone explain what this line of code is doing for me: output = contents.gsub(/[^ \n]+/) do |word| ?
<tehgeek> havenn: Hm, that's also not a bad idea, but the code is clunkier than I feel it should have to be :P of course, the ultimate problem is the ops demanding their 60-and-up codes for whatever dumb reason
einarj has joined #ruby
<tehgeek> :P
standyro1 has quit [Ping timeout: 252 seconds]
<bnagy> zoidberg-: it's gsub with a replacement block instead of a static replacement string
<tehgeek> anyways, thanks all, I think I'm just gonna stick with what I've ended up on and move forward, this shit's gotta get done, as much as I'd like to spend all the time in the world coming up with the best possible code
<waxjar> zoidberg-: it replaces the part that matches the regexp with the result of the block in whatever contents is
<tehgeek> :P
<tehgeek> thanks again all :)
yfeldblum has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
IceyEC has quit [Remote host closed the connection]
<zoidberg-> I meant specifically what does the regex itself do?
nathancahill has quit [Quit: nathancahill]
kpshek has joined #ruby
<waxjar> matches any sequence of characters that's not a space or a newline
yfeldblu_ has joined #ruby
<waxjar> you might want to replace that with \S+
allaire has quit []
MOZGIII has left #ruby [#ruby]
phansch has quit [Ping timeout: 272 seconds]
ctp has quit [Quit: Leaving...]
emptymag00 has joined #ruby
Hanmac1 has joined #ruby
phansch has joined #ruby
kaldrenon has quit [Remote host closed the connection]
arkiant has quit [Quit: Saliendo]
Hanmac has quit [Ping timeout: 264 seconds]
Hanmac has joined #ruby
jkamenik has quit [Quit: Leaving.]
jedimind has quit [Quit: home time]
po10 has joined #ruby
benzrf has left #ruby [#ruby]
Hanmac1 has quit [Ping timeout: 245 seconds]
mikepack has quit [Remote host closed the connection]
Matriks has quit [Remote host closed the connection]
<cong> LoadError: 5: Access is denied. - c:/Lang/ruby-2.1/lib/ruby/site_ruby/2.1.0/i386-msvcr100/openssl.so what's going on? it has the same access as zlib. zlib has no problem so why does this?
burlyscudd has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
rudisimo has quit []
syamajala has quit [Quit: leaving]
<bnagy> can you File.binread the file from irb?
aryaching has quit [Read error: Connection reset by peer]
<cong> how do i remove a ext/lib? do i just remove the files from ruby\lib\ruby\site_ruby\2.1.0
<cong> sure can
<bnagy> huh. That's weird then :)
<bnagy> could be just a crap exception
coderhs has joined #ruby
<bnagy> I have had stuff before that wouldn't load because of wrong arch / ABI whatever and got misleading exceptions
<cong> but if you do that from irb, irb prints out the entire contents of the file and that can take some time
x1337807x has joined #ruby
<bnagy> yeah just saying if you can binread it then it's probably not actually access denied
alex__c2022 has left #ruby [#ruby]
<bnagy> also, it looks like you're trying to compile openssl for ruby 2.1 on windows. XD
<bnagy> lots of luck with that
ndrei has joined #ruby
<bnagy> you should get in touch with the ruby installer guys
<bnagy> if you continue to not be able to fix it, anyway
coca_rails has joined #ruby
zcreative has quit [Ping timeout: 252 seconds]
MOZGIII has joined #ruby
<cong> maybe i should compile openssl from source. i've been hold back because you need perl to compile from souces.
MOZGIII has left #ruby [#ruby]
x77686d has joined #ruby
x77686d has quit [Client Quit]
<bnagy> you might be able to just gank a binary lib from a previous rubyinstaller, as well
<bnagy> or is that what you're already doing?
x77686d has joined #ruby
danshultz has joined #ruby
x77686d has left #ruby [#ruby]
standyro1 has joined #ruby
<cong> i'm using pre-built openssl binary and building the ruby openssl library with that
camilasan has quit [Ping timeout: 260 seconds]
zcreative has joined #ruby
iamdoo2 has joined #ruby
phat4life has joined #ruby
<phat4life> in irb
<phat4life> ("1." + "1" * 100000000).to_d will kill your system
<phat4life> but ("1." + "1" * 100000000).to_f wont
<bnagy> ok, anyway that's all the ideas I have, sorry. I'm Against MRI on windows anyway
<cong> against or everything is hard on windows
<bnagy> well jruby is super easy
<cong> and everything is so much easier on unix-like systems
<phat4life> yeah but windows has direct x
Shidash has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
<shevy> :(
<shevy> but ... but ... but ...
<shevy> linux has xorg!
<bnagy> XD
craigp has quit [Remote host closed the connection]
<shevy> cong what windows do you use?
Cooler_ has joined #ruby
<shevy> because it may be that since win 7 windows filesystem could lie to you
iamdoo2 has quit [Ping timeout: 245 seconds]
<phat4life> if my DAW's worked natively in linux, i would ditch mac os and windows
<shevy> like that damned TrustedInstaller being a pain in the
<phat4life> buy audio sucks in linux
Hanmac has quit [Ping timeout: 260 seconds]
<phat4life> *but
<shevy> phat4life \o/
<shevy> I use mplayer! And I destroy pulseaudio when I find it!
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy> but yeah audio is strange
<phat4life> i mean like, audio production
<shevy> ohhhh
<phat4life> there is an open soure daw for linux
xplot has joined #ruby
<shevy> gimp sucks for image production too
<phat4life> but i couldn't get it to compile so i have up
<phat4life> *gave
<shevy> open source daw hmm
<shevy> ardour?
<phat4life> yeah that is the one
Columcille has joined #ruby
<phat4life> there is a ubuntu distro that has it i believe
<cong> shevy, (22:37:13)<shevy>cong nah you were not, you said it is not there, I know it is there - sorry, someone else has to help you
Vivekananda has joined #ruby
w4pm has joined #ruby
VTLob has quit [Quit: VTLob]
Megtastique has quit []
po10_ has joined #ruby
spyderman4g63 has quit []
<phat4life> type ("1." + "1"*1000000).to_d in irb i dare you
<shevy> cong yeah you should factor in that windows can lie to you
mikepack has joined #ruby
<shevy> cong it is 100% there
iMe has joined #ruby
fschuindt has joined #ruby
oddover__ has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
yfeldblu_ has quit [Remote host closed the connection]
phat4life has quit [Quit: Leaving.]
<bnagy> >> ("1." + "1"*1000000).to_d
<eval-in> bnagy => undefined method `to_d' for #<String:0x41daa444> (NoMethodError) ... (https://eval.in/94467)
<apeiros> you need bigdecimal/util
<havenn> and bigdecimal
po10 has quit [Ping timeout: 252 seconds]
<havenn> but if you want to run out of memory easier to just: ('1' * 1_000_000_000).to_i
<apeiros> this may come as a surprise havenn, but bigdecimal/util loads bigdecimal too…
<havenn> apeiros: wha
<havenn> since when?
tannerburson has quit [Quit: tannerburson]
<apeiros> or just the constant…
<havenn> just the constant
<apeiros> funky
havenn is now known as havenwood
<apeiros> I retract my snark and put ash on my head
<havenwood> :P
<freezey> so if i was going to read a yaml file with YAML::load(File.read('filename.yml') and wanted to take the keys and values and use them in another script after including the method i created.. how could i go about doing that?
dangerousdave has quit []
<bnagy> use load_file, btw, it's what it's for
<apeiros> and don't use :: for method calls, srsly
Hanmac has joined #ruby
<apeiros> freezey: Kernel#require and Kernel#load are used to load code from other files
claymore has quit [Quit: night]
orionstein is now known as orionstein_away
octoberry has joined #ruby
simoz8 has joined #ruby
<shevy> freezey YAML.load_file() is much cleaner
<freezey> yeah i just swapped it to that
<freezey> much cleaner
<shevy> \o/
<freezey> thanks
<freezey> heh
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> I used what you did there too 5 years ago
Hanmac1 has quit [Ping timeout: 252 seconds]
<shevy> because the tutorials showed that as first example
iMe has quit [Quit: Bye Bye]
<freezey> yeah basically
<shevy> YAML::load(File.read())
<freezey> yep
<shevy> YAML.load_file()
phansch has quit [Quit: Leaving]
<freezey> so it reads the file and outputs it which is nice. now its just assigning the keys.. so if the yaml is like something: "value" how would you be able to call define(value)
craigp has joined #ruby
Wolland has joined #ruby
sparrovv has quit [Remote host closed the connection]
jailbot has quit [Read error: Connection reset by peer]
simoz7 has quit [Ping timeout: 252 seconds]
jailbot has joined #ruby
<bnagy> if it's a yaml'd Hash then hsh = YAML.load_file "foo.yml"; hsh['blah'] => value for 'blah'
Megtastique has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<freezey> yeah
<shevy> freezey when you load that dataset, you basically have ruby data structures available
<shevy> in a yaml file:
afhammad has quit []
jailbot has quit [Remote host closed the connection]
<shevy> - foo
<shevy> - bar
<shevy> should be an array, in ruby ^^^
<shevy> and it is returned from the YAML.load_file('bla.yml') action
<freezey> cool
<shevy> so basically it is as if you would have used pure ruby
<freezey> thanks
<freezey> ok cool yeah let me toy around with this
<shevy> unless there are encoding problems :)
<shevy> like yaml files must be in UTF
nathancahill has joined #ruby
sparrovv has joined #ruby
<shevy> my yaml files are in some ISO encoding which makes psych cries
<shevy> *cry
duggiefresh has quit [Remote host closed the connection]
dunckr has quit []
<Hanmac> shevy YAML.load_file wants utf8, use YAML.load instead
Mars__ has joined #ruby
<shevy> huh
phracker has joined #ruby
<shevy> Hanmac that will ignore the encoding?
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jerius has quit []
octoberry has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
Mars__ is now known as Mars`
<Xuisce> shevy: hi
<Xuisce> wassup
<Xuisce> im gonna start Ruby this weekend
<Xuisce> :)
coca_rails has quit [Remote host closed the connection]
bradhe has joined #ruby
<centrx> Do it now!
niklasb has joined #ruby
rayners has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 252 seconds]
klaut has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
brian____ has joined #ruby
MOZGIII has joined #ruby
banjara has quit [Quit: Leaving.]
MOZGIII has left #ruby [#ruby]
doodlehaus has quit [Remote host closed the connection]
griffindy has quit [Quit: Computer has gone to sleep.]
brian____ has quit [Client Quit]
yfeldblum has quit [Ping timeout: 272 seconds]
brian____ has joined #ruby
aryaching has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
banjara has joined #ruby
Hanmac has joined #ruby
coca_rails has joined #ruby
klaut has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
fijimunkii has quit [Ping timeout: 240 seconds]
Al__ has joined #ruby
rx has quit [Quit: Computer has gone to sleep.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SCommette has quit [Quit: SCommette]
jonah_ has joined #ruby
ktosiek has quit [Ping timeout: 245 seconds]
jonah has quit [Ping timeout: 272 seconds]
freezey has quit [Remote host closed the connection]
x1337807x has joined #ruby
zxq9 has joined #ruby
mikepack has quit [Remote host closed the connection]
mikesplain has quit [Ping timeout: 240 seconds]
<apeiros> ah, too bad phat4live has left… wanted to tell him that what kills his irb is the inspect…
_HolyCow1 has joined #ruby
ner0x has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
mansi has quit [Quit: Leaving...]
xplot has quit [Ping timeout: 245 seconds]
araujo has quit [Read error: Connection reset by peer]
Underbyte has joined #ruby
Guest22852 is now known as Martxel
Al__ has joined #ruby
Martxel has quit [Changing host]
Martxel has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
Morrolan_ has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
<cong> >>> puts RbConfig.ruby + " " + RbConfig::CONFIG['build_os']
<eval-in> cong => /tmp/execpad-14203916f68b/source-14203916f68b:2: syntax error, unexpected '>' ... (https://eval.in/94473)
Morrolan has quit [Quit: Time for my winter sleep]
Morrolan_ is now known as Morrolan
danman has quit [Quit: danman]
<cong> >> puts RbConfig.ruby + " " + RbConfig::CONFIG['build_os']
<eval-in> cong => /execpad/interpreters/ruby-2.1.0/bin/ruby linux-gnu ... (https://eval.in/94474)
baordog has quit [Remote host closed the connection]
_HolyCow has quit [Ping timeout: 272 seconds]
rx has joined #ruby
mojjojo has joined #ruby
mavcunha has joined #ruby
jonah has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lmickh has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
tauebel has joined #ruby
tedstriker has joined #ruby
havenwood has joined #ruby
jonah_ has quit [Ping timeout: 272 seconds]
tedstriker has quit [Client Quit]
max96at has quit [Quit: Textual IRC Client: www.textualapp.com]
cj3kim has joined #ruby
_HolyCow1 has quit [Read error: Connection reset by peer]
tedstriker has joined #ruby
<cong> i wonder why this without "ruby" as the first word never works: ruby extconf.rb --with-openssl -dir=c:\lang\lib\openssl
magoo has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
Kricir__ has joined #ruby
_HolyCow has joined #ruby
<cong> i have windows configured to open .rb files with ruby.
<centrx> Winblows
relix has joined #ruby
MrZYX is now known as MrZYX|off
po10_ is now known as po10
RoxasShadowRS has quit [Quit: Leaving]
alex88 has quit [Quit: Leaving...]
nateberkopec has quit [Quit: Leaving...]
havenwood has quit [Client Quit]
charliesome has joined #ruby
yasushi has joined #ruby
jailbot has joined #ruby
thesheff17 has quit [Ping timeout: 272 seconds]
ktun has quit [Remote host closed the connection]
aryaching has quit []
_HolyCow has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
Drewch has joined #ruby
jobewan has quit [Quit: Leaving]
burlyscudd has quit [Quit: Leaving.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cong> i'm on the last step compile then install.
charliesome has quit [Ping timeout: 265 seconds]
lkba has joined #ruby
ZKM has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 272 seconds]
<cong> same error
v0n has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
<shevy> cong the -dir option is valid? seems to be odd to have only one - and only one \ or :
Speed has joined #ruby
habanany has joined #ruby
dkamioka has joined #ruby
aspires has quit [Remote host closed the connection]
Al__ has quit [Read error: Connection reset by peer]
dkamioka has quit [Remote host closed the connection]
<cong> that got chopped off. the full part is --with-openssl-dir=c:\lang\lib\openssl
Sl1mper has joined #ruby
Al__ has joined #ruby
aspires has joined #ruby
rx has quit [Ping timeout: 272 seconds]
aspires has quit [Remote host closed the connection]
Kricir__ has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
lkba has quit [Read error: Connection reset by peer]
AndChat| has joined #ruby
jhn has joined #ruby
habanany has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
_HolyCow has joined #ruby
craigp has quit [Remote host closed the connection]
Sl1mper has left #ruby [#ruby]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
tauebel has quit [Quit: Leaving.]
einarj has quit [Remote host closed the connection]
maximveksler has quit [Quit: maximveksler]
shaunbaker has quit [Remote host closed the connection]
<cong> okay i have permission but only if i run it as an admin and even if i manage that i have another problem: ordinal 255 could not be located in the dynamic link library ssleay32.dll
havenwood has joined #ruby
kpshek has quit []
meatherly has quit [Ping timeout: 248 seconds]
Hanmac1 has joined #ruby
bambuka has quit [Quit: Saliendo]
tauebel has joined #ruby
relix has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
burlyscudd has joined #ruby
duggiefr_ has joined #ruby
motto has quit [Quit: Sto andando via]
afhammad has joined #ruby
devinus has quit []
Squarepy has quit [Quit: Leaving]
Es0teric has joined #ruby
mando has quit [Remote host closed the connection]
geggam has quit [Remote host closed the connection]
mando has joined #ruby
centrx has quit [Quit: Leaving]
klaas has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 240 seconds]
sethen has joined #ruby
klaas has joined #ruby
Shidash has joined #ruby
chiel has quit [Ping timeout: 272 seconds]
tedstriker has quit [Ping timeout: 245 seconds]
chiel has joined #ruby
nifty has quit [Ping timeout: 265 seconds]
mando has quit [Ping timeout: 272 seconds]
lethjakman has quit [Quit: WeeChat 0.4.0]
aryaching has joined #ruby
alexfreidah has quit [Ping timeout: 245 seconds]
<cong> maybe i should use something else for this script, perl or tcl/tk. i have those. it's a simple script. the website is strict and wants to use https. i wouldn't need openssl if i was using plain net/http.
Virtualize|away has joined #ruby
aryaching has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mando has joined #ruby
<atmosx> cong: whats the prob?
Virtualize|away has quit [Client Quit]
<cong> openssl
<atmosx> oh thag bugger
RaCx has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
coca_rails has quit [Remote host closed the connection]
<workmad3> cong: do you know that you'd have more success getting ssl support built into perl?
RaCx has joined #ruby
<workmad3> cong: and does a pre-built ruby binary for windows not come with suitable openssl bindings?
falood has joined #ruby
snath has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
nateberkopec has joined #ruby
bradhe has joined #ruby
jhn has quit [Ping timeout: 272 seconds]
dodosan has joined #ruby
mlpinit has quit [Remote host closed the connection]
jtdowney has quit []
mary5030 has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
subbyyy_ has quit [Ping timeout: 245 seconds]
dodosan has quit [Read error: Connection reset by peer]
twopoint718 has joined #ruby
<RubyPanther> cong: You should be able to use the ruby one-click and then their devkit, and be ready to install "everything" including native C extensions in most cases
<cong> for ruby i want to build everything myself. one reason i want to build myself is i get ri documentation not those awful .chm files. another is rubyinstaller doesn't go upto 2.1.0. another i want to cut down on freeware.
dodosan has joined #ruby
apeiros has joined #ruby
subbyyy_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Shidash has quit [Read error: Connection reset by peer]
tvw has quit []
jlast_ has joined #ruby
<RubyPanther> For example I run a Gtk+ client on windows that way, that I dev on linux, and it can compile everything
<Hanmac1> RubyPanther: one day i will test if my C++ ext bindings works with windows ;P
<RubyPanther> Why would anybody need 2.1.0?
Hanmac1 is now known as Hanmac
<RubyPanther> Hanmac: I was almost surprised when mine installed without fiddling
nateberkopec has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 248 seconds]
<cong> starting from 2.1.0 i'm building my own rubies.
aryaching_ has joined #ruby
<RubyPanther> AR working with SQL Server was another pleasant surprise
<twopoint718> Is there a name for the common Ruby idiom of using methods as values in other methods? https://gist.github.com/twopoint718/8589278
aryaching has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
blackmesa has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
lfox has quit [Quit: ZZZzzz…]
<RubyPanther> cong: sounds painful
Al__ has quit [Read error: Connection reset by peer]
Shidash has joined #ruby
<Hanmac> RubyPanther: like "it works, and i dont know why" - like the live of a Java Developer ;P
Al__ has joined #ruby
edwardly has quit [Ping timeout: 260 seconds]
aspires_ has joined #ruby
<cong> rubypanther, i have a working ruby installation. i have ruby to keep me company.
Shidash has quit [Read error: Connection reset by peer]
jlast has quit [Ping timeout: 245 seconds]
FL1SK has quit [Ping timeout: 252 seconds]
<RubyPanther> Hanmac: I'm just cynical about interoperability on windows, but with Ruby it is not bad
Al__ has quit [Client Quit]
aspires has quit [Read error: Connection reset by peer]
jlast_ has quit [Ping timeout: 252 seconds]
Txandy has quit [Quit: Leaving...]
Al__ has joined #ruby
<RubyPanther> cong: I thought you had a broken ruby install?
<workmad3> cong: my step to getting ruby working with windows: step 1 - download a linux distro; step 2 - burn a CD of it; step 3 - install linux from CD; step 4 - install ruby-install and a sane build chain
coca_rails has joined #ruby
senayar_ has quit [Ping timeout: 264 seconds]
dodosan has quit [Remote host closed the connection]
<workmad3> cong: it's up to you whether step 3 involves a VM or reformatting your drive ;)
orionstein_away is now known as orionstein
<RubyPanther> There is no reason to want 2.1.0. If it is on a server, you do want 2.0. But for regular purposes everything 1.9+ is the same
Al__ has quit [Client Quit]
Shidash has joined #ruby
<cong> RubyPanther, no it works but the openssl is broken. i have ubuntu 10.04 and i have ruby 1.8.7 on that. windos is my primary os so i will continue to work on that.
nanoyak has quit [Quit: Computer has gone to sleep.]
<RubyPanther> "it works except the parts that don't" == "doesn't work"
<cong> no it works
<RubyPanther> cong: people really do use oneclick + devkit for windows. Those are the versions that are available. They are good versions.
<cong> if one things doesn't work doesn't mean the whole things doesn't work
<bnagy> wait you're happy to run ubuntu 10 and ruby 1.8.7, but you're trying to hand compile unstable 2.1 ON WINDOWS?
<bnagy> you are insane
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
angusiguess has joined #ruby
mikepack has joined #ruby
jonah_ has joined #ruby
aryaching_ has quit [Ping timeout: 252 seconds]
<workmad3> cong: for me, openssl being borked == can't install gems == ruby essentially useless and definitely broken
<cong> ubuntu sucks and don't get me started on the spyware.
<RubyPanther> if the parts of the stdlib that you need for your requirements don't work, it basically works 0%.
<RubyPanther> oneclick will work 100%
<Hanmac> bnagy: i am insane and even i would not run 1.8.7 ;P