apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
<zendeavor> right, well, the string isn't reversed for you, it's just searched backwards
mikepack_ has joined #ruby
wmoxam has joined #ruby
* Nilium pokes zachrab with a stick
sdegutis has joined #ruby
sailias has joined #ruby
smathieu_ has joined #ruby
<aces1up> Nilium any ideas on that?
<Nilium> Type faster or you'll never make it onto the cheerleading team.
<Nilium> aces1up: Was I talking to you?
<sdegutis> xybre, et al: this is all i really wanted https://gist.github.com/sdegutis/6127357
<aces1up> i thought so lol
<sdegutis> thanks for all your help everyone
<Nilium> Are you zachrab?
<zendeavor> tjbiddle: i fail to see your point, really. the index of the character shouldn't change, and reversing the string necessarily has the side effect of flipping your indices
mikepack has quit [Read error: Connection reset by peer]
<Nilium> This cat is just stretching herself all over my desk.
razi has quit [Ping timeout: 245 seconds]
<zendeavor> tjbiddle: so, it's harder to reason about your code if the string in question is sufficiently long enough
sdegutis has quit [Remote host closed the connection]
<Nilium> And another desk.
<tjbiddle> zendeavor: I'm sorry - Not thinking today apparently. Thanks!
randomautomator has quit [Ping timeout: 245 seconds]
chord2 has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
Dysruption has quit [Quit: Dysruption]
randomau_ has quit [Ping timeout: 248 seconds]
smathieu has quit [Ping timeout: 240 seconds]
ssvo_ has quit [Ping timeout: 240 seconds]
<zendeavor> wait, you apologized?
rodacato has quit [Remote host closed the connection]
<zendeavor> wot in da hel.
x1337807x has joined #ruby
includex has quit [Quit: Leaving...]
<Nilium> It's almost like tjbiddle isn't corrupted.
asterite has joined #ruby
<tjbiddle> I'm sorry - I don't know what's wrong with me!
<zendeavor> he did it again!
<tjbiddle> *Damnit*! I did it again!
* zendeavor grabs pitchfork
<Nilium> I know how to fix this
* zendeavor expects cattens
<Nilium> Just libel the hell out of zendeavor
<Nilium> And then post parrot pictures.
<zendeavor> that's fair.
* tjbiddle rallies the mob
<zendeavor> in all honety, i pulled that answer out of my ass for tjbiddle
jorge_ has quit [Remote host closed the connection]
jorge_ has joined #ruby
<Nilium> http://i.imgur.com/yyhd1CD.jpg Treecan says zendeavor's mom is fat (though treecan is not a parrot).
rsahae has joined #ruby
i_s has quit [Remote host closed the connection]
<zendeavor> moar liek threecan.
bradsmith has quit [Remote host closed the connection]
Synthead has joined #ruby
PhatBaja has joined #ruby
jorge_ has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
PhatBaja has quit [Client Quit]
mrsolo has quit [Quit: Leaving]
i_s_ has joined #ruby
tabolario has joined #ruby
arya_ has joined #ruby
marr has quit [Ping timeout: 268 seconds]
mikepack_ has quit [Remote host closed the connection]
nezumi has joined #ruby
mikepack has joined #ruby
mansi has joined #ruby
becky_ has joined #ruby
ckrailo_ has joined #ruby
vikhyat has joined #ruby
fantazo has quit [Remote host closed the connection]
sambao21 has joined #ruby
vikhyat_ has quit [Ping timeout: 245 seconds]
DanKnox is now known as DanKnox_away
nari has quit [Ping timeout: 246 seconds]
nathancahill has joined #ruby
Kricir has joined #ruby
huoxito has quit [Ping timeout: 268 seconds]
mansi has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanM_ has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 246 seconds]
machuga|away is now known as machuga
x1337807x has joined #ruby
marcdel has joined #ruby
alexim has quit [Quit: bye]
tjbiddle has quit [Quit: tjbiddle]
aces1up has quit []
BRMatt has quit [Ping timeout: 268 seconds]
kayloos has quit [Remote host closed the connection]
zendeavor is now known as terminalfred
mikepack has quit [Remote host closed the connection]
terminalfred is now known as zendeavor
sdegutis has joined #ruby
smathieu_ has quit [Remote host closed the connection]
smathieu has joined #ruby
guiocava_ has quit [Remote host closed the connection]
popl has joined #ruby
osvico has quit [Read error: Connection reset by peer]
Deele has quit [Ping timeout: 240 seconds]
jimkeller has joined #ruby
Synthead has quit [Ping timeout: 245 seconds]
superscott[8] has quit [Quit: superscott[8]]
yshh has quit [Remote host closed the connection]
tobyo has joined #ruby
hogeo has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 241 seconds]
jb41 has quit [Ping timeout: 264 seconds]
nbouscal has joined #ruby
i_s_ has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zastern has quit [Remote host closed the connection]
jeekl has quit [Ping timeout: 245 seconds]
vadelius has quit [Ping timeout: 245 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
dankest has quit [Quit: dankest]
osvico has joined #ruby
vadelius has joined #ruby
bradhe has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
bradhe has joined #ruby
jeekl has joined #ruby
Kricir has quit [Remote host closed the connection]
davehimself has joined #ruby
maniacal has quit [Remote host closed the connection]
mneorr has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 264 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilverKey has joined #ruby
waj has joined #ruby
zeusmns has joined #ruby
cj3kim has quit [Remote host closed the connection]
noyb has joined #ruby
Dysruption has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
DonRichie has quit [Ping timeout: 256 seconds]
DonRichie has joined #ruby
jonathanwallace has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
bradhe has joined #ruby
ehc has quit [Quit: ehc]
i_s has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
c0rn has joined #ruby
guiocavalcanti has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
muslimasry has joined #ruby
muslimasry has quit [Killed (idoru (Spam is off topic on freenode.))]
mansi has joined #ruby
<chord2> channel dead
axsuul has joined #ruby
Olipro has joined #ruby
pen has quit [Remote host closed the connection]
Tricon has joined #ruby
zeusmns has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
Dysruption is now known as dysruption
dysruption is now known as Dysruption
smathieu has quit [Ping timeout: 276 seconds]
Nom- has quit [Ping timeout: 256 seconds]
i_s has quit [Remote host closed the connection]
tkuchiki has joined #ruby
1JTAAIPGD has joined #ruby
marcdel has joined #ruby
zeusmns has joined #ruby
jalcine has joined #ruby
zeusmns has quit [Remote host closed the connection]
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
BSaboia has joined #ruby
jorge has joined #ruby
ericmathison has quit [Quit: leaving]
BSaboia has quit [Remote host closed the connection]
scarolan has joined #ruby
bsaboia_ has joined #ruby
zeusmns has joined #ruby
ntus1017 has quit [Remote host closed the connection]
ssvo has joined #ruby
vikhyat has quit [Remote host closed the connection]
thomasle_ has quit [Remote host closed the connection]
senayar has joined #ruby
wmoxam has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
Nom- has joined #ruby
i_s has joined #ruby
yshh has joined #ruby
zeusmns has quit [Remote host closed the connection]
bzitzow has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
asterite has quit [Quit: Leaving.]
nari has joined #ruby
ayonix has quit [Read error: Connection reset by peer]
ayonix_ has joined #ruby
vikhyat_ has joined #ruby
vikhyat_ has quit [Remote host closed the connection]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
vikhyat_ has joined #ruby
<bnagy> damn, that guy from yesterday with the linear regression has gone :(
scarolan has quit [Ping timeout: 240 seconds]
<bnagy> I spent yesterday relearning basic calculus and then writing a self tuning linear regression modeller :(
<bnagy> ADHD ftw!
jorge has quit [Remote host closed the connection]
<bnagy> ( I don't have ADHD )
Megtastique has joined #ruby
havenwood has joined #ruby
jorge has joined #ruby
cj3kim has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
vikhyat has quit [Ping timeout: 276 seconds]
scarolan has joined #ruby
zeusmns has joined #ruby
kung has quit [Ping timeout: 264 seconds]
zeusmns has quit [Remote host closed the connection]
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
jarray52 has joined #ruby
sevenseacat has joined #ruby
jorge has quit [Ping timeout: 276 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zeusmns has joined #ruby
zeusmns has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
cj3kim has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
babykosh has joined #ruby
<zendeavor> you can still show it off just for giggles
jonathanwallace has quit [Ping timeout: 264 seconds]
pipework has joined #ruby
jesther has joined #ruby
ntus1017 has joined #ruby
<zendeavor> also so i can steal it, also for giggles
<zendeavor> ^_^
bklane has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
babykosh has quit [Client Quit]
sdegutis has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
<bnagy> tbh I didn't actually write the alpha tuner yet, but I know how to do it, and it's easy
<bnagy> the hard bit was working out what everything did and why
pitzips has quit [Ping timeout: 264 seconds]
<bnagy> I am also going to port it to Matrix and Vector classes
<bnagy> cause I don't know how to do that and it will be good for me
Megtastique has quit [Quit: Megtastique]
Spooner has quit [Remote host closed the connection]
<zendeavor> sounds like fun
dhruvasagar has quit [Ping timeout: 248 seconds]
huoxito has joined #ruby
<bnagy> that's the kind of simplified version from where I actually 'got it' last night, but the code is still a bit shitty
jorge has joined #ruby
hellome has joined #ruby
nfk has quit [Quit: yawn]
tatsuya_o has quit [Ping timeout: 264 seconds]
<zendeavor> that's fine, premature optimization and all
<bnagy> ah I just meant unclear
scarolan has quit [Ping timeout: 264 seconds]
<zendeavor> same thing.
c0rn has quit [Quit: Computer has gone to sleep.]
zeusmns has joined #ruby
hamakn has joined #ruby
jonathanwallace has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<Boohbah> bnagy: it's okay if the guy left, you learned something
hamakn has joined #ruby
<bnagy> I did
twoism has quit [Remote host closed the connection]
<bnagy> but now I have to write more font fuzzers :/
sailias has joined #ruby
DanKnox_away is now known as DanKnox
brianpWins has joined #ruby
lnormous has quit [Ping timeout: 248 seconds]
zeusmns has quit [Remote host closed the connection]
Yakko has quit [Quit: No Ping reply in 180 seconds.]
twoism has joined #ruby
zeusmns has joined #ruby
Yakko has joined #ruby
Megtastique has joined #ruby
saarinen has quit [Quit: saarinen]
whowantstolivefo has quit [Read error: Connection reset by peer]
whowantstolivefo has joined #ruby
saintcajetan has joined #ruby
Domon has joined #ruby
iliketurtles has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
[narcan] has joined #ruby
1JTAAIPGD has quit [Quit: This computer has gone to sleep]
<bnagy> woohoo looks like the rails bug just got a pwnie
Kricir has joined #ruby
<r0bglees0n> which rails bug?
<bnagy> rails wins at sucking! \o/
<r0bglees0n> is it new?
Vivekananda has quit [Remote host closed the connection]
<bnagy> no, it's 'that' bug
iliketurtles has quit [Client Quit]
guiocavalcanti has quit [Remote host closed the connection]
Voodoofish430 has quit [Quit: Leaving.]
x1337807x has quit [Ping timeout: 246 seconds]
guiocavalcanti has joined #ruby
bradsmith has joined #ruby
<Wasp> hi, how do i can compare to instances for equalness?
zeusmns has quit [Remote host closed the connection]
<bnagy> eq eql == or some other way
<Wasp> so (mean as): a <same_instance> a => true
limon7 has joined #ruby
<bnagy> depending on what you mean
<bnagy> you want to know if it's actually the _same_ instance?
cj3kim has joined #ruby
<Wasp> nope: a=1; b=1; a.eql?(b) => true
<Wasp> yes of cause
optimusprimem has quit [Ping timeout: 245 seconds]
zeusmns has joined #ruby
<Wasp> exampel above should return false
<bnagy> ok well using 1 is a bad example because it's an immediate
<Wasp> ah okay, but tried with array too
<bnagy> there's only one 1
<havenwood> neo
<bnagy> try looking at the id
<r0bglees0n> the weird thing for me is that when they released a bunch of security patches it supposedly impacted performance in a few places, but there was never another patch release
<Wasp> tried a.__id__ but method doesnt exist
bigmac has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
<bnagy> #object_id
<havenwood> Wasp: object_id
<Wasp> => #<NoMethodError: undefined method `object_id' for......
<sevenseacat> for rails? 3.2.13 was the performance regression, then 3.2.14 came out later
rsahae has quit [Quit: rsahae]
<havenwood> oh, yeah __id__ should work as well
<havenwood> but isn't common
<r0bglees0n> sevenseacat: ahhh
<sevenseacat> tbh i dont know if it fixed the regressions, but there was another patch :p
<r0bglees0n> sevenseacat: it took a while though :[
<sevenseacat> it did
<havenwood> Wasp: what follows the `for.......`?
rickmasta has joined #ruby
<Wasp> => #<NoMethodError: undefined method `object_id' for [1]:Array>
arya_ has quit [Read error: Connection reset by peer]
Dysruption has quit [Quit: Dysruption]
axl_ has quit [Quit: axl_]
<bnagy> o_0
whowantstolivefo has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
<Wasp> testing with: a = [1] ; b = [1]
<bnagy> >> [1].object_id
<eval-in> bnagy => 540731730 (https://eval.in/40052)
<bnagy> 18>> [1].object_id
<eval-in> bnagy => 537980260 (https://eval.in/40053)
whowantstolivefo has joined #ruby
<bnagy> *shrug*
<r0bglees0n> thats weird
<Wasp> >> a=[1] ; a.__id__
<eval-in> Wasp => 542001440 (https://eval.in/40054)
<Wasp> hmm
<r0bglees0n> are you undefining a binch of methods
<r0bglees0n> bunch*
chord2 has quit [Ping timeout: 250 seconds]
cj3kim has quit [Ping timeout: 264 seconds]
xibalba has joined #ruby
adeponte has quit [Remote host closed the connection]
<xibalba> are there any solutions to convert java XSD files to straight XML files?
<Wasp> r0bglees0n: i already forgot my intention after scrolling the two complete docs of ruby (doc pages)
rickruby has joined #ruby
<havenwood> >> Object.undef_method(:object_id); [1].object_id
<eval-in> havenwood => private method `undef_method' called for Object:Class (NoMethodError) ... (https://eval.in/40055)
hakunin has quit [Remote host closed the connection]
Vivekananda has joined #ruby
<havenwood> oops
<r0bglees0n> xibalba: could be.
<r0bglees0n> on jruby
<Wasp> i was going to delete object from array by index
Dysruption has joined #ruby
`Chris` has quit [Ping timeout: 240 seconds]
<r0bglees0n> can you gist the exact code you have
scarolan has joined #ruby
hellome has quit [Read error: Connection reset by peer]
eka has quit [Quit: Computer has gone to sleep.]
<Radar> omg people
<Wasp> ah my mein problem is, that i need the index of the current item inside delete_if block (that was my start)
<Radar> everywhere
<Radar> not showing code
<Wasp> (and problem) ... damn i realy forgot it, should go to bed -.-
tkuchiki has quit [Remote host closed the connection]
* Radar goes and freask out somewhere else
<Wasp> meant to be(!): ken.delete_if {|x| x.index < ken.index(:m) and x.index > ken.index(:m) - MAX_LOOK }
huoxito has quit [Ping timeout: 246 seconds]
lethjakman has joined #ruby
<r0bglees0n> what is x.index suppose to do?
<lethjakman> hey, anyone know where rvm usually installs to?
<Wasp> having the index of x
<lethjakman> I thought it was into my home but it's not there
<havenwood> lethjakman: .rvm
<havenwood> lethjakman: .rvm
<lethjakman> ~/.rvm right?
<havenwood> lethjakman: ~/.rvm
<r0bglees0n> it wont
<havenwood> lethjakman: yeah, sry
<Wasp> so i kndow the index of x inside "ken"
<lethjakman> havenwood: weird. it's not there.
<r0bglees0n> ken.with_index.delete_if { |x, index| .. }
<Nilium> Nobody else wants to say .rvm?
<havenwood> lethjakman: did you do a system-wide install?
itcharlie has left #ruby [#ruby]
<lethjakman> havenwood: perhaps, I did it as root
sailias has quit [Ping timeout: 248 seconds]
<Nilium> If so, you are evil
<havenwood> Nilium: I accidentally hit key twice and spammed. I just said it over and over. Blah blah blah!
<lethjakman> where would it go if it's a system wide install?
ffranz has quit [Quit: Leaving]
asteve has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Nilium> havenwood: I was hoping it might have a snowball effect
<havenwood> hehe
hellome has joined #ruby
<Wasp> >> a = [4, 5, 6] ; a.with_index.delete_if { |x, i| puts x " : " x.i }
<eval-in> Wasp => /tmp/execpad-5f4b264e4143/source-5f4b264e4143:2: syntax error, unexpected tIDENTIFIER, expecting '}' ... (https://eval.in/40057)
<r0bglees0n> Wasp: sorry
jonathanwallace has quit [Ping timeout: 246 seconds]
<r0bglees0n> >> a = [1,2,3]; a.delete_if.with_index { |e,i| p(i); e == 1 }
<eval-in> r0bglees0n => 0 ... (https://eval.in/40058)
iliketurtles has joined #ruby
<havenwood> lethjakman: Try: rvm info
<lethjakman> ahh /usr/local/rvm
<Wasp> r0bglees0n: result is somehow wrong,, isnt it?
<r0bglees0n> not sure why is it wrong
<Wasp> index 1 of [ 1 2 3 ] should be 2 ; so => [1 3]
smathieu has joined #ruby
<Wasp> aaah sry
<r0bglees0n> i compare the element
<r0bglees0n> i dont compare the index
<r0bglees0n> the index is printed
<Wasp> missinterpreted code, you are comparing elemtns not index :)
BillCriswell has quit [Remote host closed the connection]
<Wasp> okoay thx
<Wasp> okay better go to bet now :)
<Wasp> g.n8
<r0bglees0n> later
rupee has quit [Quit: Leaving]
tkuchiki has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
brennanMKE has joined #ruby
saintcajetan has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
huoxito has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
mneorr has joined #ruby
saintcajetan has joined #ruby
scarolan has joined #ruby
bradsmith has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 240 seconds]
reset has quit [Quit: Leaving...]
sailias has joined #ruby
jesther has left #ruby ["Leaving"]
zeade has quit [Quit: Leaving.]
mneorr has quit [Ping timeout: 240 seconds]
gautam has joined #ruby
<gautam> join #java
robustus has quit [Ping timeout: 245 seconds]
<xibalba> can someone convert all my java XSD files to XML ?
<xibalba> yea, yea?>
<xibalba> sweet
gautam has left #ruby [#ruby]
<Nilium> Uh, convert an XSD to XML?
<Nilium> What?
<r0bglees0n> what is XSD?
<Nilium> An XML schema.
mansi has quit [Remote host closed the connection]
<r0bglees0n> ah
mansi has joined #ruby
<Nilium> Unless the Java thing is somehow fundamentally different
robustus has joined #ruby
Dysruption has quit [Quit: Dysruption]
iliketurtles has quit [Quit: zzzzz…..]
bklane_ has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
<xibalba> there are 190 XSD files we need in XML format
tkuchiki has quit [Remote host closed the connection]
ckrailo_ has quit [Quit: Computer has gone to sleep.]
mansi has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
bklane has quit [Ping timeout: 264 seconds]
<pontiki> um... an XSD file is in XML...
cj3kim has quit [Ping timeout: 240 seconds]
<r0bglees0n> it sounds like it is already XML xibalba
<Nilium> xibalba: You're going to have to explain the logic behind what you just said.
<xibalba> i get that…my buddy is saying we can't directly work with the XSD files from the vmware SDK directly and that they need to be converted
<r0bglees0n> so the schema needs to change
<Nilium> Tell your buddy he's a moron.
<xibalba> Nilium, not really constructive buddy :)
<Nilium> Trust me, it is.
<havenwood> XSD bing XML Schema Definition.
<havenwood> being*
<r0bglees0n> im guessing youre trying to change the schema of the document so that whatever youre giving it to can understand it?
<xibalba> perhaps i dont fully understand the issue at hand then
<xibalba> r0bglees0n, i believe thats the case
<Nilium> Most likely not.
<pontiki> enlightenment has occured
<Nilium> Now go call your buddy a moron for being a moron.
brennanMKE has joined #ruby
ewnd9 has joined #ruby
<Nilium> And tell him what you know.
<xibalba> Nilium, you're childish :)
brianpWins has quit [Quit: brianpWins]
<r0bglees0n> cant really help you xibalba , it doesnt sound like you know what the schema should change to
<xibalba> i agree, let me push him to join this channel and ask
rambler has joined #ruby
<sevenseacat> what does it have to do with ruby anyway?
xibalba has left #ruby ["Textual IRC Client: www.textualapp.com"]
<Nilium> I think joining this channel won't help him any. If you don't understand the problem, we can't either, really.
<Nilium> Well, we can't understand it second-hand, anyway.
i_s has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Vivekananda has quit [Ping timeout: 264 seconds]
<Nilium> And from the sound of it, neither of you knows what you're trying to do yet, so you'll likely want to spend more time researching the problem.
mansi has joined #ruby
brisbin has quit [Read error: Connection reset by peer]
bean has joined #ruby
twoism has quit [Remote host closed the connection]
<havenwood> Good question for #RubyOnRails, since XML is right up the "Enterprise Rails" alley: https://github.com/tenderlove/enterprise#readme
<havenwood> "Wish you could write your Ruby in XML? Has the fact that Ruby is not “enterprise” got you down?"
<havenwood> oh noes, I nested quotes in mah quotes
<Nilium> O_o
<pontiki> <3 tenderlove
Gooder`` has joined #ruby
<r0bglees0n> hahahahaha
<r0bglees0n> thats hilarious
<Nilium> I hope nobody actually uses that..
<havenwood> :O
<r0bglees0n> look at the example :D
<r0bglees0n> its like 70 lines of XML for 5 lines of ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
<r0bglees0n> Nilium: nah, i doubt it very much
julian-delphiki has quit [Ping timeout: 256 seconds]
<Nilium> That's my assumption, but there are some amazingly stupid people out there.
<Nilium> I'm one of them, though thankfully not when it comes to that particular thing
Gooder` has quit [Ping timeout: 256 seconds]
enhance has quit [Remote host closed the connection]
hellome has quit [Remote host closed the connection]
JZTech101 has quit [Quit: Bye]
scarolan has quit [Ping timeout: 264 seconds]
hellome has joined #ruby
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
<r0bglees0n> Nilium: i think a lot of ruby libraries out there that might be good sit unknown or unused
<r0bglees0n> its hard to get users
<havenwood> it really is, unless you're 'internet famous'!
<Nilium> I just try not to care about whether people use my gems because the whole ego thing can drive me insane.
<havenwood> Nilium: Ego aside, Issue tickets and Pull Requests come with users! :)
<r0bglees0n> yeah
<r0bglees0n> feedback of any kind is great
hellome has quit [Read error: Connection reset by peer]
<Nilium> I probably won't be getting much of that
i_s has joined #ruby
<Nilium> Except "why u no use ruby-ffi" from bnagy
<bnagy> we discussed that
<Nilium> Indeed.
<bnagy> you said 'bizarre NIH lol I don't even know' and I accepted it and moved on
<bnagy> ;)
<r0bglees0n> instead of C?
<Nilium> You ignored the part about ruby-ffi being large.
<Nilium> Unnecessarily large, even.
hellome has joined #ruby
JZTech101 has joined #ruby
hellome has quit [Read error: Connection reset by peer]
i_s has quit [Remote host closed the connection]
<Nilium> r0bglees0n: Instead of Fiddle.
<r0bglees0n> ah
<r0bglees0n> Fiddle is stdlib
<Nilium> Reasoning being that Fiddle already works and is part of the stdlib.
<r0bglees0n> why not :)
<Nilium> I assume it's because Fiddle doesn't play particularly nicely with Windows from what I've heard and not seen and because ruby-ffi is now internet famous.
<r0bglees0n> yeah I'd use Fiddle, and FFI hasn't had the best history of working across different ruby runtimes.
<r0bglees0n> i think its better now
<r0bglees0n> rubinius just uses the gem
<r0bglees0n> but i dont know if the jruby API is in sync
<bnagy> it is
<bnagy> well, all my FFI code works on both
<bnagy> mri / jruby windows 32 / 64
<Nilium> I use enough C extensions that jruby just doesn't work for me anyway, so it's not a huge issue.
<r0bglees0n> havent tried jruby that much but there was a few gaps between rubinius's implementation & the MRI C gem.
hellome has joined #ruby
<r0bglees0n> for a while.
<bnagy> how does rbx handle cexts?
<r0bglees0n> yep
<r0bglees0n> it has a C extension API copied from MRI
<bnagy> ^^how
<r0bglees0n> oh sorry
<r0bglees0n> it implements the C API on top of their C++ code
<bnagy> I would have thought the threading would be an issue
<r0bglees0n> (MRI C API)
<r0bglees0n> yeah, C API has locks around it
<havenwood> bnagy: They just stopped bothering with thread safe. Put it on C-ext authors.
<bnagy> ok
<havenwood> r0bglees0n: I thought they actually removed locks a bit back.
<Nilium> I like that approach to thread safety.
<r0bglees0n> i dont think so
<r0bglees0n> but i might be wrong
<bnagy> I think it's pretty hard for a cext author to know enough about the runtime
<r0bglees0n> if rubinius can do that why couldnt MRI, assuming its all thread safe now?
<bnagy> but I am just handwaving
giorni has joined #ruby
iliketurtles has joined #ruby
<r0bglees0n> thats one of the concerns for removing the GIL in cruby
<bnagy> locking down the c api sounds much more doable
iliketurtles has quit [Max SendQ exceeded]
mansi has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<r0bglees0n> i can see why they'd want to remove the lock
<r0bglees0n> anything that calls into C is locked, so for something like the pg driver in the context of a puma web server that sucks so much
brisbin has joined #ruby
kung has joined #ruby
darth_chatri has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
<havenwood> i *swear* rbx doesn't lock c-ext lib calls but i can't find google proof
bobdobbs has quit [Read error: Connection reset by peer]
<Nilium> Though that talks more about the VM's GIL than C extensions
cj3kim has joined #ruby
radic_ has joined #ruby
<r0bglees0n> havenwood: there is locking
<r0bglees0n> it has something called ENTER_CAPI (locks)
iliketurtles has quit [Quit: zzzzz…..]
<r0bglees0n> and LEAVE_CAPI (unlocks)
<r0bglees0n> but i dont know how much of it there is and i dont really understand C++ either
Yakko has quit [Remote host closed the connection]
<havenwood> interesting
Banistergalaxy has joined #ruby
bradhe has joined #ruby
<r0bglees0n> i think they have to do that
<r0bglees0n> otherwise gems would just segfault all the over place
<Nilium> Looks like it keeps a series of locks for the C API.
<Nilium> Wonder if that's their way of handling locking from multiple threads
Megtastique has quit [Quit: Megtastique]
radic has quit [Ping timeout: 264 seconds]
cj3kim has quit [Ping timeout: 264 seconds]
<Nilium> I don't know enough about how this works, but yes, it definitely has a lock
Gooder`` has quit [Remote host closed the connection]
Gooder has joined #ruby
Poloniy has quit [Ping timeout: 256 seconds]
<r0bglees0n> ah yeah
<r0bglees0n> hm that sucks =o
thepumpkin has quit [Remote host closed the connection]
<r0bglees0n> jruby has the edge there
<r0bglees0n> it has java drivers to talk to the database
<r0bglees0n> or do the things C exts do in MRI
xavier23 has joined #ruby
<havenwood> yeah, so they just lock at the boundary - but presume the C-ext is thread safe
<havenwood> "Since we've disabled the global lock around the the C extensions around the C API, we haven't had major issues."
<havenwood> hrm
<r0bglees0n> so what lock is that?
alvaro_o has quit [Quit: Ex-Chat]
adeponte has joined #ruby
segfault88 has joined #ruby
rbento has joined #ruby
io_syl has quit [Read error: Operation timed out]
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> I kinda like just bug ticketing non thread safe libs
<havenwood> "Then that pushes that idea of thread-safety right up to the boundary of the C extension. So if the C extension itself is operating with its own native libraries, or however they implement stuff in a way that's not thread-safe, we hope to fix that."
Poloniy has joined #ruby
<havenwood> guess it really was spurred by performance problems
Dreamer3 has joined #ruby
<havenwood> but i dunno any lock details at all
cyong has joined #ruby
<r0bglees0n> it seems like a global lock in a threaded web server like puma would be a disaster
<r0bglees0n> well, not a disaster
zeromodulus has quit [Remote host closed the connection]
smathieu has joined #ruby
<r0bglees0n> but you wouldn't have parallel threads anytime you touched the DB.
<havenwood> a puma in shackles
sayan has joined #ruby
ssvo has quit [Ping timeout: 240 seconds]
scarolan has joined #ruby
<Nilium> Not really a good way to keep a puma since that just leads to spontaneous puma combustion.
bradsmith has joined #ruby
bsaboia_ is now known as BSaboia
SilverKey has quit [Quit: Cheerio!]
giorni has quit [Remote host closed the connection]
`Chris` has joined #ruby
`Chris` has quit [Remote host closed the connection]
senayar has joined #ruby
`Chris` has joined #ruby
jorge has quit [Remote host closed the connection]
jorge has joined #ruby
i_s has joined #ruby
jarray52 has left #ruby [#ruby]
Kricir has joined #ruby
rickmasta has quit [Quit: Leaving...]
DanKnox is now known as DanKnox_away
senayar has quit [Ping timeout: 246 seconds]
jorge has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
<iliketurtles> what would be a concise approach to checking several strings to see which one string contains the most number of repeated blocks of N bytes? basically i'd want to parse each string in N byte blocks, and see if there are any repeats, and if so count them. then, out of all strings checked, return the one with the most number of repeated blocks.
smathieu has quit [Remote host closed the connection]
i_s has quit [Ping timeout: 245 seconds]
<Tobarja> so i'm trying my hand at the hosted ruby warrior at: https://www.bloc.io/ruby-warrior one of the restrictions is you're only allowed to call one bang method. Is there a concept I'm missing that keeps it from turning into a gigantic set of nested if's?
<bnagy> iliketurtles: just count them, then sort by count?
<iliketurtles> bnagy: what do you mean by "count them"? i don't know what the repeating block would consist of, so i'd need to check for repeats
freeayu has joined #ruby
<bnagy> sure
<bnagy> like each_slice(n) and thenjust group_by and count
<iliketurtles> bnagy: what would I group_by
<bnagy> just e
<iliketurtles> e?
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}
<eval-in> bnagy => {["a", "a", "a", "a"]=>[["a", "a", "a", "a"], ["a", "a", "a", "a"]], ["b", "b", "b", "b"]=>[["b", "b", "b", "b"]]} (https://eval.in/40064)
<bnagy> but you don't care what they are
<bnagy> so
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.map(&:size).max
<eval-in> bnagy => 2 (https://eval.in/40065)
rickmasta has joined #ruby
darth_chatri has quit [Quit: Leaving.]
<popl> bnagy++
<bnagy> e is just a random var I use for 'element' in iterations etc
bradsmith has quit [Remote host closed the connection]
<iliketurtles> I see
<iliketurtles> what does 2 represent though
<bnagy> iliketurtles: issue being you'll miss stuff on block boundaries I think
<bnagy> 2 is the max repetitions of any block of 4 chars
<bnagy> hm no actually the block boundary thing doesn't matter for this
<bnagy> forget that :P
<iliketurtles> bnagy: ok cool
<iliketurtles> let me take a stab at solving my problem with this
<iliketurtles> appreciate it as always :)
<bnagy> you'll probably want to use bytes not chars
<bnagy> to be sure to be sure
<iliketurtles> yes of course
smathieu has joined #ruby
<r0bglees0n> >> [1,4,7].max { |x| x }
<eval-in> r0bglees0n => 7 (https://eval.in/40066)
moos3 has quit [Quit: Computer has gone to sleep.]
<r0bglees0n> you can write max(&:size) then
bradhe has quit [Remote host closed the connection]
moos3 has joined #ruby
endash has quit [Quit: endash]
Banistergalaxy has quit [Ping timeout: 240 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> cannot lah
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.max(&:size)
<eval-in> bnagy => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/40067)
Banistergalaxy has joined #ruby
<bnagy> you can use max_by, but you would get the arrays back
<bnagy> so you'd still need to call length to get the actual number :(
tobyo has quit [Ping timeout: 245 seconds]
znc_ has joined #ruby
anay has joined #ruby
znc_ has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
havenn has joined #ruby
shadoi1 has quit [Ping timeout: 240 seconds]
havenwood has quit [Read error: Connection reset by peer]
waj has quit [Quit: Leaving.]
sdegutis has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
<sdegutis> is ruby's TCPSocket known for being slow or something?
stkowski has quit [Quit: stkowski]
<iliketurtles> bnagy: with the approach you showed a min ago, would it be easy to show the string that had the highest number of repetitions?
<bnagy> iliketurtles: well I killed it
<bnagy> but you could just keep a best_so_far variable or something
<bnagy> depends if you want them all or just the winrar
<iliketurtles> just the winner
`Chris` has quit [Read error: Connection reset by peer]
<bnagy> sdegutis: that's the kind of passive agressive bullshit question that makes IRC so DAMN FUN
`Chris` has joined #ruby
<iliketurtles> ^_^
<popl> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.max()
<eval-in> popl => [["b", "b", "b", "b"]] (https://eval.in/40068)
<popl> hm
<sdegutis> bnagy: uhhh
<sevenseacat> i like fun.
<popl> sdegutis: just ask what you really want to ask
* sdegutis is profiling to find the slowness
anay has quit [Remote host closed the connection]
<sdegutis> popl: i did.
<popl> are you sure?
mary5030 has joined #ruby
<bnagy> "no, sdegutis it is not"
<bnagy> "why, are you having trouble"
mansi has joined #ruby
will has joined #ruby
<bnagy> "why don't you tell us what you are observed and why it is unexpected"
<popl> bnagy: who are you quoting?
axeman- has joined #ruby
<bnagy> nobody
<popl> bnagy: sounds like a smart person
<sevenseacat> answer is either going to be 'yes, i am having trouble with XYZ' or 'no im not having trouble, i just want to troll you'
<popl> nobody is a smart person
<will> how do I in ruby create objects out of an array of strings
<popl> :D
<bnagy> will: strings are ruby objects?
<will> so: array_name.each.to_s {|person| person = Person.new}
<will> why does this not work
<sdegutis> never mind.
<sdegutis> im not good at communicating
<sdegutis> and i dont want to upset anyone anymore.
<bnagy> but if it's serialised data then there are a ton of ways
<popl> sdegutis: practice!
<popl> sdegutis: you're not upsetting me
<sdegutis> i tried, you guys yelled at me.
<popl> sdegutis: bnagy is cranky
<popl> sdegutis: you need to invest in a helmet.
<sevenseacat> or a thicker skin
<will> do you see what I am saying bnagy?
<popl> sevenseacat: can you buy a thicker skin?
<popl> like leather armor you mean?
<bnagy> will: um.. not really.. like, that would "work"
<sdegutis> the background is, im trying to see if its reasonable to implement some IPC between a C app and a Ruby script via JSON over TCP
<will> your saying that should work?
<sevenseacat> if i sat here and hurled insults at someone all day, i'm sure they'd get a thicker skin. either that or go and cry into their pillow.
<bnagy> will: maybe name_array.map {|name_string| Person.new name_string}
<sdegutis> and i found that it was taking 10 seconds to send 10 roundtrips.
<will> then maybe my problem is somewhere else
<bnagy> will: well it is unlikely to do what you wanted, but it should execute successfully
<sdegutis> i mean, to send 10 messages of JSON (about 30 bytes) to C and receive it back in Ruby.
<sdegutis> now, im no expert at anything, but 10 seconds seems like a long time for this
<bnagy> which IPC mechanism?
<will> See ... maybe the problem lies somewhere else in the program if that would work
<will> so if my array is %w["a" "b" "c" ]
<will> I want to be able to then access
<bnagy> will: ha, no sorry I misread
<will> a.name
<will> or b.attrib
mansi has quit [Ping timeout: 264 seconds]
axeman- has quit [Remote host closed the connection]
<bnagy> will: you're passing a block to to_s which is not right
<bnagy> sdegutis: I'd be most inclined to look at your JSON layer or whatever the underlying IPC is
<sdegutis> i took the JSON out, and just sent the string "hi" back and forth.
<sdegutis> it was 7 seconds.
<sdegutis> (for 10 roundtrips)
<bnagy> or you're saying you've not written that bit yet?
<bnagy> yeah that's nuts
<r0bglees0n> sdegutis: what are you using for transport?
<sdegutis> so, im thinking it was the hacky way i was dealing with TCPSocket
<sdegutis> so, im gonna try a way simpler version
<bnagy> TCPSocket is a very thin wrapper on Socket
<bnagy> but there are lots of ways to make nonobvious socket errors
<sdegutis> ok, the simpler version takes 0 seconds to do all 10 :)
<sdegutis> yeah, i was doing something stupid.
<bnagy> imho I would look at what your C app supports for RPC and work backwards
<r0bglees0n> are the processes on the same machine?
<sdegutis> i was doing something like this: https://gist.github.com/sdegutis/6127357
sayan has joined #ruby
kobain has quit [Quit: El motor por excelencia http://www.europio.org/]
<bnagy> cause there are good gems for a few common approaches
louism2wash has joined #ruby
<will> bnagy: still does not work, I am getting an invalid reference when I reference the object later
<will> does the scope of the code block have an impact?
tjbiddle has joined #ruby
<bnagy> will: can you gist some actual code?
<bnagy> yes, scope definitely has an impact
<will> bnagy: should I pastebin it?
<bnagy> but if this is railsy then I can't, personally, help
<r0bglees0n> its not railsy
<bnagy> will: sure pastebin I guess ( least preferred )
dmiller has quit [Remote host closed the connection]
browndawg has joined #ruby
mansi has joined #ruby
bradhe has joined #ruby
<bnagy> sdegutis: I'd look at using a read Thread and a Queue
<r0bglees0n> !gist
<sdegutis> bnagy: yeah someone suggested Queue to me earlier
<r0bglees0n> !pastie
<sdegutis> but whats a read Thread?
<bnagy> and I don't think your join there will ever exit, like it's joining an infinite loop
<bnagy> sdegutis: pretty much what you already have
<sdegutis> oh
<sdegutis> yay
<sdegutis> bnagy: well once this ruby script is rounded out more, messages might come in a weird order.
wargasm has joined #ruby
<sdegutis> so i actually have to dig through it to find the right message
<bnagy> will: you're not using the result from each
havenn is now known as havenwood
<bnagy> sdegutis: do that in your handler
Soliah has joined #ruby
<sdegutis> but a queue can only have messages popped out, no?
BSaboia has quit [Quit: Leaving]
<bnagy> just have a reader thread that's a message pump, and the reorder etc somewhere else
carlyle has quit [Ping timeout: 245 seconds]
<sdegutis> hmm i see
<will> bnagy: how do I go about using the result for each? I am really new to programming Ruby and was just experimenting a little further than book took it
<r0bglees0n> will: your code has a lot of problems, you iterate an array and don't use any of the elements, you assign a block local and never use it, 'b' is never assigned.
<bnagy> will: something like people = array_name.map {|name| Person.new name}
sdegutis has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 240 seconds]
<will> bnagy: anyway you can walk me through that statement? sry...
<bnagy> map transforms a collection, element by element
<bnagy> so every element in array_name is used to pass as an arg to Person.new
scarolan has quit [Ping timeout: 264 seconds]
sayd has joined #ruby
io_syl has joined #ruby
cj3kim has joined #ruby
<r0bglees0n> >> class Person; def initialize(name); @name = name; end; end; %w(john tim).map { |name| Person.new(name) }
<eval-in> r0bglees0n => [#<Person:0x41648de0 @name="john">, #<Person:0x41648dcc @name="tim">] (https://eval.in/40069)
<will> hmmm
<will> awesome
Kruppe has quit [Read error: Connection reset by peer]
<will> so when I do: puts john.name it says undefined
<will> after that
<bnagy> well yeah, john is a local variable that hasn't been defined
yacks has quit [Quit: Leaving]
<will> how do i extend the scope out of the code block and be able to manipulate the Person object
<iliketurtles> bnagy: so, to read in numerous strings, would this approach seem good? strings.max_by { |string| string.chars.each_slice(16).group_by {|e| e}.values.max }
<bnagy> there is a Person instance in position 0 of that resulting array, though whose name is the string "john"
zeropx has quit [Quit: has left the room … Or did he?]
<will> oh
bradhe has quit [Remote host closed the connection]
<will> so I could set this output equal to an array
<bnagy> iliketurtles: it looks like readable code, but I think your handling of the grouped data isn't right
<iliketurtles> bnagy: how so?
<will> and then access the person object by referencing a position in array
<bnagy> iliketurtles: try it and see :D
<bnagy> or read scrollback again
carlyle has joined #ruby
hamakn_ has joined #ruby
<will> OH MAN
<r0bglees0n> lol
hamakn has quit [Read error: Connection reset by peer]
<will> bnagy: r0bglees0: THANKS!
<will> that is awesome
jorge has joined #ruby
<will> ill continue experimenting with Ruby! thanks for the help. for real!
<bnagy> \/\/ westside 4 lyf yo fo realz
<will> lol
<bnagy> will: np
WaRori has quit [Ping timeout: 264 seconds]
ssvo has joined #ruby
<iliketurtles> bnagy: handling of the grouped data? i want to output the string that has the most repeats in it
<bnagy> yeah, I don't think your code does that
<bnagy> because it's different from the example code above
<bnagy> in an important way
bklane_ has quit [Remote host closed the connection]
jorge has quit [Ping timeout: 264 seconds]
bklane has joined #ruby
<iliketurtles> bnagy: your example code? or someone elses'
robertjpayne has joined #ruby
bklane has quit [Read error: Connection reset by peer]
<bnagy> eg mine
<iliketurtles> bnagy: yours has .map(&:size)
<bnagy> yeah
bklane has joined #ruby
ananthakumaran has joined #ruby
carlyle has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 264 seconds]
<r0bglees0n> you can write that that as .max { |x| x.size }
<r0bglees0n> -that
<bnagy> iliketurtles: if you just call max on values at that point, you're gonna get the default sort
nathancahill has quit [Quit: nathancahill]
<bnagy> which, for an array of arrays of bytes, is not going to be what you want
NealJ has joined #ruby
<iliketurtles> bnagy: how does the &:size fix that
<bnagy> r0bglees0n: I don't think you can
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.max {|e| e.length }
<eval-in> bnagy => [["b", "b", "b", "b"]] (https://eval.in/40070)
<bnagy> but I don't know why offhand. I am surprised. :(
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.map(&:size).max
<eval-in> bnagy => 2 (https://eval.in/40071)
will has quit [Quit: Leaving]
bklane has quit [Ping timeout: 246 seconds]
<bnagy> that's the size of the correct array ( 'aaaa' array )
<r0bglees0n> bnagy: ohhhh
<r0bglees0n> bnagy: you're right
<r0bglees0n> >> [1,10,4].max { 50000 } # should be 1, will be 10.
<eval-in> r0bglees0n => 4 (https://eval.in/40072)
<r0bglees0n> wut
<bnagy> haha
ccolorado has joined #ruby
<iliketurtles> hahahaha
<bnagy> DOXTIEM!
<bnagy> r0bglees0n: ohh you need spaceship
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<bnagy> >> "aaaabbbbaaaa".chars.each_slice(4).group_by {|e| e}.values.max {|a,b| a.length <=> b.length}
<eval-in> bnagy => [["a", "a", "a", "a"], ["a", "a", "a", "a"]] (https://eval.in/40073)
<r0bglees0n> is the block invoked at all?
<r0bglees0n> >> [1,2].max { |x| p "Ya" }
<eval-in> r0bglees0n => "Ya" ... (https://eval.in/40074)
<r0bglees0n> it is
<r0bglees0n> hrm
<r0bglees0n> so it expects -1, 0 or 1?
<bnagy> yeah
pkh has joined #ruby
`Chris` has quit [Read error: Connection reset by peer]
`Chris` has joined #ruby
<bnagy> r0bglees0n: so I guess you were just getting the last item
dmiller has joined #ruby
johnkary has joined #ruby
<bnagy> cause the block was returning a number that could be used in >
anay has joined #ruby
ArchBeOS has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
Xiti has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
ArchBeOS has joined #ruby
Xiti has joined #ruby
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
<Nilium> After much head-scratching, I got my OpenGL bindings working in Rubinius.
<ccolorado> Hi, is there a way around "Net::HTTPRequestURITooLong" on net/http or should i be using something else ?
tobyo has joined #ruby
d34th4ck3r has joined #ruby
zeromodulus has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
GeissT has joined #ruby
gokul has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
ArchBeOS has quit [Read error: Connection reset by peer]
darth_chatri has joined #ruby
ArchBeOS has joined #ruby
WaRori has joined #ruby
bradsmith has joined #ruby
<pontiki> probably POST
n_blownapart has joined #ruby
JZTech101 has quit [Quit: Bye]
the_fallen has joined #ruby
<ccolorado> pontiki: I swore i was making a POST instead of GET. It would have takken me a long time to figure that one out.
<ccolorado> pontiki: thanks
<pontiki> nw
becky_ has quit [Ping timeout: 264 seconds]
bradsmith has quit [Ping timeout: 240 seconds]
ssvo has quit [Ping timeout: 245 seconds]
WaRori has quit [Read error: Operation timed out]
[narcan] has joined #ruby
eldariof has joined #ruby
nbouscal has quit [Ping timeout: 264 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
Banistergalaxy has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Kricir has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
zeromodulus has quit [Remote host closed the connection]
ccolorado has left #ruby [#ruby]
cyong has quit [Quit: Leaving.]
iliketurtles has joined #ruby
madumo has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
malcolmva has quit [Read error: Connection reset by peer]
variantdealer is now known as bhaak
mansi has joined #ruby
madumo has quit [Read error: Connection reset by peer]
timonv has joined #ruby
ArchBeOS has quit [Read error: Connection reset by peer]
graydot has joined #ruby
ArchBeOS has joined #ruby
WaRori has joined #ruby
vlad_starkov has joined #ruby
madumo has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
dagen has joined #ruby
segfault88 has quit [Quit: Leaving]
tomzx_mac has quit [Ping timeout: 264 seconds]
madumo has quit [Read error: Connection reset by peer]
bklane has joined #ruby
bklane has quit [Remote host closed the connection]
ni291187 has joined #ruby
<DylanJ> someone find me a better flashlight than that
<DylanJ> wrong channel
ni291187 has left #ruby [#ruby]
m104 has joined #ruby
malcolmva has joined #ruby
ezkl has joined #ruby
Domon has joined #ruby
hiteshtr has joined #ruby
brennanMKE has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
Krajsnick has joined #ruby
jorge has joined #ruby
johnkary has quit [Quit: @johnkary]
Krajsnick has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
zleslie has joined #ruby
<zleslie> Howdy
tk_ has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
druonysuse has joined #ruby
druonysuse has joined #ruby
druonysuse has quit [Changing host]
<zleslie> I have a module method that calls a .new on another class. For some reason I get undefined method #new on my module.
<zleslie> I have module_function inside the module.
<zleslie> I am just misunderstanding something here
jorge has quit [Ping timeout: 276 seconds]
huoxito has quit [Quit: Leaving]
bradhe has joined #ruby
axeman- has quit [Ping timeout: 240 seconds]
axeman- has joined #ruby
the_fallen has left #ruby [#ruby]
carlyle has joined #ruby
<epitron> >> [[1], [2], [3], [nil]].sort_by(&:first)
<eval-in> epitron => comparison of Fixnum with nil failed (ArgumentError) ... (https://eval.in/40075)
<epitron> >> [[1,2], [2,3], [3,4], [nil]].sort_by(&:first)
<eval-in> epitron => comparison of Fixnum with nil failed (ArgumentError) ... (https://eval.in/40076)
iliketurtles has quit [Quit: zzzzz…..]
ni291187 has joined #ruby
<epitron> oh that's right
<epitron> >> [[1], [2], [3], [nil]].sort
<eval-in> epitron => comparison of Array with Array failed (ArgumentError) ... (https://eval.in/40077)
ni291187 has left #ruby [#ruby]
<epitron> ^- confusing error message :)
<epitron> it's because of this:
<epitron> >> [1] <=> [nil]
<eval-in> epitron => nil (https://eval.in/40078)
<epitron> sort has no idea what error to throw when "nil" is the result of <=>
<epitron> i think <=> should be throwing its own exception
hiteshtr has quit [Quit: Leaving]
vishal_ has joined #ruby
twoism has joined #ruby
axeman- has quit [Ping timeout: 248 seconds]
axeman- has joined #ruby
iliketurtles has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
browndawg has quit [Quit: Leaving.]
dmiller has joined #ruby
sayan has joined #ruby
IceDragon has quit [Quit: Space~~~]
bradhe has quit [Remote host closed the connection]
akemrir has joined #ruby
dmiller has quit [Ping timeout: 276 seconds]
tagrudev has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
ananthakumaran has joined #ruby
lemonsparrow has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<DylanJ> zleslie: code?
darth_chatri has quit [Quit: Leaving.]
stayarrr has joined #ruby
zigomir has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
Es0teric has quit [Ping timeout: 264 seconds]
billy_ran_away has quit [Ping timeout: 268 seconds]
eaWPq4nU has joined #ruby
LucidDreamZzZz has quit [Ping timeout: 240 seconds]
rubecube has joined #ruby
henn has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
vikhyat has joined #ruby
bradhe has joined #ruby
twoism has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
Es0teric has joined #ruby
twoism has joined #ruby
vikhyat_ has quit [Ping timeout: 246 seconds]
iliketurtles has quit [Quit: zzzzz…..]
larissa has quit [Quit: Leaving]
billy_ran_away has joined #ruby
keen________ has joined #ruby
mansi has joined #ruby
cyong has joined #ruby
keen_______ has quit [Ping timeout: 264 seconds]
druonysuse has quit [Read error: Connection reset by peer]
axeman- has quit [Ping timeout: 240 seconds]
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
axeman- has joined #ruby
sailias has joined #ruby
inf-groupoid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
browndawg has joined #ruby
<pontiki> that does seem odd, epitron ...
iliketurtles has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
ebanoid has joined #ruby
<pontiki> but...
stoffus has joined #ruby
<pontiki> >> [[1],[:a],["asdf"]].sort
<eval-in> pontiki => comparison of Array with Array failed (ArgumentError) ... (https://eval.in/40079)
axeman- has quit [Ping timeout: 245 seconds]
<pontiki> so it's not that it's nil
mrwashxx has joined #ruby
pranny has joined #ruby
<mrwashxx> hello room
axeman- has joined #ruby
<pontiki> clearly, this should fail:
<pontiki> >> [1, :a, "asdf"].sort
<eval-in> pontiki => comparison of Fixnum with :a failed (ArgumentError) ... (https://eval.in/40080)
kevinykchan has joined #ruby
JuanitoFatas has joined #ruby
Elhu has joined #ruby
<pontiki> and this:
iliketurtles has quit [Ping timeout: 276 seconds]
<pontiki> >> [1] <=> [:a]
<eval-in> pontiki => nil (https://eval.in/40081)
<pontiki> well
<pontiki> that is not what i expected
swordsmanz has joined #ruby
<bnagy> <=> should return 0, 1, -1
zachrab_ has joined #ruby
<bnagy> nil is an error I guess
<pontiki> oh
<pontiki> "nil is returned if the arrays are uncomparable"
<mrwashxx> anyone here knows how to get mailer
<pontiki> i go down to the mail box every day
<sevenseacat> check your mailbox.
eldariof has quit [Read error: Operation timed out]
stayarrr has quit [Read error: Connection reset by peer]
stayarrr has joined #ruby
JuanitoFatas has left #ruby [#ruby]
agent_white has quit [Quit: Lost terminal]
<pontiki> well, anyway, epitron, i think the behaviour is at least consistent, although knowing why the exception gets thrown would be more useful
<bnagy> pontiki: so I guess they're doing something like unless a <=> b, raise comparison of a.class with b.class failed
<bnagy> and <=> is trying to recurse in?
brennanMKE has joined #ruby
billy_ran_away has quit [Ping timeout: 246 seconds]
bjeanes has joined #ruby
<pontiki> it seems it does the object comparisons first, then looks at lenght
<bnagy> >> [1,2,3] <=> [1,2,4]
<eval-in> bnagy => -1 (https://eval.in/40082)
<bnagy> yeah
<pontiki> in Array#<=>
jorge has joined #ruby
<pontiki> not reading code yet
noop has joined #ruby
m104 has quit [Quit: brb]
Soliah has quit [Quit: Soliah]
twoism has quit [Ping timeout: 245 seconds]
cyong has quit [Ping timeout: 276 seconds]
<pontiki> btw. pry is the BOMB
brennanMKE has quit [Ping timeout: 240 seconds]
olivererxleben has joined #ruby
<sevenseacat> +1
<pontiki> started playing with it in guard
<pontiki> and WHOA
jorge has quit [Ping timeout: 264 seconds]
stayarrr has quit [Ping timeout: 248 seconds]
krainboltgreene has joined #ruby
m104 has joined #ruby
`Chris` has quit [Ping timeout: 264 seconds]
m104 has quit [Client Quit]
rickmasta has joined #ruby
billy_ran_away has joined #ruby
threesome has joined #ruby
workmad3 has joined #ruby
blaxter_ has joined #ruby
hakunin has joined #ruby
stoffus has quit [Read error: Connection reset by peer]
stoffus has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
iFire has joined #ruby
[narcan] has joined #ruby
mrwashxx has quit []
Davey has joined #ruby
dmiller has joined #ruby
anay_ has joined #ruby
iFire_ has quit [Ping timeout: 256 seconds]
sambao21 has joined #ruby
decoponio has joined #ruby
Al_ has joined #ruby
anay has quit [Ping timeout: 276 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 240 seconds]
axeman- has quit [Ping timeout: 246 seconds]
zoee has joined #ruby
sambao21 has quit [Ping timeout: 241 seconds]
axeman- has joined #ruby
echevemaster has quit [Quit: Leaving]
anay_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
anay has joined #ruby
tr4656 has quit [Read error: Operation timed out]
tjbiddle has joined #ruby
tr4656 has joined #ruby
zacts has joined #ruby
andikr has joined #ruby
kung has quit [Quit: Bye!]
pallavi has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
n_blownapart has quit [Remote host closed the connection]
axeman- has joined #ruby
relix has joined #ruby
zachrab_ has quit [Remote host closed the connection]
dagobah has joined #ruby
ntus1017 has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
goodgame has joined #ruby
threesome has quit [Ping timeout: 276 seconds]
axsuul has quit [Ping timeout: 264 seconds]
jbpros has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
axeman- has quit [Ping timeout: 264 seconds]
jds_ has joined #ruby
radic_ has quit [Remote host closed the connection]
axeman- has joined #ruby
v1rr3n has quit [Read error: Operation timed out]
sdegutis has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
tkuchiki has joined #ruby
kaspergrubbe has joined #ruby
Alina-malina has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
apakatt has joined #ruby
<sdegutis> i figured out what was slowing down my program that was talking over TCP, kind of...
<sdegutis> after reading from the socket, if i dont print something to stdout on the background thread, the main thread chokes and slows down dramatically
<sdegutis> no idea why
mansi has joined #ruby
<bnagy> ew.
<bnagy> if in doubt blame buffering?
<sdegutis> maybe..
<sdegutis> its this btw
<sdegutis> if i comment out line 29, it crawls
wallerdev has quit [Quit: wallerdev]
tatsuya_o has quit [Remote host closed the connection]
v0n has joined #ruby
<sdegutis> granted it could be because the design of #get_message is idiotic.
<sevenseacat> +1 to that
<sdegutis> but i dont have a better solution for turning an async response into a synchronous method-return
<sdegutis> ideas are very welcome
<bnagy> oh.. I would use a Queue not an array if I were you
<bnagy> and I dunno about second guessing your protocol with gets then readpartial
<bnagy> queues are better for shring between threads cause they're designed to be threadsafe
<sdegutis> oh.
<sdegutis> didnt know, thanks
<bnagy> even though I can't see any reason this design is inherently going to be wrong
<sdegutis> but ill still have to pop them off onto the main thread so i can examine them later to match up responses to requests
billy_ran_away has quit [Ping timeout: 245 seconds]
<bnagy> well you can still do that
<bnagy> in main you send then incoming.pop <-- blocking
rubecube has quit [Quit: Page closed]
mansi has quit [Ping timeout: 240 seconds]
<bnagy> if you want to async _everything_ then seriously, don't
<bnagy> just use eventmachine or something
apeiros has quit [Remote host closed the connection]
<bnagy> but assuming you're insane you can just store sent reqs in a hash by whatever you use for a unique id ( whatever matches responses to requests ) and then do a lookup in your response handler
<sdegutis> oh nice, thanks bnagy
<sdegutis> good idea
<sdegutis> btw its neat how i can just swap out [] with Queue.new and it all works
<bnagy> at which point imho it's probably better to just run a select loop
<sdegutis> nothing else had to change
<bnagy> but I am biased
rickmasta has quit [Quit: Leaving...]
<sdegutis> biased how?
<bnagy> yeah Queue also gives you a blocking pop
<bnagy> which is great, you don't have to spin on empty? checks on your array
<bnagy> well I don't think threaded socket handlers in ruby are a sustainable pattern
<bnagy> for sanity, mainly
<sdegutis> bnagy: btw that fixed it entirely
<sdegutis> its now lightning fast again
<sdegutis> instead of 10 seconds for 10 roundtrips
<sdegutis> woot
<sdegutis> thanks :)
<bnagy> np
<sdegutis> i should have done it earlier but i was being foolish
havenwood has quit [Remote host closed the connection]
billy_ran_away has joined #ruby
<sdegutis> sorry about that
bradhe has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
Elhu has quit [Quit: Computer has gone to sleep.]
hanmac has joined #ruby
tonini has joined #ruby
camilasan has joined #ruby
tommyvyo has quit [Remote host closed the connection]
<sdegutis> i guess i need another queue, but one that waits for data matching specific criteria
jds_ has quit [Remote host closed the connection]
<sdegutis> or something
cyong has joined #ruby
<bnagy> what the goal?
<bnagy> full async, or just efficient?
jds_ has joined #ruby
<sdegutis> well the request/response should appear sync but actually be async (over tcp), however there's also a callback system
<sdegutis> so you can send 'register' msgs and receive 'callback' msgs
<bnagy> use eventmachine
<bnagy> :)
<bnagy> or celluloid
blueOxigen has joined #ruby
<sdegutis> well, i also want to bundle this with my app, in a reasonably small way
<bnagy> buuuut having said that
Elhu has joined #ruby
tommyvyo has joined #ruby
<sdegutis> ive already reinvented half the wheel so far, i think im pretty close
stef_204 has joined #ruby
<bnagy> when you define a message to send, you can create a callback then and there, as a Proc
<bnagy> then put that in a callback hash by id or whatever
<bnagy> in your receive handler, get a message, look up the response callback by id and just fire it
<bnagy> the callback is a closure, so it has access to whatever locals it was using when you defined it
<sdegutis> hmm
<bnagy> this is pretty much the guts of EM, btw. The rest is just a big ass select()
<sdegutis> i remember liking EM back when i first tried ruby
<sdegutis> but maybe that was just my knee-jerk response after having just been tortured by python's "twisted" lib
<bnagy> I would use celluloid for new work imho
<sdegutis> i looked at cell-io, it looked like it did too much and not exactly what i want either
<bnagy> I have more or less a not-invented-here workalike of celluloid, it's a good model
<bnagy> you can just use it for the actors, you don't have to use it for the comms
cyong has quit [Ping timeout: 240 seconds]
<sdegutis> hmm
jds_ has quit [Ping timeout: 248 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
<bnagy> and there's nio4r I think
<bnagy> whatever it's called
<bnagy> but writing your own eventy callbacky framework from scratch is un-fun
vlad_starkov has quit [Ping timeout: 264 seconds]
<sdegutis> on a related note, can you call a method on the main thread from the background thread?
timonv has quit [Remote host closed the connection]
<bnagy> sure
threesome has joined #ruby
<bnagy> just watch out for threadsafety, as always
<bnagy> there aren't really 'methods' on the main thread
<bnagy> methods are on objects
<sdegutis> ah, i just figured out a minimal solution to my problem: i create a hash of request-id => queue, and the pretend-sync method pops from the proper one and the async background read-thread pushes to the proper one, and the magic is all done via ruby Hash lookups by id
<bnagy> so if you're defining stuff in toplevel, which is more or less like in Object, that's different to the thread that's running that method
fredjean has joined #ruby
<sdegutis> bnagy: i meant call a method in such a way that it executes on the main thread
<bnagy> uh that doesn't make sense to me
<sdegutis> bnagy: in objc i have something like do_function_on(main_thread, ->{ some_random_code() })
<sdegutis> (transliterated obviously)
<sdegutis> is there a ruby equiv for this?
`Chris` has joined #ruby
<bnagy> that still doesn't make sense to me :)
<sdegutis> hmm
vlad_starkov has joined #ruby
kreantos has joined #ruby
apakatt has left #ruby ["Linkinus - http://linkinus.com"]
<sdegutis> lambda{ some_code() }.call_on_thread(Thread.main())
<bnagy> so the runtime interrupts the thread, swaps out the stack, injects code for some reason, and then resumes afterwards?
<sdegutis> i dunno how it works in objc
<sdegutis> it just works
<bnagy> what's the benefit?
<sdegutis> thread safety, kind of.
<sdegutis> in objc thats important, so i assume its important everywehre
<bnagy> hm
<sdegutis> like i just found out about here with [] vs Queue.new
<bnagy> that does not fit my worldview
<sdegutis> well im probably just crazy
<sdegutis> ignore me and you'll go far in life
Elhu has quit [Quit: Computer has gone to sleep.]
<bnagy> mainly ruby just uses Queues and sometimes Mutex
Deele has joined #ruby
<bnagy> if you want to access an inherently non-safe thing, you say @mutex = Mutex.new then @mutex.synchronize { unsafe_widget.frob }
<bnagy> across threads
* hanmac does most of the time do not care about threads
Opettaja has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sdegutis> ah
<sdegutis> thx
Opettaja has quit [Read error: Connection reset by peer]
<bnagy> there are also semaphores, but imho if you're using them you're writing C in ruby and you should feel bad
<sdegutis> oops, this deadlocks.. https://gist.github.com/sdegutis/6129052
<sdegutis> :)
<sdegutis> but i think conceptually its a lot simpler than my original plan
<bnagy> why are you popping in your send?
<sdegutis> bnagy: because the send waits for a response
<sdegutis> to pretend to be synchronous
<bnagy> try this - make one send_q, one recv_q, one sender thread that _just_ pops send_q and sends, ditto recv
<sdegutis> but it waits for a response with a matching id
<bnagy> then a recv_handler that pops recv_q and handles
hakunin has quit [Ping timeout: 240 seconds]
<bnagy> don't have one queue per message, that's ... unusual
<sdegutis> it has both features i need: blocking pop, and safely push from background read-thread to foreground
Es0teric has quit [Quit: Computer has gone to sleep.]
rickmasta has joined #ruby
<goleldar> hello
<sdegutis> plus the hash trick reduces *tons* of otherwise complexity
<sdegutis> *tons*
<sdegutis> hi goleldar
<bnagy> sdegutis: you can still have your hash, just reference it in recv_handler
<bnagy> probably via a mutex, sadly, in that case
<goleldar> could someone please look at this. I am trying to use each_with_object in place of inject to make it cleaner but it does not pass the test when I do
<sdegutis> bnagy: this solution doesnt need a mutex btw
bluOxigen has joined #ruby
<sdegutis> well maybe it does. i havent solved the deadlock yet
robertjpayne has left #ruby [#ruby]
olivererxleben has quit [Quit: Leaving...]
<bnagy> goleldar: this is a perfect use for inject though
* sdegutis prefers the name #reduce
<bnagy> sdegutis: ok, I mean I don't want to have a fight, I'm just giving you advice, feel free to ignore it
<goleldar> bnagy: I am still learning best practices so that is good to hear
druonysus has quit [Ping timeout: 246 seconds]
<sdegutis> well maybe you're right
<goleldar> bnagy: why do you say that inject would be better here than each_with_object?
relix has joined #ruby
kung has joined #ruby
<sdegutis> FP
<bnagy> cause each_with_object(0) is more or less the core use for inject
blueOxigen has quit [Ping timeout: 240 seconds]
d34th4ck3r has quit [Quit: d34th4ck3r]
maxmanders has joined #ruby
stayarrr has joined #ruby
<goleldar> I was trying to understand why the tests dont pass with each_with_object.. is there something that I am missing to know without testing that it would not work?
<bnagy> goleldar: I would expect a hamming to look like string1.chars.zip(string2.chars).inject(0) {|hamming,(a,b)| hamming += 1 unless a==b}
<bnagy> or something
<bnagy> goleldar: yeah with each_with_object, what's happening to 0?
io_syl has quit [Quit: io_syl]
<Nilium> Was about to point that part out.
<bnagy> it's an accumulator, right? But where is it stored between iterations of that block?
hakunin has joined #ruby
<goleldar> each_with_object returns 0 everytime
<Nilium> It'd work if the value was mutable, but it's not.
alup has joined #ruby
<Nilium> each_with_object returns the object you gave it.
<goleldar> bnagy: I have never used the zip method .. looks interesting .. reading about it now
<Nilium> So here's a question for you, goleldar, what's 0 += 1?
<bnagy> goleldar: it's not sound for strings of unequal length
pjeide has joined #ruby
<bnagy> it was just off the top of my head
<goleldar> ok
<Nilium> I also can't decide if your name is a power rangers reference gone awry or not
<goleldar> :)
<goleldar> I get an error on that one 0 += 1
intuxicated has quit [Read error: Connection reset by peer]
<Nilium> And what is differences_count?
<Nilium> I mean, we've already established that 0 isn't mutable.
<goleldar> count of the differences between the two strands ignoring extra nucleotides above the maximum common length
<Nilium> That's not what I asked. What is differences_count? The answer is 0. You gave 0 to each_with_object, so it's 0.
<bnagy> oh in that case zip works fine :P
gstamp has quit [Quit: Computer has gone to sleep.]
<Nilium> It's always going to be 0.
<goleldar> oh ya
<goleldar> so there is not really a way to make this work with each_with_object?
<Nilium> There isn't.
<Nilium> Use inject.
<goleldar> ok
<bnagy> sure
<bnagy> just have your object be mutable
<Nilium> bnagy: Let's not go down horror street tonight. >_>
<bnagy> but it's not clean
<goleldar> :)
d2dchat has joined #ruby
<bnagy> a=0 blah.each_with_object(a) would work
<bnagy> etc
<Nilium> No, it wouldn't.
<bnagy> but in that case so would just each
<goleldar> when would each_with_object be prefable over inject?
<bnagy> no, it wouldn't
<bnagy> a=[0]
<goleldar> is there a general principle?
jibi has joined #ruby
<Nilium> That works.
<Nilium> Again, though, horror street.
<bnagy> yeah external a and just each would work
<Nilium> goleldar: When the object is mutable or when the object doesn't need to change.
druonysus has joined #ruby
<Nilium> Or if it's just a base and doesn't need to change between iterations.
<bnagy> goleldar: in general, avoid them both
<bnagy> this is almost literally the only use I like for inject
Coffers has joined #ruby
axeman- has quit [Ping timeout: 240 seconds]
<bnagy> and 99% of injects in the field should be rewritten with each_with_object
<goleldar> ahh ok..
axeman- has joined #ruby
<bnagy> and 99% of those should be rewritten with each
<Nilium> Mostly because people are stupid and really like doing inject([]) or inject({})
<bnagy> ^^
<goleldar> so with counts inject is preferable
<Nilium> Which I'm guilty of doing plenty.
jbpros has quit [Quit: jbpros]
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<bnagy> goleldar: imho, reduce ( alias for inject ) is a better name
<bnagy> and if people always called it that they might use it right more often
<bnagy> it reduces a collection to a single value
<bnagy> in this case, it's fine, it reduces an collection of charachter pairs to a score
<bnagy> *a
<goleldar> that makes sense
<goleldar> good way to remember proper use
<Nilium> That and more people probably know map and reduce than they do collect and inject.
jds_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
senayar has joined #ruby
Ciscoridze has joined #ruby
utdemir has joined #ruby
anay has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
timonv has joined #ruby
<sdegutis> ooooh
<sdegutis> now i see why my plan was dumb
mansi has joined #ruby
anay has joined #ruby
<sdegutis> no wait, nvm
obs has joined #ruby
codecop has joined #ruby
choobie has quit [Quit: choobie]
Mon_Ouie has joined #ruby
ephemerian has joined #ruby
graydot has quit [Quit: graydot]
jibi has quit [Ping timeout: 246 seconds]
wiiw has joined #ruby
<wiiw> hello , I need change the ActiveRecord's max pool size , default is 5
graydot has joined #ruby
<bnagy> wiiw: #rubyonrails
<wiiw> I did not use rails , just use ActiveRecord only , so config/database.yml did not work
<bnagy> hrm. ok, but I still think that's your best bet
<wiiw> bnagy: I'll try that channel
<bnagy> cause almost nobody uses AR except railsies afaik
mansi has quit [Ping timeout: 248 seconds]
<sevenseacat> we're too darn cool.
blackmesa has joined #ruby
Elhu has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
<wiiw> bnagy: yes , I use ActiveRecord to conn with mssql , and tiny_tds allways say "Attempt to initiate a new Adaptive Server operation with results pending"
<bnagy> *shrug*
Al_ has joined #ruby
<bnagy> I hate 2/3 of those things and don't know what the other one is
<sevenseacat> only tds i know is freetds and i hate that with the fire of a thousand suns
<wiiw> I was from vb.net to ruby
pskosinski has joined #ruby
pyrac has joined #ruby
Xeago has joined #ruby
<sdegutis> is there a version of IO#gets that doesn't timeout?
<sdegutis> or maybe some other method that lets me read until a given delimiter
<bnagy> sdegutis: you can use Socket methods, there's non blocking stuff in there
<bnagy> or just read(1)
<bnagy> :P
<Xeago> sdegutis: I'd say it depends on your mode of operation
<Xeago> depending on the flexibility you require, you might have to read per character
<sdegutis> ive been using #gets because i just want to consume all data until i see a newline
hamakn_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
v0n has quit [Read error: Operation timed out]
end_guy has quit [Ping timeout: 240 seconds]
jmimi has joined #ruby
hamakn has joined #ruby
jorge has joined #ruby
<sdegutis> thanks
limon7 has quit [Remote host closed the connection]
marr has joined #ruby
bradhe has joined #ruby
<keyvan> hey guys ive created a language agnostic CI server thingy, to support bountysource and OSS ive made a $35 bounty: https://www.bountysource.com/issues/671929-retest-button-needs-to-work-smarter
`Chris` has quit [Remote host closed the connection]
keyvan is now known as lovclrtxt
i_s has joined #ruby
jorge has quit [Ping timeout: 246 seconds]
colonolGron has joined #ruby
jds_ has quit [Ping timeout: 245 seconds]
d34th4ck3r has joined #ruby
limon7 has joined #ruby
end_guy has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
shaunbaker has joined #ruby
shaunbak_ has joined #ruby
dormiens has quit [Read error: Operation timed out]
bradhe has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
aganov has joined #ruby
kreisys has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
<canton7> lovclrtxt, that's a very vague bounty...
<lovclrtxt> canton7: i'm trying to get better at PM'ing... i thought it was pretty specific
i_s has quit [Ping timeout: 248 seconds]
<sdegutis> welp,
<lovclrtxt> i'm definitely not great at coming up with coherent issues for other developers yet
shaunbaker has quit [Ping timeout: 264 seconds]
<sdegutis> here's my 72-line solution, without using eventmachine or celluloid or noi4r... https://gist.github.com/sdegutis/6129539
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
codesoda has joined #ruby
<bnagy> sdegutis: so, what I think is wrong...
<sdegutis> :)
goleldar has quit [Ping timeout: 264 seconds]
<bnagy> why bother having queues by id if request blocks?
<Nilium> bounty $35 what
<sdegutis> bnagy: because of callbacks
<bnagy> you may as well just send and then pop a single recv queue?
<sdegutis> line 27
<Nilium> Is that all code is worth now? $35? O_o
<bnagy> sdegutis: yeah but that's just racy, no?
<sdegutis> bnagy: if i dont have this, it creates a race condition, yes
<sdegutis> this solution avoids race conditions
<bnagy> oic, if you use one or the other
noname001 has joined #ruby
Domon has quit [Remote host closed the connection]
browndawg has joined #ruby
<bnagy> I think you could simplify it a lot more :)
<sdegutis> really?
<sdegutis> which parts?
<bnagy> well really you have a sync_send and an async_send
<sdegutis> yeah
<bnagy> you only need one queue for each of those
<bnagy> and they can persist
<sdegutis> not exactly true
<sdegutis> a callback might trigger some sync sends, which would mean more race conditions
<bnagy> no, it wouldn't
dmiller has joined #ruby
<bnagy> you could actually run it all of one queue
<sdegutis> bnagy: if two different callbacks get triggered at the same time, they both might try to make a send at the same time. so they might receive responses in a different order, right?
<sdegutis> hmm
<sdegutis> bnagy: then i dont get the free hash/pop combined behavior
<bnagy> and just have a sync method that blocks on a callback, but look whatever
<sdegutis> hmm
<bnagy> well the hash was supposed to be id => callback
<bnagy> not queue => callback
<bnagy> the queue is just a pipe
<sdegutis> that only works for callbacks, not sync-responses
fixl has joined #ruby
TMM has quit [Remote host closed the connection]
<bnagy> well a sync response can effectively just wait on its own callback :)
<bnagy> but two queues would be clearer
TMM has joined #ruby
timonv has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 240 seconds]
<sdegutis> hmm
Alina-malina has quit [Read error: Connection reset by peer]
stayarrr has quit [Quit: Leaving...]
Alina-malina has joined #ruby
codesoda has quit [Remote host closed the connection]
Speed has joined #ruby
<sdegutis> bnagy: i think i found an example: (1) client makes request to server for an immediate response, (2) server sends callback triggered by something else, (3) server sends response to client's request
<sdegutis> bnagy: i dont see how that doesnt break the sync-queue idea you're talking about
lkba has quit [Ping timeout: 246 seconds]
<bnagy> sync send would just wait on a sync queue
<bnagy> recv_handler can just pop incoming messages, look up ids in a callback table, fire the callback, or if there's none drop it to sync queue
mneorr has joined #ruby
<bnagy> off the top of my head
_bart has joined #ruby
<sdegutis> oh i see, so this line would switch off on the kind of response ('async-callback' or 'sync-response') and push into a different queue depending: https://gist.github.com/sdegutis/6129539#file-gistfile1-rb-L51
<bnagy> yeah something like that
<sdegutis> im not 100% sure thats safe yet, and its 4am, so im not in the right mind to make a decision to go with it just yet
<sdegutis> but i like the idea
<sdegutis> thx
Domon has joined #ruby
<bnagy> if this is a client, you could just use a whole different socket for sync
<bnagy> that would also be clean
<sdegutis> hmmm
stonevil has joined #ruby
<sdegutis> interesting
<bnagy> cleaner, actually, now that I think about it
<bnagy> buuut it is time to drink beer
<sdegutis> if you say so
<sdegutis> re: beer
utdemir has quit [Remote host closed the connection]
vikhyat has quit [Remote host closed the connection]
nomenkun has joined #ruby
<sevenseacat> not for 11 more minutes. dont get ahead of yourself.
sdegutis has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
lovclrtxt is now known as keyvan
<bnagy> 1821 local
rickmasta has quit [Quit: Leaving...]
<bnagy> screw you :)
nari has quit [Ping timeout: 245 seconds]
blaxter_ is now known as blaxter
<bnagy> although to be honest 'more beer' would have been more accurate
<sevenseacat> south australia? what else is +9.5?
<bnagy> probably something, but in this case, SA
bjeanes has quit [Ping timeout: 260 seconds]
<sevenseacat> nice.
<bnagy> no :(
<sevenseacat> yeah i wouldnt want to live there either.
<keyvan> Nilium: heh, yeah, seems chumpy, i'm starting to regret it.
<keyvan> getting bad responses from people i shared it with here and #rubyonrails too
<Nilium> I think it's more that it's like a weird token amount that is of no actual value
arya_ has quit [Ping timeout: 241 seconds]
<keyvan> like this : http://pastebin.com/53hs1EvW
<sevenseacat> i'm right here, you know.
<keyvan> yeah i just picked osmething that wasn't too much
<keyvan> sevenseacat: ya ur a ruby developer
<keyvan> i just like the idea behind bountysource and wonder how to drive kids (not experts at $200/hr like you guys) towards working on easy projects... but clearly kids dont hang around these parts looking for opportunities ... but thats what i was envisoining i think
<Nilium> I'm not an expert and I hate the title.
<keyvan> to work on CI servers lol
<Nilium> I'm an unemployed hobbyist programmer with an English degree who open sources everything he does.
<sevenseacat> i'm no expert either
<Nilium> The problem is that $35 is not an opportunity, it's less than minimum wage considering the work you're asking.
LiquidInsect has quit [Ping timeout: 268 seconds]
bal has joined #ruby
<keyvan> well i have to compare it against my own salary. i could probably do a pretty good job in an hour. i make about $35 an hour, so $35 seemed cool
<Nilium> So don't try to act like you're above people by saying you're putting an opportunity out there -- you're not. You're basically just asking someone to do a difficult job for the cost of mowing your lawn for a couple days.
<sevenseacat> if its an open source project, either people a) WANT to work on it or b) are getting paid nicely to work on it
bricker`LA has joined #ruby
<bnagy> and also this is a programming channel not #hireamexican
<Nilium> Just be frank, say "hey, I've got $35 to put down on something I'm interested in seeing fixed if anyone's up for it" and don't be a prat like you just were.
timonv has joined #ruby
<bnagy> there are places for exploiting low-wage programmers, go there
<keyvan> Nilium: it's not difficult. chill out and fuck you very much in the process you unappreciative cunt leech
<keyvan> eerr
<keyvan> sorry
<keyvan> that was rude
<keyvan> i apologize
<sevenseacat> yeah it kinda was
BizarreCake has joined #ruby
* Nilium puts "unappreciative cunt leech" in the book for future use
mansi has joined #ruby
jbpros has joined #ruby
wiiw has quit [Quit: Lost terminal]
<Nilium> keyvan: So are you the sort that has to say "Now I'm not racist, but" a lot?
<sevenseacat> anyways its now my beer time. hooray.
predator117 has quit [Ping timeout: 245 seconds]
<Nilium> No beer time for another 15-ish hours for me.
<keyvan> Nilium: no, i try to stay away from negative stuff; but still be truthful. when i cross the line it's because i feel hurt personally. if you're not hurting myself or others i'm fine with you kinda guy
<Nilium> And then the microbrew tasting begins!
<keyvan> i should be asleep but whatever.
sdegutis has joined #ruby
sevenseacat has left #ruby [#ruby]
<Nilium> keyvan: Well, for what it's worth, I wasn't trying to insult you, I was trying to tell you to not act high and mighty because of $35.
<Nilium> Because you totally did that.
blackmesa has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
<keyvan> well thanks for pointing out to me that i was being egotistical in my speech. if you are specific about what parts, and can look past the verbal injuries i attempted, all is well
krainbol_ has joined #ruby
<sdegutis> is there a built-in way to traverse an "object tree", regardless of whether its an array, hash, object, string, whatever?
blackmesa has joined #ruby
<bnagy> no
<sdegutis> aw
niceguyjames has joined #ruby
<sdegutis> ok, special-casing it is then
<bnagy> you could write a recursive each possibly
rezzack has joined #ruby
<Nilium> You could probably do something horrible by checking if something responds to each and then if it doesn't by traversing its ivars.
<bnagy> but ruby has a kind of small stack by default so be careful with DFS recursion
gyre007 has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
kreantos has quit [Remote host closed the connection]
<bnagy> right beer
krainboltgreene has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 240 seconds]
gyre007 has quit [Remote host closed the connection]
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 276 seconds]
crazymykl has quit [Read error: Operation timed out]
limon7 has quit [Remote host closed the connection]
limon7 has joined #ruby
<keyvan> Nilium: that was an amazing statement -- i feelso much more worse about the bad things i said publicly here at you. so rude and unacceptable for a 24 year old. what a child i acted . and yes this $35 thing is silly. there's definitely better ways to get the right word out to the right people. thank you
<jlebrech> what am I doing wrong with oauth? http://i.imgur.com/ky944Kk.png
<Nilium> Well at least you're the same age as me.
rdark has joined #ruby
<keyvan> heh
<Nilium> Also, forgive and forget and all that junk.
crazymykl has joined #ruby
<Nilium> You don't know me, I don't know you, no point getting bent out of shape one way or the other.
d34th4ck3r has quit [Quit: d34th4ck3r]
<keyvan> :) so im gonna solve my own issue probably and just take the 35 bucks myself. carrot and the stick, saving through code rewards to my own open source projects.
<keyvan> should be fun
MrZYX|off is now known as MrZYX
d34th4ck3r has joined #ruby
<keyvan> yeah its all good. goodnight
invsblduck is now known as invsblzzz
shaunbak_ has quit [Remote host closed the connection]
Fisix_AIX has joined #ruby
d34th4ck3r has quit [Client Quit]
fridim__ has quit [Read error: Operation timed out]
jorge has joined #ruby
hanmac has quit [Quit: Leaving.]
stayarrr has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
d34th4ck3r has joined #ruby
emergion has joined #ruby
hanmac has joined #ruby
Bry8Star{T2 has joined #ruby
jorge has quit [Ping timeout: 240 seconds]
TIJ has joined #ruby
grzywacz has joined #ruby
grzywacz has joined #ruby
pyrac has quit [Quit: pyrac]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
_bart has quit [Remote host closed the connection]
i_s has joined #ruby
pskosinski has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
cascalheira has joined #ruby
vlad_starkov has joined #ruby
pyrac has joined #ruby
grh has joined #ruby
rezzack1 has joined #ruby
shaunbaker has joined #ruby
tonini has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
rezzack has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
<sdegutis> what kind of metaprogramming would you use to simplify defining a bunch of methods like this?
<sdegutis> def foo_bar(*args); do_something('foo_bar', *args); end
<sdegutis> the only thing known about it is its name, but all args get passed along exactly as-is
<sdegutis> and not method_missing, since that doesnt play nicely with #method
Domon has quit [Remote host closed the connection]
<sdegutis> oh yes, define_instance_method i think
<hanmac> sdegutis: if you want to work method_missing with method you need respond_to_missing?
Domon has joined #ruby
<sdegutis> ok
<sdegutis> thx
denver has joined #ruby
bluOxigen has quit [Remote host closed the connection]
Zai00 has joined #ruby
bluOxigen has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
yannick__ has left #ruby [#ruby]
[narcan] has joined #ruby
krainbol_ has quit [Ping timeout: 240 seconds]
popl has quit [Ping timeout: 264 seconds]
xcv has joined #ruby
graydot has quit [Quit: graydot]
Alina-malina has quit [Quit: Leaving]
<sdegutis> hanmac: do you prefer that over define_method ?
Alina-malina has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
jds_ has joined #ruby
<hanmac> sdegutis: it depends, if it needs to be very dynamic (there old methods can disapear) it may better
mklappstuhl has joined #ruby
<sdegutis> in this case its very static
<sdegutis> im porting a stable TCP api to Ruby classes
<sdegutis> so its known well-ahead of time
TIJ has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
jds_ has quit [Ping timeout: 240 seconds]
graydot has joined #ruby
vlad_starkov has joined #ruby
vlad_sta_ has joined #ruby
grh has quit [Ping timeout: 240 seconds]
jbpros has quit [Quit: jbpros]
akam-it has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
realDAB has joined #ruby
realDAB has quit [Client Quit]
realDAB has joined #ruby
vlad_sta_ has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
Spooner has joined #ruby
<sdegutis> what's that trick people have been doing, to define class methods outside of a class and include it with them or extend it with them or something?
<Nilium> Eh?
<ccooke> sdegutis: do you mean modules?
<Nilium> You mean jamming them in a module and then extending the class with said module?
<sdegutis> ah yes. they define a ClassMethods module, and extend the class with that
d34th4ck3r has quit [Quit: d34th4ck3r]
<sdegutis> ive seen that a lot
<sdegutis> whats the benefit of it?
ayonix_ is now known as ayonix
<Nilium> I only use it for metaprogramming things.
<Nilium> Otherwise, I think it's silly.
<ccooke> sdegutis: Well, it allows you to make class method modules. Which is quite useful, if you need it.
<ccooke> really, if you can't think of a need for it, don't use it :-)
avril14th has joined #ruby
cads has quit [Quit: Leaving]
billy_ran_away has quit [Ping timeout: 245 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
rickmasta has joined #ruby
pyrac has quit [Quit: pyrac]
d34th4ck3r has joined #ruby
BRMatt has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
arya_ has joined #ruby
tommyvyo has quit [Quit:]
_bart has joined #ruby
graydot has quit [Quit: graydot]
<sdegutis> th
<sdegutis> x
d34th4ck3r has quit [Client Quit]
TIJ has joined #ruby
PsiCat has joined #ruby
ephemerian has quit [Ping timeout: 276 seconds]
d34th4ck3r has joined #ruby
<bricker`LA> When using the %r syntax for declaring a regular expression, how do you pass flags like i or g to it?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Nilium> %r{...}ig ← Like that?
<hoelzro> >> puts(%r{ABC}i)
<eval-in> hoelzro => (?i-mx:ABC) ... (https://eval.in/40100)
<hoelzro> apparently that works fine
graydot has joined #ruby
mikecmpbll has joined #ruby
<bricker`LA> cool!
<Veejay> Is there a ruby method that given an array with duplicates produces a Hash where the keys are the elements and the values are the number of occurrences for each element?
<Veejay> I can easily achive that with {}.tap {|h| something on the array} but I was wondering
<ccooke> Veejay: each_with_object({}) and a relevant block? ;-)
<Veejay> Or even reduce
<Veejay> OK so it's up to me, thanks
<mikecmpbll> so yeah, I've got a strange problem with evaluation contexts etc and it's blowing my mind at the moment: https://gist.github.com/mikecmpbll/561fcaa197f46d1ae703
asterite has joined #ruby
LiquidInsect has joined #ruby
<heftig> >> [1,1,4,1,2,3,2].each_with_object(Hash.new(0)) { |x,h| h[x] += 1 }
<eval-in> heftig => {1=>3, 4=>1, 2=>2, 3=>1} (https://eval.in/40101)
<mikecmpbll> i want to store some code and then evaluate that code in a method, and have it access the local variables to that method.
arya__ has joined #ruby
marr has quit [Ping timeout: 240 seconds]
yacks has joined #ruby
rickmasta has quit [Quit: Leaving...]
mosheee has quit [Ping timeout: 245 seconds]
<heftig> mikecmpbll: variables are bound lexically
mercwithamouth has joined #ruby
<heftig> that means the "x" up there is actually a method call on self
jorge has joined #ruby
<mikecmpbll> heftig: yeah, i fully understand why my example doesn't work, and it makes perfect sense
<mikecmpbll> heftig: but I don't know how to get around it
<heftig> use @x
asterite1 has joined #ruby
guiocavalcanti has joined #ruby
<heftig> or make x a parameter of the lambda
arya_ has quit [Ping timeout: 245 seconds]
<mikecmpbll> heftig: ah, now we're talking, hold on.
asterite has quit [Ping timeout: 246 seconds]
hellome has quit [Ping timeout: 264 seconds]
arya__ has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
asterite1 has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: d34th4ck3r]
jorge has quit [Ping timeout: 264 seconds]
camilasan has quit [Remote host closed the connection]
billy_ran_away has joined #ruby
camilasan has joined #ruby
<sdegutis> why is it that i dont see my no-method errors until after i interrupt thread.join?
stayarrr has quit [Quit: Leaving...]
mosheee has joined #ruby
_bart has quit [Remote host closed the connection]
LiquidInsect has quit [Ping timeout: 240 seconds]
camilasan has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
jb41 has joined #ruby
braincrash has joined #ruby
lkba has joined #ruby
joonty_ has joined #ruby
poga has joined #ruby
joonty has quit [Ping timeout: 268 seconds]
arya_ has quit []
braincra- has quit [Ping timeout: 256 seconds]
cads has joined #ruby
rezzack1 has quit [Quit: Leaving.]
cads has quit [Read error: Connection reset by peer]
rezzack has joined #ruby
sdegutis has quit [Remote host closed the connection]
axeman- has quit [Read error: Connection reset by peer]
LiquidInsect has joined #ruby
cads has joined #ruby
bricker`LA has quit [Quit: leaving]
dmiller has joined #ruby
axeman- has joined #ruby
camilasan has joined #ruby
bjeanes has joined #ruby
camilasan has quit [Remote host closed the connection]
Fisix_AIX has quit [Quit: Leaving]
pyrac has joined #ruby
tvw has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 246 seconds]
amarraja has joined #ruby
jbpros has joined #ruby
xcv has joined #ruby
gimir3h has joined #ruby
Fisix_AIX has joined #ruby
<Fisix_AIX> Hello, If I am using a gem and it has its own methods what are the name of these methods?
Domon has quit [Remote host closed the connection]
comrade has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
comrade has quit [Client Quit]
grzywacz has quit [Ping timeout: 248 seconds]
cj3kim has quit [Remote host closed the connection]
thepumpkin has joined #ruby
nari has joined #ruby
<MrZYX> there's no generic answer to that, run gem server
browndawg has quit [Ping timeout: 276 seconds]
emergion has joined #ruby
<Fisix_AIX> ok, let me be more specific, I am using a gem and I have a class instance and I would like to know what methods are available specific to that instance excluding generic methods?
<MrZYX> read the gems docs
threesome has quit [Ping timeout: 264 seconds]
<hoelzro> or inspect the object
<Fisix_AIX> So there is no method that will display that?
<hoelzro> sure there is
mansi has joined #ruby
<MrZYX> you can use .methods-Object.new.methods for that, or use pry but the easiest way is rtfm
<Fisix_AIX> Thanks guys
jbpros has quit [Quit: jbpros]
hanmac has quit [Quit: Leaving.]
pskosinski has joined #ruby
camilasan has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
bal has quit [Quit: Leaving]
joonty_ has quit [Quit: WeeChat 0.4.1]
hanmac has joined #ruby
joonty has joined #ruby
threesome has joined #ruby
gimir3h has left #ruby ["Leaving"]
lkba has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
yshh has quit [Remote host closed the connection]
_bart has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
grzywacz has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
fixl has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
krandi has joined #ruby
_bart_ has joined #ruby
andikr has quit [Ping timeout: 240 seconds]
_bart has quit [Read error: No route to host]
guiocavalcanti has joined #ruby
jorge has joined #ruby
pskosinski has joined #ruby
pskosinski has quit [Remote host closed the connection]
marr has joined #ruby
pyrac has quit [Quit: pyrac]
ryannielson has joined #ruby
jmimi has quit [Quit: Leaving.]
Ciscoridze has quit [Quit: WeeChat 0.4.1]
Ciscoridze has joined #ruby
jorge has quit [Ping timeout: 245 seconds]
Ciscoridze has quit [Client Quit]
xeqtr has joined #ruby
<xeqtr> Hi, Any suggestions on how i write this in a better way please? http://pastie.org/8196419
tobstarr has joined #ruby
tobyo has quit [Ping timeout: 240 seconds]
graydot has quit [Quit: graydot]
zoee has quit [Quit: zoee]
pranny has quit [Quit: Leaving.]
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
carlyle has quit [Read error: Connection reset by peer]
tacos1de has joined #ruby
carlyle has joined #ruby
cj3kim has joined #ruby
shaunbaker has quit [Ping timeout: 248 seconds]
akam-it has quit [Quit: Leaving]
axeman- has quit [Read error: Connection reset by peer]
billy_ran_away has quit [Ping timeout: 264 seconds]
AndChat| has quit [Ping timeout: 245 seconds]
axeman- has joined #ruby
joonty has quit [Quit: WeeChat 0.4.1]
joonty has joined #ruby
cj3kim has quit [Ping timeout: 260 seconds]
jbpros has joined #ruby
dmiller has joined #ruby
krandi has quit [Ping timeout: 248 seconds]
<canton7> xeqtr, different approach: something like t[/^\["(.*)"\]$/, 1].gsub(' ', '_') ?
guiocavalcanti has quit [Remote host closed the connection]
<xeqtr> canton7, thank you
<canton7> or you could t.gsub(/[\[\]"]/, '').gsub(' ', '_')
realDAB has quit [Quit: realDAB]
<xeqtr> Also: I'm trying to list all the tables of a database
<xeqtr> with res = db.query("show tables")
guiocavalcanti has joined #ruby
<xeqtr> but how do i actually get the results into a variable as an array?
<canton7> or t.tr('[]"', '').gsub(' ', '_')
andikr has joined #ruby
<canton7> what library are you using?
<xeqtr> ordinary mysql
mklappstuhl has quit [Remote host closed the connection]
<canton7> so the mysql gem?
billy_ran_away has joined #ruby
shaunbaker has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
<xeqtr> yeah
<xeqtr> just require 'mysql'
jonathanwallace has joined #ruby
manutter has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
MrZYX is now known as MrZYX|off
<canton7> xeqtr, hmm it's been too long since I've used it to remember. Pastie the outputs of 'p res' and 'p res.methods'
emergion has quit [Quit: Computer has gone to sleep.]
pygospa has quit [Quit: Finally trying to switch from screen to tmux]
jds_ has joined #ruby
yfeldblum has joined #ruby
pranny has joined #ruby
[narcan] has joined #ruby
pranny has quit [Client Quit]
cyong has joined #ruby
mansi has joined #ruby
dagen has quit []
shaunbak_ has joined #ruby
jds_ has quit [Ping timeout: 245 seconds]
flou has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
pyrac has joined #ruby
cads has quit [Quit: Leaving]
cyong has quit [Client Quit]
pjeide has quit []
shaunbaker has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby
amarraja has quit [Quit: Computer has gone to sleep.]
mansi has quit [Remote host closed the connection]
browndawg has joined #ruby
mansi has joined #ruby
pipework has quit [Remote host closed the connection]
blaxter has quit [Quit: foo]
cads has joined #ruby
amarraja has joined #ruby
amarraja has quit [Max SendQ exceeded]
fmcgeough has joined #ruby
limon has joined #ruby
limon is now known as Guest48964
browndawg1 has joined #ruby
senayar_ has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
cumin has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
colonolGron has quit [Remote host closed the connection]
cumin has quit [Quit: leaving]
senayar_ has quit [Remote host closed the connection]
senayar has quit [Read error: Connection reset by peer]
limon7 has quit [Ping timeout: 240 seconds]
andikr has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
browndawg has quit [Ping timeout: 276 seconds]
sayan has joined #ruby
ldnunes has joined #ruby
intuxicated has joined #ruby
mneorr has quit [Remote host closed the connection]
eka has joined #ruby
count has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mercwithamouth has quit [Ping timeout: 245 seconds]
mark_locklear has joined #ruby
RubNoob has joined #ruby
vlad_starkov has joined #ruby
emergion has joined #ruby
eaWPq4nU is now known as LucidDreamZzZzZ
Guest48964 has quit [Quit: Konversation terminated!]
manutter has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
xavier23 has quit [Quit: xavier23]
awarner has quit [Ping timeout: 240 seconds]
jorge has joined #ruby
rickruby has quit [Remote host closed the connection]
ryannielson has left #ruby [#ruby]
browndawg1 has quit [Ping timeout: 276 seconds]
osvico has quit [Ping timeout: 248 seconds]
sailias has quit [Ping timeout: 240 seconds]
<count> hmm. http://gems.rubyforge.org is broken (via 204.232.149.25), any body can confirm?
dhruvasagar has quit [Ping timeout: 246 seconds]
<count> where / how / to whom do I report this, or where can I verify it as known?
jorge has quit [Ping timeout: 245 seconds]
xcv has quit [Remote host closed the connection]
yshh has joined #ruby
mikecmpbll has joined #ruby
avril14th has quit [Remote host closed the connection]
<mikecmpbll> is there any practical difference between accessing an instance variable using @var or var (if you have attr_reader :var defined)
breakingthings has joined #ruby
avril14th has joined #ruby
<hoelzro> mikecmpbll: the latter has slight overhead
<hoelzro> but that can probably be optimized away
<mikecmpbll> hoelzro: funny, I see the latter quite a lot that's the only reason I asked.
<hoelzro> and it's a better idea to encapsulate ivars as much as you can
MrZYX|off is now known as MrZYX
kfunk has quit [Quit: No Ping reply in 180 seconds.]
<hoelzro> I personally prefer var over @var
<hoelzro> unless performance *really* becomes a concern
<hoelzro> and honestly, in that case, I'd just write the hot section in C
<mikecmpbll> fair enough, i felt it introduced an extra level of confusion personally
Nahra has quit [Ping timeout: 264 seconds]
<waxjar> it's easier to refactor if you use the method i've heard
<hoelzro> exactly
shaunbaker has joined #ruby
<shevy> mikecmpbll I prefer to use @var inside the class when I need it again
enebo has joined #ruby
anonymuse has joined #ruby
yshh has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Remote host closed the connection]
<mikecmpbll> waxjar: what's the idea behind that?
<mikecmpbll> you could do def var; @new_var; end or something?
<waxjar> yea, i guess
<shevy> I guess because small methods are much easier to change
<mikecmpbll> meh
<waxjar> i prefer to use the ivar too, self.ivar = looks so dumb :P
<shevy> yeah, I loathe the "self." part there
<shevy> reminds me of python
kfunk has joined #ruby
enebo has quit [Client Quit]
henn has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
trepidaciousMBR has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
realDAB has joined #ruby
cj3kim has joined #ruby
Nahra has joined #ruby
_maes_ has joined #ruby
cody-- has joined #ruby
zoee has joined #ruby
jonathanwallace has joined #ruby
dmiller has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
cads has quit [Quit: Leaving]
<count> hmm. http://gems.rubyforge.org is broken (via 204.232.149.25), any body can confirm?
<shevy> count seems so, at least I get no response
cj3kim has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
<shevy> anyone of you guys doing ruby + ncurses ?
<count> where / how / to whom do I report this, or where can I verify it as known?
b0oh has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
cads has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
<count> shevy: cheers.
limon7 has joined #ruby
<count> shevy: ncurses is a bitc^Wfemale dog, but haven't used it with ruby. maybe have a look at termbox
kpshek has joined #ruby
davehimself has joined #ruby
dEPy has joined #ruby
b0oh has quit [Client Quit]
axeman- has quit [Ping timeout: 246 seconds]
ArchBeOS has quit [Ping timeout: 245 seconds]
axeman- has joined #ruby
krz has quit [Quit: krz]
_tockitj has joined #ruby
johnkary has joined #ruby
<_tockitj> can someone recommend good ruby gallery software?
<_tockitj> preferably opensource (:
cjs226 has quit [Read error: Operation timed out]
nezumi has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
coder_neo has joined #ruby
mklappstuhl has joined #ruby
freeayu has quit [Remote host closed the connection]
kevinykchan has quit [Ping timeout: 240 seconds]
<hanmac> _tockitj, like for a website? with rails?
noyb has quit [Ping timeout: 276 seconds]
<_tockitj> hanmac, anything
vlad_starkov has quit [Remote host closed the connection]
<_tockitj> just to upload and preview/select photos
<_tockitj> way to organize them in albums (maybe auto-resize on upload) - and that is it
khismetix has joined #ruby
poga has quit [Remote host closed the connection]
shaunbak_ has joined #ruby
<hanmac> if you want to do it with an server you may need a website for that … i could image it with an RestClient/System Application but this would be more complicated
poga has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
<hanmac> _tockitj you can try to ask at #rubyonrails … they may have more infomaition about "gallery software"
cody-- has quit [Quit: Computer has gone to sleep.]
<_tockitj> yes - I was thinking about a webapp
vlad_starkov has joined #ruby
_bart_ is now known as _bart
kevinykchan has joined #ruby
pskosinski has joined #ruby
OODavo has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
<OODavo> Sudden random feature suggestion out of nowhere: Object#extend should be able to take a block, which will be treated as though it were passed into Module.new before being passed to Object#extend.
<count> go file a ticket
jerius has joined #ruby
<hanmac> OODavo, it makes a difference when you use anonymous Modules or "Named" ones
tj_ has joined #ruby
<lupine> OODavo, you can write a gem that permits that ;)
<tj_> hi
tobyo has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
<OODavo> hanmac: I'm frankly not too sure of how named versus anonymous modules actually work. Mind elaborating, or should I just go look that up?
tomzx_mac has joined #ruby
axeman- has joined #ruby
kevinykchan has quit [Ping timeout: 248 seconds]
<hanmac> >> Marshal.dump(Object.new.extend(Enumerable))
<eval-in> Hanmac => "\x04\be:\x0FEnumerableo:\vObject\0" (https://eval.in/40103)
dEPy has quit [Read error: Connection reset by peer]
<hanmac> >> Marshal.dump(Object.new.extend(Module.new))
<eval-in> Hanmac => can't dump anonymous class #<Module:0x4185d1f8> (TypeError) ... (https://eval.in/40104)
sambao21 has joined #ruby
<OODavo> That sounds… like a problem, really. Why can't anonymous modules be marshalled?
devoldmx has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
postmodern has quit [Quit: Leaving]
flou has quit [Ping timeout: 240 seconds]
grzywacz has quit [Quit: :wq]
grzywacz_ has joined #ruby
geekbri has joined #ruby
gyre007 has quit [Ping timeout: 240 seconds]
`Chris` has joined #ruby
johnkary has quit [Quit: @johnkary]
dmiller has joined #ruby
<hanmac> because for modules and classes they only store the name, and Anon Modules does not have a name
DeanH has joined #ruby
ewnd9 has joined #ruby
jp- has joined #ruby
mywebcompute has joined #ruby
thisirs has joined #ruby
kevinykchan has joined #ruby
mansi has joined #ruby
jlast has joined #ruby
grzywacz_ is now known as grzywacz
mansi has quit [Remote host closed the connection]
grzywacz has quit [Changing host]
grzywacz has joined #ruby
mansi has joined #ruby
caveat- has quit [Ping timeout: 256 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
<OODavo> That also seems rather problematic. Module and class names don't stick around forever.
camilasan has quit [Remote host closed the connection]
elux has joined #ruby
browndawg1 has joined #ruby
interactionjaxsn has joined #ruby
scarolan has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
caveat- has joined #ruby
pipework has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
brbcoding has joined #ruby
kevinykchan has joined #ruby
browndawg has joined #ruby
limon7 has quit [Quit: Konversation terminated!]
browndawg1 has quit [Ping timeout: 240 seconds]
Appineer has joined #ruby
claymore has joined #ruby
Appineer has left #ruby [#ruby]
ravster has joined #ruby
<claymore> is there a linear array search method which returns the first element in the array that is found, rather than the index of that element?
v0n has joined #ruby
<claymore> for example, [1,5,9].index{|x| x==5} returns 1, but I want something that returns [1,5,9][1]
gyre007 has joined #ruby
jorge has joined #ruby
<hanmac> claymore, #find ?
<claymore> ah, thanks
axeman- has quit [Ping timeout: 248 seconds]
afd__ has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
<hanmac> you can also do [1,5,9].find.with_index {|o,i| i == 1 }
xcv has joined #ruby
jorge has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
io_syl has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
gyre007 has quit [Ping timeout: 240 seconds]
mklappstuhl has joined #ruby
Poloniy has quit [Read error: Connection reset by peer]
dmiller has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
atyz has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
chihhsin has quit [Quit: leaving]
OODavo has left #ruby [#ruby]
fredjean has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
niko__ has joined #ruby
niko__ has quit [Client Quit]
wmoxam has joined #ruby
chihhsin has joined #ruby
Kruppe has joined #ruby
andikr has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
chihhsin has quit [Client Quit]
asobrasil has joined #ruby
chihhsin has joined #ruby
Fisix_AIX has quit [Quit: Leaving]
peregrine81 has joined #ruby
jbpros has quit [Quit: jbpros]
flou has joined #ruby
sailias has joined #ruby
nari has quit [Ping timeout: 240 seconds]
gokul has quit [Quit: Leaving]
dmiller has joined #ruby
<shevy> #<Multimedia:0x000000015e0cf8
<shevy> in a display like this
<shevy> what is the 0x000000015e0cf8 part called or from where does it come?
claymore has quit [Ping timeout: 264 seconds]
<kaspergrubbe> shevy: Some internal representation. Probably the memory address or something like that
yacks has quit [Quit: Leaving]
gazarsgo has joined #ruby
tobstarr has left #ruby [#ruby]
sailias1 has joined #ruby
alx- has joined #ruby
mywebcompute has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 276 seconds]
aef has joined #ruby
ehc has joined #ruby
waj has joined #ruby
dmiller has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 240 seconds]
addr_a has joined #ruby
<addr_a> hi
<kaspergrubbe> addr_a: hello
khismetix has quit [Quit: Computer has gone to sleep.]
<addr_a> how can I get unicode strings from a binary data. With unpack('H*') I get the string data but need unicode. Thanks
anay has quit [Remote host closed the connection]
<kaspergrubbe> shevy: http://ruby-doc.org/core-2.0/Object.html#method-i-to_s press "click to toggle source" to see the implementation of what you are seeing
pentameter has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afd__ has joined #ruby
chjunior has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
xavier23 has joined #ruby
ExxKA has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
xeqtr has quit [Quit: Lämnar]
Mattix has joined #ruby
intuxicated has quit [Quit: Leaving]
ArchBeOS has joined #ruby
mywebcompute has joined #ruby
splittingred has joined #ruby
io_syl has quit [Quit: io_syl]
guiocavalcanti has joined #ruby
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
corehook has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
mywebcompute has quit [Remote host closed the connection]
thesheff17 has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
thesheff17 has joined #ruby
<addr_a> I mean I have something like "200af40101000000000000004c4" how can I get the unicode valeu ?
gazarsgo has quit [Quit: gazarsgo]
grh has joined #ruby
grzywacz has left #ruby [":wq"]
sambao21 has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Quit: Til rivido Idisti!]
cjs226 has joined #ruby
gazarsgo has joined #ruby
<hanmac> addr_a: so is that an string and you want the codepoints of them? (like the codepoint of "2") or what ecaclty do you want?
zoee has quit [Quit: zoee]
<addr_a> hanmac: hi
stoffus has quit [Quit: Lost terminal]
kpshek has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<hanmac> addr_a: look at each_codepoint
<addr_a> the thing is I have binary data and that data represents strings in unicode format
sambao21 has joined #ruby
<addr_a> I want to get those string (in unicode)
<addr_a> so I have somthing like "\n\xF4\x01\x01\x00\x00\x00\" .....
tommyvyo has joined #ruby
blaxter_ has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
akells` has joined #ruby
tobyo has quit [Ping timeout: 245 seconds]
BillCriswell has joined #ruby
bklane has joined #ruby
hogeo has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
jimkeller has quit [Quit: Leaving]
jlast_ has joined #ruby
Kricir has joined #ruby
tylersmith has joined #ruby
khismetix has joined #ruby
tomzx_mac has quit [Ping timeout: 276 seconds]
mark_locklear has quit [Quit: Leaving]
gazarsgo_ has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
jlast has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
emergion has joined #ruby
LaPetiteFromage has joined #ruby
blaxter_ is now known as blaxter
MrZYX is now known as MrZYX|off
carlyle has joined #ruby
mywebcompute has joined #ruby
rodacato has joined #ruby
wallerdev has joined #ruby
gazarsgo has quit [Ping timeout: 276 seconds]
gazarsgo_ is now known as gazarsgo
<chasep_work> addr_a: is that the chorus to "deck the halls?" :-D
ffranz1 has joined #ruby
dmiller has joined #ruby
<shevy> yeah kaspergrubbe I see it now ... str = rb_sprintf("#<%"PRIsVALUE":%p>", cname, (void*)obj);
mary5030 has joined #ruby
<kaspergrubbe> I donø
mary5030 has quit [Remote host closed the connection]
<kaspergrubbe> don't understand that either, but the description above the code gave me some idea of what I was looking at ;)
mary5030 has joined #ruby
akells` has quit [Remote host closed the connection]
jlebrech has quit [Quit: Konversation terminated!]
cj3kim has joined #ruby
rhys has joined #ruby
baordog has joined #ruby
ramblex has joined #ruby
addr_a has quit [Ping timeout: 276 seconds]
dmiller has quit [Ping timeout: 248 seconds]
Speed has quit [Ping timeout: 240 seconds]
GeissT has quit [Quit: MillBroChat AdIRC User]
addr_a has joined #ruby
jorge_ has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
ehc has quit [Quit: ehc]
bluOxigen has quit [Ping timeout: 246 seconds]
tylersmith has quit [Remote host closed the connection]
sailias1 has quit [Ping timeout: 248 seconds]
devoldmx27 has joined #ruby
mywebcompute has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 276 seconds]
mywebcompute has joined #ruby
jlebrech has joined #ruby
sailias has joined #ruby
bradsmith has joined #ruby
jorge_ has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #ruby
`Chris` has quit [Ping timeout: 248 seconds]
asteve has joined #ruby
ehc has joined #ruby
jlast_ has quit [Remote host closed the connection]
asterite has joined #ruby
fantazo has joined #ruby
Kricir has quit [Remote host closed the connection]
jlast has joined #ruby
tagrudev has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
carlyle has quit [Ping timeout: 245 seconds]
krz has joined #ruby
asterite has quit [Read error: Connection reset by peer]
asterite has joined #ruby
jlast has joined #ruby
arya_ has joined #ruby
cody-- has joined #ruby
ghr has quit [Read error: Operation timed out]
wallerdev has quit [Quit: wallerdev]
cody-- has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
asterite has quit [Ping timeout: 245 seconds]
asterite has joined #ruby
vlad_starkov has joined #ruby
mupkoo has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
anay has joined #ruby
Cyrus_ has quit [Quit: Cyrus.sleep()]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
sailias1 has joined #ruby
noop has quit [Ping timeout: 240 seconds]
Davey has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
asterite has quit [Ping timeout: 240 seconds]
asterite1 has joined #ruby
guiocavalcanti has joined #ruby
anay has quit [Remote host closed the connection]
toddWork_ is now known as orolo
guiocavalcanti has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
yshh has joined #ruby
thepumpkin has quit [Remote host closed the connection]
pskosinski has joined #ruby
guiocavalcanti has joined #ruby
zachrab_ has joined #ruby
orolo is now known as todd_work
asterite1 has quit [Ping timeout: 246 seconds]
deepfried has joined #ruby
rodacato has quit [Remote host closed the connection]
`Chris` has joined #ruby
realDAB has joined #ruby
ghr has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
rodacato has joined #ruby
tacos1de has joined #ruby
DeanH has quit [Quit: Textual IRC Client: www.textualapp.com]
cj3kim has joined #ruby
carlyle has joined #ruby
yfeldblum has quit [Quit: Leaving]
cj3kim has quit [Read error: Connection reset by peer]
jefflyne has joined #ruby
kylebt has joined #ruby
devoldmx27 has quit [Read error: Connection reset by peer]
geggam has joined #ruby
<lectrick> Is it possible to remove_method off an instance of a class and not an entire class?
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<lectrick> Bonus question: Will this expire the method cache?
kobain has joined #ruby
devoldmx has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<realDAB> lectrick: i can get undef_method to work but not remove_method, at least in my little experiments so far
MrZYX|off is now known as MrZYX
<realDAB> lectrick: obj.singleton_class.class_eval { undef_method :x }
<realDAB> whoops
<realDAB> that face is supposed to be colon x
<realDAB> or whatever the method is called
shaunbak_ has quit [Remote host closed the connection]
addr_a has quit [Read error: Operation timed out]
tobyo has joined #ruby
atmosx has joined #ruby
<lectrick> if "e" is the object instance, I think I can do class << e; remove_method :methodname; end
tkuchiki has quit [Ping timeout: 245 seconds]
<realDAB> lectrick: i'm getting an error when i do that (and not the right error)
corehook has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<lectrick> realDAB: yeah that may work too
tommyvyo has quit [Quit:]
<lectrick> realDAB: yeah I just want to remove methods that are only defined on the class whose instance I have
alup has quit [Quit: Leaving]
marr has quit [Ping timeout: 264 seconds]
randomautomator has joined #ruby
brennanMKE has joined #ruby
arya_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
dawkirst has quit [Ping timeout: 256 seconds]
devoldmx has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
nitish has joined #ruby
nitish has quit [Changing host]
nitish has joined #ruby
akashj87 has joined #ruby
graydot has joined #ruby
randomautomator has quit [Remote host closed the connection]
anay has joined #ruby
randomautomator has joined #ruby
devoldmx has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
guiocavalcanti has quit [Remote host closed the connection]
nemesit|znc has quit [Read error: Connection reset by peer]
Eiam has joined #ruby
bklane has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
guiocavalcanti has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
asterite has joined #ruby
wallerdev has joined #ruby
randomautomator has quit [Ping timeout: 276 seconds]
devoldmx has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
LucidDreamZzZzZ has quit [Quit: Leaving]
poseid has quit [Quit: Leaving.]
mnewton has joined #ruby
LucidDreamZzZ has joined #ruby
alem0lars has joined #ruby
d2dchat has joined #ruby
Kricir has joined #ruby
deepfried has quit [Quit: deepfried]
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
_maes_ has joined #ruby
camilasan has joined #ruby
arya_ has joined #ruby
arya_ has quit [Client Quit]
emergion has joined #ruby
lethjakman has joined #ruby
dawkirst has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
devoldmx has quit [Read error: Connection reset by peer]
tk_ has quit [Quit: ばいばい]
camilasan has quit [Ping timeout: 264 seconds]
goleldar has joined #ruby
huoxito has joined #ruby
deepfried has joined #ruby
d2dchat has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 276 seconds]
coder_neo has quit [Ping timeout: 248 seconds]
<shevy> File.extname "movie.avi" # => ".avi"
pskosinski has quit [Quit: Til rivido Idisti!]
<shevy> are there better ways to determine the file type of a given file?
bklane has joined #ruby
<Xeago> shevy: filetype is a dubious thing
<Xeago> and extensions only imply a filetype
<mnewton> I want to make a script that installs a few packages in linux, how do i check if a user has sudo access?
<terrellt> We used a plugin for it...give me a minute and I'll find it. I wanna say it was filemagic?
kryl has joined #ruby
chjunior has joined #ruby
<kryl> hi, when I try to install a gem, how to install it in a default directory for the whole systeme and not only for the actual user ~/.gem ?
<terrellt> Yeah.
<terrellt> shevy: Check out ruby-filemagic
dhruvasagar has joined #ruby
cj3kim has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
i_s has joined #ruby
arya_ has joined #ruby
realDAB has quit [Quit: realDAB]
lethjakman has quit [Quit: WeeChat 0.4.0]
h4mz1d has joined #ruby
<shevy> terrellt ok going to check, thanks
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
vasilakisFiL has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
<shevy> mnewton in what file are the sudoers kept?
<vasilakisFiL> hey guys I installed jruby but it seems much slower.. have I done smth wrong ?
joonty has quit [Quit: WeeChat 0.4.1]
dhruvasagar has quit [Ping timeout: 240 seconds]
<shevy> mnemon, also check ENV['USER'] and the require 'etc' module, including Process.uid and Process.euid ... or .eid, I forgot the name, look at the docu
limon7 has joined #ruby
<Xeago> vasilakisFiL: how do you check it?
jb41 has quit [Quit: Lost terminal]
<terrellt> mnewton: Or look into puppet..
ananthakumaran has joined #ruby
ssvo has joined #ruby
alex__c2022 has joined #ruby
cr3 has joined #ruby
<cr3> msg nickserv identify __cr3 passworD
cr3 is now known as Guest86083
<vasilakisFiL> Xeago for instance some tests that would take 3sec with the default ruby implementation, now take about 1 minute
<terrellt> Ahem.
akells` has joined #ruby
<terrellt> Really, dude? A capital D was the best you had?
<shevy> hehe
momomomomo has joined #ruby
<shevy> I am even too lazy to come to remember my old password
<shevy> for IRC
<terrellt> vasilakisFiL: The JVM takes a -much- longer time to boot up, that's probably what you're seeing.
<shevy> that's why I am no longer on #ruby-lang either :(
Kricir has joined #ruby
* terrellt wanders away.
tabolario has joined #ruby
<vasilakisFiL> jruby is the only implementation that fully support concurrent threads?
pitzips has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
brain_shim has quit [Quit: Leaving]
pewpewpewp has joined #ruby
bklane has quit [Remote host closed the connection]
hellome has joined #ruby
pewpewpewp has quit [Client Quit]
<wmoxam> vasilakisFiL: Rubinius
momomomomo has quit [Client Quit]
akells` has quit [Ping timeout: 276 seconds]
<vasilakisFiL> ok uninstalling jruby then
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has quit [Remote host closed the connection]
alex__c2022 has quit [Remote host closed the connection]
hotovson has joined #ruby
alex__c2022 has joined #ruby
devoldmx has joined #ruby
camilasan has joined #ruby
sailias1 has quit [Ping timeout: 264 seconds]
<mjc_> rubinius is pretty good, too, and its devs are super nice and happy to help
<mjc_> rbx is also slower to boot up than plain ruby though
sailias has joined #ruby
hellome has quit [Remote host closed the connection]
endash has joined #ruby
khismetix has joined #ruby
marr has joined #ruby
hellome has joined #ruby
<mjc_> vasilakisFiL: I would suggest something like spring or zeus which pre-loads a copy of your app, neither supports jruby though AFAIK
<mjc_> for testing
devoldmx has quit [Read error: Connection reset by peer]
zachrab_ has quit [Remote host closed the connection]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
devoldmx has joined #ruby
Kruppe has quit [Remote host closed the connection]
* hanmac prefers MRI ruby, because of this cool bindings, but they mostly work on rbx too
guiocavalcanti has quit [Remote host closed the connection]
asteve has joined #ruby
Kricir has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
<vasilakisFiL> how comes and mri does not support yet true parallelism ? I mean it is impossible to add this feature or it is just a matter of time?
sayan has quit [Ping timeout: 240 seconds]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rippa has joined #ruby
<fryguy> vasilakisFiL: it's generally impossible because of existing ecosystem, and how ingrained the GIL is into the runtime
devoldmx has quit [Read error: Connection reset by peer]
hotovson has quit [Remote host closed the connection]
<mjc_> would be incredibly difficult to dump the GIL in MRI
<vasilakisFiL> aha
<fryguy> python has a similar problem
<fryguy> similar reasons are also why we are stuck with a naive garbage collector
tjbiddle has joined #ruby
Ciscoridze has joined #ruby
dtcrshr has joined #ruby
<fryguy> although it looks like some smart things are slated for 2.1 to at least get a generational GC
andikr has quit [Remote host closed the connection]
razi has joined #ruby
ezkl has quit [Ping timeout: 240 seconds]
akemrir has quit [Quit: WeeChat 0.4.1]
lemonsparrow is now known as Guest10431
rodacato has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
<lectrick> What is the proper way to test module methods? Object.new.extend the module and test it in there?
rodacato has joined #ruby
sailias has joined #ruby
haxrbyte has joined #ruby
addr_a has joined #ruby
onr has left #ruby [#ruby]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
dhruvasagar has joined #ruby
bklane has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
rodacato has quit [Remote host closed the connection]
<heftig> mjc_: rubinius isn't that much larger than ruby now, if you don't include LLVM
sailias1 has joined #ruby
bklane has quit [Remote host closed the connection]
deepfried has quit [Quit: deepfried]
bklane has joined #ruby
Diranged has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
<Diranged> I'm having a problem with gems.rubyforge.org this morning.. Is that no longer the best remote source to use in my gemrc?
rodacato has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
randomautomator has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
<brisbin> lectrick: depends. Class.new; incude Module; end works. sometimes i'll make a shared example and use that in the specs for any classes which include the module, never testing the module outside the objects that use it
flou has quit [Ping timeout: 240 seconds]
smathieu has quit [Remote host closed the connection]
<robert_> shevy: how's it going today? :D
<lectrick> brisbin: ok
smathieu has joined #ruby
<mjc_> heftig: I'm not sure I understand how that's relevant to what I was saying
sailias has joined #ruby
<heftig> mjc_: eh, just an aside
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
sailias has quit [Read error: Connection reset by peer]
sailias2 has joined #ruby
sailias2 is now known as sailias
addr_a has quit [Ping timeout: 276 seconds]
mansi_ has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
adeponte has quit [Ping timeout: 245 seconds]
sailias1 has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
addr_a has joined #ruby
enebo has joined #ruby
ffio has joined #ruby
alekst has joined #ruby
whitenoise has joined #ruby
<whitenoise> hey guys
<whitenoise> https://github.com/rack/rack/pull/457 -- this says it was merged into rack::master
<Diranged> Is there not a way with the gemrc to specify mirrors? ie .. if the main source fails, use this mirror?/
<whitenoise> does that mean i can use those configuration options in my rack apps defaultly now?
<Diranged> rather than saying "use ALL ofthese, and if anyone fails, the whole thing fails"
anonymuse has quit [Ping timeout: 276 seconds]
wisconsin has joined #ruby
alx- has quit [Quit: Leaving...]
ggtr has joined #ruby
ggtr has left #ruby [#ruby]
nathancahill has joined #ruby
yfeldblum has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
jp- has joined #ruby
asterite has quit [Quit: Leaving.]
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kaspergrubbe has quit [Remote host closed the connection]
threesome has joined #ruby
kpshek has quit []
bradsmith has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
rodacato has quit [Remote host closed the connection]
YaNakilon has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
ner0x has joined #ruby
rippa has joined #ruby
devoldmx has joined #ruby
Bry8Star{T2_ has joined #ruby
anonymuse has joined #ruby
stonevil has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Remote host closed the connection]
i_s has joined #ruby
YaNakilon has joined #ruby
vishal_ has quit [Remote host closed the connection]
sailias has joined #ruby
anonymus_ has joined #ruby
anonymuse has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
sanav has joined #ruby
_bart has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
<whitenoise> ok, so, those configuration options did not work on my Rack::Deflater...how do I enable those configuration optiokns
dhruvasagar has quit [Ping timeout: 240 seconds]
rodacato has joined #ruby
kpshek has joined #ruby
haxrbyte has joined #ruby
<sanav> hello i'm newbie .I want to learn working of ruby with cgi-bin and also want to learn about bot .Please tell me is their any way to test/learn on local computer with web-host ? Thanks
rbento has quit [Quit: Textual IRC Client: www.textualapp.com]
anay has quit [Remote host closed the connection]
ewnd9 has joined #ruby
haxrbyte has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
czchen has left #ruby [#ruby]
pyrac has quit [Quit: pyrac]
sailias has quit [Quit: Leaving.]
sailias1 has joined #ruby
sailias1 is now known as sailias
i_s has quit [Ping timeout: 264 seconds]
pskosinski has joined #ruby
rodacato has quit [Remote host closed the connection]
sailias has quit [Read error: Connection reset by peer]
Legion_ has joined #ruby
sailias1 has joined #ruby
sailias1 is now known as sailias
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
sailias1 is now known as sailias
<sanav> anyone helps me ???
Voodoofish430 has joined #ruby
Legion_ is now known as the_fallen
<kurtisnelson> cgi? ???
Kricir has joined #ruby
camilasan has quit [Remote host closed the connection]
<sanav> kurtisnelson: yes
io_syl has joined #ruby
xcv has quit [Remote host closed the connection]
Ciscoridze has quit [Quit: WeeChat 0.4.1]
<kurtisnelson> why? I am of the opinion that there is no reason to start anything new involving CGI
<sanav> kurtisnelson: ruby with cgi on local computer .Can it possible ?
<kryl> hi, when I try to install a gem, how to install it in a default directory for the whole systeme and not only for the actual user ~/.gem ?
Dysruption has joined #ruby
_anildigital is now known as anildigital
noname001 has quit [Ping timeout: 246 seconds]
<kurtisnelson> if you want to do webapps in ruby, use rack.
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<whitenoise> sanav: you would need to setup nginx, apache, or something similar locally, configure it to render CGI and then code in Ruby. It's just as possible as running anything else locally. But I do agree with kurtisnelson that you should probably use a framework of some sort...will make your life loads easier.
<whitenoise> no reason to use cgi anymore
anildigital is now known as rubyone123
<sanav> whitenoise: ok
<whitenoise> Sinatra is an excellent microframework in Ruby, and then Rails is the standard full framework.
<Dysruption> i have a .rb that uses activerecord, mysql2, and smarter_csv (it's not a rails app) and I need to package it for use on windows (i'm deving on a mac), what's the easiest way to do so?
Woodsman has joined #ruby
cj3kim has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<sanav> whitenoise: thanks ! i think i should go with sinatra
pskosinski has quit [Quit: Til rivido Idisti!]
<kurtisnelson> Dysruption: a linux VM :p
sanav has left #ruby [#ruby]
<Dysruption> kurtisnelson: i was afraid I would get an answer like that :/
<whitenoise> Dysruption: as cumbersome as it is....perhaps cygwin
devoldmx has quit [Read error: Connection reset by peer]
<kurtisnelson> but probably put a Gemfile in there and package it as a zip?
<whitenoise> cygwin would be way better than a VM
<Dysruption> whitenoise: using cygwin in what way?
timonv has quit [Remote host closed the connection]
<Dysruption> kurtisnelson: the problem is that I can't get activerecord or mysql2 gems to run on windows
devoldmx has joined #ruby
<Dysruption> kurtisnelson: without messing with version types and doing too many messy things
<kurtisnelson> then yeah you probably need to put it in some form of a posix environent
<kurtisnelson> cygwin, vagrant, or a full VM
poga_ has joined #ruby
<Woodsman> hey - i'm kind of a beginner so forgive this possibly simple question. I've got a gemfile with the httparty gem, but when I run the example code httparty has on their github repo, i am told that "response = HTTParty.get(... " gives an uninitialized constant error. Anyone know what sort of simple thing i've overlooked?
v0n has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
anonymus_ is now known as anonymuse
bradsmith has joined #ruby
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
cj3kim has quit [Ping timeout: 264 seconds]
<brisbin> Woodsman: are you running the example code with bundle exec?
krainboltgreene has joined #ruby
<Woodsman> i've done bundle install and know the gem is on there
deepfried has joined #ruby
<kurtisnelson> how about the require line?
<brisbin> that didn't answer my question
poga has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
anay has joined #ruby
v0n has joined #ruby
<Woodsman> i am not running the code with bundle exec
goodgame has quit [Ping timeout: 246 seconds]
<Woodsman> i will do that
jaclinuxhelp has joined #ruby
<brisbin> you also do still need the require line, if you don't have that
fredjean has joined #ruby
Kricir has quit [Remote host closed the connection]
vikhyat has joined #ruby
adeponte has joined #ruby
<jaclinuxhelp> i need to know why a systemd unit to start a rake task is failing. any way to get some logging from the command "/usr/bin/bundle exec rake sidekiq:start" so that output reachs systemd console output?
<Woodsman> i would just require 'httparty' , correct?
devoldmx3 has joined #ruby
senayar has quit [Remote host closed the connection]
pyrac has joined #ruby
ColKurtz has joined #ruby
shadoi has joined #ruby
dagobah has quit [Remote host closed the connection]
<brisbin> jaclinuxhelp: systemctl status shows nothing? it should show stderr by default
tommyvyo has joined #ruby
devoldmx has quit [Read error: No route to host]
devoldmx has joined #ruby
mityaz has joined #ruby
S0da has joined #ruby
ExxKA has quit [Read error: Connection reset by peer]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has quit [Ping timeout: 245 seconds]
zeade has joined #ruby
vlad_starkov has joined #ruby
mansi has quit [Remote host closed the connection]
nitish has quit [Remote host closed the connection]
mansi has joined #ruby
devoldmx has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
ianbrandt has joined #ruby
jb41 has joined #ruby
kaspergrubbe has joined #ruby
<zachrab> can i use attr_accessor with class variables?
ephemerian has joined #ruby
swistak35 has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<jaclinuxhelp> brisbin, it shows nothing at all
<hanmac> zachrab: nope, but you can use it with "class instance variables"
<zachrab> hanmac: got it thx
alx- has joined #ruby
bradhe has joined #ruby
thomasle_ has joined #ruby
moos3 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
krz has quit [Quit: krz]
bradhe has quit [Remote host closed the connection]
<jaclinuxhelp> just: http://pastebin.com/83cRcGQM
mansi has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has joined #ruby
xavier23 has quit [Ping timeout: 240 seconds]
Senjai has joined #ruby
Senjai has joined #ruby
moos3 has joined #ruby
browndawg has left #ruby [#ruby]
`MArceLL` has quit [Ping timeout: 246 seconds]
rubyone123 is now known as anildigital
rsahae has joined #ruby
krainboltgreene has quit [Ping timeout: 268 seconds]
gazarsgo has quit [Quit: gazarsgo]
Elhu has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
carlyle has quit [Remote host closed the connection]
gazarsgo has joined #ruby
twoism has joined #ruby
aganov has quit [Quit: aganov]
xavier23 has joined #ruby
cj3kim has joined #ruby
mansi has quit [Remote host closed the connection]
asterite has joined #ruby
classix has quit [Remote host closed the connection]
JZTech101 has joined #ruby
Grieg has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
WaRori has quit []
v1rr3n has joined #ruby
thesheff17 has quit [Ping timeout: 276 seconds]
hamakn has quit [Remote host closed the connection]
qohelet_ has joined #ruby
rupee has joined #ruby
hamakn has joined #ruby
pallavi has quit [Ping timeout: 246 seconds]
mansi_ has joined #ruby
saarinen has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
grh has quit [Remote host closed the connection]
<Grieg> Hello helpful people. I need your help yet once again :D This http://pastie.org/private/jjoci77ztp4eteuz92jza would work in C or Pascal but it doesn't work in Ruby. How do i solve this??
cj3kim has quit [Ping timeout: 260 seconds]
alem0lars has quit [Quit: Leaving]
momomomomo has joined #ruby
invsblzzz is now known as invsblduck
spider-mario has joined #ruby
emergion has joined #ruby
krainboltgreene has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
sayan has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Fire-Dragon-DoL has joined #ruby
<onewheelskyward> Wow. I haven't thought about pascal since I was in high school.
<Fire-Dragon-DoL> I'm really having fun with this: https://www.bloc.io/ruby-warrior/#/?utm_source=rubyweekly&utm_medium=email
<Fire-Dragon-DoL> too funny
<Fire-Dragon-DoL> lol
<onewheelskyward> Grieg I'm assuming n is defined and set to something? I'm also assuming you want the counter to go from 0 to n squared?
Soulcutter is now known as Sou|cutter
kryl has quit [Quit: Leaving]
RichardBaker has joined #ruby
poga_ has quit [Remote host closed the connection]
poga has joined #ruby
<Grieg> onewheelskyward it is. wish to see the rest of the code?
<onewheelskyward> sure!
m8 has joined #ruby
trepidaciousMBR has quit [Ping timeout: 248 seconds]
obs has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
mahmoudimus has joined #ruby
nomenkun has quit [Remote host closed the connection]
thesheff17 has joined #ruby
graydot has quit [Ping timeout: 276 seconds]
krainboltgreene has quit [Ping timeout: 264 seconds]
momomomomo has joined #ruby
Kricir has joined #ruby
xavier23 has quit [Quit: xavier23]
anay has quit [Remote host closed the connection]
asteve has joined #ruby
x1337807x has joined #ruby
xpirator has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
peregrine81 has quit [Quit: peregrine81]
Guest86083 has quit [Quit: Leaving]
<MrZYX> Grieg: not answering your question at all, but http://paste.mrzyx.de/p3ea09d23/ :P
tatsuya_o has quit [Ping timeout: 264 seconds]
qohelet_ has quit [Quit: qohelet_]
asterite has left #ruby [#ruby]
tatsuya_o has joined #ruby
i_s_ has joined #ruby
i_s_ has quit [Remote host closed the connection]
i_s has joined #ruby
i_s has quit [Read error: Connection reset by peer]
kreisys has joined #ruby
<Grieg> Of .sort I am aware , it's the "variables" thing that i seek to master :D
i_s has joined #ruby
deepfried has quit [Quit: deepfried]
xavier23 has joined #ruby
sambao21 has joined #ruby
<MrZYX> for starters your conditions in 24 and 28 will always be true
blackmesa has joined #ruby
Xeago has joined #ruby
devoldmx3 has joined #ruby
ArchBeOS has quit [Ping timeout: 240 seconds]
dtcrshr has quit [Ping timeout: 264 seconds]
mansi_ has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
wisconsin has quit [Remote host closed the connection]
mansi has joined #ruby
jorge___ has joined #ruby
<MrZYX> then there's no sense in dynamically determining the length of the sequence if you have to adapt the loop for every change anyway
Krajsnick has joined #ruby
iliketurtles has joined #ruby
c0rn has joined #ruby
<hanmac> MrZYX: what about: seq.each_cons(2).with_index { |(a, b),i| print i.zero? ? a : nil, a == b ? ' = ' : ' < ', b }
graydot has joined #ruby
graydot has quit [Client Quit]
rickruby has joined #ruby
<MrZYX> that's slower :P
anay has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
DanKnox_away is now known as DanKnox
rdark has quit [Quit: leaving]
chasep_work is now known as NOTPSchwisow
mansi has quit [Ping timeout: 245 seconds]
NOTPSchwisow is now known as chasep_work
peregrine81 has joined #ruby
jorge___ has quit [Ping timeout: 264 seconds]
classix has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.1]
ehc has quit [Quit: ehc]
kpshek has quit []
S0da has quit [Remote host closed the connection]
jaclinuxhelp has quit [Quit: Ex-Chat]
ianbrandt_ has joined #ruby
Xeago has quit [Remote host closed the connection]
cj3kim has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
ArchBeOS has joined #ruby
tvw has quit []
mansi has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
deepfried has joined #ruby
timonv has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
awarner has joined #ruby
akells` has joined #ruby
x1337807x has joined #ruby
PsiCat has quit [Ping timeout: 264 seconds]
ianbrandt has quit [Ping timeout: 264 seconds]
ianbrandt_ is now known as ianbrandt
<Grieg> my goal for now is to make this http://paste.mrzyx.de/p0452a481/ work right
Elhu has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<MrZYX> what doesn't work there?
cj3kim has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
spike|spiegel has joined #ruby
<Grieg> ruby doesn't support this way of assignment. The output now is 777, and i need 377
tatsuya_o has quit [Ping timeout: 246 seconds]
addr_a has quit [Ping timeout: 245 seconds]
<MrZYX> if I fix the conditions I mentioned your script works for me
ramblex has quit [Remote host closed the connection]
<hanmac> use x, b , a = b, a, x
rodacato has joined #ruby
<hanmac> google for "parallel assignment"
<zachrab> how do you put which element in array something is?
<MrZYX> he only uses x for swapping, so b, a = a, b would work too
Xeago has quit [Ping timeout: 260 seconds]
xcv has joined #ruby
wu_lmao has joined #ruby
pskosinski has joined #ruby
cads has quit [Ping timeout: 240 seconds]
akells` has quit [Remote host closed the connection]
jmpf has joined #ruby
adeponte has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
<MrZYX> zachrab: you search for #index ?
Tricon has quit [Ping timeout: 264 seconds]
axl_ has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
[1]Encosi has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
<heftig> Grieg: [9,2,4,4,3,7,7,3].sort.each_cons(2).map { |a,b| [a, (a < b)? "<" : "=", b] }.inject([]) { |a,x| a[0..-2] + x }.join(" ")
<heftig> >> [9,2,4,4,3,7,7,3].sort.each_cons(2).map { |a,b| [a, (a < b)? "<" : "=", b] }.inject([]) { |a,x| a[0..-2] + x }.join(" ")
<eval-in> heftig => "2 < 3 = 3 < 4 = 4 < 7 = 7 < 9" (https://eval.in/40138)
h4mz1d has joined #ruby
<onewheelskyward> uh. that's...hard to parse.
<onewheelskyward> On the other hand, I just learned that there's an each_cons function. :)
emergion has quit [Quit: Computer has gone to sleep.]
Encosi has quit [Ping timeout: 245 seconds]
[1]Encosi is now known as Encosi
momomomomo has quit [Quit: momomomomo]
addr_a has joined #ruby
BRMatt has quit [Ping timeout: 264 seconds]
<Grieg> if a > b
<Grieg> a,b = b,a
<Grieg> elsif b > c
<Grieg> end still outputs 777 ...
<Grieg> b,c = c,b
<shevy> hmm is there a way with ruby to find out the day of 19.10.2013 (19th day in october, year 2013)
pyrac has quit [Quit: pyrac]
cody-- has joined #ruby
<shevy> I think I have it, but
<heftig> Grieg: "if a = b" is wrong
<shevy> Time.mktime()
<heftig> you're doing an assignment there, use ==
the_fallen has quit [Remote host closed the connection]
freerobby has joined #ruby
<MrZYX> >> require 'date'; Date.new(2013, 10, 19).wday
<eval-in> MrZYX => 6 (https://eval.in/40139)
Speed has joined #ruby
peregrine81 has quit [Quit: peregrine81]
<hanmac> >> [9,2,4,4,3,7,7,3].sort.each_cons(2).map.with_index { |(a,b),i| [*(i.zero? ? a : nil), (a < b)? "<" : "=", b] }.join(" ")
<eval-in> Hanmac => "2 < 3 = 3 < 4 = 4 < 7 = 7 < 9" (https://eval.in/40140)
_honning_ has joined #ruby
<Grieg> oh god. its a stupid mistake..... thank you dude
LaPetiteFromage has joined #ruby
Tricon has joined #ruby
<heftig> hanmac: oh, splat magic.
<Crawford> bnagy: Remember that ruby lib I was asking about refactoring?
<Grieg> i mean heftig solved my problem
<hanmac> heftig 2.1 is more cool because you get double-splat magic ;D
<heftig> hm?
<shevy> hanmac your code always scares me
emergion has joined #ruby
<hanmac> heftig: *obj turns it into an array, **obj turns it into an Hash (important for key arguments)
<heftig> hrm
<aedorn> I'm waiting for ***obj which turns it into a temporal anomaly.
Kricir has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<shevy> lol
javar has joined #ruby
<shevy> and what will ****obj do?
<heftig> divide by zero
cdelo has joined #ruby
<MrZYX> successfully
blaxter has quit [Quit: foo]
<hanmac> shevy it runs your linux in windows mode ;P
LaPetiteFromage has quit [Client Quit]
r4nd0m1 has joined #ruby
<Grieg> Thank you all. bb )
Grieg has quit [Quit: Grieg]
marcdel has joined #ruby
reset has joined #ruby
marr has quit [Ping timeout: 240 seconds]
sdegutis has joined #ruby
Senjai has quit [Ping timeout: 246 seconds]
h4mz1d has quit [Ping timeout: 256 seconds]
<sdegutis> is there such a thing as a queue that acts as a hash instead of an array, so that you can pop off an item with a certain key, and add items at keys?
adeponte has joined #ruby
<MrZYX> you mean a thread safe version of hash?
h4mz1d has joined #ruby
<sdegutis> yes
Kricir has quit [Ping timeout: 248 seconds]
<sdegutis> well, one that blocks when you set or get a key
<sdegutis> just like Queue blocks when you push until you pop
BadQuanta has joined #ruby
<MrZYX> hm, not in stdlib afaik, but shouldn't be too hard to write a wrapper around hash
mansi has quit [Remote host closed the connection]
addr_a has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
<hanmac> in ruby 2.1 there are 7 different parameter types for method parameters
pyrac has joined #ruby
mansi has quit [Read error: Connection reset by peer]
anay has quit [Remote host closed the connection]
mansi has joined #ruby
Roa has quit [Ping timeout: 240 seconds]
Senjai has joined #ruby
Roa has joined #ruby
carlyle has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
limon7 has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Remote host closed the connection]
alx- has quit [Read error: Operation timed out]
<sdegutis> hanmac: wat
jerius_ has joined #ruby
axeman- has joined #ruby
<hanmac> >> def meth(a,b=3,*c, e: 4, **f, &g);end; method(:meth).parameters
<eval-in> Hanmac => [[:req, :a], [:opt, :b], [:rest, :c], [:key, :e], [:keyrest, :f], [:block, :g]] (https://eval.in/40146)
Senjai has quit [Quit: No Ping reply in 180 seconds.]
kpshek has joined #ruby
<hanmac> sdegutis: in ruby 2.1 there is keyreg new for required key arguments
<sdegutis> no comprendo
Senjai has joined #ruby
<Sou|cutter> is that the formula for meth?
<sdegutis> i only see 6 args there
peregrine81 has joined #ruby
<lectrick> I want to define a method on an instance only, is the only way to do this "def instance_var.methodname"?
rippa has joined #ruby
Zai00 has quit [Quit: Zai00]
<Sou|cutter> lectrick: class << instance possibly?
hiteshtr has joined #ruby
<lectrick> or o.instance_eval{ def a; puts 'a'; end }
<heftig> or instance.define_singleton_method
jerius has quit [Ping timeout: 276 seconds]
<Sou|cutter> "only way" harr
<lectrick> ah
fantazo has quit [Ping timeout: 240 seconds]
<lectrick> :)
hiteshtr has quit [Max SendQ exceeded]
<hanmac> sdegutis: evalin runs on 2.0, keyreg is 2.1
<sdegutis> k
<sdegutis> thx
<sdegutis> bbl
<shevy> anyone has an idea how to shorten this method? it generates a random string http://pastie.org/8197436
hiteshtr has joined #ruby
<lectrick> heftig: why is there no corresponding instance.remove_singleton_method ?
kreisys has quit [Quit: Computer has gone to sleep.]
Vivekananda has joined #ruby
<heftig> lectrick: not as useful?
<heftig> lectrick: you can use class << instance; undef_method :foo; end
Senjai has quit [Ping timeout: 260 seconds]
xpirator has quit [Quit: Leaving...]
<lectrick> shevy: firstly, try alphabet.sample
Tricon has quit [Ping timeout: 264 seconds]
kreisys has joined #ruby
xpirator has joined #ruby
RichardBaker has quit [Ping timeout: 245 seconds]
ehc has joined #ruby
<aedorn> shevy: (0...26).map{(65+rand(26)).chr}.join.downcase
<aedorn> Change the 0..26 range to whatever length
cody-- has quit [Quit: Computer has gone to sleep.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
maxmanders has joined #ruby
Kricir has joined #ruby
_honning_ has quit [Ping timeout: 259 seconds]
<shevy> aha, so it was .map after all!
<shevy> yes that is much shorter, thanks aedorn and lectrick
<heftig> rand(36**75).to_s(36).rjust(75,?0)
<heftig> not quite the same, as it also includes 0-9 in the string
hiteshtr has quit [Quit: Leaving]
<aedorn> And it's shorter!
muslimasry has joined #ruby
muslimasry has quit [Killed (idoru (Spam is off topic on freenode.))]
<RubyPanther> egads
<hanmac> shevy: length.times.map(&Array("a".."z").method(:sample)).join
hiteshtr has joined #ruby
<aedorn> On the other hand it seems to vary on the string size
<RubyPanther> nice work, you take the _logically_ short version, and golf it in a way that it is logically longer, constrained to ASCII, and brittle
hiteshtr has quit [Read error: Connection reset by peer]
javar has left #ruby [#ruby]
<RubyPanther> If you really really really must have a WTF version, I can write you one that uses #inject
<heftig> >> require 'securerandom'; SecureRandom.hex(10)
<eval-in> heftig => "bf37171f7e2249bf9973" (https://eval.in/40153)
<heftig> >> require 'securerandom'; SecureRandom.base64(18)
LaPetiteFromage has joined #ruby
<eval-in> heftig => "1kGHkh19ji9PJuljMDszIrS6" (https://eval.in/40155)
waj has quit [Quit: Leaving.]
Elhu has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Read error: Connection reset by peer]
<heftig> >> 30.times.map { (?a..?z).sample }.join
<eval-in> heftig => undefined method `sample' for "a".."z":Range (NoMethodError) ... (https://eval.in/40156)
<heftig> >> 30.times.map { [*?a..?z].sample }.join
<eval-in> heftig => "dtwsfbdwmqzacypyvsibxvabttcwvk" (https://eval.in/40157)
<aedorn> Think I like that the best when excluding numerical values.
<heftig> get the array out of the loop, though
<jmpf> w/ in4
jmpf has quit [Quit: leaving]
momomomomo has joined #ruby
<RubyPanther> shevy: attempts to improve it suck pretty bad. :) This is the way _why did it in shoes: http://pastie.org/8197465
<heftig> >> alphabet = [*?a..?b]; out = ""; 30.times{ out << alphabet.sample }; out
<eval-in> heftig => "baabbbababbaababaaabbabababaab" (https://eval.in/40158)
<heftig> oops
<heftig> >> alphabet = [*?a..?z]; out = ""; 30.times{ out << alphabet.sample }; out
<eval-in> heftig => "fdboofpyyygftpuqymxjeljcskgibs" (https://eval.in/40159)
<RubyPanther> I do it the same except without the constant
nilobject has joined #ruby
aces1up has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
<aces1up> hey guys i'm trying to build a recursive merge function that ONLY merges on existing keys in original hash, here is what i have so far, really could use some help getting it working! http://codepad.org/3QynUzTz
interactionjaxsn has quit [Remote host closed the connection]
pygospa has joined #ruby
interactionjaxsn has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Notte has joined #ruby
<sdegutis> if i do Thread.new { puts 'hi' }, will that thread still exist when it returns, it will it go away?
<lectrick> shevy: http://pastie.org/8197478
Davey has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
c0rn has joined #ruby
javajax has joined #ruby
<shevy> RubyPanther damn, this is really original _why code? :(
javajax has left #ruby [#ruby]
<MrZYX> lectrick: Array.new takes a block, no need for the map
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<sdegutis> shevy: is that good or bad?
<lectrick> heftig: holy crap. what is the ?0 in this: rand(36**75).to_s(36).rjust(75,?0)
<shevy> sdegutis dunno, if _why required 4 lines then he must have sucked ;)
<RubyPanther> shevy: yeah, you can be sure anything clever sucked or he would have done it ;)
Kricir has quit [Remote host closed the connection]
<heftig> lectrick: same as "0"
<aedorn> String conversion.. just shorter
interactionjaxsn has quit [Ping timeout: 268 seconds]
denver has quit [Remote host closed the connection]
<heftig> it's a character literal. in ruby 1.8 it used to be an integer
<sdegutis> hey what was _why's new github page again?
<lectrick> ah.
<lectrick> MrZYX: I love the possible cleverness.
kylebt has left #ruby [#ruby]
<MrZYX> heh, creates one array less per call :P
peregrine81 has quit [Quit: peregrine81]
jeffreylevesque has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<sdegutis> oh right, http://github.com/cwales
<pskosinski> Is there a Ruby-based forum engine, like MyBB/etc., not so minimalistic like rBoard, etc.
<jeffreylevesque> what language is good for finance?
xpirator has quit [Quit: Linkinus - http://linkinus.com]
carlyle has quit [Remote host closed the connection]
markalanevans_ is now known as markalanevans
mansi has joined #ruby
<sam113101> pskosinski: discource, forem
<sam113101> discourse*
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther> jeffreylevesque: SQL
<heftig> aces1up: not something like this? http://sprunge.us/hZPf?rb
xavier23_ has joined #ruby
yacks has joined #ruby
atmosx has joined #ruby
carlyle has joined #ruby
fumduq has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Spooner has quit [Ping timeout: 246 seconds]
Columcille has quit [Ping timeout: 246 seconds]
nemesit|znc has joined #ruby
xavier23 has quit [Ping timeout: 246 seconds]
rhys has quit [Ping timeout: 246 seconds]
defrag1 has quit [Ping timeout: 246 seconds]
fumduq- has quit [Ping timeout: 246 seconds]
xavier23_ is now known as xavier23
interactionjaxsn has joined #ruby
<aces1up> heftig lemme check.
Columcille has joined #ruby
nathancahill has joined #ruby
defrag1 has joined #ruby
<aces1up> well the result doesn't look right, the merge should ONLY happen if original hash has key same as other hash.
rhys has joined #ruby
saarinen has quit [Quit: saarinen]
<aces1up> and then the key should be overwritten from other hash in that case.
Spooner has joined #ruby
Elhu has joined #ruby
kirun has joined #ruby
<aces1up> {:a=>{:X=>1}
<aces1up> should not be there.
ewnd9 has quit [Ping timeout: 256 seconds]
<aces1up> as :X is not in original hash.
saarinen has joined #ruby
enhance has joined #ruby
enhance has quit [Changing host]
enhance has joined #ruby
iliketurtles has joined #ruby
sailias has quit [Quit: Leaving.]
sailias1 has joined #ruby
carlyle has quit [Remote host closed the connection]
brennanMKE has joined #ruby
<aces1up> heftig i don't see why the X: key would be in result when you have key?(k) this is similar to results i'm getting with my code as well.
enebo has quit [Quit: enebo]
brennanM_ has joined #ruby
<heftig> aces1up: there is no original hash
axeman- has quit [Remote host closed the connection]
<aces1up> i think it has something to do with the parent key doing a merge on a:
<aces1up> and a: included X: in second hash thus overwriting previous merge?
<heftig> the value of :a in the left hash is an integer, not a hash, so it just gets replaced by the value in the right hash
<heftig> (which is a hash)
the_fallen has joined #ruby
realDAB has joined #ruby
l33_ has joined #ruby
<sdegutis> theres no freenode channel for discussing language-agnostic general program design
<aces1up> hef ok i see.
<sdegutis> so im giving #generaldesign a shot
<sdegutis> join if you want
<aces1up> heftig thanks i will test this code more.
rippa has quit [Ping timeout: 248 seconds]
jds_ has joined #ruby
kreisys has joined #ruby
haxrbyte has joined #ruby
<aces1up> heftig you know if there is a good text or guide on writing these types of enumerable ruby recursive functions? I just can't seem to build them well my self.
<heftig> no
JZTech101 has quit [Quit: Bye]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
cj3kim has joined #ruby
<AntelopeSalad> how often do you guys use structs instead of initializers for classes?
Kricir has joined #ruby
peregrine81 has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
akells` has joined #ruby
<aces1up> heftig check out these two hashes.. it doesn't seem to work with the algo, as i think the parent key overwrites lower keys
zeromodulus has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
cj3kim has quit [Read error: Connection reset by peer]
PhatBaja has joined #ruby
cj3kim has joined #ruby
<sdegutis> is there a way to find out how many Threads exist total?
alex__c2022 has quit [Quit: alex__c2022]
timonv has joined #ruby
<aces1up> heftig here is the data i'm processing
<aces1up> sdegutis Thread.list.length?
<sdegutis> ah thanks
DandyPandy_ is now known as DandyPandy
<sdegutis> great
<heftig> aces1up: works fine here
akells` has quit [Ping timeout: 256 seconds]
<aces1up> hef really? you don't get the :video keys in result? hrmm ok.
<aces1up> i will check my code again here.
nathancahill has quit [Quit: nathancahill]
Tricon has joined #ruby
<heftig> aces1up: http://sprunge.us/SPWb?rb
Tricon has quit [Read error: Connection reset by peer]
profil has joined #ruby
Tricon has joined #ruby
devoldmx3 has joined #ruby
yshh has quit [Remote host closed the connection]
<profil> hey guys, I want to compare to strings but only as far as the shortest one, is there a nice and simple way to do this?
devoldmx3 has quit [Client Quit]
<profil> two*
devoldmx has joined #ruby
Es0teric has joined #ruby
yshh has joined #ruby
bluOxigen has joined #ruby
alex__c2022 has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
Kricir has quit [Remote host closed the connection]
<pskosinski> Discourse looks nice but… 1 GB of RAM to run so simple forum…
<aces1up> heftig working for me i think my implementation is jacked check this is this retarted? other_data = orig_data.rmerge_existing!(other_data)
<heftig> that makes no sense
vlad_starkov has joined #ruby
jds_ has quit [Remote host closed the connection]
<hanmac> pskosinski: do you mean == or > and < too?
<heftig> rmerge_existing! mutates the receiver, the return value is unimportant (in this case, it's just other_data)
<pskosinski> hanmac: I mean that seems too much for so simple thing
<sam113101> pskosinski: gotta put some ram in your ram so you can cache while you cache
<sam113101> isn't discoursce mostly javascript?
<sam113101> not sure how it would be heavier than something else
yshh has quit [Ping timeout: 268 seconds]
saarinen has quit [Quit: saarinen]
profil has left #ruby ["solved"]
<pskosinski> sam113101: Well, on server side it's Rails
jnix has left #ruby [#ruby]
<sam113101> ok
<hanmac> pskosinski if you only need == than use this: longstr.begin_with?(shortstr)
<pskosinski> sam113101: Oh, Ember.js :o https://github.com/emberjs/ember.js
workmad3 has joined #ruby
<pskosinski> hanmac: But I think that you should talk to someone else…
axeman- has joined #ruby
<pskosinski> But profil left
iliketurtles has quit [Quit: zzzzz…..]
Senjai has joined #ruby
BizarreCake has quit [Ping timeout: 264 seconds]
<pskosinski> Damn, I will just stay with PHP for forum :<
rodacato has quit [Remote host closed the connection]
maxmanders has joined #ruby
<hanmac> damm you are right oO
habanany has joined #ruby
habanany1 has joined #ruby
efrainolivares has joined #ruby
ffranz1 is now known as ffranz
jeffreylevesque has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]]
Krajsnick has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
thecodethinker has joined #ruby
thecodethinker has left #ruby [#ruby]
Justin_T has joined #ruby
alvaro_o has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
Matriks has joined #ruby
PsiCat has joined #ruby
louism2wash has joined #ruby
<mjc_> pskosinski: it's possible to get it running with 512 or so and some swap without being too bad
S0da has joined #ruby
hellome has quit [Remote host closed the connection]
enebo has joined #ruby
nathancahill has joined #ruby
pyrac has quit [Quit: pyrac]
blackmesa has joined #ruby
carlyle has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
goodgame has joined #ruby
zmansiv has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
saarinen has joined #ruby
hellome has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
rsahae has quit [Quit: rsahae]
h4mz1d has quit [Ping timeout: 268 seconds]
jarray52 has joined #ruby
<zmansiv> hi, is it possible in ruby to have multiple methods of the same name that take different parameters? it doesn't seem like it is, so how would i go about achieving that? i.e. being able to pass both a hash and a string (a key without an associated value basically) to the same method
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
Justin_T has quit [Quit: Leaving]
Elhu has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
hellome has quit [Read error: Connection reset by peer]
<sam113101> zmansiv: create a single function, and inside it check what kind of argument you receive
cj3kim has quit [Read error: Connection reset by peer]
hellome has joined #ruby
devoldmx3 has joined #ruby
marr has joined #ruby
xavier23 has quit [Quit: xavier23]
yxhuvud has joined #ruby
cj3kim has joined #ruby
hellome has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<zmansiv> thanks sam113101 , is kind_of? or instance_of? more commonly used?
jorge has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
<sam113101> what do you want to do, more precisely?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eldariof has joined #ruby
tatsuya_o has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
BillCriswell has quit [Read error: Connection reset by peer]
<sdegutis> how would you create a kind of queue, where you push and pop values by key, and popping blocks but only blocks for that key?
BillCriswell has joined #ruby
<zmansiv> sam113101 trying to create a class to satisfy these tests https://gist.github.com/zmansiv/052582a3c7bcdb96f6b9
tricon_ has joined #ruby
benlieb has joined #ruby
<RubyPanther> basically, rubyists "never" use kind_of?
Elhu has joined #ruby
jonathanwallace has joined #ruby
jorge has quit [Ping timeout: 256 seconds]
xcv has quit [Remote host closed the connection]
robert_ has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
hellome has joined #ruby
<zmansiv> RubyPanther is there another way i can achieve allowing my Dictionary class' "add" method to take both a hash (key value pair) and a string (just a key)?
<hanmac> RubyPanther i sometimes do, when i check for symbol
<Dysruption> i need to write a ruby script that inserts records into a database… and the script needs to run on windows… any advice?
<RubyPanther> checking for symbol is probably the one exception. Other things, even checking for Hash will break people's stuff
yshh has joined #ruby
Tricon has quit [Ping timeout: 260 seconds]
xcv has joined #ruby
tgunr has quit [Quit: Nity nite]
jbpros has joined #ruby
<sdegutis> threads are hard
<RubyPanther> zmansiv: you would write 3 methods instead of two, and the one called add just looks at the args and decides which one to pass off to
marcdel has quit [Ping timeout: 256 seconds]
<zmansiv> the "decider" would do so by checking the argument's type though?
<hanmac> RubyPanther: in one of my older code, i added a check for the arity parameters ;P
<hanmac> of a block
<RubyPanther> Dysruption: I'm using ActiveRecord with a lot of success, I just dev on linux and when I need to run it on windows i use the "one click installer" and then the one-click "dev kit" and then everything works (even C extensions)
tricon_ has quit [Ping timeout: 245 seconds]
<sam113101> I'd do
<Dysruption> RubyPanther: the one-click-installer of ruby?
<RubyPanther> So far I haven't had a single windows-specific worry
<RubyPanther> yeah
<Dysruption> RubyPanther: mysql2 adapter...
<Dysruption> can't get it to work
<RubyPanther> Dunno, I'm only using postgres and SQL Server (ugh)
sayan has quit [Ping timeout: 248 seconds]
<hanmac> RubyPanther: my windows is the only platform where i didnt tested my C++ extensions yet ...
<RubyPanther> it should work, but you probably have to install the mysql deps by hand
<hanmac> minus that my
hadees has joined #ruby
<Dysruption> RubyPanther:
xcv has quit [Remote host closed the connection]
<Dysruption> woops, you mean compile the source n stuff
<RubyPanther> hanmac: I was surprised when mine compiled unchanged lol
rsahae has joined #ruby
waj has joined #ruby
deepfried has quit [Quit: deepfried]
<Dysruption> RubyPanther: which version of ruby are you using on your windows
<RubyPanther> Dysruption: normally you would need the mysql dev package, you wouldn't need to compile mysql just have the dev package
guiocava_ has joined #ruby
<RubyPanther> 1.9.?
hellome has quit [Read error: Connection reset by peer]
<Dysruption> okay
Kricir has joined #ruby
<Dysruption> RubyPanther: you using mysql2 or mysql gem
<Dysruption> ?
<RubyPanther> no, I'm using postgres and SQL Server, but I'm sure lots of people are using mysql... regular "mysql" gem would be the first thing to try
axeman- has quit [Remote host closed the connection]
guiocavalcanti has quit [Ping timeout: 245 seconds]
<Dysruption> i get a different error for both...
yshh has quit [Ping timeout: 264 seconds]
<Dysruption> *each, rather
aces1up has quit []
krainboltgreene has joined #ruby
sdegutis has left #ruby [#ruby]
rsahae has quit [Quit: rsahae]
Tricon has joined #ruby
Davey has joined #ruby
realDAB has quit [Quit: realDAB]
emergion has quit [Quit: Computer has gone to sleep.]
momomomomo has joined #ruby
guiocava_ has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
rsahae has joined #ruby
SHyx0rmZ has joined #ruby
butblack has joined #ruby
robert_ has joined #ruby
BadQuanta has quit [Ping timeout: 264 seconds]
carlyle has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
Woodsman has left #ruby [#ruby]
waj has quit [Quit: Leaving.]
carlyle has joined #ruby
guiocava_ has joined #ruby
<robert_> is there a way to print from one of the samba gems?
bradhe has joined #ruby
Kricir has quit [Remote host closed the connection]
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
Matriks has quit [Remote host closed the connection]
eldariof has quit [Ping timeout: 256 seconds]
guiocava_ has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
ianbrandt has quit [Remote host closed the connection]
ianbrandt has joined #ruby
goodgame has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
radic has joined #ruby
pontiki has joined #ruby
adeponte has joined #ruby
Krajsnick has joined #ruby
kobain has quit [Ping timeout: 276 seconds]
tatsuya_o has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
butblack has quit [Quit: butblack]
hellome has joined #ruby
ehc has quit [Quit: ehc]
zeropx has joined #ruby
tatsuya_o has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
chrisja has joined #ruby
jds_ has quit [Remote host closed the connection]
thepumpkin has joined #ruby
JZTech101 has joined #ruby
michaelfrohberg has joined #ruby
havenwood has joined #ruby
jds_ has joined #ruby
c0rn has joined #ruby
decoponio has quit [Quit: Leaving...]
n_blownapart has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
deepfried has joined #ruby
kaspergrubbe has joined #ruby
n_blownapart has quit [Read error: Connection reset by peer]
michaelfrohberg has quit [Remote host closed the connection]
`Chris` has quit [Read error: Connection reset by peer]
elux has quit [Quit: Leaving...]
`Chris` has joined #ruby
n_blownapart has joined #ruby
elux has joined #ruby
frem has joined #ruby
razi has quit [Quit: Leaving.]
the_fallen has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
jds_ has quit [Ping timeout: 264 seconds]
<frem> Straaaange things are happening with my rbenv https://gist.github.com/jamesgecko/84fe5ea2ad5ac8d0832a
mnewton has quit [Ping timeout: 240 seconds]
pipework has quit [Remote host closed the connection]
efrainolivares has joined #ruby
<frem> Oh, wait a minute. There's a .ruby-version file in this directory. Never mind!
reset has joined #ruby
jlast_ has joined #ruby
<havenwood> I was glad to see a fish-support fork of chruby: https://github.com/JeanMertz/chruby-fish#readme
<havenwood> frem: Does rbenv work pretty well with Fish in general?
<frem> havenwood, yep! way better than rvm does.
<Nilium> rbenv basically works with anything since it's not hijacking parts of the shell.
bradhe has quit [Remote host closed the connection]
ehc has joined #ruby
<havenwood> figured it would, since it builds the shims with bash and ignores fish for that part
`Chris` has quit [Read error: Connection reset by peer]
elux has quit [Quit: Leaving...]
<havenwood> I woulda been shocked if RVM worked with Fish.
`Chris` has joined #ruby
maxmanders has joined #ruby
<frem> i remember someone rewrote one shell-specific feature in fish? maybe that was rvm.
<havenwood> ah
fmcgeough has quit [Quit: fmcgeough]
x1337807x has joined #ruby
jlast has quit [Ping timeout: 276 seconds]
<havenwood> yeah, with chruby it required a fork due to chruby's unit tests requiring a semblance of posixyness. I thought it was cool that the chruby-fish guy ported all the tests to a Fish unit test thingy though.
<havenwood> Test ALL THE THINGS! \o/
rsahae has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
<Nilium> Bleh, unit tests is for chumps, my codes are perfect
<havenwood> :P
Krajsnick has quit [Remote host closed the connection]
<Nilium> And although I say that mockingly, I still don't use unit tests.
Liothen has quit [Quit: I Sleep!]
<Nilium> Mostly because I haven't found a good way to write unit tests for OpenGL stuff.
xavier23 has joined #ruby
<Nilium> I've seen people suggest ways, but they border on the utterly insane.
<havenwood> I haven't found a good way to write unit tests for concurrency stuff.
mercwithamouth has joined #ruby
Pandee has joined #ruby
<Nilium> I remember one suggestion was to write your own dummy reference implementation of OpenGL to validate input
k0rupted has quit [Read error: Connection reset by peer]
<Nilium> But then you'd have to write tests for the dummy implementation as well
<havenwood> uhhh... ha!
motto has joined #ruby
<Nilium> And so it becomes a giant circle of pain
timonv has quit [Remote host closed the connection]
k0rupted_ has quit [Read error: Connection reset by peer]
colonolGron has joined #ruby
m8 has quit [Ping timeout: 264 seconds]
<frem> opengl testing: take a screenshot of the scene. compare it to a previously captured screenshot...
waj has joined #ruby
<pontiki> OpenGL seems like a very good exception to the idea of unit testing
elux has joined #ruby
Kricir has joined #ruby
<Nilium> frem: That's actually also been suggested before, but the problem is that both screenshots might be incorrect
<Nilium> So then you need to write a reference implementation that guarantees correctness
maxmanders has quit [Quit: Computer has gone to sleep.]
<pontiki> back in the day, i worked for Big Computer and Printer Manufacturer
<Nilium> I believe OS X actually provides a reference implementation though, so in theory it should be easier
momomomomo has quit [Quit: momomomomo]
cs02rm0 has joined #ruby
<pontiki> when testing printer output of new printers, they had scores of people with light boxes and reference prints
<Nilium> Yay, my book order from 3am was confirmed
kreisys has quit [Ping timeout: 245 seconds]
<Nilium> That actually seems like a reasonable way to test printer output.
elux has quit [Client Quit]
xcv has joined #ruby
ntus1017 has joined #ruby
<r0bglees0n> >> class Foo; module_function; def bar; end; end; Foo.bar
<eval-in> r0bglees0n => undefined local variable or method `module_function' for Foo:Class (NameError) ... (https://eval.in/40160)
elux has joined #ruby
<r0bglees0n> bleh
bradhe has joined #ruby
<havenwood> Now they could use BBC's Wraith for SS comparison: https://github.com/BBC-News/wraith#readme
Notte has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<pontiki> Nilium: it *is*
<havenwood> Guess that isn't really applicable straight up
`Chris` has quit [Read error: Connection reset by peer]
`Chris` has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
machuga is now known as machuga|away
<havenwood> r0bglees0n: module_function o_O
<havenwood> r0bglees0n: Didn't realize it existed... only for modules not classes, huh?
devoldmx has joined #ruby
<r0bglees0n> havenwood: yeah i just want to turn an instance method into a class method
n_blownapart has quit [Remote host closed the connection]
waj has quit [Quit: Leaving.]
<havenwood> ahh, dynamically - hrmmm
jorge__ has joined #ruby
Liothen has joined #ruby
devoldmx3 has quit [Ping timeout: 245 seconds]
zmansiv has left #ruby [#ruby]
tommyvyo has quit [Quit:]
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
robbyoconnor has quit [Read error: Connection reset by peer]
kobian has joined #ruby
robbyoconnor has joined #ruby
jorge__ has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
hanmac has quit [Quit: Leaving.]
splittingred has quit [Quit: splittingred]
jlast_ has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
cs02rm0 has quit [Quit: leaving]
motto has quit [Changing host]
motto has joined #ruby
motto is now known as m8
splittingred has joined #ruby
alekst has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
bentonbarnett has joined #ruby
jlast has joined #ruby
<bentonbarnett> Hi everyone!
<bentonbarnett> I have a curious questions and was wondering if I could get some help with it :)
rodacato has joined #ruby
<bentonbarnett> I have a bit of code that checks to ensure that passed in arguments are the correct class and it isn't working how I'd imagine.
<bentonbarnett> arg.kind_of?(Clazz) is returning false, but when I look in the debugger the argument is the correct class (Clazz in this example)
<bentonbarnett> Are there any gotcha with kind_of? that I should know about?
Nisstyre has joined #ruby
brennanM_ has quit [Ping timeout: 248 seconds]
<MrZYX> how do you check that in the debugger?
tommyvyo has joined #ruby
Megtastique has joined #ruby
<bentonbarnett> arg.class
<MrZYX> arg.class == Clazz ?
<MrZYX> Clazz === arg ?
geekbri has quit [Remote host closed the connection]
<MrZYX> (yes three equals)
<bentonbarnett> arg.class == Clazz returns false.
jarray52 has left #ruby [#ruby]
<MrZYX> so class isn't Clazz
<MrZYX> arg.class
<MrZYX> it just has the same name
brbcoding has quit [Ping timeout: 240 seconds]
efrainolivares has quit [Quit: efrainolivares]
<bentonbarnett> Hmmm.
<MrZYX> most likely a namespacing issue
<MrZYX> try comparing it to ::Clazz
efrainolivares has joined #ruby
<bentonbarnett> Looks like it's a namespacing issue alright.
<bentonbarnett> Whelp, this is going to be fun to debug :) Thanks for the help.
Senjai has quit [Read error: Operation timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
urbanmonk has joined #ruby
sdegutis has joined #ruby
<sdegutis> if a method has to make an async call, how do you return the result of that async call from the method synchronously?
<urbanmonk> hi .. i'm using map/reduce to calculate the total of a property on a collection of objects … however some of the objects in the collection might return nil instead of a value … is there a nice way of handling this (other then writing a custom loop) … my code right now is like this: hours_reports.map(&:total_hours).reduce(:+)
<sdegutis> im thinking, (1) make the async call on a background thread, (2) create a new queue, (3) pop from the queue outside the callback and return the result, and (4) push onto the queue when you get something in the callback
Xeago has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection reset by peer]
<sdegutis> and by queue i mean Queue.new
endash has quit [Quit: endash]
<sdegutis> ah i have an idea. TWO QUEUES!
waj has joined #ruby
mnewton has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
hellome has quit [Remote host closed the connection]
mneorr has joined #ruby
efrainolivares has joined #ruby
blackmesa has joined #ruby
tgunr has joined #ruby
tgunr has quit [Client Quit]
realDAB has joined #ruby
sdegutis has left #ruby [#ruby]
Dysruption has quit [Quit: Dysruption]
ehc has quit [Quit: ehc]
habanany1 has quit [Ping timeout: 256 seconds]
futile has joined #ruby
habanany has quit [Ping timeout: 264 seconds]
<futile> is there any way to see a Queue's current contents without using #pop?
whitenoise has quit [Ping timeout: 250 seconds]
brennanMKE has joined #ruby
<RubyPanther> is there some free online class doing a unit on race conditions this week or something?
<futile> nope
tobyo has quit [Ping timeout: 264 seconds]
<futile> im writing a custom protocol, and trying to write a client for it
kobian is now known as kobain
<futile> i suppose i can #pop, examine, and #push again if the obj doesnt match my criteria
iliketurtles has quit [Ping timeout: 246 seconds]
davehimself has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasagar has joined #ruby
krainboltgreene has quit [Remote host closed the connection]
iliketurtles has joined #ruby
l33__ has joined #ruby
l33__ has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 248 seconds]
futile has left #ruby [#ruby]
l33__ has joined #ruby
<lectrick> so does the "alias" keyword accept either symbol arguments or the actual method names?
<lectrick> and which is the recommended approach?
<lectrick> I've always used the following styles: "alias newmethod oldmethod" and "alias_method :newmethod, :oldmethod" but I've seen different styles in the wild
Evan_Donovan has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
l33_ has quit [Ping timeout: 264 seconds]
mnewton has quit [Ping timeout: 256 seconds]
<Evan_Donovan> i have code, located here: https://gist.github.com/evandonovan/6135344, that is giving me an undefined method "document" error that i'm not sure why it's throwing
keen________ has quit [Ping timeout: 240 seconds]
jds_ has joined #ruby
<Evan_Donovan> the Job Class, seen in my code snippet, defines the document method, and my classes inherit from it
keen________ has joined #ruby
breakingthings has quit [Quit: breakingthings]
<Evan_Donovan> when i add the document method explicitly into my classes in the top section of code i still get an undefined method "document" error
l33__ has quit [Ping timeout: 248 seconds]
`Chris` has quit [Read error: No route to host]
tatsuya_o has quit [Remote host closed the connection]
sambao21 has joined #ruby
<canton7> there's no way anyone's going to be able to figure that out from the info you've given
`Chris` has joined #ruby
<Evan_Donovan> what do you need from me?
brennanM_ has joined #ruby
<canton7> line number of exception, thing you're doing to prompt the exception are two things that are definitely needed. if you can produce a minimal test case that'd also help a lot, if you don't find the problem en route
rsahae has joined #ruby
stkowski has joined #ruby
tgunr has joined #ruby
<canton7> add stack trace to that
goshakkk has joined #ruby
s0ber_ has joined #ruby
Tricon has quit [Ping timeout: 240 seconds]
flagg0205 has quit [Quit: leaving]
tgunr has quit [Client Quit]
jarray52 has joined #ruby
ner0x has quit [Quit: Leaving]
xavier23 has quit [Quit: xavier23]
deepfried has quit [Quit: deepfried]
jds_ has quit [Ping timeout: 245 seconds]
<Evan_Donovan> https://gist.github.com/evandonovan/6135390 <- stack trace; https://gist.github.com/evandonovan/6135383 <- code of class where error occurs
brennanMKE has quit [Ping timeout: 260 seconds]
deepfried has joined #ruby
<Evan_Donovan> i'm going to get working on another task class to see if it has the same errors as this one
ldnunes has quit [Quit: Leaving]
s0ber has quit [Ping timeout: 264 seconds]
CubicE has joined #ruby
s0ber_ is now known as s0ber
alex__c2022 has quit [Read error: Operation timed out]
rsahae has quit [Client Quit]
Nisstyre has quit [Quit: Leaving]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
anonymus_ has joined #ruby
rsahae has joined #ruby
mneorr has quit [Remote host closed the connection]
x1337807x has joined #ruby
Kricir has joined #ruby
joshsmith has joined #ruby
butblack has joined #ruby
butblack has quit [Client Quit]
anonymuse has quit [Ping timeout: 248 seconds]
urbanmonk has quit [Quit: urbanmonk]
lkba has joined #ruby
habanany has joined #ruby
habanany1 has joined #ruby
danshultz has quit [Remote host closed the connection]
spidergears has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
alex__c2022 has joined #ruby
Kricir has quit [Ping timeout: 248 seconds]
rsahae has quit [Ping timeout: 248 seconds]
_JamieD_ has joined #ruby
<spidergears> Hey!!! I am new to ruby....
louism2wash has joined #ruby
hormonel has joined #ruby
<spidergears> recently attended a RubyConf.... where i learned is a good language for system level programming...
<spidergears> i couldnt find much resources relating to same....
dhruvasagar has joined #ruby
<hormonel> hy
<spidergears> Can anyone here help pls...?
<hormonel> i have a problem whit my ruby
mary5030 has quit [Ping timeout: 276 seconds]
jarray52 has left #ruby [#ruby]
jorge__ has joined #ruby
enebo has quit [Ping timeout: 256 seconds]
mneorr has joined #ruby
CubicE has quit [Remote host closed the connection]
zigomir has quit [Ping timeout: 276 seconds]
maxmanders has joined #ruby
havenwood has quit [Remote host closed the connection]
jerius_ has quit [Quit: jerius_]
<Crawford> Anyone willing to lend a hand with gemifying a fairly simple find my iphone api wrapper?
Davey has quit [Quit: Computer has gone to sleep.]
flagg0204 has joined #ruby
splittingred has quit [Quit: splittingred]
sailias1 has quit [Quit: Leaving.]
<Crawford> (it's more of a test of the floobits environment)
jorge__ has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 268 seconds]
maxmanders has quit [Client Quit]
kirun has quit [Quit: Client exiting]
<_JamieD_> hi, can anyone help me with converting an array into a list of bitwise or calls? https://gist.github.com/anonymous/6135510 thanks
dhruvasagar has joined #ruby
<sam113101> guys, is there a way to use the ActiveRecord with EventMachine without it blocking the reactor?
_honning_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<sam113101> if I use em_postgresql has the driver, will it work?
tatsuya_o has joined #ruby
spidergears has quit [Remote host closed the connection]
futile has joined #ruby
wmoxam has quit [Ping timeout: 240 seconds]
spidergears has joined #ruby
Diranged has left #ruby [#ruby]
alex__c2022 has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 264 seconds]
asobrasil has left #ruby [#ruby]
<futile> is this a terrible idea? https://www.refheap.com/17126
splittingred has joined #ruby
alex__c2022 has joined #ruby
splittingred has quit [Client Quit]
Mattix has quit [Read error: Connection reset by peer]
<futile> it creates a method that lets you pop off a background-supplied queue any object matching some criteria in a way that doesn't block other calls to it
<Evan_Donovan> canton7: i created a minimal version of the scraper task, but this one doesn't throw the missing method "document" error that the other one does: https://gist.github.com/evandonovan/6135556
Mattix has joined #ruby
<Evan_Donovan> let me know if there's anything else I could do that would help get to the bottom of this issue
workmad3 has quit [Ping timeout: 264 seconds]
<_JamieD_> spidergears: There is a book on it, it's a little old but may be of use http://www.amazon.com/dp/1590598210
hormonel has quit []
<futile> when it encounters a non-matching item, it becomes a little sluggish until it does. i think thats cuz of the loop.
blackmesa has joined #ruby
<futile> and the constant pushing/popping
mneorr has quit [Read error: Connection reset by peer]
cjs226 has quit [Quit: cjs226]
xavier23 has joined #ruby
pipework has joined #ruby
danshultz has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
mercwithamouth has joined #ruby
jaimef has quit [Excess Flood]
tommyvyo has quit [Quit:]
devoldmx has joined #ruby
Senjai has joined #ruby
Senjai has joined #ruby
realDAB has quit [Quit: realDAB]
spider-mario has quit [Remote host closed the connection]
<spidergears> _JamieD_: any other resources available online for free?
jds_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
pentameter has quit [Read error: Connection reset by peer]
_bart has joined #ruby
pskosinski has joined #ruby
BillCriswell has quit [Remote host closed the connection]
arya__ has joined #ruby
mneorr has joined #ruby
_bart has quit [Remote host closed the connection]
tommyvyo has joined #ruby
machuga|away is now known as machuga
robbyoconnor has quit [Read error: Connection reset by peer]
endash has joined #ruby
robbyoconnor has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stonevil has joined #ruby
jaimef has joined #ruby
kylebt has joined #ruby
addr_a has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
kylebt has quit [Client Quit]
arya__ is now known as arya_
interactionjaxsn has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
adambeynon has joined #ruby
bklane has quit [Remote host closed the connection]
hellome has joined #ruby
jbpros has quit [Quit: jbpros]
mneorr_ has joined #ruby
tony has joined #ruby
<tony> hello
Kricir_ has joined #ruby
<tony> anybody there ?
<MrZYX> no
interactionjaxsn has quit [Ping timeout: 264 seconds]
<tony> good to know
alex__c2022 has quit [Quit: alex__c2022]
jarin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Kricir has quit [Ping timeout: 245 seconds]
mneorr_ has quit [Remote host closed the connection]
goshakkk has quit [Quit: Textual IRC Client: www.textualapp.com]
jonathanwallace has quit [Ping timeout: 256 seconds]
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
reset has quit [Quit: Leaving...]
danshultz has quit [Ping timeout: 256 seconds]
mneorr has quit [Ping timeout: 256 seconds]
Krajsnick has joined #ruby
<MrZYX> (if you have a question just ask, don't try to find the right person to answer it)
jds_ has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
`Chris` has quit [Read error: Connection reset by peer]
<tony> not trying to find, it is 1 am here so I doubted to have someone
LaPetiteFromage has quit [Quit: LaPetiteFromage]
`Chris` has joined #ruby
<tony> I need to try to start with rails4 , is it the right channel here ?
<MrZYX> welcome to the world of timezones
jarray52 has joined #ruby
<MrZYX> no, #rubyonrails is
<tony> thanks
stonevil_ has joined #ruby
stonevil has quit [Read error: No route to host]
mary5030 has joined #ruby
Tamae has joined #ruby
jarray52 has left #ruby [#ruby]
robbyoconnor has quit [Read error: No route to host]
robbyoconnor has joined #ruby
Kricir_ has quit [Ping timeout: 268 seconds]
pkremer has quit [Quit: Leaving]
tony is now known as jotony
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
reset has joined #ruby
mansi has quit [Remote host closed the connection]
relix has joined #ruby
mansi has joined #ruby
Megtastique has quit [Quit: Megtastique]
superscott[8] has joined #ruby
guiocavalcanti has joined #ruby
<sam113101> anyone familiar with EventMachine here?
addr_a has quit [Quit: Lost terminal]
twoism has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 268 seconds]
byprdct has joined #ruby
twoism has joined #ruby
h4mz1d has joined #ruby
colonolGron has quit [Quit: Lost terminal]
ehc has joined #ruby
<futile> fixed all my problems by *not* using a single queue
brennanM_ has quit [Read error: Connection reset by peer]
<futile> yay
futile has left #ruby [#ruby]
stonevil_ has quit [Read error: Connection reset by peer]
pupoque_ has quit [Read error: Connection reset by peer]
stonevil has joined #ruby
pupoque_ has joined #ruby
<sam113101> what were you trying to do anyway
sambao21 has quit [Quit: Computer has gone to sleep.]
rickruby has quit [Remote host closed the connection]
baordog has quit [Remote host closed the connection]
arya__ has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
dtcrshr has joined #ruby
jarray52 has joined #ruby
m8 has quit [Quit: Sto andando via]
machuga is now known as machuga|away
jonkri has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mneorr has joined #ruby
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
LaPetiteFromage has joined #ruby
peregrine81 has quit [Quit: peregrine81]
arya_ has quit [Ping timeout: 248 seconds]
mneorr has quit [Remote host closed the connection]
dtcrshr has quit [Remote host closed the connection]
Ciscoridze has joined #ruby
devoldmx3 has joined #ruby
mnewton has joined #ruby
Dysruption has joined #ruby
codecop has quit [Remote host closed the connection]
nari has joined #ruby
hellome has quit [Read error: Connection reset by peer]
bklane has joined #ruby
hellome has joined #ruby
elux has quit [Quit: Leaving...]
deepfried has quit [Quit: deepfried]
Elhu has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
kpshek has quit []
devoldmx has quit [Ping timeout: 268 seconds]
chjunior has quit [Ping timeout: 264 seconds]
Krajsnick has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
xcv has joined #ruby
danshultz has joined #ruby
jorge__ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Evan_Donovan> canton7: i fixed my problem by completely rewriting the offending class...i think it was something to do with the nesting of end statements
danshultz has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
hellome has quit [Remote host closed the connection]
waj has quit [Quit: Leaving.]
c0rn has quit [Quit: Computer has gone to sleep.]
hellome has joined #ruby
thisirs has quit [Read error: Connection reset by peer]
v0n has quit [Quit: WeeChat 0.4.2-dev]
hellome has quit [Remote host closed the connection]
jorge__ has quit [Ping timeout: 256 seconds]
theRoUS has quit [Ping timeout: 240 seconds]
stestagg has joined #ruby
coder_neo has joined #ruby
<stestagg> Hi, can someone explain to me why 'foo' is in the following Array?
<stestagg> >> class A; def self.foo; "FOO" end; end; class B < A; end; B.public_methods(false)
<eval-in> stestagg => [:foo, :allocate, :new, :superclass] (https://eval.in/40208)
hellome has joined #ruby
hellome has quit [Read error: Connection reset by peer]
hellome has joined #ruby
hellome has quit [Remote host closed the connection]
postmodern has joined #ruby
mupkoo has quit [Remote host closed the connection]
c0rn has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
hellome has joined #ruby
dhruvasagar has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<MrZYX> why shouldn't it?
anonymus_ has quit [Remote host closed the connection]
JZTech101 has quit [Quit: Bye]
<stestagg> Well, I would have expected the false cause methods on the superclass NOT to be included
<stestagg> to ^
jonkri has quit [Quit: jonkri]
<MrZYX> oh, yeah, hm
hellome has quit [Remote host closed the connection]
jerius has joined #ruby
winny has joined #ruby
yshh has quit [Ping timeout: 264 seconds]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
_honning_ has quit [Ping timeout: 256 seconds]
<winny> Hello, where can I find documentation/discussion on the ?a ?b ?c variables (or are they methods?)?
tobyo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
hellome has joined #ruby
guiocavalcanti has quit [Ping timeout: 256 seconds]
Astralum has joined #ruby
rickruby has joined #ruby
tomzx_mac has joined #ruby
bradsmith has quit [Remote host closed the connection]
hellome has quit [Remote host closed the connection]
cjs226 has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
popl has joined #ruby
bradsmith has joined #ruby
dhruvasagar has joined #ruby
atyz has quit [Quit: Linkinus - http://linkinus.com]
geggam has quit [Remote host closed the connection]
xlogic has joined #ruby
c0rn has quit [Ping timeout: 268 seconds]
c0rn has joined #ruby
Nahra has quit [Ping timeout: 240 seconds]
axl_ has quit [Quit: axl_]
louism2wash has quit [Quit: This computer has gone to sleep]
stestagg has quit [Quit: stestagg]
bradhe has quit [Remote host closed the connection]
JZTech101 has joined #ruby
bradhe has joined #ruby
jerius has quit [Quit: jerius]
rickruby has quit [Ping timeout: 245 seconds]
coder_neo has quit [Quit: This computer has gone to sleep]
ffranz has quit [Ping timeout: 276 seconds]
forwardbackslash has joined #ruby
<_JamieD_> Is there a way I can make this more concise? https://gist.github.com/anonymous/6136064
bradhe has quit [Read error: Connection reset by peer]
<_JamieD_> I'm thinking that I should be able to remove or at least clean up line 3 somehow
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
habanany has quit [Remote host closed the connection]
habanany1 has quit [Remote host closed the connection]
<byprdct> What's a common way of running mechanize if I needed to fill in form data? Would I create a rake task to run each time I needed to fill in the form?
dmiller has joined #ruby
hellome has joined #ruby
Nahra has joined #ruby
endash has quit [Quit: endash]
sailias has joined #ruby
smathi___ has joined #ruby
Mozee has joined #ruby
baroquebobcat has joined #ruby
hellome has quit [Remote host closed the connection]
forwardbackslash has quit [Quit: Leaving.]
tatsuya_o has quit [Remote host closed the connection]
hellome has joined #ruby
smathieu has quit [Ping timeout: 248 seconds]
bradhe has quit [Remote host closed the connection]
mansi has joined #ruby
jerius has joined #ruby
Bry8Star{T2_ has quit [Ping timeout: 240 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
carlyle has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 268 seconds]
jerius has quit [Client Quit]
tacos1de has joined #ruby
pskosinski has joined #ruby
hellome has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
tommyvyo has quit [Quit:]
efrainolivares has quit [Quit: efrainolivares]
hellome has joined #ruby
devoldmx3 has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
gstamp has joined #ruby
itcharlie has joined #ruby
Fin1te has joined #ruby
tommyvyo has joined #ruby
mansi has joined #ruby
hellome has quit [Remote host closed the connection]
Fin1te has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
ffranz has joined #ruby
ffranz has quit [Remote host closed the connection]
hellome has joined #ruby
tommyvyo_ has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
lele has left #ruby ["Leaving"]
jb41 has quit [Quit: leaving]
efrainolivares has joined #ruby
hellome has quit [Remote host closed the connection]
tommyvyo has quit [Ping timeout: 260 seconds]
hellome has joined #ruby
bradhe has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
jarray52 has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
hellome has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
rhys has quit [Quit: Leaving]
gyre007 has joined #ruby
hellome has joined #ruby
rodacato has quit [Remote host closed the connection]
rgreen has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
rgreen has left #ruby [#ruby]
wmoxam has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<pontiki> do you need to do it repeatedly, like once s day, etc?
JZTech101 has quit [Quit: Bye]
<gyre007> guys...when I develop gem locally...and update it....without bumuping up version in Gemfile it never gets updated when I run bundle install..
<gyre007> how do you guys do it ?
<gyre007> im a n00b
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pandee has quit [Ping timeout: 264 seconds]
Pandee has joined #ruby
<pontiki> gyre007: how did you set it up to start with?
<pontiki> bundle gem ?
<gyre007> gem 'healthcheck', path: '/Users/gyre007/repos/healthcheck'
<gyre007> bundle install
Kruppe has joined #ruby
<gyre007> bundle install --path=.bundle to be precies
<gyre007> precise*
[narcan] has joined #ruby
<pontiki> did you write healthcheck?
stonevil has quit [Remote host closed the connection]
<pontiki> i am asking how you initiated *that*
<gyre007> yeah I did write it
<gyre007> im working on it still...
ismlages has quit [Remote host closed the connection]
<pontiki> is that the one that isnt getting updated?
tatsuya_o has joined #ruby
<gyre007> yeah
<gyre007> well...it isnt getting updated I recken because with every small update im not bumping up its version....
<gyre007> im guessing
<gyre007> what Id like to do is...update some src files locally....then update the gem...so that the updated src files are loaded...
<pontiki> probabaly
<pontiki> does healthcheck have a gemspec file?
<gyre007> bumping up the version with every small update is a pain...especially when you need to do debugging...
<gyre007> yeah it does
Pandee has quit [Ping timeout: 245 seconds]
<pontiki> this is why you do testing
Megtastique has joined #ruby
<gyre007> :) I know...but even tests sometimes dont show the bugs....
<gyre007> lets face it!
<pontiki> well, since you know all there is to it
nilobject has quit [Quit: nilobject]
reset has quit [Quit: Leaving...]
hellome has quit [Read error: Connection reset by peer]
reset has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
<gyre007> welll thats the thiing ...I apparently dont know :) thats why I came here to ask you guys for some help
Ciscoridze has quit [Quit: WeeChat 0.4.1]
hellome has joined #ruby
guiocavalcanti has joined #ruby
bradsmith has quit [Remote host closed the connection]
tommyvyo_ has quit [Quit:]
carlyle has joined #ruby
devoldmx has joined #ruby
Megtastique has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
hellome has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 246 seconds]
guiocavalcanti has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 264 seconds]
hellome has joined #ruby
havenwood has quit [Remote host closed the connection]
jp- has joined #ruby
vasilakisFiL has left #ruby ["Konversation terminated!"]
havenwood has joined #ruby
theRoUS has joined #ruby
<pontiki> so are asking how you can bump the version without actually having to bump the version?
predator217 has joined #ruby
<bricker> What's a better way to do this? https://gist.github.com/bricker/6136338
kaspergrubbe has quit [Remote host closed the connection]
JZTech101 has joined #ruby
thesheff17 has quit [Ping timeout: 256 seconds]
<pontiki> bricker, you want to copy TYPES into program TYPE.size times?
hellome has quit [Read error: Connection reset by peer]
<bricker> pontiki: no, sorry, let me update the gist to be a little more clear
h4mz1d has quit [Ping timeout: 264 seconds]
predator117 has quit [Ping timeout: 240 seconds]
hellome has joined #ruby
osvico has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
<bricker> I think this is a little better, perhaps https://gist.github.com/bricker/6136338
bradhe has joined #ruby
LaPetiteFromage has joined #ruby
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
rickruby has joined #ruby
<bricker> Basically I have two different arrays, and want to combine them into a single array in as few lines as possible
<bricker> but
<bricker> the arrays are stored in another array
<bricker> *sigh* I am bad at explaining
ehc has quit [Quit: ehc]
<popl> practice makes perfect
<pontiki> you just want to append them?
<bricker> I feel like "reduce" or "inject" is what I need to use, but maybe not
<bricker> pontiki: sure
<pontiki> #append
GeissT has joined #ruby
<bricker> eh nevermind
<pontiki> can i ask, where were you looking for answers before asking here?
<bricker> I guess 3 lines is not so bad
<bricker> pontiki: Enumerable
<pontiki> nod
hellome has quit [Read error: Connection reset by peer]
<pontiki> look at Array#append, i think it will do? i'm on phone and ca't test
S0da has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
<pontiki> >> a=[1,2,3],b=[4,5,6],a.append b
<eval-in> pontiki => /tmp/execpad-d9ad20ac733c/source-d9ad20ac733c:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end (https://eval.in/40253)
hellome has joined #ruby
<pontiki> newp
<bricker> pontiki: that isn't what I'm trying to do, sorry
<bricker> I could also do arrays.map(&:entries).flatten
<bricker> that works I guess
<bricker> whatever
<bricker> moving on
<pontiki> ok
<pontiki> soz
BrianJ has joined #ruby
<pontiki> just have nothing to hack on
devoldmx3 has joined #ruby
<pontiki> easier not to be here i guess
bradhe has joined #ruby
rickruby has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 245 seconds]
jhood has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
jhood has left #ruby [#ruby]
saarinen has quit [Quit: saarinen]
thesheff17 has joined #ruby
stuartrexkin has quit [Quit: Linkinus - http://linkinus.com]
h4mz1d has joined #ruby
jibi has joined #ruby
brennanMKE has joined #ruby
tobyo has quit [Read error: Operation timed out]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
brotatos has joined #ruby