fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
davidboy has quit [Max SendQ exceeded]
randym has quit [Max SendQ exceeded]
lledet has joined #ruby
voodoofish430 has left #ruby [#ruby]
pvh has quit [Max SendQ exceeded]
phinfonet has quit [Quit: Leaving...]
patricksroberts has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby
jhowarth has quit [Max SendQ exceeded]
dotemacs has joined #ruby
SeanTAllen has joined #ruby
philcrissman has quit [Max SendQ exceeded]
franckverrot has joined #ruby
nateberkopec has joined #ruby
phinfonet has joined #ruby
patricksroberts has joined #ruby
davidboy has joined #ruby
octarine has joined #ruby
fflush has quit [Remote host closed the connection]
randym has joined #ruby
virunga has quit [Quit: Sto andando via]
Bofu has joined #ruby
bbhoss has joined #ruby
moeSeth has joined #ruby
justsee|away is now known as justsee
jrajav has joined #ruby
Hawklord has quit [Ping timeout: 276 seconds]
philcrissman has joined #ruby
pvh has joined #ruby
Bofu2U has quit [Ping timeout: 255 seconds]
<jrajav> >> dead_yet?
<al2o3cr> jrajav: ["NoMethodError: undefined method `dead_yet?' for main:Object"]
<jrajav> Yay
ianbrandt has quit [Quit: ianbrandt]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
fflush has joined #ruby
fflush has quit [Remote host closed the connection]
benson has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
luckyruby has joined #ruby
nari has quit [Ping timeout: 244 seconds]
paradoja has quit [Remote host closed the connection]
Taichou has joined #ruby
jhowarth has joined #ruby
Taichou_ has joined #ruby
SCommette has joined #ruby
Taichou has quit [Ping timeout: 245 seconds]
<crazed> if i have a module Foo::Bar, is there an easy way to get the direct parent? in this case Foo? i realize i can do some split magic, but was looking for something more elegant
SeanTAllen has quit [Max SendQ exceeded]
moshee has quit [Ping timeout: 248 seconds]
jjang has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dotemacs has quit [Max SendQ exceeded]
moeSeth has quit [Ping timeout: 245 seconds]
jhowarth has quit [Max SendQ exceeded]
philcrissman has quit [Ping timeout: 240 seconds]
aquaranto has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
randym has quit [Ping timeout: 245 seconds]
kapowaz has quit [Ping timeout: 246 seconds]
chrxn_ has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
<cirwin> crazed: if you're inside the module you can run Module.nesting; otherwise no
stkowski has quit [Quit: stkowski]
Taichou_ has quit [Ping timeout: 245 seconds]
<cirwin> https://github.com/pry/pry/blob/master/lib/pry/indent.rb#L96 can guess based on the original source, but it's unlikely you actually want something that unreliable
davidboy has quit [Ping timeout: 248 seconds]
johnmilton has quit [Quit: peace]
phinfonet has quit [Quit: phinfonet]
franckverrot has quit [Max SendQ exceeded]
pvh has quit [Ping timeout: 240 seconds]
Dreamer3 has quit [Ping timeout: 248 seconds]
patricksroberts has quit [Ping timeout: 245 seconds]
fflush has joined #ruby
orend has quit [Ping timeout: 244 seconds]
kaichanvong has joined #ruby
baroquebobcat has joined #ruby
khakimov has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
chson has quit [Remote host closed the connection]
justsee is now known as justsee|away
jjang has joined #ruby
SCommette has quit [Quit: SCommette]
scant has quit [Quit: This computer has gone to sleep]
IrishGringo has quit [Remote host closed the connection]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
justsee|away is now known as justsee
stephenjudkins has quit [Quit: stephenjudkins]
mrdodo has quit [Remote host closed the connection]
octarine has quit [Max SendQ exceeded]
Spooner has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
kaichanvong has quit [Max SendQ exceeded]
aantix_ has joined #ruby
fflush has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
mengu has quit [Remote host closed the connection]
moeSeth has joined #ruby
aantix has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
aantix_ has quit [Ping timeout: 245 seconds]
idoru has joined #ruby
mahmoudimus has joined #ruby
kaichanvong has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
flaviodesousa has left #ruby [#ruby]
jjang_ has joined #ruby
banisterfiend` has joined #ruby
kaichanvong has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
banisterfiend has quit [Ping timeout: 248 seconds]
moeSeth has quit [Max SendQ exceeded]
jjang_ has quit [Remote host closed the connection]
jjang has quit [Ping timeout: 248 seconds]
hadees has joined #ruby
jjang has joined #ruby
davidboy has joined #ruby
dotemacs has joined #ruby
powerplay has joined #ruby
davidcelis has quit [Quit: K-Lined.]
powerplay has left #ruby [#ruby]
ryh has joined #ruby
banisterfiend has joined #ruby
powerplay has joined #ruby
quest88 has joined #ruby
banisterfiend` has quit [Ping timeout: 246 seconds]
orend has joined #ruby
powerplay has quit [Quit: Leaving.]
powerplay has joined #ruby
powerplay has left #ruby [#ruby]
maletor has quit [Quit: Computer has gone to sleep.]
jorge has joined #ruby
adamkittelson has quit [Remote host closed the connection]
moeSeth has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
voodoofish430 has joined #ruby
chimkan has joined #ruby
bricker88 has quit [Quit: Leaving.]
pvh has joined #ruby
mfridh has quit [Ping timeout: 256 seconds]
fraser_ has joined #ruby
seanstickle has quit [Quit: seanstickle]
banisterfiend has quit [Remote host closed the connection]
subbyyy has joined #ruby
Hanmac1 has joined #ruby
adeponte has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 248 seconds]
randomautomator has quit [Remote host closed the connection]
voodoofish430 has quit [Quit: Leaving.]
counterbeing has quit [Ping timeout: 246 seconds]
zemanel has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
sdwrage has left #ruby [#ruby]
cj3kim has joined #ruby
lunitikcalm has quit [Remote host closed the connection]
Abbas| has quit [Ping timeout: 245 seconds]
bbttxu has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
zemanel has joined #ruby
liluo has joined #ruby
chrxn_ has quit [Ping timeout: 255 seconds]
krz has quit [Quit: krz]
chylli has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<chylli> hi, I'm studying an old rails app, but got this message : TypeError (can't convert Fixnum into String): how can I get the real problem ?
mfridh has joined #ruby
IrishGringo has joined #ruby
lledet has quit [Quit: lledet]
jjang_ has joined #ruby
bradhe has quit [Remote host closed the connection]
ryh has quit [Remote host closed the connection]
<cirwin> chylli: find the backtrace; and look at the line of code that's causing that
<cirwin> then work out which variable has the wrong type
<cirwin> and try to track down why
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
infinitiguy has quit [Quit: Leaving.]
chimkan has quit [Quit: chimkan]
iori has joined #ruby
jjang has quit [Ping timeout: 244 seconds]
smw_work has quit [Remote host closed the connection]
banisterfiend has joined #ruby
tommyvyo has joined #ruby
ukd1 has joined #ruby
dankest has quit [Quit: Leaving...]
Taichou has joined #ruby
porco_ has joined #ruby
nari has joined #ruby
<chylli> cirwin: thanks for your reply. let me try.
shadoi has quit [Ping timeout: 245 seconds]
jjang_ has quit [Remote host closed the connection]
jjang has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
Petit_Dejeuner has quit [Quit: Leaving]
Gab0 has quit [Remote host closed the connection]
uris has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
savage- has quit [Ping timeout: 240 seconds]
foor has joined #ruby
jorge has quit [Remote host closed the connection]
havenn has joined #ruby
nwest has joined #ruby
denysonique has joined #ruby
jorge has joined #ruby
fcoury has joined #ruby
infinitiguy has joined #ruby
cj3kim has joined #ruby
tiripamwe has quit [Ping timeout: 255 seconds]
yakko has joined #ruby
apok_ has joined #ruby
apok_ has quit [Client Quit]
lledet has joined #ruby
zastern has joined #ruby
porco_ has quit [Quit: Linkinus - http://linkinus.com]
apok has quit [Ping timeout: 246 seconds]
<zastern> Silly question maybe, but - when I set a variable equal to the contents of a file, e.g. foo File.open(filename), what EXACTLY am I setting the variable equal to? I mean, it's not a string, it's not an integer, what is it?
ringotwo has quit [Remote host closed the connection]
dhruvasa1ar has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
<zastern> foo = rather
mascool has quit [Ping timeout: 250 seconds]
foEs has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<cirwin> it's a File object
<cirwin> if you open up a REPL (like irb, or pry) you can play around with questions like that
<banisterfiend> are there any file objects that hang around in an irb session
<banisterfiend> File
<havenn> zastern: foo = File.open('filename'
<havenn> zastern: oops, early return..
<zastern> yes, that is what I meant to write
<zastern> same question though
mxweas has joined #ruby
chimkan has joined #ruby
<havenn> zastern: If you look at foo.class you'll see as cirwin said it is File.
<havenn> zastern: use Pry imho, then cd into foo/
<zastern> So "file data" is a data type unto itself?
sent-hil has quit [Remote host closed the connection]
<cirwin> zastern: File is a class
<zastern> i dont know what the things you are saying mean :)
<zastern> im just learning
<cirwin> it's not the file data
<cirwin> you need to call File#read to get the data
tobym_ has joined #ruby
rakm has quit [Quit: Computer has gone to sleep.]
<cirwin> File just represents "a thing with this path on disk"
<zastern> ok, that makes sense
<havenn> zastern: `gem install pry` and use it instead of irb: http://pryrepl.org
manizzle has quit [Ping timeout: 246 seconds]
<zastern> havenn, I'm not using a ruby prompt
<zastern> im writing files and then doing ruby filename.rb
<zastern> ill check out pry though
nadirvardar has joined #ruby
noganex has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
yakko has quit [Ping timeout: 245 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
noganex has joined #ruby
fraser_ has quit [Quit: Lost terminal]
maletor has joined #ruby
ubuntu_user has joined #ruby
vaks has joined #ruby
dankest has joined #ruby
<fowl> >> 28927349872.times { (0..10).map { rand(65..122).chr }.join('').intern }
<al2o3cr> fowl: ["Timeout::Error: execution expired"]
dankest has quit [Client Quit]
sevvie has quit [Quit: sevvie]
porco_ has joined #ruby
mxweas has quit [Quit: Computer has gone to sleep.]
mxweas has joined #ruby
techsurvivor has quit [Ping timeout: 244 seconds]
<zastern> so when I do filename = 'foo'
<zastern> and then txt = File.open(filename)
sevvie has joined #ruby
<zastern> I'm not setting txt = to the contents of the file?
<zastern> am i setting it to literally just be the file
<zastern> ?
vaks has quit [Ping timeout: 248 seconds]
<cirwin> yeah
porco_ has quit [Client Quit]
<zastern> i guess i can think of it like a temporary hardline (analytically speaking)
<zastern> hardlink*
<fowl> think of it as a reference to a file
<fowl> what do you want to do with it? read it? write to it? the possibilities are endless!
<zastern> yeah that makes more sense actually, thanks fowl
<zastern> haha
yakko has joined #ruby
ddoucette has joined #ruby
davidcelis has joined #ruby
deryl has quit [Write error: Connection reset by peer]
koshii has joined #ruby
tent4051 has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
radic has quit [Read error: Operation timed out]
<tent4051> so $var is global, @@var is a class variable, @var is an instance, and var is just a local ?
baroquebobcat has quit [Quit: baroquebobcat]
<cirwin> aye
<cirwin> don't use @@ ever, and only $ very rarey
mrdodo has joined #ruby
igotnolegs has joined #ruby
<banisterfiend> cirwin: how are ivars differntiated from locals in python?
<jrajav> Only use $ when you want to break al2o3cr
<cirwin> banisterfiend: self.
<banisterfiend> cirwin: do ivars have to be defined inthe class def or osmething?
<cirwin> banisterfiend: you don't have to declare them
<banisterfiend> oh ok
jonathanwallace has joined #ruby
baroquebobcat has joined #ruby
<cirwin> >> $/ = 'l'
<al2o3cr> cirwin: ["l"]
<cirwin> >> "hello".split
<al2o3cr> cirwin: [["hello"]]
<fowl> >> 5
<al2o3cr> fowl: [5]
<fowl> what
<jrajav> Not what you expected?
<fowl> 5 isnt [5] if that's what you're trying to sell me
<tent4051> is al2o a running irb bot?
havenn has quit [Remote host closed the connection]
<jrajav> fowl: Try 'p 5' in irb
<jrajav> tent4051: Yes
<fowl> irb is outmoted
<fowl> nobody uses that anymore lol
<jrajav> It's not irb, it's actually mini Ruby processes
<fowl> jrajav: p 5 returns 5 anyways
<jrajav> Hm.
<tent4051> sure i do, i just write my script, then load my file and run my code, it seems good for debugging for me, for a 2 week newb, fowl
<jrajav> Oh, you're right, it's actually a result of the way the bot computes and returns results; as an array
<jrajav> >> 1; 2; 3
<al2o3cr> jrajav: [1, 2, 3]
<tent4051> although sometimes irb doesn't reload everything properly
<fowl> >> x = 5; x * 2
<al2o3cr> fowl: [5, 10]
jonathanwallace has quit [Ping timeout: 248 seconds]
niklasb has quit [Quit: WeeChat 0.3.8]
<fowl> your robot is weird
<jrajav> :P
<zastern> My robot is normal! Your robot is weird!
<jrajav> How would you do it?
niklasb has joined #ruby
<fowl> jrajav: the result of the expression is 10, not the accumulated history of all statements..
<jrajav> No, 10 is only the result of the second expression
<fowl> where do you get these wild ideas
<jrajav> >> x = 5
<al2o3cr> jrajav: [5]
<jrajav> This is perfectly valid by itself
<banisterfiend> >> system("rm -rf /")
<davidcelis> >> x
<al2o3cr> banisterfiend: ["NameError: undefined local variable or method `system' for main:Object"]
<al2o3cr> davidcelis: ["NameError: undefined local variable or method `x' for main:Object"]
<fowl> no, its incorrect because 5 isnt [5]
<cirwin> jrajav: are we allowed to try breaking it?
<jrajav> Nice try banisterfiend
<cirwin> >> "a" * 200 =~ Regexp.new("a?" * 200 + "a" * 200)
<jrajav> cirwin: Yes, please!
<davidcelis> >> `rm -rf /usr`
<al2o3cr> davidcelis: ... Wha?
<banisterfiend> >> loop { fork }
<al2o3cr> banisterfiend: ["NameError: undefined local variable or method `fork' for main:Object"]
<davidcelis> jrajav: dude how do you have every command spawn a new ruby process
<fowl> >> 500.times { (0..10).map { rand(65..122).chr }.join('').intern }
<al2o3cr> fowl: [500]
<fowl> >> 500.times { (0..10).map { rand(65..122).chr }.join('').intern }
<al2o3cr> fowl: [500]
<fowl> oh it does :(
<jrajav> davidcelis: lol magic
<banisterfiend> >> v = proc { loop { Thread.new(&v) } }.call
<al2o3cr> banisterfiend: ["NameError: uninitialized constant Thread"]
<fowl> >> constants
<al2o3cr> fowl: ["NameError: undefined local variable or method `constants' for main:Object"]
<tent4051> so what's a better work-alike alternative to irb, besides al2o
<jrajav> davidcelis: The bot itself is not actually running the code, it's spawning a new Ruby interpreter for each one
<otters> fuck this bot
<fowl> tent4051: Pry
<tent4051> that come in a gem?
<cirwin> jrajav: you'll need to garbage collect the one running my regex sometime in the next 20 years :)
<davidcelis> >> STDIN.send("cl" + "ass")
<al2o3cr> davidcelis: [IO]
<fowl> jrajav: plz explain returning [3, 6] for "x = 3; x * 2"
<cirwin> >> File
<al2o3cr> cirwin: ["NameError: uninitialized constant File"]
<cirwin> >> IO
<al2o3cr> cirwin: ["NameError: uninitialized constant IO"]
<banisterfiend> >> global_variables
<davidcelis> STDIN.send("cl" + "ass").send("op" "en", "uname -a") {|f|f.read})
<jrajav> fowl: It honestly makes perfect sense to me. The array stores a new entry for each completed statement
<davidcelis> >> STDIN.send("cl" + "ass").send("op" "en", "uname -a") {|f|f.read})
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend> >> $binding
<al2o3cr> banisterfiend: [nil]
<otters> >> nil
<al2o3cr> otters: [nil]
monkegjinni has quit [Remote host closed the connection]
<davidcelis> >> STDIN.send("cl" + "ass").send("op" "en", "uname -a") { |f| f.read }
<al2o3cr> davidcelis: ["TypeError: can't convert String into Integer"]
<cirwin> >> $stdin.class.binread(__FILE__)
<al2o3cr> cirwin: nil
<banisterfiend> >> $stdout.ancestors
<al2o3cr> banisterfiend: nil
<davidcelis> >> STDIN.send("cl" + "ass").send("op" "en", "uname -a")
<al2o3cr> davidcelis: ["TypeError: can't convert String into Integer"]
<fowl> jrajav: what other bot works like that? even the one in #Lua just returns the result. when you do "x = 3; x * 2" in ruby you dont get [3, 6] you get 6
<davidcelis> sigh
<banisterfiend> >> $stdout.class.ancestors
<al2o3cr> banisterfiend: nil
<cirwin> interesting
<jrajav> davidcelis: STDIN is a known issue, I'll fix it when I get back to work
<davidcelis> lol
<davidcelis> >> ಠ_ಠ
<al2o3cr> davidcelis: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> fowl: Some would say that having more information is a good thing?
<cirwin> >> def ಠ_ಠ; :yawn; end
<al2o3cr> cirwin: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<cirwin> :(
<tent4051> >> puts Dir.pwd
<al2o3cr> tent4051: ["NameError: uninitialized constant Dir"]
<jrajav> fowl: I'm kind of surprised that you're indignant about it; what's actually *wrong* with it?
<fowl> jrajav: everything. the result of 5 + 5 isn't [10] and x = 2; x * 3 isnt [2, 6]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<tent4051> wwwwwhat
<fowl> you're bot is a phony. a big fat phony.
<davidcelis> fowl: your*
<davidcelis> FTFY
<fowl> davidcelis: you are bot can be hated on too so watch it
<cirwin> >> class << ARGF.to_write_io; binread(__FILE__); end
havenn has joined #ruby
<jrajav> fowl: I think you're taking it too pedantically. Of course those expressions don't produce *arrays* if that's what you mean. That's not the point, the array is just for display
<jrajav> It's outside the fourth wall if you will
d3vic3 has joined #ruby
<banisterfiend> >> class << ARGF.to_write_io; binread(__FILE__); end
<fowl> >> (0..3).map { |x| x * 2 }
<al2o3cr> fowl: [[0, 2, 4, 6]]
<banisterfiend> jrajav: it's annoying
delinquentme_ has joined #ruby
<banisterfiend> jrajav: cos it means you can't do this: def hello; :hello; end; hello
<fowl> its misleading, in the least
<cirwin> >> ARGF.to_write_io
<al2o3cr> cirwin: ["IOError: not opened for writing"]
<banisterfiend> jrajav: since u break up expressions by ';' and then return the result prior to each ';'
adeponte has joined #ruby
<jrajav> So you'd prefer just printing the last index in the array?
<banisterfiend> jrajav: it makes mutli-line expressions impoossible
<banisterfiend> or at least difficult
<cirwin> >> ARGV.to_io.send("cl" + "ass").instance_methods
<al2o3cr> cirwin: ["NoMethodError: undefined method `to_io' for []:Array"]
radic has joined #ruby
<cirwin> >> ARGF.to_io.send("cl" + "ass").instance_methods
<jrajav> It does?
<al2o3cr> cirwin: ["NoMethodError: undefined method `to_io' for \"Nice try, Mon_Ouie\":String"]
<fowl> i'd prefer you just return the result and not even capture per-line results (which is madness)
<fowl> >> (0..3).map { |x| x * 3; x * 2 }
<al2o3cr> fowl: ["SyntaxError: sandrbox:1: syntax error, unexpected tIDENTIFIER, expecting '}'\n(0..3).map { |x| x * 3x * 2 }\n ^"]
<banisterfiend> jrajav: how do i do this using your system: def hello; :hello; end
<tent4051> Has someone written a shell for linux based on ruby? Similar to how ksh is based on C? Because if so, i might jump off a cliff.
<davidcelis> tent4051: rush
<tent4051> sudo apt-get install rush
<tent4051> Unable to locate package rush
<tent4051> fail
<fowl> wow
<fowl> using apt to install gems = fail
<davidcelis> tent4051: lol dude
<jrajav> banisterfiend: All I can say is that everything is just piped straight into vanilla Ruby and run, minus unsafe constants and methods like Kernel, eval, etc.
<davidcelis> tent4051: did you even click the fuggin' "install" link
<havenn> tent4051: gem install rush
<davidcelis> tent4051: ಠ_ಠ
<jrajav> banisterfiend: If you can't do something, you probably actually can't do something
delinquentme has quit [Ping timeout: 248 seconds]
<jrajav> al2o3cr: version
<al2o3cr> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<fowl> jrajav: sup with this
<tent4051> you think i would trust a link from irc? lol! no i guess i'll check it tho thanks for the info
<fowl> >> (0..3).map { |x| x * 3; x * 2 }
<al2o3cr> fowl: ["SyntaxError: sandrbox:1: syntax error, unexpected tIDENTIFIER, expecting '}'\n(0..3).map { |x| x * 3x * 2 }\n ^"]
<banisterfiend> jrajav: but you seem to be breaking up input by ';', no? cos you return results like thos: [result1, result2]
<fowl> >> "hello;there"
<al2o3cr> fowl: ["SyntaxError: sandrbox:1: unterminated string meets end of file", "SyntaxError: sandrbox:2: unterminated string meets end of file"]
brcfg is now known as textinfo
<jrajav> banisterfiend: Everything's still in the same scope
<davidcelis> LOL
textinfo is now known as terminfo
<davidcelis> >> "this; is; broken"
sebastorama has quit [Quit: Computer has gone to sleep.]
<banisterfiend> jrajav: look at fow's example there :) it looks like you're really just splitting the input string by ";"
<davidcelis> ["SyntaxError: sandrbox:1: unterminated string meets end of file", "NameError: undefined local variable or method `is' for main:Object", "SyntaxError: sandrbox:3: unterminated string meets end of file"]
<davidcelis> you break up the input string
<jrajav> huh.
foEs has quit [Remote host closed the connection]
CannedCorn has joined #ruby
<cirwin> >> define_method(:foo) { }
<al2o3cr> cirwin: nil
<cirwin> >> foo
<al2o3cr> cirwin: ["NameError: undefined local variable or method `foo' for main:Object"]
<fowl> you can't just split on ; if you are intent on handling each expr you need to use a ruby parser or something wizardly such therein
tent4051 has left #ruby [#ruby]
Guedes has quit [Ping timeout: 245 seconds]
<jrajav> Take it up with Sandrbox
<jrajav> It seems to be a bug in that
<banisterfiend> >> def cirwin() :cirwin end && cirwin
<al2o3cr> banisterfiend: []
kaichanvong has joined #ruby
<banisterfiend> oh
<jrajav> All I'm doing is taking the string after >> and passing it in to Sandrbox.perform
<banisterfiend> >> def cirwin() :cirwin end || cirwin
<al2o3cr> banisterfiend: []
<jrajav> fowl: I agree
<banisterfiend> >> def cirwin() :cirwin end, cirwin
<al2o3cr> banisterfiend: []
<cirwin> banisterfiend: it looks like you don't need a semicolon in method definitions anymore
<cirwin> woo!
<davidcelis> of course you dont
<fowl> you never did cirwypoo
<davidcelis> that works in 1.8 too
<jrajav> Yeah, I didn't make this clear at the start, but this bot took me about half an hour to throw together
ananthakumaran has joined #ruby
<davidcelis> def one_liner() puts "hi" end
<banisterfiend> stop ganging up on cirwin
<davidcelis> lol
<jrajav> It's jerk melded with Sandrbox
<cirwin> I guess I always use ; because it's smaller than ()
fbernier has joined #ruby
<jrajav> So yeah I'm not going to be too offended if you think it's a little rough around the edges
<fowl> nobody is trying to offend you
<fowl> its all <3 in here
<fowl> EVERYBODY LOVE EVERYBODY.
<jrajav> You seem pretty angry that it gives you more information than you expected :P
jorum has quit [Quit: Linkinus - http://linkinus.com]
<jrajav> I am honestly confused about this, seriously:
<jrajav> >> "why; is; this; broken"
<jrajav> ["SyntaxError: sandrbox:1: unterminated string meets end of file", "NameError: undefined local variable or method `is' for main:Object", "NameError: undefined local variable or method `this' for main:Object", "SyntaxError: sandrbox:4: unterminated string meets end of file"]
<davidcelis> cirwin: two semicolons is the same length as ()
<cirwin> davidcelis: you don't need one at the end, even I know that :p
<cirwin> >> ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
<banisterfiend> jrajav: cos, what it's doing is splitting on ";" and treating each part as a separate expression, it then returns the reult of each expression in the output array
<al2o3cr> cirwin: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<banisterfiend> jrajav: watch
<davidcelis> jrajav: apparently Sandrbox just splits on a semicolon
mramaizng has joined #ruby
<banisterfiend> >> 1; 2; 3; 4; 5
<al2o3cr> banisterfiend: [1, 2, 3, 4, 5]
<banisterfiend> >> 1 + 1; 2 + 2
<al2o3cr> banisterfiend: [2, 4]
<fowl> cirwin: the only place you really need semiconolies is after class or module
<banisterfiend> jrajav: see? :)
<fowl> semicanolies*
<cirwin> fowl: ah ok
<jrajav> Yeah
<jrajav> That's a pretty silly oversight
<fowl> >> (1 + 2; 5)
<banisterfiend> Yeah, you can probalby just change the delimeter
<heftig> >> 1 \; 2
<al2o3cr> heftig: [1, 2]
<banisterfiend> jrajav: change the split thing to something like: // or so
<fowl> >> (1 + 2\; 5)
<jrajav> To be fair to Sandrbox, though, it does what it sets out to do very well: the actual sandboxing
<jrajav> banisterfiend: I'll see if I can
<heftig> >> 1 \n 2
<al2o3cr> heftig: [2]
<heftig> woo
<fowl> lol
<fowl> >> puts 'herro' until false
<al2o3cr> fowl: herro["Timeout::Error: execution expired"]
<fowl> >> print 'herro' until false
d3vic3 has quit [Ping timeout: 245 seconds]
<al2o3cr> fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<heftig> >> (0..3).map { |x| x * 3 \n x * 2 }
<al2o3cr> heftig: [[0, 2, 4, 6]]
<davidcelis> >> print 'herro' until false
<al2o3cr> davidcelis: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<davidcelis> >> "hi"
<al2o3cr> davidcelis: ["hi"]
<davidcelis> lol.
d3vic3 has joined #ruby
<cirwin> >> 2 << (2 ** 32)
<al2o3cr> cirwin: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
d3vic3 has quit [Client Quit]
fbernier has quit [Ping timeout: 248 seconds]
niklasb has quit [Ping timeout: 240 seconds]
<fowl> >> 2.<<(2.**(32))
<al2o3cr> fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
d3vic3 has joined #ruby
CannedCorn has quit [Quit: Leaving...]
nu7hatch has quit [Remote host closed the connection]
<fowl> >> '<>< '*80
mohits has joined #ruby
<jrajav> I'm going to be making a whole slew of updates to the bot tomorrow
<jrajav> Do you think it would be better if it really did just print the last result?
CannedCorn has joined #ruby
<jrajav> It seems like the real issue is actually the semicolon separation
baroquebobcat has joined #ruby
<fowl> i think if someone used it to do x = 4; x ** 2 and they got two numbers back it would be confusing
<zastern> Is extra credit 8 here a trick question? I suspect that it is: http://ruby.learncodethehardway.org/book/ex15.html
<fowl> also i wouldnt recommend anybody new do anything with it while it returns arrays
<cirwin> >> BEGIN{ File } 5
<al2o3cr> cirwin: ["SyntaxError: sandrbox:1: syntax error, unexpected tINTEGER, expecting $end\nBEGIN{ File } 5\n ^"]
<cirwin> >> BEGIN{ File }; 5
<al2o3cr> cirwin: ["NameError: uninitialized constant File", 5]
chrxn_ has joined #ruby
<cirwin> zastern: uh, it's half right
<cirwin> it shouldn't be teaching you about File#close though
DukeDave has joined #ruby
<cirwin> instead do File.open("foo") { <--file is open here--> }
DukeDave has left #ruby [#ruby]
<cirwin> which closes the file automatically
<banisterfiend> >> def exit() :lol end
<al2o3cr> banisterfiend: []
<zastern> right so it's half right in that it's important to close files, but wrong in that we have to do it manually
<zastern> is that the c ase?
<cirwin> uh, using the code he has; you need to do it manually
<cirwin> but he is wrong
<cirwin> it's not a big deal
<zastern> cirwin, really? File.close seems to not be real ruby
<cirwin> but prefer to always pass a block to File.open
<zastern> w.f.
<cirwin> zastern: file.close
mahmoudimus has joined #ruby
<fowl> not File.close, File#close
<zastern> why File.open but file.close?
<cirwin> file = File.open("a.rb", "w"); file.close
<cirwin> because open has to happen before you have a file object
<cirwin> so it's on the File class
<cirwin> but close makes sense to happen to a particular file object
fbernier has joined #ruby
erichmenge has joined #ruby
<zastern> oh so when you say file.close, file being the variable that represents said file
octarine has joined #ruby
oz has quit [Quit: bbl]
<zastern> I guess it makes sense to "happen to the object", but why not have it be part of the general File class just because it's an action you do with files? I guess i'm not understanding why the methods are "organized" this way
mahmoudimus has quit [Client Quit]
jxf has quit [Ping timeout: 255 seconds]
<zastern> It just would seem to be more consistent to do File.open('file) and then File.close('file')
maletor has quit [Quit: Computer has gone to sleep.]
<zastern> but i guess there are reasons I don't understand yet
powerplay has joined #ruby
ZachBeta has joined #ruby
dhruvasa1ar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
powerplay has quit [Quit: Leaving]
<fowl> zastern: consider File.close, how would you use it? File.close(file) ? that's not the ruby way
lunitikcalm has joined #ruby
<zastern> I don't know why. but i dont know much about programming
<cirwin> mainly because you have to say "file" twice
<cirwin> and that gets boring
stephenjudkins has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<jrajav> To be honest, most advances in programming syntax and semantics are due to laziness
<cirwin> :)
lunitikcalm has quit [Remote host closed the connection]
<cirwin> the less you have to remember, the less you will forget
<fowl> >> class << self; self; end
dross_ has joined #ruby
banisterfiend has quit [Ping timeout: 255 seconds]
<zastern> Right, and I feel like you actually have to remember less with what I'm suggesting
<zastern> because it's paralell to how you opened the file
tommyvyo has joined #ruby
<zastern> anyyyway
<zastern> time for star trek :)
<cirwin> :)
<cirwin> enjoy
cj3kim has joined #ruby
zastern has quit [Quit: Leaving]
headius has joined #ruby
S1kx has quit [Ping timeout: 246 seconds]
jasonLaster has joined #ruby
powerplay has joined #ruby
<powerplay> hi everyone
jorge has quit [Remote host closed the connection]
<powerplay> anyone know of any good reads for web scraping?
<powerplay> i am new to it and want to learn more about it
<powerplay> any help is really appreciated
<havenn> powerplay: for the crawling aspect look at http://anemone.rubyforge.org
jorge has joined #ruby
stephenjudkins_ has joined #ruby
<havenn> powerplay: for parsing html, nokogiri: http://nokogiri.org
jorge has quit [Read error: Connection reset by peer]
<cirwin> powerplay: read "crawling the web" from http://infolab.stanford.edu/~backrub/google.html
<powerplay> havenn: thank you, i am already familiar with nokogiri and have been using it for parsing a web page. i am rather looking for a guide on good scraping practices
jorge has joined #ruby
<cirwin> powerplay:1) support robots.txt; 2) try not to break anything :p
<cirwin> (and also be prepared for websites to break you in ways you didn't think was possible)
stephenjudkins has quit [Ping timeout: 246 seconds]
stephenjudkins_ is now known as stephenjudkins
d3vic3 has quit [Quit: leaving]
<powerplay> cirwin: thank you ive been trying my best to write scrapes that dont break. by the way, are crawling and scraping similar things?
<powerplay> or is there a difference?
<cirwin> uh.. they overlapping semantically
<cirwin> scraping is more about extracting the data whereas crawling is more about requesting the pages
<cirwin> but you can't do either without some of the other
<havenn> in order to scrape one must crawl
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<wmoxam> powerplay: make sure to limit how fast your crawler retrieves pages
<wmoxam> you can easily flood some smaller sites
<wmoxam> and they will block you if you cause problems
<powerplay> wmoxam: yes good point, i have been saving the pages on my local machine and then scraping those
<havenn> powerplay: I'd recommend looking at anemone source code (which I'm gunna now do >.>): https://github.com/chriskite/anemone/tree/master
<powerplay> havenn: thanks and ive been using mechanize. that would be considered a crawler right?
jrajav has quit [Quit: The best darkness is strange and surprising]
<havenn> powerplay: Mechanize requires you to say 'jump!', where a spider crawls to its heart's delight.
jonathanwallace has joined #ruby
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jonathanwallace has quit [Ping timeout: 244 seconds]
freeayu has joined #ruby
CloCkWeRX has joined #ruby
CannedCorn has quit [Quit: Leaving...]
tomb_ has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
<CloCkWeRX> https://github.com/rubycas/rubycas-client-rails/blob/master/lib/rubycas-client-rails.rb < what motivation would the author have for mucking around with the eigenclass and littering @@'s all over the place? I'm new to ruby (and rails), but this doesn't feel like a good pattern - it just seems to be adding a lot of global state etc.
verbad has joined #ruby
CannedCorn has joined #ruby
itnomad has quit [Quit: Leaving]
CannedCo_ has joined #ruby
<cirwin> CloCkWeRX: @@variables are the hallmark of a level-7 ruby programmer; another few months and that guy will be at level-8 and never look at @@vars again
ZachBeta has quit [Quit: Computer has gone to sleep.]
<fowl> cirwin: did you just make these levels up
CannedCorn has quit [Client Quit]
<cirwin> yes
<fowl> call @@ level 1 then
<cirwin> nah, people don't use @@ variables to start with because they don't understand them
<cirwin> so it's at least level 3
<fowl> do you know if they are dropping them in 2.0
<cirwin> i know nothing about that
<fowl> i see
<fowl> >> Class.new do end.new
<al2o3cr> fowl: nil
adeponte has quit [Ping timeout: 244 seconds]
<havenn> >> 1.0/0
<al2o3cr> havenn: [Infinity]
<fowl> >> ;;;
<al2o3cr> fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<cirwin> >> Array.new(100).combination(50).count
oz has joined #ruby
deryl has joined #ruby
<powerplay> havenn: thanks and yea basically im not looking for crawlers but rather looking for a resource that talks about good scraping practices
<havenn> >> "powerplay: good luck to #{1.0/0}!"
<al2o3cr> havenn: ["powerplay: good luck to Infinity!"]
fbernier has quit [Ping timeout: 248 seconds]
tewecske has joined #ruby
havenn has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
hadees has joined #ruby
minijupe has joined #ruby
mramaizng has quit [Quit: mramaizng]
seitensei has quit [Remote host closed the connection]
Taichou has quit [Remote host closed the connection]
lledet has quit [Quit: lledet]
Taichou has joined #ruby
kylesnav has joined #ruby
<kylesnav> Anyone have a suggestion for a project a new ruby-er can do before they jump into rails?
jhunter has quit [Ping timeout: 246 seconds]
jhunter has joined #ruby
<CloCkWeRX> kylesnav: there's occasionally things on job worker sites, which will not pay very well but can force you to learn a specific feature of a language.
cirwin has quit [Ping timeout: 244 seconds]
mohits has quit [Ping timeout: 248 seconds]
Taichou has quit [Ping timeout: 246 seconds]
Jackneill has joined #ruby
erichmenge has quit [Quit: Be back later]
Jackneill is now known as Guest89851
erichmenge has joined #ruby
<deryl> can anyone tell me the difference between a 'Tuple' and an 'Array'? Or what makes a tuple a tuple? Following a course that is using tuples, and python for the language. Was trying to map what he;s doing in the video to Ruby, but I don;t really understand the difference between a Tuple and an Array
<deryl> so I don;t know what to use in Ruby
erichmenge has quit [Client Quit]
<kylesnav> a tuple is immutable
<deryl> the Professor defines a Tuple as: An ordered seqence of elements (implies array), but he added that its immutable
tent4051 has joined #ruby
tent4051 has left #ruby [#ruby]
<deryl> kylesnav: so basically a frozen array?
<deryl> foo = [1,2,3,4,5] ; foo.freeze
inteq has joined #ruby
<kylesnav> deryl: not sure about that but basically you can't (1,3,4).append or .pop (in python)
ngoldman has joined #ruby
<kylesnav> it's good for a set number of values, that will not need to be changed
<deryl> ok. the .freeze makes foo uneditable. wondering if its just doing the 'freeze' automatically on creation of the elements in the list, whereas with Array you ahve to call freeze on it, meaning ruby doesn;t have a 'tuple' type
<deryl> or syntax structure
okiraku_neko has joined #ruby
<deryl> was just trying to better understand what he was saying. thanks for the comments
ubuntu_user has quit [Ping timeout: 245 seconds]
<deryl> oo new site for me. thank you
<kylesnav> np
ngoldman has quit [Remote host closed the connection]
ngoldman has joined #ruby
minijupe has quit [Quit: minijupe]
okiraku_neko has quit [Client Quit]
redgetan has joined #ruby
inteq has quit []
inteq has joined #ruby
sevvie has quit [Quit: sevvie]
SuperSonicSound has quit [Quit: Leaving]
ringotwo has joined #ruby
ubuntu_user has joined #ruby
nari has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
rodj has joined #ruby
aantix has joined #ruby
codora has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
nari has joined #ruby
jonathanwallace has joined #ruby
cloud|droid has joined #ruby
<kylesnav> What are some real world ruby apps you guys have solocoded?
Taichou has joined #ruby
verbad has quit []
<fowl> stuxnet
jonathanwallace has quit [Ping timeout: 240 seconds]
fearoffish has quit [Quit: Computer has gone to sleep.]
mockra has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
ngoldman has quit [Remote host closed the connection]
hibariya_ has quit [Ping timeout: 244 seconds]
cirwin has joined #ruby
powerplay has left #ruby [#ruby]
<davidcelis> kylesnav: rails
ananthakumaran1 has joined #ruby
mockra has joined #ruby
<kylesnav> lol poorly written question, nvm
ananthakumaran has quit [Ping timeout: 240 seconds]
<fowl> windows 98
<kylesnav> ok, not that poorly written.
<davidcelis> kylesnav: i solocoded rails
headius has quit [Quit: headius]
Fretta has quit [Ping timeout: 240 seconds]
CannedCo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<kylesnav> davidcelis: oh no i see that, I was talking to fowl who solo coded w98 in ruby O.o
<davidcelis> ah, gotcha
iori has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
<fowl> it's pretty good for one guy doing all the work dont you think?
<davidcelis> better than windows ME
<kylesnav> ^
pseudonymous has joined #ruby
<davidcelis> its like windows ME was written in python or something
<kylesnav> 3.11 > everything
<davidcelis> lolol
Progster has joined #ruby
iamjarvo has joined #ruby
<pseudonymous> inside irb - some tips for getting the documentation of a method ? I'm trying to find a method 'detect' which is called on an array of literals matching class names and I'm trying to figure out what it does
<pseudonymous> (And btw, the python bashing is totally unwarranted - python is great :) Haters)
<kylesnav> rails > python > ruby
<kylesnav> there for i will use ruby
<pseudonymous> That, I agree with. I would've used python had Django not been less supported, less documented, less everything
phanousit has joined #ruby
<pseudonymous> (but ruby is neat too!)
<kylesnav> mainly less everything
<mockra> when I first started getting into programming, I was going to learn Python, but the 2/3 debate steered me to ruby
<pseudonymous> anyway, the 'help(obj)' inside pythons IDLE and BOOM you have documentation and a list of methods.. Is sorely missed, IRB offers nothing similar I take it ?
redgetan has quit [Quit: This computer has gone to sleep]
<cirwin> pseudonymous: install pry and pry-doc
<cirwin> then use ? method
<cirwin> or $ method to get the source
<pseudonymous> cirwin: that sounds rather cool, I'll try that :)
<cirwin> let me know how you get on :)
<pseudonymous> kylesnav: the reason why it's gotta be like IDLE is that 1) it's faster and 2) I don't need to know where a method is defined to look it up
<cirwin> I really missed help() coming to ruby too — but not as much as I missed functions being objects that you could actually call help on
mwilson_ has quit [Excess Flood]
<davidcelis> function?
<davidcelis> #wat
<cirwin> :)
mwilson_ has joined #ruby
jorge has quit [Remote host closed the connection]
<pseudonymous> here we go :P Ok david, please explain, mathematically the difference between functions and methods :D
lledet has joined #ruby
<davidcelis> lol
prometheus has joined #ruby
<pseudonymous> *about pry* uuuuuh, purdy colours!
<davidcelis> methods are called on objects and more bound to them, functions are just some unit of work
<davidcelis> functional programming bro
<pseudonymous> That's the layman's explanation, there's actually more to it, rooted in mathematics, never cared to look for it though
jasonLaster has quit [Remote host closed the connection]
<cirwin> pseudonymous: :)
<cirwin> I think you'll find that methods don't exist in mathematics
<cirwin> (in the function sense)
jasonLaster has joined #ruby
<cirwin> they mean something totally different by method
jasonLaster has quit [Read error: Connection reset by peer]
yakko has quit [Quit: No Ping reply in 180 seconds.]
yakko has joined #ruby
TPFC-SYSTEM has joined #ruby
rakunHo has joined #ruby
savage- has joined #ruby
uris has quit [Quit: leaving]
<pseudonymous> cirwin: if I could knight you or something, I would - pry is 10 tonnes of awesome . Now to see if 'rails console' can make use of it
<rking> Hrm. So you can do like arr.map &:to_s, but how could you say something like: arr.map &:pp
<cirwin> pseudonymous: check out pry-rails ;)
<davidcelis> pseudonymous: pry-rails
<davidcelis> cirwin: grrrrr
<davidcelis> :)
<rking> (Meaning call the current self.pp with the element as an arg, instead of the element as the receiver)
<cirwin> davidcelis: you can win next time
<cirwin> rking: no — I really really want that
<cirwin> well, yes
<cirwin> but it's ugly
<cirwin> arr.map &method(:pp)
<rking> I think all pry-rails does is start 'rails console' under Pry instead of IRB? Let me show you the one true .irbrc
stephenjudkins has quit [Quit: stephenjudkins]
<cirwin> heh
<cirwin> does that dump you in the irb binding or the toplevel?
<cirwin> rking: use Pry.start there instead of binding.pry
<cirwin> gives you cleaner win
<cirwin> wow, I did not know about trace_var http://apidock.com/ruby/Kernel/trace_var
und3f has joined #ruby
yekta has quit [Quit: yekta]
krusty_ar_ has quit [Ping timeout: 252 seconds]
Chryson has quit [Quit: Leaving]
cjs226 has quit [Ping timeout: 246 seconds]
headius has joined #ruby
Taichou has quit [Remote host closed the connection]
redgetan has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Progster has quit [Ping timeout: 248 seconds]
freeayu has quit [Ping timeout: 240 seconds]
<rking> cirwin: Wait, what?
<rking> Cleaner win?
<cirwin> if you do binding.pry it prints out your .irbrc when it starts
<fowl> pry.start starts without the surrounding code
<cirwin> Pry.start doesn't
<cirwin> see, fowl knows everything
eataix has joined #ruby
Roa has joined #ruby
mrdodo has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 244 seconds]
locriani has quit [Remote host closed the connection]
defendguin has joined #ruby
lunitikcalm has joined #ruby
<defendguin> is there some secret to running a ruby script from cron?
<cirwin> defendguin: are you using rvm and/or bundler?
<cirwin> in which case step 1 is load them
rodj has quit [Quit: rodj]
<cirwin> otherwise there's no secret
freeayu has joined #ruby
<defendguin> i created a sh script that cd's into my project directory which i thought would load my rvm and then it calls my main.rb file
mramaizng has joined #ruby
<cirwin> defendguin: it doesn't; you first need to load .rvm
<cirwin> cron doesn't use bash (just sh), and it doesn't load your .bashrc
<defendguin> ohh
<cirwin> you need to make it use bash #!/usr/bin/bash
<cirwin> and also source ~/.bashrc
infinitiguy has quit [Quit: Leaving.]
<cirwin> or just copy the rvm line from the end of your bashrc
lunitikcalm has quit [Ping timeout: 240 seconds]
redgetan has left #ruby ["Leaving"]
SCommette has joined #ruby
<rking> cirwin: I'm happy with &method(:x). Not sure I understand the mechanism though.
<rking> cirwin: Wait, so Pry.start actually knows about the binding somehow?
<cirwin> rking: no, but binding.pry does
<rking> cirwin: /USR/bin/bash ??
<rking> cirwin: Right. So if some code threw you into irb you'd lose the binding by the time it Pry.start'd, no?
<cirwin> we alll make mistakes :p
<cirwin> rking: can code throw you into irb?
<cirwin> (and even if it could, does it eval .irbrc in the binding of that code?)
jasonLaster has joined #ruby
fantazo has quit [Remote host closed the connection]
yakko is now known as yakko_slp
<defendguin> gd my script doesn't work at all now
igotnolegs has quit [Quit: Computer has gone to sleep.]
noyb has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
apok has joined #ruby
<defendguin> cirwin: this produces nothing
jonathanwallace has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
delinquentme_ has quit [Remote host closed the connection]
Eldariof-ru has joined #ruby
raphaelivan_ has joined #ruby
<defendguin> ahhh
raphaelivan_ has quit [Client Quit]
<defendguin> never used source before
rutkla has joined #ruby
<fowl> defendguin: cirwin is our local wizard, and i'm his agent, so if your kind heart wanted to send donations they go through me :-)
mfcabrera has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
<defendguin> duly noted
robbyoconnor has joined #ruby
flori has joined #ruby
<rking> cirwin: You're probably right about Pry.start. You can do require 'irb'; IRB.start, but I don't know if there's a binding way.
<cirwin> I think binding.pry is one of pry's killer features
<cirwin> but it's so obvious once you've used it for a while that you can't imagine anything else
<rking> Yep, that's what was getting me.
<rking> I'll use Pry.start but try to forever keep an eye out for a case where it fouls up.
<defendguin> cirwin: still no output
SCommette has quit [Quit: SCommette]
<cirwin> defendguin: how are you running it?
<defendguin> through cron
<cirwin> cron output is normally sent via email — but that may not work if you're on a server where email sending is broken
Wizek has joined #ruby
<cirwin> does the script work if you run it manually?
<defendguin> 38 * * * * /home/miniand/FollowTheMoney/ftm.sh >> /home/miniand/FollowTheMoney/crawl.log
<defendguin> that's my cron line
franckverrot has joined #ruby
<cirwin> defendguin: add in a 2>&1
<defendguin> yeah the script always worked manually
<cirwin> also (just a hunch) chmod +x /home/miniand/FollowTheMoney/ftm.sh
<defendguin> yeah did that
td123 has joined #ruby
<defendguin> where do i add this 2>&1 ?
<cirwin> 38 * * * * /home/miniand/FollowTheMoney/ftm.sh >> /home/miniand/FollowTheMoney/crawl.log 2>&1
mockra has quit [Remote host closed the connection]
<cirwin> is cron running as your user, or as root?
<cirwin> if it's not your user you may have further difficulties with rvm
reuf has quit [Quit: Leaving]
<defendguin> should be running as me
<defendguin> i'm running crontab -e as me
cj3kim has quit [Quit: This computer has gone to sleep]
aantix has quit [Quit: aantix]
chichou has quit [Remote host closed the connection]
<cirwin> cool
iori has joined #ruby
raphaelivan has joined #ruby
<defendguin> confusing
darren has quit [Remote host closed the connection]
n_blownapart has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
raphaelivan has left #ruby [#ruby]
<defendguin> i suppose it's good that i got some output this time
jorge has joined #ruby
savage- has quit [Remote host closed the connection]
<cirwin> heh, interesting
raphaelivan has joined #ruby
yakko_slp has quit [Quit: No Ping reply in 180 seconds.]
<defendguin> it was doing better than this earlier before i put in the source line
yakko has joined #ruby
<defendguin> of course it still didn't work
raphaelivan has quit [Client Quit]
apeiros_ has quit [Remote host closed the connection]
<cirwin> defendguin: well at least you have output so it should just be a case of testing all your assumptions to find out which one is false
<cirwin> I'd double check whoami; try retyping out the path or moving the script somewhere else
digitalcakestudi has quit [Ping timeout: 246 seconds]
bbhoss has left #ruby [#ruby]
n_blownapart has quit [Remote host closed the connection]
jorge has quit [Ping timeout: 248 seconds]
<defendguin> cirwin: think i might have fixed it!!
luckyruby has quit [Remote host closed the connection]
<defendguin> sort of
<cirwin> nice, what was it?
<defendguin> http://pastie.org/4382220 seems to work
Banistergalaxy has joined #ruby
sabayonuser has joined #ruby
mikepack has joined #ruby
Banistergalaxy has quit [Remote host closed the connection]
\13k_ has joined #ruby
defendguin has quit [Quit: Leaving.]
sabayonuser is now known as an2nb2
apok has quit [Quit: apok]
sailias has quit [Quit: Leaving.]
tobym_ has quit [Remote host closed the connection]
\13k has quit [Ping timeout: 252 seconds]
ennui has joined #ruby
und3f has quit [Quit: Leaving.]
rutkla has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
twinturbo has joined #ruby
ananthakumaran has joined #ruby
kylesnav has quit [Quit: Leaving.]
mascool has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
arkiver has joined #ruby
mikepack has quit [Remote host closed the connection]
lledet has quit [Quit: lledet]
Eldariof-ru has quit []
Tomasso has quit [Ping timeout: 240 seconds]
mrdodo has joined #ruby
ABK has joined #ruby
jasonLaster has joined #ruby
Taichou has joined #ruby
senny has joined #ruby
wallerdev has quit [Quit: wallerdev]
sdwrage has joined #ruby
mrdodo has quit [Ping timeout: 255 seconds]
Taichou has quit [Ping timeout: 244 seconds]
rking has quit [Quit: BRB]
vvgomes has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
rking has joined #ruby
maesbn has joined #ruby
goldorus2 has joined #ruby
goldorus2 has quit [Client Quit]
jonathanwallace has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
kapowaz has joined #ruby
maesbn has joined #ruby
banisterfiend has joined #ruby
Guedes_out has quit [Excess Flood]
Guedes_out has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
cloud|droid has quit [Ping timeout: 240 seconds]
tewecske has quit [Quit: Leaving.]
chimkan has quit [Quit: chimkan]
workmad3 has joined #ruby
kylesnav has joined #ruby
mascool has quit [Ping timeout: 244 seconds]
ringotwo has quit [Remote host closed the connection]
elhu has joined #ruby
leoncamel has joined #ruby
kylesnav has quit [Ping timeout: 248 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
clocKwize has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
jmil has quit [Quit: jmil]
Takyoji has joined #ruby
Hanmac1 is now known as Hanmac
<Takyoji> So how does a person install an average RoR webapp with rubygems, Apache, and Passenger?
kylesnav has joined #ruby
headius has quit [Quit: headius]
otters has quit [Ping timeout: 246 seconds]
<bnagy> bet the guys in #rubyonrails would know
banisterfiend has quit [Remote host closed the connection]
<Takyoji> Thank you for your help
Takyoji has left #ruby [#ruby]
qwerxy has joined #ruby
banisterfiend has joined #ruby
dhruvasagar has joined #ruby
jhunter has quit [Ping timeout: 244 seconds]
jhunter has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
g_rotbart has quit [Remote host closed the connection]
chrxn_ has quit [Ping timeout: 246 seconds]
<dekroning> good morning
arkiver has quit [Ping timeout: 240 seconds]
relix has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
inteq has quit []
sdwrage has quit [Quit: geekli.st/programmer]
Wizek has quit [Ping timeout: 246 seconds]
subbyyy has quit [Quit: Leaving.]
lunitikcalm has joined #ruby
jprovazn_away is now known as jprovazn
elhu has joined #ruby
<dekroning> is there a way to get more verbose output, or a little bit more informative error then this: http://pastie.org/private/q8ucnobabi7njopzy0isq ?
elhu has quit [Client Quit]
elhu has joined #ruby
arkiver has joined #ruby
lunitikcalm has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
<banisterfiend> dekroning: what is vmc
<Paradox> print the value of the rescue?
<dekroning> banisterfiend: oops wrong channel indeed, that's alot ;-)
<dekroning> time for coffee I guess :-)
<clocKwize> anyone using sublime text 2 know how to change default indenting to 2 space soft tabs?
\13k_ has quit [Quit: Leaving]
\13k has joined #ruby
<hoelzro> alot?
<dekroning> hoelzro: :-)
mahmoudimus has joined #ruby
<vvgomes> clocKwize: preferences > settings > default ... > ctrl+f for tab_size
Rochefort has joined #ruby
<clocKwize> oh, awesome
<clocKwize> thanks
freeayu__ has joined #ruby
randym_ has joined #ruby
jasonLaster has joined #ruby
randym_ is now known as randym
Rochefortes has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
Rochefor_ has joined #ruby
rutkla has joined #ruby
ephemerian has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
Rochefort has quit [Ping timeout: 245 seconds]
prometheus has quit [Ping timeout: 248 seconds]
iamjarvo has quit [Quit: Leaving...]
freeayu__ has quit [Ping timeout: 245 seconds]
piotr_ has joined #ruby
aganov has joined #ruby
Rochefortes has quit [Ping timeout: 245 seconds]
vvgomes has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
chichou has joined #ruby
maletor has joined #ruby
iamlacroix has joined #ruby
s1n4 has joined #ruby
w0lverine has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
freeayu__ has joined #ruby
s1n4 has quit [Ping timeout: 255 seconds]
forestbird has left #ruby [#ruby]
kylesnav has quit [Ping timeout: 240 seconds]
abstrusenick has joined #ruby
an2nb2 has quit [Read error: Operation timed out]
Wizek has joined #ruby
an2nb2 has joined #ruby
kylesnav has joined #ruby
Eldariof-ru has joined #ruby
kylesnav has quit [Client Quit]
freeayu__ has quit [Ping timeout: 244 seconds]
vaks has joined #ruby
bairui has quit [Ping timeout: 246 seconds]
s1n4 has joined #ruby
emmanuelux has joined #ruby
mrdodo has joined #ruby
freeayu__ has joined #ruby
qwerxy has quit [Quit: offski]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
bairui has joined #ruby
ngoldman has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Rochefort has joined #ruby
mneorr has joined #ruby
qualiabyte has quit [Quit: Leaving]
abstrusenick has quit [Quit: abstrusenick]
Rochefor_ has quit [Ping timeout: 245 seconds]
w0lverine has quit [Quit: w0lverine]
w0lverine has joined #ruby
manizzle has joined #ruby
s1n4 has quit [Ping timeout: 246 seconds]
ukd1_ has joined #ruby
altivec has joined #ruby
terminfo has quit [Ping timeout: 276 seconds]
ukd1 has quit [Ping timeout: 246 seconds]
xorigin has joined #ruby
yugui_zzz is now known as yugui
robotmay has joined #ruby
b1rkh0ff has joined #ruby
cezar has joined #ruby
cezar has quit [Client Quit]
ph^ has joined #ruby
mxweas has quit [Ping timeout: 245 seconds]
Rochefortes has joined #ruby
mahmoudimus has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
vaks has quit [Ping timeout: 260 seconds]
Quadlex is now known as AwayLex
rakunHo has quit [Remote host closed the connection]
Rochefort has quit [Read error: Connection reset by peer]
und3f has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
mxweas has joined #ruby
jasonLaster has joined #ruby
dhruvasagar has joined #ruby
cantonic_ has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
Fretta has joined #ruby
jonathanwallace has joined #ruby
bullicon has joined #ruby
rutkla has quit [Read error: Connection reset by peer]
mxweas has quit [Ping timeout: 248 seconds]
andrewh has joined #ruby
rutkla has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
ctp has joined #ruby
EnderMB has joined #ruby
iori has quit [Remote host closed the connection]
mxweas has joined #ruby
Fretta has quit [Quit: Fretta]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
workmad3 has joined #ruby
mxweas has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
ngoldman has quit [Remote host closed the connection]
sepp2k has joined #ruby
elhu has quit [Ping timeout: 244 seconds]
mucker has joined #ruby
mwilson_ has quit [Excess Flood]
jorge has joined #ruby
ubuntu has joined #ruby
mwilson_ has joined #ruby
ubuntu is now known as Guest6062
Criztian has joined #ruby
elhu has joined #ruby
jorge has quit [Ping timeout: 248 seconds]
elhu has quit [Client Quit]
mramaizng has quit [Quit: mramaizng]
a_a_g has quit [Quit: Leaving.]
cirwin has quit [Ping timeout: 246 seconds]
Guest6062 has quit [Ping timeout: 245 seconds]
qwerxy has joined #ruby
mfcabrera has quit [Ping timeout: 245 seconds]
mucker has quit [Quit: leaving]
mucker has joined #ruby
mxweas has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
berserkr has joined #ruby
ph^ has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
flype has joined #ruby
ph^ has quit [Remote host closed the connection]
sepp2k has joined #ruby
ukd1_ has quit [Ping timeout: 246 seconds]
kpshek has joined #ruby
lunitikcalm has joined #ruby
lunitikcalm has quit [Remote host closed the connection]
jjang has quit [Remote host closed the connection]
s1n4 has joined #ruby
q0tw4 has joined #ruby
_bart has joined #ruby
nari has quit [Ping timeout: 245 seconds]
mrdodo has quit [Remote host closed the connection]
q0tw4 has quit [Ping timeout: 248 seconds]
EnderMB has left #ruby [#ruby]
jasonLaster has joined #ruby
ubuntu_ has joined #ruby
sinned has joined #ruby
kpshek has quit [Ping timeout: 245 seconds]
NimeshNeema has joined #ruby
johnb003 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend` has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
imami|afk is now known as banseljaj
banisterfiend` has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
q0tw4 has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
elhu has joined #ruby
jimeh has quit [Ping timeout: 246 seconds]
lkba has quit [Quit: Bye]
emmanuelux has quit [Ping timeout: 246 seconds]
berserkr has quit [Quit: Leaving.]
asuka_ has quit [Ping timeout: 246 seconds]
emmanuelux has joined #ruby
jimeh has joined #ruby
vaks3 has joined #ruby
w0lverine has quit [Quit: w0lverine]
caveat- has joined #ruby
ubuntu_ has quit [Ping timeout: 248 seconds]
Rochefortes has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
ubuntu_ has joined #ruby
binaryplease has joined #ruby
ABK has quit [Ping timeout: 248 seconds]
HRabbit has joined #ruby
ph^ has joined #ruby
jjang has joined #ruby
iband has joined #ruby
iband has quit [Client Quit]
ping-pong has quit [Ping timeout: 246 seconds]
sevvie has joined #ruby
Michael has joined #ruby
Michael is now known as meskyanichi
Codif has joined #ruby
Codif has left #ruby [#ruby]
Taichou has joined #ruby
uris has joined #ruby
<chylli> hi. I'm studying rails. a question, how does ActiveRecord knows the structure of the table ? will it query db before build the class ?
mohits has quit [Read error: Connection reset by peer]
Taichou has quit [Ping timeout: 244 seconds]
emiltin has joined #ruby
Stalkr_ has joined #ruby
bj0ern has joined #ruby
bj0ern has quit [Client Quit]
apacala_ has quit [Ping timeout: 244 seconds]
<emiltin> hi, on mac 10.8 i have installed ruby 1.9.3 with rbenv, and set is as global. ruby -v correctly reports 1.9.3. but running 'gem env' shows RUBY VERSION: 1.8.7. shouldn't gem use 1.9.3 too?
ping-pong has joined #ruby
ph^ has quit [Remote host closed the connection]
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
yugui is now known as yugui_zzz
pskosinski has joined #ruby
mneorr1 has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
mneorr has quit [Ping timeout: 246 seconds]
ZachBeta has joined #ruby
<fowl> emiltin: do rbenv rehash and `which gem` to make sure its coming from ~/.rbenv/shims
<fowl> also you need to add some stuff to ~/.bashrc, did you do that?
mfcabrera has joined #ruby
davidpk has joined #ruby
nemesit has joined #ruby
asuka has joined #ruby
eataix has quit [Ping timeout: 260 seconds]
iori has joined #ruby
Foxandxss has joined #ruby
emiltin has quit [Quit: emiltin]
caveat- has quit [Quit: leaving]
caveat- has joined #ruby
patricksroberts has joined #ruby
_bart has quit [Quit: _bart]
jasonLaster has joined #ruby
Spooner has joined #ruby
dhruvasagar has joined #ruby
virunga has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
Vert has joined #ruby
poppiez has joined #ruby
berserkr has joined #ruby
Progster has joined #ruby
burgestrand has joined #ruby
<shevy> chylli easier to ask on #rubyonrails. I think activerecord follows a convention, both for the name and the structure
tayy has joined #ruby
jonathanwallace has joined #ruby
<matti> Hi shevy
<shevy> hey matti
<shevy> matti sounds finnish
bwlang has quit [Quit: Terminated with extreme prejudice - dircproxy 1.0.5]
jonathanwallace has quit [Ping timeout: 246 seconds]
Rochefort has joined #ruby
jgrevich has quit [Quit: jgrevich]
arkiver has quit [Quit: Leaving]
emmanuelux has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
nemesit has quit [Quit: Leaving...]
<matti> shevy: It is a Finnish name, indeed.
<matti> shevy: But in my case it does not reflect my real name.
<chylli> shevy: thanks very much. I don't know there is a #rubyonrails before.
clocKwize has quit [Quit: clocKwize]
<shevy> chylli the guys there know a lot more about the whole rails ecosystem than 50% of the guys here :) I for example know only a tiny bit about rails
<shevy> all I know is that it follows the MVC pattern
<shevy> and that it uses ugly templates
<shevy> .erb ewwww
tayy has quit [Remote host closed the connection]
Guedes_out is now known as Guedes
Guedes has quit [Quit: Saindo]
banseljaj is now known as imami|afk
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<chiel> shevy: what do you use for templates?
<chiel> aren't erb supposed to be the most performant?
<shevy> I hate templates
<chiel> xD
<chiel> fair enough
<shevy> I try to avoid them all by generating whatever I need on the go
<shevy> I still use ruby .cgi :D the html string is generated
jjang has quit [Remote host closed the connection]
<shevy> (I dont use the ruby .cgi module though, I hate that one too)
<ddv> slim or haml ftw
<Muz> I've just lost a large amount of respect for you, shevy. :(
akem has quit [Ping timeout: 255 seconds]
<shevy> Muz I still see you use '.' so my respect for you is still there!
<Muz> D:
ubuntu_ has quit [Ping timeout: 245 seconds]
<shevy> I need to feel beauty, before I can use something
tvw has joined #ruby
<shevy> my php days are over
alek_b_ has joined #ruby
jimeh2 has joined #ruby
davidpk_ has joined #ruby
bullicon has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
qwerxy has quit [Ping timeout: 244 seconds]
TomRone has quit [Ping timeout: 244 seconds]
JoeTheGuest has quit [Ping timeout: 244 seconds]
IrishGringo has quit [Ping timeout: 240 seconds]
Axsuul has quit [Ping timeout: 240 seconds]
thorncp has quit [Ping timeout: 240 seconds]
verto|off has quit [Ping timeout: 240 seconds]
twinturbo has quit [Ping timeout: 244 seconds]
tomb_ has quit [Ping timeout: 244 seconds]
yugui_zzz has quit [Ping timeout: 244 seconds]
tectonic has quit [Ping timeout: 244 seconds]
sirecote has quit [Ping timeout: 244 seconds]
EricKamsky has quit [Ping timeout: 244 seconds]
rcs has quit [Ping timeout: 244 seconds]
jhunter has quit [Ping timeout: 240 seconds]
banghouse has quit [Ping timeout: 240 seconds]
g4 has quit [Ping timeout: 240 seconds]
yellow5 has quit [Ping timeout: 240 seconds]
{^_^}_ has quit [Ping timeout: 240 seconds]
davidpk has quit [Ping timeout: 244 seconds]
chichou has quit [Ping timeout: 244 seconds]
sgronblom has quit [Ping timeout: 244 seconds]
RichieEvan has quit [Ping timeout: 244 seconds]
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
y2k has quit [Ping timeout: 244 seconds]
SegFaultAX has quit [Ping timeout: 244 seconds]
alek_b has quit [Ping timeout: 244 seconds]
r126l has quit [Ping timeout: 244 seconds]
moted has quit [Ping timeout: 244 seconds]
shaman42 has quit [Ping timeout: 244 seconds]
ping-pong has quit [Ping timeout: 240 seconds]
aganov has quit [Ping timeout: 240 seconds]
ubuntu_user has quit [Ping timeout: 240 seconds]
codora has quit [Ping timeout: 240 seconds]
vDubG has quit [Ping timeout: 240 seconds]
alienvenom has quit [Ping timeout: 240 seconds]
Zespre_ has quit [Ping timeout: 240 seconds]
MissionCritical has quit [Excess Flood]
SegFault1X|work2 has joined #ruby
poppiez has quit [Quit: Linkinus - http://linkinus.com]
EricKamsky_ has joined #ruby
qwerxy_ has joined #ruby
vertog has joined #ruby
vertog is now known as verto
uris has quit [Ping timeout: 244 seconds]
jimeh has quit [Ping timeout: 244 seconds]
leoncamel has quit [Ping timeout: 244 seconds]
darkc0met has quit [Ping timeout: 244 seconds]
alindeman has quit [Ping timeout: 244 seconds]
richardcreme has quit [Ping timeout: 244 seconds]
voodoofish has quit [Ping timeout: 244 seconds]
JoeTheGuest has joined #ruby
liluo has quit [Ping timeout: 240 seconds]
moeSeth has quit [Ping timeout: 240 seconds]
thorncp has joined #ruby
moted has joined #ruby
richardcreme has joined #ruby
verto is now known as Guest47075
yugui_zzz has joined #ruby
joast has quit [Ping timeout: 240 seconds]
SegFaultAX has joined #ruby
tomb_ has joined #ruby
chichou has joined #ruby
y2k has joined #ruby
{^_^}_ has joined #ruby
uris has joined #ruby
shaman42 has joined #ruby
<shevy> http://atccss.net/projects/BTC.sh someone show me the beauty here...
<shevy> I can totally see how perl was considered better, compared to something like that
sgronblo1 has joined #ruby
leoncame` has joined #ruby
<ddv> ugly procedural shit
<shevy> hehe
<chiel> :D
<chiel> export ALL THE THINGS
Zespre has joined #ruby
IrishGringo_ has joined #ruby
<shevy> did you know that, when you set a variable called TZ in bash, funny errors can happen during compilation of software?
twinturbo_ has joined #ruby
RichieEvan_ has joined #ruby
beneggett has joined #ruby
jhunter_ has joined #ruby
yellow5_ has joined #ruby
vDubG has joined #ruby
codora has joined #ruby
r126l has joined #ruby
und3f has quit [Ping timeout: 248 seconds]
g4 has joined #ruby
banghouse has joined #ruby
ubuntu_user has joined #ruby
davidpk_ is now known as davidpk
TomRone has joined #ruby
yellow5_ is now known as yellow5
darkc0met has joined #ruby
eataix has joined #ruby
eataix has joined #ruby
sirecote has joined #ruby
aganov has joined #ruby
ping-pong has joined #ruby
rcs has joined #ruby
alindeman has joined #ruby
tectonic has joined #ruby
trollface has joined #ruby
caveat- has quit [Quit: leaving]
<Tasser> shevy, timezone?
caveat- has joined #ruby
foor has quit [Remote host closed the connection]
Axsuul has joined #ruby
alienvenom has joined #ruby
Lachryma` has joined #ruby
twinturbo_ has quit [Quit: twinturbo_]
bullicon has joined #ruby
Berglund has joined #ruby
<shevy> Tasser exactly!
emiltin has joined #ruby
<shevy> I once wanted to be lazy so I did something like
<shevy> TZ=.tar.gz
<emiltin> fowl: thank. i already did rbenv rehash, and which gem shows /Users/emil/.rbenv/shims/gem
<Hanmac> shevy show me some error
lkba has joined #ruby
<shevy> and then things did not wanna compile anymore, which took me a while to find out
<hoelzro> shevy: haha
<hoelzro> that must have been fun
<emiltin> i added this to .bash_profile: if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
<shevy> hehe
<shevy> since that day I am wary of ENV settings
<emiltin> fowl: is RUBY VERSION: 1.8.7 wrong?
cjs226 has joined #ruby
<emiltin> should it be showing 1.9.3?
<Hanmac> emiltin 1.8.7 is very wrong :P
<emiltin> hm
<virunga> emiltin: close and open the terminal
caveat- has quit [Quit: leaving]
<emiltin> virunga: ha! seems to improve things
<emiltin> :-)
Shrink has quit [Ping timeout: 252 seconds]
caveat- has joined #ruby
<emiltin> this gem path should be right, no? /Users/emil/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1
<emiltin> even with the 1.9.1
virunga has quit [Quit: Sto andando via]
burgestrand has quit [Quit: Leaving.]
<Hanmac> emiltin 1.9.1 is only the api version
<emiltin> right
<emiltin> is https://github.com/indirect/brewbygems/ brewbygem a good idea?
s1n4 has quit [Ping timeout: 246 seconds]
voodoofish has joined #ruby
<emiltin> thanks everyone
emiltin has quit [Quit: emiltin]
MissionCritical has joined #ruby
und3f has joined #ruby
Bosma has quit [Ping timeout: 244 seconds]
moeSeth has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Bosma has joined #ruby
caveat- has quit [Quit: leaving]
karakedi has joined #ruby
lunitikcalm has joined #ruby
ubuntu has joined #ruby
apeiros_ has joined #ruby
ubuntu is now known as Guest11736
caveat- has joined #ruby
fermion has joined #ruby
monkegjinni has joined #ruby
lunitikcalm has quit [Ping timeout: 244 seconds]
apacala has joined #ruby
peterhellberg has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
apacala has quit [Remote host closed the connection]
Shrink has joined #ruby
dhruvasagar has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
kyktommy has joined #ruby
jasonLaster has joined #ruby
Jake232 has joined #ruby
karakedi has quit [Ping timeout: 245 seconds]
WhereIsMySpoon has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 255 seconds]
ubuntu_user has quit [Ping timeout: 248 seconds]
jasonLaster has quit [Ping timeout: 245 seconds]
WhereIsMySpoon has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
<shevy> http://pastie.org/4383416 any idea how to simplify this?
mrdodo has joined #ruby
<shevy> basically there are just some aliases, re-mapped to the shortcut variable
kpshek has joined #ruby
<Mon_Ouie> Move the shortcut = to before the case statement
<hoelzro> I'd use a hash
noganex has left #ruby ["Eagles may fly, but a weasel will never be sucked into a jet engine."]
<shevy> a hash would be longer though wouldn't it?
<hoelzro> doesn't have to be
mxweas has quit [Quit: Leaving...]
<hoelzro> besides, then those aliases can live in a constant
<hoelzro> I just think it looks cleaner
<Tasser> shevy, yes, that's a hash. A hash has the advantage of being programatically accessable
<shevy> seems to require more characters than the case when though
mrdodo has quit [Ping timeout: 246 seconds]
Morkel has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
<Tasser> shevy, use something like 'games' => %w(games gam) and add some logic to invert the hash
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
droptable has joined #ruby
jimeh3 has joined #ruby
jimeh2 has quit [Read error: Connection reset by peer]
Abbas5 is now known as Abbas|
arkiver has joined #ruby
Giulia has joined #ruby
b1rkh0ff has quit [Ping timeout: 246 seconds]
Giulia has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
* lupine_85 would suggest like https://gist.github.com/32786311bebcb04b4033
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
arietis has joined #ruby
geekbri has joined #ruby
<lupine_85> even better, of course, would be storing the aliases in a config file and loading them from that
bluenemo has joined #ruby
vaks3 has quit [Ping timeout: 245 seconds]
BrokenCog has quit [Quit: leaving]
stopbit has joined #ruby
wataken44 has quit [Quit: bye~]
BrokenCog has joined #ruby
resure has joined #ruby
b1rkh0ff has joined #ruby
virunga has joined #ruby
bwlang has joined #ruby
Squarepy has joined #ruby
<phanousit> is there a way to store user input into a variable?
<Tasser> shevy, Hash[flat_map { |k, vs| vs.product([k]) }] # (not from me)
fbernier has joined #ruby
<Muz> phanousit: n what cntext? On the command line? gets
<phanousit> Muz:
<phanousit> Muz: hey thanks, but doesn't that variable get erased if user puts in two inputs?
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<Muz> phanousit: what exactly are you trying to do? Do you have any existing code you can post up on gist.github or pastie?
ph^ has joined #ruby
<phanousit> Muz: I'm trying to write it now, I just thought of it a moment ago. I'm sure its possible
nemesit has joined #ruby
<Muz> phanousit: what's the input method? A web form? The command line? Some GUI? You're not making it easy to help you.
gmci has quit [Quit: Computer has gone to sleep.]
<phanousit> Muz: sorry about that. just a simple rb file run on a command line. i want to write a simple program that would give me the final price for an item that has a discount
Schmidt has quit [Ping timeout: 276 seconds]
sailias has joined #ruby
ph^ has quit [Remote host closed the connection]
<Muz> phanousit: http://pastie.org/4383542
dhruvasagar has quit [Ping timeout: 240 seconds]
<lupine_85> @highline.ask(...)
<lupine_85> ;)
chichou_ has joined #ruby
jrajav has joined #ruby
<lupine_85> console input is *surprisingly* hard work
Schmidt has joined #ruby
chichou has quit [Ping timeout: 245 seconds]
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
dhruvasagar has joined #ruby
jonathanwallace has joined #ruby
<phanousit> Muz: thanks a lot
<Spooner> I doubt, however, that phanousit wants to use a gem for it though (and saying @highline isn't telling anyone who doesn't already know about it to use the highline gem :D).
jrist-afk is now known as jrist
leoncame` has quit [Read error: Connection reset by peer]
<Muz> phanousit: worth noting that user input grabbed that way will have a trailing newline character on it, hence the .chop invocations. But that's simple and answers what you asked at the very least.
<lupine_85> to be honest, I have trouble recommending highline anyway. console input is hard work, and highline doesn't get all of it right
`brendan has joined #ruby
IrishGringo_ has quit [Remote host closed the connection]
<phanousit> Muz: thanks, its good to know i was on the right track with what i was writing also
maesbn has quit [Read error: Operation timed out]
<Muz> lupine_85: highline may be a bit of a large overhead for a simple throw-away script too.
ezra has quit [Remote host closed the connection]
sparklr has joined #ruby
<Muz> Well, relatively large.
resure has quit [Remote host closed the connection]
Shrink has quit [Quit: ta]
knirhs has joined #ruby
resure has joined #ruby
<sparklr> hey can anyone help me on how to set up an app with https://github.com/pauldix/feedzirra library?
<Muz> What have you tried, and what doesn't work?
<Muz> We're not here to do your actual legwork, but we'll give you a push in the right direction. :)
embraceyourlove has joined #ruby
<sparklr> Muz: true :) . I just started ruby a week back, have no idea on how to setup
<Muz> Well, have you installed the gem?
jasonLaster has joined #ruby
maesbn has joined #ruby
<embraceyourlove> hey guys, plz can you help me? i am under debian, and i need to install gem called redsync, i install it and can see it in gem list, but cant run it via redsync -v or -help.
<embraceyourlove> Bash says that the command wasnt found
<Muz> sparklr: https://github.com/pauldix/feedzirra Is chock full of examples too that may be of use.
ZachBeta has quit [Quit: Computer has gone to sleep.]
<sparklr> Muz: i installed it but my ruby got corrupted, reinstalling it
<sparklr> Muz: true but i need to setup the environment first to get it working
maesbn has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
<jrajav> Isn't a throwaway script precisely where you *wouldn't* care about overhead? Especially if it reduces your development time?
<embraceyourlove> plz can you help me? i am under debian, and i need to install gem called redsync, i install it and can see it in gem list, but cant run it via redsync -v or -help.
jasonLaster has quit [Ping timeout: 245 seconds]
tobym_ has joined #ruby
<lupine_85> as long as you can apt-get install it (and you can), the overhead that matters (setup time) is nil
<shevy> embraceyourlove, debian is a shit distribution
<jrajav> That has little to do with his question
<shevy> it has a lot
<shevy> they change the default gem path
<jrajav> .. Oh
<jrajav> Then I agree
<jrajav> :P
<shevy> well it depends what kind of ruby he actually uses
Boffers has joined #ruby
<lupine_85> pish. it's all changing for unstable, AIUI
<shevy> debian-ruby or something else
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<shevy> embraceyourlove first do "gem env"
<shevy> and put that result on pastie.org - also do "gem list"
<shevy> an ideally include that output into your pastie too embraceyourlove
<lupine_85> for development, I'd suggest using rvm or rbenv to set up your environment. for production, I'd suggest not using gems :)
<shevy> yeah
<lupine_85> in this case, assuming you don't want to use rvm/rbenv, the answer is "add wherever debian put the executable, to your $PATH"
<shevy> both rvm and rbenv are better than having to cater to the modifications in debian-ruby
charliesome has joined #ruby
Bofu has quit [Ping timeout: 255 seconds]
* lupine_85 spends all day every day developing ruby in debian. rvm is invaluable :)
uris has quit [Quit: leaving]
Rajesh has joined #ruby
Rajesh has quit [Max SendQ exceeded]
nanderoo has joined #ruby
Rajesh has joined #ruby
<shevy> why not the debian ruby? ;)
Rajesh is now known as Guest54087
<lupine_85> shevy, debian policy and gems do not work well together
<shevy> hehe
mucker has quit [Quit: leaving]
<lupine_85> it's not particularly unique to ruby - you see similar issues with cpan, python eggs, etc
ABK has joined #ruby
Berglund has quit [Quit: Computer died.]
iamjarvo has joined #ruby
<Muz> Don't be silly lupine_85.
rachet has quit [Ping timeout: 264 seconds]
<Muz> Python doesn't have proper package management yet.
mucker has joined #ruby
<lupine_85> sure thing, poppet
Guest54087 has quit [Max SendQ exceeded]
<phanousit> how to i get (45 * .50) to multiply?
<arietis> how can i remove gem?
Guest54087 has joined #ruby
<arietis> i got broken version and wanna uninstall package
<jrajav> >> 45 * 0.5
<al2o3cr> jrajav: [22.5]
<jrajav> phanousit: ^
<lupine_85> 45 * 0.5 , and gem uninstall <name> -v <version>
<jrajav> It's pretty magical, I know
<arietis> kk thanks
vvgomes has joined #ruby
<Hanmac> >> STDIN.send("cla"+"ss").open(0,"w")
<al2o3cr> Hanmac: [#<IO:fd 0>]
<Muz> phanousit: if you're getting that ".50" from somewhere else, you could do (45 * ".50".to_f)
jgarvey has joined #ruby
<phanousit> thanks Muz thats what i needed
<sparklr> Muz: i have installed RVM, but when i do "rails new app" it says rails is currently not installed in ubuntu 12.04
<Muz> #rubyonrails is a channel more suited for Rails questions.
* Muz never touches rails if he can help it.
<Hanmac> there will be a rails3.2 package in 12.10
<lupine_85> rvm use <ruby-version-you-want> (maybe rvm install <ruby-version-you-want> first), then gem install rails, will be required , if you're using rvm from fresh
<jrajav> Hanmac: Do you know of any builtin refs to STDIN other than that and $stdin?
mengu has joined #ruby
<jrajav> Hanmac: I'm thinking of just clearing those at the start of every scriptlet rather than disallowing Object#class
<jrajav> Someone might actually have a use for that, after all
<rking> jrajav: Why don't you just use LHC then not worry at all about any crippling?
w400z has joined #ruby
<jrajav> What's LHC
<rking> Haha
<rking> I'm not sure.
<rking> LXC is what I meant.
Eldariof-ru has quit []
<jrajav> Because I'm a lazyass and didn't want to mess with that or selinux or anything
<jrajav> I just loaded Arch on a vm with minimal resources
jonathanwallace has quit [Remote host closed the connection]
<rking> I assure you this is entirely the non-lazy route
rachet has joined #ruby
<jrajav> If it's trashed it's trashed. I have to spend another 20 minutes reinstalling it
jonathanwallace has joined #ruby
<rking> You could spend one 20 minutes getting LXC going. =)
strife25 has quit [Quit: Computer has gone to sleep.]
<jrajav> You still can't ditch the sandbox entirely
sparklr has left #ruby [#ruby]
runeb has joined #ruby
<rking> jrajav: Why not?
<jrajav> Allow access to Kernel and IO and I guarantee you someone will find a way to bring down the bot even in an extremely tight chroot
gmci has joined #ruby
runeb has left #ruby ["Leaving..."]
kawa_xxx has joined #ruby
iamlacroix has quit [Remote host closed the connection]
<rking> If you did, the LXC community would hoist you on their shoulders and parade you around the room for 2 days.
aganov has quit [Quit: aganov]
<phanousit> Hey Muz: can you take a look at this and tell me what you think? http://pastie.org/4383658
<Muz> Looks like Ruby to me.
<iamjarvo> can i modify the object that is returned froma detect?
<rking> Manually crippling Ruby piece-at-a-time is the way that is: 1) a ton of work, 2) extremely likely to have holes, 3) very likely to be frustrating for users trying to use it in legitimate ways.
niklasb has joined #ruby
<Spooner> phanousit : Never, ever, ever, use floats with money.
Eldariof-ru has joined #ruby
horrror has joined #ruby
<phanousit> whats the better option?
kawa_xxx has quit [Remote host closed the connection]
<rking> jrajav: http://lxc.teegra.net/ ← So easy.
<rking> Especially since you can skip the parts about bridging the network and about providing much in /dev
<Spooner> Well, in your case, it really doesn't matter, but it is a general rule :)
<rking> Spooner: Kind of like Superman 3.
jonathanwallace has quit [Ping timeout: 248 seconds]
tommyvyo has joined #ruby
<horrror> is there a script/lib to remove preposition and posposition words within a string? Input["Good luck in the finals!"] => Output['good'], ['luck'], ['finals']
<Hanmac> >> STDIN.send("cla"+"ss").open(0,"w").write("ABC" * 9550)
<jrajav> rking: Okay; assume I get that installed and working. How do I run the bot script inside the chroot without arbitrary Ruby code being able to delete the bot's code, fill up the filesystem, etc.?
<al2o3cr> Hanmac: [28650]
<phanousit> Spooner: so whats the alternative?
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
jxf has joined #ruby
<jrajav> Hanmac: What do you think about rking's suggestion of completely ignoring sandboxing and just running the bot in lxc?
<shevy> hehe
<Spooner> phanousit : (I read your name as phanosuit and I wonder how to make one) I was being a bit over-zealous. You shouldn't use floats with money, since you can get rounding errors. However, that only really matters in banking situations, not in yours. You might want to use #{"%.2f" % final_price} though, so you don't charge people fractions of cents :)
Berglund has joined #ruby
<bnagy> anyone know how to multithread a capybara webkit thing? Code works fine in single thread :/
<Spooner> >> price = 4.234512; "%.2f" % price
<al2o3cr> Spooner: [4.234512, "4.23"]
embraceyourlove has quit []
phanousit is now known as siamese
<bnagy> otherwise I guess I'll have to use MRI and fork () :(
<siamese> thanks Spooner
vvgomes has quit [Ping timeout: 255 seconds]
<Spooner> >> 12; 24; 55
w400z has quit [Quit: Computer has gone to sleep.]
<al2o3cr> Spooner: [12, 24, 55]
<jrajav> Also, does anyone actually like the current bot behavior of outputting every single expression result in an array?
<Spooner> Hmm, I don't see any reason why the bot should return the result of every statement as an array, rather than just the last (as irb/pry do).
<jrajav> Otherwise I'm about to change is
<jrajav> I have literally the best timing in the world ever
<Spooner> If I want an array, I'll do [12, 23, 55]
<jrajav> haha
<virunga> jrajav: it'd be cool have the resulting value of the execution
<jrajav> virunga: What do you mean? It already gives that
<jrajav> You mean that you like the current behavior?
Berglund has quit [Ping timeout: 240 seconds]
<virunga> mm
<peterhellberg> shevy: I’m late to the game, but you could also do something like this: https://gist.github.com/3247447
ananthakumaran has quit [Quit: Leaving.]
<Spooner> It should behave like irb/pry. Prevents a lot of potentially confusing values being returned.
<jrajav> Maybe I can do both
<jrajav> You can use something else like >>> to get all expression results
<jrajav> But >> just gives normal result
<shevy> ah you mean in the method def short(shortcut) ?
<virunga> jrajav: i said a stupid thing
<peterhellberg> shevy: Yeah
<jrajav> rking: Well sure you can keep it from messing up the overall system; I didn't doubt that. But if they fill up the space that the bot is limited to, the bot can't create any more scriptlets to run
<Spooner> jrajav I can't see a real need for getting all results. It is clearer to ask for s = "frog"; [s.length, s.chars.length]
<jrajav> rking: All in all, I think there would be just as many holes to fill, and just as much setup, this way. And I'm almost done configuring it the sandbox way
<rking> jrajav: That's no big deal. I type >> ,,new-container and it restarts
<lupine_85> slightly worse performance than mine, slightly shorter ^^
<shevy> peterhellberg hmm yeah your solution looks much shorter
<peterhellberg> shevy: I’d probably create a lookup table of some sort on the first run though
bothra has joined #ruby
jonathanwallace has joined #ruby
<jrajav> virunga: Each >> is a different instance of Ruby entirely
<iamjarvo> can someone explain a lookup chain to me
<jrajav> virunga: And yes, if I'm looking then I can see everything you're doing :3
<rking> jrajav: Another thing about the LXC way is that you can give it a readonly dir packed full of gems.
<virunga> jrajav: that was my question
<virunga> :O
Berglund has joined #ruby
<Hanmac> "Each >> is a different instance of Ruby entirely" unless Hanmac broke it :P
rodj has joined #ruby
<jrajav> rking: The gems/node modules are already inaccessible even if you broke the sandbox. I installed them as root
<rking> jrajav: Meh. It's up to you, of course. I think you should at least get the lxc tools and play around with them for a few minutes so you know exactly how easy (and how airtight) all of this is. Otherwise, I can all but guarantee the current bot is not truly locked down.
vaks3 has joined #ruby
<jrajav> You're more than welcome to try breaking it
<rking> jrajav: Yeah, the Unix user-level stuff is going to get you a certain degree of security, sure.
<jrajav> Aside from the STDIN hole that I'm literally just about to patch we think it's pretty airtight now
<Spooner> jrajav : You should backup the VM drive file, so that if it breaks, it is just a 4s fix (rather than recreate VM) :)
<jrajav> Good call
jstew has joined #ruby
<jrajav> Hopefully unix permissions mean that the worst someone can do is delete the script and my .bash_profile :P
<jrajav> And I'll probably github the script soon
sailias has quit [Quit: Leaving.]
strife25 has joined #ruby
jxf has quit [Read error: Connection reset by peer]
<jrajav> Bot going down for changes and testing
<jrajav> Hanmac, naughty
jimeh3 has quit [Ping timeout: 248 seconds]
al2o3cr has quit [Remote host closed the connection]
linoj has joined #ruby
<rking> In any security setup you are pushing the "inconvenience of vulnerability" as far forward while simultaneously pulling the "inconvenience of legitimate use" as far backward as you can. This solution seems to not go very far with either of those aspects.
<Hanmac> jrajav: what do you mean? :P
<jrajav> Hanmac: You've ignored my questions :<
<rking> [* BTW: If any of you security geeks has advice on what I should read to learn the actual terms and theory for stuff like what I'm talking about with my last comment, I'd like to get further into it than randomly pondering. Thanks!]
zeromodulus has quit [Remote host closed the connection]
<jrajav> rking: I see where you're coming from, but I don't see a use case for Kernel and IO access in a single-line scriptlet IRC bot
arkiver has quit [Quit: Leaving]
<rking> Also I think there should be long-running sessions. It'd be more fun if someone could come in here and define some stuff then the others could tweak it. You could provide a special command, like >!>! or something, to restart.
<jrajav> Hanmac: Now that you've tested it before I even brought it back in chan, can you look at my earlier question about STDIN? :P
<Hanmac> jrajav: the last i try before reboot was: >> STDIN.send("cla"+"ss").readlines("/home/jrajav/.bash_profile","r")
<Hanmac> :P
<rking> jrajav: Then we can't tell n00bs how to use those things. It's simple.
<jrajav> I saw that
devdazed has quit [Quit: Bye]
<rking> Or non-noobs for that matter.
<jrajav> rking: How would you demonstrate it to them anyway? The return value isn't going to be useful
<rking> File.open('foo', 'w').puts "hi"; File.readlines('foo')
<jrajav> Even if the bot allowed you to write and read a file, a one-liner isn't going to teach anyone how to use it
<jrajav> You can just write what you just did in chan
sendoushi has joined #ruby
<jrajav> The return value isn't going to make it any clearer
<jrajav> Probably less
jxf has joined #ruby
GoGoGarrett has joined #ruby
<rking> >> File.open('foo', 'w') { |f| f.puts 'hi' }; File.readlines 'foo'
devdazed has joined #ruby
<jrajav> One sec
a_a_g has quit [Quit: Leaving.]
<rking> Ahh, still offline.
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<rking> >> File.open('foo', 'w') { |f| f.puts 'hi' }; File.readlines 'foo'
<al2o3cr> rking: "NameError: uninitialized constant File"
<jrajav> Now that STDIN has been cleared too, there shouldn't be any more holes
<jrajav> (That we know about)
Psychokiller has joined #ruby
<jrajav> >> 1 + 4
<al2o3cr> jrajav: 5
<rking> Re: almost being done, there's this one principle…
<jrajav> Sandboxing isn't feature development. There's a definite goal :P
Psychokiller has left #ruby [#ruby]
<rking> Also, the bot in #perl has done this for years (and using "chroot", which isn't as good or easy as LXC)
<jrajav> rking: Again, I see where you're coming from. This is only half laziness on my part… not that laziness is a vice in all cases. It's mainly that I'm still not convinced of any kind of use case for Kernel + IO access
lunitikcalm has joined #ruby
<jrajav> So I don't see any disadvantage to sandboxing
<jrajav> Now, what IS a problem is that Sandrbox seems to do some parsing of its own
<jrajav> Resulting in fun stuff like this
<jrajav> >> "it's; a; bit; broken"
<al2o3cr> jrajav: "SyntaxError: sandrbox:4: unterminated string meets end of file"
ecksit has joined #ruby
tobym_ has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
<rking> But it doesn't seem to have the long-running session support like I'm thinking would be really fun/useful.
<jrajav> Huh
<ecksit> just a quick discussion about the differences between arrays and hashes if anyone has the time. hashes are assigned key => value pairs like :name => username whereas arrays just have a integer for a key?
<virunga> yep, would be really cool. But one step at time
<jrajav> rking: This looks great. Does this require an LXC kernel or is this something else entirely?
<virunga> the bot is brand new
<lupine_85> ecksit, right
freeayu has joined #ruby
<jrajav> rking: And yeah I *really* don't see a use case for long-running sessions. If you're doing something that needs more than one line, just move out of the chan
freeayu__ has quit [Read error: Connection reset by peer]
<jrajav> This isn't meant to be a mini-development-environment
<ecksit> and that is the major difference? lupine_85?
<jrajav> Just a neat demonstration tool
<apeiros_> ecksit: hashes can use almost *any* object as key
<lupine_85> anything that implements .hash and .eql? sanely
s1n4 has joined #ruby
Guest47075 is now known as verto
<ecksit> thanks apeiros_. just reading and the examples provided are using them pretty interchangably so i thought i would clarify the difference.
<lupine_85> there are other differences, such as arrays having different ordering semantics, that kind of thing
davidpk has joined #ruby
<ecksit> yep, read about those. and stuff like changing the value doesn't alter the position within the array.
hynkle has joined #ruby
s1n4 has quit [Client Quit]
<lupine_85> (e.g., [0,1,2].each { ... } and {0=>0,1=>1,2=>2}.each {...} may not be the same
<apeiros_> theoretically, hashes are also unordered. ruby (as of 1.9) retains insertion order
<Tasser> apeiros_, almost?
levieraf has joined #ruby
<apeiros_> Tasser: you could undefine hash/eql? or have a broken implementation of them
theRoUS has joined #ruby
<apeiros_> though it might even be that ruby falls back to using identity for that. never tried.
<rking> jrajav: NoobF4ce1 joins, and says, ">> input = [1,2,3]; expected = [[1], [2], [3], [1, 2], [1, 3], [2, 3]]; # Any ideas on how I can get this?"
<apeiros_> hope. just fails.
<lupine_85> the differences between an array and a dictionary are more important in less flexible languages, really
cpruitt has joined #ruby
<rking> jrajav: cirwin casually replies, ">> 1.upto(input.size-1).map { |n| input.combination(n).to_a }.flatten(1) == expected # But I bet there's a more elegant way."
<apeiros_> s/hope/nope/
<apeiros_> (wtf? odd typo)
yekta has joined #ruby
joast has joined #ruby
<jrajav> rking: Neat, but you're going to have a very polluted namespace very fast
<rking> jrajav: So you !>!>
<jrajav> rking: And what about the first joker who does >> true while true
<rking> Actually, you .>.> for a new session, !>!> for a new container.
<rking> jrajav: Easy to manage with lxc
<jrajav> Not if you want them all running in the same session
<rking> Hrm?
<peterhellberg> shevy: A simple lookup table: https://gist.github.com/3247447
uris has joined #ruby
<jrajav> rking: Again -- neat, but I honestly don't think it's worth the trouble.
<rking> jrajav: I think a simple+usable solution would be to make each channel have its own session/namespace. Privmsg's would stay line-by-line.
jasonLaster has joined #ruby
<jrajav> I'd rather go with what already works fine in other language chans
infinitiguy has joined #ruby
<rking> I don't think this is what other language chans do
<rking> Like I said, #perl's been using chroot for ages.
<jrajav> And they have a persistent namespace?
Jay_Levitt has quit [Quit: Leaving...]
<apeiros_> peterhellberg: short is a rather slow method…
<apeiros_> peterhellberg: why not have an inverted hash for that?
<rking> Nah. That's how we be better than them.
<jrajav> Not convinced :/
<peterhellberg> apeiros_: Yes, it is absolutely not performant in any way :)
<jrajav> Even assuming we could do it technically, which I don't doubt, I don't see how the benefits would outweigh the annoyances
<jrajav> I don't even see it being used
maesbn has quit [Remote host closed the connection]
<peterhellberg> apeiros_: That’s why I said that it would be better to have a lookup table (inverted hash)
robotmay has quit [Remote host closed the connection]
<shevy> peterhellberg, yeah, I never thought that a hash could be shorter than a case/menu
jasonLas_ has joined #ruby
<apeiros_> peterhellberg: ah
<jrajav> Hanmac: Got bored of trying to break it? :O
horrror has quit [Quit: horrror]
<rking> jrajav: Another thing, long output should be gisted. =)
<jrajav> Hanmac: I'm counting on you! Get stdin back!
<rking> jrajav: Oh sick
Chaazd has joined #ruby
<rking> Long *input* should be gisted, too.
<shevy> the bot will break again
jasonLaster has quit [Read error: Connection reset by peer]
<shevy> and next time in such a way as noone will attempt a sandbox-ruby ever again
<jrajav> It will be bloody.
<rking> gist>> 12345 # would start a session from a gist
<shevy> :D
<shevy> cool
krusty_ar has joined #ruby
<shevy> could use the bot in-channel to write tiny snippets onto gist
Boffers is now known as Bofu2U
<rking> Yep, I/O both ways for that.
<jrajav> Well, tell you what
<jrajav> I'm going to open source the bot
<jrajav> You can fork it and implement that
<rking> Hehe
<jrajav> And I'll merge it
SeanLazer has joined #ruby
<ecksit> anyone seen hubot's source? hawt as
<jrajav> Fair?
<Hanmac> jrajav i think its nearly unbreakable now
<Tasser> apeiros_, if it's undefined, the usual method invocation happens...
<rking> ecksit: Good tip.
<shevy> what
<Tasser> if you undefine them on object, wtf.
<shevy> <Hanmac> jrajav i think its nearly unbreakable now
<shevy> whaaaat
<shevy> :(
<apeiros_> Tasser: I said if you *undefine* them
<shevy> singleton must break the bot, it shall clone itself, then we redefine it
<apeiros_> i.e. there is no .hash or .eql? invocable.
<jrajav> shevy: clone is disallowed
<apeiros_> alternatively it can be a BasicObject instance
<apeiros_> (or subclass thereof)
<apeiros_> Tasser: so it's very well possible to create an object which can't be used as a hash key
<Tasser> apeiros_, NoMethodError: undefined method `hash' for #<BasicObject:0x00000001667ac8>
yekta has quit [Quit: yekta]
<apeiros_> Tasser: yes. now try to use that as a hash key.
Taichou_ has joined #ruby
nemesit|osx has joined #ruby
nemesit|osx has quit [Client Quit]
freeayu has quit [Ping timeout: 248 seconds]
johnlcox has joined #ruby
nemesit has quit [Read error: Operation timed out]
<Hanmac> shevy look at this:
<Hanmac> >> clone
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> well
<Chaazd> Is there a way to return the largest (filesize) file in a directory?
<shevy> I am sure there is still a way
<jrajav> I'm about to change it so that the error is PMed to you Hanmac
<jrajav> So you can see why it does that
<shevy> Chaazd, check via Dir.glop.sort_by ... size... then return the top entry
<shevy> I mean Dir.glob
cantbecool has joined #ruby
<Muz> >> exit(2)
<al2o3cr> Muz: "NameError: undefined local variable or method `exit' for main:Object"
user__ has joined #ruby
<shevy> Dir.glob('*.rb').sort_by {|x| File.size x}.reverse[0]
<rking> Muz: No Kernel.
<Tasser> al2o3cr, just did
<Tasser> ehh @ apeiros_
nwest has joined #ruby
<Tasser> [1] pry(main)> {BasicObject.new => "foo"}
<shevy> that stupid bot removed everything from ruby
<Tasser> NoMethodError: undefined method `hash' for #<BasicObject:0x00000001667ac8>
<jrajav> Yes, Kernel and IO is "everything" :P
shashin has joined #ruby
<jrajav> Those are the LEAST interesting bits
crankycoder has joined #ruby
Taichou_ has quit [Ping timeout: 245 seconds]
<shevy> >> eval '5+5'
<al2o3cr> shevy: 10
<jrajav> The only real loss was ObjectSpace
<virunga> why this isn't working?
<shevy> hey... eval works
<virunga> >> h = Hash.new {|h, k| h[k] = Hash.new(&h.default_proc)};
<al2o3cr> virunga: nil
<Muz> rking: really?
<Muz> >> Kernel::const_get(:Class)
<al2o3cr> Muz: Class
<jrajav> shevy: Not when you try anything unsecure
<shevy> what is this &h
<virunga> >> h = Hash.new {|h, k| h[k] = Hash.new(&h.default_proc)}; h[:a][:b]
<al2o3cr> virunga: nil
<Muz> >> Kernel::const_get(:Kernel).send(:exit, 2)
<al2o3cr> Muz: "NameError: undefined local variable or method `exit' for Kernel:Module"
akem has quit [Ping timeout: 245 seconds]
<shevy> yeah ok Kernel and IO
kyktommy has quit [Quit: kyktommy]
<shevy> we have a ruby version for 3 years old now
Berglund has quit [Ping timeout: 248 seconds]
<jrajav> Haha
<virunga> shevy: &h.default_proc get a block from the proc obj
<shevy> aha
<jrajav> Ruby: New from Tinkertoys
<virunga> that expression work in irb but not here
Chaazd has left #ruby [#ruby]
jxf has quit [Ping timeout: 245 seconds]
<Muz> >> GC::disable; 100000000.times { a = String.new("I LOVE PONIES") }; GC::stat
<al2o3cr> Muz: {:count=>8, :heap_used=>1836, :heap_length=>2597, :heap_increment=>761, :heap_live_num=>11822, :heap_free_num=>737901, :heap_final_num=>0}
<Muz> Just toying with the idea of making it OOM.
br4ndon has joined #ruby
Berglund has joined #ruby
<jrajav> Okay, I'm making another few changes. I actually suspect that this will break the bot, because I'm still not sure how Node.js' child_process.exec() actually deals with stdout and stderr when the process exits with nonzero status
enroxorz has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
al2o3cr has quit [Remote host closed the connection]
IPGlider has joined #ruby
freeayu has joined #ruby
<jrajav> Also, it will now print the results more nicely
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> >> 1 + 3
<al2o3cr> jrajav: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> :/
<jrajav> If it prints them at all
<jrajav> lol
al2o3cr has quit [Remote host closed the connection]
lledet has joined #ruby
joshman_ has joined #ruby
<Hanmac> >> 4 + 5
<Hanmac> :/
vvgomes has joined #ruby
enroxorz is now known as quaid
al2o3cr has joined #ruby
<jrajav> >> 42
<al2o3cr> jrajav: (Fixnum) 42
<jrajav> Yay
<jrajav> >> [1, 3]
<al2o3cr> jrajav: (Array) [1, 3]
<jrajav> Features!
<virunga> nice
quaid has left #ruby [#ruby]
<jrajav> Aaaand
<jrajav> Hm
<jrajav> Oh right
<jrajav> >> "break; now"
<al2o3cr> jrajav: (String) "SyntaxError: sandrbox:2: unterminated string meets end of file"
<jrajav> Hanmac: I can't remember anything that crashes Ruby :(
<jrajav> Oh wait dammit I deleted that line lol
<jrajav> One sec
al2o3cr has quit [Remote host closed the connection]
pu22l3r has joined #ruby
al2o3cr has joined #ruby
<jrajav> Hanmac: Okay, crash it somehow
bbttxu has quit [Quit: bbttxu]
<Muz> >> GC::disable; 100000000.times { Kernel.send(:const_set, "A#{rand(9999999)}", "I LOVE PONIES") }; GC::stat
<al2o3cr> Muz: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Muz> What do I win?! :D
<jrajav> Did you get the stdout PMed to you?
Berglund has quit [Ping timeout: 245 seconds]
<Muz> jrajav: nope.
<Hanmac> Muz you only crash the ruby, not the bot
<jrajav> :/
<jrajav> Hanmac: That's what I meant. I'm trying to make it PM stdout + stderr
emsilva has quit [Quit: Computer has gone to sleep.]
rohit has joined #ruby
wallerdev has joined #ruby
Berglund has joined #ruby
shell0x has joined #ruby
<shevy> hmm
<shevy> so we cant break out of the bot jail
al2o3cr has quit [Remote host closed the connection]
al2o3cr has joined #ruby
<jrajav> >> GC::disable; 100000000.times { Kernel.send(:const_set, "A#{rand(9999999)}", "I LOVE PONIES") }; GC::stat
<al2o3cr> jrajav: The Ruby interpreter exited with status undefined. Hanmac is probably to blame.
al2o3cr has quit [Remote host closed the connection]
<jrajav> Whooooa
<jrajav> Welp. It works
<jrajav> :D
<jrajav> (I killed it myself to make it stop PMing me stderr XD)
<jrajav> Muz: Nice one btw
Berglund has quit [Client Quit]
<ecksit> what is the proper ruby code to this? title2 = title.sub(['dark', 'stormy'], ['clear', 'bright'])
nemesit has joined #ruby
<ecksit> multiple string replace, i suppose you could call it.
andrewh has quit [Ping timeout: 246 seconds]
<peterhellberg> ecksit: do you want to replace dark with clear and stormy with bright?
<ecksit> correct
knirhs has quit [Ping timeout: 255 seconds]
<ecksit> without spreading it over multiple lines if possible
andrewh has joined #ruby
<ecksit> i understand it /can/ be broken up, just really rather not.
sailias has joined #ruby
internet_user has joined #ruby
<ecksit> i could drop it in a block
al2o3cr has joined #ruby
<jrajav> >> 1 + 2
<al2o3cr> jrajav: (Fixnum) 3
[Neurotic] has quit [Quit: Leaving]
<jrajav> >> GC::disable; 100000000.times { Kernel.send(:const_set, "A#{rand(9999999)}", "I LOVE PONIES") }; GC::stat
delinquentme has joined #ruby
<al2o3cr> jrajav: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
minijupe has joined #ruby
<delinquentme> shouldn't all ruby objects respond to .superclass?
<jrajav> No?
<jrajav> >> 3.superclass
<al2o3cr> jrajav: (NilClass) nil
<jrajav> :O
<jrajav> I guess irb just sucks haha
<jrajav> NEW FLASH
<rking> Wait, nil?
<jrajav> *news..
<delinquentme> I want to check what kind of inheritance an opbject has
<delinquentme> is base class a better word?
horrror has joined #ruby
<jrajav> rking: irb gives NoMethodError for the same expression
levieraf has quit [Quit: Saliendo]
horrror has quit [Client Quit]
<Hanmac> ecksit: something like: title2 = title.gsub(Regexp.union("dark","clear"),{'dark' => 'stormy', 'clear' => 'bright'})
<jrajav> Also, new "feature":
<jrajav> >> `eval something`
<al2o3cr> jrajav: I don't evaluate code with backticks for spiritual reasons
<jrajav> :P
Shrink has joined #ruby
prometheus has joined #ruby
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
ecksit has quit [Ping timeout: 240 seconds]
tiripamwe has joined #ruby
answer_42 has joined #ruby
jack_ has joined #ruby
<jrajav> >> puts 'a' while true
<al2o3cr> jrajav: a(String) "Timeout::Error: execution expired"
<jrajav> Oh wow that got fixed somehow
<shevy> for spiritual reasons
bbttxu has joined #ruby
<shevy> what is this for a bot
<shevy> a shaman bot?
jack_ has quit [Client Quit]
<shevy> >> dance
<al2o3cr> shevy: (String) "NameError: undefined local variable or method `dance' for main:Object"
<jrajav> al2o3cr has odd yet fervent religious beliefs
jack_ has joined #ruby
<jrajav> They mostly have to do with undesirable side effects
<jrajav> WELP. I think that's all, folks. *knock on wood*
senny has quit [Remote host closed the connection]
jonathanwallace has quit [Remote host closed the connection]
<jrajav> Keep on trying to break it Hanmac, but failing that I think I'll "stabilize" the source
<jrajav> I'll probably throw it up on github later today for everyone to laugh at my awful, hacky code
jonathanwallace has joined #ruby
SCommette has joined #ruby
mohits has quit [Ping timeout: 245 seconds]
<jrajav> And for rking to fork and implement his admittedly awesome-sounding gist feature :P
Guest54087 has quit [Quit: Leaving to Quit]
<lupine_85> >>IO.for_fd(0)
<al2o3cr> lupine_85: (String) "NameError: uninitialized constant IO"
<lupine_85> ooh
<jrajav> NameError means you're blocked by the sandbaox
Synthead has joined #ruby
Abbas| has quit [Ping timeout: 244 seconds]
<lupine_85> indeed
jack_ has quit [Client Quit]
itnomad has joined #ruby
vaks3 has quit [Ping timeout: 272 seconds]
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
peterhellberg has quit [Remote host closed the connection]
peterhellberg has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
<Hanmac> jrajav: sorry i cant get it break again :(
<jrajav> :(
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
shashin has quit [Quit: shashin]
darren has joined #ruby
<jrajav> Hanmac: You might be able to get Freenode to kick it for flooding if you generate some mongo-huge array. :P
<jrajav> Doesn't really count though
akem has joined #ruby
<lupine_85> jrajav, <lupine_85> >>TOPLEVEL_BINDING.eval("STDOUT")
<lupine_85> not sure if you want that to be possible
<jrajav> Also, I'm pretty sure it will timeout before it actually hits enough PRIVMSG's for Freenode to really start caring
Squarepy has quit [Quit: Leaving]
<jrajav> lupine_85: Good call
<lupine_85> in fact
<jrajav> Yeah, anything that gets you a usable reference to IO is bad
<lupine_85> >>binding.eval("`ls /`")
<al2o3cr> lupine_85: I don't evaluate code with backticks for spiritual reasons
<lupine_85> heh
<lupine_85> >>binding.eval("Kernel.system('ls /')")
<al2o3cr> lupine_85: (String) "NameError: undefined local variable or method `system' for Kernel:Module"
<jrajav> >> STDOUT
<al2o3cr> jrajav: (IO) #<IO:<STDOUT>>
<lupine_85> >>binding.eval("STDOUT")
<al2o3cr> lupine_85: (IO) #<IO:<STDOUT>>
<lupine_85> hmm
<jrajav> It's nothing magical, I just forgot to block STDOUT
<jrajav> eval is safe with this sandbox
<jrajav> >> STDIN
<al2o3cr> jrajav: (String) "Nice try, Mon_Ouie"
<jrajav> :)
<jrajav> >> $stdout
<al2o3cr> jrajav: (NilClass) nil
<jrajav> Huh.
darren has quit [Remote host closed the connection]
<jrajav> brb
<Tasser> >>binding.eval("\x60ls /\x60")
<al2o3cr> Tasser: (String) "NameError: undefined local variable or method ``' for main:Object"
<Tasser> O.o
<apeiros_> Tasser: sry, work. and? (using a basic object as a hash key)
<apeiros_> or you mean that exception was what you got when you tried?
<Tasser> apeiros_, exactly
<apeiros_> Tasser: then I fail to see what your problem is
<apeiros_> it's exactly as I said
Abbas5 is now known as Abbas|
<lupine_85> hmm. no threads, no bigdecimal
<apeiros_> only almost all objects, not all objects can. if there's no #hash or #eql? method, the object can't be used as a hash key…
davidpk is now known as dpk
<Tasser> apeiros_, yep, nothing further to mention
jasonLas_ has quit [Remote host closed the connection]
ABK has quit [Ping timeout: 244 seconds]
<nateberkopec> How can I do something like Array#include? but with a regex?
* Hanmac giggles
asobrasil has joined #ruby
<apeiros_> Tasser: you confused me…
<apeiros_> nateberkopec: Array#find
<apeiros_> alternatively enum_for(:grep, regex).first
Jake232 has quit [Quit: Computer has gone to sleep.]
twinturbo has joined #ruby
<nateberkopec> apeiros: ooo, enum_for is what I'm looking for. grazie.
mucker has quit [Quit: leaving]
itnomad has quit [Quit: Leaving]
t_j has joined #ruby
* apeiros_ would use find… but hurray for complex solutions :)
<t_j> can someone tell me if this scope of msg is correct in this code? http://pastebin.com/W5amGwPK
jeff_sebring has quit [Quit: Leaving]
<Hanmac> nateberkopec: like this? array.find(&regex.method(:match))
mengu has quit [Remote host closed the connection]
<Hanmac> jrajav try to restart the bot ;P
prometheus has quit [Ping timeout: 245 seconds]
<apeiros_> Hanmac: =~ is faster
<apeiros_> (does not construct the match-data object)
<Hanmac> apeiros_ this is better yeah: array.find(&regex.method(:=~))
dsadj has joined #ruby
<lupine_85> jrajav, >>END { Kernel.system("ls /") }
mockra has joined #ruby
<lupine_85> I think it's safe, but it does lead to some delicious backtrace output
digitalcakestudi has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
<delinquentme> ok so I've got this ruby <> libgit2 gem called rugged .. and I'm attempting to traverse my commit history ( which I've got access to already )
wmoxam_ has joined #ruby
<delinquentme> now the commit history is represented as a Enumerable object
<delinquentme> how do I crack into these?
cjs226 has quit []
mockra has quit [Remote host closed the connection]
dsadj has quit []
v0n has joined #ruby
codespectator has joined #ruby
randomautomator has joined #ruby
otters has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
JohnBat26 has joined #ruby
fantazo has joined #ruby
vvgomes has joined #ruby
drknus has joined #ruby
IPGlider has quit []
digitalcakestudi has joined #ruby
drknus has quit [Client Quit]
eataix has quit [Quit: ZNC - http://znc.in]
s1n4 has joined #ruby
chee has left #ruby ["Leaving"]
<lupine_85> >>Method
<al2o3cr> lupine_85: (Class) Method
jonathanwallace has joined #ruby
<workmad3> >>STDIN
<al2o3cr> workmad3: (String) "Nice try, Mon_Ouie"
<workmad3> heh
<workmad3> >> gets
<al2o3cr> workmad3: (String) "NoMethodError: private method `gets' called for \"Nice try, Mon_Ouie\":String"
<workmad3> >> self
theRoUS has quit [Remote host closed the connection]
<al2o3cr> workmad3: (Object) main
<workmad3> >> self.gets
<al2o3cr> workmad3: (String) "NoMethodError: private method `gets' called for main:Object"
<workmad3> >> self.send('gets')
<al2o3cr> workmad3: (String) "NoMethodError: private method `gets' called for \"Nice try, Mon_Ouie\":String"
* rking shakes head.
<workmad3> >> self.send('ge''ts')
<al2o3cr> workmad3: (String) "NoMethodError: private method `gets' called for \"Nice try, Mon_Ouie\":String"
<workmad3> :D
<workmad3> rking: gotta check these things :P
<workmad3> jrajav: hey, could you get it so it says 'Nice try, <irc nick>' in that string? ;)
SeanLazer has quit [Quit: SeanLazer]
<Hanmac> workmad3 same in:
<Hanmac> >> clone
<al2o3cr> Hanmac: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
<workmad3> >> exit 2
<al2o3cr> workmad3: (String) "NameError: undefined local variable or method `exit' for main:Object"
baroquebobcat has quit [Quit: baroquebobcat]
t_j has left #ruby ["useless channel"]
<workmad3> Hanmac: nah, that one seems accurate... you probably are to blame :P
jjbohn has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
iori has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
* Hanmac puts a trap ... it will be funny when the tap activates itself :P
peterhellberg has quit [Remote host closed the connection]
jjbohn has quit [Client Quit]
andrewh has quit [Ping timeout: 246 seconds]
<jrajav> I'm actually just going to set them all to nil
<jrajav> As much fun as "nice try" is
dv310p3r has joined #ruby
al2o3cr has quit [Remote host closed the connection]
<jrajav> Hanmac: Very funny
<lupine_85> jrajav, are you planning on requiring most of the standard library before running it?
<jrajav> Hanmac: Very funy
ddoucette has quit [Read error: Connection reset by peer]
<Hanmac> jrajav did you detect it ? :P
<jrajav> oops
<jrajav> Hanmac: After you said that I ls -l'ed :P
headius has joined #ruby
nemesit has quit [Quit: Leaving...]
<jrajav> lupine_85: Like?
Jay_Levitt has joined #ruby
<lupine_85> I can get Marshal.load to read "some" bytes from /etc/passwd
<lupine_85> if I had yaml, I could probably get further
deryl-android has joined #ruby
vvgomes has quit [Ping timeout: 240 seconds]
andrewh has joined #ruby
<lupine_85> hang on, I'm being thick
<jrajav> Hanmac: You got at it through STDOUT, right?
<lupine_85> Marshal's reading the string "/etc/password", not opening the file
<lupine_85> derp
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> >> STDIN
<al2o3cr> jrajav: (NilClass) nil
<jrajav> >> STDOUT
<al2o3cr> jrajav: (NilClass) nil
<jrajav> Sorry, fun's over
<jrajav> Hanmac: You chmod'ed using that right? ^^
<hoelzro> >> global_variables
<al2o3cr> hoelzro: (NilClass) nil
<hoelzro> >> ObjectSpace
<al2o3cr> hoelzro: (NilClass) nil
<hoelzro> nice =)
<jrajav> >>END { Kernel.system("ls /") }
<al2o3cr> jrajav: (NilClass) nil
jjbohn has joined #ruby
duder has joined #ruby
hadees has quit [Quit: hadees]
freeayu has quit [Quit: 离开]
duder has quit [Client Quit]
lectrick has joined #ruby
paolooo has joined #ruby
rohit has quit [Quit: Leaving]
iamjarvo has quit [Quit: Leaving...]
fearoffish has joined #ruby
vvgomes has joined #ruby
SQLStud has joined #ruby
Shrink has quit [Ping timeout: 240 seconds]
punkrawkR has joined #ruby
xaq has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<shevy> we are not making any progress here
<shevy> all the fun parts were removed
verto is now known as verto|off
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
geekbri has quit [Remote host closed the connection]
Tomasso has joined #ruby
rutkla has quit [Read error: Connection reset by peer]
trope has quit [Quit: trope]
greenysan has joined #ruby
faen has joined #ruby
hadees has joined #ruby
dekroning has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
cjs226 has joined #ruby
abra has quit [Ping timeout: 276 seconds]
berserkr has quit [Quit: Leaving.]
jonathanwallace has quit [Remote host closed the connection]
binaryplease has quit [Quit: WeeChat 0.3.8]
jonathanwallace has joined #ruby
tewecske has joined #ruby
Shrink has joined #ruby
deryl-android is now known as deryldoucette
vvgomes has quit [Ping timeout: 240 seconds]
geekbri has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
shevy has quit [Ping timeout: 252 seconds]
shashin has joined #ruby
jjbohn has quit [Read error: Connection reset by peer]
jprovazn is now known as jprovazn_away
jjbohn has joined #ruby
jlogsdon has joined #ruby
davidcelis has quit [Quit: K-Lined.]
Markvilla has joined #ruby
binaryplease has joined #ruby
malkomalko has joined #ruby
sevvie has quit [Quit: sevvie]
<Spooner> >> "sandboxes are boring"
<al2o3cr> Spooner: (NilClass) nil
tiripamwe has quit [Ping timeout: 248 seconds]
<Spooner> jrajav Shouldn't that return a string, not nil?
asteve has joined #ruby
<rking> jrajav: How are you handling basic DoS type things? Like 100000000000000.times do { … }
<asteve> I want to access module B which has class C from another module A in the same directory structure; do I include the module or require?
<rking> Urr, not "do {". =)
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<Spooner> Again, not sure the Class info is necessary, since if I want class, I'd ask for it. s = "s"; [s, s.class]
<Spooner> rking : It just times out.
baroquebobcat has joined #ruby
<jrajav> Spooner: It's intended more for beginners
<Hanmac> >> [1]
<al2o3cr> Hanmac: (NilClass) nil
<Spooner> asteve include and require are completely different things; not sure what you mean.
<jrajav> :/
<jrajav> What's going on here
<Hanmac> yeah its very nil :P
<hoelzro> >> puts 'hi'
<al2o3cr> hoelzro: (NilClass) nil
<hoelzro> =(
Abbas| has quit [Ping timeout: 255 seconds]
<asteve> Spooner: how would I access module B from inside module A?
<Hanmac> asteve B::A
<Spooner> jrajav : Yes, but beginners are being told something which is mostly superfluous and non-consistant with ther result they'd get from irb/pry.
vvgomes has joined #ruby
<jrajav> >> 1
<al2o3cr> jrajav: (NilClass) nil
<asteve> Hanmac: I don't think that's right; maybe I'm asking the wrong question
<jrajav> double-ewe tee eff
<jrajav> Wasn't this just working?
<Hanmac> jrajav it may be the problem with "STDOUT" :P
<asteve> module B, class C; B::C; but I need to access this from module A
<asteve> different files in the same directory structure
<jrajav> Hanmac: D'oh!
<hoelzro> asteve: B::C?
<Spooner> asteve : You just use B::C
<asteve> that's too easy
<hoelzro> the directory structure doesn't matter
<hoelzro> it's not like Python
<Hanmac> asteve i can do it more complcated if you want
nari has joined #ruby
<jrajav> Hanmac: So, uh…. wait. This is an impossible problem to solve then. How do I print out the output while keeping STDOUT inaccessible?
<Spooner> Doesnt' matter where you are accessing it from. If you have a B in A, then you'd need to do ::B::C (use the global B, not A::B).
<hoelzro> jrajav: how are you evaluating the code?
<hoelzro> in a subprocess?
<hoelzro> via eval?
undersc0re has joined #ruby
shevy has joined #ruby
<jrajav> Mon_Ouie: Bot seems broken right now
<hoelzro> a thread?
<hoelzro> =(
<Mon_Ouie> Oh, that explains a lot :p
<Tasser> >>binding.eval(96.chr + "ls /" + 96.chr)
<al2o3cr> Tasser: (NilClass) nil
<jrajav> Hanmac: I can't clear STDOUT, because then I can't p or puts. I can't not clear STDOUT because then IO is accessible
<jrajav> D:
<Tasser> ... whut?
<jrajav> Wait. I could just disable calling Object#class on STDOUT
<Hanmac> hoelzro its because when someone (or i) breaks the ruby, the bot should be suvive that
<jrajav> What's the best way to do that?
<Tasser> >> eval(96.chr + "ls /" + 96.chr)
<al2o3cr> Tasser: (NilClass) nil
<hoelzro> Hanmac: right; I just think a subprocess would be better
<Mon_Ouie> jrajav: Same way sandrbox make classes and constants inaccessible: it only needs to be inaccessible in the sandbox
<jrajav> Mon_Ouie: I'm printing out the result in the sandbox, though
<jrajav> Wait. No I'm not
andrewh has quit [Ping timeout: 246 seconds]
jimeh3 has joined #ruby
<jrajav> Wait a minute. I'm not doing puts inside the sandbox.
<jrajav> So why IS it just giving back nil?
cakehero has joined #ruby
<Mon_Ouie> You can just stdin, stdout, stderr = $stdin, $stdout, $stderr; (remove global_variables and constants); run the sandbox; use the local variables
ukd1 has joined #ruby
<jrajav> The sandbox is completely separate from the surrounding code afaict
axl_ has joined #ruby
<jrajav> It gives me back an array with the expression results
andrewh has joined #ruby
<Mon_Ouie> Well, where's the code?
<jrajav> This is as good a time as any to throw it on github
philcrissman has joined #ruby
tiripamwe has joined #ruby
<jrajav> And I might as well bring it down while it's not even working
<jrajav> :/
al2o3cr has quit [Remote host closed the connection]
jasonLaster has joined #ruby
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
apeiros_ has joined #ruby
tiripamwe has quit [Client Quit]
tiripamwe has joined #ruby
savage- has joined #ruby
MasterIdler has joined #ruby
<shevy> hehe
jonathanwallace has joined #ruby
an2nb2 has quit [Quit: Leaving]
flip_digits has joined #ruby
jorge has joined #ruby
jayvan has joined #ruby
<Tasser> jrajav, yer bot?
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
geekbri has quit [Remote host closed the connection]
elhu has quit [Quit: Computer has gone to sleep.]
nacengineer has quit [Ping timeout: 252 seconds]
s_man has joined #ruby
vertroa has joined #ruby
<jrajav> Okay.
geekbri has joined #ruby
<jrajav> I shouldn't be doing this
ryh has joined #ruby
<jrajav> But here it is
malkomalko has quit [Read error: Connection reset by peer]
<jrajav> DON'T JUDGE ME
<jrajav> I know it's hacky and horrible T_T
<s_man> Hi, I have a simple ruby code and I wold like to run it in an rails app. Do I have to call the ruby.rb file or can I just pass the code to the html file
jonathanwallace has quit [Ping timeout: 248 seconds]
iamjarvo has joined #ruby
<Hanmac> s_man: goto #rubyonrails
<s_man> ok thanks
Eldariof-ru has quit [Read error: Operation timed out]
<jrajav> Also, should be obvious, but it requires the jerk node module and the Sandrbox ruby gem
<jrajav> If you actually wanted to run it
chimkan has joined #ruby
mneorr1 has quit [Quit: Leaving.]
<jrajav> So, to recap: Currently the bot returns (NilClass) nil for everything, and I have no clue why. I'm assuming it has something to do with STDOUT being set to nil.
[diecast] has joined #ruby
<shevy> lol
nari has quit [Ping timeout: 244 seconds]
<shevy> now you yourself broke it :>
<jrajav> However, that's kind of necessary to avoid access to the IO class. Alternatively I could block Object#class for just STDOUT. Anyone have an idea how I'd do that?
<jrajav> Wait why don't I just remove_instance_method
vertroa has quit [Client Quit]
vvgomes has quit [Ping timeout: 246 seconds]
vertroa has joined #ruby
benson has joined #ruby
<Hanmac> jrajav you can remove #class only for STDOUT ... but it does not prevent me from using it
<jrajav> It doesn't look like Sandrbox needs stdout to do its magic
<jrajav> Ahhhhh so confused
Rochefort has quit [Remote host closed the connection]
vvgomes has joined #ruby
<Hanmac> did you try to use :STDOUT with the bad_constants ?
<jrajav> Trying that now actually
<jrajav> Heh, wow
<jrajav> <@jrajav> >> 1 + 3
<jrajav> <al2o3cr> jrajav: (String) "TypeError: #<IO:<STDOUT>> is not a symbol"
<jrajav> Sandrbox DOES use stdout somehow
<jrajav> But I can't figure out where
<Mon_Ouie> jrajav: Erm, the Ruby code is very hard to read though
<jrajav> Mon_Ouie: Yeah sorry
<Mon_Ouie> Why not already putting it in an external file?
<jrajav> Because then I can't magically inline message.match_data[1] as easily
<Mon_Ouie> Surely you can do IO
<jrajav> meeeeeeh
hoelzro is now known as hoelzro|away
<jrajav> I gotta go for now. Sorry, the bot will be gone for a while today. :(
xorigin has quit [Quit: leaving]
<jrajav> PM me if you figure out anything more
sendoushi has quit [Ping timeout: 244 seconds]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
nemesit has joined #ruby
elhu has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
umttumt has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
berserkr has joined #ruby
rakm has joined #ruby
vvgomes has joined #ruby
bluOxigen has quit [Ping timeout: 248 seconds]
WellMux has joined #ruby
ForSpareParts has quit [Disconnected by services]
ForSpareParts has joined #ruby
DrShoggoth has joined #ruby
aantix has joined #ruby
liluo has joined #ruby
aantix has quit [Read error: Connection reset by peer]
tfitts has quit [Quit: Leaving]
aantix has joined #ruby
aantix has quit [Read error: Connection reset by peer]
resure has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
mfcabrera has quit [Ping timeout: 240 seconds]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
delinquentme has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
tfitts has joined #ruby
sevvie has joined #ruby
w0lverine has joined #ruby
aantix has joined #ruby
afwefawefawfewa has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
Vert has quit [Ping timeout: 252 seconds]
niklasb has quit [Quit: WeeChat 0.3.8]
elhu has joined #ruby
ianbrandt has joined #ruby
WellMux has quit []
jonathanwallace has joined #ruby
chylli has quit [Remote host closed the connection]
zodiak has quit [Read error: No route to host]
Jake232 has joined #ruby
davidcelis has joined #ruby
afwefawefawfewa has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
havenn has joined #ruby
Criztian has quit []
Hawklord has joined #ruby
niklasb has joined #ruby
zodiak has joined #ruby
ken_barber has joined #ruby
<ForSpareParts> Have you guys made extensive use of any Markdown gems? I'm looking into Kramdown and I can't figure out how it decides whether parsing tasks go to the block-level or span-level handlers.
lunitikcalm has quit [Remote host closed the connection]
i0n has joined #ruby
lunitikcalm has joined #ruby
stkowski has joined #ruby
verto|off is now known as verto
Z_Mass has joined #ruby
verbad has joined #ruby
tvw has quit [Remote host closed the connection]
Wizek has quit [Ping timeout: 246 seconds]
goraxe has quit [Read error: Connection reset by peer]
codespectator has quit [Ping timeout: 248 seconds]
lunitikcalm has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
geekbri has quit [Remote host closed the connection]
Criztian has joined #ruby
jhunter_ has quit [Ping timeout: 255 seconds]
resure has joined #ruby
jhunter has joined #ruby
EricKamsky_ has quit [Ping timeout: 246 seconds]
codespectator has joined #ruby
pdtpatrick has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
cirwin has joined #ruby
<s_man> can someone tell me please how to run a ruby code in an rails app?
<apeiros_> s_man: you do realize that your whole rails app *is* ruby code?
methodmat312 has joined #ruby
<methodmat312> hi, really stupid question, but it's friday
geekbri has joined #ruby
<methodmat312> i am trying to split a string with unicode char 8722
<sernin> How to change this: h = {host: %w[a b], search: [1,2]} to a = %w[a1,a2,b1,b2]
<methodmat312> rails 1.9.3
quest88 has quit [Quit: quest88]
<methodmat312> oops
<methodmat312> ruby 1.9.3
<apeiros_> methodmat312: "\uHHHH"
<apeiros_> the \u escape also works in a regex literal
Eldariof-ru has joined #ruby
<sernin> i somehow think there is a method for this but can't remember it. or along the lines of it.
headius has quit [Quit: headius]
chimkan_ has joined #ruby
<apeiros_> sernin: %w is not , separated
<methodmat312> thx aperios
<methodmat312> apeiros
<apeiros_> and there's no single method to do that
fbernier has quit [Ping timeout: 245 seconds]
<apeiros_> you'd zip host with search
<apeiros_> oh, wait, you want more than zip
maletor has joined #ruby
<sernin> zip, that was what i was thinking of
<apeiros_> you wan't product
<Tasser> apeiros_, sometimes people just agree with you ;-)
<apeiros_> with zip you get a1,b2
<apeiros_> Tasser: you didn't make it seem like you agreed :-p
voodoofish has quit [Ping timeout: 245 seconds]
<sernin> product does a cartesian product or what-have you, yes? all possible combinations?
<apeiros_> arr, s/wan't/want/
<apeiros_> sernin: yes
<apeiros_> [:a, :b].product([1,2]) # => [[:a, 1], [:a, 2], [:b, 1], [:b, 2]]
chimkan_ has quit [Remote host closed the connection]
<sernin> apeiros_: many thanks, good sir
<apeiros_> yw
chimkan_ has joined #ruby
IrishGringo has joined #ruby
wallerdev has quit [Quit: wallerdev]
khakimov has joined #ruby
havenn has quit [Remote host closed the connection]
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
umttumt has quit [Remote host closed the connection]
methodmat312 has quit [Quit: Leaving]
wallerdev has joined #ruby
umttumt has joined #ruby
aantix_ has joined #ruby
AlbireoX has quit [Read error: Operation timed out]
aantix_ has quit [Read error: Connection reset by peer]
hynkle has quit [Read error: Connection reset by peer]
* apeiros_ wonders whether s_man will come up with a follow-up question…
<WhereIsMySpoon> has anyone here used std::fstream from the standard C libs?
fforbeck has joined #ruby
<Tasser> WhereIsMySpoon, err, #C or #c++?
aantix has quit [Ping timeout: 245 seconds]
<Hanmac> Tasser is c++
tommyvyo has quit [Quit: Computer has gone to sleep.]
<WhereIsMySpoon> ive had some unpleasant experiences there
<Hanmac> WhereIsMySpoon: show it to me
aantix has joined #ruby
<WhereIsMySpoon> Hanmac: basically, calling the destructor of std::fstream causes a crash
apok has joined #ruby
<virunga> WhereIsMySpoon: are u calling the destructor explicitly?
<WhereIsMySpoon> virunga: no
<WhereIsMySpoon> well
<WhereIsMySpoon> it happens either way
cirwin has quit [Ping timeout: 245 seconds]
\13k has quit [Quit: Leaving]
<WhereIsMySpoon> implicitly or explicitly
<WhereIsMySpoon> the crash happens
<virunga> WhereIsMySpoon: use valgrind
<WhereIsMySpoon> virunga: what's valgrind
cezar has joined #ruby
<virunga> WhereIsMySpoon: search it online it's awesome and usefull to debug
<WhereIsMySpoon> virunga: that doesnt work on windows
<virunga> no
<WhereIsMySpoon> no use then
AlbireoX has joined #ruby
s_man has left #ruby ["Leaving"]
headius has joined #ruby
<Hanmac> whereismyspoon try to make a pastie for me
undersc0re has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<WhereIsMySpoon> Hanmac: there is nothing to pastie, literally when the destructor is called, the program crashes
bier has quit [Ping timeout: 246 seconds]
<virunga> seems the name of a cake... pastie
<virunga> make me a pastie
<virunga> woman
<WhereIsMySpoon> <_>
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Hanmac> i mean of the sourcecode
<Muz> There's a difference in the pronunciation of the 'a'. ¬_¬
hynkle has joined #ruby
<WhereIsMySpoon> Hanmac: you mean the source code of std::fstream?
codespectator has quit [Quit: Computer has gone to sleep.]
<WhereIsMySpoon> its in the standard C libs
<virunga> i've an instinct for this
<virunga> ahaha
Berglund has joined #ruby
lxsameer has quit [Max SendQ exceeded]
<Mon_Ouie> Of your code that is using it, most likely
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<WhereIsMySpoon> void main()
<WhereIsMySpoon> {
<WhereIsMySpoon> std::fstream fs;
<WhereIsMySpoon> }
mrsolo has joined #ruby
<Mon_Ouie> Also, it isn't (it's C++) and not all compilers use the same implementation
<WhereIsMySpoon> that's it
cj3kim has joined #ruby
<WhereIsMySpoon> i meant c++, sorry
<virunga> -.-'
<virunga> that crashes?
<WhereIsMySpoon> yes
lxsameer has quit [Max SendQ exceeded]
<virunga> WhereIsMySpoon: why are you asking on #ruby? :D
voodoofish has joined #ruby
rcassidy has joined #ruby
<WhereIsMySpoon> because #c and #c++ are horrible places
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<virunga> i know they
<WhereIsMySpoon> and #ruby is lovely
<WhereIsMySpoon> as to why im on #ruby, ive done some ruby before
cezar has quit [Quit: Leaving]
lxsameer has quit [Max SendQ exceeded]
<Muz> ...
<virunga> WhereIsMySpoon: why do you want to use c++?
<WhereIsMySpoon> why not?
lxsameer has joined #ruby
<Hanmac> virunga because i use c++ too to boost my ext-gems
<WhereIsMySpoon> i wish to learn more about it
<WhereIsMySpoon> therefore i program in it
<WhereIsMySpoon> Mon_Ouie: Hanmac: any ideas?
<WhereIsMySpoon> or is it just an unfixable bug in the source of fstream
lxsameer has quit [Max SendQ exceeded]
<Mon_Ouie> Runs just fine here, so I'd guess bad compiler options
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<lectrick> Why does String#to_i return 0 instead of nil when the string actually doesn't have any numbers?
umttumt_ has joined #ruby
umttumt_ has quit [Remote host closed the connection]
<virunga> lectrick: ask to Matz
<Hanmac> lectrick because some methods are nice to the user
<Hanmac> WhereIsMySpoon: i need your sourcecode first
<WhereIsMySpoon> Mon_Ouie: hm, i just tried it in a new project and it worked fine there
tiripamwe has quit [Ping timeout: 240 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
<WhereIsMySpoon> le sigh
lxsameer has quit [Max SendQ exceeded]
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
lxsameer has joined #ruby
abdulkarim has joined #ruby
<virunga> WhereIsMySpoon: there's also c++-base for noobs i believe
<virunga> there they use more kindness
tommyvyo has joined #ruby
<lectrick> Hanmac: "nice"?
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
lxsameer has quit [Max SendQ exceeded]
brianpWins has joined #ruby
<rcassidy> ada2358: sup
umttumt has quit [Ping timeout: 245 seconds]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
<rcassidy> >> p "I wonder if the bot is here"
<Mon_Ouie> Nope
kenichi has joined #ruby
<rcassidy> aw
<Mon_Ouie> You know you don't have to send it a message to find out if it's here? ;)
<rcassidy> yeah i guess but it was more fun that way
tiripamwe has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
bier has joined #ruby
<Hanmac> Mon_Ouie did you notic what i did the last time when the bot was there? i changed the ~/.bash_profile :P
mfcabrera has joined #ruby
Taichou has joined #ruby
jasonLaster has quit [Remote host closed the connection]
apok has quit [Remote host closed the connection]
apok has joined #ruby
jasonLaster has joined #ruby
Z_Mass has quit [Ping timeout: 244 seconds]
kevincolyar has joined #ruby
<kevincolyar> anyone know a message i can send to an object to get the object right back?
<kevincolyar> somthing line 3.send(:self)
<kevincolyar> wont let me :dup or :clone
verbad has quit []
<Hanmac> oO why do you need it? ... you can store mostly everything in a variable
gmci has quit [Quit: Computer has gone to sleep.]
<Hanmac> kevincolyar show me where your actual problem is
<kevincolyar> i'm comparing class attributes and usually i can just send obj.send(attribute), but when i'm comparing things like numbers i just want the value of the object itself, not an attribute on the object
Taichou has quit [Ping timeout: 246 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
<kevincolyar> i'd like to say something like obj.send(:value) when i'm dealing with a "value" object
dross_ is now known as dross
jasonLaster has quit [Ping timeout: 248 seconds]
jorge has quit [Remote host closed the connection]
gmci has joined #ruby
bluenemo has quit [Remote host closed the connection]
<Hanmac> attribute == :self ? obj : obj.send(attribute)
rontec76 has joined #ruby
dnyy has joined #ruby
<kevincolyar> Hanmac: i've done that, just thought there might be something a little more elegant :)
khakimov has quit [Quit: Computer has gone to sleep.]
noyb has quit [Quit: Leaving.]
stkowski has quit [Quit: stkowski]
stkowski has joined #ruby
andrewh has quit [Ping timeout: 246 seconds]
noyb has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
akem has quit [Read error: Connection reset by peer]
<rontec76> Hi all, I'm getting the error "private method `load' called for MultiJson:Module" doing this "result = MultiJson.load(response.body, :symbolize_keys => true)" within a custom method.
user__ has joined #ruby
<rontec76> testing on my data from irb MultiJson.load works fine. Any thoughts on what I'm doing wrong?
adamkittelson has joined #ruby
ForSpareParts has quit [Ping timeout: 246 seconds]
bullicon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
linoj_ has joined #ruby
elhu has joined #ruby
<rontec76> I am loading up multi_json with require 'multi_json' at the beginning of my file as well so not sure if this is a bug or a scope issue that I"m understanding
ForSpareParts has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
ianbrandt has quit [Quit: ianbrandt]
linoj has quit [Ping timeout: 244 seconds]
<rodj> !AlleBucher Gertrude Chandler Warner - [Boxcar Children 001] - The Boxcar Children (retail) (epub).rar
<rodj> oops sorry, wrong window
<WhereIsMySpoon> virunga: c++-base doesn't exist
linoj_ has quit [Ping timeout: 244 seconds]
artOfWar has joined #ruby
ianbrandt has joined #ruby
cirwin has joined #ruby
cirwin has quit [Remote host closed the connection]
aantix_ has joined #ruby
scant has joined #ruby
banisterfiend` has joined #ruby
<WhereIsMySpoon> hey banister :)
jgrevich has joined #ruby
ForSpareParts|lo has joined #ruby
aantix has quit [Ping timeout: 244 seconds]
aantix_ is now known as aantix
mrdodo has joined #ruby
jasonLaster has joined #ruby
<banisterfiend`> WhereIsMySpoon: if u talk to me ill have u arrested
<WhereIsMySpoon> nice to see you too
banisterfiend has quit [Ping timeout: 248 seconds]
Goles has joined #ruby
jbw has quit [Ping timeout: 252 seconds]
<davidcelis> caan you feeeel the loooove toniiiiight
atmosx has joined #ruby
shadoi has joined #ruby
xaq has quit [Read error: Connection reset by peer]
GoGoGarrett has quit [Remote host closed the connection]
xaq has joined #ruby
<rking> Haha
mahmoudimus has joined #ruby
ringotwo has joined #ruby
bricker88 has joined #ruby
banisterfiend` has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
sevvie has quit [Quit: sevvie]
pskosinski has quit [Ping timeout: 245 seconds]
binaryplease has quit [Quit: WeeChat 0.3.8]
jasonLaster has quit [Ping timeout: 240 seconds]
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
nyuszika7h has quit [Changing host]
nyuszika7h has joined #ruby
jasonLaster has joined #ruby
AlbireoX_ has joined #ruby
jbw has joined #ruby
jonathanwallace has joined #ruby
yakko has quit [Remote host closed the connection]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
krusty_ar has quit [Read error: Connection reset by peer]
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
Jake232 has quit [Ping timeout: 245 seconds]
ForSpareParts has quit [Disconnected by services]
ForSpareParts|lo is now known as ForSpareParts
krusty_ar has joined #ruby
jayvan has quit [Ping timeout: 255 seconds]
jayvan has joined #ruby
phinfonet has joined #ruby
MasterIdler_ has joined #ruby
cjs226 has quit []
MasterIdler_ has quit [Client Quit]
mascool has joined #ruby
MasterIdler_ has joined #ruby
MasterIdler has quit [Ping timeout: 248 seconds]
MasterIdler_ is now known as MasterIdler
chichou_ has quit [Remote host closed the connection]
jrajav has joined #ruby
uris has quit [Ping timeout: 240 seconds]
liluo has quit [Remote host closed the connection]
shashin has quit [Quit: shashin]
<jrajav> Hanmac: You around?
fbernier has joined #ruby
sevvie has joined #ruby
<Hanmac> yeah, should i break something again?
qwerxy_ has quit [Quit: offski]
kvirani has joined #ruby
<jrajav> I'm wondering if you have any ideas about keeping STDOUT around, but disallowing getting IO from it
<jrajav> I tried adding config.bad_methos << [:STDOUT, :class]
<jrajav> That breaks Sandrbox too
<jrajav> *bad_methods
<jrajav> (I have no idea if that's the right way to do it)
<Hanmac> and bad_constants << :STDOUT dont work too?
<jrajav> Yeah
<jrajav> That is; it does what it's supposed to, but then Sandrbox can't do something it needs to to capture the output
<Hanmac> :P
<jrajav> I'm assuming it's doing something hacky liking hooking stdout and doing 'p' on each expression
zii has quit [Ping timeout: 252 seconds]
resure has quit [Ping timeout: 240 seconds]
apok_ has joined #ruby
<jrajav> This is what I get:<al2o3cr> stderr: /home/jrajav/.gem/ruby/1.9.1/gems/sandrbox-0.1.0/lib/sandrbox/value.rb:90:in `const_defined?': wrong constant name #<IO:0x000000014163c8> (NameError)
<jrajav> for bad_constants << :STDOUT
<banisterfiend> jrajav: why dont u just delete STDOUT.send
manizzle has quit [Read error: Connection reset by peer]
<banisterfiend> or how were they getting IO from it?
Chaazd has joined #ruby
<virunga> WhereIsMySpoon: it's c++-basic
<jrajav> banisterfiend: Yeah that was it
<Hanmac> jrajav make a post there: https://github.com/Veraticus/Sandrbox/issues
bluOxigen has joined #ruby
jrist is now known as jrist-afk
<Hanmac> banisterfiend: Object.instance_method("cla"+ "ss").bind(STROUT).call
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
apok has quit [Ping timeout: 240 seconds]
apok_ is now known as apok
<banisterfiend> Hanmac: good point
<jrajav> I think I'm doing it wrong >_>
<jrajav> stderr: /home/jrajav/.gem/ruby/1.9.1/gems/sandrbox-0.1.0/lib/sandrbox/value.rb:76:in `call': undefined method `define_method' for #<IO:<STDOUT>> (NoMethodError)
<rontec76> anyone know why I would get "private method `load' called for MultiJson:Module"? I've verified that "load" is not a private method. I can call that just fine from irb.
<jrajav> for config.bad_methods << [:STDOUT, :send]
droptable has quit [Ping timeout: 248 seconds]
<Mon_Ouie> I think you that config expects a class name for some reason
pskosinski has joined #ruby
<jrajav> But what's the direct class name?
kidoz has joined #ruby
<Mon_Ouie> There's none. The class object is STDOUT.singleton_class
<jrajav> Wait. send is a method of Object
<jrajav> lol
<jrajav> I don't want to disable Object#send and Object#instance_method
<jrajav> Not without a way better reason than this
<jrajav> I think…. I'll just leave the hole in and file an issue with Sandrbox
<Mon_Ouie> Well, in the end, I think you're going to remove so many features that many simple examples won't work
<jrajav> Well the only things that are really removed right now are some specific, unsafe Kernel and IO methods that there aren't really any use cases for
<jrajav> And ObjectSpace
jeff_sebring has joined #ruby
<jrajav> I know it seems like I've been removing a lot, but I haven't. I've just been trying things one by one to try to block IO
Ancient has joined #ruby
<Chaazd> I am quite puzzled as to why this will not work: http://pastebin.com/gw6b9EJ5 It's meant to take a sentence, then create a random sentence of the same length. The first letter of the sentence is then pitched against the first element of a shuffled random letter array. If it matches it replaces the first letter of the random word with the first letter of the inputed word. This then goes on to the second letter. However this i
<Chaazd> input is only one character. It is running the while loop, but it seems the if statement is only run once.
NimeshNeema has quit [Excess Flood]
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> The code is scarier than the description
patronus has joined #ruby
NimeshNeema has joined #ruby
jbpros has quit [Quit: May the Cuke be with you!]
Bish_ has quit [Quit: ZNC - http://znc.sourceforge.net]
jbpros has joined #ruby
lkba has joined #ruby
parus has quit [Ping timeout: 246 seconds]
Bish has joined #ruby
tuxillo has quit [Ping timeout: 264 seconds]
nick_h has quit [Ping timeout: 264 seconds]
naquad has quit [Ping timeout: 265 seconds]
KillerFox has quit [Ping timeout: 265 seconds]
parus has joined #ruby
<scant> i want to convert strings like "new-string-here" to "newStringHere". how do i do this with gsub? my guess is gsub!(/-(.)/,$1.upcase) but idk what i should put where $1 is
nick_h has joined #ruby
telling has quit [Ping timeout: 260 seconds]
wereHamster has quit [Ping timeout: 260 seconds]
telling has joined #ruby
patronus_ has quit [Ping timeout: 265 seconds]
cjk101010 has quit [Ping timeout: 265 seconds]
wereHamster has joined #ruby
KillerFox has joined #ruby
<Mon_Ouie> use gsub's block form
al2o3cr has joined #ruby
<jrajav> Okay, well. I'm giving up for now. STDIN and STDOUT are both accessible. You can use them to get IO if you really want. Just.. don't. :P
<jrajav> >> 'y u so broek'
<al2o3cr> jrajav: (String) "y u so broek"
<banisterfiend> >> ls -M
stoffus has quit [Ping timeout: 246 seconds]
aantix has quit [Read error: Connection reset by peer]
<jrajav> Hanmac: Could you mock up a simple line showing that IO is accessed?
<banisterfiend> >> require 'set' \n Set.instance_method(:initialize).source_location
<jrajav> Hanmac: Like, touch a file or something?
<banisterfiend> >> require 'set' && Set.instance_method(:initialize).source_location
aantix has joined #ruby
<jrajav> require is disabled
<jrajav> Hanmac: I'll just copy-paste in the issue
<jrajav> Hanmac: And I'll make a separate issue for the semicolon line breaking
wallerdev has quit [Quit: wallerdev]
<jrajav> >> "This; breaks'
<jrajav> err
<jrajav> >> "This; breaks"
<jrajav> al2o3cr: ?
<jrajav> al2o3cr: ping
<jrajav> Um.
fbernier has quit [Ping timeout: 245 seconds]
adeponte has quit [Remote host closed the connection]
<jrajav> Wow. the bot hung.
Ancient has left #ruby ["Leaving"]
<Hanmac> was i the problem? :P
<Hanmac> >> STDOUT.send("cla"+"ss")
<Hanmac> >> TOPLEVEL_BINDING.eval("STDOUT").send("cla"+"ss")
<Hanmac> >> Object.instance_method("cla"+ "ss").bind(STROUT).call
jimeh3 has quit [Ping timeout: 240 seconds]
<jrajav> wtf?
kidoz has quit [*.net *.split]
ianbrandt has quit [*.net *.split]
Berglund has quit [*.net *.split]
locriani has quit [*.net *.split]
tfitts has quit [*.net *.split]
rakm has quit [*.net *.split]
apeiros_ has quit [*.net *.split]
answer_42 has quit [*.net *.split]
b1rkh0ff has quit [*.net *.split]
rcs has quit [*.net *.split]
codora has quit [*.net *.split]
vDubG has quit [*.net *.split]
yellow5 has quit [*.net *.split]
RichieEvan_ has quit [*.net *.split]
Stalkr_ has quit [*.net *.split]
randym has quit [*.net *.split]
siamese has quit [*.net *.split]
oz has quit [*.net *.split]
dotemacs has quit [*.net *.split]
davidboy has quit [*.net *.split]
williamcotton has quit [*.net *.split]
Eiam has quit [*.net *.split]
gregorg has quit [*.net *.split]
beandip has quit [*.net *.split]
Guest61436 has quit [*.net *.split]
mattp_ has quit [*.net *.split]
withnale has quit [*.net *.split]
Godslastering has quit [*.net *.split]
echobravo has quit [*.net *.split]
cespare has quit [*.net *.split]
thomas has quit [*.net *.split]
_br_ has quit [*.net *.split]
passbe has quit [*.net *.split]
xea has quit [*.net *.split]
weeb1e_ has quit [*.net *.split]
nimred has quit [*.net *.split]
neonlex has quit [*.net *.split]
matled has quit [*.net *.split]
soulcake has quit [*.net *.split]
mlue has quit [*.net *.split]
KarlHungus has quit [*.net *.split]
__main__ has quit [*.net *.split]
lantins has quit [*.net *.split]
phrame has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
kevincolyar has quit [*.net *.split]
eighty4 has quit [*.net *.split]
end3r- has quit [*.net *.split]
<jrajav> I restarted the bot as al2o3cr2
Sp4rKy has quit [*.net *.split]
<jrajav> But he's not in here
<jrajav> I can see the IRC chan output from the bot. He's in a #ruby SOMEWHERE
<jrajav> lol
36DABVV2S has joined #ruby
vereteran has joined #ruby
kidoz has joined #ruby
tuxillo_ has joined #ruby
ianbrandt has joined #ruby
randym has joined #ruby
rakm has joined #ruby
RichieEvan_ has joined #ruby
codora has joined #ruby
yellow5 has joined #ruby
rcs has joined #ruby
Berglund has joined #ruby
siamese has joined #ruby
apeiros_ has joined #ruby
kevincolyar has joined #ruby
answer_42 has joined #ruby
tfitts has joined #ruby
dotemacs has joined #ruby
Stalkr_ has joined #ruby
davidboy has joined #ruby
oz has joined #ruby
vDubG has joined #ruby
locriani has joined #ruby
b1rkh0ff has joined #ruby
Eiam has joined #ruby
williamcotton has joined #ruby
gregorg has joined #ruby
beandip has joined #ruby
Guest61436 has joined #ruby
withnale has joined #ruby
echobravo has joined #ruby
Godslastering has joined #ruby
thomas has joined #ruby
_br_ has joined #ruby
mattp_ has joined #ruby
cespare has joined #ruby
passbe has joined #ruby
xea has joined #ruby
weeb1e_ has joined #ruby
mlue has joined #ruby
neonlex has joined #ruby
KarlHungus has joined #ruby
soulcake has joined #ruby
__main__ has joined #ruby
matled has joined #ruby
lantins has joined #ruby
nimred has joined #ruby
phrame has joined #ruby
zz_chrismcg has joined #ruby
eighty4 has joined #ruby
end3r- has joined #ruby
Sp4rKy has joined #ruby
asuka has quit [Ping timeout: 245 seconds]
<jrajav> I don't see join/parts; is there a netsplit?
asuka has joined #ruby
al2o3cr2 has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<jrajav> al2o3cr2: ping
<al2o3cr2> jrajav: pong
<Hanmac> >> TOPLEVEL_BINDING.eval("STDOUT").send("cla"+"ss")
<al2o3cr2> Hanmac: (Class) IO
<jrajav> Aha
<Hanmac> >> Object.instance_method("cla"+ "ss").bind(STROUT).call
ennui has quit [Ping timeout: 245 seconds]
<al2o3cr2> Hanmac: (String) "NameError: uninitialized constant STROUT"
benwoody_ has joined #ruby
<Hanmac> >> Object.instance_method("cla"+ "ss").bind(STDOUT).call
<al2o3cr2> Hanmac: (Class) IO
_adeponte has joined #ruby
<jrajav> >> Object.instance_method("class").bind(STDOUT).call
<al2o3cr2> jrajav: (NilClass) nil
<Hanmac> thats why i do "cla" + "ss"
Y_Ichiro_ has joined #ruby
Y_Ichiro_ has joined #ruby
iaj has joined #ruby
Berglund has quit [Ping timeout: 248 seconds]
erichmenge has joined #ruby
MasterIdler_ has joined #ruby
neonlex has quit [Quit: And... I'm gone!]
erichmenge has quit [Client Quit]
Asher has joined #ruby
neonlex has joined #ruby
workmad3 has joined #ruby
ben225 has joined #ruby
locriani has quit [Remote host closed the connection]
ben225 has quit [Client Quit]
ben225 has joined #ruby
<jrajav> > "This; should; break"
<jrajav> al2o3cr2: ping
<al2o3cr2> jrajav: pong
<jrajav> >> "This; should; break"
<al2o3cr2> jrajav: (String) "SyntaxError: sandrbox:2: unterminated string meets end of file"
<atmosx> my internet connection suck in 2 countries, it's incredible
Y_Ichiro has quit [Disconnected by services]
Markvilla has quit [Quit: Markvilla]
apok has quit [Remote host closed the connection]
KillerFox has quit [*.net *.split]
meskyanichi has quit [*.net *.split]
fugit has quit [*.net *.split]
felipe has quit [*.net *.split]
iaj_ has quit [*.net *.split]
Whoop has quit [*.net *.split]
tris has quit [*.net *.split]
Tasser has quit [*.net *.split]
hackeron has quit [*.net *.split]
psino has quit [*.net *.split]
zagabar has quit [*.net *.split]
tomaw has quit [*.net *.split]
jasond has quit [*.net *.split]
kloeri has quit [*.net *.split]
xsdg has quit [*.net *.split]
ixx has quit [*.net *.split]
AwesomeGarethMan has quit [*.net *.split]
er1c_ has quit [*.net *.split]
benwoody has quit [*.net *.split]
iosctr has quit [*.net *.split]
fred has quit [*.net *.split]
Shamgar has quit [*.net *.split]
lkba has quit [*.net *.split]
Axsuul has quit [*.net *.split]
emsilva has quit [*.net *.split]
ForSpareParts has quit [*.net *.split]
jgrevich has quit [*.net *.split]
dnyy has quit [*.net *.split]
gmci has quit [*.net *.split]
voodoofish has quit [*.net *.split]
w0lverine has quit [*.net *.split]
[diecast] has quit [*.net *.split]
punkrawkR has quit [*.net *.split]
s1n4 has quit [*.net *.split]
digitalcakestudi has quit [*.net *.split]
randomautomator has quit [*.net *.split]
nwest has quit [*.net *.split]
virunga has quit [*.net *.split]
banghouse has quit [*.net *.split]
g4 has quit [*.net *.split]
r126l has quit [*.net *.split]
beneggett has quit [*.net *.split]
Zespre has quit [*.net *.split]
sgronblo1 has quit [*.net *.split]
sinned has quit [*.net *.split]
cantonic has quit [*.net *.split]
ephemerian has quit [*.net *.split]
relix has quit [*.net *.split]
koshii has quit [*.net *.split]
mfridh has quit [*.net *.split]
Guest83725 has quit [*.net *.split]
SeySayux has quit [*.net *.split]
rizzy has quit [*.net *.split]
m_3 has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
eregon_ has quit [*.net *.split]
philips_ has quit [*.net *.split]
kalleth has quit [*.net *.split]
kennyvb has quit [*.net *.split]
laen_ has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
foolove has quit [*.net *.split]
mikalv has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
mksm has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
crodas has quit [*.net *.split]
any-key has quit [*.net *.split]
jmcphers has quit [*.net *.split]
wang has quit [*.net *.split]
Poapfel has quit [*.net *.split]
bnagy has quit [*.net *.split]
Gm4n_ has quit [*.net *.split]
Cork has quit [*.net *.split]
musl has quit [*.net *.split]
danheberden has quit [*.net *.split]
nahhh has quit [*.net *.split]
fforbeck has quit [*.net *.split]
welterde has quit [*.net *.split]
xorspark has quit [*.net *.split]
G has quit [*.net *.split]
babinho has quit [*.net *.split]
ohcibi has quit [*.net *.split]
alta has quit [*.net *.split]
stroem has quit [*.net *.split]
dominikh has quit [*.net *.split]
tessi has quit [*.net *.split]
ksk has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
ub|k has quit [*.net *.split]
simao has quit [*.net *.split]
jjbohn has quit [*.net *.split]
ctp has quit [*.net *.split]
lupine_85 has quit [*.net *.split]
wmoxam has quit [*.net *.split]
Hien has quit [*.net *.split]
nobdraisentone has quit [*.net *.split]
swistak35 has quit [*.net *.split]
sinful has quit [*.net *.split]
FlyingFoX has quit [*.net *.split]
krnlsndrs has quit [*.net *.split]
Azure has quit [*.net *.split]
dvolker has quit [*.net *.split]
knightblader has quit [*.net *.split]
gry has quit [*.net *.split]
Derander has quit [*.net *.split]
ggreer has quit [*.net *.split]
BeLucid has quit [*.net *.split]
jrbing has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
Drakevr has quit [*.net *.split]
vjt has quit [*.net *.split]
Koshian has quit [*.net *.split]
marienz has quit [*.net *.split]
elspeth has quit [*.net *.split]
klaas has quit [*.net *.split]
uxp has quit [*.net *.split]
cout has quit [*.net *.split]
xargoon has quit [*.net *.split]
phreax has quit [*.net *.split]
pavelz_ has quit [*.net *.split]
joschi has quit [*.net *.split]
Mchl has quit [*.net *.split]
beakerman has quit [*.net *.split]
fowl has quit [*.net *.split]
TheShadowFog has quit [*.net *.split]
blast_hardcheese has quit [*.net *.split]
rmc3 has quit [*.net *.split]
moos3 has quit [*.net *.split]
froy has quit [*.net *.split]
companion has quit [*.net *.split]
rlomax has quit [*.net *.split]
pzol has quit [*.net *.split]
masak has quit [*.net *.split]
dv_ has quit [*.net *.split]
derrida has quit [*.net *.split]
gogiel has quit [*.net *.split]
kstephens has quit [*.net *.split]
FriarTech has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
denstark has quit [*.net *.split]
jodell has quit [*.net *.split]
Speed has quit [*.net *.split]
Jb_ has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
s0ber has quit [*.net *.split]
MrWGW has quit [*.net *.split]
naz has quit [*.net *.split]
iamtakingiteasy has quit [*.net *.split]
blacktul_ has quit [*.net *.split]
Caius has quit [*.net *.split]
sj26 has quit [*.net *.split]
jeedey has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
examancer has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
Bauer has quit [*.net *.split]
jeekl has quit [*.net *.split]
brett has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
Jelco has quit [*.net *.split]
al2o3cr has quit [*.net *.split]
jbpros has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
scant has quit [*.net *.split]
bier has quit [*.net *.split]
tommyvyo has quit [*.net *.split]
zodiak has quit [*.net *.split]
niklasb has quit [*.net *.split]
nemesit has quit [*.net *.split]
axl_ has quit [*.net *.split]
ukd1 has quit [*.net *.split]
theRoUS has quit [*.net *.split]
lectrick has quit [*.net *.split]
Jay_Levitt has quit [*.net *.split]
twinturbo has quit [*.net *.split]
johnlcox has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
trollface has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
Guedes has quit [*.net *.split]
patricksroberts has quit [*.net *.split]
sepp2k has quit [*.net *.split]
johnb003 has quit [*.net *.split]
bairui has quit [*.net *.split]
piotr_ has quit [*.net *.split]
Guest89851 has quit [*.net *.split]
thone has quit [*.net *.split]
bglusma__ has quit [*.net *.split]
aempirei has quit [*.net *.split]
Xethron has quit [*.net *.split]
heftig has quit [*.net *.split]
busybox42 has quit [*.net *.split]
schwap has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
Taranis has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
DefV has quit [*.net *.split]
omry has quit [*.net *.split]
jrist-afk has quit [*.net *.split]
JStoker has quit [*.net *.split]
nuba has quit [*.net *.split]
mtfk has quit [*.net *.split]
ozzloy has quit [*.net *.split]
pradeepto has quit [*.net *.split]
strcrzy has quit [*.net *.split]
pfaff has quit [*.net *.split]
CodeVision has quit [*.net *.split]
kuranai|off has quit [*.net *.split]
zaiste has quit [*.net *.split]
Guest18939 has quit [*.net *.split]
undyingrage has quit [*.net *.split]
nullsign_ has quit [*.net *.split]
c0rn has quit [*.net *.split]
elliottcable has quit [*.net *.split]
rails has quit [*.net *.split]
Gate has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
stockholm has quit [*.net *.split]
fasta has quit [*.net *.split]
aef has quit [*.net *.split]
juha_ has quit [*.net *.split]
sspiff has quit [*.net *.split]
Nisstyre has quit [*.net *.split]
johnduhart has quit [*.net *.split]
zeen has quit [*.net *.split]
xorgnak has quit [*.net *.split]
imami|afk has quit [*.net *.split]
stat1x has quit [*.net *.split]
playmuc has quit [*.net *.split]
kiri has quit [*.net *.split]
UNIXgod has quit [*.net *.split]
madhatter has quit [*.net *.split]
kaen has quit [*.net *.split]
tightwork has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
Fraeon has quit [*.net *.split]
Guest5694 has quit [*.net *.split]
drPoggs has quit [*.net *.split]
pipopopo has quit [*.net *.split]
crazed has quit [*.net *.split]
shadoi has quit [*.net *.split]
v0n has quit [*.net *.split]
SirFunk has quit [*.net *.split]
grillo has quit [*.net *.split]
SphericalCow has quit [*.net *.split]
xclite has quit [*.net *.split]
ttilley has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
vandemar has quit [*.net *.split]
dju has quit [*.net *.split]
perryh_ has quit [*.net *.split]
mattrae has quit [*.net *.split]
Layke has quit [*.net *.split]
Aenigma has quit [*.net *.split]
mafs has quit [*.net *.split]
sejo has quit [*.net *.split]
ddv has quit [*.net *.split]
kartouch has quit [*.net *.split]
Illiux has quit [*.net *.split]
ekaleido has quit [*.net *.split]
tekacs has quit [*.net *.split]
theoros has quit [*.net *.split]
vaicine has quit [*.net *.split]
alexhanh has quit [*.net *.split]
RudyValencia has quit [*.net *.split]
TheFuzzball has quit [*.net *.split]
jarednorman has quit [*.net *.split]
wangr_ has quit [*.net *.split]
sernin has quit [*.net *.split]
gheegh has quit [*.net *.split]
qko has quit [*.net *.split]
nw has quit [*.net *.split]
nopper` has quit [*.net *.split]
BRMatt has quit [*.net *.split]
Doc_X has quit [*.net *.split]
gentz has quit [*.net *.split]
Roa has quit [*.net *.split]
deavid has quit [*.net *.split]
brian- has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
Kiall has quit [*.net *.split]
barefoot has quit [*.net *.split]
rtl_ has quit [*.net *.split]
dubios has quit [*.net *.split]
ePirat has quit [*.net *.split]
ccooke has quit [*.net *.split]
alup has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
wunz has quit [*.net *.split]
axiak has quit [*.net *.split]
joelio has quit [*.net *.split]
xybre has quit [*.net *.split]
drizz has quit [*.net *.split]
__class__ has quit [*.net *.split]
Scub has quit [*.net *.split]
Sigma00 has quit [*.net *.split]
conceal_rs_ has quit [*.net *.split]
`heliar has quit [*.net *.split]
epitron has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
cid404 has quit [*.net *.split]
MasterIdler has quit [Ping timeout: 247 seconds]
apok has joined #ruby
ben225 is now known as beneggett
MasterIdler_ is now known as MasterIdler
xclite has joined #ruby
Berglund has joined #ruby
notbrent has joined #ruby
Gab0 has joined #ruby
droptable has joined #ruby
cjk101010 has joined #ruby
tvw has joined #ruby
jonathanwallace has joined #ruby
jbpros has joined #ruby
NimeshNeema has joined #ruby
shadoi has joined #ruby
ForSpareParts has joined #ruby
emsilva has joined #ruby
Axsuul has joined #ruby
KillerFox has joined #ruby
jgrevich has joined #ruby
scant has joined #ruby
dnyy has joined #ruby
gmci has joined #ruby
bier has joined #ruby
tommyvyo has joined #ruby
voodoofish has joined #ruby
zodiak has joined #ruby
w0lverine has joined #ruby
nemesit has joined #ruby
niklasb has joined #ruby
Speed has joined #ruby
[diecast] has joined #ruby
axl_ has joined #ruby
ukd1 has joined #ruby
jjbohn has joined #ruby
theRoUS has joined #ruby
punkrawkR has joined #ruby
lectrick has joined #ruby
s1n4 has joined #ruby
digitalcakestudi has joined #ruby
Jay_Levitt has joined #ruby
randomautomator has joined #ruby
v0n has joined #ruby
twinturbo has joined #ruby
nwest has joined #ruby
johnlcox has joined #ruby
Bofu2U has joined #ruby
virunga has joined #ruby
trollface has joined #ruby
banghouse has joined #ruby
g4 has joined #ruby
r126l has joined #ruby
Zespre has joined #ruby
sgronblo1 has joined #ruby
Guedes has joined #ruby
patricksroberts has joined #ruby
meskyanichi has joined #ruby
johnb003 has joined #ruby
sinned has joined #ruby
sepp2k has joined #ruby
ctp has joined #ruby
cantonic has joined #ruby
bairui has joined #ruby
piotr_ has joined #ruby
ephemerian has joined #ruby
relix has joined #ruby
Roa has joined #ruby
Guest89851 has joined #ruby
koshii has joined #ruby
mfridh has joined #ruby
thone has joined #ruby
aempirei has joined #ruby
Guest83725 has joined #ruby
bglusma__ has joined #ruby
SeySayux has joined #ruby
rizzy has joined #ruby
Xethron has joined #ruby
m_3 has joined #ruby
heftig has joined #ruby
schwap has joined #ruby
busybox42 has joined #ruby
iamtakingiteasy has joined #ruby
SirFunk has joined #ruby
bigkevmcd has joined #ruby
aef has joined #ruby
Shamgar has joined #ruby
fred has joined #ruby
er1c_ has joined #ruby
AwesomeGarethMan has joined #ruby
ixx has joined #ruby
xsdg has joined #ruby
jasond has joined #ruby
kloeri has joined #ruby
iosctr has joined #ruby
tomaw has joined #ruby
zagabar has joined #ruby
psino has joined #ruby
hackeron has joined #ruby
Tasser has joined #ruby
tris has joined #ruby
barefoot has joined #ruby
Whoop has joined #ruby
rtl_ has joined #ruby
dubios has joined #ruby
ePirat has joined #ruby
alup has joined #ruby
ccooke has joined #ruby
samuelkadolph has joined #ruby
wunz has joined #ruby
joelio has joined #ruby
axiak has joined #ruby
xybre has joined #ruby
drizz has joined #ruby
__class__ has joined #ruby
Scub has joined #ruby
Sigma00 has joined #ruby
conceal_rs_ has joined #ruby
`heliar has joined #ruby
WanderingGlitch has joined #ruby
epitron has joined #ruby
cid404 has joined #ruby
mafs has joined #ruby
Aenigma has joined #ruby
sejo has joined #ruby
ddv has joined #ruby
kartouch has joined #ruby
tekacs has joined #ruby
Illiux has joined #ruby
ekaleido has joined #ruby
theoros has joined #ruby
vaicine has joined #ruby
pipopopo has joined #ruby
kuranai|off has joined #ruby
zaiste has joined #ruby
alexhanh has joined #ruby
undyingrage has joined #ruby
Guest18939 has joined #ruby
nullsign_ has joined #ruby
c0rn has joined #ruby
elliottcable has joined #ruby
rails has joined #ruby
Gate has joined #ruby
Apocalypse has joined #ruby
stockholm has joined #ruby
jeekl has joined #ruby
yeltzooo7 has joined #ruby
Jelco has joined #ruby
vjt has joined #ruby
Koshian has joined #ruby
marienz has joined #ruby
elspeth has joined #ruby
klaas has joined #ruby
uxp has joined #ruby
cout has joined #ruby
xargoon has joined #ruby
phreax has joined #ruby
joschi has joined #ruby
pavelz_ has joined #ruby
CodeVision has joined #ruby
pcboy_ has joined #ruby
Drakevr has joined #ruby
mattrae has joined #ruby
strcrzy has joined #ruby
pfaff has joined #ruby
pradeepto has joined #ruby
examancer has joined #ruby
Kiall has joined #ruby
jmeeuwen has joined #ruby
ozzloy has joined #ruby
mtfk has joined #ruby
jeedey has joined #ruby
nuba has joined #ruby
perryh_ has joined #ruby
JStoker has joined #ruby
jrist-afk has joined #ruby
omry has joined #ruby
DefV has joined #ruby
sj26 has joined #ruby
hoelzro|away has joined #ruby
felipe has joined #ruby
dju has joined #ruby
LiquidInsect has joined #ruby
drmegahertz has joined #ruby
brett has joined #ruby
gianlucadv has joined #ruby
jrbing has joined #ruby
brian- has joined #ruby
BeLucid has joined #ruby
deavid has joined #ruby
Caius has joined #ruby
ggreer has joined #ruby
drPoggs has joined #ruby
Guest5694 has joined #ruby
Derander has joined #ruby
crazed has joined #ruby
gry has joined #ruby
Fraeon has joined #ruby
knightblader has joined #ruby
Emmanuel_Chanel has joined #ruby
gentz has joined #ruby
vandemar has joined #ruby
Azure has joined #ruby
Doc_X has joined #ruby
Layke has joined #ruby
krnlsndrs has joined #ruby
tightwork has joined #ruby
kaen has joined #ruby
FlyingFoX has joined #ruby
sinful has joined #ruby
Hien has joined #ruby
nobdraisentone has joined #ruby
swistak35 has joined #ruby
BRMatt has joined #ruby
wmoxam has joined #ruby
Bauer has joined #ruby
madhatter has joined #ruby
fasta has joined #ruby
nw has joined #ruby
UNIXgod has joined #ruby
nopper` has joined #ruby
DarthGandalf has joined #ruby
qko has joined #ruby
Taranis has joined #ruby
ttilley has joined #ruby
gheegh has joined #ruby
sernin has joined #ruby
wangr_ has joined #ruby
lupine_85 has joined #ruby
jarednorman has joined #ruby
playmuc has joined #ruby
TheFuzzball has joined #ruby
RudyValencia has joined #ruby
SphericalCow has joined #ruby
kiri has joined #ruby
blacktul_ has joined #ruby
stat1x has joined #ruby
dvolker has joined #ruby
naz has joined #ruby
grillo has joined #ruby
MrWGW has joined #ruby
s0ber has joined #ruby
imami|afk has joined #ruby
thomasfedb has joined #ruby
xorgnak has joined #ruby
johnduhart has joined #ruby
zeen has joined #ruby
Mon_Ouie has joined #ruby
fugit has joined #ruby
Nisstyre has joined #ruby
Jb_ has joined #ruby
sspiff has joined #ruby
juha_ has joined #ruby
eregon_ has joined #ruby
philips_ has joined #ruby
kalleth has joined #ruby
laen_ has joined #ruby
kennyvb has joined #ruby
Sou|cutter has joined #ruby
foolove has joined #ruby
mikalv has joined #ruby
mksm has joined #ruby
TheMoonMaster has joined #ruby
any-key has joined #ruby
Kwpolska has joined #ruby
crodas has joined #ruby
jmcphers has joined #ruby
wang has joined #ruby
Poapfel has joined #ruby
bnagy has joined #ruby
Gm4n_ has joined #ruby
Cork has joined #ruby
musl has joined #ruby
nahhh has joined #ruby
danheberden has joined #ruby
al2o3cr2 has quit [Read error: No route to host]
fforbeck has joined #ruby
welterde has joined #ruby
xorspark has joined #ruby
G has joined #ruby
babinho has joined #ruby
simao has joined #ruby
ohcibi has joined #ruby
alta has joined #ruby
dominikh has joined #ruby
stroem has joined #ruby
tessi has joined #ruby
ksk has joined #ruby
ub|k has joined #ruby
SecretAgent has joined #ruby
SecretAgent has quit [Max SendQ exceeded]
al2o3cr2 has joined #ruby
SecretAgent has joined #ruby
pedrohenrique has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
nacengineer has joined #ruby
tiripamwe has quit [Read error: Connection reset by peer]
phinfonet has quit [Ping timeout: 245 seconds]
niklasb has quit [Quit: WeeChat 0.3.8]
pedrohenrique has quit [Client Quit]
tessi has quit [Ping timeout: 246 seconds]
niklasb has joined #ruby
phinfonet has joined #ruby
t0mmyvyo has joined #ruby
samuel02 has joined #ruby
al2o3cr2 has quit [Remote host closed the connection]
al2o3cr has joined #ruby
dpk has quit [Quit: Computer has gone to sleep.]
phinfonet has quit [Client Quit]
phinfonet has joined #ruby
tessi has joined #ruby
wallerdev has joined #ruby
mengu has joined #ruby
moshef has joined #ruby
blast_hardcheese has joined #ruby
lkba has joined #ruby
elux has joined #ruby
Mchl has joined #ruby
beakerman has joined #ruby
fowl has joined #ruby
rmc3 has joined #ruby
TheShadowFog has joined #ruby
moos3 has joined #ruby
froy has joined #ruby
rlomax has joined #ruby
companion has joined #ruby
pzol has joined #ruby
masak has joined #ruby
dv_ has joined #ruby
derrida has joined #ruby
kstephens has joined #ruby
gogiel has joined #ruby
FriarTech has joined #ruby
yosafbridge has joined #ruby
denstark has joined #ruby
jodell has joined #ruby
MissionCritical has joined #ruby
headius has quit [Quit: headius]
Russell^^ has joined #ruby
abdulkarim is now known as kn330
jrajav has quit [Quit: The best darkness is strange and surprising]
mubix has joined #ruby
blast_hardcheese has quit [Excess Flood]
billy_ran_away has joined #ruby
Chaazd has left #ruby [#ruby]
blast_hardcheese has joined #ruby
<billy_ran_away> Can anyone explain this error to me: NameError: uninitialized constant Revision
vvgomes has joined #ruby
kn330 has quit [Quit: Ex-Chat]
kylesnav has joined #ruby
<mubix> billy_ran_away: try lowerasing the variable
kn330 has joined #ruby
<kylesnav> what's the difference between a switch and case statement?
<billy_ran_away> mubix: Revision is a class though...
<Mon_Ouie> Then it wasn't loaded properly — the constant definitely doesn't exist
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
cakehero has quit [Quit: Leaving...]
<billy_ran_away> Yep
<billy_ran_away> Thanks Mon_Ouie and mubix
allsystemsarego has joined #ruby
jcesar_ has joined #ruby
<deryldoucette> i have an ASUS 32GB Transformer original that I'm typing off of right now. I'd be willing to beta :)
<deryldoucette> alpha even
<deryldoucette> woops wrong chan
<jcesar_> someone here can help me with ruby on rails
<allsystemsarego> Hi, does Ruby have something similar to this Python library: https://github.com/PersonalNOVEL/functionally
<Mon_Ouie> You'd be better off asking on #rubyonrails
headius has joined #ruby
<Mon_Ouie> And not asking if someone can help you, just asking your question
<jcesar_> Mon_Ouie, thanks
jcesar_ has left #ruby ["Leaving"]
jasonLas_ has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Hanmac> >> ping
<al2o3cr> Hanmac: (String) "NameError: undefined local variable or method `ping' for main:Object"
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
<Hanmac> >> STDOUT
<al2o3cr> Hanmac: (IO) #<IO:<STDOUT>>
jarednorman has left #ruby ["WeeChat 0.3.7"]
jasonLaster has quit [Ping timeout: 245 seconds]
ennui has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
s1n4 has quit [Quit: Lost terminal]
hakunin has joined #ruby
arvidkahl has joined #ruby
<virunga> my irb crash when i write STDOUT.freeze, does happen the same to you?
rking has quit [Quit: Cloning Linode. Ought to shut down first.]
mubix has left #ruby [#ruby]
havenn has joined #ruby
<Mon_Ouie> Well, that's kind of excepted; freeze prevents from allowing you to write to STDOUT
voodoofish430 has joined #ruby
<rcassidy> Hanmac: I think you can still write to files using the bot
MickeMe has joined #ruby
kenichi has quit [Remote host closed the connection]
<Mon_Ouie> He did say it was possible
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
<virunga> Mon_Ouie: uh, i understood
<virunga> thanks
jodell has quit [Quit: leaving]
akem has joined #ruby
<banisterfiend> Mon_Ouie: the channel seems to be in a confused state, i think you should soothe it by singing a french nursery rhyme
digitalcakestudi has quit [Read error: Operation timed out]
deryldoucette has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<rcassidy> yep, can also read what i've written :D
<Mon_Ouie> Frère Jacques, Frère Jacques, dormez-vous ? Sonnez les matines !
manizzle has joined #ruby
a_a_g has quit [Quit: Leaving.]
deryl-android has joined #ruby
<banisterfiend> Mon_Ouie: thx... :P i feel better already that wound in my head has closed
havenn has quit [Remote host closed the connection]
MickeMe has left #ruby ["Verlassend"]
<Hanmac> >> $SAFE = 4
<al2o3cr> Hanmac: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
GoGoGarrett has joined #ruby
digitalcakestudi has joined #ruby
samuel02 has quit [Ping timeout: 248 seconds]
brianpWins has quit [Quit: brianpWins]
bothra has quit [Ping timeout: 245 seconds]
moshef has quit [Quit: moshef]
pu22l3r has quit [Ping timeout: 240 seconds]
dpk has joined #ruby
<allsystemsarego> Or maybe Chuck Norris is to blame
mneorr has joined #ruby
SeySayux has quit [Read error: Operation timed out]
vvgomes has joined #ruby
bothra has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
Speed has quit [Remote host closed the connection]
kylesnav has quit [Quit: Leaving.]
uris has joined #ruby
_adeponte has quit [Remote host closed the connection]
zagabar has quit [Quit: Lost terminal]
adeponte has joined #ruby
jasonLas_ has quit [Remote host closed the connection]
Markvilla has joined #ruby
sebastorama has joined #ruby
erichmenge has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
<Hanmac> jrajav:
headius has quit [Quit: headius]
<Hanmac> >> Object.instance_method("singleton_cla" + "ss").bind(STDOUT).call.ancestors[0]
<al2o3cr> Hanmac: (Class) IO
headius has joined #ruby
codespectator has joined #ruby
jasonLaster has joined #ruby
adeponte has quit [Ping timeout: 248 seconds]
jrist-afk is now known as jrist
eins11 has joined #ruby
pedrohenrique has joined #ruby
phinfonet has quit [Ping timeout: 248 seconds]
siamese has quit [Quit: siamese]
MasterIdler has quit [Quit: MasterIdler]
katherinem13 has joined #ruby
phanousit has joined #ruby
<katherinem13> Does ruby have something that resembles python's enumerate function?
katherinem13 has left #ruby [#ruby]
katherinem13 has joined #ruby
SeySayux has joined #ruby
phanousit has quit [Client Quit]
MasterIdler has joined #ruby
<workmad3> katherinem13: ary.each {|item| do_stuff} maybe?
bigkevmcd has left #ruby ["outta here"]
jimeh has joined #ruby
<workmad3> katherinem13: or am I forgetting what enumerate does? :)
Russell^^ has quit [Remote host closed the connection]
Markvilla_ has joined #ruby
DDAZZA has joined #ruby
DDAZZA has quit [Client Quit]
Markvilla has quit [Ping timeout: 248 seconds]
Markvilla_ is now known as Markvilla
<Hanmac> katherinem13 look at rubies Enumerable module
<katherinem13> workmad3: Enumerate adds the indexes... so basically, goes from [ 'a', 'b', 'c' ] to [ ( 0, 'a'), (1, 'b'), (2, 'c') ].
<workmad3> katherinem13: ah, ary.each_with_index.to_a
<Mon_Ouie> each_with_index
<katherinem13> Great, that sounds like exactly what I need, I'll look it up.
Russell^^ has joined #ruby
<workmad3> katherinem13: or ary.each_with_index {|item, index| ...}
greenysan has quit [Ping timeout: 244 seconds]
<katherinem13> Perfect, thanks :)
<workmad3> katherinem13: you can also do things like ary.map.with_index in 1.9 ;)
Markvilla has quit [Read error: Connection reset by peer]
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<Hanmac> workmad3 i noticed that some rdoc functions are not 1.9 like yet :/
Markvilla has joined #ruby
techsurvivor has joined #ruby
vvgomes has joined #ruby
sent-hil has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
<Hanmac> hm or did i look wrong?
jayvan has quit [Remote host closed the connection]
Lachryma` has quit [Quit: Leaving]
mramaizng has joined #ruby
rippa has joined #ruby
twinturbo has quit [Quit: twinturbo]
vvgomes has quit [Ping timeout: 246 seconds]
samuel02 has joined #ruby
samuel02 has quit [Remote host closed the connection]
droptable has quit [Ping timeout: 248 seconds]
havenn has joined #ruby
zemanel has quit [Quit: Remote hottie closed the connection]
<allsystemsarego> What is Ruby's equivalent of folding in Haskell?
<Mon_Ouie> #inject
<allsystemsarego> thanks
<rcassidy> super useful, that
<banisterfiend> rcassidy: when do u use it
<banisterfiend> cos 90% of the time i see people using #inject they really should be using each_with_object() instead
<rcassidy> have an array of data structures, want to make sure they all satisfy a boolean condition
Russell^^ has quit [Quit: Russell^^]
<rcassidy> ary.each{ test condition}.inject(:&)
<rcassidy> or something close
<Hanmac> oO
<Mon_Ouie> use #all?, #any?, #none? or #one?
<rcassidy> sorry, used to functional programming... told you i was a noob, lol
<Mon_Ouie> Those will all short-circuit if possible
<rcassidy> map-reduce
twinturbo has joined #ruby
<rcassidy> is just what i went to first
<rcassidy> looking up all/any/none, ty Mon_Ouie, lol
akem has quit [Ping timeout: 248 seconds]
<rcassidy> wait, i didn't mean each, i meant map
<rcassidy> grr
twinturbo has quit [Client Quit]
<Mon_Ouie> (andd Haskell too has these, for the record)
BlackShadow has joined #ruby
<Hanmac> "Haskell - when Dinosaurs were new"
mrdodo has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
headius has quit [Quit: headius]
mrdodo has joined #ruby
rking has joined #ruby
karakedi has joined #ruby
<rcassidy> i see
<rcassidy> so i can do
<rcassidy> >> [4, 6, 8].all?{|a| a.even?}
<al2o3cr> rcassidy: (TrueClass) true
<rcassidy> instead of my silliness of
<rcassidy> >> [4, 6, 8].map{|a| a.even?}.inject(:&)
<al2o3cr> rcassidy: (TrueClass) true
jrist is now known as jrist-afk
* rcassidy goes back to clean up recently written code
barefoot has quit [Changing host]
barefoot has joined #ruby
<Mon_Ouie> I hate old-me. He keeps writing terrible code.
pedrohenrique has quit [Read error: Connection reset by peer]
vvgomes has joined #ruby
<banisterfiend> Mon_Ouie: Don't hate him, he's only 15
mickn has joined #ruby
<banisterfiend> he's still learning
<Sou|cutter> Mon_Ouie: he makes future-you better, at least
<Mon_Ouie> banisterfiend: When you put it that way, calling him old me sounds weird
tayy has joined #ruby
<banisterfiend> hehe, young-me :)
<Mon_Ouie> Old you is younger than you!
<banisterfiend> Yeah, the word 'old' can be substituted for 'young' in some situations :) English is weird, or is it time that's weird?
akem has joined #ruby
sent-hil has quit [Remote host closed the connection]
hltbra has joined #ruby
<hltbra> what is the right way of catching Net::HTTP errors? It can throw too many things... what is the pattern to that?
vlad_starkov has joined #ruby
Fretta has joined #ruby
Fretta has quit [Remote host closed the connection]
nopolitica has joined #ruby
<Mon_Ouie> Aren't they all subclasses of some specific exception class?
<Mon_Ouie> Well, maybe not all, but surely most of them
SeoService has joined #ruby
Russell^^ has joined #ruby
droptable has joined #ruby
phinfonet has joined #ruby
Russell^^ has quit [Client Quit]
RegEchse has joined #ruby
SeoService has quit [Read error: Connection reset by peer]
<hltbra> Mon_Ouie: StandardError, but this error class is too generic, right?
maletor has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> Net::HTTPError
<Mon_Ouie> And yes, it is
<Hanmac> Exception is even more generic :P
workmad3 has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
<virunga> Did you know that there are three kind of strings in Ruby?
<hltbra> no
<Mon_Ouie> There's only one kind of string in Ruby. Instances of the String class.
<virunga> allocated on stack, allocated on heap and reference to same other string
<Mon_Ouie> Those are just implementation details
<hltbra> Mon_Ouie: Net::HTTPError is not a choice, since it can throws Errno::* exceptions (ECONNREFUSED, for example)
nanderoo has quit [Quit: Leaving.]
<virunga> str1 = str2 doesn't create a new string
linoj has joined #ruby
kenichi has joined #ruby
<Mon_Ouie> And that ^ has nothing to do with strings
<Mon_Ouie> foo = other_variable never creates another object
Bidness has joined #ruby
karakedi has quit [Ping timeout: 256 seconds]
<Mon_Ouie> hltbra: Hm, those are SystemCallError IIRC
<hltbra> yes, Mon_Ouie.
<Mon_Ouie> Yeah. And there's also Timout::Error I think.
<virunga> Mon_Ouie: if they are value object like Fixnum?
<Bidness> Hey, so I want to overload some methods in Array, but only within the scope of my own namespace. Is this possible?
<hltbra> Mon_Ouie: it discuss about using rescue StandardError, what I think it a damn bad thing, but the solution :\
<Mon_Ouie> I agree on that at least
<davidcelis> virunga: That doesn't create a new object. It just creates a new reference to the Fixnum.
<havenn> virunga: if you want two strings with same content: str2 = str1.dup
xaq has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: Computer has gone to sleep.]
xaq has joined #ruby
<Mon_Ouie> Yeah, and that does use COW as you mentioned
<matti> Mon_Ouie: ;]
<virunga> davidcelis: res = 1 isn't a reference
<Mon_Ouie> 'alut matti ;)
<Mon_Ouie> Yes it is. Variables are references to objects.
<davidcelis> dude, yes it is
kylesnav has joined #ruby
<virunga> I think reference to Fixnum dosn't exist
<davidcelis> it very clearly does
<Mon_Ouie> In that case, implementations will usually store the vaule in the reference, but the point still stands.
<kylesnav> what is the difference between an attr_accessor and attr_accessible?
<Mon_Ouie> value*
<Mon_Ouie> kylesnav: The latter doesn't exist?
<davidcelis> virunga: foo = 3; bar = foo; bar += 1; foo # => 3, not 4
<davidcelis> virunga: New reference to the Fixnum 3.
xorigin has joined #ruby
<davidcelis> variables are references to an Object
<davidcelis> kylesnav: attr_accessible is a Rails thing
Russell^^ has joined #ruby
<virunga> >> foo = 3; bar = foo; bar += 1;
<al2o3cr> virunga: (Fixnum) 4
<virunga> >> foo = 3; bar = foo; bar += 1; foo
<al2o3cr> virunga: (Fixnum) 3
<virunga> davidcelis: ^^
<davidcelis> um, yep. that's what i JUST said.
<davidcelis> as evidenced, that only creates a new reference to 3
ananthakumaran has quit [Quit: Leaving.]
aantix_ has joined #ruby
<virunga> ah ok
<davidcelis> variables are references to objects
<Hanmac> >> "e/abc/".scan(/\w+/)
<al2o3cr> Hanmac: (Array) []
<Hanmac> :/
aantix_ has quit [Read error: Connection reset by peer]
<davidcelis> >> "poop" =~ /oo/
<al2o3cr> davidcelis: (Fixnum) 1
<banisterfiend> >> :virunga ? "sup pig" : "gip pus"
<al2o3cr> banisterfiend: (String) "sup pig"
aantix_ has joined #ruby
aantix_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
aantix has quit [Ping timeout: 246 seconds]
aantix has joined #ruby
apeiros has joined #ruby
<Mon_Ouie> It's a bug in the way the bot interpolates code
<Mon_Ouie> One more reason to use stdin for that :p
aantix has quit [Client Quit]
<Mon_Ouie> >> "foo".scan(/\\w+/)
<al2o3cr> Mon_Ouie: (Array) ["foo"]
<virunga> strings with length less than 11 are stored in the reference and on the stack
<Mon_Ouie> It also chokes on perfectly valid code for that reason
<virunga> on 32 bit machines
kpshek has quit []
bluOxigen has quit [Ping timeout: 246 seconds]
<virunga> anyway.. nothing important :P
allsystemsarego has quit [Quit: Leaving]
tommyvyo has joined #ruby
<banisterfiend> virunga: i dont think that's true
<Hanmac> i currently look at $LOADED_FEATURES if i may found something interesting :P
<banisterfiend> virunga: strings with small size are embedded inside the T_OBJECT
<banisterfiend> virunga: but they're not stored on teh stack
<banisterfiend> afaik
<banisterfiend> virunga: same with a small number of ivars
apeiros_ has quit [Ping timeout: 248 seconds]
<Mon_Ouie> He read the code I think
<virunga> i didn't check myself though
vitoravelino is now known as vitoravelino`afk
<Hanmac> virunga ... you are true, but i dont think its SO much difference ...
<virunga> Mon_Ouie: what do you mean?
<banisterfiend> virunga: it says it embeds them in the RString struct
<banisterfiend> virunga: it didnt (afaict) say it stored them on the stack
<banisterfiend> virunga: when i said T_OBJECT before, i meant T_STRING
<Mon_Ouie> It just means there's only one call to malloc needed instead of two
nopolitica has quit [Quit: leaving]
<virunga> banisterfiend: an array of char statically allocated go on the stack
<virunga> in C
<banisterfiend> virunga: no..
<Mon_Ouie> Except The RString structure is dynamically allocated
<banisterfiend> virunga: when in a function definition yes, but when it's defined inside a struct
<banisterfiend> virunga: it gets embedded in the struct itself which is allocated on the heap in this case
<virunga> banisterfiend: that's a definition not declaration
<virunga> i mean declaration
<banisterfiend> virunga: you can verify this easily by seeing that the size of the char array increases the size of the struct object, so it's clearly stored there, not on the stack
mengu has quit [Remote host closed the connection]
<virunga> i know that
<banisterfiend> virunga: ok, good, then u agree it's not stored on the stack and you're wrong? :)
<virunga> banisterfiend: as i wrote i meant the definition and declaration of a varaible. In the case u described i agree with u
havenn has quit [Remote host closed the connection]
Guest89851 has quit [Quit: Guest89851]
thecreators has joined #ruby
<banisterfiend> right...i love it when people say one thing, then find out they're wrong, and pretend they were saying the opposite all along..
<banisterfiend> anyway bbl ;)
answer_42 has quit [Quit: Lost terminal]
bluOxigen has joined #ruby
havenn has joined #ruby
froy has quit [Ping timeout: 264 seconds]
ph^ has joined #ruby
vvgomes has quit [Ping timeout: 246 seconds]
hadees has quit [Quit: hadees]
mickn has quit [Quit: Ex-Chat]
jorge has joined #ruby
resure has joined #ruby
lorandi has joined #ruby
scriabin_ has joined #ruby
lorandi has quit [Client Quit]
<virunga> banisterfiend: i said char array statically allocated (which maybe isn't the right term..). Is an array definied inside of a DEFINITION of a struct allocated? No.
<scriabin_> how do I detect if an array contains a nil value? [1,2,1,nil,1].contains_a_nil?
<scriabin_> I'm stumped
lorandi has joined #ruby
<Mon_Ouie> Array#include?
infinitiguy has quit [Ping timeout: 246 seconds]
<scriabin_> aw that was to easy
<scriabin_> thanks
<workmad3> .all? would also work, I believe
Berglund has quit [Quit: Computer died.]
<Hanmac> i think in this way include? is faster then all?
<Mon_Ouie> all? would treat false like nil
hakunin has quit [Read error: Operation timed out]
<Mon_Ouie> TBH I find the non-block form of those methods rather useless
hakunin has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
<banisterfiend> Mon_Ouie: i often use enum.any? instead of !enum.empty?
<banisterfiend> though it's not striclty equivalent, the distinction doesn't usually matter for me
maletor has joined #ruby
<Hanmac> banister [false, nil, false, nil].any?
workmad3 has quit [Ping timeout: 248 seconds]
hynkle has joined #ruby
verto is now known as verto|off
<banisterfiend> Hanmac: like i said, teh distinction often isn't relevant
<banisterfiend> Hanmac: in the situations i've been using it [false, nil, false] isn't valid
<banisterfiend> it must always contain a non-falsey object
<banisterfiend> so any? is good enough 4 me
fantazo has quit [Remote host closed the connection]
hadees has joined #ruby
adeponte has joined #ruby
ph^ has quit [Remote host closed the connection]
hakunin has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Remote host closed the connection]
jrist-afk is now known as jrist
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
virunga has quit [Quit: Sto andando via]
rontec76 has quit [Quit: rontec76]
Banistergalaxy has joined #ruby
EricKamsky has joined #ruby
geekbri has quit [Remote host closed the connection]
strife25 has quit [Quit: Computer has gone to sleep.]
asteve has quit []
chichou has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
verto|off is now known as verto
krusty_ar has joined #ruby
hakunin has joined #ruby
ph^ has joined #ruby
phinfonet has quit [Ping timeout: 265 seconds]
hynkle has quit [Quit: Computer has gone to sleep.]
Russell^^ has quit [Ping timeout: 245 seconds]
mneorr has quit [Quit: Leaving.]
esuzuki has joined #ruby
nemesit has quit [Ping timeout: 248 seconds]
kuranai|off has quit [Remote host closed the connection]
vitoravelino`afk is now known as vitoravelino
esuzuki has left #ruby [#ruby]
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
i0n has quit [Quit: Lost terminal]
TorpedoSkyline has joined #ruby
nikl has joined #ruby
<nikl> hi guys! I experience errors with: libv8 (3.3.10.4), and believe i've been able to change the version to 3.11.8.3 now though
<nikl> brew install still gives me the same error, again.. (tries to install 3.3.10.4) why? :(
<nikl> easy fix?
w0lverine has quit [Quit: w0lverine]
<Hanmac> use an better os like linux
sweetheart has joined #ruby
<nikl> sorry! i didn't know better :(
<sweetheart> www.rakenews.com win as you play $1000 /month, register now!
sweetheart has left #ruby [#ruby]
billy_ran_away has quit []
phinfonet has joined #ruby
Guedes0 has joined #ruby
akem has quit [Ping timeout: 248 seconds]
<nikl> i was told by my geek friend, too late: linux > mac > windows
Taichou has joined #ruby
vvgomes has joined #ruby
bothra has quit [Ping timeout: 245 seconds]
piotr_ has quit [Ping timeout: 248 seconds]
canadadry has joined #ruby
MasterIdler has quit [Quit: MasterIdler]
<canadadry> anyone free to explain a couple ruby things to me real quick?
<canadadry> I'd like to know what .map does
<canadadry> and I don't understand Dir
<canadadry> and what does it mean to flatten something?
<Hanmac> candadry whats your os? on linux you could try "ri method"
<canadadry> debian
gmci has quit [Quit: Computer has gone to sleep.]
reuf has joined #ruby
<canadadry> wow I didn't know you could do that
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
scootiepuff has joined #ruby
Taichou has quit [Ping timeout: 246 seconds]
wmoxam_ has quit [Ping timeout: 246 seconds]
BlackShadow has quit [Remote host closed the connection]
foolove has quit [Quit: Leaving]
greenysan has joined #ruby
robert_ has quit [Excess Flood]
robert_ has joined #ruby
phinfonet has quit [Ping timeout: 272 seconds]
_br_ has quit [Excess Flood]
<shevy> ewww debian
pskosinski has joined #ruby
<shevy> canadadry, .map is like "apply this on each element"
<havenn> So looks like 24-character Strings aren't so painful in some other VM's >.>: https://gist.github.com/3251347
<nikl> quick question.. why does "bundle install" override all my other upgrades of gems? :/
<shevy> canadadry, for instance say you have an array with 3 elements ... 1,2 and 3 ... then you can use .map like so: [1,2,3].map {|e| e * 3 } # => new array: [3,6,9]
<shevy> because bundler is a piece of crap that should die? :)
<canadadry> shevy: not sure if you know, but is .map then equal to in perl saying the following....
<canadadry> foreach $element(@arrray){
<shevy> canadadry "apply this on every element"
<shevy> no
<canadadry> chomp $element;
<shevy> that sounds more like, ruby code:
<havenn> Maglev and Jruby are way ahead by Shaughnessy's benchmark standard.
<canadadry> }
<shevy> array.each
<shevy> no, chomp exists in ruby too
<shevy> string_object.chomp
<shevy> or
sailias has quit [Quit: Leaving.]
<shevy> string_object.chomp!
<shevy> does perl not have .map ?
_br_ has joined #ruby
<shevy> well
<nikl> shevy, do I have any choice now? i'm unfortunately on mac
<canadadry> ok then why not do array.each instead of .map?
<shevy> array.map(&:chomp)
codespectator has quit [Quit: Computer has gone to sleep.]
<shevy> canadadry .map returns the result
<pseudonymous> Is there a good introduction to how require/include functions in ruby ? I'm trying to write a custom validator in rails but have no idea where to place it or how to include it from a custom directory and all code examples I can find only show examples of the actual validator and its use (which is what I *don't* need help with)
_br_ has quit [Excess Flood]
<shevy> canadadry, look: ["abc\n","def\n"].map(&:chomp) # => ["abc", "def"]
<shevy> we removed the \n newlines and return an array with all results
<canadadry> ok
<shevy> nikl, well. bundler does nothing magical, as far as I know
<canadadry> tell me this line is not ugly...
<shevy> nikl, the way I go about is, I collect all .gem files I install on my systems
<canadadry> log_files.map {|f| Dir[f] }.flatten.compact.uniq.select{|f| File.file?(f) }.sort
<shevy> canadadry it is a bit long
_br_ has joined #ruby
_br_ has quit [Excess Flood]
<shevy> and the .flatten confuses me
<canadadry> shevy: what I want to do with it is make it readable and add a little more to it so that it filters out some elements
<shevy> but do you really want to do it in one line?
<canadadry> shevy: I didn't write it, it was in a rails app I downloaded
<shevy> k
<canadadry> no way
<shevy> does it work for you as it is?
<canadadry> I think it's written all kinds of weird for ruby
<canadadry> it partially works
pskosinski has quit [Client Quit]
<shevy> that happens a lot
<shevy> 80% of the ruby code out there I find not good
Bidness has quit [Remote host closed the connection]
_br_ has joined #ruby
berserkr has quit [Quit: Leaving.]
<canadadry> I want to parse out entries of the array
<shevy> canadadry, do you know what those methods do?
<canadadry> but I want to understand exactly what it's doing firts
<canadadry> no
<canadadry> that's why I came here
internet_user has quit [Remote host closed the connection]
<shevy> ok you first must understand what it does
<shevy> let's start with .uniq
<canadadry> I've done some stuff in ruby but I'm still a little afraid of arrays
<shevy> .uniq gives you unique results
kpshek has joined #ruby
<shevy> in other words, it filters away duplicates:
<shevy> %w( abc abc def ).uniq # => ["abc", "def"]
<shevy> you see?
<canadadry> yeah
<shevy> .sort by default simply sorts your array (alphabetically I think)
gheegh has quit [Quit: is out]
<shevy> .compact on an Array removes nil elements from your array
<shevy> [nil,nil,1].compact # => [1]
<shevy> you see?
<canadadry> yeah
<shevy> ok
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> .select allows you to select elements from your array
<shevy> within the {} comes your condition
<shevy> .select{|f| File.file?(f) } <--- the condition is "is f a file"
<shevy> if yes, it returns it as part of the collection
xorigin has quit [Quit: leaving]
<shevy> so you basically ask "are you a file or not? If yes, I will get you, if not I discard you"
<canadadry> ok
<shevy> I dunno why .flatten is required here
<shevy> I show you what .flatten does
<canadadry> but what does flatten do?
<canadadry> ok
<shevy> [[1,2],3].flatten # => [1, 2, 3]
fforbeck has quit [Quit: Leaving]
<shevy> you see that you have one simple array afterwards?
vlad_starkov has joined #ruby
<shevy> it flattened the array in array
<Hanmac> hm the compat is not needed in your code
<shevy> it brought it to the same level
ppawel has joined #ruby
<canadadry> for what reason would you do that?
<ppawel> hi what is this operator: ||=
<shevy> yeah, that ruby code is weird... whoever wrote it must have fancied applying everything
<ppawel> used like this: hash[key] ||= value
<shevy> canadadry, it makes simpler data structures if you have only one level
<canadadry> ppawel: I think that means if the value is nil, then do what's after ||=
<shevy> [[1,2],3,5,3255,[33,553]] # => [[1, 2], 3, 5, 3255, [33, 553]]
<ppawel> ok
<shevy> and via .flatten you bring them all down to something simpler
<Hanmac> >> [[1,2],3,5,3255,[33,553]].flatten
<al2o3cr> Hanmac: (Array) [1, 2, 3, 5, 3255, 33, 553]
<shevy> [[1, 2], 3, 5, 3255, [33, 553]].flatten # => [1, 2, 3, 5, 3255, 33, 553]
<shevy> you see it now canadadry ?
stephenjudkins has joined #ruby
<canadadry> yeah
<canadadry> so tell me this then shevy
<canadadry> would it make sense if I changed the end of that line to say something like this...
<canadadry> log_files.map {|f| Dir[f] }.flatten.compact.uniq.select{|f| File.file?(f) && !f.includes "ssh" }.sort
discopatrick has joined #ruby
<canadadry> to avoid any files whose names contain ssh
vlad_starkov has quit [Ping timeout: 264 seconds]
<Hanmac> f.include?("ssh")
<shevy> I dont think you need .flatten nor .compect
<shevy> but the way I go about this is to break this up into subtasks
<Hanmac> flatten is needed, but compact not
<shevy> and then I use pp log_files for instance
ph^ has quit [Remote host closed the connection]
axl_ has quit [Read error: Connection reset by peer]
<canadadry> pp|?
fflush has joined #ruby
<canadadry> Hanmac: I want to exclude ssh in this case
axl_ has joined #ruby
<canadadry> can I have an array of excluded files and say unless it contains anything from the array?
<Hanmac> yeah i meant you need include? not includes
mroth has joined #ruby
mroth has quit [Changing host]
mroth has joined #ruby
mroth has joined #ruby
Bidness has joined #ruby
jjbohn has quit [Ping timeout: 272 seconds]
mrdodo has quit [Remote host closed the connection]
jstew has quit [Quit: leaving]
romain1189 has joined #ruby
Bidness has quit [Read error: Connection reset by peer]
<canadadry> Hanmac: how do I negate f.include?("ssh"
axl_ has quit [Read error: Connection reset by peer]
Ste11a has quit [Ping timeout: 246 seconds]
Bidness has joined #ruby
fflush has quit [Client Quit]
<Hanmac> !f.include?("ssh")
axl_ has joined #ruby
ennui has quit [Quit: ennui]
<canadadry> ok
<canadadry> or what if I said...
<canadadry> {|f| File.file?(f) unless f.include? ("ssh" }.sort
<canadadry> would that work?
<Hanmac> it may be do not what you want
<shevy> canadadry, do you have irb?
<shevy> also
<shevy> that syntax is not correct
elhu has quit [Quit: Computer has gone to sleep.]
<shevy> you open a ( but you dont close it
<canadadry> yeah but this is a big hunk oh junk to try out in irb
<shevy> see? now you understand why people break long things down :)
<canadadry> I didn't write the original code
<fowl> why would you ask if someone has irb
Ste11a has joined #ruby
<fowl> it comes with ruby
<shevy> break it down, look that the individual steps work, put it back up again as a big thing
ppawel has quit [Ping timeout: 248 seconds]
<canadadry> I'd like to split it up into like 20 lines for readability
<shevy> fowl, hmm I could swear debian had a time where it didn't provide irb rdoc etc..
eins11 has quit [Quit: Verlassend]
<canadadry> shevy: don't befowl the good name of debian
tiripamwe has joined #ruby
<shevy> if it would be so good, people using debian and ubuntu wouldn't come here and ask for ruby related problems caused by these distributions
<canadadry> tis the oldest still maintained packaging linux distro
<canadadry> circa 1993
<canadadry> :)
codespectator has joined #ruby
<canadadry> the only distro related problem is debian wants you to have gems as packages
<canadadry> course if you're remotely serious about ruby you'll say no and do gem install instead
w0lverine has joined #ruby
Gab0 has quit [Ping timeout: 248 seconds]
<canadadry> shevy: how about this
MasterIdler has joined #ruby
<canadadry> excludes = [ "ssh", "boot.log", "someotherfile.log"]
<shevy> that is an array
jorge has quit [Remote host closed the connection]
<canadadry> shevy: {|f| File.file?(f) unless f.include? excludes }.sort
enroxorz has joined #ruby
<shevy> f is a file
<shevy> {|f| File.file?(f) unless excludes.include? f }.sort
<shevy> but
Banistergalaxy has quit [Ping timeout: 240 seconds]
<shevy> this does not make any sense
<shevy> cant you translate this into what you need, in english words?
<shevy> because you use some block operation, but you should either return true or false in it, right?
<shevy> "if this is a file, unless excludes array includes f"
AndChat| has joined #ruby
<shevy> doesnt make a lot of sense to me
<canadadry> print files unless the files are on the excluded file list
<shevy> but you dont print anywhere
<shevy> and where is the condition for File.file? in your sentence
<canadadry> well
<canadadry> I mean
havenn has quit [Remote host closed the connection]
<canadadry> it goes back to the main array of log_files
<shevy> good. return the selection.
mascool has quit [Ping timeout: 240 seconds]
<shevy> now what is the selection logic you apply here?
burgestrand has joined #ruby
<shevy> btw
akem has joined #ruby
<shevy> you could use 2x .select if it makes it easier for you
<shevy> or .reject
<canadadry> would it make more sense to take the initial array and pop out any entries that contain something from an exclude list?
<shevy> %w(abcdef b c d e f).reject {|x| x.size < 3} # => ["abcdef"]
<shevy> it really does not matter
<shevy> this is ruby, there is more than one way. .reject or .select, just pick one and continue
mascool has joined #ruby
Gab0 has joined #ruby
<shevy> foo = %w(b c d f); %w(abcdef b c d e f).reject {|x| foo.include? x } # => ["abcdef", "e"]
<canadadry> can I say .reject { |x| x.include? excludes }
yakko has joined #ruby
<shevy> no because .include? does not like an array
<canadadry> ok
<canadadry> then...
<canadadry> excludes.to_s
<shevy> "abc".include? %w(a b c) TypeError: can't convert Array into String
<shevy> then you have a string
<shevy> which you dont want in your example
<shevy> I mean
<canadadry> what DO I want?
<shevy> why have an exclude array if you keep it as a string
<shevy> only you know :-)
<shevy> it works if you ask an array whether it includes a string
<shevy> .reject { |x| x.include? excludes }
<shevy> to
<shevy> .reject { |x| excludes.include? x }
froy has joined #ruby
tiripamwe has quit [Quit: Leaving]
enroxorz is now known as enroxorz-towlie
enroxorz-towlie has left #ruby ["Ex-Chat"]
mrdodo has joined #ruby
tiripamwe has joined #ruby
cherrypeel has joined #ruby
<fowl> do the ricky bobby
<fowl> stop. pose for the frame
crankycoder has quit [Quit: Leaving...]
mengu has joined #ruby
minijupe has quit [Quit: minijupe]
krz has joined #ruby
verto is now known as verto|off
froy has quit [Read error: Connection reset by peer]
Eldariof-ru has quit [Ping timeout: 246 seconds]
froy has joined #ruby
bothra has joined #ruby
tommyvyo has joined #ruby
strife25 has joined #ruby
<AndChat|> Strife25 named after the game?
<AndChat|> Strife
elux has quit [Quit: Bye!]
<canadadry> shevy:
meskyanichi has quit [Quit: Leaving...]
iamjarvo has quit [Quit: Leaving...]
kernelpa_ has joined #ruby
bothra has quit [Ping timeout: 245 seconds]
minijupe has joined #ruby
luckyruby has joined #ruby
thone_ has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
berserkr has joined #ruby
thone has quit [Ping timeout: 248 seconds]
<shevy> canadadry what
<shevy> sorry man
<shevy> no PRIVMSG, it is too consuming to answer
<shevy> just ask here
minijupe has quit [Quit: minijupe]
krusty_ar_ has joined #ruby
<shevy> I also recommend you start irb and test it
mengu has quit [Read error: Connection reset by peer]
<shevy> it's how I can copy/paste those results
<shevy> I type it in irb, then I paste it into here
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
krusty_ar has quit [Ping timeout: 244 seconds]
bbttxu has quit [Quit: bbttxu]
kirun has joined #ruby
sailias has joined #ruby
mengu has quit [Remote host closed the connection]
<AndChat|> Shevy with pry you can gist directly, no need for copy paste
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<davidcelis> you can gist directly from pry?
<davidcelis> sweet fucking jesus
<shevy> long live pastie.org!
<davidcelis> that's amazing
burgestrand has quit [Quit: Leaving.]
kernelpa_ has quit [Remote host closed the connection]
<fowl> yeah pry is pretty kewl
cj3kim has joined #ruby
qwerxy has joined #ruby
Synthead has quit [Quit: p33 ba115]
<AndChat|> Davidcelis hell yeah
Synthead has joined #ruby
discopatrick has quit [Quit: discopatrick]
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit [Ping timeout: 240 seconds]
User_420 has joined #ruby
<User_420> Hello everyone.
<tommyvyo> hello User_420
bluOxigen has joined #ruby
<davidcelis> User_420: Are you here under the influence?
savage- has quit [Remote host closed the connection]
<User_420> I have recently decided to learn to program, so I can then teach my son when hes around 5 or 6. I have no experience with programming and think that ruby or python would be a best first language. Can I get some input on what experienced programmers might think of my situation?
<davidcelis> We're gonna be biased towards Ruby over Python
<User_420> thats fine
<User_420> Just honest input on what you think are the strong points for a beginner to use this language
<User_420> if that makes sense
savage- has joined #ruby
<davidcelis> It's a general purpose scriping language, which means there's going to be very little you can't do with Ruby
<davidcelis> scripting*
jasonLaster has quit [Remote host closed the connection]
nikl has quit [Remote host closed the connection]
<davidcelis> The syntax is clear, readable, and easier to understand than most other languages of its ilk (IMO)
<axl_> I am trying to email a zip file and am getting the following error: Illegal content type 'application/zip; filename=caselot_mpx_export_for_2012_08_03.zip'
<axl_> any idea why ?
jonathanwallace has quit [Ping timeout: 246 seconds]
<fowl> 5.times { puts "foo" } <- almost english
jasonLaster has joined #ruby
nateberkopec has quit [Quit: Leaving...]
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
GoGoGarrett has quit [Remote host closed the connection]
<kylesnav> I would suggest python if you were looking for straight programming, but if any interest of web was involved definetly ruby.
<davidcelis> It has a huge community backing it, which means tons of available plugins (called gems for Ruby) that you can drop into your application at a moment's notice
<kylesnav> Ruby docs/community is much better though.
<User_420> Hrmm...
<User_420> Thats intriguing
<User_420> That's
tommyvyo has joined #ruby
<davidcelis> There's a myth that Ruby is slow (typically the argument is that it's slower than Python), but they're on the same order of magnitude in terms of speed
<User_420> Well I will want to make web apps for sure, and I am sure for a youngin that would be expected. Sounds like ruby is it then.
<davidcelis> Definitely suggest Ruby, then, yep
<davidcelis> I'm guessing you're going to want to dive into Rails, but I urge you to learn the basics of Ruby before you do that.
mpereira has quit [Ping timeout: 250 seconds]
<User_420> The only reason I was considering python, was because I heard it was SUPER structured.
<davidcelis> Otherwise, a lot of the shit Rails does is going to seem like magic, which will make learning more difficult
<User_420> Which I felt would be good for mental development
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<davidcelis> Python is structured, i.e. indentation matters, but as long as you're vigilant about structuring your own code, that really doesn't matter as much
<davidcelis> Where that comes more into play is reading other peoples' code
<User_420> Indeed
<User_420> Well I am tidy anyway
<User_420> Even my html has to look perfect
<User_420> Thanks a ton for the input guys
<User_420> I hope you understand that you will have to put up with newb questions from me for a while now =)
<davidcelis> No prob. Come back when you need help.
<User_420> Indeed
<User_420> I will lurk for now =)
<User_420> Any GOOD free ruby material online?
<User_420> like a dedicated site
<User_420> ie...learn python the hard way
jasonLaster has quit [Ping timeout: 272 seconds]
<User_420> but for ruby
christianrojas has joined #ruby
<greenysan> there is a learn ruby the hard way
wangr_ has quit [Ping timeout: 252 seconds]
ukd1 has quit [Ping timeout: 248 seconds]
<User_420> are you serious?
<greenysan> yup
<User_420> lol
<User_420> nice, I will have a look
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
v0n has quit [Quit: Leaving]
Bidness has quit [Remote host closed the connection]
alanp_ has joined #ruby
balki_ has joined #ruby
alanp has quit [Read error: Connection reset by peer]
balki has quit [Read error: Connection reset by peer]
<greenysan> ;)
<davidcelis> User_420: Check out the Ruby Koans
<davidcelis> Not only will it teach you Ruby, but it teaches you unit testing from the get go
<User_420> This is THE EXACT same lol
<User_420> Just ruby
<User_420> Same examples and everything
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sailias has quit [Quit: Leaving.]
tommyvyo has joined #ruby
reuf has quit [Quit: Leaving]
IrishGringo has joined #ruby
Markvilla has quit [Quit: Markvilla]
johnlcox has quit [Ping timeout: 248 seconds]
luckyruby has quit [Remote host closed the connection]
burgestrand has joined #ruby
vvgomes has quit [Ping timeout: 264 seconds]
<scant> anyone good with nokogiri on?
<shevy> eeks XML
savage- has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
Bidness has joined #ruby
<scant> lol the xml isn't weird or difficult, it's just an issue with nokogiri
bbttxu has joined #ruby
caveat- has quit [Quit: leaving]
<shevy> but that's what nokogiri is doing... XML
caveat- has joined #ruby
qwerxy has quit [Quit: offski]
mramaizng has left #ruby [#ruby]
verto|off is now known as verto
<davidcelis> XHTML really
<scant> yeah, but the issue here doesn't deal with any difficult xml parsing
jlogsdon has quit [Remote host closed the connection]
<canadadry> shevy: http://pastebin.com/pfaDNXn0
<shevy> Dir|f|
<shevy> this is why you should use irb canadadry
<shevy> or write smaller ruby scripts
<shevy> then you would know that you need to call a method
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
<shevy> def [](input)
<shevy> Dir[f]
<shevy> ^^^
<shevy> Dir.[f]
<shevy> hmm
<shevy> Dir.[](f)
<canadadry> I don't understand
<shevy> canadadry you used:
<shevy> Dir|f|
<shevy> do you see the difference to
<shevy> Dir[f]
<canadadry> log_files is a directory listing that's fed in optsparse
cj3kim has quit [Quit: This computer has gone to sleep]
nicoulaj has joined #ruby
Bidness has quit [Remote host closed the connection]
dv310p3r has quit [Ping timeout: 245 seconds]
MasterIdler has quit [Ping timeout: 246 seconds]
thecreators has quit [Quit: thecreators]
bbttxu has quit [Quit: bbttxu]
kirun has quit [Quit: Client exiting]
jrist is now known as jrist-brb
caveat- has quit [Quit: leaving]
gmci has joined #ruby
<canadadry> shevy: how should Dir | f | be different?
jrajav has joined #ruby
caveat- has joined #ruby
jasonLaster has joined #ruby
<matti> caveat-: Dir[
<matti> Ops
<matti> canadadry: Dir[] is a Dir object with method []
<User_420> Wow, very plain and easy to read, even for a complete beginner. Thanks so much for the recommendation guys. I am going to love learning Ruby.
<matti> canadadry: The Dir['...'] {|i| ... }
<canadadry> matti: but it works as the original coder wrote it
<matti> canadadry: |i| is the notation used in blocks.
<matti> Does it?
<canadadry> matti: the original line looks like this..
<canadadry> log_files.map {|f| Dir[f] }.flatten.compact.uniq.select{|f| File.file?(f) }.sort
<matti> I am looking at paste.
<canadadry> I wanted to test adding a thing to filter out results of the array I didn't want
<matti> Oh, fair enough.
havenn has joined #ruby
<matti> He is collecting everything in a particular directory.
<canadadry> so I'm going to add a new section in the yaml that's used as a config when rails launches, add a new option to parse for the exclusions, and then have it pull the exclusions from that
<canadadry> yeah
adeponte has quit [Remote host closed the connection]
<canadadry> his code makes baby jesus cry
<matti> LOL
<canadadry> it's hideous
graft has joined #ruby
<graft> okay, here's a good chestnut: take a hash indexed by x and y, and return a hash indexed by y and x
flagg0204 has quit [Quit: leaving]
<graft> like hash[x][y] = something
<shevy> canadadry I think you should stop trying to fix code other people wrote and instead write your own code
statarb3 has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
jasonLas_ has joined #ruby
<canadadry> shevy: I don't want to have to do a big project for my company if I can tweak an open source one that's a little immature and make it more suitable
<apeiros> log_files.map {|f| Dir[f] }.flatten.compact.uniq.select{|f| File.file?(f) }.sort <-- compact is unecessary, use flat_map instead of map.flatten
jonathanwallace has joined #ruby
<canadadry> apeiros: how is flatten different from flat_map?
<apeiros> alternatively might use inject([]) { |r,f| r | Dir[f] } and remove uniq too
nicoulaj has quit [Remote host closed the connection]
<scant> graft: fastest way would be to use a new hash and copy values in with a new index, right?
<apeiros> canadadry: flat_map does map + flatten in one go
kvirani has quit [Remote host closed the connection]
<canadadry> apeiros: ah...
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<canadadry> apeiros: log_files.flat_map {|f| Dir[f] }.compact.uniq.select{|f| File.file?(f) }.sort
<davidcelis> scant: please don't PM people without asking
<davidcelis> it makes them sad :(
<davidcelis> even more sad than nokogiri :(((
<apeiros> so my two suggested ways:
<apeiros> 1: log_files.flat_map {|f| Dir[f] }.uniq.select{|f| File.file?(f) }.sort
<apeiros> 2: log_files.inject {|r,f| r | Dir[f] }.select{|f| File.file?(f) }.sort
<shevy> hehe
<apeiros> canadadry: as said, compact is not needed
<apeiros> Dir will not return nil
jasonLaster has quit [Ping timeout: 246 seconds]
<apeiros> davidcelis: nokogiri makes you sad? o0
<canadadry> apeiros: ok, like I said I'm trying to understang this guy's code and make it suitable for usage here
flip_digits has quit [Ping timeout: 244 seconds]
<davidcelis> apeiros: Well, not Nokogiri itself
<canadadry> I don't even know what nokogiri is
<davidcelis> apeiros: its documentation makes me hella sad, though
<canadadry> it sounds like porn
<apeiros> davidcelis: sure? so far I had little to no problems with it…
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jrajav> nokogiri doesn't sound like porn, it sounds delicious
tommyvyo has joined #ruby
<apeiros> but maybe I was lucky and never needed some (to me unbeknownst) dark corners of it…
droptable has quit [Ping timeout: 244 seconds]
voodoofish430 has quit [Quit: Leaving.]
bbttxu has joined #ruby
<apeiros> canadadry: ok. missed that part, but knowing how to improve code is always good :-)
<AndChat|> Apeiros do you use new prompt stuff yet
<canadadry> apeiros: what do you think if I did it with the added thing from my pastebin?
<apeiros> AndChat|: I still have to setup pry :( you many nicked fiend you! :)
savage- has joined #ruby
<apeiros> AndChat|: but it's week-end! and I've got time! :D
<canadadry> apeiros: http://pastebin.com/pfaDNXn0
<canadadry> so if I make an exclusion list and ad it on that way at the end?
<davidcelis> apeiros: Just certain stuff not documented well, like how bad xml namespaces will silently make xpath and css not work
<apeiros> canadadry: bad code… that reject is O(n*m), could have it O(n+m) easily and even with less code by using `result - excludes` instead of that reject thing…
<davidcelis> apeiros: I've had XML with (unbeknownst to me) bad xmlns attributes that silently made any xpath or css attempts fail. I finally stripped the namespacing in frustration and then it worked
greenysan has quit [Ping timeout: 246 seconds]
<davidcelis> I had to really dig into the docs to find out how or why to do that, though, and it was not a fun process
resure has quit [Remote host closed the connection]
adeponte has joined #ruby
<canadadry> 0(n*m)?
<scant> davidcelis, can you help me with nokogiri? i have a weird issue like that
<apeiros> canadadry: http://pastie.org/4386295
<apeiros> canadadry: O, not 0 - google big-oh
<apeiros> it's a measure for complexity (performance and/or memory)
jrist-brb is now known as jrist
sepp2k has quit [Remote host closed the connection]
<canadadry> apeiros: so it's highly ineffecient?
<apeiros> davidcelis: bad xmlns attributes?
<apeiros> canadadry: it means it becomes vastly slower the more items you have
<davidcelis> apeiros: this was, unfortunately, SOAP work
<davidcelis> :(
<apeiros> -> scales badly
<apeiros> davidcelis: that shouldn't have bad xmlns…
<davidcelis> You're right, it shouldn't
<canadadry> apeiros: thanks man
<apeiros> davidcelis: it took me a bit to figure out how that namespace stuff is supposed to work…
<apeiros> maybe you ran into the same issue?
<davidcelis> Possibly
<apeiros> basically you give the namespaces your own names when you query
deryl has quit [Quit: deryl]
queequeg1 has joined #ruby
havenn has quit [Remote host closed the connection]
<apeiros> e.g. if you have <foo xmlns:bar="some/very/long/string"><bar:whatever/></foo> you do not use bar:whatever to query
<apeiros> you do: dom.xpath('myname:whatever', 'myname' => 'some/very/long/string')
axl_ has quit [Quit: axl_]
<apeiros> (or well, actually '//myname:whatever', since the other wont match :) )
lledet has left #ruby [#ruby]
tayy has quit [Remote host closed the connection]
<davidcelis> See that would have been useful in the XPath tutorial :(
<apeiros> i.e. you give the namespace an abbreviation and use that. the abbreviation used by the xml itself is irrelevant
scant has quit [Quit: This computer has gone to sleep]
jonathanwallace has quit [Remote host closed the connection]
<canadadry> apeiros: got another question
robacarp has left #ruby [#ruby]
<apeiros> i.e. xmlns:bar="some/very/long/string" just means "wherever there is <bar:whatever> it really means <some/very/long/string:whatever>
<apeiros> canadadry: don't ask to ask, just ask
jonathanwallace has joined #ruby
verto is now known as verto|off
jonathanwallace has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
<canadadry> apeiros: with the exclusion list and the way you have it if the file matches but filepath does not will it remove it from the list?
<apeiros> canadadry: I don't follow
<apeiros> what do you mean "if the file matches"?
<apeiros> oh, I just noticed that I deleted not enough in the pastie…
<apeiros> also I think there was/is a bug in your original code
<apeiros> Dir[f], not Dir|f|
DukeDave has joined #ruby
<davidcelis> shevy tried telling him about that
verto|off is now known as verto
romain1189 has quit [Quit: romain1189]
subbyyy has joined #ruby
<apeiros> ok, I didn't read the backlog too far back
<DukeDave> Is there a way to find all the classes which extend a Module?
<apeiros> DukeDave: no sane way, only for developing: ObjectSpace.each_object(SomeModule).to_a
droptable has joined #ruby
Berglund has joined #ruby
<DukeDave> apeiros: That was it!
<DukeDave> Yeah, I just want to generate some docs programatically
<apeiros> DukeDave: you only use it in irb/pry/for development?
<apeiros> ok
<apeiros> DukeDave: you know about rdoc & yard?
<DukeDave> apeiros: Yeah, this is a 'special' case
<DukeDave> But thanks for the tip :)
Progster has quit [Ping timeout: 246 seconds]
* apeiros off for some more d3
<DukeDave> Mmm, sexy.
Criztian has quit [Remote host closed the connection]
sgronblo1 has quit [Ping timeout: 255 seconds]
mahmoudimus has quit [Ping timeout: 245 seconds]
khakimov has joined #ruby
<canadadry> apeiros: I don't get <apeiros> Dir[f], not Dir|f| when the guy's code works with it as |f|
droptable has quit [Ping timeout: 264 seconds]
<davidcelis> |f| is used in a different context
<davidcelis> Dir[f] is calling a method [] on Dir with the argument f
burgestrand has quit [Quit: Leaving.]
<davidcelis> |f| is passing a variable to a block, and assigning that variable to f for the context of that block
mahmoudimus has joined #ruby
<canadadry> I think I got it now...
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
deryl has joined #ruby
tewecske has quit [Quit: Leaving.]
otters has quit [Quit: WeeChat 0.3.8]
und3f has quit [Quit: Leaving.]
darren has joined #ruby
tvw has quit [Remote host closed the connection]
Criztian has joined #ruby
tiripamwe has quit [Ping timeout: 240 seconds]
ringotwo has quit [Remote host closed the connection]
DukeDave has quit [Ping timeout: 244 seconds]
tiripamwe has joined #ruby
seanstickle has joined #ruby
Michael has joined #ruby
otters has joined #ruby
Michael is now known as Guest60601
randomautomator has quit [Remote host closed the connection]
hltbra has quit [Remote host closed the connection]
burgestrand has joined #ruby
otters has quit [Client Quit]
ringotwo has joined #ruby
<shevy> davidcelis, I think newcomers often only understand 50% of what is written to them on IRC :(
<davidcelis> what about newcombers
<shevy> the | looks quite close to [ though
<davidcelis> Dir]f[
<shevy> ruby is not for people with bad eyesight
<davidcelis> def ][()
<shevy> davidcelis, that looks like a cross or a tabard
<shevy> o
<shevy> ][
<shevy> ah damn the head is a bit off...
jgrevich_ has joined #ruby
otters has joined #ruby
<canadadry> shevy: sorry man I'm sick and didn't catch what you were saying and it finally hit me
<jrajav> ][ should index into an array backwards :P
<dvolker> is there a slang term for the pipe variable thing?
<davidcelis> dvolker: block variable?
<jrajav> arr]1[ == arr[-1]
Hawklord has quit [Ping timeout: 276 seconds]
<dvolker> '
Criztian has quit [Remote host closed the connection]
<dvolker> o
statarb3 has quit [Quit: Leaving]
<GeekOnCoffee> shevy: I think newcomers often only read 50% of what is written to them on IRC
<davidcelis> canadadry: you a big fan of ginger ale, bro?
<canadadry> what's the difference between << opt and = opt?
jgrevich has quit [Ping timeout: 255 seconds]
jgrevich_ is now known as jgrevich
<davidcelis> those are completely different operators
<davidcelis> << is append or concatenate
<dvolker> i hear canada makes a fine tonic water
<canadadry> davidcelis: nah I was puking all night and I had a bottle on my work desk and didn't know what nick to go with
<shevy> funniy idea jrajav
<shevy> I mean *funny
<shevy> but it also looks ugly
asobrasil has left #ruby [#ruby]
<shevy> arr]1[ that is really hard to type
<dvolker> canadadry once you have a nick, you have it for life, bro
<shevy> kinda true
<shevy> like apieros here
droptable has joined #ruby
stkowski has quit [Quit: stkowski]
<jrajav> I wasn't serious lmao
chimkan_ has quit [Quit: chimkan_]
<dvolker> i haven't used my teenage handle since the 90s but ppl still refer to me by it here on the metaverse
<dvolker> our great information superhighway
flagg0204 has joined #ruby
<davidcelis> my nick is pretty clever
<davidcelis> guess what it means
<AndChat|> The internet is the future
Ethan has joined #ruby
<davidcelis> UNLESS YOU HAVE EPILEPSY
<dvolker> had to fit 'davidcialis' into 10 letters?
<davidcelis> THEN DO NOT CLICK
<Spooner> davidcelis : It means the video is cel shaded?
<davidcelis> dvolker: har har
<davidcelis> Spooner: close!
yoklov has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
<dvolker> that flash melted my braincells
__BigRed__ has joined #ruby
__BigRed__ has left #ruby [#ruby]
xaq has quit [Remote host closed the connection]
<canadadry> hey can I do this?
<davidcelis> DUDE WHY ARE YOU STILL DOING Dir|f|
<davidcelis> why.
IPGlider has joined #ruby
<Spooner> :)
<canadadry> cuz I'm dumb
<canadadry> there
<Spooner> canadadry : You probably want File.file?(f) too (beyond all the horrors of Dir|f|
tobym has joined #ruby
<canadadry> Spooner: what?
christianrojas has quit [Quit: Linkinus - http://linkinus.com]
jonathanwallace has quit [Ping timeout: 272 seconds]
<Spooner> But really, it is impossible to fix code unless you know what it is supposed to do.
Berglund has quit [Quit: Computer died.]
<dvolker> yeah i don't get it.
jasonLas_ has quit [Remote host closed the connection]
<Spooner> Well, a number of things. Why are you wanting to make unique something which is, by definition, not repetetive (Dir[whatever] doesn't return duplicates).
jasonLaster has joined #ruby
kpshek has quit []
<Spooner> Oh no, I suppose flat_map might end you up with duplicates, depending on what log_files contains (so ignore me, perhaps).
nateberkopec has joined #ruby
regedarek has joined #ruby
<regedarek> Hello guys Is ths a true that ruby have problem with Xcode 4.4, so wich version of xcode should i install??
<Spooner> canadadry : To more directly answer your question, File.file?(f) is true if it is a file. No such method as File.file(f)
sevvie has quit [Quit: sevvie]
IPGlider has quit []
<Spooner> canadadry : Do you realise that line #2 doesn't actually alter the value of log_files at all, so it is ingored in #3 and #4. Again, can't really fix it because I'm not sure what the intention is, or what "log_files" contains.
jasonLaster has quit [Ping timeout: 246 seconds]
<canadadry> Spooner: why doesn't it alter the valie?
<burgestrand> regedarek: XCode 4.1 should be safe.
jgarvey has quit [Quit: Leaving]
kenichi has quit [Remote host closed the connection]
<davidcelis> regedarek: depends on the ruby version
<burgestrand> regedarek: using the newer versions should be avoided if you are not comfortable playing around in the terminal, it might need some extra steps to set up correctly.
<davidcelis> regedarek: the higher XCode versions can't build Ruby < 1.9.3
sailias has joined #ruby
kylesnav has quit [Quit: Leaving.]
havenn has joined #ruby
<Spooner> canadadry : Well, because it doesn't. Methods like flat_map and uniq and select don't change the original collection, but rather return a modified version. uniq! or select! would change the original collection, but you can't just chain those like that. I think what you want is log_files = log_files.flat_map...etc
<Spooner> But log_files is, by the look of it, a local variable, so you don't have access to in inside the method. If it is a method, then you can't alter it as you seem to want to to.
<regedarek> hmm, i used 4.3 in work with success
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
Russell^^ has joined #ruby
<canadadry> it's a variable that's a little more than local
<canadadry> it really should be a class variable but the guy who wrote it didn't do it that way
SCommette has quit [Quit: SCommette]
<Spooner> "A little more than local" is perhaps the best thing I've heard in a while.
<dvolker> lol
jfelchner has joined #ruby
<canadadry> it's defined in the opening arguments when the rails app launches and then passed around by a few different ruby scripts
<dvolker> is a little more than local a yokle
<canadadry> eventually it gets printed to a drop list
<Spooner> Yes, but that method can't see it.
<canadadry> the main part has attr_accessor on it
<canadadry> to allow it to
<Spooner> So you need to pass it in.
droptable has quit [Ping timeout: 240 seconds]
<Spooner> Ah, then it isn't a variable per se, but a method. Yes, so it can be accessed, but you can't then just use log_files -= excludes on it.
verto is now known as verto|off
uris has quit [Quit: leaving]
berserkr has quit [Quit: Leaving.]
<Spooner> canadadry : Seriously, you need a proper grounding in Ruby. You really can't edit other people's files with so many holes in your knowledge, that are on such a fundamental level.
mrsolo has quit [Quit: Leaving]
SQLStud has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
savage-_ has joined #ruby
Synthead has quit [Remote host closed the connection]
savage- has quit [Read error: Operation timed out]
mpereira has joined #ruby
javon has joined #ruby
tompsony has joined #ruby
ringotwo has joined #ruby
Jay_Levitt has quit [Ping timeout: 248 seconds]
Chryson has joined #ruby
chimkan has joined #ruby
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
danielvdotcom has joined #ruby
jonathanwallace has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<shevy> yeah
<shevy> this is the basics
<shevy> <canadadry> it really should be a class variable but the guy who wrote it didn't do it that way
<shevy> class variables are @@foo
<shevy> they are not very useful
Goles has quit [Quit: Computer has gone to sleep.]
danielvdotcom has left #ruby [#ruby]
droptable has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
<Spooner> canadadry : Do ask questions here though. Not saying you shouldn't, of course :)
ryh has quit [Remote host closed the connection]
freeayu has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
ianbrandt has quit [Quit: ianbrandt]
<shevy> canadadry, the variable log_files is not known inside the method
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<tompsony> https://secure.gravatar.com/avatar/b495a68c7d31cb35dbb97cfff400220a?s=140&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png
<tompsony> are you spooner
<tompsony> ?
freeayu has quit [Read error: Connection reset by peer]
<tompsony> ^^
<Spooner> shevy : canadadry already said it was an attr_accessor, not a local variable. That, however, opens up other issues with the code snippet :)
<shevy> did we find out if he knows what an attr_accessor is
<shevy> I think he is asleep now
blacktul_ has quit [Remote host closed the connection]
<tompsony> otters x spooner
<shevy> tompsony are you stalking or just looking for someone to marry?
<shevy> leave my otters alone!!! :(
nricciar_ has quit [Ping timeout: 260 seconds]
<shevy> everyone likes a friendly otter
<tompsony> ;/
<otters> make it stooop
w400z has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
<canadadry> shevy: I know what an attr_accessor is
<canadadry> it's allowing an instance of a class variable to be accessed globally
<shevy> what is a class variable
<GeekOnCoffee> shevy: it's a variable that a teacher give's their students
<shevy> lol
<GeekOnCoffee> gives*
<shevy> aww that killed my followup question kinda
<shevy> what is an instance variable
w400z_ has joined #ruby
freeayu has joined #ruby
<shevy> I really think we need to integrate chris pine tutorial into an official tutorial for ruby
<shevy> on the official homepage... a bit similar to what python does with their online tutorial
<shevy> #python does not speak python
facefox_com has joined #ruby
<shevy> google translate for animal noise
chichou has quit [Remote host closed the connection]
<seanstickle> #python only speaks angry internet troll language
jrist is now known as jrist-afk
<tompsony> [otters]: you took the picture from google +? one in which you and your friend tentavão spinning fly half with their heads?
<tompsony> I liked that ^ ^
<tompsony> lol
w400z has quit [Ping timeout: 272 seconds]
<tompsony> tried to*
<shevy> tompsony what programming language do you use
<tompsony> hihi
<tompsony> only the pt-br
<tompsony> hehehe
<otters> I never said that
<shevy> portugese?
<tompsony> yes
<shevy> gobolinux was started by 3 brazilian guys
<canadadry> python tutorial on their site is terribad
<canadadry> but anyway
koshii has quit [Quit: Lost terminal]
<shevy> sadly they are too busy with work nowadays :(
<shevy> the dream of AppDirs will never happen ...
<otters> gobolinux is trying to copy off osx
havenn has joined #ruby