apeiros changed the topic of #ruby-lang to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste code on https://gist.github.com
mikecmpb_ has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
AlexAltea has quit [Read error: Connection reset by peer]
ledestin has joined #ruby-lang
ledestin has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayid has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby-lang
dayid has joined #ruby-lang
dayid has quit [Ping timeout: 255 seconds]
dayid has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby-lang
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
_djbkd has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
enebo has joined #ruby-lang
riotjones has quit [Ping timeout: 250 seconds]
jlbenc has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kfpratt has joined #ruby-lang
<jlbenc> Hello.
<jlbenc> Any Rails people around?
<jhass> jlbenc: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
mattyohe has quit [Quit: Connection closed for inactivity]
_kfpratt has joined #ruby-lang
<jlbenc> Thanks. IRC n00b here, so I'll try :)
kfpratt_ has joined #ruby-lang
kfpratt_ has quit [Remote host closed the connection]
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfpratt has quit [Ping timeout: 245 seconds]
byprdct has joined #ruby-lang
<jlbenc> register publicp
byprdct has quit [Max SendQ exceeded]
<jhass> jlbenc: next password ;)
_kfpratt has quit [Ping timeout: 256 seconds]
<jlbenc> /msg NickServ VERIFY REGISTER jlbenc dtcqntloitqq
kfpratt has joined #ruby-lang
<jhass> jlbenc: next password ;)
<jhass> ah well, the verify token doesn't matter I guess if nobody here's mean :P
kfpratt has quit [Remote host closed the connection]
<jlbenc> jhass: sorry, don't understand what you mean :(
<jhass> you put a space in front of that /msg
<jlbenc> I did register and got may email confirmation for my nickname
amclain has joined #ruby-lang
jwaldrip has quit [Quit: Be back later ...]
<baweaver> whoops
komanda has joined #ruby-lang
<jlbenc> jhass: I think i got it now :) thx
duderonomy has quit [Remote host closed the connection]
Averna has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
komanda has quit [Quit: Bye]
komanda has joined #ruby-lang
aghalarp has joined #ruby-lang
komanda has quit [Client Quit]
aghalarp has quit [Max SendQ exceeded]
komanda has joined #ruby-lang
komanda has quit [Client Quit]
komanda has joined #ruby-lang
havenwood has quit [Ping timeout: 252 seconds]
caseydriscoll has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
postmodern has joined #ruby-lang
joaomdmoura has joined #ruby-lang
cpt_yossarian has quit [Quit: And then he took off.]
sankaber has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
cpt_yossarian has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joaomdmoura has quit [Remote host closed the connection]
bruno- has joined #ruby-lang
enebo has quit [Quit: enebo]
joaomdmoura has joined #ruby-lang
komanda has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 244 seconds]
hendranata_ has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
enebo has joined #ruby-lang
enebo has quit [Client Quit]
postmodern has quit [Quit: Leaving]
baweaver has joined #ruby-lang
makepkgnotwar has joined #ruby-lang
makepkgnotwar has quit [Max SendQ exceeded]
makepkgnotwar has joined #ruby-lang
makepkgnotwar has quit [Max SendQ exceeded]
makepkgnotwar has joined #ruby-lang
roamingdog has joined #ruby-lang
makepkgnotwar has quit [Max SendQ exceeded]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
makepkgnotwar has joined #ruby-lang
dorei has quit [Remote host closed the connection]
davispuh has quit [Read error: Connection reset by peer]
makepkgnotwar has quit [Max SendQ exceeded]
makepkgnotwar has joined #ruby-lang
amystephen has quit [Quit: amystephen]
wallerdev has quit [Ping timeout: 250 seconds]
makepkgnotwar has quit [Max SendQ exceeded]
jlbenc has quit []
fujimura has joined #ruby-lang
makepkgnotwar has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
akkad has joined #ruby-lang
makepkgnotwar has quit [Max SendQ exceeded]
chouhoulis has quit [Remote host closed the connection]
makepkgnotwar has joined #ruby-lang
caseydriscoll has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
duderonomy has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
sankaber has joined #ruby-lang
kfpratt has joined #ruby-lang
lytol has joined #ruby-lang
roamingdog has joined #ruby-lang
nedp has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
SaltyWendigo__ has joined #ruby-lang
drbrain has quit [Ping timeout: 265 seconds]
mathie has quit [Ping timeout: 265 seconds]
NameNotFound has quit [Ping timeout: 265 seconds]
NameNotFound has joined #ruby-lang
SkramX_ has quit [Ping timeout: 265 seconds]
drbrain has joined #ruby-lang
ramblinpeck_ has quit [Ping timeout: 265 seconds]
zzak has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 244 seconds]
[spoiler] has quit [Ping timeout: 265 seconds]
mva has quit [Ping timeout: 265 seconds]
joaomdmoura has quit [Remote host closed the connection]
sankaber has quit [Ping timeout: 264 seconds]
SaltyWendigo_ has quit [Ping timeout: 265 seconds]
pskosinski has quit [Ping timeout: 265 seconds]
melter has quit [Ping timeout: 265 seconds]
Eising has quit [Ping timeout: 265 seconds]
franckverrot has quit [Ping timeout: 265 seconds]
JoL1hAHN has quit [Ping timeout: 265 seconds]
universa1 has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ruby-lang
mcclurmc_ has quit [Read error: Connection reset by peer]
mcclurmc_ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
Eising has joined #ruby-lang
zzak has joined #ruby-lang
ramblinpeck_ has joined #ruby-lang
SkramX_ has joined #ruby-lang
pskosinski has joined #ruby-lang
pico-pete has joined #ruby-lang
mcclurmc has quit [Ping timeout: 250 seconds]
mathie has joined #ruby-lang
universa1 has joined #ruby-lang
quintinadam has joined #ruby-lang
riotjones has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
tkuchiki has joined #ruby-lang
[spoiler] has joined #ruby-lang
franckverrot has joined #ruby-lang
quintinadam has quit [Ping timeout: 245 seconds]
riotjones has quit [Ping timeout: 264 seconds]
mva has joined #ruby-lang
melter has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
JoL1hAHN has joined #ruby-lang
tkuchiki has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
mattyohe has joined #ruby-lang
sankaber has joined #ruby-lang
sankaber has quit [Client Quit]
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby-lang
lewix has quit [Remote host closed the connection]
slawrenc_ has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has joined #ruby-lang
chouhoulis has quit [Ping timeout: 244 seconds]
makepkgnotwar has joined #ruby-lang
Iskarlar has joined #ruby-lang
michael_mbp has quit [Excess Flood]
LMity has joined #ruby-lang
michael_mbp has joined #ruby-lang
bruno- has joined #ruby-lang
Iskarlar has quit [Max SendQ exceeded]
Iskarlar has joined #ruby-lang
bruno- has quit [Ping timeout: 264 seconds]
roamingdog has quit [Remote host closed the connection]
caseydriscoll has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
gix has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby-lang
Mark-6ma has joined #ruby-lang
gix has joined #ruby-lang
b_hoffman has joined #ruby-lang
EnduranceMan has joined #ruby-lang
<EnduranceMan> Could anyone here help me out with copying an array into a new array while changing values?
Mark-6ma has quit [Quit: -]
brushbox has joined #ruby-lang
<havenwood> EnduranceMan: That sounds like Array#map: http://ruby-doc.org/core/Array.html#method-i-map
jwaldrip has joined #ruby-lang
LMity has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
Respek has joined #ruby-lang
quintinadam has joined #ruby-lang
nazty has joined #ruby-lang
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quintinadam has quit []
dellavg_ has joined #ruby-lang
riotjones has joined #ruby-lang
makepkgnotwar has joined #ruby-lang
quintinadam has joined #ruby-lang
x44x45x41x4E has joined #ruby-lang
michael_mbp has quit [Excess Flood]
riotjones has quit [Ping timeout: 245 seconds]
michael_mbp has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
Torrieri has quit [Quit: Be back later ...]
|jemc| has quit [Ping timeout: 264 seconds]
lytol has quit [Remote host closed the connection]
centrx has quit [Quit: Shutting down, Please wait...]
b_hoffman has quit [Quit: b_hoffman]
skade has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
fujimura_ has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
jas02 has joined #ruby-lang
jas02 has quit [Client Quit]
quintinadam has quit []
fujimura has joined #ruby-lang
kfpratt has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
relix has joined #ruby-lang
kfpratt has quit [Ping timeout: 252 seconds]
caseydriscoll has joined #ruby-lang
postmodern has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
haraoka has joined #ruby-lang
jwaldrip has quit [Quit: Be back later ...]
dhjondoh has joined #ruby-lang
lytol has joined #ruby-lang
lytol has quit [Ping timeout: 276 seconds]
Torrieri has joined #ruby-lang
Torrieri has quit [Ping timeout: 246 seconds]
tkuchiki_ has joined #ruby-lang
pepperbreath1 has quit [Read error: Connection reset by peer]
pepperbreath has joined #ruby-lang
tkuchiki has quit [Ping timeout: 252 seconds]
semperfried76 has quit [Quit: Lingo: www.lingoirc.com]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexAltea has joined #ruby-lang
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby-lang
leat has joined #ruby-lang
tkuchiki_ has quit [Ping timeout: 250 seconds]
AlexAltea has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
ur5us has quit [Remote host closed the connection]
rippa has joined #ruby-lang
charliesome has quit [Quit: zzz]
relix has joined #ruby-lang
relix has quit [Client Quit]
makepkgnotwar has joined #ruby-lang
riotjones has joined #ruby-lang
ledestin has joined #ruby-lang
ledestin has quit [Client Quit]
x44x45x41x4E has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby-lang
ur5us has joined #ruby-lang
solars has joined #ruby-lang
akkad has quit [Excess Flood]
stan has joined #ruby-lang
LMity has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
akkad has joined #ruby-lang
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 248 seconds]
cornerma1 is now known as cornerman
bruno- has joined #ruby-lang
Bertg has joined #ruby-lang
jas02 has joined #ruby-lang
LMity has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 256 seconds]
amclain has quit [Quit: Leaving]
hahuang65 has joined #ruby-lang
charliesome has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
Averna has quit [Quit: Leaving.]
djbkd_ has joined #ruby-lang
lytol has joined #ruby-lang
lytol has quit [Ping timeout: 245 seconds]
mikecmpb_ has quit [Quit: i've nodded off.]
x44x45x41x4E has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
froots has quit [Read error: Connection reset by peer]
froots has joined #ruby-lang
Miphix has quit [Ping timeout: 252 seconds]
Cocoabean has quit []
yfeldblum has quit [Remote host closed the connection]
djbkd_ has quit [Remote host closed the connection]
Iskarlar has joined #ruby-lang
dhjondoh has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
endy_c has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
dhjondoh has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
charliesome has quit [Quit: zzz]
marr has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 255 seconds]
jas02 has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
endy_c has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
tsujp has joined #ruby-lang
jwaldrip has joined #ruby-lang
dhjondoh has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
tomaz_b has joined #ruby-lang
dhjondoh has joined #ruby-lang
rflot has quit [Ping timeout: 256 seconds]
twe4ked has quit [Ping timeout: 256 seconds]
waxjar has quit [Ping timeout: 256 seconds]
jwaldrip has quit [Ping timeout: 245 seconds]
dlackty__ has quit [Ping timeout: 256 seconds]
rflot has joined #ruby-lang
dlackty__ has joined #ruby-lang
waxjar has joined #ruby-lang
twe4ked has joined #ruby-lang
guillaume-rb has joined #ruby-lang
nedp has quit [Remote host closed the connection]
<yorickpeterse> morning
<pipework> good morning (ugt)
c0m0 has joined #ruby-lang
djbkd_ has joined #ruby-lang
arBmind has joined #ruby-lang
hahuang65 has joined #ruby-lang
djbkd_ has quit [Ping timeout: 255 seconds]
jas02 has joined #ruby-lang
fujimura_ has joined #ruby-lang
hahuang65 has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby-lang
fujimura_ has quit [Ping timeout: 250 seconds]
tockitj has quit [Ping timeout: 252 seconds]
makepkgnotwar has quit [Quit: Textual IRC Client: www.textualapp.com]
lytol has joined #ruby-lang
lytol has quit [Ping timeout: 256 seconds]
planck has joined #ruby-lang
jds has joined #ruby-lang
Respek has quit [Quit: gone to sleep. ZZZzzz…]
<planck> Hey. I'm trying to figure out how to run ARGV from the terminal. Do I need some kind of special interpreter? Because it doesn't seem to work.
<jhass> "run ARGV"?
<pipework> What does "run ARGV" mean?
<jhass> what does that mean?
<pipework> jhass: lul
tockitj has joined #ruby-lang
<jhass> ^5
<planck> Haha, oh sorry. :P
<pipework> ^6 with a +1 for being jhass so consistently.
<planck> Ill try to explain better. Wait
<yorickpeterse> If you mean you want to set them, you'll have to run your script like `ruby some_script.rb arg1 arg2 arg3`
rikkipitt has joined #ruby-lang
<planck> so i've got a script that looks something like this:
<planck> filename = ARGV.first
rikkipitt has quit [Remote host closed the connection]
<planck> txt = open(filename)
rikkipitt has joined #ruby-lang
<pipework> planck: gist your script
<planck> that will probably work better. thanks
<pipework> And, unless you can explain it on one line in IRC, add another 'file' to the gist with an explanation. Feel free to add code comments to specific bits.
<jhass> then what yorickpeterse said, you may also be interested in ARGF, and always pass a block to open
<planck> so. my problem is basically this. i run the script from the terminal. but nothing happens.
<pipework> planck: So, is there something wrong with the filename local, or what part are you having trouble with? There are things you should change, but I'd like to hold those until you explain what's not working as you expect.
fumduq has quit [Ping timeout: 252 seconds]
<pipework> No puts gets written? How are you running this script?
duderonomy has quit [Read error: Connection reset by peer]
<planck> ruby filename.rb
fumduq has joined #ruby-lang
<pipework> planck: And you never see "Here's your file filename.rb"?
<pipework> I should check to make sure he's calling ARGV right, I always forget if it's a global ornot.
<jhass> it should throw on passing nil to open
<pipework> Ah it's a method.
arBmind has quit [Read error: Connection reset by peer]
<jhass> >> method(:ARGV)
<eval-in> jhass => undefined method `ARGV' for class `Object' (NameError) ... (https://eval.in/309958)
<jhass> nope
stamina has joined #ruby-lang
<jhass> it's a constant with an object assigned that pretends to be an array
rikkipitt has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
<jhass> planck: please put the following into a file:
<jhass> p ARGV
<planck> jhass: alright
<jhass> run it with, ruby foo.rb
<jhass> then with ruby foo.rb a
<jhass> then with ruby foo.rb a b
c0m0 has quit [Ping timeout: 244 seconds]
<jhass> then with ruby foo.rb "a b"
<jhass> compare the outputs
<workmad3> jhass: heh :) you could have suggested 'ruby -e "p ARGV" a b' rather than create a file ;)
<jhass> workmad3: yeah, I think that makes it less clear though
<planck> jhass: so this is what i get: can't covert nil into String
<jhass> yeah
<jhass> did you do what I said?
<planck> jhass: im on it. just booting the computer. im on my phone atm :P
duderonomy has joined #ruby-lang
duderonomy has quit [Max SendQ exceeded]
<planck> jhass: alright. so i get the same result if i run with the flags a and a b "initialize: no such file or directory. from foo.rb:2:in open and main
<jhass> I'm not saying you should run your script with a, a b
<jhass> just a script containing "p ARGV"
<jhass> so you can see how it works
<planck> jhass: oh :D
stamina has quit [Quit: WeeChat 1.1.1]
planck has quit [Quit: Page closed]
<pipework> workmad3: That works this time, but there are things in ruby that won't work with the -e line very whale.
<jds> Am I right in thinking that the number of live objects in GC.stat is :total_allocated_objects - :total_freed_objects ?
<workmad3> pipework: right... but we're not talking about those hypotheticals, we're talking about the concrete case where it does work this time :P
<pipework> Hypotheticals? __FILE__ and the like are hypothetical? binding too?
<workmad3> pipework: in this situation, they're hypothetical
<pipework> I'd at least mention the caveat eagerly.
<pipework> However, I agree with jhass on keeping it file-oriented so no translation is necessary. If they're having trouble with ARGV, maybe they'll also have trouble with translating the one-liner.
<workmad3> pipework: I've also not had enough coffee yet, so I'm stubborn, argumentative and defensive :P
c0m0 has joined #ruby-lang
<workmad3> or rather, more so than usual on those attributes :)
<pipework> workmad3: Good morning, darling.
GBrawl has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
planck has joined #ruby-lang
<planck> jhass: nothing happens at all. and i tried something else. like assigning arguments to ARGV... like first, second, third = ARGV and tried to print it out. but its just blank
<workmad3> pipework: quiet, I'm drinking coffee :P
* workmad3 sips
<pipework> workmad3: Would you please shut up, I can taste your voice in my coffee. :p
<jhass> planck: do cat foo.rb and then repeat the commands I gave you, then copy paste everything to a gist
johnchalekson has joined #ruby-lang
planck has quit [Quit: Page closed]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
* jhass wonders if their browser has no tabbing support
<pipework> Maybe they're running the browser from one of the more early PSP firmwares....
brushbox has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
brushbox has quit [Client Quit]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
brushbox has joined #ruby-lang
brushbox has quit [Client Quit]
brushbox has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
hendranata_ has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
haraoka has quit [Ping timeout: 248 seconds]
johnchalekson has joined #ruby-lang
jas02 has quit [Quit: jas02]
chinmay_dd has joined #ruby-lang
ArchRogem has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has joined #ruby-lang
bnagy has quit [Ping timeout: 265 seconds]
bnagy has joined #ruby-lang
bb010g has quit [Ping timeout: 256 seconds]
moogumbo has quit [Ping timeout: 256 seconds]
rikkipitt has joined #ruby-lang
bb010g has joined #ruby-lang
moogumbo has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 276 seconds]
mva has left #ruby-lang [#ruby-lang]
charliesome has joined #ruby-lang
arBmind has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
hahuang65 has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
fujimura has joined #ruby-lang
x44x45x41x4E has quit [Remote host closed the connection]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 255 seconds]
SylarRuby has joined #ruby-lang
fujimura has quit [Ping timeout: 272 seconds]
brushbox has joined #ruby-lang
Integralist has joined #ruby-lang
Integralist has quit [Client Quit]
lytol has joined #ruby-lang
jas02 has joined #ruby-lang
duderonomy has joined #ruby-lang
chinmay_dd has joined #ruby-lang
lytol has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
bruno- has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
bruno- has quit [Ping timeout: 246 seconds]
mvdb has joined #ruby-lang
tomaz_b has quit [Ping timeout: 245 seconds]
johnchalekson has quit [Read error: Connection reset by peer]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
nedp has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
GBrawl has quit [Quit: (null)]
jefus_ has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
jefus has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 246 seconds]
b_hoffman has joined #ruby-lang
bruno- has joined #ruby-lang
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby-lang
tsujp has quit [Quit: tsujp is outta here]
Dysp has joined #ruby-lang
<Dysp> Yaw. What was the rails-chan again? :)
<workmad3> Dysp: #rubyonrails ?
<Dysp> Easy as dat :p
sarkyniin has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
workmad3 is now known as gonemade3
gonemade3 is now known as gonemad3
gonemad3 is now known as workmad3
johnchalekson has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 245 seconds]
ldnunes has joined #ruby-lang
Bertg has joined #ruby-lang
Dysp has quit [Quit: Page closed]
lewix has joined #ruby-lang
lewix has joined #ruby-lang
nedp has quit [Remote host closed the connection]
lewix has quit [Client Quit]
guillaume-rb has quit [Quit: guillaume-rb]
skade has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
bruno- has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
lytol has joined #ruby-lang
roamingdog has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
lytol has quit [Ping timeout: 255 seconds]
rippa has quit [Read error: Connection reset by peer]
LMity has joined #ruby-lang
x44x45x41x4E has joined #ruby-lang
rippa has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby-lang
rippa has quit [Ping timeout: 255 seconds]
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
LMity has quit [Ping timeout: 250 seconds]
x44x45x41x4E has quit [Quit: Textual IRC Client: www.textualapp.com]
johnchalekson has quit [Remote host closed the connection]
Contigi777 has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
charliesome has quit [Quit: zzz]
setanta_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
dhjondoh has quit [Quit: dhjondoh]
charliesome has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
charliesome_ has joined #ruby-lang
rikkipitt has quit [Quit: Leaving...]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
sgambino has joined #ruby-lang
johnchalekson has joined #ruby-lang
<yorickpeterse> hack of the day:
<yorickpeterse> ObjectSpace.each_object(SomeClass.singleton_class)
<yorickpeterse> gets all descendants of said class basically
* yorickpeterse runs
lapide_viridi has joined #ruby-lang
guillaume-rb has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
Miphix has joined #ruby-lang
rippa has joined #ruby-lang
charliesome_ has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
<chris2> why not just SomeClass?
<mikecmpbll> :/
sankaber has joined #ruby-lang
<yorickpeterse> chris2: because then you get instances of SomeCLass
<yorickpeterse> not descendants
<chris2> ah
<chris2> of course
<yorickpeterse> Yeah it's totally logical bro
<chris2> it is. nice truck
<chris2> *trick
ruby-lang899 has joined #ruby-lang
<yorickpeterse> next up: "How to replace all your ActiveSupport code with ObjectSpace"
<chris2> just load each sql row into a ruby object
<chris2> and use ObjectSpace instead of ActiveRecord for queries
<yorickpeterse> haha
<yorickpeterse> Well, ObjectSpace.each_object returns an Enumerable so that would be possible more or less
<yorickpeterse> ObjectSpace.each_object(ActiveRecord::Relation::WhateverItWas).select { |row| ... }
Torrieri has joined #ruby-lang
BFlorin has joined #ruby-lang
<mikecmpbll> that's actually how activesupport's `descendants` method works :p
<ruby-lang899> Hello, I was recently trying my hand at testing in rails and got a little confused with how mocha works. As in - when I say - object.expects(:someModule).returns(someResult), does it execute 'someModule' or does it check whether it has been called?
<yorickpeterse> mikecmpbll: doesn't it keep track of them in an array?
<BFlorin> hei guys, i am trying to figure it how to fix this error, []`: no implicit conversion of Symbol into Integer (TypeError) fix
<mikecmpbll> yorickpeterse: indeed, seemingly pointlessly.
<BFlorin> i am working on making a script that downloads the court files form the ministry of justice website
<mikecmpbll> BFlorin: most likely you're trying to access a hash that's actually an array
tkuchiki has joined #ruby-lang
<mikecmpbll> foo[:bar] where foo is an array not a hash.
<BFlorin> yep, i think it is a array https://github.com/baditaflorin/portal.just.ro
enebo has joined #ruby-lang
malconis has joined #ruby-lang
<BFlorin> how could i serialize it, or specify that to look for a array
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
<mikecmpbll> BFlorin: not sure what you mean, what code am i looking at
amystephen has joined #ruby-lang
cartothemax has joined #ruby-lang
<BFlorin> mikecmpbll: basically, i am trying to download the files from each of the court, and to output a csv file for each court
<BFlorin> mikecmpbll: and i get that error at line 49
ruby-lang899 has quit [Ping timeout: 246 seconds]
<mikecmpbll> BFlorin: ok, so parte is an array, why are you trying to access it like it's a hash?
<BFlorin> mikecmpbll: because i don`t know how to acces it as a array :)
agarie has joined #ruby-lang
<mikecmpbll> with an index of the item you want from the array
<mikecmpbll> ['a','b','c'][2] == 'c'
symm- has quit [Ping timeout: 264 seconds]
johnchalekson has quit [Read error: Connection reset by peer]
lytol has joined #ruby-lang
johnchalekson has joined #ruby-lang
johnchalekson has quit [Max SendQ exceeded]
johnchalekson has joined #ruby-lang
<BFlorin> mikecmpbll: i don`t where to modify this, i will search for the documentation, hopefully i will find it
<BFlorin> mikecmpbll: i tried removing the |parte| and putting ['nume','calitate_Parte'][2] == 'nume'
lytol has quit [Ping timeout: 264 seconds]
<mikecmpbll> :/ tbh i'm not at all sure what you're trying to do
havenwood has joined #ruby-lang
<ljarvis> dat code
<mikecmpbll> BFlorin: you have some data being returned from your SOAP thing in `dosare` -- how you fix your error depends entirely on the structure of this and what you want to do with it
<mikecmpbll> neither of which have you made clear :)
<BFlorin> mikecmpbll: the data i am downloading from here http://portalquery.just.ro/query.asmx?WSDL
<mikecmpbll> BFlorin: the data isn't that important, it's the structure of the response object.
adude has quit [Ping timeout: 256 seconds]
<mikecmpbll> from the code I can infer that dosar[:parti][:dosar_parte] is an array of arrays, what do the inner arrays (`parte`) contain and what do you want to do with the contents?
<mikecmpbll> actually, it could be an array of strings. i didn't consider that.
brushbox has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
<mikecmpbll> is `parte` a string?
<BFlorin> mikecmpbll: <s:complexType name="DosarParte"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="nume" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="calitateParte" type="s:string"/> </s:sequence>
archie has joined #ruby-lang
<mikecmpbll> BFlorin: i'd rather know what the ruby object is, i don't really know how Savon serialises XML off the top of my head.
hal_9000_ has joined #ruby-lang
sankaber has quit [Read error: Connection reset by peer]
<BFlorin> mikecmpbll: it`s a rray of strings, yes
sankaber has joined #ruby-lang
<BFlorin> i don`t know what the ruby object is, how can i find out
<mikecmpbll> put: raise dosar[:parti][:dosar_parte].inspect before line 48
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
<BFlorin> mikecmpbll: F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:48:in `block (3 levels) in <main>': {:nume=>"POPINCIUC EMIL", :calitate_parte=>"Apelant"} (RuntimeError)
<mikecmpbll> okkk, gotcha
<mikecmpbll> so you don't want [:dosar_parte].each..
<mikecmpbll> just do: dosarParteNume += dosar[:parti][:dosar_parte][:nume] + "#"
bruno- has joined #ruby-lang
Contigi777 has quit [Quit: Leaving]
<mikecmpbll> unless with this API dosar[:parti][:dosar_parte] is sometimes a collection, and sometimes not? (not uncommon with SOAP interfaces x_x)
Miphix has quit [Quit: Leaving]
<BFlorin> the api is badly documented, because they don`t want people having access to the data, i think, so they are faking it, they say that they allow people to play with the data, but is really hard to get the data
<mikecmpbll> :)
<mikecmpbll> if it can vary between collection and not, you can use something like [dosar[:parti][:dosar_parte]].flatten.each do |parte|
jgpawletko has joined #ruby-lang
bruno- has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
arBmind has joined #ruby-lang
Miphix has joined #ruby-lang
<BFlorin> mikecmpbll: now is different, it work for 6 files 111/44/2004 112/44/2004 115/44/2004 113/44/2004 114/44/2004 117/44/2004 116/44/2004 F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:50:in `[]': no implicit con version of Symbol into Integer (TypeError)
<mikecmpbll> hehe. so looks like it does vary
hahuang65 has quit [Ping timeout: 248 seconds]
<mikecmpbll> BFlorin: normalize it as always an array like i put above
<mikecmpbll> also here for ease of reading: https://gist.github.com/mikecmpbll/2a83c19502d4beff7e5e
<BFlorin> mikecmpbll: can i parse it somehow ?
<mikecmpbll> BFlorin: what do you mean?
<mikecmpbll> also, << many factors faster than += for building strings.
<BFlorin> to parse it somehow that will work
<mikecmpbll> BFlorin: sure, use the code i showed.
<BFlorin> mikecmpbll: Now it did almost 200 files, before showing this 214/44/2004 223/44/2004 F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:48:in `block (3 levels) in <main>': undefined method `[]' for nil:NilClass (NoMethodError)
kfpratt has joined #ruby-lang
<mikecmpbll> can you update the gist with your current code? i'm not sure which is line 48 anymore.
byprdct has joined #ruby-lang
byprdct has quit [Max SendQ exceeded]
<BFlorin> mikecmpbll: i have updated it, 48 is this [dosar[:parti][:dosar_parte]].flatten.each do |parte|
mattyohe has joined #ruby-lang
<mikecmpbll> ah okay. so dosar[:parti] must be nil in this instance.
<mikecmpbll> you will have to check for that.
<mikecmpbll> if dosar[:parti] ....
dm78 has joined #ruby-lang
sankaber has quit [Read error: Connection reset by peer]
mvdb has quit [Quit: Leaving]
sankaber has joined #ruby-lang
charliesome has quit [Quit: zzz]
timanema has joined #ruby-lang
MagicHat has joined #ruby-lang
bruno- has joined #ruby-lang
jwaldrip has joined #ruby-lang
<BFlorin> mikecmpbll: i am guessing that if dosarParteNume != nil will not work
<mikecmpbll> BFlorin: nope it's not dosarParteNume which is nil :)
cpt_yossarian has quit [Quit: And then he took off.]
cpt_yossarian has joined #ruby-lang
<BFlorin> mikecmpbll: Yeeey, is working!!!!!
<mikecmpbll> BFlorin: :))
brushbox has quit [Quit: Leaving.]
<BFlorin> mikecmpbll: thank you very much!!! Now i can start to modify for the rest of the data that i need and i can do some vital statistics about the justice system in my country :D
lapide_viridi has quit [Quit: Leaving]
agarie has quit [Remote host closed the connection]
<mikecmpbll> BFlorin: good work, happy data gathering.
MagicHat has quit [Remote host closed the connection]
cpt_yossarian has quit [Quit: And then he took off.]
whippythellama has joined #ruby-lang
davispuh has joined #ruby-lang
caseydriscoll has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
Mellett68 has quit [Remote host closed the connection]
Mellett68 has joined #ruby-lang
chouhoulis has joined #ruby-lang
<BFlorin> mikecmpbll: i tryied to extrapolate to the other fields that i want, but i got this 111/44/2004 F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:73:in `block (4 levels) in <main>': undefined method `+' for nil:NilClass (NoMethodError)
lytol has joined #ruby-lang
archie has quit [Ping timeout: 252 seconds]
<mikecmpbll> BFlorin: okay, so what do you suppose that means?
<BFlorin> most probably something related to my code, he says that i did not provided him with a way to catch a error
riotjones has quit [Remote host closed the connection]
<BFlorin> i think
n3b- has joined #ruby-lang
slawrence00 has joined #ruby-lang
lytol has quit [Ping timeout: 244 seconds]
<BFlorin> mikecmpbll: but if it worked for one , then i just copy pasted and changed other setting, so it`s more probably with the way the data is coming from the server.... https://gist.github.com/baditaflorin/eedac2a2c5fcbb82a865/
agarie has joined #ruby-lang
<mikecmpbll> BFlorin: well, the error message "undefined method `+' for nil:NilClass (NoMethodError)" is literally telling you that you're trying to call `+' on nil
<mikecmpbll> you're using + twice on that line: dosarsedintasolutiesumar += sedinta[:solutie_sumar] + "#"
<mikecmpbll> on dosarsedintasolutiesumar, and on sedinta[:solutie_sumar]. you're defining dosarsedintasolutiesumar as "" on line 70 so that's definitely not nil, so it must be sedinta[:solutie_sumar] that is nil.
<BFlorin> mikecmpbll: but this is the same as in like 50, 57 and 65
<BFlorin> :)
<mikecmpbll> yep, but in the data sedinta[:solutie_sumar] is nil
<mikecmpbll> the others are not :)
iamninja_ has joined #ruby-lang
iamninja has quit [Ping timeout: 255 seconds]
<BFlorin> mikecmpbll: plot twist :))
|jemc| has joined #ruby-lang
bantic has joined #ruby-lang
MagicHat has joined #ruby-lang
<mikecmpbll> BFlorin: you can also tidy the code up a bit like so: https://gist.github.com/mikecmpbll/f161afeef46df7f9e6c5
agarie has quit [Remote host closed the connection]
<mikecmpbll> can probably do more tidying too but i didn't wanna change it unrecognisably :]
chinmay_dd has quit [Ping timeout: 240 seconds]
hinbody has quit [Ping timeout: 252 seconds]
<BFlorin> i tried commenting and to see if it will work without the last dosarsedintasolutiesumar
<BFlorin> mikecmpbll: it looks much better, and i think i still understand everything that is there
<mikecmpbll> good :)
tkuchiki has quit [Remote host closed the connection]
joaomdmo_ has joined #ruby-lang
tkuchiki has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmo_ has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
joaomdmoura has joined #ruby-lang
centrx has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
pullphinger has joined #ruby-lang
<BFlorin> mikecmpbll: the others are also sometimes nil
<BFlorin> mikecmpbll: trying now to add the check to the better code that you have writen
shinnya has joined #ruby-lang
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
jas02_ has joined #ruby-lang
sarkyniin has quit [Read error: No route to host]
ascarter has joined #ruby-lang
hotpancakes has joined #ruby-lang
sarkyniin has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 256 seconds]
jas02 has quit [Ping timeout: 276 seconds]
jas02_ is now known as jas02
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby-lang
sp33k3rph433k has joined #ruby-lang
rcvalle has joined #ruby-lang
|jemc| has quit [Ping timeout: 264 seconds]
Torrieri has quit [Ping timeout: 252 seconds]
<BFlorin> mikecmpbll: 111/44/2004 F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:61:in `block (4 levels) in <main>': undefined method `+' for nil:NilClass (NoMethodError)
quintinadam has joined #ruby-lang
<BFlorin> mikecmpbll: if dosar[:sedinte] && dosar[:sedinte][:dosar_sedinta] != nil
<mikecmpbll> you don't need the != nil bit
<mikecmpbll> also see my gist again, i updated it just after i posted the link here. https://gist.github.com/mikecmpbll/f161afeef46df7f9e6c5#file-1_better-rb-L14
<mikecmpbll> notice the if sedinta[:solutie]
timanema has quit [Quit: leaving]
jas02 has quit [Ping timeout: 245 seconds]
sp33k3rph433k has quit [Ping timeout: 256 seconds]
ruby-lang has joined #ruby-lang
[H]unt3r has joined #ruby-lang
sp33k3rph433k has joined #ruby-lang
chinmay_dd has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
malconis has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 240 seconds]
lapide_viridi has joined #ruby-lang
|jemc| has joined #ruby-lang
hahuang65 has joined #ruby-lang
skade has joined #ruby-lang
yfeldblum has joined #ruby-lang
<BFlorin> mikecmpbll: Now it works perfect :)
malconis has joined #ruby-lang
<mikecmpbll> BFlorin: joy!
hahuang65 has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
hotpancakes has quit []
skade has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby-lang
tosbourn has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
RobertBirnie has joined #ruby-lang
RobertBirnie has quit [Max SendQ exceeded]
riotjones has quit [Ping timeout: 264 seconds]
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
RobertBirnie has joined #ruby-lang
agarie has joined #ruby-lang
RobertBirnie has quit [Max SendQ exceeded]
dm78 has quit []
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Torrieri has quit [Read error: Connection reset by peer]
tohsig has joined #ruby-lang
Respek has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
MagicHat has quit [Remote host closed the connection]
ruby-lang126 has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
lytol has joined #ruby-lang
momomomomo has joined #ruby-lang
<ruby-lang126> Hey all. Say I have an ActiveRecord Relation object, which contains a list of 10 Users. I want to do a .map{|e| [e.id, e.phone]}
<ruby-lang126> that works, and returns an array. containing everyones id and phone
RobertBirnie has joined #ruby-lang
lytol has quit [Ping timeout: 256 seconds]
<ruby-lang126> my question is, can that this be done: by giving it an object instead of [e.id, e.phone]?
<ruby-lang126> example: filter = [:id, :phone]
<ruby-lang126> .map{|e| filter }
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<canton7> filter = proc{ |e| [e.id, e.phone] } stuff.map(&filter)
davispuh has quit [Ping timeout: 250 seconds]
havenwood has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
aeze has joined #ruby-lang
MXfive has joined #ruby-lang
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> ruby-lang126: if that's your real usecase, please use pluck
duderonomy has joined #ruby-lang
duderonomy has quit [Client Quit]
mikecmpbll has quit [Ping timeout: 245 seconds]
stan has quit [Ping timeout: 265 seconds]
joaomdmoura has joined #ruby-lang
lytol has joined #ruby-lang
[H]unt3r has quit []
lytol has quit [Ping timeout: 250 seconds]
joaomdmoura has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
davispuh has joined #ruby-lang
lytol has joined #ruby-lang
djbkd has joined #ruby-lang
ldnunes has joined #ruby-lang
apt-get_ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
davispuh has quit [Read error: Connection reset by peer]
cytoskeletor has joined #ruby-lang
davispuh has joined #ruby-lang
sarkyniin has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
b_hoffman has joined #ruby-lang
caseydriscoll has quit [Quit: Leaving...]
yfeldblum has quit [Remote host closed the connection]
ruby-lang126 has quit [Ping timeout: 246 seconds]
jwaldrip has quit [Quit: Lingo: www.lingoirc.com]
c0m0 has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby-lang
redata425 has joined #ruby-lang
yxhuvvd has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
b_hoffman has quit [Quit: b_hoffman]
yxhuvud has joined #ruby-lang
wallerdev has joined #ruby-lang
agarie has quit []
yfeldblum has quit [Remote host closed the connection]
aeze has quit [Quit: aeze]
jefus_ is now known as jefus
jwaldrip has joined #ruby-lang
hahuang65 has joined #ruby-lang
MagicHat has joined #ruby-lang
Mark-6ma has joined #ruby-lang
mikecmpbll has joined #ruby-lang
MagicHat has quit [Ping timeout: 276 seconds]
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
cartothemax has quit [Remote host closed the connection]
cartothemax has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
tosbourn has quit [Remote host closed the connection]
shazaum has joined #ruby-lang
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MXfive has joined #ruby-lang
lektrik has joined #ruby-lang
cartothemax has quit [Remote host closed the connection]
cartothemax has joined #ruby-lang
symm- has joined #ruby-lang
BFlorin has quit [Ping timeout: 246 seconds]
nertzy3 has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
seank_ has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 248 seconds]
seank_ has joined #ruby-lang
baweaver has joined #ruby-lang
workmad3 has joined #ruby-lang
nertzy has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
Squarepy has joined #ruby-lang
iamninja_ has quit [Read error: Connection reset by peer]
adude has joined #ruby-lang
iamninja_ has joined #ruby-lang
jwaldrip has quit [Quit: Be back later ...]
jwaldrip has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
joaomdmoura has joined #ruby-lang
redata425 has quit [Quit: Lingo: www.lingoirc.com]
bantic has quit [Quit: bantic]
MagicHat has joined #ruby-lang
jwaldrip has quit [Quit: Be back later ...]
Boondox has joined #ruby-lang
momomomomo has joined #ruby-lang
arBmind has left #ruby-lang [#ruby-lang]
MagicHat has quit [Ping timeout: 245 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby-lang
sp33k3rph433k has quit [Quit: sp33k3rph433k]
pullphinger has quit []
nertzy has joined #ruby-lang
ruby-lang340 has joined #ruby-lang
toertore has quit [Ping timeout: 265 seconds]
tosbourn has joined #ruby-lang
b_hoffman has joined #ruby-lang
toretore has joined #ruby-lang
tosbourn has quit [Ping timeout: 250 seconds]
djellemah has quit [Quit: Leaving]
djellemah has joined #ruby-lang
[H]unt3r has joined #ruby-lang
[H]unt3r has quit [Client Quit]
djellemah has quit [Max SendQ exceeded]
djellemah has joined #ruby-lang
BFlorin has joined #ruby-lang
djellemah_ has joined #ruby-lang
<BFlorin> mikecmpbll: sorry to disturb you again
djellemah__ has joined #ruby-lang
<BFlorin> mikecmpbll: after downloading around 10000 files, i got an error at this line
<BFlorin> if dosar[:parti] && dosar[:parti][:dosar_parte]
<BFlorin> mikecmpbll: F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:49:in `[]': no implicit co version of Symbol into Integer (TypeError)
hotpancakes has joined #ruby-lang
LMity has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djellemah has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby-lang
djellemah_ has quit [Ping timeout: 250 seconds]
<jhass> BFlorin: that means dosar is an array or dosar[:parti] returns an array
djellemah__ is now known as djellemah
tohsig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tohsig has joined #ruby-lang
<BFlorin> jhass: dosar[:parti] is an array
<jhass> what do you expect from accessing an array with a symbol?
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
<BFlorin> i downloaded 2 other courtroom files, and it worked good, and at this one, after 10034 files, probaby bacause it`s returning another type of data, is not worming
<BFlorin> working
solars has quit [Ping timeout: 272 seconds]
wallerdev has quit [Quit: wallerdev]
lytol has quit [Remote host closed the connection]
MagicHat has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
LMity has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby-lang
jwaldrip has joined #ruby-lang
cartothemax has quit [Remote host closed the connection]
cartothemax has joined #ruby-lang
malconis has quit [Ping timeout: 245 seconds]
ascarter has quit [Client Quit]
malconis has joined #ruby-lang
adude has quit [Ping timeout: 252 seconds]
b_hoffman has joined #ruby-lang
roamingdog has joined #ruby-lang
godzillaenlacasa has joined #ruby-lang
<godzillaenlacasa> is there a built in ruby module to grep in real time commands put in terminal window? I.e., I'm only wanting to know if the line XYZ shows up in my terminal window while running my ruby script?
arBmind has joined #ruby-lang
<godzillaenlacasa> ...and 'commands' is probably the wrong word... my script outputs results to the terminal window and I'd like to grep in real time the results... specifically looking for a match
<mikecmpbll> BFlorin: well ... it appears there are multiple dosar[:parti] in this file.
<mikecmpbll> BFlorin: you have to decide how you want to process multiple of these.
<jhass> godzillaenlacasa: if your script is outputting stuff, why don't you just do whatever you want to do in the same condition that triggers that output?
nertzy has quit [Quit: This computer has gone to sleep]
<jhass> that sounds like you have a design problem in your program tbh
<godzillaenlacasa> jhass yes, that makes sense...
<mikecmpbll> or just copypaste the output into an editor and search it ..
<BFlorin> mikecmpbll: the same as bifore, to be added in the same field , separated with '#'
cartothemax has quit [Remote host closed the connection]
<BFlorin> mikecmpbll: if is posible
cartothemax2 has joined #ruby-lang
<mikecmpbll> but dosar[:parti] is the parent node
yfeldblum has joined #ruby-lang
Iskarlar has joined #ruby-lang
cornerma1 has joined #ruby-lang
<godzillaenlacasa> on another note... my same script runs but requires user input in the terminal window "space_bar \r". Is there a way to mimic this in the script itself?
<jhass> you have a severe design issue here
<jhass> you want to run your script non-interactive but mixed the interactive code into the logic
<jhass> now you try to automate the interactive part
<jhass> that's doing it the wrong way around
baweaver has joined #ruby-lang
<jhass> write the logic in a way that requires no interaction, then write an interactive interface to that
roamingdog has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 264 seconds]
<BFlorin> mikecmpbll: then a new node when it will encounter strage anomalies like this
<BFlorin> a new row
cornerman has quit [Ping timeout: 248 seconds]
cornerma1 is now known as cornerman
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mikecmpbll> BFlorin: if you wanted you could do it like this i guess, breaking it down further https://gist.github.com/mikecmpbll/f161afeef46df7f9e6c5#file-1_better-rb-L1-L12
<mikecmpbll> starting to get a bit messy /shrugs
cytoskeletor has quit [Ping timeout: 248 seconds]
<mikecmpbll> as long as it works though ey, refactor after ;)
MagicHat has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
ruby-lang has quit [Ping timeout: 265 seconds]
MagicHat has joined #ruby-lang
cengizIO has joined #ruby-lang
roamingdog has joined #ruby-lang
michaeldeol has joined #ruby-lang
ta has quit [Quit: Leaving...]
<godzillaenlacasa> Anyone know where i can go to get the cipher algorithms supported for OpenSSL::Cipher ? , IE. AES-128-CBC, AES-256-CBC, EXP, DES,....?
riotjones has joined #ruby-lang
solars has joined #ruby-lang
<jhass> >> require "openssl"; OpenSSL::Cipher.ciphers
Squarepy has quit [Read error: Connection reset by peer]
<eval-in> jhass => ["AES-128-CBC", "AES-128-CFB", "AES-128-CFB1", "AES-128-CFB8", "AES-128-ECB", "AES-128-OFB", "AES-192-CBC", "AES-192-CFB", "AES-192-CFB1", "AES-192-CFB8", "AES-192-ECB", "AES-192-OFB", "AES-256-CBC", " ... (https://eval.in/310369)
ta has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
MagicHat has quit [Remote host closed the connection]
tohsig has quit [Ping timeout: 250 seconds]
<darix> if i recall correctly while all those are supported
<darix> not all of them are in the default cipher suite used by ruby openssl
b_hoffman has quit [Quit: b_hoffman]
momomomomo has joined #ruby-lang
b_hoffman has joined #ruby-lang
Bertg has joined #ruby-lang
Bertg has quit [Client Quit]
MagicHat has joined #ruby-lang
Bertg has joined #ruby-lang
Zen-Zen has quit []
cengizIO has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jefus has quit [Quit: Leaving]
jefus has joined #ruby-lang
jgpawletko has joined #ruby-lang
lytol has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
baweaver_ has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 256 seconds]
pico-pete has quit [Read error: Connection reset by peer]
LBo has quit [Ping timeout: 256 seconds]
quintinadam has quit [Ping timeout: 264 seconds]
pico-pete has joined #ruby-lang
LBo has joined #ruby-lang
Zen-Zen has joined #ruby-lang
<Zen-Zen> Not sure why I cannot access my instance method
baweaver_ has quit [Remote host closed the connection]
<jhass> what's the error?
ruby-lang has joined #ruby-lang
<Zen-Zen> undefined method from the area I labelled problem
<jhass> ah, I see
<jhass> you need to call instance methods on the object
<Zen-Zen> could you give me an example so I am clear...
<jhass> "foo".upcase # Here we call the instance method upcase of the String classs on the object "foo" (an instance of String)
<Zen-Zen> so the .instance method is no differnt than the class instance method.
joaomdmoura has joined #ruby-lang
<jhass> well, you call the class method on a different object than the instance method, but it's the same mechanism, yes
<Zen-Zen> beefTaco.servedItem ike this?
<jhass> what kind of object is beefTaco?
<Zen-Zen> It is from the MenuItem class same as the servedItem method.
<Zen-Zen> 3 arguments - type, choiceMeat, price
<jhass> well, I don't follow the second part, but yes, it's an instance of MenuItem
Boondox has quit []
<jhass> now where is servedItem defined?
<jhass> it's an instance method of which class?
<Zen-Zen> menuItem
<jhass> not according to your gist
<Zen-Zen> sry you are right... it is in the ChipoltleRestaurant class
<jhass> so, what variable contains an instance of that class?
<Zen-Zen> beefTaco.Menuitem.servedItem ??
<jhass> that's a chained method call on the beefTaco variable
<jhass> I asked what variable is an instance of ChipoltleRestaurant
<Zen-Zen> beefTaco.ChipotleRestaurant.servedItem is what I meant to type above.
<jhass> same answer
<Zen-Zen> cr
<jhass> right!
<Zen-Zen> cr is the variable of Chiotle Restaurant
<jhass> so, cr is an instance of CipotleRestaurant, ChipotleRestaurant has the instance method servedItem that you want to call
baweaver has joined #ruby-lang
<jhass> how would that call look like?
<Zen-Zen> beefTaco.cr.servedItem
<jhass> no
<jhass> do you even try to understand or are you just guessing?
<Zen-Zen> I am trying to follow along, I appreciate your trying to help.
joaomdmoura has quit [Remote host closed the connection]
AlexAltea has joined #ruby-lang
<Zen-Zen> Lemme see what I can come up with and I will check back. thx jhass!
djbkd has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
nertzy has joined #ruby-lang
hotpancakes has quit []
troyleak has joined #ruby-lang
SylarRuby has joined #ruby-lang
wallerdev has joined #ruby-lang
<godzillaenlacasa> is it possible to pass a command line argument into a system() call in an rb script?
<jhass> yes
<jhass> the docs for system have plenty of examples for all the invocations of it
b_hoffman has quit [Quit: b_hoffman]
<godzillaenlacasa> jhass are you refering to somewhere other than ruby-doc.org? They weren't very telling on there
<jhass> no, I'm referring on that
Mark-6ma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
EnduranceMan has quit []
<jhass> just checked again, they list the allowed forms just fine
b_hoffman has joined #ruby-lang
aeze has joined #ruby-lang
joaomdmoura has joined #ruby-lang
b_hoffman has quit [Client Quit]
b_hoffman has joined #ruby-lang
begal-sop__ has quit [Remote host closed the connection]
begal-sop has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
<Zen-Zen> jhass I just wanted to say thx for your patience... item1 = cr.servedItem(beefTaco) think I got it, still need to digest info a bit - but always appreciate the assist!
<jhass> looks good, yw
pragmatism has joined #ruby-lang
<BFlorin> mikecmpbll: sorry for the late reply, i was trying to figure out something with openrefine, i am testing now, thanks for all your help again
<mikecmpbll> BFlorin: np.
shazaum has quit [Quit: Leaving]
jgpawletko has quit [Quit: jgpawletko]
quintinadam has joined #ruby-lang
Bertg has quit [Quit: Textual IRC Client: www.textualapp.com]
<ruby-lang340> hey guys! i'm kind of a new dude to this irc, figured I'd say whatsup
<jhass> hi!
roamingdog has quit [Remote host closed the connection]
<jhass> you might want to /nick into something recognizable then ;)
<ruby-lang340> hi!
<godzillaenlacasa> jhass so, still hitting the wall with passing command line argument to script....
<ruby-lang340> Is this a fairly relaxed chat where people come and go with questions?
<jhass> godzillaenlacasa: what did you try so far?
<jhass> ruby-lang340: yup
<ruby-lang340> sorry sorry.. lemme try that
ruby-lang340 is now known as dudemanbro
<godzillaenlacasa> jhass test.rb www.google.com is my command line
momomomomo has quit [Ping timeout: 264 seconds]
<godzillaenlacasa> which should pass to my test.rb script and run: system "openssl s_client -connect", host
<godzillaenlacasa> with host being 'www.google.com'
<jhass> do you know how to, let's say print an argument passed to your script that way?
shadowvengence22 has joined #ruby-lang
<godzillaenlacasa> well, in this case, I'm trying it in irb
<jhass> that is, you managed to set host to "www.google.com" already?
<godzillaenlacasa> so: host = "www.google.com:443"
<jhass> so let's dissect the command you want to invoke: "openssl s_client -connect www.google.com"
<godzillaenlacasa> yup
<jhass> openssl is the program you invoke
<jhass> s_client is the first argument
<jhass> -connect is the second argument
<jhass> and www.google.com is the third argument
<godzillaenlacasa> correct
<jhass> now look at the docs for system again with that information
<jhass> which form could fit?
<godzillaenlacasa> s = system "openssl", "s_client", "-connect", hos
<jhass> looks good, what's the problem? (besides blocking endlessly because s_client reads from standard input)
<BFlorin> mikecmpbll: that is strange, at 49 , i get the same error
<BFlorin> mikecmpbll: if dosar[:parti]
<BFlorin> mikecmpbll: F:/Expert Forum/ruby client/ruby client/vivi_ruby.rb:49:in `[]': no implicit con version of Symbol into Integer (TypeError)
<mikecmpbll> BFlorin: er ...
<mikecmpbll> BFlorin: gist current code :)
dellavg_ has quit [Ping timeout: 264 seconds]
aeze has quit [Quit: aeze]
ruby-lang has left #ruby-lang [#ruby-lang]
joaomdmoura has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dudemanbro> I'm a bit new to this, but is there a way to turn off notificaionts for people entering/leaving? I'm trying to follow along with some of the discussion and well, maybe I'm just too OCD
joaomdmoura has joined #ruby-lang
<mikecmpbll> dudemanbro: what client do you use?
<dudemanbro> good old google chrome at this point
baweaver has quit [Remote host closed the connection]
hollywoodthrill has joined #ruby-lang
momomomomo has joined #ruby-lang
Bertg has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guillaume-rb has quit [Quit: guillaume-rb]
ascarter has joined #ruby-lang
dudemanbro has quit [Quit: Page closed]
ruby-lang491 has joined #ruby-lang
ruby-lang491 is now known as dudemanbro
aeze has joined #ruby-lang
Iskarlar has joined #ruby-lang
sgambino has quit [Remote host closed the connection]
<mikecmpbll> BFlorin: oh awesome, now dosar is an array too
yfeldblum has quit [Remote host closed the connection]
melter has quit [Quit: Client exiting]
roamingdog has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ldnunes has quit [Quit: Leaving]
godzillaenlacasa has quit [Quit: ZZZZZ....]
Missphoenix has joined #ruby-lang
cartothemax2 has quit [Remote host closed the connection]
Miphix has quit [Ping timeout: 252 seconds]
godzillaenlacasa has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lektrik has quit [Ping timeout: 255 seconds]
momomomomo has quit [Ping timeout: 272 seconds]
jgpawletko has joined #ruby-lang
benanne has joined #ruby-lang
shadowvengence22 has quit [Quit: Leaving]
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
lytol has quit []
lytol has joined #ruby-lang
momomomomo has joined #ruby-lang
baweaver has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
b_hoffman has joined #ruby-lang
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
riotjones has quit [Ping timeout: 265 seconds]
apt-get_ has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 264 seconds]
davispuh has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kadoppe has joined #ruby-lang
roamingdog has joined #ruby-lang
ur5us has joined #ruby-lang
godzillaenlacasa has quit [Quit: ZZZZZ....]
yfeldblum has joined #ruby-lang
nertzy has joined #ruby-lang
momomomomo has quit [Ping timeout: 256 seconds]
lytol_ has joined #ruby-lang
MagicHat has quit [Remote host closed the connection]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
lytol has quit [Ping timeout: 264 seconds]
MagicHat has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Quit: ciao.]
whippythellama has quit [Quit: whippythellama]
momomomomo has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
hollywoodthrill has quit [Quit: Leaving.]
tosbourn has joined #ruby-lang
BFlorin has quit [Quit: Page closed]
benanne has quit [Quit: kbai]
tosbourn has quit [Ping timeout: 244 seconds]
hollywoodthrill has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
enebo has quit [Quit: enebo]
nertzy has quit [Quit: This computer has gone to sleep]
joaomdmoura has quit [Remote host closed the connection]
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
marr has quit [Ping timeout: 248 seconds]
Respek has quit [Quit: gone to sleep. ZZZzzz…]
marr has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
troyleak has quit [Quit: troyleak]
quintinadam has quit []
baweaver has joined #ruby-lang
victortyau has joined #ruby-lang
hollywoodthrill has quit [Quit: Leaving.]
b_hoffman has quit [Quit: b_hoffman]
b_hoffman has joined #ruby-lang
<Zen-Zen> Do I need a global variable to access a method and pass a parameter from one class to a different class?
victortyau has quit [Quit: Leaving]
<jhass> no
banister has joined #ruby-lang
Respek has joined #ruby-lang
symm- has quit [Ping timeout: 255 seconds]
quintinadam has joined #ruby-lang
fujimura has joined #ruby-lang
jefus_ has joined #ruby-lang
<darix> Zen-Zen: just pass it as an argument
M4RT1NPRG has joined #ruby-lang
jefus has quit [Ping timeout: 272 seconds]
M4RT1NPRG has quit [Client Quit]
M4RT1NPRG has joined #ruby-lang
M4RT1NPRG has quit [Client Quit]
MagicHat has quit [Remote host closed the connection]
duderonomy has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SylarRuby has quit [Remote host closed the connection]
banister has joined #ruby-lang
centrx has quit [Quit: Shutting down, Please wait...]
momomomomo has quit [Quit: momomomomo]
brushbox has joined #ruby-lang
cpt_yossarian has quit [Quit: And then he took off.]
lytol_ has quit [Remote host closed the connection]
aeze has quit [Quit: aeze]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby-lang
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arBmind has quit [Ping timeout: 264 seconds]
nertzy has joined #ruby-lang
bougyman has quit [Ping timeout: 250 seconds]
symm- has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
bougyman has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
fujimura_ has joined #ruby-lang
fujimura_ has quit [Ping timeout: 252 seconds]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby-lang
duderonomy has joined #ruby-lang
pragmatism has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
pragmatism has quit [Client Quit]
roamingdog has quit [Ping timeout: 264 seconds]