apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
pavilionXP has quit [Read error: Connection reset by peer]
fryguy has joined #ruby
Vivekananda has joined #ruby
Vivekananda has quit [Remote host closed the connection]
emmanuelux has joined #ruby
huoxito has joined #ruby
sambio has quit []
timmow has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
tjohnson has joined #ruby
eka has joined #ruby
banister`sleep has joined #ruby
Vivekananda has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
banjara has joined #ruby
emmanuelux has joined #ruby
chrisnicola has quit [Read error: No route to host]
centipedefarmer has joined #ruby
bonty_ssh has joined #ruby
etcetera has quit []
emmanuelux has quit [Max SendQ exceeded]
marr has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ruby
piotr has quit [Ping timeout: 252 seconds]
Vivekananda has quit [Remote host closed the connection]
crazymykl has quit [Quit: Konversation terminated!]
brennanMKE has quit [Remote host closed the connection]
crazymykl has joined #ruby
ZachBeta has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
Pochacco has joined #ruby
huoxito has quit [Ping timeout: 264 seconds]
emmanuelux has joined #ruby
pskosinski has quit [Ping timeout: 260 seconds]
Davey has joined #ruby
huoxito has joined #ruby
`p has joined #ruby
yshh has quit [Remote host closed the connection]
Skylab has joined #ruby
bonty_ss_ has joined #ruby
bonty_ssh has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
etcetera has joined #ruby
rburton- has joined #ruby
julian-delphiki has joined #ruby
d2dchat has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
Vivekananda has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
banjara has quit [Ping timeout: 245 seconds]
slainer68 has quit [Remote host closed the connection]
bean has quit [Ping timeout: 255 seconds]
i_s has quit [Quit: i_s]
rburton- has quit [Client Quit]
banjara has joined #ruby
bean has joined #ruby
Neandre has quit [Ping timeout: 256 seconds]
mengu has quit [Quit: Leaving]
emmanuelux has quit [Max SendQ exceeded]
idkazuma has quit [Remote host closed the connection]
Yakko has joined #ruby
danslo has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
thernull has quit [Remote host closed the connection]
julian-delphiki has quit [Ping timeout: 276 seconds]
bonty_ss_ has quit [Read error: Connection reset by peer]
bonty_ssh has joined #ruby
timmow has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
callmeivan has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
Vivekananda has quit [Read error: Connection reset by peer]
injekt has quit [Read error: Operation timed out]
jonathanwallace has joined #ruby
davidcelis has quit [Ping timeout: 245 seconds]
DonRichie has quit [Ping timeout: 264 seconds]
erichmenge has quit [Ping timeout: 256 seconds]
nkts has quit [Read error: Connection reset by peer]
xybre has quit [Ping timeout: 264 seconds]
DonRichie has joined #ruby
injekt has joined #ruby
erichmenge has joined #ruby
davidcelis has joined #ruby
kenneth has quit [Quit: kenneth]
banjara has left #ruby [#ruby]
nkts has joined #ruby
callmeivan has joined #ruby
ddd has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
jarin has joined #ruby
Vivekananda has joined #ruby
hogeo has joined #ruby
tommyvyo has joined #ruby
ner0x has quit [Quit: Leaving]
nomenkun has joined #ruby
senayar has quit [Quit: Quitte]
hogeo has quit [Remote host closed the connection]
bonty_ssh has quit [Read error: Connection reset by peer]
bonty_ssh has joined #ruby
malte_ has joined #ruby
rcosta has quit [Remote host closed the connection]
sambio has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
nari has joined #ruby
tew88 has quit [Ping timeout: 245 seconds]
centipedefarmer has quit [Remote host closed the connection]
tish has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
moos3 has joined #ruby
zph has joined #ruby
tootubular has joined #ruby
wkmanire has joined #ruby
Hanmac has joined #ruby
ddd has joined #ruby
<wkmanire> I just got done watching Robert Martin's talk from Ruby Midwest 2011. Can anyone refer me to a concrete example of the architecture he presented?
Hanmac1 has quit [Ping timeout: 245 seconds]
moos3 has quit [Client Quit]
<wkmanire> Here is the diagram I think that best represents the talk. http://youtu.be/WpkDN78P884?t=39m26s
moos3 has joined #ruby
chrishough has joined #ruby
tootubular has quit [Client Quit]
moos3 has quit [Client Quit]
kofno has joined #ruby
subbyyy has quit [Ping timeout: 245 seconds]
megha has joined #ruby
baba has quit [Ping timeout: 264 seconds]
kenneth has joined #ruby
jaimef has quit [Ping timeout: 260 seconds]
tomsthumb has joined #ruby
yshh has joined #ruby
emocakes has quit [Quit: emocakes]
jkim has joined #ruby
sambio has quit []
mxweas has quit [Quit: Computer has gone to sleep.]
mxweas has joined #ruby
pskosinski has quit [Quit: pskosinski]
tootooroo has quit [Ping timeout: 276 seconds]
cespare has joined #ruby
alanjc has joined #ruby
piisalie has joined #ruby
Skylab has quit [Quit: Skylab]
alx- has joined #ruby
LennyLinux has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
<Vivekananda> hey ther e
<Vivekananda> anyone here
<Vivekananda> my ruby install is stuck
tootubular has joined #ruby
tomzx_mac has quit [Quit: return 0;]
Matip has joined #ruby
Domon has joined #ruby
ehaliewicz has joined #ruby
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
Mattix has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
dhruvasagar has joined #ruby
hamakn has joined #ruby
Domon has quit [Remote host closed the connection]
dhruvasagar has quit [Client Quit]
dhruvasagar has joined #ruby
subbyyy has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
tjohnson has quit [Quit: Lost terminal]
jaimef has joined #ruby
sambio has joined #ruby
timmow has joined #ruby
keyvan has quit [Read error: Operation timed out]
tommyvyo has quit [Quit:]
timmow has quit [Ping timeout: 252 seconds]
eka has quit [Quit: Computer has gone to sleep.]
Domon has joined #ruby
<Skofo> I'm getting a "cannot load mkmf" error when trying to install a gem I have to build, even though I'm using RVM with a -dev version of Ruby. What do I do?
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
<Skofo> Ah, I was incorrectly using sudo to install the gem.
chessguy has joined #ruby
BSaboia has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
freakazoid0223 has quit [Read error: Operation timed out]
tvw has quit []
cbot_ has joined #ruby
karpuragauram has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
mxweas has quit [Quit: Computer has gone to sleep.]
DonRichie has quit [Ping timeout: 252 seconds]
banjara has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
banjara has joined #ruby
brum has quit [Remote host closed the connection]
dboy has joined #ruby
sleetdrop has joined #ruby
DonRichie has joined #ruby
nomenkun has joined #ruby
<dboy> how does one spit a string and the re-order it?
mneorr has joined #ruby
adkron has quit [Ping timeout: 252 seconds]
<fryguy> dboy: what do you want to reorder it to
nomenkun has quit [Ping timeout: 264 seconds]
callmeivan has quit [Read error: Operation timed out]
jpfuentes2 has joined #ruby
mxweas has joined #ruby
s00pcan has joined #ruby
jnoob22 has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
tootubular has quit [Quit: tootubular]
mneorr has quit [Ping timeout: 276 seconds]
<Vivekananda> fryguy: am trying to write the palindrome thing
soulofpeace has joined #ruby
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
<Vivekananda> my idea is to first split the complicated string into words and then reverse the words and match them
banjara has quit [Client Quit]
cbot_ has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
BSaboia has quit [Ping timeout: 248 seconds]
<Vivekananda> hmm well the best would be letters so tell me . If I have a a long complicated string and I break it down into an array of only words and no symbols then how do I now join theh words to get the sequence of letters
callmeivan has joined #ruby
etcetera has quit []
<Vivekananda> I installed the rbenv now what do I do ?
<Vivekananda> for further things ?
huoxito has quit [Quit: Leaving]
kofno has joined #ruby
bwlang has quit [Quit: bwlang]
Davey has quit [Quit: Computer has gone to sleep.]
tootooroo has joined #ruby
<Vivekananda> anyone here or everyone gone ?
daed has quit [Ping timeout: 264 seconds]
_maes_ has joined #ruby
daed has joined #ruby
wsterling has joined #ruby
oponder has quit [Read error: Connection reset by peer]
<wkmanire> Vivekananda: I'm sort of here
ner0x has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
<Vivekananda> wkmanire: lovely to know
oponder has joined #ruby
<Vivekananda> I want to iterate over elements of a word string
<Vivekananda> how do I do it ?
davidcelis has quit [Ping timeout: 264 seconds]
Matt has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
Matt is now known as Guest59351
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
jeremywrowe has joined #ruby
<Vivekananda> I have an array of string elements called a. I am trying to do this a.each{|x|.each{|y| emptyString <<y}}
marty_mcfly has quit [Read error: Operation timed out]
<Vivekananda> does this look sensible ?
davidcelis has joined #ruby
jeremywrowe has quit [Client Quit]
kofno has quit [Remote host closed the connection]
Davey has joined #ruby
nkts has quit [Quit: -]
<fryguy> Vivekananda: just reverse it and compare the reversed thing to the original
<fryguy> reverse should be provided by enumerable
<Vivekananda> okk got it
love_color_text has joined #ruby
<Vivekananda> I am trying to not iterate so get a lowest complexity sol too
<Vivekananda> :)
<Vivekananda> too much I am trying I guess
<Vivekananda> but I got it
<Vivekananda> fryguy so my solution is
<Vivekananda> split complex string into words ( only letters and nothn else ) . NOw use array.join to join all this ina a single word
<Vivekananda> then compare the reverse
<Vivekananda> Is this a good solution ?
bttf has quit [Quit: Lost terminal]
<fryguy> Vivekananda: probably not
<fryguy> i guess it would work
<fryguy> you could just gsub the string to get rid of non-alphanumerics
akashj87 has joined #ruby
shevy has joined #ruby
mneorr has joined #ruby
s0ber has quit [Remote host closed the connection]
oponder has quit [Remote host closed the connection]
mxweas has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
tootooroo has quit [Ping timeout: 245 seconds]
mxweas has joined #ruby
radic_ has quit [Ping timeout: 246 seconds]
s0ber has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
gwillickers has joined #ruby
pitzips has joined #ruby
kofno has joined #ruby
timmow has joined #ruby
ikk- has joined #ruby
<Vivekananda> fryguy how do I say a == b but case insensitive ?
philcrissman has joined #ruby
<Vivekananda> okay finally palindrom is worknig!! ;)
tootooroo has joined #ruby
<Vivekananda> fryguy: I did this and is working normalString = str.split(/[^a-zA-Z]+/i).join("").downcase
kofno_ has joined #ruby
sambio has quit []
timmow has quit [Ping timeout: 252 seconds]
kofno has quit [Ping timeout: 264 seconds]
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
radic has joined #ruby
baroquebobcat has joined #ruby
benzrf has joined #ruby
benzrf has left #ruby [#ruby]
<chessguy> Vivekananda: why not just a.downcase == b.downcase
mando has joined #ruby
chessguy has quit [Remote host closed the connection]
PixelCrumbs has joined #ruby
vlad_starkov has joined #ruby
zph has joined #ruby
gwillickers has quit [Quit: leaving]
nomenkun has joined #ruby
<Vivekananda> chessguy the available string is pretty long
<Vivekananda> oo you are gone
<Vivekananda> hmm
<Vivekananda> fryguy: you there still
<Vivekananda> questions coming up
tew88 has joined #ruby
EzeQL has quit [Quit: EzeQL]
newUser1234 has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
<bean> Vivekananda, i can likely answer
danneu3 has joined #ruby
Rumsteak has quit [Ping timeout: 245 seconds]
PixelCrumbs has quit [Read error: Connection reset by peer]
Rumsteak has joined #ruby
PixelCrumbs has joined #ruby
akashj87 has quit [Quit: Leaving]
<Vivekananda> bean: sure
<Vivekananda> arrayOfHash = "Madam, I'm Adam".split(/[^a-zA-Z]+/).each{|x| "x" => 1}
<Vivekananda> this is incorrect i know
danneu2 has quit [Ping timeout: 252 seconds]
Pochacco has quit [Quit: Pochacco]
<bean> what are you attempting to accomplish?
<bean> with that
<bean> Vivekananda, what are you trying to do with that each
<Vivekananda> I am trying to get arrayOfHash = [ "Madam"=> 1 , "1" => 1 , .. ]
<bean> hmm, why though
<Vivekananda> and then later if Madam occurs twice I want madam => 2 case insensitive
<Vivekananda> that is the final aim
<bean> err, nvm thats not what you wanted
zph has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 252 seconds]
<Vivekananda> what is the p for
<bean> to output
<Vivekananda> o nono it helps a lot
<Vivekananda> I am learning
drale2k has quit [Quit: Leaving...]
<Vivekananda> so why does simply hmm okay understood
<Vivekananda> also I think I know wht to do
<bean> is actually doing it as a hash
<bean> your Regex is currently splitting on non word characters
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
kofno_ has quit [Remote host closed the connection]
blahwoop has joined #ruby
dmerrick has joined #ruby
shock_one has joined #ruby
<Vivekananda> bean I have no clue what inject does :)
<Vivekananda> scary
<Vivekananda> lol I am pretty new so am trying the novice methods :)
peta_ has quit [Quit: peta_]
Heero` has joined #ruby
dmerrick has quit [Ping timeout: 264 seconds]
<Vivekananda> bean: does this make any sense ? http://eval.in/15450
DonRichie has quit [Quit: Verlassend]
<fryguy> Vivekananda: just do something like this (you can do better than tap, but it makes for a one-liner)
<fryguy> "Madam, I'm Adam".gsub(/[^a-zA-Z]+/, '').downcase.tap {|x| puts (x == x.reverse)}
<Matip> in case someone used Curl (curb gem) before... how are we supposed to send params using GET? I couldn't find any way to use a hash of params...
malte_ has quit [Quit: malte_]
Heero has quit [Ping timeout: 260 seconds]
<Matip> for example, I want to GET "http://foo.com/" with params {section: "whatever"}
ttt has joined #ruby
<Vivekananda> fryguy: did not get you .
<Vivekananda> ooo ok
<Vivekananda> fryguy: are you solving the same problem ?
<Vivekananda> I mean the palindrome or the new one
<Vivekananda> I am solving a new one
Heero` has quit [Ping timeout: 246 seconds]
ariedler has quit [Remote host closed the connection]
bitcycle has joined #ruby
pac1 has quit [Ping timeout: 248 seconds]
<bitcycle> Hey all. Is there a channel for rice?
<bean> ask alis
<Matip> #food
<Matip> jk :P
<Vivekananda> capital . So I was very near righ
<Vivekananda> bean: ?
<bean> bitcycle, alis is a services bot that can help you find channels. Read "/msg alis help list" for help and ask any questions about it in #freenode. Example usage: /msg alis list #ubuntu* or /msg alis list *http*
<Vivekananda> nice I like that
<bean> Vivekananda, you like what i did? heh
<bean> could be much more compact
<bean> but i wanted it to be clear what was being done
<Vivekananda> bean: I will try the compact version slowly
<Vivekananda> right now simple is okay
<bitcycle> Matip: You realize I'm talking about http://rice.rubyforge.org, right?
<Vivekananda> but yeah your other one is a new method
<Vivekananda> so how does inject work let me see in ri
<Vivekananda> lol it says no description
<Vivekananda> hahahah
<Matip> bitcycle, you realize I'm said "jk" (just kidding), right?
<Matip> err, I said ***
<Vivekananda> for hashes when do we use [] and when ()
<bean> Vivekananda, I don't know when you'd ever use (). () is a method call
verysoftoiletppr has quit []
verysoftoiletppr has joined #ruby
<Vivekananda> ook yep got you
love_color_text has quit [Read error: Connection reset by peer]
krz has joined #ruby
GhettoCode has joined #ruby
wkmanire has quit [Quit: Leaving.]
bitcycle has quit [Ping timeout: 245 seconds]
timmow has joined #ruby
bigmac_ has quit [Quit: Leaving]
krz has quit [Quit: krz]
crackfu has joined #ruby
lol has joined #ruby
lol is now known as Guest7028
newUser1234 has quit [Remote host closed the connection]
<Guest7028> whats the difference between string methods and defined methods?
<bean> Guest7028, that question doesn't really make sense
timmow has quit [Ping timeout: 252 seconds]
krz has joined #ruby
<Guest7028> lol like the course im doing on code acadamy introduce me to methods with stuff like hello.downcase, Curry.upcase (the .method part)
<Guest7028> now im learning theres you can define your own methods with parameters
crackfu has left #ruby [#ruby]
<Guest7028> such as def greeting n)
t-mart has quit [Read error: Connection reset by peer]
t-mart has joined #ruby
Nimsical has joined #ruby
<grenierm> Guest7028, methods are simply a logically defined piece of functionality that has been separated out under a certain name
Dreamer3 has joined #ruby
PixelCrumbs has quit [Read error: Connection reset by peer]
<grenierm> Guest7028: so you can create your own, of course. but there are also ones that have been defined previously in the core of standard libs
<grenierm> Guest7028: core or standard libs*
PixelCrumbs has joined #ruby
<Guest7028> ahh thats what i thought thankyou
arya has quit [Ping timeout: 248 seconds]
<grenierm> np
IceDragon has quit [Quit: Space~~~]
mercwithamouth has quit [Ping timeout: 264 seconds]
DonRichie has joined #ruby
nomenkun has joined #ruby
verysoftoiletppr has quit []
ikk- has left #ruby [#ruby]
PixelCrumbs has quit [Read error: Connection reset by peer]
<Vivekananda> bean: reading up an inject detailed tutorial
Sicilians has joined #ruby
PixelCrumbs has joined #ruby
<Sicilians> Does anyone here have any experience with building a program that includes negotiation-like features?
nomenkun has quit [Ping timeout: 264 seconds]
tobym has joined #ruby
Nisstyre has quit [Ping timeout: 257 seconds]
<bean> Sicilians, like, ensuring a connection knows from a known good client?
<bean> or
Beoran__ has joined #ruby
Burgestrand has joined #ruby
chrishough has quit [Quit: chrishough]
<Sicilians> bean, I mean a multi-user application that sends offers back and forth between the two. Once both agree upon, it transitions into a deal, but keeps a record of all past offers during the whole process.
Beoran_ has quit [Read error: Operation timed out]
jbueza has joined #ruby
<bean> oh
<bean> nope
<bean> can't say i've done that
<Sicilians> I'm more worried/confused about how exactly it will be recorded in a database than anything. Do I somehow make it create a new row every time an offer is sent, or do I create a separate table for every deal? Neither of those seem efficient.
<wald0> im reading "ruby in twenty minutes" and i understand everything, except "what is a module" and "what is a method" ? maybe i should already-know the definition of these words ? (only know programming in bash before)
<bean> Sicilians, you'd want to record a row, for every unique even you want.
tomsthumb has quit [Quit: Leaving.]
<bean> event
<grenierm> wald0: in ruby, a module is a collection of logic (usually methods) and you can 'include' them in a class, which brings in all the methods from the module as instance methods for the calling class.
<Sicilians> So every deal would have 10-20 offer rows attached to it by a foreign_key to the deal_id? Am I following correctly? Would/Could I destroy the rows after it was transitioned into a deal to keep the table lean?
<grenierm> wald0: that's where the term 'Mixin' comes from
chxane has joined #ruby
<grenierm> wald0: oh, and methods are essentially functions in C (which i'm sure you're at least familiar with, if you know bash)
<Sicilians> bean, forgot to mention your name hah
kofno has joined #ruby
gabrielrotbart has joined #ruby
divout has joined #ruby
<bean> Sicilians, thats all up to you.
danneu3 has quit [Quit: WeeChat 0.3.8]
classix has quit [Ping timeout: 264 seconds]
unstable has joined #ruby
mercwithamouth has joined #ruby
<wald0> grenierm: thx, btw, is there any "refcard" or similar about the ruby language ? (or glosary, something that list and briefly explains its parts)
doritostains has quit [Quit: Leaving...]
arya has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
gabrielrotbart has quit [Ping timeout: 245 seconds]
<Sicilians> bean, thanks for the help!
<grenierm> wald0: there are many in the interwebs but as a newb i recommend http://ruby-doc.org/
<bean> lol np
arya_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
Asher has quit [Quit: Leaving.]
arya has quit [Ping timeout: 248 seconds]
Asher has joined #ruby
newUser1234 has joined #ruby
gabrielrotbart has joined #ruby
classix has joined #ruby
Burgestrand has quit [Ping timeout: 264 seconds]
newUser1234 has quit [Remote host closed the connection]
wsterling has quit [Remote host closed the connection]
GhettoCode has quit [Quit: Computer has gone to sleep.]
classix has quit [Remote host closed the connection]
sayan has joined #ruby
classix has joined #ruby
ariedler has joined #ruby
pitzips has quit [Quit: Leaving]
wargasm1 has joined #ruby
wargasm has quit [Ping timeout: 248 seconds]
pkrnj has joined #ruby
akhet has joined #ruby
classix has quit [Ping timeout: 248 seconds]
ariedler has quit [Ping timeout: 255 seconds]
classix has joined #ruby
himsin has quit [Ping timeout: 252 seconds]
l0rd_hex has joined #ruby
PixelCrumbs has quit [Remote host closed the connection]
artofraw has joined #ruby
DonRichie has quit [Quit: Verlassend]
vlad_starkov has joined #ruby
dhruvasagar has joined #ruby
<l0rd_hex> Hi everyone, I'm really new to Ruby but I've been trying to run a simple example using the "ruby-adt" gem -- I have a feeling it was written for an earlier version of Ruby
mando has quit [Remote host closed the connection]
<l0rd_hex> that's basically what I get in irb
mando has joined #ruby
<unstable> Is there a long list of gems to install on my system?
<unstable> I basically want to spend 10 minutes installing stuff right now, and not have to spend 5 minutes 20 times at various points when making/playing with projects.
blahwoop has quit [Remote host closed the connection]
ARCADIVS has joined #ruby
Domon has quit [Remote host closed the connection]
artofraw has quit [Remote host closed the connection]
chendo has quit [Ping timeout: 245 seconds]
mando has quit [Ping timeout: 245 seconds]
Es0teric has joined #ruby
classix has quit [Ping timeout: 264 seconds]
artofraw has joined #ruby
artofraw has quit [Remote host closed the connection]
<ddd> absolutely positively no way to know that in advance. you start installing rails and you'll end up with TONS of gems if you install all the top used gems (everything from rspec to devise to pry), and if you're just doing plain ruby, there is *still* a crapload of possibilities. there is no singular list. that is something you have to generate for yourself over time
chendo_ has joined #ruby
Guest7028 has quit [Quit: irc2go]
tootooroo has quit [Ping timeout: 245 seconds]
hemanth_ is now known as hemanth
alx- has quit [Quit: alx-]
chendo_ has quit [Ping timeout: 240 seconds]
xormancer has joined #ruby
ner0x has quit [Quit: Leaving]
chendo_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
melnik has joined #ruby
nomenkun has joined #ruby
Arzaga has joined #ruby
tonini has joined #ruby
classix has joined #ruby
tommyvyo has quit [Quit:]
nomenkun has quit [Ping timeout: 264 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
pyacks has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
codecop has joined #ruby
<Vivekananda> hey
Skofo has quit [Ping timeout: 252 seconds]
<Vivekananda> anyone here
<Vivekananda> I have a hash but how do I display it like {'a' => 3, 'man' => 1, 'canal' => 1, 'panama' => 1, 'plan' => 1}
tootooroo has joined #ruby
tootooroo is now known as Guest54789
Guest54789 has quit [Client Quit]
tootooroo has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
bricker`1A has joined #ruby
Villadelfia has quit [Ping timeout: 264 seconds]
SeySayux has quit [Ping timeout: 256 seconds]
Beoran__ has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 248 seconds]
Kruppe has quit [Remote host closed the connection]
girija has joined #ruby
backjlack has joined #ruby
bricker`LA has quit [Ping timeout: 260 seconds]
sayan has quit [Read error: Connection reset by peer]
kofno has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
kofno has quit [Ping timeout: 240 seconds]
blahwoop has joined #ruby
ph^ has quit [Remote host closed the connection]
timonv has joined #ruby
ph^ has joined #ruby
rippa has joined #ruby
<wald0> ruby can be compiled ? what is the advantage ?
carraroj has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
newUser1234 has joined #ruby
indyrl has left #ruby [#ruby]
pyacks has joined #ruby
tagrudev has joined #ruby
Sicilians has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nomenkun has joined #ruby
melnik has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
Beoran has joined #ruby
bricker`1A has quit [Quit: leaving]
blahwoop has quit [Remote host closed the connection]
Villadelfia has joined #ruby
SeySayux has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
knapper_tech has quit [Ping timeout: 256 seconds]
shock_one has quit [Read error: Operation timed out]
dboy has quit [Ping timeout: 245 seconds]
Arzaga has quit [Quit: Computer has gone to sleep.]
Domon has joined #ruby
aganov has joined #ruby
Yakko has quit [Remote host closed the connection]
aytch has joined #ruby
wsterling has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
jonahR has quit [Quit: jonahR]
Mon_Ouie has joined #ruby
wsterling has quit [Ping timeout: 264 seconds]
ttt_ has joined #ruby
timonv has quit [Remote host closed the connection]
goganchic has joined #ruby
karupanerura has quit [Ping timeout: 256 seconds]
closer has quit [Ping timeout: 256 seconds]
cibs has quit [Ping timeout: 256 seconds]
closer009 has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
karupanerura has joined #ruby
braoru has joined #ruby
cibs has joined #ruby
druiced has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
lyubenblagoev has joined #ruby
beneggett has joined #ruby
Amnesthesia has quit [Remote host closed the connection]
Pochacco has joined #ruby
angusiguess has joined #ruby
arya has joined #ruby
noop has joined #ruby
doritostains has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
jbueza has quit [Quit: Leaving.]
Kirotan has quit [Ping timeout: 245 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
arya_ has quit [Ping timeout: 252 seconds]
arya_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
Amnesthesia has joined #ruby
arya has quit [Ping timeout: 248 seconds]
jurassic has joined #ruby
lyubenblagoev has quit [Quit: Leaving]
Pochacco has quit [Quit: Pochacco]
beneggett has joined #ruby
Guest28050 has quit [Ping timeout: 256 seconds]
Burgestrand has joined #ruby
PixelCrumbs has joined #ruby
druiced has quit [Ping timeout: 264 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
goganchic has quit []
puppeh has joined #ruby
Kirotan has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest43875
Pochacco has joined #ruby
puppeh has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
kofno has joined #ruby
ph^ has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
chrishough has joined #ruby
a_a_g has joined #ruby
workmad3 has joined #ruby
puppeh has joined #ruby
kofno has quit [Ping timeout: 248 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
BaconRose has quit [Ping timeout: 252 seconds]
beneggett has joined #ruby
kn330 has quit [Remote host closed the connection]
Amnesthesia has quit [Remote host closed the connection]
Elhu has joined #ruby
Guest59351 has quit [Quit: This computer has gone to sleep]
zigomir has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
puppeh has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
puppeh has joined #ruby
a_a_g has quit [Quit: Leaving.]
arya has joined #ruby
Vainoharhainen has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
Andromeda has joined #ruby
mafolz has joined #ruby
arya has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
<shevy> wald0 .rb files can not be compiled
<shevy> Vivekananda do: require 'pp'; pp hash
<shevy> where hash is the variable name for your hash
<shevy> or
<shevy> do:
<shevy> p hash
tvw has joined #ruby
<shevy> Vivekananda the method in use here is #inspect, you can do hash.inspect
jprovazn has joined #ruby
arya has joined #ruby
pduin has joined #ruby
andikr has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
gener1c has joined #ruby
<gener1c> is there a more iron directed library for restful than nestful?
x0F has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<Vivekananda> shevy: howdy
<Vivekananda> where are you currently btw ?
<Vivekananda> what is the time there ?
bigkevmcd has joined #ruby
kseifried has quit [Quit: Leaving]
MrZYX|off is now known as MrZYX
<gener1c> restful lib?
<gener1c> something i can change the headers in
Deele has joined #ruby
<gener1c> of the request
Deele has left #ruby [#ruby]
tootooroo has quit [Ping timeout: 260 seconds]
thebastl has joined #ruby
<gener1c> oh im an idiot
<gener1c> i should be searching for http
hogeo has joined #ruby
pioz has joined #ruby
MrZYX has quit [Remote host closed the connection]
<Vivekananda> when I am usign irb and have a couple of variables defined how can I check which ones I have defined
<Vivekananda> ?
ananthakumaran has joined #ruby
<gener1c> wow thats a good q
psyprus has quit [Read error: Connection reset by peer]
pioz has quit [Client Quit]
<Vivekananda> gener1c: I meant that I have been testing for sometime and not sure if I already have a hash somewhere
filipe has joined #ruby
tootooroo has joined #ruby
<Vivekananda> I could just use that instead of making a new one
Es0teric has quit [Quit: Computer has gone to sleep.]
mfridh has joined #ruby
vlad_starkov has joined #ruby
psyprus has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
dhruvasagar has joined #ruby
tobym has quit [Remote host closed the connection]
smt has joined #ruby
smt has left #ruby [#ruby]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
echevemaster has quit [Read error: Connection reset by peer]
tagrudev has joined #ruby
Atrophius has quit [Read error: Connection reset by peer]
Atrophius has joined #ruby
kenneth has quit [Quit: kenneth]
alanjc has left #ruby [#ruby]
angusiguess has quit [Ping timeout: 252 seconds]
knapper_tech has joined #ruby
kenneth has joined #ruby
Guest__ has joined #ruby
jdrap has joined #ruby
dr_bob has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
Guest__ is now known as shellox_
<shevy> Vivekananda it is 09:04 rather early still here
dhruvasagar has joined #ruby
xll11 has quit [Ping timeout: 245 seconds]
<matti> 9?
<matti> Pff.
mockra has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
tonini has joined #ruby
<shevy> matti yeah
markalanevans has quit [Quit: markalanevans]
tobym has joined #ruby
olivier_bK has joined #ruby
tobym has quit [Remote host closed the connection]
markalanevans has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
blaxter_ has joined #ruby
blaxter_ is now known as blaxter
skum has joined #ruby
aganov has quit [Quit: aganov]
Vainoharhainen has quit [Ping timeout: 248 seconds]
aganov has joined #ruby
kofno has joined #ruby
ehellman has joined #ruby
threesome has quit [Ping timeout: 256 seconds]
olivier_bK has quit [Ping timeout: 246 seconds]
punkrawkR has joined #ruby
kofno has quit [Ping timeout: 248 seconds]
yugui_zzz is now known as yugui
wchun has joined #ruby
sleetdrop has joined #ruby
maxmanders has joined #ruby
knapper_tech has quit [Read error: Operation timed out]
quazimodo has quit [Ping timeout: 256 seconds]
ehaliewicz has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
Tectonic has quit []
pyacks has quit [Remote host closed the connection]
timonv has joined #ruby
monkegjinni has quit [Remote host closed the connection]
hamed_r has joined #ruby
marr has joined #ruby
Skelz0r has joined #ruby
<Vivekananda> how do I use .include? for a set of values ?
quazimodo has joined #ruby
<Vivekananda> like "P".include?("P" , "M" , "N")
<Vivekananda> also case insensitive
tonini has quit [Remote host closed the connection]
<tobiasvl> Vivekananda: what's a "set of values"?
Weazy has quit [Ping timeout: 240 seconds]
<tobiasvl> oh now i get it
skum is now known as Vainoharhainen
Vainoharhainen has quit [Changing host]
Vainoharhainen has joined #ruby
<tobiasvl> Vivekananda: just turn it around
yacks has joined #ruby
<tobiasvl> >> ["P" , "M" , "N"].include?("P")
<eval-in> tobiasvl => true (http://eval.in/15465)
monkegjinni has joined #ruby
guns has joined #ruby
Hanmac1 has joined #ruby
rismoney has quit [Read error: Connection reset by peer]
Guest is now known as calmyournerves
Burgestrand has quit [Quit: Burgestrand]
bluOxigen has joined #ruby
<Vivekananda> tobiasvl: nope the thing is I have a huge array and it has letters. I have to check if each value of the array is a value common to a given set of strings
timonv has quit [Remote host closed the connection]
thernull has joined #ruby
<Vivekananda> ie each value in array is one of the three given letters
ryanf has left #ruby [#ruby]
mxweas has quit [Quit: Computer has gone to sleep.]
<Vivekananda> I am trying this but is incorrect --arrayA.each do
<Vivekananda> irb(main):066:1* |x| puts x[1].include?("P" | "S")
<Vivekananda> irb(main):067:1> end
<Vivekananda> NoMethodError: undefined method `|' for "P":String
<Vivekananda> also for || I am getting an error
<tobiasvl> what ... why are you trying to do that
<tobiasvl> that's not valid ruby
<tobiasvl> or any programming language
<Vivekananda> Well other languages might not do that but ruby does have a way of shortening things
<tobiasvl> but not like that
<tobiasvl> arrayA.each do |x| puts x == "P" || x == "S"; end
<tobiasvl> do it like that instead
<Vivekananda> I am just trying to see if x[1] is a value in p or s or r
<tobiasvl> no you're not
yacks has quit [Ping timeout: 264 seconds]
<tobiasvl> you should be trying to see if x is, not x[1]!
<Vivekananda> tobiasvl: I know the method is wrong . I was telling you what I was TRying to achieve. I already know it does not work :)
<tobiasvl> aha...
<tobiasvl> anyway, the code i gave you should work
<Vivekananda> well x[1] is required actually
<Vivekananda> the structure is a nested array
<tobiasvl> ah okay
<Vivekananda> array in array :)
mpfundstein has joined #ruby
markalanevans has quit [Quit: markalanevans]
<Vivekananda> yes yours will work
<Vivekananda> I also got this --
<Vivekananda> 1st solution
quazimodo has quit [Ping timeout: 264 seconds]
MrZYX|off has joined #ruby
<tobiasvl> yes
MrZYX|off has quit [Remote host closed the connection]
threesome has joined #ruby
tonini has joined #ruby
<tobiasvl> you still can't give a boolean test with || as arguments to include? though
camilasan has joined #ruby
<Vivekananda> hmmm
<Vivekananda> so now what to do ?
<tobiasvl> what?
JohnBat26 has joined #ruby
<tobiasvl> didn't my code suggestion work?
MrZYX|off has joined #ruby
<Vivekananda> yes I am trying
<Vivekananda> very sleepy too :(
sk87 has joined #ruby
fixl has joined #ruby
guns has quit [Quit: guns]
quazimodo has joined #ruby
MrZYX|off has quit [Remote host closed the connection]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
pioz has joined #ruby
Morkel has joined #ruby
MrZYX|off has joined #ruby
<shevy> Vivekananda dont code when tired
<shevy> you make too many mistakes that way
<Vivekananda> shevy: i am solving stupid problems
<Vivekananda> 2 3 lines :(
<Vivekananda> and wasted one whole day on 2 problems!!
<Vivekananda> shitt
<Vivekananda> such bad efficiency
quazimodo has quit [Ping timeout: 245 seconds]
<Vivekananda> only thing of value I learned today is the .inject
yacks has joined #ruby
j3roen has quit [Remote host closed the connection]
<matti> Vivekananda: Not sure if relevant, but for arrays you can do a trick.
<tobiasvl> Vivekananda: "A programmer is a machine for turning coffee into code" – paraphrased Paul Erdős
<matti> >> ( %w(a b c d) & %w(b c) ).any?
<eval-in> matti => true (http://eval.in/15466)
arya has quit [Ping timeout: 276 seconds]
MrZYX|off is now known as MrZYX
Skelz0r has quit [Ping timeout: 276 seconds]
Skelz0r has joined #ruby
<Vivekananda> tobiasvl: lol
<Vivekananda> yes I quite agree
<Vivekananda> but am going off now
tjbiddle has joined #ruby
<Vivekananda> after solving this problem though
passcod has joined #ruby
fcoury_ has quit [Ping timeout: 252 seconds]
alup has joined #ruby
oponder has joined #ruby
chrishough has quit [Quit: chrishough]
MrZYX is now known as MrZYX|off
pi3r has joined #ruby
emocakes has joined #ruby
timmow has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
swex_ has joined #ruby
lupinstien has quit [Remote host closed the connection]
swex has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
banjara has quit [Quit: Leaving.]
quazimodo has joined #ruby
kofno has joined #ruby
niceguyjames has joined #ruby
monkegjinni has quit [Remote host closed the connection]
locriani has joined #ruby
mneorr has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
kofno has quit [Ping timeout: 246 seconds]
danslo has quit [Quit: danslo]
oponder has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
xbob has joined #ruby
ephemerian has joined #ruby
maxmanders has joined #ruby
monkegjinni has joined #ruby
elaptics`away is now known as elaptics
timonv has joined #ruby
adambeynon has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mxweas has joined #ruby
mxweas has quit [Client Quit]
enriclluelles has joined #ruby
Neandre has joined #ruby
monkegjinni has joined #ruby
doritostains has quit [Quit: Leaving...]
Shrink has quit [Read error: Connection reset by peer]
rdark has joined #ruby
senayar has joined #ruby
adambeynon has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
timonv_ has joined #ruby
slainer68 has joined #ruby
mikelodeon has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
hemanth has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 256 seconds]
t-mart has quit [Read error: Connection reset by peer]
Atrophius has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
Atrophius has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
martinklepsch has joined #ruby
t-mart has joined #ruby
jgrevich_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 245 seconds]
jgrevich_ is now known as jgrevich
hemanth has joined #ruby
Markvilla has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
Markvilla has quit [Remote host closed the connection]
dagobah has joined #ruby
blueOxigen has joined #ruby
<alex88> hi guys, I'm trying to install ruby-debug gem but I get these errors http://pastie.org/pastes/7367319/text I'm using rbenv installed from homebrew on osx
<alex88> any idea?
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
crazymykl has quit [Remote host closed the connection]
<postmodern> alex88, just use the built in debugger
mikemac has joined #ruby
_veer has joined #ruby
<postmodern> alex88, require 'debug'
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
<alex88> postmodern: I'm installing that since I wanted to use the rails server --debugger option
<alex88> and it says to install ruby-debug
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
veer has quit [Ping timeout: 264 seconds]
Caelum has quit [Ping timeout: 264 seconds]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
Caelum has joined #ruby
<postmodern> alex88, think you want to use the debugger gem instead
<postmodern> alex88, ruby-debug isn't maintained anymore
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
<alex88> oh ok
JonnieCache has quit [Quit: leaving]
bluOxigen has quit [Ping timeout: 255 seconds]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
<alex88> since on rails they say that if I use 1.9 (1.9.3 here) to install just "debugger"
<alex88> in fact
TomJ has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has quit [Client Quit]
samuel02 has joined #ruby
<alex88> btw, so seems a rails problem
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
chussenot has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
BaconRose has joined #ruby
Shrink has joined #ruby
hmarr has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
nomenkun has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
adambeynon has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
nomenkun_ has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
_veer has quit [Max SendQ exceeded]
<alex88> seems also that ruby-debug-base19 doesn't provide the same as ruby-debug as it installs fine but rails still asks for that
mneorr_ has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
nomenkun_ has joined #ruby
slainer68 has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [Max SendQ exceeded]
nomenkun has quit [Ping timeout: 260 seconds]
_veer has joined #ruby
oponder has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
_veer has quit [K-Lined]
haxrbyte has joined #ruby
Zai00 has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
shevy has quit [Ping timeout: 245 seconds]
doritostains has joined #ruby
oponder has quit [Remote host closed the connection]
monkegjinni has joined #ruby
troessner has joined #ruby
beiter has joined #ruby
arya has joined #ruby
nightfalcon has quit [Ping timeout: 245 seconds]
eskp has joined #ruby
haxrbyte_ has joined #ruby
timonv has joined #ruby
drale2k has joined #ruby
mneorr_ has quit [Remote host closed the connection]
marcdel has quit []
<eskp> hi guys
<eskp> i'm very new to ruby
ph^ has quit [Ping timeout: 264 seconds]
<eskp> how would i go about writing something like this to a file https://gist.github.com/sinisterchipmunk/1335041
mneorr has joined #ruby
<eskp> i can't get TarWriter.new to create a file on the filesystem
<tobiasvl> eskp: what do you mean?
<tobiasvl> what error message are you getting?
slainer68 has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
<eskp> tobiasvl: no error message
ph^ has joined #ruby
eka has joined #ruby
timonv_ has quit [Ping timeout: 248 seconds]
<eskp> how would you go about writing StringIO to a file i guess is what i'm asking
<eskp> so after creating an instance of TarWriter as per http://railsapi.com/doc/ruby-v1.9.2/classes/Gem/Package/TarWriter.html
<eskp> and adding the files
<eskp> how do i create the actual file
PixelCrumbs has quit [Remote host closed the connection]
<tobiasvl> look at the File.open method calls
quazimodo has quit [Ping timeout: 245 seconds]
security has joined #ruby
shevy has joined #ruby
<Hanmac1> me has an gem for all kind of archives ... but its not finish or fixed
megha has quit [Ping timeout: 248 seconds]
swex_ has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
swex has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
mxweas has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
bonty_ssh has quit [Remote host closed the connection]
justsee has joined #ruby
kofno has joined #ruby
PixelCrumbs has joined #ruby
classix has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
classix has joined #ruby
nplusp has joined #ruby
<shevy> Vivekananda always focus on small, short things. it will be much easier
jlebrech has joined #ruby
melnik has joined #ruby
<shevy> Vivekananda ideally, make really tiny classes, tiny methods
kofno has quit [Ping timeout: 256 seconds]
Nuck has quit [Ping timeout: 256 seconds]
<jlebrech> how do pull out MonthNumber(1) and get January? or February?
<alex88> does rbenv stores the ruby source somewhere?
bonty_ssh has joined #ruby
<postmodern> alex88, i think it downloads to /tmp by default
<alex88> postmodern: oh ok thanks... btw the final aim is to make aptana work with ruby-debug-ide :S
<postmodern> alex88, export RUBY_BUILD_BUILD_PATH=/usr/local/src/
<postmodern> alex88, you can set that in .bashrc
<alex88> oh and it stores there
jgrevich has quit [Read error: No route to host]
<alex88> nice thanks
<postmodern> alex88, you need to run ruby-build -k
maletor has quit [Ping timeout: 252 seconds]
<postmodern> alex88, otherwise ruby-build deletes the source after it installs
<postmodern> alex88, i suggest using chruby+ruby-build
timmow_ has joined #ruby
<postmodern> alex88, ruby-build -k 1.9.3 ~/.rubies/1.9.3
jgrevich has joined #ruby
<alex88> ok thanks postmodern!
<alex88> let me try
robustus has quit [Ping timeout: 276 seconds]
hit has joined #ruby
arya_ has joined #ruby
robustus has joined #ruby
<alex88> since I've to install two gems and I need to add --with-ruby-include during install
Nuck has joined #ruby
mxweas has quit [Quit: Leaving...]
jurassic has quit [Quit: jurassic]
arya has quit [Ping timeout: 248 seconds]
<alex88> btw seems that also rbenv install has the -k flag ;)
<alex88> and sources will be in rbenv_root/sources
<postmodern> alex88, ah good!
<alex88> which would be fine too ;)
KevinSjoberg has joined #ruby
jgrevich has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
bigkevmcd has joined #ruby
<alex88> postmodern: that's nice too :)
<postmodern> alex88, so just mkdir ~/.rbenv/sources
<alex88> postmodern: I've installed via homebrew so I just install -k 1.9.3-p392
* lupine grumbles at #dup
Andromeda has quit [Remote host closed the connection]
<lupine> why does Fixnum respond_to? it if it can't dup?
<alex88> btw, same issue, now rdebug-ide works fine... but aptana still says "ruby: no Ruby script found in input (LoadError)" when I try debug mode :(
<eskp> tobiasvl: i am now able to write a file but he files that i add to the archive with tar.add_file come out empty after i extract
s0ber has quit [Remote host closed the connection]
<tobiasvl> eskp: i don't know anything about this stuff, i just looked at the code earlier. please gist your code and i might have a faint shot at answering
nalaginrut has joined #ruby
melnik has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
s0ber has joined #ruby
keymone_ has joined #ruby
Mathieu has quit [Quit: WeeChat 0.4.0]
<charliesome> lupine: i can explain why that happens but i can't justify why it's a good idea ;)
<lupine> yes, indeed :)
* lupine is trying to track down a bug caused by #dup being called on a fixnum. with no backtrace. bah
<eskp> i think i am adding the file wrong but not sure
danslo has joined #ruby
lkba has joined #ruby
keymone_ has quit [Client Quit]
keymone_ has joined #ruby
Axsuul has quit [Ping timeout: 248 seconds]
<tobiasvl> eskp: yes
<eskp> ok that's fixed, i had to open that file first
<tobiasvl> yeah, add_file takes a block
<alex88> how could gem install linecache19 works but gem install --pre linecache19 doesn't?
yacks has quit [Ping timeout: 264 seconds]
Mathieu has joined #ruby
Domon has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 248 seconds]
shoru has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<alex88> is there a way to debug what aptana runs for debugging?
maxmanders has joined #ruby
arya has joined #ruby
<alex88> their console just sends the output
emergion has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
_if has left #ruby [#ruby]
psino has left #ruby ["Leaving..."]
tonini has quit [Remote host closed the connection]
hamed_r has quit [Quit: Leaving]
camilasan has quit [Remote host closed the connection]
_if has joined #ruby
banister`sleep has joined #ruby
tish has quit [Quit: Leaving.]
Elhu has quit [Quit: Computer has gone to sleep.]
hit has quit [Quit: hit]
hit has joined #ruby
fcoury__ has joined #ruby
Elhu has joined #ruby
daed has quit [Ping timeout: 260 seconds]
tish has joined #ruby
pandawarrior has joined #ruby
shoru has quit [Quit: Computer has gone to sleep.]
emergion has quit [Quit: Computer has gone to sleep.]
Domon has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
tish has quit [Ping timeout: 264 seconds]
Domon has joined #ruby
lessless has joined #ruby
<lessless> wtf is this $: << '.' ?
<matti> Adding '.' (current directory) to LOAD_PATH
<Hanmac1> lessless: its not good code
<matti> It will rape your hamster, yes.
<matti> Hanmac1: Why is it not a good code? ;p
arya has quit [Ping timeout: 248 seconds]
eka has joined #ruby
<lessless> what possible problems are?
<Hanmac1> matti security problems
<matti> lessless: Hanmac1 is being code-racist ;p
luckyruby has joined #ruby
<matti> Hanmac1: Ruby is one big security problem ;p
<Hanmac1> its only because the railists use it wrong
postmodern has quit [Quit: Leaving]
<matti> Haha
kofno has joined #ruby
baphled has joined #ruby
arya has joined #ruby
<zeroXten> anyone have much experience with binary data and endianness in ruby? I'm having problems translating this python: int.from_bytes(iv,'big') into ruby
<matti> zeroXten: Maybe use pack/unpack
<zeroXten> i thought i'd worked it out, but it doesn't work :(
atyz has joined #ruby
<zeroXten> this is the mess i've ended up with so far: iv.unpack("b*")[0].gsub(/([01]{8})/) { |b| b.to_i(2).chr }
MrZYX|off is now known as MrZYX|off|off
<zeroXten> if i use "B*" i get back the original value which is good, but b* doesn't work as expected
<zeroXten> python seems to make it pretty simple :'(
yshh has quit [Remote host closed the connection]
Burgestrand has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
krz has quit [Quit: krz]
vlad_starkov has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
krz has joined #ruby
rrecio has joined #ruby
<lupine> hmm, this might be a ruby2.0 problem
Domon has quit [Remote host closed the connection]
banister`sleep has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
banister`sleep has joined #ruby
Domon has joined #ruby
sayan has joined #ruby
niceguyjames has joined #ruby
bwlang has joined #ruby
<Hanmac1> ping shevy
chichouw has joined #ruby
hakunin has joined #ruby
maxmanders has quit [Ping timeout: 252 seconds]
sonda has joined #ruby
drale2k has quit [Quit: Leaving...]
yellow5_ has joined #ruby
<shevy> Hanmac1 heya
<lupine> wonder if numerics are frozen by default in ruby2
* lupine installs to check
daed has joined #ruby
<Hanmac1> lupine they are
ChewieBe1rdy has joined #ruby
<lupine> hah, that'll explain what's broken then
piisalie_ has joined #ruby
<lupine> at least, assuming fc19 installs ruby2 by default
vetsin_ has joined #ruby
wting_ has joined #ruby
* lupine waits for the fedora install to finish, but thinks it does
erry_ has joined #ruby
itman_ has joined #ruby
apeiros has joined #ruby
<Hanmac1> lupine it makes a little more sense
wunz_ has joined #ruby
entr0py_ has joined #ruby
entr0py_ has left #ruby [#ruby]
<lupine> sure, there's just a line in the code that goes obj.dup if obj.frozen?
entr0py_ has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
drago777- has joined #ruby
Neandre has quit [Ping timeout: 264 seconds]
jnoob22 has joined #ruby
maxmanders has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
A124 has quit [Read error: Operation timed out]
<Hanmac1> lupine: obj.dup if obj.frozen? and !obj.is_a?(Numeric)
camilasan has joined #ruby
<lupine> aye :)
<lupine> or I could provide a no-op dup for Numeric
faulkner- has joined #ruby
security is now known as fire
<lupine> (but I probably won't)
GeekOnCoffee_ has joined #ruby
fcoury_ has joined #ruby
crazysim_ has joined #ruby
epochwolf|2 has joined #ruby
epochwolf|2 has joined #ruby
sirecote_ has joined #ruby
cschneid_ has joined #ruby
Kov|sumika has joined #ruby
trollface has joined #ruby
arusso| has joined #ruby
segv_ has joined #ruby
psyprus has quit [*.net *.split]
drago777 has quit [*.net *.split]
fcoury has quit [*.net *.split]
erry has quit [*.net *.split]
crazysim has quit [*.net *.split]
zodiak has quit [*.net *.split]
faulkner has quit [*.net *.split]
Paradox has quit [*.net *.split]
aboudreault has quit [*.net *.split]
yellow5 has quit [*.net *.split]
yfeldblum has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
vetsin has quit [*.net *.split]
hakunin_ has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
chichou has quit [*.net *.split]
ping-pong has quit [*.net *.split]
piisalie has quit [*.net *.split]
arusso has quit [*.net *.split]
wting has quit [*.net *.split]
yellow5_ is now known as yellow5
Kovensky has quit [*.net *.split]
itman has quit [*.net *.split]
epochwolf has quit [*.net *.split]
sirecote has quit [*.net *.split]
segv has quit [*.net *.split]
jeekl has quit [*.net *.split]
wunz has quit [*.net *.split]
faulkner- is now known as faulkner
cschneid has quit [*.net *.split]
ChewieBeardy has quit [*.net *.split]
GeekOnCoffee_ is now known as GeekOnCoffee
crazysim_ is now known as crazysim
sirecote_ is now known as sirecote
fcoury_ is now known as fcoury
Kov|sumika is now known as Kovensky
arusso| is now known as arusso
segv_ is now known as segv
arusso has joined #ruby
arusso has quit [Changing host]
epochwolf|2 is now known as epochwolf
peta_ has joined #ruby
<rrecio> Hello. Does anyone here have experience with Grape? I want to know the difference between declaring a namespace using a symbol or a string
drale2k has joined #ruby
ping-pong has joined #ruby
drale2k has quit [Client Quit]
MetaCosm_ has joined #ruby
jeekl has joined #ruby
sebastianb has joined #ruby
yfeldblum has joined #ruby
zodiak has joined #ruby
<Hanmac1> rrecio: can you link us some info about Grape? symbols are never free'd but this maybe not a problem, and i dont know if Grape turn the strings internal into symbols too
<ohcibi> whats the difference between puts <<-EOS string EOS and puts <<<EOS string EOS?
techlife has quit [Ping timeout: 276 seconds]
fcoury__ is now known as fcoury_
<tobiasvl> ohcibi: don't you mean <<-EOS string -EOS
<tobiasvl> you can do <<RANDOM_STRING string RANDOM_STRING
<rrecio> Hanmac1: I'm trying to specify nested resources. I see that on some examples, the ineer resources are declared using strings, in others using symbols. I don't get it!
BaconRose has quit [Ping timeout: 252 seconds]
<ohcibi> tobiasvl: no i'd understand this as this would mean treat everything from "-EOS" to "-EOS" as string, but there isnt a "-" at the second "EOS" needed
<Hanmac1> rrecio: in your case they are equal from the Grape side
psyprus has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
<ohcibi> tobiasvl: thats why i'm confused 8-)) to me it looks like the - is fully optional
aboudreault has joined #ruby
<rrecio> Hanmac1: so they declares using symbols sometimes and using strings others just because of lack of code stardardization?
<rrecio> it seems too n00b
Domon has quit [Remote host closed the connection]
Bofu2U has joined #ruby
<Hanmac1> rrecio: treat sysmols as enums from C, they cant be deleted and the value will be allways the same: both is not true for strings
erry_ is now known as erry
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
<rrecio> Hanmac1: got it, thanks!!
techlife has quit [Max SendQ exceeded]
A124 has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
fryguy has quit [Read error: Connection reset by peer]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
fryguy has joined #ruby
pandawarrior has left #ruby [#ruby]
csmrfx has joined #ruby
tonini has joined #ruby
beasty has joined #ruby
<beasty> hi all just making my first steps into this ruby story
<beasty> and i'm trying to 'require' a gem
willejs has joined #ruby
<willejs> hi all, can anyone help me with this? http://pastebin.com/duZUtCv0
<beasty> but it says 'no such file to load'
<willejs> i am trying to parse a string into json, and can't figure out why its failing?
chussenot has quit [Quit: chussenot]
tevio has joined #ruby
hogeo has quit [Remote host closed the connection]
blacktulip has joined #ruby
<Hanmac1> beasty: what is your ruby version? try require "rubygems" before
hogeo has joined #ruby
<beasty> Hanmac1: it says the same thing about rubygems
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<Hanmac1> rrecio: for sample if i do 1000.times { [:sym,"string"]} i got 1000 new strings but only one symbol ... but when i go with the GC.start, the 1000 strings are gone but the symbol still exist
<Hanmac1> beasty can you make a pastie or a gist of your code?
techlife has joined #ruby
tish has joined #ruby
bwlang has quit [Quit: bwlang]
<tobiasvl> beasty: have you installed the gems?
davetherat has quit [Remote host closed the connection]
wallerdev has joined #ruby
atmosx has joined #ruby
<beasty> Hanmac1: it's just a basic net-ssh tutorial file
<beasty> tobiasvl: yes
davetherat has joined #ruby
<beasty> - gem which net/ssh
<beasty> /var/lib/gems/1.9.1/gems/net-ssh-2.6.6/lib/net/ssh.rb
<beasty> etc etc
<tobiasvl> are they installed in a location that is in your load path?
D4T has joined #ruby
mengu has joined #ruby
<Hanmac1> beasty what is "ruby -v" and "gem env" showing you?
ehellman has quit []
<beasty> Hanmac1: 1.8.7
<beasty> hmm i think my install is pretty messed up
<shevy> beasty really 1.8.7 ?
<shevy> ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-linux]
<shevy> this is what turns up for me
<shevy> p370 it is
<shevy> unfortunately ruby does not like /var/lib much
hogeo has quit [Ping timeout: 260 seconds]
<Hanmac1> beasty "sudo update-alternative --config ruby"
<Hanmac1> "sudo update-alternatives --config ruby"
JonnieCache has joined #ruby
<willejs> could anyone help me with my json parsing issue? The string is rather long...
sayan has joined #ruby
<willejs> but, json lint validates it.
<beasty> Hanmac1: i changed it to 1.9.1
<beasty> now it works thanks :)
<Hanmac1> willejs maybe the json file is invalid?
<willejs> i wish it was, its being parsed with the java jackson library fine
<willejs> but it won't de-serialise in ruby?
dross_ is now known as dross
camilasan has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 264 seconds]
<willejs> anyone got any ideas?
<Hanmac1> willejs its a java problem
<willejs> how can it be a java problem?
<Hanmac1> if they tread invalid code as correct then its not an ruby failure
<willejs> the json looks valid?
<atmosx> because java is a problem istelf
<atmosx> lol
robbyoconnor has quit [Ping timeout: 276 seconds]
<atmosx> hey Hanmac1 shevy
jnoob22 has quit [Remote host closed the connection]
<Hanmac1> atmosx i will add an global observer in my code to make observing more easier ... and it protects me from evil wave functions :P
<JonnieCache> hahaha
<willejs> okay, basically, we are wrapping app logs into the log stash JSON format in scala, using the jackson json library. then shipping it over UDP to log stash, log stash is written in ruby, it cannot parse the string it seems.
luckyruby has quit [Remote host closed the connection]
<willejs> when i try to parse the string in rib, it failed too
camilasan has joined #ruby
<willejs> *irb, it fails too
<JonnieCache> willejs: see what https://github.com/brianmario/yajl-ruby makes of it
pskosinski has joined #ruby
<JonnieCache> willejs: you probably would want to use yajl anyway for that kind of thing
<JonnieCache> but it could be a bug in the ruby json lib if it passes jsonlint
<shevy> hey atmosx
gyre007 has joined #ruby
drale2k has joined #ruby
<willejs> @JonnieCache: thanks
<willejs> I'm going to look at it at wire level, then check out the library...
<JonnieCache> always a good plan
<willejs> il forward tail-ruby to the log stash dev
<JonnieCache> yajl-ruby :)
<JonnieCache> thats a J
<willejs> ahh my type
<willejs> *typo
<willejs> think I'm getting auto-corrected
kofno has joined #ruby
soulofpeace has quit [Ping timeout: 256 seconds]
eladmeidar has joined #ruby
<JonnieCache> willejs: the other thing is manually run a binary search (with the delete key) to find the bit of the json causing the problem
<JonnieCache> but im sure you can work that out for yourself
workmad3 has joined #ruby
a_a_g has joined #ruby
mneorr has quit [Remote host closed the connection]
huoxito has joined #ruby
Astral_ has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
Astral_ has joined #ruby
dylan has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
slainer68 has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
yalue has joined #ruby
hemanth_ has joined #ruby
Astral__ has joined #ruby
dylan` has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
dylan has quit [Read error: Connection reset by peer]
zigomir has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
ged has quit [Read error: Connection reset by peer]
yacks has joined #ruby
ged has joined #ruby
robscomp_ has joined #ruby
robscomp_ has quit [Changing host]
robscomp_ has joined #ruby
jnoob22 has joined #ruby
feedbackloop_ has joined #ruby
Astral_ has quit [Ping timeout: 255 seconds]
doritostains has quit [Ping timeout: 260 seconds]
robscomputer_ has quit [Ping timeout: 260 seconds]
feedbackloop has quit [Ping timeout: 260 seconds]
lessless has quit [Remote host closed the connection]
BSaboia has joined #ruby
techlife has quit [Ping timeout: 245 seconds]
yshh has joined #ruby
maxmanders has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
PixelCrumbs has quit [Remote host closed the connection]
s0ber has quit [Remote host closed the connection]
techlife has joined #ruby
vlad_starkov has joined #ruby
m8 has joined #ruby
PixelCrumbs has joined #ruby
subbyyy has joined #ruby
moos3 has joined #ruby
yshh has quit [Ping timeout: 260 seconds]
Mathieu has quit [Quit: bye]
LennyLinux has joined #ruby
razibog has joined #ruby
dmerrick has joined #ruby
chussenot has joined #ruby
MrZYX|off|off has quit [Ping timeout: 256 seconds]
ph^ has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
ph^ has quit [Remote host closed the connection]
Neandre has joined #ruby
dmerrick has quit [Ping timeout: 264 seconds]
Mohan_ has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
sayan has quit [Read error: Connection reset by peer]
Flexa has joined #ruby
kofno has joined #ruby
sleetdrop has quit [Ping timeout: 264 seconds]
pac1 has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
jonathanwallace has joined #ruby
angusiguess has joined #ruby
MrZYX|off has joined #ruby
thernull has quit [Quit: Leaving]
MrZYX|off is now known as MrZYX
JohnBat26 has joined #ruby
shellox_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yugui is now known as yugui_zzz
MrZYX has quit [Ping timeout: 256 seconds]
tew88 has quit [Ping timeout: 264 seconds]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
fbernier has joined #ruby
MrZYX|off has joined #ruby
MrZYX|off is now known as MrZYX
Shrink has quit [Ping timeout: 245 seconds]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
PixelCrumbs has quit [Read error: Connection reset by peer]
classix has quit [Ping timeout: 248 seconds]
mahlon has quit [Read error: Connection reset by peer]
willejs has quit [Quit: willejs]
_if has quit [Changing host]
_if has joined #ruby
AltGrendel has joined #ruby
subbyyy_ has joined #ruby
PixelCrumbs has joined #ruby
PixelCrumbs has quit [Remote host closed the connection]
mahlon has joined #ruby
classix has joined #ruby
pac1 has quit [Ping timeout: 248 seconds]
PixelCrumbs has joined #ruby
MrZYX has quit [Ping timeout: 256 seconds]
subbyyy has quit [Ping timeout: 255 seconds]
MrZYX|off has joined #ruby
MrZYX|off is now known as MrZYX
_if has left #ruby [#ruby]
EPIK has quit [Ping timeout: 256 seconds]
atyz has quit [Quit: Leaving...]
backjlack has quit [Changing host]
backjlack has joined #ruby
tobago has joined #ruby
backjlack has quit [Quit: leaving]
sayan has joined #ruby
PixelCrumbs has quit [Read error: Connection reset by peer]
<tobago> hi guys, which projects on github do you contribute to? where are you involved?
nezumi has quit [Read error: Operation timed out]
sepp2k has joined #ruby
johnmlocklear_ has joined #ruby
<JonnieCache> MARGARET THATCHER IS DEAD!
<JonnieCache> TIME TO DRINK!
Elhu has joined #ruby
pyrac has joined #ruby
classix has quit [Ping timeout: 260 seconds]
idkazuma has joined #ruby
beneggett has joined #ruby
classix has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
teddyp1cker has joined #ruby
backjlack has joined #ruby
Shrink has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
yashshah has quit [Ping timeout: 252 seconds]
classix has quit [Ping timeout: 256 seconds]
b0oh has joined #ruby
sayan has joined #ruby
willejs has joined #ruby
Kruppe has joined #ruby
arya has quit [Ping timeout: 248 seconds]
huoxito has quit [Ping timeout: 264 seconds]
locriani has quit [Remote host closed the connection]
bonty_ssh has quit [Remote host closed the connection]
quazimodo has joined #ruby
Shrink has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
arya has joined #ruby
MrZYX has quit [Remote host closed the connection]
kristofers has joined #ruby
chase-work has joined #ruby
classix has joined #ruby
MrZYX|off has joined #ruby
<atmosx> JonnieCache: you're being evil
MrZYX|off is now known as MrZYX
<atmosx> JonnieCache: I think she's the most hated prime minister of western country ever. Like *ever*, there must be more than 15-20 songs about her dying.
adac has joined #ruby
<peta_> Is it possible to instruct the ruby interpreter to route all network access caused by a script over a given proxy server?
<adac> With a struct instead of a hash, is this not possible anymore? my_struct["KEY"] = my_array How to do such a thing with a struct?
pyrac has quit [Quit: pyrac]
MrZYX has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
radic has quit [Quit: Verlassend]
<peta_> I want to keep track of all network access my script causes … therefore I use Charles but I don't want to proxy ALL network access of the rest of my system. (all the porn sites might cause an ugly stack overflow)
<JonnieCache> atmosx: yeah fair enough its not good to celebrate anyones death.
krz has quit [Quit: krz]
<atmosx> I can't implement cache properly, looks fairly simple in the documentation jeez
nkr has joined #ruby
Czupa has joined #ruby
MrZYX|off has joined #ruby
divout has quit [Remote host closed the connection]
<atmosx> JonnieCache: ah, I think most of them were well deserved.
MrZYX|off is now known as MrZYX
radic has joined #ruby
huoxito has joined #ruby
yashshah has joined #ruby
seoaqua has joined #ruby
rmartin_ has joined #ruby
realDAB has joined #ruby
BSaboia has quit [Ping timeout: 276 seconds]
rrecio has quit [Remote host closed the connection]
javiolo1 has joined #ruby
<seoaqua> has anyone used savon or other WCF gem? i wonder how to call a method with params . client.call(:get_citys,message: {CityType: "0"}) this reports 'Object reference not set to an instance of an object.' all the time
ARCADIVS has quit [Quit: WeeChat 0.3.8]
justsee has quit [Ping timeout: 245 seconds]
akam_ has quit [Remote host closed the connection]
ryanh has joined #ruby
Rumsteak has quit [Quit: Rumsteak]
Shrink has joined #ruby
BizarreCake has joined #ruby
flyinprogramer has joined #ruby
<javiolo1> How can I scape variables when calling bash? http://pastebin.com/QEUkZn4f
<flyinprogramer> anyone have httparty knowledge with attaching cookies to the header?
<flyinprogramer> RestClient.get('https://some-endpoint', {:cookies => {:COOKIE_NAME => t[:value]} } ) <-- how to do what i want with Rest-Client
<flyinprogramer> but we're an httparty shop :|
<Hanmac1> javiolo1: use `webkit2png -F #{url} -D #{domain}` .. or something similar
NiteRain has quit [Read error: Operation timed out]
JohnBat26 has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
AlSquire has quit [Quit: Quitte]
a_a_g has quit [Quit: Leaving.]
AlSquire has joined #ruby
rudisimo has joined #ruby
sailias has quit [Quit: Leaving.]
<javiolo1> Hanmac1: thanks!
mercwithamouth has joined #ruby
geekbri has joined #ruby
mattbl has joined #ruby
kennyvb has quit [Read error: Connection reset by peer]
kennyvb_ has joined #ruby
LennyLin_ has joined #ruby
divout has joined #ruby
<ericwood> good morning, fellow rubyists
bonty_ssh has joined #ruby
Flexa has quit [Read error: Connection reset by peer]
Muz has quit [Ping timeout: 264 seconds]
Muz_ has joined #ruby
LennyLinux has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
tobago has quit [Quit: Instantbird 1.2 -- http://www.instantbird.com]
zmisc has joined #ruby
tubbo has joined #ruby
ph^ has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
Al__ has joined #ruby
freerobby has quit [Quit: Leaving.]
maddog_ has left #ruby [#ruby]
xormancer has quit [Ping timeout: 245 seconds]
<atmosx> ericwood: good morning to you sir!
<ericwood> I want to write more ruby
<ericwood> but I am in JS-land all week :|
<ericwood> JS-land => world's worst amusement park :)
drale2k has joined #ruby
rakun has joined #ruby
<tubbo> ericwood: not as bad as Javaland..
ckrailo has joined #ruby
<tubbo> JS-land is kinda fun sometimes because the roller coaster comes crashing down in a fury of no errors
<ericwood> truth
bonty_ssh has quit [Ping timeout: 256 seconds]
<ericwood> I actually really like JS in this fucked up way
Neandre has quit [Ping timeout: 264 seconds]
<ericwood> it's exciting to me because it's so simple and yet really powerful
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
mljsimone has joined #ruby
<ericwood> as long as you use things like jQuery and underscore.js it's actually quite enjoyable
Xeago has joined #ruby
razibog has quit [Quit: Leaving.]
<banister`sleep> ericwood: what about one of those new fangled js MVCs ?
<ericwood> I use backbone a lot
<ericwood> it's actually quite nice
<banister`sleep> ericwood: have you played with marionette?
<ericwood> yes!
<banister`sleep> what do you think of it?
<ericwood> it's what I use for work, I love it
SecretAgent has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<banister`sleep> cool
monkegjinni has quit [Read error: Operation timed out]
<ericwood> backbone is nice because you can kind of make it do whatever the hell you want
<ericwood> it's like the opposite philosophy of Rails
<banister`sleep> ericwood: i imagine marionette.js + coffeescript could be pretty sweet combination
<ericwood> I suppose, I never hopped on the coffeescript train
monkegjinni has joined #ruby
Lockzi has quit [Remote host closed the connection]
<banister`sleep> ericwood: i really like => functions in cs :)
SecretAgent has joined #ruby
<csmrfx> isn't backbone just a generic framework
<ericwood> pffft, you too good for function() ?!
<banister`sleep> ericwood: the maintain the 'this'
<ericwood> csmrfx: basically
<banister`sleep> ericwood: ya, i dont like that functions change their 'this' depending on where they're invoked
<ericwood> csmrfx: Marionette adds some nice helpers that keep you from writing boilerplate, but in the end everything is kind of up to you
_if has joined #ruby
kirun has joined #ruby
ckrailo has quit [Ping timeout: 276 seconds]
wolcanus has joined #ruby
<ericwood> the nice thing about backbone is the fact that the whole lib is in a single file that's actually really easy to understand
hmarr has quit [Read error: Operation timed out]
zmisc has quit [Read error: Connection reset by peer]
<ericwood> you can read the annotated source and figure everything out...a concept many frameworks are missing
anonymuse has joined #ruby
<ericwood> banister`sleep: global until proven innocent!
<ericwood> banister`sleep: I'll admit, though, no matter how hard I try I never feel like I truly understand JS scoping...
* Xeago applies to a swedish company - in english, gets a reply in dutch..
<banister`sleep> ericwood: i also dislike prototyped OO
jpfuentes2 has joined #ruby
<ericwood> I kinda like it
<banister`sleep> ericwood: it seems most JS MVC frameworks just bolt-on their own pseudo classes anyway, so might as well make it explicit with CS
philcrissman has joined #ruby
<Xeago> ericwood: I understood it for a few days when writing coffeescript
drale2k has quit [Ping timeout: 245 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
<Hanmac1> shevy i now use something like observable in my scripting for "skill_added"
<ericwood> Xeago: then you forgot it?
<Xeago> and reading the coffeescript code, (the conversion code)
<Xeago> not writing javascript
<ericwood> aaaah
<ericwood> yeah
<Xeago> and a general bad memor
<ericwood> banister`sleep: prototypes are so beautiful in their simplicity, though
<ericwood> it's like the anti-java, and that makes me so happy
<banister`sleep> ericwood: not that beautiful when everyone just builds their own way of faking classes though
dustint has joined #ruby
<ericwood> you just need coworkers that are diciplined :)
hmarr has joined #ruby
average_drifter has joined #ruby
waxjar has quit [Ping timeout: 264 seconds]
<shevy> Hanmac1 for what project?
Skofo has joined #ruby
Skofo has quit [Client Quit]
breakingthings has joined #ruby
waxjar has joined #ruby
arya has quit [Ping timeout: 248 seconds]
k610 has joined #ruby
<Hanmac1> shevy it may be become someday the standard scripts of the ORR games
jerius has joined #ruby
tommyvyo has joined #ruby
jgarvey has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
sayan has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
arya has joined #ruby
wmoxam has joined #ruby
newUser1234 has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Axa_ has joined #ruby
yacks has quit [Read error: Operation timed out]
newUser1234 has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 276 seconds]
idkazuma has quit [Remote host closed the connection]
mneorr has joined #ruby
gaahrdner has joined #ruby
end_guy has joined #ruby
dmerrick has joined #ruby
philcrissman has quit [Remote host closed the connection]
drale2k has joined #ruby
drale2k has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
KevinSjoberg has joined #ruby
freerobby has joined #ruby
<shevy> god
<shevy> this code!
hogeo has joined #ruby
blambam has joined #ruby
drale2k has joined #ruby
blaxter has quit [Ping timeout: 252 seconds]
fmcgeough has joined #ruby
Matip has quit [Read error: Connection reset by peer]
dmerrick has quit [Ping timeout: 249 seconds]
<Hanmac1> shevy yeah its made of evil :P
thatRD has joined #ruby
vlad_starkov has joined #ruby
Matip has joined #ruby
ffranz has joined #ruby
invisime has joined #ruby
carloslopes has joined #ruby
chussenot has quit [Quit: chussenot]
knapper_tech has joined #ruby
admin0 has joined #ruby
chussenot has joined #ruby
paper_ has joined #ruby
thebastl has quit [Ping timeout: 246 seconds]
<shevy> Hanmac1 hehe I am surprised you can understand it
monkegjinni has quit [Remote host closed the connection]
mmitchell has joined #ruby
<blambam> if i require a lib in MainModule and have "module MainModule; module SubModule;" doe sthat submodule automatically get what's required by MainModule?
mattbl has quit [Quit: This computer has gone to sleep]
kirun has quit [Read error: Operation timed out]
<apeiros> blambam: no
Coolhand has quit [Remote host closed the connection]
<apeiros> require is not aware of the current nesting
bigoldrock has joined #ruby
<apeiros> and generally you put requires on the top of your file
<blambam> thanks. seems like how that would be a good thing
cmarques has joined #ruby
sk87 has left #ruby [#ruby]
mmitchell has quit [Remote host closed the connection]
nari has quit [Read error: Operation timed out]
<Hanmac1> apeiros: are you surprised too? https://gist.github.com/Hanmac/46aa0ecda5d117ed061d
monkegjinni has joined #ruby
dylan_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
paradoja has joined #ruby
haxrbyte has joined #ruby
mmitchell has joined #ruby
shammancer has quit [Quit: Leaving.]
shammancer has joined #ruby
shammancer has quit [Client Quit]
ariedler has joined #ruby
adkron has joined #ruby
shammancer has joined #ruby
cbot_ has joined #ruby
[eDu] has joined #ruby
sayan has joined #ruby
shammancer has quit [Client Quit]
<apeiros> Hanmac1: sorry, I'm at work, too long to read that here :-/
statarb3 has quit [Read error: Connection reset by peer]
<blambam> i'm still confused. when would i want to use module_function over extend self?
dylan` has quit [Ping timeout: 264 seconds]
shammancer has joined #ruby
newUser1234 has joined #ruby
justsee has joined #ruby
Czupa has quit [Remote host closed the connection]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: No route to host]
baroquebobcat has joined #ruby
failshell has joined #ruby
sailias has joined #ruby
verysoftoiletppr has joined #ruby
ant384 has joined #ruby
<apeiros> blambam: all the time
<apeiros> extend self is a broken pattern
<apeiros> methods which have no relation to self are "pseudo functions". those should always be private. but the class variant version should be public (otherwise you can't call them)
<apeiros> module_function does exactly that. with extend self, that's annoying to do.
yacks has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
<blambam> nooo!!! i have been using extend self because module_function is more code. for example i can do extend self; def1; def2; private; def3; def4;... and can access def3 and def4 from def1 and def2. can't do that w/ module_function at top
angusiguess has joined #ruby
mneorr has joined #ruby
tomku has quit [Ping timeout: 264 seconds]
<Hanmac1> blambam: " If used with no arguments, subsequently defined methods become module functions."
mattbl has joined #ruby
<blambam> yeah, but it chokes w/ private
sambao21 has joined #ruby
knapper_tech has quit [Ping timeout: 260 seconds]
<blambam> maybe i should try module_function again after private
Evixion has quit [Ping timeout: 264 seconds]
cschneid_ is now known as cschneid
sleetdrop has joined #ruby
Coolhand has joined #ruby
akashj87 has joined #ruby
cbot_ has quit [Ping timeout: 246 seconds]
xbob has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
jon_w has joined #ruby
bigoldrock has quit [Ping timeout: 246 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<lupine> w00t, it runs under ruby2.0
yfeldblum has quit [Quit: Leaving]
chrishunt has quit [Quit: ZzZzZz...]
chrishunt has joined #ruby
BSaboia has joined #ruby
yashshah has quit [Ping timeout: 245 seconds]
cody-- has joined #ruby
<blambam> that gives `foo': undefined method `bar' for TestModule:Module (NoMethodError)
daniel_- has joined #ruby
daniel_- has joined #ruby
<MrZYX> of course
griffindy has joined #ruby
KazW has joined #ruby
seoaqua has quit [Ping timeout: 248 seconds]
tish has quit [Quit: Leaving.]
oponder has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
<blambam> MrZYX: what can i do to fix that, giving foo access to bar, but keeping bar private
vlad_starkov has quit [Remote host closed the connection]
nezumi has joined #ruby
asphyxia has joined #ruby
kpshek has joined #ruby
adamjleonard has joined #ruby
jkim has left #ruby ["WeeChat 0.4.0"]
ananthakumaran has quit [Quit: Leaving.]
jtharris has joined #ruby
vlad_starkov has joined #ruby
<blambam> anyone?
baroquebobcat has quit [Quit: baroquebobcat]
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
<MrZYX> I guess there's no nice way. module_function _copies_ the methods to the eigenclass, so you could open that and call private in it
<blambam> MrZYX: ahh... thanks for reminding me of it making a copy
beneggett has joined #ruby
lessless has joined #ruby
alx- has joined #ruby
camilasan has quit [Remote host closed the connection]
<MrZYX> but maybe one just shouldn't put logic that's so complex that it requires splitting up in private methods as static functions into a module. I'd consider using a class instead
Axa_ has quit [Quit: Page closed]
<blambam> just kind of weird because it doesn't need instantiation
<blambam> there is no state
end_guy has quit [Remote host closed the connection]
atmosx has quit [Quit: And so the story goes…]
adambeynon has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
tootooroo has quit [Ping timeout: 264 seconds]
thebastl has joined #ruby
forced_request has joined #ruby
camilasan has joined #ruby
ph^ has quit [Remote host closed the connection]
hiyakashi has joined #ruby
[eDu] has quit [Quit: [eDu]]
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
end_guy has joined #ruby
mikemac has quit [Quit: Konversation terminated!]
<Hanmac1> shevy yeah i added also notifies for something that is calculated :P ... like an mthod returns an calculated value, u build a way to call the observers when the calculated value changes ..
crazymykl has joined #ruby
RORgasm has joined #ruby
newUser1234 has quit [Remote host closed the connection]
flyinprogramer has quit [Quit: flyinprogramer]
<apeiros> blambam: http://pastie.org/7370702 works fine for me, what's your issue with it?
girija has quit [Ping timeout: 252 seconds]
burntbit has joined #ruby
d2dchat has joined #ruby
<MrZYX> apeiros: he wants to call the private function from the module function, which doesn't work since they end up in different classes
<apeiros> blambam: "it chockes with" is not a usable problem description. provide code and exception please.
<apeiros> MrZYX: huh? errr… what? :)
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
beneggett has quit [Quit: Computer has gone to sleep.]
<MrZYX> module_function copies the methods into the eigenclass of the module
paper_ has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
<waxjar> never heard of module_function before
theRoUS has quit [Read error: Connection reset by peer]
<apeiros> MrZYX: I know how module_function works
<apeiros> I don't understand what blambam wants to do, or does do
v0n has joined #ruby
<MrZYX> did you see his pastie?
<apeiros> MrZYX: ah, didn't scroll up high enough it seems. no. looking at it now.
philcrissman has joined #ruby
rippa has joined #ruby
andikr has quit [Remote host closed the connection]
niklasb has joined #ruby
NiteRain has joined #ruby
alxscms has joined #ruby
generalissimo has joined #ruby
bean__ has joined #ruby
<Hanmac1> shevy apeiros did some of you use test/unit? what must i do when i want something to be runned before all tests?
<apeiros> I question the design of such a thing - but blambam - just use module_function for all of them and then private_class_method :all, :your, :private, :class, :methods
chase-work has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> Hanmac1: def setup in your testcase
realDAB has quit [Quit: realDAB]
Neomex has joined #ruby
alxscms has quit [Client Quit]
adkron has quit [Quit: leaving]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
robscomp_ has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
tagrudev has left #ruby ["lolst"]
theRoUS has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
gyre007 has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
gyre007 has joined #ruby
aganov has quit [Remote host closed the connection]
gyre007 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
gyre008 has joined #ruby
rismoney has joined #ruby
Pochacco has quit [Quit: Pochacco]
jlast has joined #ruby
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
tmiller has joined #ruby
dmerrick has joined #ruby
tonini has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
jonathanwallace has quit [Ping timeout: 264 seconds]
MrZYX is now known as MrZYX|off
ttt_ has quit [Remote host closed the connection]
<Hanmac1> shevy & apeiros: no i can do: battler.observe(:states_chance_changed) {...} but :states_chance_changed is not an event an specific function does throw because nearly everything can change everything ... so states_chance is not an attribute, thats why i image some kind of auto_observe that you can put around the parts that could affect other parts :P
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
blambam has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
nkr has quit [Ping timeout: 264 seconds]
drale2k has quit [Quit: Leaving...]
hogeo has joined #ruby
tootooroo has joined #ruby
emocakes has quit [Quit: emocakes]
nateberkopec has joined #ruby
Al__ has quit [Ping timeout: 248 seconds]
braoru has quit [Quit: Leaving]
<Xeago> apeiros: you seen http://www.confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years ? Whats your opinion on the talk?
tootooroo has quit [Read error: Connection reset by peer]
<shevy> not enough boobs
<Hanmac1> shevy i increase the evilness of my code, do you want to see it? :P
<apeiros> Xeago: not seen it yet, no. probably wouldn't get around until wednesday either.
hiyakashi has quit [Quit: お前は知りすぎた]
jsaak has quit [Ping timeout: 252 seconds]
markalanevans has joined #ruby
jsaak has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
Nisstyre-laptop has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
ph^ has joined #ruby
pyrac has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
awarner has joined #ruby
tootooroo has joined #ruby
alup has quit [Quit: Leaving]
AlSquire has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
AlSquire has joined #ruby
markalanevans has quit [Client Quit]
newUser1234 has joined #ruby
thinkdevcode has joined #ruby
guns has joined #ruby
<Vivekananda> hey every one a rest and I a back
newUser1234 has quit [Remote host closed the connection]
etcetera has joined #ruby
newUser1234 has joined #ruby
<paper_> Vivekananda: how exciting :)
beneggett has joined #ruby
v0n has quit [Read error: Connection reset by peer]
v0n has joined #ruby
<shevy> Hanmac1 I must destroy your code
baroquebobcat has quit [Quit: baroquebobcat]
angusiguess has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
brennanMKE has joined #ruby
<Hanmac1> shevy you can try it :P show me a way how it can be done better
MarioEIU has joined #ruby
niceguyjames has quit [Ping timeout: 252 seconds]
<Vivekananda> paper_ I a coding you
<Vivekananda> am coding you actually . A game of paper scissors and stone
krawchyk has joined #ruby
<paper_> Vivekananda: that's funny, im beating you with a stick while i release a stream of insults about your family and entire chain of ancestors
<shevy> paper_ lol
Kruppe has quit [Remote host closed the connection]
<Hanmac1> Vivekananda: and the next DLC includes Lizard and Spock ;P
<Vivekananda> paper_lol : you this old and still in temper tantrums. Grow up for heavens sake!!
akashj87 has joined #ruby
<Vivekananda> shevy howdy :)
kf8a has joined #ruby
niceguyjames has joined #ruby
randomautomator has joined #ruby
<Vivekananda> I am doing that code and hope people will be like the rubymonks. I love that site
<Vivekananda> Is there nothing similar for java
Al__ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<Hanmac1> if Blizzard would make an Rock Paper Scissors game all of them would be realased in extra Games ... and if EA would publish them, they all would need internet connection :P
markalanevans has joined #ruby
<Vivekananda> I go to the java channel and proclaim that I am a newbie ( I am not that much of a nebie in java) and ask them
<Xeago> apeiros: you still doing the lunch pairing thing?
ismell has joined #ruby
<ismell> ello
<ismell> i'm doing a 'exec *%W[rake server]'
xclite has joined #ruby
<adac> How to add a value to an existing openstruct object?
MrZYX|off is now known as MrZYX
<ismell> but when I do a ps it shows that its executing as sh -c rake server
<ismell> how do I prevent it from starting a shell?
Vainoharhainen has quit [Quit: Leaving...]
Neomex has quit [Quit: Neomex]
<Vivekananda> that for interviews I am asked some weird questions so should I go and read the cathy sierra and bates book and get it done for such questions as -- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class
<Xeago> not sure if system() starts a shell, try that
<ismell> well exec should replace the existing process
AlSquirrel has joined #ruby
<Vivekananda> and they just tell me there is no way :( just do and learn instead of getting a good book to learn
sambao21 has joined #ruby
<ismell> and the man says if i give it an array of args it will just exec with out a shell
<Hanmac1> shevy: i make an update for you: https://gist.github.com/Hanmac/46aa0ecda5d117ed061d
BizarreCake has quit [Ping timeout: 245 seconds]
a_a_g has joined #ruby
<apeiros> Xeago: I wanted to finish that one on sunday - and then I suddenly spent 9h shopping & 7h helping my brother build a cupboard :-S (and gone was the week-end)
<Vivekananda> comments welcome and me back to the rock paper .. land
<apeiros> I'll probably finish it this week, though
<Xeago> is it a weekend project :O?
<apeiros> depends a bit how much time I get at the evening
<apeiros> yes, it's nothing official
pduin has quit [Remote host closed the connection]
<Xeago> bummer
<apeiros> indeed :)
cantonic has quit [Quit: cantonic]
BizarreCake has joined #ruby
<apeiros> if we didn't have such long task lists, I would probably even get time for it at company time - but the current workload is brutal.
<Hanmac1> Xeago: do you want to see my feaking scripting code ? (its for a game engine someday)
mando has joined #ruby
spanner has joined #ruby
AlSquire has quit [Ping timeout: 245 seconds]
guns has quit [Quit: guns]
johnmlocklear_ has quit [Ping timeout: 264 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
<Xeago> Hanmac1: your stuff scares me
<Hanmac1> :PP
chase-work has joined #ruby
predator217 has quit [Ping timeout: 264 seconds]
jbueza has joined #ruby
<Xeago> not so the meta stuff and hacky stuff you do
<Vivekananda> no one ?
<Vivekananda> nothing ?
predator117 has joined #ruby
ananthakumaran has joined #ruby
<Xeago> but the stuff I don't know about ruby, core et
<Xeago> c
<Xeago> Vivekananda: during my scrollback I couldn't understand you
<Hanmac1> Xeago its currently Ruby only, but its so meta that even shevy is scared ;P
markalanevans has quit [Quit: markalanevans]
<Vivekananda> Xeago it is just ---- hm let me collate it for you
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
<Vivekananda> 1. I hope there is a rubymonks like thing in java
<Vivekananda> 2. It was about java interview questions and they ask some weird ones. ( This was an off topic). I was wondering why people in java tell me not to learn stuff about weird quesionts from a book coz I normally wont do something like that and hence wont remember it
paper_ has quit [Remote host closed the connection]
mpajor_op5 has quit [Ping timeout: 245 seconds]
b0oh has left #ruby [#ruby]
l0rd_hex has left #ruby ["just e to the step, flick it, stick it and cyalatabye!"]
adamjleonard has quit [Ping timeout: 248 seconds]
mpajor_op5 has joined #ruby
PixelCru_ has joined #ruby
hekin has joined #ruby
codezombie has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
hekin has quit [Client Quit]
admin0 has quit [Read error: Connection reset by peer]
<Xeago> Vivekananda: what questions specifically?
akashj87 has joined #ruby
dmerrick has quit [Remote host closed the connection]
Neandre has joined #ruby
speaking1ode-wor has joined #ruby
Arzaga has joined #ruby
dmerrick has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
cantonic has joined #ruby
adamjleonard has joined #ruby
pbertain has quit [Ping timeout: 252 seconds]
<Vivekananda> Well some such as --- that for interviews I am asked some weird questions so should I go and read the cathy sierra and bates book and get it done for such questions as -- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class ------
csaunders has joined #ruby
JohnBat26 has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
xbob has joined #ruby
<Vivekananda> I meant --- can we have multiple inheritance or what happens if we do not instantiate a method or an abstract class
moofy has joined #ruby
<moofy> ahoy!
blaxter_ has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
adac has quit [Quit: Leaving]
<moofy> I wondered if anyone could suggest what the best way to get some colouring in irb might be? I'm still fairly new to it and it just smooths some things out
robert_ has quit [Ping timeout: 245 seconds]
jurassic has joined #ruby
eykosioux has joined #ruby
i_s has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
stoic_squirrel has joined #ruby
baphled has joined #ruby
monkegji_ has quit [Remote host closed the connection]
xbob has quit [Client Quit]
wedgeV has quit [Ping timeout: 246 seconds]
pyrac has quit [Quit: pyrac]
etcetera has quit []
wolcanus has quit [Remote host closed the connection]
wedgeV has joined #ruby
tootubular has joined #ruby
thebastl has quit [Remote host closed the connection]
akashj87 has quit [Ping timeout: 240 seconds]
nick- has joined #ruby
<apeiros> moofy: define 'best'
freakazoid0223 has joined #ruby
<apeiros> there are gems to do it, or you can use plain old ascii sequences yourself: puts "\e[31mHello!\e[0m"
baroquebobcat has joined #ruby
hmarr has quit [Ping timeout: 252 seconds]
paper_ has joined #ruby
tjbiddle has joined #ruby
Davey has joined #ruby
Astralum has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
<waxjar> moofy, try pry if you'd like a syntax-highlighted REPL
hmarr has joined #ruby
<moofy> okay, thanks
<moofy> just to make learning stuff a little bit easier
mmitchell has joined #ruby
<moofy> i guess it's my synesthesia coming out
thetristan_ has joined #ruby
sonda has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
Astral__ has quit [Ping timeout: 264 seconds]
beneggett has joined #ruby
paper__ has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
elux has joined #ruby
wsterling has joined #ruby
predator117 has joined #ruby
mpfundstein is now known as lmf40
mockra has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
carlyle has joined #ruby
sonda has joined #ruby
oneiroph1en has joined #ruby
robscomputer_ has joined #ruby
x0F has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
_maes_ has joined #ruby
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
adambeynon has joined #ruby
[eDu] has joined #ruby
Michae___ has joined #ruby
gaahrdner has quit [Remote host closed the connection]
<ismell> hrmm
mmitchell has quit [Ping timeout: 264 seconds]
gaahrdner has joined #ruby
<ismell> sh -c 'my command'; if i send a sigterm to that pid it doesn't kill 'my command'
MarioEIU has left #ruby [#ruby]
_if has quit [Remote host closed the connection]
wyattg has joined #ruby
girija has joined #ruby
cody-- has quit [Quit: goodbye]
<oponder> Anyone know how to get the current ruby process's memory usage? Twist: In windows.
mmitchell has joined #ruby
harumph has joined #ruby
drale2k has joined #ruby
mikepack has joined #ruby
peta_ has quit [Quit: peta_]
Tectonic has joined #ruby
vetsin_ is now known as vetsin
Ontolog has joined #ruby
gaahrdner has quit [Ping timeout: 245 seconds]
chrishough has joined #ruby
<Hanmac1> oponder ruby uses memory
wunz_ is now known as wunz
moofy has left #ruby [#ruby]
_if has joined #ruby
<oponder> I can imagine it already. My webconsole showing the health of some distributed ruby processes in windows. Under the memory usage column: "Yes. Memory being used."
sayan has quit [Quit: Leaving]
sayan has joined #ruby
carloslopes has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
mockra has joined #ruby
gaahrdner has joined #ruby
ttt has joined #ruby
puppeh has quit [Remote host closed the connection]
<oponder> ;)
jgrevich has joined #ruby
dr_bob has quit [Quit: Leaving.]
<Hanmac1> i think ruby does not have the posibillites to know how much memory its been using
burntbit has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 240 seconds]
_if has quit [Remote host closed the connection]
airtonix has joined #ruby
_if has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
ttt has quit [Ping timeout: 256 seconds]
<oponder> darn..
<oponder> I'll look into having some other monitoring process running next to it
robbyoconnor has joined #ruby
predator117 has joined #ruby
erichmenge has quit [Quit: Arrivederci!]
davidcelis has quit [Quit: K-Lined.]
droppedonmyhead has joined #ruby
gaahrdner has quit [Remote host closed the connection]
<droppedonmyhead> hey everyone
<droppedonmyhead> what's the best ruby paste bin?
erichmenge has joined #ruby
davidcelis has joined #ruby
<spanner> i'm trying to get a median, but this line: return len % 2 == 1 ? sorted[len/2] : (sorted[len/2 - 1] + sorted[len/2]).to_f / 2
marr has quit [Ping timeout: 252 seconds]
<wmoxam> droppedonmyhead: gist
<spanner> returns undefined method `+' for nil:NilClass (NoMethodError)
wolcanus has joined #ruby
pitzips has joined #ruby
<Sou|cutter> spanner: sorted[len/2 - 1] <-- this is nil
Tectonic has quit []
girija has quit [Ping timeout: 276 seconds]
ckrailo has joined #ruby
ShellFu has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Neandre has quit [Ping timeout: 264 seconds]
artofraw has joined #ruby
blaxter_ is now known as blaxter
huoxito has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
kqr has joined #ruby
philcrissman has quit [Remote host closed the connection]
<kqr> i have a ruby application cloned, and it has a rakefile, but i have no idea how to install it with rake. can I ask this here or should i find #rake or something?
robbyoconnor has joined #ruby
Zolo has joined #ruby
<bean__> kqr: what is the app?
<kqr> sup
<kqr> a mail client, sort of
<kqr> i could just go with the version in the package manager, but i'd like a specific branch of it
<kqr> and i don't think there's any prepackaged release of that
slainer68 has quit [Remote host closed the connection]
<bean__> unlikely
girija has joined #ruby
<bean__> usually repos like that will have a readme
jonathanwallace has joined #ruby
<bean__> or somesuch
[eDu] has quit [Quit: [eDu]]
mikelodeon has quit [Quit: mikelodeon]
<kqr> good point
<kqr> i didn't even think about checking for that
<Hanmac1> kqr do "rake -T" in the dir, maybe it shows something helpfull
pi3r has quit [Quit: Leaving]
jamie_ca_ has joined #ruby
<kqr> Hanmac1, rake aborted
xardas has joined #ruby
wolcanus has quit [Ping timeout: 260 seconds]
philcrissman has joined #ruby
ph^ has quit [Remote host closed the connection]
carloslopes has joined #ruby
<kqr> bean__, the readme says "gem install sup"
<kqr> bean__, does that sound good?
beneggett has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
<bean__> yeah, that's how you'd do it without messing with the source
ph^ has joined #ruby
<bean__> and just have your system handle it
<kqr> okay
wyattg has quit [Quit: Konversation terminated!]
<kqr> does that install from the source though, or from some external library?
Vivekananda has quit [Quit: Ex-Chat]
sambao21 has quit [Quit: Computer has gone to sleep.]
Vivekananda has joined #ruby
verysoftoiletppr has quit []
filipe has quit [Remote host closed the connection]
girija has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Remote host closed the connection]
frem has joined #ruby
endzyme has joined #ruby
tmiller has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
matti has quit [Quit: Oh dear...]
wyattg has joined #ruby
wolcanus has joined #ruby
beneggett has joined #ruby
lmf40 has quit [Remote host closed the connection]
eladmeidar has quit [Ping timeout: 264 seconds]
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
gaahrdner has joined #ruby
tootooroo has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
FLeiXiuS` has quit [Ping timeout: 256 seconds]
Voodoofish430 has joined #ruby
martinklepsch has quit [Ping timeout: 246 seconds]
sambio has quit [Client Quit]
elkclone has joined #ruby
monkegjinni has joined #ruby
bigoldrock has joined #ruby
<kqr> oh well, the rake file seems unrelated to installing
nkr has joined #ruby
<kqr> it just looks like something that's triggered when a new version is pushed or something
<Hanmac1> hm maybe ... i use rake to build the gems
PixelCru_ has quit [Remote host closed the connection]
choobie has joined #ruby
Zolo has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
Zolo has joined #ruby
GeekOnCoffee has left #ruby [#ruby]
carloslopes has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
Lockzi has joined #ruby
<kqr> maybe i'll just have to go with the prepackaged version and lose a few features
maletor has joined #ruby
<kqr> because this project isn't maintained at all so it's really difficult to get into from a non-ruby-user standpoint
Hanmac2 has joined #ruby
zph has joined #ruby
mahmoudimus has joined #ruby
Zolo has quit [Ping timeout: 240 seconds]
eladmeidar has joined #ruby
endzyme has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 240 seconds]
endzyme has joined #ruby
mmitchel_ has joined #ruby
zeade has joined #ruby
girija has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
etcetera has joined #ruby
predator117 has joined #ruby
FLeiXiuS` has joined #ruby
<kqr> Hanmac1, if the project has a bin/ directory which seems to contain well... the code for the project, do you think it could be safe to just copy paste those binaries to some location in my $PATH?
<kqr> Hanmac1, or do ruby projects usually need additional set up?
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
Hanmac1 has quit [Ping timeout: 246 seconds]
subbyyy_ has quit [Ping timeout: 248 seconds]
oponder has quit [Remote host closed the connection]
entr0py_ has quit [Remote host closed the connection]
tjbiddle has joined #ruby
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
oponder has joined #ruby
keymone_ has quit [Quit: keymone_]
stkowski has joined #ruby
oponder has quit [Remote host closed the connection]
Czupa has joined #ruby
Ontolog has quit [Remote host closed the connection]
norm has joined #ruby
snorkdude has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
ephemerian has quit [Quit: Leaving.]
razibog has joined #ruby
nkr has quit [Read error: Connection reset by peer]
<kqr> i might be trying some other similar application
<kqr> thanks for your patience anyway
chandankumar has joined #ruby
nkr has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
thebastl has joined #ruby
dmerrick has quit [Remote host closed the connection]
cbot_ has joined #ruby
Pochacco has joined #ruby
<ismell> hrmm, why does exec('my cmd') execute sh -c 'my cmd' instead of sh -c 'exec my cmd'?
Zolo has joined #ruby
Al__ has joined #ruby
thebastl has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
tmiller has joined #ruby
gaahrdner has quit [Ping timeout: 245 seconds]
tjbiddle has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
tjbiddle has joined #ruby
<tommylommykins> what's the difference between Range#cover? and Range#include?
<tommylommykins> ?
Hanmac has joined #ruby
dhruvasagar has joined #ruby
dagobah has quit [Remote host closed the connection]
<otters> the name
jcheng has joined #ruby
<tommylommykins> no, they have different implementations
tevio has quit [Remote host closed the connection]
<tommylommykins> oh
<tommylommykins> so Range#cover? has semantics that nobody would actually want?
<otters> oh
eladmeidar has quit [Ping timeout: 245 seconds]
<otters> yeah, assuming nobody wants those semantics
kqr has left #ruby ["WeeChat 0.3.8"]
Yakko has joined #ruby
<paper__> tommylommykins: what's the difference in behaviour?
dawkirst has quit [Ping timeout: 245 seconds]
dylan_ has quit [Ping timeout: 245 seconds]
<tommylommykins> paper__: ('a'..'z').cover? 'cc' #=> true
<Matip> !paste
eladmeidar has joined #ruby
<tommylommykins> ('a'..'z').include? 'cc' #=> false
thebastl has joined #ruby
<Matip> @paste
<Matip> u.u
ngcazz has joined #ruby
<apeiros> tommylommykins: (a..b).cover?(c) is c.between?(a,b) afaik
<apeiros> whereas (a..b).include?(c) is (a..b).to_a.include?(c)
Nimsical has quit [Quit: Computer has gone to sleep.]
<apeiros> +equivalent to
<apeiros> and the reason that #cover? was added was exactly because people *wanted* those semantics.
<Xeago> Matip: see the topic for a pastie site
<apeiros> don't fall to the illusion that your use-cases were everybody's use-cases.
<Matip> yeah, I saw it :P
<tommylommykins> apeiros: I'm just a bit angry that cover? is not what I wanted
subbyyy_ has joined #ruby
Zolo has quit [Remote host closed the connection]
tmiller has quit [Ping timeout: 252 seconds]
<apeiros> tommylommykins: d'uh. get yourself some 'ri'.
Shadow_S has joined #ruby
<tommylommykins> apeiros: I read the documentation, and I thought "hey, that looks like what I want!"
lkba has joined #ruby
jdrap has quit [Quit: jdrap]
<paper__> tommylommykins: what do u want
mityaz has joined #ruby
<tommylommykins> paper__: I wanted Range#include?
Yakko has quit [Ping timeout: 252 seconds]
k610 has quit [Ping timeout: 245 seconds]
mljsimone has quit [Remote host closed the connection]
pioz has quit [Read error: Operation timed out]
bricker has joined #ruby
MehLaptop has joined #ruby
<Matip> what!? I just realized you can't inherit from a class that was not already defined, even if it's in the same file..
tylersmith has joined #ruby
<apeiros> tommylommykins: um, I find the docs pretty clear on #cover? (and there are definitively parts where rubys documentation could be improved)
<apeiros> I'll see whether I can get a patch in which emphasizes the difference to #include? anyway
<Hanmac> Matip: what else did you suspect?
<tommylommykins> :)
<Matip> being able to do so
<tommylommykins> apeiros: "Returns true if obj is between the begin and end of the range." -- that makes it looks like it has the semantics of #include?
<tommylommykins> at least, when I scanned it, it did
cbot_ has quit [Ping timeout: 256 seconds]
<Matip> class Foo < Bar ... end \n class Bar ... end
<Matip> like that ^
bricker_ has quit [Ping timeout: 245 seconds]
<bean__> have to define bar first
<apeiros> tommylommykins: I'd disagree. they explicitly state <= just below that
<bean__> so, that'd work if Foo was below your bar
<apeiros> tommylommykins: I can see that one can *mistake* it as such. but I'd hold that this is because natural language is imprecise in nature and not because of ambiguous documentation.
<tommylommykins> apeiros: Sure, the documentation is explicit, it's just that given that it's so similar to #include?, accidentally picking the wrong one becomes easier
chipotle_ has joined #ruby
<apeiros> tommylommykins: which is why I'll try to get a doc patch accepted.
<tommylommykins> :)
<ngcazz> Matip: if you require that code organization just stick class Bar; end before class Foo < Bar; ..., end
cha1tanya has joined #ruby
<Hanmac> Matip ruby cant know if you devine a Bar class later
<apeiros> what's sad is that #include? is actually special cased as it seems
<apeiros> (1.0..2.0).include?(1.5) # works like #cover?
<apeiros> I think all numeric range values are special cased
<breakingthings> Matip: find me a lang that can do that an I will show you a magic trick
MehLaptop has quit [Read error: Connection reset by peer]
chandankumar has quit [Quit: Leaving]
<Matip> any two phased compilation lang
<Matip> or whatever it's called
<apeiros> I guess I'll have to read the actual source before patching the docs
MehLaptop has joined #ruby
carloslopes has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
<Hanmac> apeiros: ri Range#included? says this: " If begin and end are numeric, comparison is done according to the magnitude of the values."
eladmeidar has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
pioz has joined #ruby
eladmeidar has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
<Matip> breakingthings, so what's the trick?
<breakingthings> Matip: I suppose I deserve that for not specifying constraints to that
maxmanders has quit [Quit: Computer has gone to sleep.]
<breakingthings> Soooo
chandankumar has joined #ruby
<breakingthings> My magic trick is disappearing
breakingthings has quit [Quit: *poof*]
<apeiros> Hanmac: source says integer is handled differently from other numerics… may just be for performance, but I'll read it through before patching anyway.
<Matip> wtf? xD
<ngcazz> that was silly
<Xeago> rofl ;0
<Xeago> nah, funny and accurate
dawkirst has joined #ruby
kpshek has quit []
nga4 has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
AltGrendel has left #ruby [#ruby]
<apeiros> lol, tweet from PLT_Borat: `is koan for PLT student is "why is lambda-the-ultimate.org write in PHP?"`
spider-mario has joined #ruby
chrishough has quit [Quit: chrishough]
camilasan has quit [Remote host closed the connection]
chrisnicola has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
chrisnicola has quit [Remote host closed the connection]
chrisnicola has joined #ruby
kpshek has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
jgrevich has quit [Quit: jgrevich]
marcdel has joined #ruby
etcetera has joined #ruby
markalanevans has joined #ruby
dmerrick has joined #ruby
eladmeidar has quit [Ping timeout: 245 seconds]
nalaginrut has quit [Ping timeout: 264 seconds]
tmiller has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
jgrevich has joined #ruby
invisime has quit [Quit: Leaving.]
tootooroo has joined #ruby
apeiros has quit [Remote host closed the connection]
cbot_ has joined #ruby
dustint has quit [Ping timeout: 260 seconds]
chase-work has quit [Quit: Textual IRC Client: www.textualapp.com]
beneggett has joined #ruby
<Matip> module Zzz class Bar ... end class Foo < Bar ... end end
<Matip> it works, but what happens if Bar should be private?
<ShellFu> for those interested who have yet to read it
anderse has joined #ruby
<Matip> do you do this? module Zzz private class Bar ... end public class Foo < Bar ... end end
Elhu has quit [Quit: Computer has gone to sleep.]
tootooroo has quit [Read error: Connection reset by peer]
girija has quit [Ping timeout: 246 seconds]
sayan has joined #ruby
tootooroo has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
dmiller2 has joined #ruby
pyrac has joined #ruby
chrishough has joined #ruby
fire has quit [Ping timeout: 246 seconds]
kf8a has quit [Ping timeout: 252 seconds]
Proshot has joined #ruby
<paper__> Matip: private_const :Bar
<Matip> ah, nice. thank you
banseljaj has left #ruby ["co'o ro do"]
predator117 has quit [Ping timeout: 264 seconds]
<paper__> Matip: it could be private_constant
<paper__> yeah
<paper__> private_constant
carraroj has quit [Quit: Konversation terminated!]
rupee has joined #ruby
thetristan_ has quit [Quit: thetristan_]
troessner has quit [Quit: Leaving]
robbyoconnor has quit [Max SendQ exceeded]
stoic_squirrel has quit [Quit: Textual IRC Client: www.textualapp.com]
<kenichi> is there a way to run only one minitest describe block?
robbyoconnor has joined #ruby
freerobby has joined #ruby
cha1tanya has quit [Quit: Leaving]
kirun has quit [Ping timeout: 246 seconds]
indyrl has joined #ruby
atno has quit [Ping timeout: 260 seconds]
Animawish has joined #ruby
oponder has joined #ruby
hamakn has quit [Remote host closed the connection]
unstable has left #ruby [#ruby]
heftig has quit [Ping timeout: 245 seconds]
<kenichi> or.... is that a sign this spec file is too big? :)
rakun has quit [Remote host closed the connection]
dustint has joined #ruby
oponder has quit [Remote host closed the connection]
dmiller2 has quit [Ping timeout: 245 seconds]
allaire has joined #ruby
allaire has quit [Excess Flood]
jlebrech has quit [Quit: Leaving]
sambao21 has joined #ruby
itman_ is now known as itman
kpshek has quit []
Sicp has joined #ruby
allaire has joined #ruby
allaire has quit [Excess Flood]
chipotle_ has quit [Quit: cya]
predator117 has joined #ruby
heftig has joined #ruby
chussenot has quit [Quit: chussenot]
Michae___ is now known as jquinn
jbueza1 has joined #ruby
jbueza1 has quit [Max SendQ exceeded]
jbueza1 has joined #ruby
kenneth has quit [Quit: kenneth]
jbueza has quit [Read error: Connection reset by peer]
tenmilestereo has joined #ruby
eldariof has joined #ruby
baba has joined #ruby
Nuck has quit [Ping timeout: 264 seconds]
sambao21 has quit [Ping timeout: 245 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
<Vivekananda> hey anyone use eclipse
girija has joined #ruby
aytch has quit [Remote host closed the connection]
ismell has left #ruby [#ruby]
d2dchat has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 276 seconds]
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
banjara has joined #ruby
Zai00 has quit [Read error: Operation timed out]
atno has joined #ruby
vlad_starkov has joined #ruby
ruckerz has quit [Read error: Connection reset by peer]
jdunck has joined #ruby
ruckerz_ has joined #ruby
Ontolog has joined #ruby
blaxter has quit [Ping timeout: 252 seconds]
pioz has quit [Ping timeout: 246 seconds]
s0ber has joined #ruby
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
Andromeda has joined #ruby
motto has joined #ruby
tootooroo has quit [Ping timeout: 256 seconds]
djwonk has joined #ruby
philcrissman has quit [Remote host closed the connection]
dustint has quit [Ping timeout: 256 seconds]
m8 has quit [Ping timeout: 252 seconds]
lmf40 has joined #ruby
kpshek has joined #ruby
apeiros has joined #ruby
eykosioux has quit [Remote host closed the connection]
eykosioux has joined #ruby
sambao21 has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
enriclluelles has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
Davey has joined #ruby
emmanuelux has joined #ruby
johnmlocklear_ has joined #ruby
Al__ has quit [Quit: Al__]
eykosioux has quit [Ping timeout: 245 seconds]
k610 has joined #ruby
freerobby has quit [Quit: Leaving.]
mafolz has quit [Remote host closed the connection]
chandankumar has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
peta_ has joined #ruby
ruckerz has joined #ruby
aytch has joined #ruby
ebobby has joined #ruby
KazW is now known as KazW_away
thetristan has joined #ruby
dmerrick has quit [Remote host closed the connection]
roobynoob has joined #ruby
gaahrdner has joined #ruby
<roobynoob> hello
Morkel has quit [Quit: Morkel]
ruckerz_ has quit [Read error: Operation timed out]
<roobynoob> stupid question. im using the ternary operator for full name
<roobynoob> self.first name ? self.first_name : self.last_name
<roobynoob> how do i get it to show both when both names are provided?
dmerrick has joined #ruby
anderse has quit [Quit: anderse]
KazW_away is now known as KazW
Ontolog_ has joined #ruby
Matip has quit [Ping timeout: 245 seconds]
<marwinism> Is it possible to create a relativly versatile method that converts whatever veriable its passed into JSON?
roobynoob is now known as blahwoop
ananthakumaran has joined #ruby
paper__ has quit [Remote host closed the connection]
<elaptics> roobynoob:just do: [first_name, last_name].join(" ")
<elaptics> blahwoop: ^
<elaptics> blahwoop: that'll output whatver has been provided, and if both then you'll end up with a space between them both
Neandre has joined #ruby
Ontolog has quit [Ping timeout: 245 seconds]
sambio has joined #ruby
<marwinism> Or has anyone tried MultiJSON?
Nisstyre-laptop has joined #ruby
willejs has quit [Quit: willejs]
predator117 has joined #ruby
Nuck has joined #ruby
dustint has joined #ruby
tootooroo has joined #ruby
MehLaptop has quit [Read error: Connection reset by peer]
sonda has quit [Remote host closed the connection]
kenneth has joined #ruby
MehLaptop has joined #ruby
Sacha_ has joined #ruby
maxmanders has joined #ruby
KJM has joined #ruby
Neandre has quit [Ping timeout: 252 seconds]
Sacha_ is now known as Neandre
jurassic has quit [Quit: jurassic]
zeade has quit [Quit: Leaving.]
KJM has quit [Client Quit]
knapper_tech has joined #ruby
zeade has joined #ruby
wyhaines has joined #ruby
<Xeago> what is syntactically wrong with this: score.include? @love && !score.include? @hate
LennyLin_ has quit [Remote host closed the connection]
LennyLinux has joined #ruby
a_a_g has joined #ruby
tootooroo has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
<MrZYX> score.include?(@love) && !score.include?(@hate) or score.include?(@love && !score.include?(@hate))
<elaptics> Xeago: It's ambiguous to the parser. Put the parentheses in the appropriate places
shock_one has joined #ruby
divout has quit [Quit: Leaving.]
wolcanus has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
mahmoudimus has joined #ruby
zeade has quit [Quit: Leaving.]
predator117 has quit [Ping timeout: 256 seconds]
paper_ has joined #ruby
c0rn has joined #ruby
predator117 has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
arya has joined #ruby
kirun has joined #ruby
Pochacco has quit [Read error: Connection reset by peer]
Pochacco has joined #ruby
etcetera has quit []
<Xeago> can this be written any shorter/more ruby-way'er? http://hastebin.com/haboketodo
Arzaga has joined #ruby
zeade has joined #ruby
wedgeV has quit [Read error: Connection reset by peer]
arietis has joined #ruby
wedgeV has joined #ruby
subbyyy_ has quit [Read error: Connection reset by peer]
zeade has quit [Client Quit]
nyuszika7h_ has joined #ruby
strax has quit [Ping timeout: 256 seconds]
zeade has joined #ruby
<ngcazz> Xeago: all i can see is you could use score = Hash.new(0)
<ngcazz> instead of your two lines
arya has quit [Ping timeout: 248 seconds]
subbyyy_ has joined #ruby
dhruvasagar has joined #ruby
wald0 has quit [Ping timeout: 256 seconds]
jonahR has joined #ruby
beneggett has joined #ruby
kenichi has quit [Ping timeout: 256 seconds]
BBonifield has quit [Ping timeout: 256 seconds]
snorkdude has quit [Quit: snorkdude]
kenichi has joined #ruby
nyuszika7h has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has quit [Quit: Leaving]
breakingthings has joined #ruby
<Xeago> thanks
<MrZYX> maybe += 1
BBonifield has joined #ruby
tootooroo has joined #ruby
nyuszika7h_ is now known as nyuszika7h
<Xeago> doesn't work on hashes afaik
mneorr has quit [Remote host closed the connection]
<Xeago> does work!
<MrZYX> yup
<ngcazz> Xeago: you can also perform parallel assignment inside the block
nightfalcon has joined #ruby
drale2k has quit [Quit: Leaving...]
<ngcazz> and turn the each call into a one-liner
love_color_text has joined #ruby
arya has joined #ruby
mneorr has joined #ruby
<apeiros> Xeago: a += b becomes translated to a = a + b, a.foo += b becomes a.foo = a.foo + b
<apeiros> works with everything
<Xeago> thought it would alter the integer itself, not what the hash contains
Matip has joined #ruby
asphyxia is now known as asphxia^^
<apeiros> no, = is always assignment (or method call)
<apeiros> integers can't be mutated anyways :)
<Xeago> ngcazz: how would you suggest doing that?
<apeiros> and on a sidenote: ||= and &&= are exceptions to the `<op>=` rule, a ||= b becomes a || a = b instead of a = a || b
<Xeago> apeiros: that I know
<Xeago> one of the first 'caveats of ruby' I learned
<apeiros> and `score[v.hate]= score[v.love] - 1 ` is probably a bug
<apeiros> (automatically resolved when shortening it to -=, though)
<Xeago> yea it was
<Xeago> :P
<Xeago> would you recommend v or voter as the block variable name?
d2dchat has joined #ruby
slainer68 has joined #ruby
<MrZYX> what is voter.love /voter.hate actually returning?
sambio has quit []
tootooroo has quit [Ping timeout: 245 seconds]
<apeiros> Xeago: http://pastie.org/7373932
<Xeago> an integer
<ngcazz> check it out
sayan has quit [Read error: Connection reset by peer]
<Xeago> err, no, a string as a key
etcetera has joined #ruby
<bricker> Shouldn't String#encode be able to replace smart quotes with normal quotes when using `:invalid => :replace` ?
lmf40 has quit [Read error: Connection reset by peer]
elkclone has quit [Quit: It's never too late to unplug and run.]
<MrZYX> Xeago: always the same one?
<apeiros> ngcazz: yeah, parallel assignment method invocation is nice (even mixable with var assignment)
<Xeago> MrZYX: different keys per voter
<MrZYX> mkay
<apeiros> bricker: I think so
lmf40 has joined #ruby
tootooroo has joined #ruby
i_s has quit [Quit: i_s]
<bricker> apeiros: it replaces them with "?" when setting "undef: :replace"
monkegjinni has joined #ruby
ngcazz_ has joined #ruby
<apeiros> bricker: um, because you don't tell it how to replace stuff
<ngcazz_> re
<apeiros> encode doesn't do magic
haxrbyte has quit [Remote host closed the connection]
<bricker> apeiros: I just assumed that common replacements were built-in, my mistake
<ngcazz_> Xeago: did you see the link
haxrbyte has joined #ruby
<apeiros> bricker: there's no such thing as a "common replace"
javiolo1 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hamakn has joined #ruby
rdev has joined #ruby
ngcazz has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
gyre008 has quit [Remote host closed the connection]
Animawish has quit [Quit: Animawish]
twoism has joined #ruby
gyre007 has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
Arzaga has joined #ruby
BizarreCake has quit [Ping timeout: 256 seconds]
etcetera has quit []
rdark has quit [Quit: leaving]
harumph has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
ngcazz_ has quit [Ping timeout: 245 seconds]
hamakn has quit [Ping timeout: 260 seconds]
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
<marwinism> If I have a method that accepts *args, and try to put "%s" % [x] - Is it possible to make each value comma separeted?
wolcanus has joined #ruby
alvaro_o has joined #ruby
alvaro_o has quit [Read error: Connection reset by peer]
jeebster has joined #ruby
tootooroo has joined #ruby
MagBo has quit [Ping timeout: 245 seconds]
etcetera has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
<gf3> marwinism: What is `x`?
i_s has joined #ruby
KazW is now known as KazW_away
<apeiros> marwinism: assuming you meant "%s" % [args], you can replace the whole % expression with just: args.join(', ')
<apeiros> `"%s" % [x]` is a rather verbose and expensive way to say `x.to_s`, btw.
tootooroo has quit [Client Quit]
grenierm has quit [Quit: grenierm]
oconnore has left #ruby [#ruby]
ehaliewicz has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
<marwinism> apeiros: Ofcourse, I should have thought of the join! Thanks!
grenierm has joined #ruby
etcetera has quit [Ping timeout: 245 seconds]
blahwoop has quit [Ping timeout: 245 seconds]
grenierm_ has joined #ruby
huoxito has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
blahwoop has joined #ruby
aytch has quit [Remote host closed the connection]
jquinn has quit [Remote host closed the connection]
wolcanus has quit [Ping timeout: 245 seconds]
baphled has quit [Ping timeout: 240 seconds]
whowantstolivef1 has joined #ruby
rdev has quit [Quit: Linkinus - http://linkinus.com]
tootooroo has joined #ruby
rdev has joined #ruby
<Xeago> where is Hash#sort defined?
<failshell> is there a way to silence system('foo') short of redirecting output?
<yxhuvud> xeago: I'd guess Enumerable.
endzyme has quit [Remote host closed the connection]
catalyst40 has quit [Quit: catalyst40]
<yxhuvud> failshell: well, there are alternatives like popen.
endzyme has joined #ruby
willejs has joined #ruby
<apeiros> Xeago: Hash.instance_method(:sort).owner
_nitti has joined #ruby
<failshell> using backticks supresses output
russfrank has quit [Changing host]
russfrank has joined #ruby
<failshell> maybe that's what i need
<failshell> KISS
<apeiros> failshell: `` captures stdout only
grenierm has quit [Ping timeout: 256 seconds]
grenierm_ is now known as grenierm
<apeiros> stderr will still go to your current ruby process' stderr
jurassic has joined #ruby
<failshell> ah ok
<Xeago> apeiros: says Hash..
<Xeago> not documented tho
<failshell> ill check popen then
<apeiros> Xeago: awesome, for performance probably
baphled has joined #ruby
<Xeago> and it doesn't seem to sort the keys array either..
<apeiros> Xeago: it includes Enumerable and you find the docs there :)
<apeiros> Hash#sort is essentially Hash#to_a.sort
elaptics is now known as elaptics`away
<apeiros> i.e. you { |a,b| a and b will be [key, value] pairs
MehLaptop has quit [Remote host closed the connection]
<apeiros> and you get an array back
Xeago_ has joined #ruby
mockra has quit [Remote host closed the connection]
Xeago is now known as Guest90371
Guest90371 has quit [Killed (hobana.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
thebastl has quit [Remote host closed the connection]
mockra has joined #ruby
<Xeago> {"D2"=>0, "D1"=>-2, "C1"=>2}
<Xeago> ["D2", "D1", "C1"]
<Xeago> how did get sorted?
<Xeago> if anything I'd expect it to be sorted by the key, but this is seemingly random
wolcanus has joined #ruby
<apeiros> Xeago: as said, {"D2"=>0, "D1"=>-2, "C1"=>2}.sort --> ["D2"=>0] <=> ["D1"=>-2] would be one comparison
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
paniconograph14 has joined #ruby
<bean__> Hashes are unsorted.
<apeiros> and Array#<=> will compare from left to right until either one array is done (shorter, hence smaller) or one element of the array returns non-0
<apeiros> bean__: partially incorrect
cobragoat has joined #ruby
Andromeda has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
<bean__> Hashes are not guaranteed to be in any order?
<bean__> :p
<apeiros> a) sorted != ordered, b) hashes are ordered, and from b) comes hashes can be sorted
<apeiros> bean__: yes, they are guaranteed to be in insertion order
<bean__> right
speaking1ode-wor is now known as speakingcode-wor
<apeiros> hashes are only unordered if you're on pre 1.9
<Xeago> hmm, snap!
Rioji has joined #ruby
<apeiros> Xeago: Hash[some_hash.sort_by { |key, value| … }]
mockra has quit [Ping timeout: 245 seconds]
<Xeago> hmm, I actually don't care about the values after the sort
<apeiros> Xeago: Hash[some_hash.sort { |(a_key, a_value), (b_key, b_value)| … }]
<Xeago> so turning it into a hash to only call #keys on it looks bad too
<yxhuvud> Hash.keys.sort?
dmerrick has quit [Remote host closed the connection]
Kruppe has joined #ruby
<apeiros> well then: hash.sort<_by>.map(&:first)
<apeiros> if you don't need the values to perform the sort, yes
<apeiros> then hash.keys.sort is certainly the nicest and most performant
<Xeago> I need to sort on the value, not the key
<yxhuvud> alsmost sounds like you don't need a hash in the first place
<apeiros> then you can't do that. since hash.keys.sort will sort the keys by the key's value
<Xeago> I have a hash to collect votes on keys
<apeiros> hash.sort<_by>.map(&:first) # this one then
<yxhuvud> votes on keys?
mockra has joined #ruby
<apeiros> the vote-count is the value I assume
<apeiros> and he wants a list of things being voted in the order of their vote count
<apeiros> hash.sort_by { |_, value| value }.map(&:first)
<Xeago> I actually only need sorted_keys[0...-1]
<Xeago> which that gives me
tootooroo has joined #ruby
<Xeago> [0...-1] depending on the sorting order ofcourse
MehLaptop has joined #ruby
skroon has joined #ruby
<apeiros> well, you define the sorting order
adambeynon has joined #ruby
<apeiros> default is ascending
pyrac has quit [Quit: pyrac]
headius has joined #ruby
<bricker> So is there a way to say, "Use this hash to replace characters while encoding, otherwise just replace with empty string"?
<apeiros> hash.sort_by { |_, value| -value }.map(&:first) # would emulate descending sort
tealmage has joined #ruby
<apeiros> bricker: ri String#encode
<apeiros> take a look at :fallback
<bricker> apeiros: thanks, I am looking at it but it's unclear still
wolcanus_ has joined #ruby
<apeiros> as said, look at the :fallback option
<bricker> apeiros: I mean, of course I could just write a method that does what I explained, but I'm wondering if there is a combination of options that would achieve the same thing
bagagle has joined #ruby
<Hanmac> apeiros: i think there should be a Hash#sort_by_key_by and Hash#sort_by_value_by or something like that :PP
<apeiros> Hanmac: it's a reasonably common use-case indeed. I'd also settle for Hash#sort and #sort_by returning a Hash, though
br4ndon has joined #ruby
bagagle has quit [Client Quit]
<Xeago> apeiros: I expected Hash#sort to return a hash, and not magically turn it into an array
heliumsocket has joined #ruby
<Hanmac> hm Hashs are perse not sorted :/ (only creation and not insertion sorted) ... hm i think there should be an OrderedHash where you can change the Order
<apeiros> Xeago: it's not really magical
<apeiros> all Enumerable methods return an array
<apeiros> since they just build up on #each
rezzack has joined #ruby
gf3 has quit [Ping timeout: 256 seconds]
<apeiros> Hash defining #sort on its own is only for performance reasons (an implementation detail, if you will)
tootooroo has quit [Ping timeout: 256 seconds]
<apeiros> Hanmac: et tu - ordered != sorted ;-)
wolcanus has quit [Ping timeout: 252 seconds]
<apeiros> sorting is a special case of ordering
etcetera has joined #ruby
frem has quit [Ping timeout: 248 seconds]
<Hanmac> i would be happy with an orderd hash too (when you can change how it is ordered )
jurassic has quit [Quit: jurassic]
nadirvardar has joined #ruby
<apeiros> Hanmac: you can. not trivial, though
<apeiros> I showed a way to sort a hash above
<apeiros> hash.replace(Hash[hash.sort { … }])
fedza has joined #ruby
threesome has joined #ruby
<Hanmac> apeiros: i mean when i add a new value or set an old value with []= there is a difference, because when there was an old value, []= does not add it to the end of each
<apeiros> delete a key before adding it if you want it at the end
<apeiros> inserting in a specific place is annoying, though. especially since it could be O(1) but is O(n) in ruby as it doesn't provide the API to the DLL
mercwithamouth has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
shock_one has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sambao21 has joined #ruby
a_a_g has quit [Quit: Leaving.]
marr has joined #ruby
tootooroo has joined #ruby
paradoja has quit [Ping timeout: 245 seconds]
ephemerian has joined #ruby
DaniG2k has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
paper__ has joined #ruby
drale2k has joined #ruby
mikurubeam has joined #ruby
chandankumar has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
rawng has joined #ruby
Sicp has quit [Quit: Leaving]
Heero has joined #ruby
paper__ has quit [Read error: Connection reset by peer]
paper_ has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tootooroo has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 246 seconds]
<rawng> is this the correct/a friendly place for newbie help?
<apeiros> rawng: no, we're brutal :)
<rawng> :O
<apeiros> just ask ;-)
<MrZYX> ask or die!
<rawng> I want to refer to an unknown number of variables at runtime but don't know how to reference them
<MrZYX> sounds like an array
<rawng> like, @var#{$gvar1[3]} where gvar1 is something like 12345
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
chrishough has quit [Quit: chrishough]
Sacha_ has joined #ruby
echevemaster_ has joined #ruby
<rawng> so I would be referencing @var4
mikurubeam has quit [Ping timeout: 256 seconds]
<apeiros> rawng: you want a hash
<rawng> I know that's the incorrect usage of #{}, but i'm lost
<apeiros> @var = {}; @var[key] = value
Axsuul has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
echevemaster_ has quit [Read error: Connection reset by peer]
Neandre has quit [Ping timeout: 255 seconds]
Elhu has joined #ruby
<rawng> I'll look into that, thanks
<apeiros> and key can be (almost) any object. value can be any object.
echevemaster has joined #ruby
gf3 has joined #ruby
echevemaster_ has joined #ruby
echevemaster_ has quit [Read error: Connection reset by peer]
echevemaster has quit [Remote host closed the connection]
<MrZYX> hm what would be invalid as key?
anderse has joined #ruby
echevemaster has joined #ruby
pyrac has joined #ruby
Apathetic has joined #ruby
<apeiros> MrZYX: a key must respond to #hash and #eql?
<apeiros> and #hash must return an Integer
frem has joined #ruby
<MrZYX> ah
Heero` has joined #ruby
pioz has joined #ruby
<MrZYX> didn't think of BasicObject
<apeiros> but since Object already implements them, objects not having them are rare
rdev is now known as rdev5_work
rdev5_work is now known as rdev5|work
<apeiros> yes, BasicObject would be a prominent example. all others would willingly & knowingly undefine those methods. or redefine them to an invalid definition
Burgestrand has joined #ruby
chrishough has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<swarley> !seen Spooner
<swarley> oh. Guess not
<Hanmac> an Hash could be has itself as key ... it does not make sense but its possible
Heero has quit [Ping timeout: 255 seconds]
Andromeda has joined #ruby
eldariof has quit []
d2dchat has quit [Remote host closed the connection]
LennyLinux has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
tootooroo has joined #ruby
nik_-_ has joined #ruby
ddd has quit [Quit: Upgrading VM]
majikbytes has joined #ruby
predator117 has quit [Ping timeout: 255 seconds]
nomenkun has joined #ruby
lmf40 has quit [Remote host closed the connection]
endzyme has quit [Remote host closed the connection]
endzyme has joined #ruby
lmf40 has joined #ruby
newUser1234 has quit [Remote host closed the connection]
khismetix has joined #ruby
mityaz has quit [Quit: See ya!]
<majikbytes> ls
<MrZYX> . .. no files in here
mando has quit [Remote host closed the connection]
tenmilestereo has quit [Quit: Leaving]
ddd has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
i_s has quit [Quit: i_s]
etcetera has quit []
benweint has joined #ruby
nateberkopec has joined #ruby
nik_-_ has quit [Quit: nik_-_]
<majikbytes> l
dmerrick has joined #ruby
<majikbytes> too bad it doesn't list a list of users
nateberkopec has quit [Read error: Connection reset by peer]
<majikbytes> it should be context-aware
GhettoCode has joined #ruby
nateberkopec has joined #ruby
<MrZYX> it?
nik_-_ has joined #ruby
moshef has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<waxjar> I'm glad it doesn't, there's 897 users in here
<waxjar> *896
<MrZYX> majikbytes: anyway, try /help ;)
g0bl1n has joined #ruby
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
dmerrick_ has joined #ruby
<majikbytes> thanks, I'm irc n00b
<apeiros> majikbytes: /who #ruby
dmerrick has quit [Read error: Connection reset by peer]
<apeiros> or get a decent client which just shows you the list as a sidebar :-p
<apeiros> (mostly useless on channels with >20 users, though)
<g0bl1n> bundle exec with ruby 1.9.3 when running scripts with Gemfiles ?
nateberkopec has quit [Read error: Connection reset by peer]
danslo has quit [Quit: danslo]
<majikbytes> thanks bros, appreciate it
JJMalina has joined #ruby
Morkel has joined #ruby
<MrZYX> g0bl1n: that's a question?
<apeiros> it has a question mark - it must be
eykosioux has joined #ruby
danslo has joined #ruby
mfletcher has joined #ruby
enebo has joined #ruby
<MrZYX> hm, is there a decryption lib stdlib for it?
nateberkopec has joined #ruby
BSaboia__ has joined #ruby
lele has quit [Ping timeout: 246 seconds]
JJMalina has quit [Ping timeout: 245 seconds]
Bry8Star has quit [Ping timeout: 276 seconds]
error_code has joined #ruby
_nitti has quit [Remote host closed the connection]
<apeiros> it?
wolcanus_ has quit [Remote host closed the connection]
etcetera has joined #ruby
piotr has joined #ruby
<MrZYX> the "question", I'm assuming it's encrypted. Somehow
adambeynon has joined #ruby
<apeiros> ah
BSaboia has quit [Ping timeout: 245 seconds]
dustint_ has joined #ruby
<apeiros> try rot13. it might make as much sense as before, though
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
br4ndon has joined #ruby
dustint has quit [Ping timeout: 264 seconds]
lele has joined #ruby
tealmage has quit [Remote host closed the connection]
cupakromer has left #ruby [#ruby]
<apeiros> g0bl1n: in case our sarcasm didn't get through to you - if you want an answer, ask a meaningful question. your current one is not.
mneorr has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
tealmage has joined #ruby
artofraw has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
razibog has quit [Quit: Leaving.]
<peta_> How can I get the path to the ruby file where a class X is defined?
jurassic has joined #ruby
tonini has joined #ruby
<apeiros> peta_: that's not a 1:1 relation
<apeiros> you can "define" a class in as many files as you want
Ankhers has joined #ruby
<peta_> true … shit
<apeiros> you can use Method#source_location on the methods of the class
<apeiros> but that doesn't necessarily give you all places which contain `class X; …; end`
postmodern has joined #ruby
jlast_ has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
anderse has quit [Quit: anderse]
echevemaster has quit [Ping timeout: 245 seconds]
wsterling has quit [Remote host closed the connection]
yashshah has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
predator117 has joined #ruby
sepp2k has joined #ruby
sambao21 has joined #ruby
wsterling has joined #ruby
brennanMKE has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
devyn_ has joined #ruby
devyn has quit [Read error: Connection reset by peer]
bean__ has quit [Quit: Computer has gone to sleep.]
tonini has quit [Remote host closed the connection]
Bry8Star has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<peta_> apeiros: okay, thx. then I will solve it different
sambao21 has joined #ruby
<apeiros> peta_: what problem do you try to solve?
chrisnicola has quit [Quit: This computer has gone to sleep]
yashshah has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<peta_> for every class file MyClass.rb I there is a file MyClass.ttl with metadata (too complicated to explain)
huoxito has quit [Quit: Leaving]
pyrac has quit [Quit: pyrac]
<peta_> I now need to load that metadata and attach it as static attribute to every class by using the inherited hook
Davey has quit [Quit: Computer has gone to sleep.]
benweint has quit [Quit: Computer has gone to sleep.]
whowantstolivef1 has quit [Ping timeout: 245 seconds]
mando has joined #ruby
<apeiros> are those classes all in a directory you know?
bean__ has joined #ruby
<apeiros> if so, just use glob('thedir/**/*.ttl') and build a map
<peta_> they are in the same directory as their according class file
speakingcode-wor has quit [Ping timeout: 252 seconds]
<peta_> what key will the map have? the path to the ttl file?
<apeiros> and/or use a different method to require the class. require_with_meta('foo/bar')
<peta_> (I'm a ruby noob)
<apeiros> the path translated to the class name
<apeiros> ruby convention is all files lowercase btw.
<apeiros> i.e., FooBar::Baz --> foobar/baz.rb
<MrZYX> not foo_bar/baz.rb?
<ddd> no
br4ndon has joined #ruby
jbueza1 has quit [Quit: Leaving.]
<peta_> apeiros: require_with_meta('foo/bar') <-- sounds cool
jbueza has joined #ruby
girija has quit [Ping timeout: 264 seconds]
<apeiros> MrZYX: that'd be rails convention
<ddd> iirc its rails that adds the _ to the class names for inclusions like that, but plain ruby it pulls it in via foobar
<ddd> apeiros: thanks for confirming that
_nitti has joined #ruby
<apeiros> plain ruby doesn't really care actually. it's just convention.
MehLaptop has quit [Remote host closed the connection]
jurassic has quit [Quit: jurassic]
<apeiros> and rails by now also understands ruby convention for autoloading
strax has joined #ruby
anderse has joined #ruby
<ddd> hrmm, weird that you say that. plain ruby projects gave me troubles with the classes when I used _
<ddd> thats why i said what i said. *I* must have done something wierd at that time then.
<apeiros> the fun really starts when people with case insensitive (or case preserving) file systems have foo.rb and require 'Foo'
havenwood has joined #ruby
<apeiros> it'll work on their system but not on any case sensitive file system
<ddd> hehe oh nice. didn't realize that
<ddd> thought ruby would handle that internal to itself. but good to know it doesn't
<MrZYX> hm, I do think rails reads better, ie. MyFooLoader -> my_foo_loader vs myfooloader
<apeiros> IMO ruby should raise in that case
<ddd> MrZYX: i agree with that
<apeiros> MrZYX: I'd prefer FooBar::Baz --> FooBar/Baz.rb
yashshah has joined #ruby
<ddd> especially for long assed class names
alx- has quit [Quit: alx-]
<apeiros> that'd be lossless when converting forth and back. would make autoloaders a lot more reliable too.
Eiam has joined #ruby
<apeiros> (though autoloaders are a non-starter due to concurrency issues anyway :-S)
<ddd> apeiros: I'm lazy. i'd rather not have to stretch for the shift key :) thats my reasoning behind my choice, beyond that i think it reads better once you realize the convention
<MrZYX> I hate uppercase letters in filenames though :P
<apeiros> ddd: I'm lazy too. I want my autocomplete to work for requires as well :-p
<ddd> hehe touche :)
jurassic has joined #ruby
<apeiros> I hate it how I can't tell bbedit to use case-sensitive autocomplete
<apeiros> when I have Foo and foo, I'll always get Foo as autocomplete >:(
<moshef> I'd like to take a hash and make a condition out of it, so lets say {:key => 'value'} becomes # => if key == value. any nice way to go about it?
<peta_> RubyMine
<peta_> handles everything
<apeiros> moshef: I'm not sure that makes much sense
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<apeiros> moshef: how do you know which key in the hash?
<peta_> but PHP
internet_user has joined #ruby
<moshef> I dont
Czupa has quit [Remote host closed the connection]
<DaniG2k> peta_ but it expired
<apeiros> peta_: it also manhandles your ram
<DaniG2k> expires*
<DaniG2k> true
<Hanmac> apeiros: is it possible to an object like Marshal.dump(object) to prefent that some objects instance variables are dumbed?
yashshah_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
ryanh has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> Hanmac: yes
heftig has quit [Ping timeout: 245 seconds]
<apeiros> Hanmac: add ._dump and class._load
internet_user has quit [Remote host closed the connection]
<apeiros> not sure, I think there are newer better equivalents, though… check Marshal docs
<ddd> yeah many people consider ~128MB of RAM excessive. but I work on machines (mainly) with 8-16GB so its not an issue for me.
etcetera has quit []
krawchyk has quit [Remote host closed the connection]
<apeiros> ddd: huh? RubyMine easily ate 4GB-8GB here
Ontolog_ is now known as Ontolog
ilyam has joined #ruby
<Hanmac> apeiros: okay, can you make me a sample how to do it without @observer_peers ?
<ddd> not on mine. even using jruby 1.7.x, during tests and the like the max i had it use was 256
<apeiros> may be due to project size…
<ddd> apeiros: thats possible.
<ddd> mine are really small projects
etcetera has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
<apeiros> and rather large rails projects in my case
<ddd> < 100 files in the project directory itself, at max like 10 open at the same time. really small assed projects
jlast_ has quit [Read error: Operation timed out]
yashshah has quit [Ping timeout: 256 seconds]
<ddd> yeah that might be why then
forrest has joined #ruby
Kruppe has quit [Ping timeout: 255 seconds]
heftig has joined #ruby
jlast has joined #ruby
jekotia has joined #ruby
headius has quit [Quit: headius]
rippa has quit [Ping timeout: 240 seconds]
<apeiros> ddd: hm, a quick check counts >800 .rb files in the project itself alone
<apeiros> and iirc rubymine also pulls in gems from the gemfile
<ddd> i think the max i've ever seen it report (lower right memory watcher) was 380+ but no more
nik_-_ has quit [Quit: nik_-_]
<ddd> yeah it does
mneorr has quit [Remote host closed the connection]
<ddd> runs bundler for you usually
<markalanevans> When i catch an exception in ruby, is there a way i can do some sort of switch statement that checks the name/type of exception thrown?
<ddd> then makes their source available for Jump To
<apeiros> markalanevans: you rescue exceptions
<apeiros> and exceptions are raised
<MrZYX> markalanevans: make a separate rescue for each type
<markalanevans> apeiros: right, but i want a single rescue statement
<apeiros> throw/catch have a different meaning
nik_-_ has joined #ruby
<apeiros> begin; … rescue A; …; rescue B; …; ensure; … ; end
<markalanevans> that has a switch in it that says if if(e.ExcpetionType == "THis"
<paper_> markalanevans: yes, you can rescue a module and use ===
<apeiros> I think all he wants is multiple rescue statements
rdev5|work has quit [Quit: Linkinus - http://linkinus.com]
<apeiros> i.e. what MrZYX said and for which I provided an example
<markalanevans> Perhaps what i need is a multiple rescue statements
<paper_> markalanevans: https://gist.github.com/5340133
<markalanevans> and a single function i pass the -> e to
psyprus has quit [Ping timeout: 258 seconds]
motto has quit [Quit: Sto andando via]
<markalanevans> so it i don't have to be repetative in how i handle each case.
<paper_> markalanevans: then you can just: rescue RescuableException and define in the === method how to proceed
chrisnicola has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
<markalanevans> is there a way to get the exception type from the => e
<markalanevans> like e.class
<markalanevans> or something?
<apeiros> e.class
<markalanevans> hmm.
ebobby has quit [Ping timeout: 256 seconds]
<markalanevans> Thats what i was looking for.
<MrZYX> would like to see an example why you want to do that though
<apeiros> you can handle a couple of exception classes in the same rescue too
<apeiros> begin; …; rescue A, B, C; …handle A, B and C…; rescue D; …handle D…; end
DaniG2k has quit [Ping timeout: 255 seconds]
jlast has quit [Remote host closed the connection]
g0bl1n has quit [Ping timeout: 245 seconds]
<markalanevans> Well when there are errors in my api, i catach the exception and then i need to change the view i use to render as well as get the appropriate validation errors from specific models.
Rioji has quit []
<markalanevans> If my api works, correctly it returns HTML, on exception it returns json w/ validation or error messages.
<apeiros> errr
<apeiros> that's rather bad design
<markalanevans> Well. Its really a plugin widget.
<apeiros> and that doesn't change a thing about it being a bad design :)
<apeiros> mime type should not change upon inner logic
<moshef> apeiros: basically what I need to do is this - I have an array of hashes and i need to find a specific hash within that array. how should I do that?
<apeiros> mime type should change on a) accept header or b) url
<markalanevans> Well the alternative is returning html with an error message...
monkegjinni has joined #ruby
psyprus has joined #ruby
<moshef> I can create a small gist if its not completely clear
<apeiros> markalanevans: that'd be appropriate. don't forget the status code.
<markalanevans> apeiros: would you suggest that returning html w/ an error is better.
<moshef> basically - I need to perform a 'search' on ruby array containing hashes
<MrZYX> moshef: #find ?
<apeiros> markalanevans: definitively. alternatively return json in case of success too (the json can contain html as a string)
<apeiros> markalanevans: and in both cases, again, don't forget the http status code.
<markalanevans> yea, i change to a 500
<moshef> MrZYX: its not active record...
<MrZYX> yup
MehLaptop has joined #ruby
<MrZYX> >> %w{a b c}.find { |v| v == 'b' }
<eval-in> MrZYX => "b" (http://eval.in/15692)
<markalanevans> hmm.
<markalanevans> ok.
<Vivekananda> hey everyone
<Vivekananda> MrZYX: howdy
rdev has joined #ruby
pkrnj has joined #ruby
<Vivekananda> apeiros: and others
freerobby has quit [Quit: Leaving.]
<moshef> i can go another way. I can iterate over the hashes and check if they contain the keys & values I have
<Vivekananda> apeiros: I thought I have talked to you before this but I forget where. perl? ubuntu?
Andromeda has quit [Remote host closed the connection]
<apeiros> Vivekananda: I doubt that
<apeiros> I haven't been on those channels for more than a couple of minutes in the last 10 years
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
brennanMKE has joined #ruby
<apeiros> Vivekananda: but I think you asked me that last time already
javiolo has joined #ruby
MehLaptop has quit [Remote host closed the connection]
thone has joined #ruby
jurassic has quit [Quit: jurassic]
thone_ has quit [Read error: Operation timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<moshef> https://gist.github.com/bigimot/8e474c61ae374c61ed62 hope its easier to understand now
<Vivekananda> apeiros: yes I did but I have talked to you somewhere before.
<Vivekananda> anyways
<Vivekananda> will pm you later with all channels I visit
<waxjar> lol
sambao21 has joined #ruby
Davey has joined #ruby
niklasb has joined #ruby
<apeiros> moshef: find + all?
<moshef> apeiros: ?
brennanM_ has joined #ruby
<apeiros> ary.find { |hash| options.all? { |key, value| hash[key] == value } }
brennanMKE has quit [Read error: Connection reset by peer]
keymone_ has joined #ruby
yashshah_ has quit [Ping timeout: 256 seconds]
DaniG2k has joined #ruby
<apeiros> (ary == data)
keymone has quit [Ping timeout: 264 seconds]
keymone_ is now known as keymone
brianpWins has joined #ruby
danman has joined #ruby
<moshef> ary == data is used where?
<moshef> it works btw, thanks man
<apeiros> I meant that my `ary` is your `data`
s3m73x has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
<moshef> yeah of course
geekbri has quit [Remote host closed the connection]
estjang has joined #ruby
EPIK has joined #ruby
benweint has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
vaicine has quit [Changing host]
vaicine has joined #ruby
ebobby has joined #ruby
br4ndon has joined #ruby
endzyme has quit [Remote host closed the connection]
<apeiros> you could probably speed it up by doing: keys = options.keys; values = options.values; data.find { |hash| hash.values_at(*keys) == values }
workmad3 has joined #ruby
endzyme has joined #ruby
Burgestrand has joined #ruby
mneorr_ has joined #ruby
lele has quit [Ping timeout: 256 seconds]
rcosta has joined #ruby
ph^ has quit [Remote host closed the connection]
ar_d has joined #ruby
<ar_d> hi
Hanmac2 has quit [Quit: Leaving.]
<ar_d> I have this expression ---> time = (a['TIMEOUT'].zero?) ? 50 : a['TIMEOUT']
<ar_d> but I would like that in case a['TIMEOUT'] is zero, instead of being 50, infinite, is that possible ?
Hanmac1 has joined #ruby
<bean> depends on what the syntax for infinite is, if it exists, ar_d
<apeiros> Float::INFINITY
<bean> ah, good point
rmartin_ has quit [Remote host closed the connection]
<bean> an infinite timeout sounds scary
<MrZYX> still depends on what time is passed to though
mengu has quit [Ping timeout: 264 seconds]
<apeiros> depending on where you use it, nil or 0 might actually mean infinite, though
<ar_d> in case a['TIMEOUT'] I want a function runs until it finishes
<ar_d> that way I dont want to set a value
mercwithamouth has joined #ruby
<ar_d> I have this wait
<apeiros> bean: it's pretty common. you use infinite timeouts all day with ruby.
jnoob22 has quit [Remote host closed the connection]
<bean> valid.
<apeiros> bean: e.g. Kernel#gets has an infinite timeout
<bean> ah, i guess I was more thinking web wise.
<ar_d> ::Timeout.timeout(time) do ---- myfunction end
thetristan has quit [Quit: thetristan]
daniel_- has quit [Read error: Operation timed out]
subbyyy_ has quit [Ping timeout: 248 seconds]
<apeiros> well, there the timeouts are usually given from the context (e.g. the browser or the server which will probably time out before your script does)
<ar_d> only if a['TIMEOUT'] has a certain value I want the timeout but if is zero I want the function finishes. (sorry for my english)
endzyme has quit [Remote host closed the connection]
<DaniG2k> guys, in ruby how does it work with all these identical methods? for instance, count and length return the same on an array. Are they referring to the same internal code but just have different names?
workmad3 has quit [Ping timeout: 255 seconds]
<apeiros> DaniG2k: you are aware that documentation exists, yes?
DrShoggoth has joined #ruby
tomsthumb has joined #ruby
<apeiros> count and length are two different methods
oneiroph1en has quit [Ping timeout: 245 seconds]
<apeiros> there are aliases, however. e.g. Array#map and #collect
<apeiros> or #length and #size
daniel_- has joined #ruby
<apeiros> and a couple of dozen others
mneorr_ has quit [Ping timeout: 246 seconds]
chandankumar has quit [Quit: Leaving]
bigoldrock has left #ruby [#ruby]
thetristan has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
ariedler has quit [Remote host closed the connection]
Andromeda has joined #ruby
skattyadz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
danslo has quit [Quit: danslo]
wsterling has quit [Read error: Connection reset by peer]
<ar_d> apeiros: this seems to work --> time = (a['TIMEOUT'].zero?) ? nil : a['TIMEOUT']
benweint has quit [Quit: Computer has gone to sleep.]
wsterling has joined #ruby
<apeiros> ar_d: funny, I actually checked Timeout#timeout's documentation and it didn't mention that nil was accepted
<apeiros> good to know, though
s3m73x has joined #ruby
<ar_d> wait a second
<ar_d> want to be sure
<ar_d> I let you know
khismetix has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 245 seconds]
<apeiros> ar_d: a short test seems to confirm you
chrisnicola has joined #ruby
<apeiros> and checking the code confirms you too
<apeiros> `return yield(sec) if sec == nil or sec.zero?`
<apeiros> ew, sec == nil, why not .nil? ? ugly :)
nadirvardar has quit [Ping timeout: 240 seconds]
gaahrdner has quit [Remote host closed the connection]
endzyme has joined #ruby
lele has joined #ruby
ariedler has joined #ruby
endzyme has quit [Remote host closed the connection]
<ar_d> nice thank you so much apeiros :)
chrisnicola has quit [Client Quit]
chrishough has quit [Quit: chrishough]
<MrZYX> ar_d: if you take a careful look at the line apeiros posted and then check your time = ... statement again you'll notice that you can pass a['TIMEOUT'] directly ;)
khismetix has joined #ruby
<apeiros> ^^
nkr has quit [Quit: Linkinus - http://linkinus.com]
<bean> since it'll be nil if not defined, and the desired timeout if it is
<bean> ;)
<apeiros> and that'd be number 3 on my doc-patch list for this week-end
nadirvardar has joined #ruby
<MrZYX> \o/
<apeiros> I triple checked now - nil/0 is not mentioned in the docs
LennyLinux has joined #ruby
<apeiros> irc would really have been a trove for ruby core to improve the docs… how sad they never used it as such… also iirc there have been a couple of doc-wiki attempts…
adamjleonard has joined #ruby
<ddd> apeiros you mean nil.to_i == 0 ?
<apeiros> ddd: huh?
<ddd> the nil/o
<apeiros> ddd: no, we're talking about Timeout#timeout
<ddd> err s/o/0/
<ddd> ohhhh
marr has joined #ruby
<ddd> nm, totally misread that hehe
<apeiros> 0 and nil are taken as "infinite timeout"
<ddd> got ya
<apeiros> and that's undocumented
pib1943 has quit [Write error: Broken pipe]
<ar_d> MrZYX: you are right thank you
BaconRose has joined #ruby
i_s has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
memristor has joined #ruby
Rumsteak has joined #ruby
chrishough has joined #ruby
freerobby has joined #ruby
dagnachew has joined #ruby
Matip has quit [Ping timeout: 252 seconds]
ar_d has quit [Ping timeout: 255 seconds]
ariedler has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
ctp has joined #ruby
emmanuelux has quit [Ping timeout: 276 seconds]
pib1964 has joined #ruby
thatRD has quit [Quit: thatRD]
wudofyr has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 276 seconds]
wudofyr has joined #ruby
workmad3 has joined #ruby
zastern has joined #ruby
spider-mario has quit [Remote host closed the connection]
<zastern> In this code - https://gist.github.com/zacharyalexstern/5340614 - does the -1 on line three just mean "until the end"? (Yes, I realize that this is a terrible way to capitalize the first letter of a string, don't worry about that)
supergiantrobot_ has joined #ruby
endzyme has joined #ruby
ssvo_ has joined #ruby
ssvo_ has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
<Xeago> Hanmac: you got some c++ knowledge
<Xeago> need some help
<apeiros> zastern: 1..-1 means the range from offset 1 to offset -1, and -n is counted from the end
<zastern> apeiros: mm I guess I don't know what offset -1 is
<zastern> oh wait i get it maybe
lmf40 has quit [Read error: Connection reset by peer]
<apeiros> well, the range is strictly speaking the range from 1 to -1, and String#[] interprets ranges as "from offset to offset"
<Xeago> what does adj[i].push_back(j); do, where adj is a vector<int> adj[MAXN+1];
<apeiros> and interpretes negative offsets as "from the end"
<apeiros> and -1 is indeed the last offset
pioz has quit [Quit: This computer has gone to sleep]
<zastern> and the offset -1 means the last character of the string, basically?
<apeiros> in short: yes, it means "until the end"
<zastern> 1 char from the end
lmf40 has joined #ruby
kirun has quit [Quit: Client exiting]
<apeiros> last char, yes. `offset = offset > 0 ? offset : length+offset`
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<apeiros> >> "hello"[-1]
<eval-in> apeiros => "o" (http://eval.in/15694)
pioz has joined #ruby
<rawng> why can I get the value of an environment variable like $LINES in irb but not from the ruby interpreter?
wargasm has joined #ruby
tealmage has quit [Remote host closed the connection]
<rawng> or rather, is there a way I can get the value of environment variables of the shell executing a ruby script?
gaahrdner has joined #ruby
<vyrus001> anybody know where to get the libs for pcap that json needs when compileing on windows?
<rawng> I'm using `echo -n $ENVVAR` but it always returns null or 0 from the ruby interpreter
baroquebobcat has quit [Quit: baroquebobcat]
jerius has quit [Ping timeout: 252 seconds]
axxT has joined #ruby
davetherat has quit [Read error: Connection reset by peer]
<apeiros> rawng: I think converting env to globals is something optional
davetherat has joined #ruby
<apeiros> and your irbrc probably triggers that optional thing
generalissimo has quit [Remote host closed the connection]
ariedler has joined #ruby
wargasm1 has quit [Ping timeout: 246 seconds]
<apeiros> rawng: anyway, the proper way is going via ENV['VARNAME']
ukd1 has joined #ruby
wsterling has quit [Remote host closed the connection]
tmiller has quit [Remote host closed the connection]
Ng|Adonixx4798 has quit [Ping timeout: 256 seconds]
moshef has quit [Quit: moshef]
etcetera has quit []
wsterling has joined #ruby
fignew has joined #ruby
wmoxam has quit [Ping timeout: 245 seconds]
therrell has joined #ruby
yuike has joined #ruby
yuike has quit [Max SendQ exceeded]
yuike has joined #ruby
yuike has quit [Max SendQ exceeded]
zastern has quit [Ping timeout: 245 seconds]
kiri has quit [Ping timeout: 264 seconds]
althara has joined #ruby
<althara> can someone point me to the irc channel for the unicorn project, if one exists?
dnolen has joined #ruby
ctp has quit [Quit: Leaving...]
heliumsocket has quit [Quit: heliumsocket]
etcetera has joined #ruby
mattbl has joined #ruby
kiri has joined #ruby
fedza has quit [Ping timeout: 245 seconds]
phantasm66 has quit [Quit: *sleeeep….]
hmarr has quit [Ping timeout: 252 seconds]
<rawng> apeiros: ruby drops $LINES and $COLUMNS from the environment variable list because it can't keep track of changes in window size
<rawng> thanks anyway ;)
<apeiros> trap("SIGWINCH") :-)
GhettoCode has quit [Ping timeout: 252 seconds]
<apeiros> and I don't think $LINES and $COLUMNS comes from vanilla ruby
<apeiros> might be readline, don't know
<rawng> you completely lost me <.<
<rawng> I found an answer to my problem anyway though
_nitti has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
<rawng> calling `stty size` instead of `echo $LINES`
<apeiros> hm, nope. I don't even have $LINES in my irb
<apeiros> rawng: ew
<apeiros> use io/console
<gyre007> guys if I build a gem locall from gemspec on my laptop....where will the newly generated gem be stored ? ie where on my filesystem..
Pentium has joined #ruby
codecop has quit [Remote host closed the connection]
memristor has quit [Read error: Connection reset by peer]
<apeiros> rawng: `require 'io/console'; trap("SIGWINCH") { $LINES, $COLS = $stdin.winsize }`
<althara> gyre007: if you do gem env it will tell you what your executable path is
brennanM_ is now known as brennanMKE
<apeiros> oh, needs init
<apeiros> rawng: `require 'io/console'; trap("SIGWINCH") { $LINES, $COLS = $stdin.winsize }; $LINES, $COLS = $stdin.winsize`
<rawng> irb(main):006:0> puts ENV['LINES']
<rawng> 35
<rawng> => nil
<rawng> I'll look into io/console
<apeiros> gyre007: if you only *build* it, it'll be in your current working directory
<gyre007> ah apeiros I see
<gyre007> yeah gem env show install dir
<gyre007> not build dir
Ankhers has quit [Remote host closed the connection]
zph has quit [Quit: Computer has gone to sleep.]
skroon has quit [Read error: Connection reset by peer]
Davey has quit [Quit: Computer has gone to sleep.]
skroon has joined #ruby
Nisstyre has joined #ruby
oponder has joined #ruby
<rawng> apeiros: thanks for doing the work for me xD
philcrissman has joined #ruby
nomenkun has quit [Remote host closed the connection]
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
sambio has quit []
aytch has joined #ruby
<paper_> apeiros: what's up broseph
adamjleonard has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: Leaving]
jmeeuwen has quit [Read error: Operation timed out]
adamjleonard has joined #ruby
mattbl has joined #ruby
tomku has joined #ruby
* apeiros not sure how to take "broseph"
cbot_ has quit [Ping timeout: 245 seconds]
<fignew> apeiros: common brogrammer greeting
mattbl has quit [Client Quit]
<apeiros> I don't like the exclusive nature of the "bro" meme
<gyre007> guys I have this gemspec (just the important bits are here) https://gist.github.com/milosgajdos83/5340843 , I build a gem locally but when I try to install it it says that it cant resolve dependency with typhoeus
cobragoat has quit [Remote host closed the connection]
<gyre007> I thought that it would download it and install it automatically
<gyre007> but I guess I need to install it manually ?
<paper_> apeiros: lol r u into the whole feminist kick too
<apeiros> paper_: watch it
cobragoat has joined #ruby
<paper_> apeiros: are you a steveK groupie? :)
<apeiros> no. I'm neither a feminist.
i_s has quit [Quit: i_s]
<apeiros> that doesn't mean I just wave and pretend that issue doesn't exist.
wsterling has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
<paper_> apeiros: what did u think of the whole adria richards thing?
jon_w has quit [Quit: The 7 Deadly Sins: Nothing compares to it!   [www.t7ds.com.br]]
ph^ has joined #ruby
emmanuelux has joined #ruby
Davey has joined #ruby
<apeiros> assuming this is what happened: they chatted to each other, she took the pic, the two got put out of the conf, the one guy got fired, she got fired
<apeiros> then I think: I think lots of people messed up. I think the two had a private chat and she had no right to eavesdrop, and even less to publicize the picture of the two. I find it bad that they got put out of the conf, I also think the employer of that one guy was an asshole for firing him. Similarly I find it dickish that she got fired over it.
Pentium has quit [K-Lined]
failshell has quit [Remote host closed the connection]
<paper_> well i think she was fired for a few reasons that kind of make sense
xardas has quit [Ping timeout: 240 seconds]
<apeiros> as said, assuming she got fired for this, then I find it unjustified
adamjleonard has quit [Quit: Leaving...]
cobragoat has quit [Ping timeout: 264 seconds]
<paper_> 1. her job is to bring developers together, but she hugely divided the developer community. So you can imagine she could no longer perform her job well, on behalf of the company, as many devs would have been hostile towards her
<paper_> sorry, hostile was the wrong word
i_s has joined #ruby
<apeiros> anyway, a) I wasn't there, b) all I know is hearsay, c) there's no point in arguing about something I have so little facts.
<paper_> i mean, they probaby couldn't work effecitvely with her
zph has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
snorkdude has joined #ruby
<paper_> apeiros: so i think for purely practical/business reasons her firing was justified, the company could no longer benefit from her services
<paper_> :))
IceDragon has joined #ruby
rdev has quit [Quit: Linkinus - http://linkinus.com]
dnolen has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Tricon has joined #ruby
<paper_> it's brutal perhaps, but it's true from a purely economic perspective i think
<paper_> so while not moral, perhaps makes sense as a business decision by the ceo
<apeiros> you realize that being an asshole and being economical are orthogonal properties?
cmarques has quit [Ping timeout: 276 seconds]
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
<apeiros> something you do can be perfectly economical, yet totally dickish
<paper_> yes, so i think it was 'justified' but perhaps an unsavory justication ;)
<apeiros> I didn't say it made no economical sense.
nateberkopec has joined #ruby
willejs has quit [Quit: willejs]
Apathetic has quit [Read error: Connection reset by peer]
snorkdude has quit [Client Quit]
skattyadz has left #ruby [#ruby]
love_color_text has quit [Ping timeout: 252 seconds]
forrest has quit [Quit: Leaving]
ph^ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
nik_-_ has quit [Quit: nik_-_]
jlast has quit [Remote host closed the connection]
johnmlocklear_ has quit [Ping timeout: 245 seconds]
rdev has joined #ruby
alanp_ has joined #ruby
breakingthings has quit []
nik_-_ has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
alanp has quit [Ping timeout: 245 seconds]
tootubular has quit [Quit: TooTubular]
sambao21 has quit [Quit: Computer has gone to sleep.]
k610 has quit [Quit: Leaving]
Bry8Star_ has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
rudisimo has quit [Quit: Leaving.]
nick- has quit [Quit: nick-]
ner0x has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
Bry8Star has quit [Ping timeout: 276 seconds]
alanp_ is now known as alanp
wsterling has joined #ruby
ffranz has quit [Ping timeout: 264 seconds]
stkowski has quit [Quit: stkowski]
julian-delphiki has joined #ruby
wyan has quit [Excess Flood]
Jonah11_ has joined #ruby
BSaboia has joined #ruby
wyan has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Quit: Ex-Chat]
<Jonah11_> I have a master script that runs a number of other scripts. Currently the master is just "require"-ing the other scripts, but i'm using too much RAM that way. What's the best way to say run the sub-scripts and then have any objects they create disappear from memory after they're finished executing?
jgrevich has quit [Ping timeout: 246 seconds]
rdev has quit [Quit: Linkinus - http://linkinus.com]
bean has quit [Ping timeout: 252 seconds]
BSaboia__ has quit [Ping timeout: 246 seconds]
bean has joined #ruby
<majikbytes> Jonah11: File.IO?
jgrevich has joined #ruby
rdev has joined #ruby
chrisnicola has joined #ruby
<majikbytes> loop through the files, read/execute them
<majikbytes> then exit the ruby process
<apeiros> Jonah11_: fork
julian-delphiki has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 248 seconds]
<apeiros> Jonah11_: you may want to take a look at my fork gem, which makes that a bit easier.
<apeiros> not portable to windows, though (since windows has no fork)
justsee has joined #ruby
justsee has joined #ruby
snorkdude has joined #ruby
carlyle has quit [Remote host closed the connection]
mneorr has joined #ruby
cloke has joined #ruby
bttf has joined #ruby
chrisnicola has quit [Client Quit]
Morkel has quit [Quit: Morkel]
<Jonah11_> It sounds like either of those solutions would work. majikbytes method might be better for my purposes just for simplicity. But I'm unclear which method I should use to execute each subscript?
samuel02 has quit [Remote host closed the connection]
rdev has quit [Quit: Linkinus - http://linkinus.com]
<apeiros> well, with fork you can use your current code. just insert fork { } around the code you want isolated.
<apeiros> e.g. fork { require 'foo' }
samuel02 has joined #ruby
chrisnicola has joined #ruby
<Jonah11_> apeiros, would that require your gem?
<apeiros> no. fork is part of ruby core
<apeiros> my gem makes it easier to communicate with your forks.
workmad3 has quit [Ping timeout: 264 seconds]
<Jonah11_> apeiros, cool. i don't need to do any communication with them. just run them. if i use fork as you did above, will they execute sequentially or in parallel?
josa has joined #ruby
<apeiros> Jonah11_: well, communication can also mean rescuing exceptions
<apeiros> a fork creates a new process
jtharris has quit [Quit: WeeChat 0.4.0]
josa has left #ruby [#ruby]
<apeiros> so it should run concurrently
ibash has joined #ruby
<apeiros> (parallel depends on your hardware and OS)
ibash has left #ruby [#ruby]
<Jonah11_> apeiros, is there a way to make it wait for each one to finish before going onto the next?
dustint_ has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<apeiros> that's part of "communication" which my gem makes easier ;-)
<apeiros> yes, there is. fork returns the pid. you can use Process.wait or Process.wait2 to wait for the child to exit.
<apeiros> Fork.new(…) { … }.wait
CLUSTERfoo has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
tealmage has joined #ruby
hit has quit [Quit: hit]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<csmrfx> fork you, too!
etcetera has quit []
ariedler has quit [Remote host closed the connection]
<Jonah11_> apeiros, yeah this would be overkill i think for essentially solving the problem of putting each include into its own memory context. What if I just do the require inside of a block?
enebo has quit [Quit: enebo]
<csmrfx> you want modules now?
<apeiros> executing it in a block won't make your resource problems go away, no
<csmrfx> I dont see how needing X using Y mem can be gotten around
<apeiros> make sure your code stops referencing objects from the required piece of code. then you shouldn't need running in subprocesses.
<apeiros> csmrfx: his issues seems to be more like X using Y mem even after X has finished
<apeiros> and then comes X2 which also uses Y mem, and suddenly you have n*Y mem used
<apeiros> aka leak
chrisnicola has quit [Quit: This computer has gone to sleep]
<csmrfx> maybe you want profile now?
<apeiros> maybe he wants
<CLUSTERfoo> when doing the "about_methods" Koan, the test "test_calling_global_methods_without_parentheses" gives me the following error. https://gist.github.com/CLUSTERfoo/5341101 . This is a bug, right? I've tried the online Koans, and "5" should give me green. Here is the file in question: https://github.com/neo/ruby_koans/blob/master/src/about_methods.rb
elux has quit [Quit: Bye!]
ariedler has joined #ruby
<apeiros> CLUSTERfoo: run it with 1.9
<Jonah11_> apeiros, thanks for your help, i'll look into the fork
<apeiros> or assert_equal 5, my_global_method(2, 3)
chrisnicola has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
<apeiros> because I think the way you wrote it it'll change precedence in 2.0
<apeiros> or I'm just too tired.
* apeiros off, gn8
<CLUSTERfoo> apeiros: I'm running 1.9p392
MarioEIU has joined #ruby
<apeiros> CLUSTERfoo: ok, then be explicit about your arguments
<apeiros> use parens
<CLUSTERfoo> apeiros: I thought 2.0 was backwards compatible?
<apeiros> largely. not completely.
<apeiros> assert_equal 5, my_global_method 2, 3 # <-- this is ambiguous - which method takes the ", 3"?
<csmrfx> Jonah11_: ruby-prof
<cloke> anyone have a recommendation for ldap and ruby? seems that most ldap gems are abandoned.
jonahR has quit [Quit: jonahR]
* csmrfx still has 1.8 and 1.9 codez that need to be "ported" to 2.0
<Jonah11_> csmrfx, thanks, that looks useful
<CLUSTERfoo> apeiros: i'm on the one before that though. " result = my_global_method 2, 3; assert_equal __(5), result" <- this souldn't be ambiguous, no?
wsterling has quit [Remote host closed the connection]
agarie has joined #ruby
Guedes0 has joined #ruby
nik_-_ has quit [Quit: nik_-_]
emmanuelux has quit [Ping timeout: 256 seconds]
butblack has joined #ruby
<Jonah11_> thanks again
ctp has joined #ruby
rdev has joined #ruby
blahwoop has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
RORgasm has quit [Remote host closed the connection]
etcetera has joined #ruby
speakingcode-wor has joined #ruby
nik_-_ has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
subbyyy_ has joined #ruby
sambio has quit [Read error: Connection reset by peer]
paper_ has joined #ruby
Yakko has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
frem has quit [Ping timeout: 245 seconds]
Tricon has quit [Quit: Leaving...]
<rcosta> hey, can someone help me with this question? http://railsforum.com/viewtopic.php?pid=161658#p161658
ctp has quit [Ping timeout: 256 seconds]
Proshot has quit [Quit: Leaving]
gyre007 has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
<csmrfx> rcosta: maybe on the rails channels
<rcosta> thanks :)
ner0x has quit [Quit: Leaving]
mneorr has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
Yakko has quit [Remote host closed the connection]
Yakko has joined #ruby
adamjleonard has joined #ruby
kpshek has quit []
etcetera has quit []
nplusp has quit [Ping timeout: 240 seconds]
Tricon has joined #ruby
pac1 has joined #ruby
zph has joined #ruby
ariedler has quit [Remote host closed the connection]
mfletcher has quit [Remote host closed the connection]
BSaboia has quit [Read error: Connection reset by peer]
hmarr has joined #ruby
i_s has quit [Quit: i_s]
devyn_ has quit [Changing host]
devyn_ has joined #ruby
devyn_ is now known as devyn
chrisnicola has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
eliasp_ has quit [Read error: Connection reset by peer]
love_color_text has joined #ruby
splud has joined #ruby
idkazuma has joined #ruby
love_color_text has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
eliasp has joined #ruby
anonymuse has quit [Quit: Leaving...]
matti has joined #ruby
Mon_Ouie has quit [Ping timeout: 248 seconds]
Davey has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
dmiller has joined #ruby
etcetera has joined #ruby
jcheng has quit [Quit: Computer has gone to sleep.]
DrCode has quit [Remote host closed the connection]
CLUSTERfoo has quit [Quit: Leaving]
gaahrdner has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
Kruppe has joined #ruby
love_color_text has joined #ruby
love_color_text has quit [Remote host closed the connection]
brianherman has joined #ruby
pac1 has quit [Ping timeout: 256 seconds]
brianherman has quit [Client Quit]
sailias has joined #ruby
predator217 has joined #ruby
eykosioux has quit [Remote host closed the connection]
eykosioux has joined #ruby
Tricon has quit [Quit: Linkinus - http://linkinus.com]
echevemaster has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
love_color_text has joined #ruby
javiolo has quit [Read error: Operation timed out]
predator117 has quit [Ping timeout: 245 seconds]
ofxartem has joined #ruby
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
eliasp has joined #ruby
wyhaines has quit [Remote host closed the connection]
asphxia^^ has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Remote host closed the connection]
javiolo has joined #ruby
love_color_text has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 245 seconds]
eykosioux has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
ofxartem has left #ruby [#ruby]
ofxartem has joined #ruby
ofxartem has left #ruby [#ruby]
nga4 has quit []
Xeago has joined #ruby
ofxartem has joined #ruby
cobragoat has joined #ruby
DaniG2k has left #ruby ["Leaving"]
freeayu has joined #ruby
mneorr has joined #ruby
eykosioux has joined #ruby
daniel_- has quit [Ping timeout: 264 seconds]
ARCADIVS has joined #ruby
Guedes has quit [Disconnected by services]
freerobby has quit [Quit: Leaving.]
Guedes0 has left #ruby ["Saindo"]
Guedes0 has joined #ruby
timmow has quit [Remote host closed the connection]
zph has quit [Quit: Computer has gone to sleep.]
juarlex has quit [Remote host closed the connection]
i_s has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
jgarvey has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
ariedler has joined #ruby
reset has joined #ruby
rdev has quit [Quit: Linkinus - http://linkinus.com]
Xeago has joined #ruby
nezumi has quit [Ping timeout: 245 seconds]
niklasb has quit [Ping timeout: 252 seconds]
sepp2k has quit [Remote host closed the connection]
zph has joined #ruby
twoism has quit [Ping timeout: 256 seconds]
eykosioux has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
t0rc has joined #ruby
endzyme_ has joined #ruby
gabrielrotbart has joined #ruby
chrisnicola has joined #ruby
endzyme_ has quit [Remote host closed the connection]
<csmrfx> where is 'trap'?
<csmrfx> nm, kernel of course
t0rc has quit [Client Quit]
<paper_> csmrfx: Object has no methods on its own
<paper_> not a single one (that wasn't patched in after the fact)
splud has quit [Quit: splud]
endzyme has quit [Ping timeout: 240 seconds]
<xybre> paper_: Object.instance_methods gives me quite a few.
<paper_> xybre: cos u're ot using it right :)
doritostains has joined #ruby
<paper_> xybre: Object.instance_methods(false)
ffranz has joined #ruby
<xybre> BasicObject.instance_methods gives me less, but still some.
chrishough has quit [Quit: chrishough]
generalissimo has joined #ruby
<paper_> xybre: the instance methods reeturned by Object.instance_methods(false) you can quite easily chedk are all just monkey patches
<xybre> paper_: Actually most of them are inhereited from Kernel.
freerobby has joined #ruby
<xybre> paper_: The rest come from BasicObject.
<xybre> No monkey patches, just inheritence.
<paper_> xybre: yes, Object has 0 instance methods of its own
<paper_> xybre: im talking about instance methods that are *defined on* Object :)
<paper_> not inherited ones or monkey-patched ones
<csmrfx> lel
<xybre> paper_: They weren't patched in after the fact, thats for sure.
<csmrfx> you mean: the object class defines none
<paper_> xybre: yeah they were, check their source_location
MrZYX is now known as MrZYX|off
<paper_> csmrfx: in core i mean, yes
<paper_> of course other methods in stdlib/gems can add to it later
<paper_> but im talking about what's in core
<csmrfx> not sure why you started this
twoism has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
Apathetic has joined #ruby
<paper_> csmrfx: i didnt really start anything, i just stated the fact that Object has 0 instance methods of its own (that are defined on it directly), it's a bit interesting
<csmrfx> but.. but... why
<xybre> paper_: it's not monkey patched, its C.
<paper_> xybre: which methods?
<paper_> xybre: and C extensions can monkeypatch
MrZYX|off is now known as MrZYX
<xybre> It's in core, its not an extension.
althara has left #ruby [#ruby]
<paper_> xybre: what method are you talking about?
<paper_> xybre: you haven't named one
* xybre throws his hands in the air
jnoob22 has joined #ruby
<xybre> All of them. == for example.
<paper_> xybre: oh really?
<paper_> let's check
<paper_> >> Object.instance_method(:==).owner
<eval-in> paper_ => BasicObject (http://eval.in/15697)
<paper_> xybre: seems to be defined on BasicObject not Object ;)
<paper_> xybre: got another one?
<xybre> paper_: No shit, I said that.
<xybre> I said it wasn't monkey patched.
<paper_> xybre: and i said i was talking about methods defined specifically *ON* Object
<paper_> i dont give a fuck what it's inheriting
idkazuma has quit [Ping timeout: 240 seconds]
<paper_> it inherited a fuck-tonne from Kernel too, who cares
<paper_> my point was it has no methods of its own, where it is the owner
ephemerian has quit [Quit: Leaving.]
<xybre> k, whatever.
<csmrfx> how do you symbolify a string?
<csmrfx> >> Object.methods.map { |m| m.owner }
<eval-in> csmrfx => /tmp/execpad-b1ad3ef53e7a/source-b1ad3ef53e7a:2:in `block in <main>': undefined method `owner' for :allocate:Symbol (NoMethodError) ... (http://eval.in/15698)
<paper_> xybre: this is what the whole conversation was about, if you scroll up you'll see csmrfx said that 'trap' was defined on Kernel, and my reply was yes and Object has no methods of its own. If we were just talking about methods 'accessible' from Object (i.e inherited) then why would i have bothered to say anything?
<paper_> I think it's a bit interesting that Object has no methods
<paper_> that's all
<xybre> paper_: I was only addressing your comment that Object was monkey patched.
<paper_> xybre: yes, it is. Any methods that are returned by Object.instance_methods(false) are monkey-patched
<csmrfx> >> Object.methods.map { |m| m.owner.match( /Object/ }
<eval-in> csmrfx => /tmp/execpad-a947180c2cec/source-a947180c2cec:2: syntax error, unexpected '}', expecting ')' (http://eval.in/15699)
<csmrfx> or something
<paper_> xybre: my point was any methods that appear to be defined on Object itself (not on a superclass or included module) are just monkey patches
chrishough has joined #ruby
<xybre> I'm in a clean irb sessions and nothing is patched.
danman has quit [Quit: danman]
<paper_> xybre: that's fine, but *if* you get any returns from instance_methods(false), then those are monkeypatches :)
<paper_> and you often do in an interactive session
danman has joined #ruby
<csmrfx> >> Object.methods.map { |n| Object.instance_method( n.to_sym ).owner }
<paper_> as the 'pp' library and a bunch of others all add monkeypatches to Object
<eval-in> csmrfx => /tmp/execpad-7fd1ca9a9365/source-7fd1ca9a9365:2:in `instance_method': undefined method `allocate' for class `Object' (NameError) ... (http://eval.in/15700)
<xybre> So, you're not talking about Ruby anymore, but ActiveSupport or other core extensions.
<csmrfx> why is that?
<paper_> 'psych' does anyway
<paper_> xybre: of course, by definition, if it's a monkeypatch then it's not part of core :)
<paper_> or it wouldn't be called a monkeypatch :)
hmarr has quit []
danman has quit [Client Quit]
<xybre> I think we're violently agreeing here.
<csmrfx> hm
iphands_ has joined #ruby
<csmrfx> >> :foo.is_a?("symbol")
<eval-in> csmrfx => /tmp/execpad-71bae993e46e/source-71bae993e46e:2:in `is_a?': class or module required (TypeError) ... (http://eval.in/15701)
arya has joined #ruby
<paper_> xybre: hehe
<paper_> probably, sorry
<paper_> too much rum
<csmrfx> >> :ok.is_a? Symbol
<eval-in> csmrfx => true (http://eval.in/15702)
gabrielrotbart has quit [Remote host closed the connection]
<xybre> paper_: Ahh that makes sense :)
gabrielrotbart has joined #ruby
marr has quit [Ping timeout: 256 seconds]
Nisstyre has quit [Ping timeout: 255 seconds]
emmanuelux has quit [Quit: emmanuelux]
piotr has quit [Ping timeout: 256 seconds]
Jonah11_ has left #ruby ["Leaving"]
Nisstyre has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
gabrielrotbart has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit:]
NiteRain has quit [Ping timeout: 245 seconds]
kofno has quit [Remote host closed the connection]
etcetera has quit []
kristofers has quit []
beneggett has quit [Quit: Computer has gone to sleep.]
MarioEIU has quit [Remote host closed the connection]