ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
bytephilia has joined #ruby-lang
ilyam_ has joined #ruby-lang
qpingu has quit [Quit: Leaving.]
r0bby has quit [Ping timeout: 252 seconds]
ilyam has quit [Ping timeout: 246 seconds]
ilyam_ is now known as ilyam
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
slux has quit [Remote host closed the connection]
deryldoucette has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
nagato has joined #ruby-lang
virunga has quit [Quit: Sto andando via]
dous has joined #ruby-lang
sailias has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
nagato has quit [Client Quit]
ylluminate has quit [Quit: Bye!]
virunga has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
deryl has quit [Quit: deryl]
virunga has quit [Quit: Sto andando via]
jezebel has joined #ruby-lang
jezebel has left #ruby-lang [#ruby-lang]
sailias has quit [Quit: Leaving.]
neocoin has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
nagato has joined #ruby-lang
banisterfiend has joined #ruby-lang
igotnolegs has joined #ruby-lang
bytephilia has quit [Quit: Computer has gone to sleep.]
ilyam has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
ruby-lang292 has joined #ruby-lang
ruby-lang292 has quit [Client Quit]
sgonyea has joined #ruby-lang
<sgonyea> Holy shit Test::Unit is terrible.
seanstickle has quit [Quit: seanstickle]
<drbrain> use MiniTest::Unit
mwjcomputing has joined #ruby-lang
schroedinbug has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
chimkan___ has joined #ruby-lang
tjadc has quit [Ping timeout: 264 seconds]
chimkan_ has quit [Ping timeout: 246 seconds]
chimkan___ has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Remote host closed the connection]
WillMarshall has joined #ruby-lang
brdude has quit [Quit: brdude]
seanstickle has quit [Quit: seanstickle]
Wardrop_ has joined #ruby-lang
Asher has joined #ruby-lang
Wardrop has quit [Ping timeout: 240 seconds]
Wardrop_ is now known as Wardrop
mrsolo has quit [Quit: Leaving]
savage- has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby-lang
itsmeduncan has joined #ruby-lang
Wardrop has quit [Read error: Connection reset by peer]
qpingu has joined #ruby-lang
Wardrop has joined #ruby-lang
sgonyea has quit [Quit: sgonyea]
itsmeduncan has quit [Quit: itsmeduncan]
JustinCampbell has joined #ruby-lang
dous has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby-lang
WillMarshall has quit [Read error: Connection reset by peer]
bryancp has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
mwjcomputing has quit [Quit: Leaving]
itsmeduncan has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
ilyam has quit [Quit: ilyam]
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby-lang
WillMarshall has joined #ruby-lang
JustinCampbell has quit [Read error: Connection reset by peer]
JustinCampbell has joined #ruby-lang
rahult_ has joined #ruby-lang
sgonyea has joined #ruby-lang
Wardrop_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
Wardrop has quit [Ping timeout: 276 seconds]
Wardrop_ is now known as Wardrop
brdude has joined #ruby-lang
towski has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
t_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
Z33K|Lux has joined #ruby-lang
TorpedoSkyline has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
brushbox has joined #ruby-lang
dous has joined #ruby-lang
headius has joined #ruby-lang
sailias has joined #ruby-lang
krz has quit [Quit: krz]
bryancp has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
tonni has quit [Remote host closed the connection]
lldong has joined #ruby-lang
dfr|mac has joined #ruby-lang
WillMarshall has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
chimkan_ has joined #ruby-lang
GeekOnCoffee has quit [Ping timeout: 244 seconds]
headius has quit [Quit: headius]
JustinCampbell has quit [Remote host closed the connection]
GeekOnCoffee has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
ilyam has joined #ruby-lang
ilyam has quit [Client Quit]
VGoff is now known as VGoff_afk
lldong has quit [Remote host closed the connection]
bglusman has joined #ruby-lang
davidbalbert has quit [Quit: ZNC - http://znc.in]
davidbalbert has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
cantonic has quit [Quit: cantonic]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ChadStud2uffin has quit [Ping timeout: 252 seconds]
nazty has quit [Read error: No route to host]
naz has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
savage- has joined #ruby-lang
headius has joined #ruby-lang
mattonrails has joined #ruby-lang
WillMarshall has joined #ruby-lang
banisterfiend has joined #ruby-lang
lcdhoffman has joined #ruby-lang
VGoff_afk is now known as VGoff
seoaqua has quit [Quit: Leaving]
Leeky is now known as Leeky_afk
rubynewbie has quit [Quit: Page closed]
burgestrand has joined #ruby-lang
deryl has joined #ruby-lang
Bwild has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby-lang
bfreeman has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
Bwild has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
co_Cr_MEX has joined #ruby-lang
co_Cr_MEX has quit [Client Quit]
charliesome has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
dhruvasagar has quit [Ping timeout: 268 seconds]
arooni-mobile has quit [Read error: Connection reset by peer]
mattonrails has quit [Remote host closed the connection]
indeterminate has joined #ruby-lang
mk03 has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
yxhuvud has joined #ruby-lang
rahult_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rutkla has joined #ruby-lang
s1n4 has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
w0lverine has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
cha1tanya has quit [Read error: Connection reset by peer]
cha1tanya has joined #ruby-lang
babinho has quit [Quit: leaving]
vmatiyko has joined #ruby-lang
robbyoconnor has joined #ruby-lang
savage- has quit [Remote host closed the connection]
headius has quit [Quit: headius]
savage- has joined #ruby-lang
babinho has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
gentz has quit [Remote host closed the connection]
neocoin has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
andrewhl has quit [Read error: Connection reset by peer]
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
vmatiyko has left #ruby-lang [#ruby-lang]
rutkla has quit [Ping timeout: 245 seconds]
<certainty> moin
tonni has joined #ruby-lang
cha1tanya has quit [Read error: Connection reset by peer]
cha1tanya has joined #ruby-lang
JoshWines has quit [Ping timeout: 252 seconds]
deryl has joined #ruby-lang
workmad3 has joined #ruby-lang
<rue> Good morning
* banisterfiend sets mode: +bk rue (so long, flat foot!)
zmack has joined #ruby-lang
workmad3 has quit [Ping timeout: 244 seconds]
zmack_ has joined #ruby-lang
JoshWines has joined #ruby-lang
zmack has quit [Ping timeout: 246 seconds]
JoshWines has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby-lang
dhruvasagar has joined #ruby-lang
JohnBat26 has joined #ruby-lang
kain has quit [Ping timeout: 245 seconds]
d3vic3 has joined #ruby-lang
solars has joined #ruby-lang
Z33K|Lux has quit []
JoshWines has joined #ruby-lang
kain has joined #ruby-lang
s1n4 has quit [Quit: leaving]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
s1n4 has joined #ruby-lang
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
qwerxy has joined #ruby-lang
kain_ has joined #ruby-lang
rutkla has joined #ruby-lang
toretore has joined #ruby-lang
kain has quit [Ping timeout: 276 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
zoo-zed has joined #ruby-lang
zoo-zed has quit [Client Quit]
vmoravec has joined #ruby-lang
dc5ala has joined #ruby-lang
kain_ is now known as kain
diegoviola has quit [Ping timeout: 246 seconds]
srbartlett has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
mssola has joined #ruby-lang
qwerxy has joined #ruby-lang
publicvoid has quit [Ping timeout: 240 seconds]
solars has quit [*.net *.split]
voker57 has quit [*.net *.split]
flebel has quit [*.net *.split]
khaase has quit [*.net *.split]
telemachus has quit [*.net *.split]
mccraig has quit [*.net *.split]
relix has quit [*.net *.split]
Guest83725 has quit [*.net *.split]
certainty has quit [*.net *.split]
erikh has quit [*.net *.split]
knu has quit [*.net *.split]
vbatts has quit [*.net *.split]
mksm has quit [*.net *.split]
lake has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
any-key has quit [*.net *.split]
jmcphers has quit [*.net *.split]
floyd2 has quit [*.net *.split]
Kero has quit [*.net *.split]
bnagy has quit [*.net *.split]
musl has quit [*.net *.split]
znz_v has quit [*.net *.split]
kaz_ has quit [*.net *.split]
_ko1 has quit [*.net *.split]
pabs has quit [*.net *.split]
khaase_ has joined #ruby-lang
mccraig has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
relix has joined #ruby-lang
bnagy has joined #ruby-lang
apeiros_ has joined #ruby-lang
telemachus has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
qwerxy has quit [Quit: offski]
S2kx has joined #ruby-lang
S1kx has quit [Read error: Connection reset by peer]
WillMarshall has quit [Quit: Computer has gone to sleep.]
rahult_ has joined #ruby-lang
rahult_ has quit [Client Quit]
gnufied has quit [Quit: Leaving.]
runeb has joined #ruby-lang
rolfb has joined #ruby-lang
solars has joined #ruby-lang
flebel has joined #ruby-lang
certainty has joined #ruby-lang
knu has joined #ruby-lang
lake has joined #ruby-lang
floyd2 has joined #ruby-lang
Guest83725 has joined #ruby-lang
erikh has joined #ruby-lang
musl has joined #ruby-lang
vbatts has joined #ruby-lang
kaz_ has joined #ruby-lang
pabs has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
jmcphers has joined #ruby-lang
Kero has joined #ruby-lang
mksm has joined #ruby-lang
_ko1 has joined #ruby-lang
znz_v has joined #ruby-lang
any-key has joined #ruby-lang
brdude has quit [Quit: brdude]
kaiwren has joined #ruby-lang
just4dos has quit [Ping timeout: 240 seconds]
<yorickpeterse> Morning kids
gnufied has joined #ruby-lang
thisirs has joined #ruby-lang
cha1tanya has quit [Read error: Connection reset by peer]
srbartlett has joined #ruby-lang
cha1tanya has joined #ruby-lang
mytrile has joined #ruby-lang
gnufied1 has joined #ruby-lang
gnufied has quit [Ping timeout: 252 seconds]
mytrile has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
xorox90 has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
workmad3 has quit [Quit: leaving]
me has joined #ruby-lang
me is now known as Guest46472
Guest46472 has left #ruby-lang [#ruby-lang]
zz_chrismcg is now known as chrismcg
solars has quit [Read error: Operation timed out]
justinseiter has joined #ruby-lang
Hakon has joined #ruby-lang
diegoviola has joined #ruby-lang
gsav has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
cha1tanya has quit [Read error: Connection reset by peer]
futurechimp has joined #ruby-lang
u_u has quit [Ping timeout: 265 seconds]
cha1tanya has joined #ruby-lang
chimkan_ has left #ruby-lang [#ruby-lang]
futurechimp has quit [Remote host closed the connection]
futurechimp has joined #ruby-lang
cdt has joined #ruby-lang
futurechimp has quit [Remote host closed the connection]
gnufied1 has quit [Quit: Leaving.]
solars has joined #ruby-lang
qwerxy has joined #ruby-lang
thisirs has quit [Remote host closed the connection]
futurechimp has joined #ruby-lang
future_chimp has joined #ruby-lang
workmad3 has joined #ruby-lang
future_chimp has left #ruby-lang [#ruby-lang]
futurechimp has left #ruby-lang [#ruby-lang]
srbartlett has quit [Remote host closed the connection]
gnufied1 has joined #ruby-lang
rutkla has quit [Ping timeout: 246 seconds]
u_u has joined #ruby-lang
nagato has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
slux has joined #ruby-lang
rutkla has joined #ruby-lang
postmodern has quit [Quit: Leaving]
robotmay has joined #ruby-lang
thisirs has joined #ruby-lang
rutkla_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
rutkla has quit [Ping timeout: 246 seconds]
diegoviola has quit [Ping timeout: 244 seconds]
gnufied has joined #ruby-lang
kitallis has joined #ruby-lang
justinseiter has quit [Quit: Leaving]
xorox90 has quit [Ping timeout: 244 seconds]
s1n4 has quit [Quit: peace out]
neocoin has joined #ruby-lang
AndrewNTH has joined #ruby-lang
AndrewNTH has left #ruby-lang [#ruby-lang]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
justinseiter has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
cha1tanya has quit [Read error: Connection reset by peer]
cha1tanya has joined #ruby-lang
u_u has quit [Ping timeout: 246 seconds]
futurechimp has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby-lang
u_u has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
u_u has quit [Ping timeout: 245 seconds]
srbartlett has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
deryl has quit [Quit: deryl]
S2kx has quit [Read error: Connection reset by peer]
S2kx has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
rutkla has joined #ruby-lang
rutkla_ has quit [Ping timeout: 240 seconds]
xorox90 has joined #ruby-lang
thisirs has quit [Remote host closed the connection]
u_u has joined #ruby-lang
nofxx has quit [Quit: Leaving]
virunga has joined #ruby-lang
futurechimp has left #ruby-lang [#ruby-lang]
<rue> Hi hi
S2kx has quit [Ping timeout: 246 seconds]
jammanbo has joined #ruby-lang
runeb has quit [Remote host closed the connection]
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
kaiwren has quit [Ping timeout: 240 seconds]
jammanbo has left #ruby-lang [#ruby-lang]
kitallis has quit [Ping timeout: 256 seconds]
<Harzilein> hmm
nagato has quit [Ping timeout: 248 seconds]
nagato has joined #ruby-lang
runeb has joined #ruby-lang
S1kx has quit [Quit: Leaving]
dous has quit [Remote host closed the connection]
dous has joined #ruby-lang
rutkla has quit [Ping timeout: 276 seconds]
sepp2k has joined #ruby-lang
dous has quit [Remote host closed the connection]
dous has joined #ruby-lang
u_u has quit [Read error: Operation timed out]
kaiwren has joined #ruby-lang
itsmeduncan has joined #ruby-lang
kitallis has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
rutkla has joined #ruby-lang
kaiwren_ has joined #ruby-lang
xorox90 has quit [Ping timeout: 255 seconds]
kaiwren has quit [Ping timeout: 245 seconds]
JustinCampbell has joined #ruby-lang
brunocoelho has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
JohnBat26 has joined #ruby-lang
kaiwren has joined #ruby-lang
deryl has joined #ruby-lang
kaiwren_ has quit [Ping timeout: 245 seconds]
u_u has joined #ruby-lang
charliesome has quit [Ping timeout: 245 seconds]
gentz has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
xorox90 has joined #ruby-lang
xorox90 has left #ruby-lang [#ruby-lang]
mwjcomputing has joined #ruby-lang
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
Leeky_afk is now known as Leeky
dr_bob has joined #ruby-lang
<Harzilein> hmm
<yorickpeterse> hmm
<Harzilein> can you point out a good example for inheritance from array? i already have a MediaWikiLink object and now want to make collections from those and add a method that would mass-validate them
lcdhoffman has joined #ruby-lang
<bnagy> class NotNeccessary < Array
<bnagy> just do ary.all? {|mw| mw.valid?}
<Harzilein> bnagy: no, the idea is that i have a more efficient way to validate multiple links (the mediawiki api allows calls with ?title=One|Two|Three
<dr_bob> or ary.all? &:valid?
<bnagy> imho anyway. Containers knowing how to validate their contents smells like poor OO to me
kedare has joined #ruby-lang
<dr_bob> Harzilein: create a separate class and do not inherit Array
u_u has quit [Ping timeout: 248 seconds]
<apeiros_> Harzilein: usually has-a relationships are to preferred over is-a.
<dr_bob> my point
<Harzilein> can you point me to any code that does similar things?
<Harzilein> or should i just make a MediaWikiLink.mass_validate(mwl) class method?
virunga_ has joined #ruby-lang
virunga has quit [Quit: Sto andando via]
virunga_ has quit [Read error: Connection reset by peer]
virunga has joined #ruby-lang
<bnagy> where mwl is an array or links?
<rue> Composition > inheritance
<bnagy> sounds reasonable to me
<bnagy> s/or/of/
dhruvasagar has quit [Ping timeout: 276 seconds]
<bnagy> semantically not quite perfect, but hey
<Harzilein> bnagy: yes. i thought having a MediaWikiLinkCollection or something would help me later on though.
dhruvasagar has joined #ruby-lang
<rue> Make one, then
<rue> But don’t inherit Array.
<bnagy> you can check out DelegateClass
<bnagy> but tbh it sounds like excess fanciness
<Harzilein> bnagy: at least i can be reasonably sure that i would not have found a name like delegateclass by myself
mwjcomputing2 has quit [Quit: Out....]
<Harzilein> bnagy: i tried all kinds of array, collection, container searches on rubygems
<bnagy> it's just a safer / nicer way to get a thing that works like a subclass
<bnagy> but I prefer tying your meta stuff onto the class - File does that for example
<bnagy> an array of Blahs should really just be exactly that, if you need meta methods they are better imho on Blah (the class)
lcdhoffman has quit [Quit: lcdhoffman]
<Harzilein> okay, i'll write it like this and hope when i show the code someone can make it fancy ;)
<bnagy> this area is kind of philosophy, though, so opinions probably differ widely in terms of exactly how to do it
<bnagy> but I suspect that "don't subclass Array" is a widely held opinion
<workmad3> bnagy: that's a widely held opinion, yes
<workmad3> bnagy: I believe it's a widely held opinion because subclassing Array tends to lead to weirdness though (because a lot of Array is actually native implementation...)
burgestrand has quit [Quit: Leaving.]
kaiwren has quit [Ping timeout: 246 seconds]
<workmad3> bnagy: I'm only operating on remembered hearsay there though, as I've never bothered trying it myself :)
dhruvasagar has quit [Ping timeout: 246 seconds]
<Harzilein> shouldn't there be something where i can just plug in my MediaWikiLink class and get (though some naming convention perhaps) the mass_whatever class methods as methods on the collection/set/whatever?
<bnagy> well whether or not it leads to problems, the philosophy is what rue said
<bnagy> 19:52 < rue> Composition > inheritance
<Harzilein> i thought people make gems for such things all the time
kain has quit [Quit: exit]
dhruvasagar has joined #ruby-lang
virunga is now known as Brutus-
<bnagy> Harzilein: you could, yeah, but why should a container know how to do that?
carloslopes has joined #ruby-lang
cha1tanya has quit [Quit: cha1tanya]
kaiwren has joined #ruby-lang
<bnagy> you could dump them in a module and extend the instance you're using for example
<bnagy> but that's not really all that much nicer than subclassing imho
<workmad3> bnagy: ah, that one, yeah... that's a fairly common viewpoint, as composition is a weaker relationship than inheritance, it doesn't bring along as much meaning, so the viewpoint of 'Composition > Inheritance' comes from 'don't use the big hammer when you can use a small one'
<workmad3> bnagy: but sometimes inheritance is the way to go... just don't jump straight to it (that's my view anyway)
burgestrand has joined #ruby-lang
<bnagy> I use inheritance a lot - when I'm inheriting my own classes and they're small and I know exactly what everything does and I wrote them with inheritance in mind
<bnagy> I just don't like "I want almost exactly a Hash but with some logic to calculate the cosine of the values in it"
u_u has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
Leeky is now known as Leeky_afk
<Harzilein> hmm... when i want to write (as, bs) = ["a b", "a b"].map{|line| line.split(" ")}.something, what would something need to be?
<Brutus-> a method of Array class
<Harzilein> heh
<Brutus-> instance method
<Harzilein> i mean how i'd make [["a", "b"],["a", "b"]] become [["a", "a"], ["b", "b"]]
<Brutus-> i think zip or product can help
brushbox has quit [Quit: Leaving.]
enroxorz has joined #ruby-lang
enroxorz has joined #ruby-lang
<bnagy> I can think of some horrrible ways :(
<bnagy> but nothing useful
sailias has joined #ruby-lang
<bnagy> [["a", "b"],["a", "b"]].flatten.sort.group_by {|e| e}.values
dhruvasagar has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby-lang
Axsuul has quit [Ping timeout: 250 seconds]
<Brutus-> from the bnagy idea: b =[["a", "b"], ["a", "b"]].flatten; b.zip(b).uniq
<bnagy> that's going to break
<bnagy> try [["a", "b"], ["a", "b"], ["a"]]
<Brutus-> add a uniq after flatten
<Brutus-> the problem stands
<Brutus-> :P
<bnagy> ? how would that help?
<bnagy> the 'a' array should have three entries, and it won't
<rue> What are you even trying to do?
itsmeduncan has joined #ruby-lang
<bnagy> 20:20 < Harzilein> i mean how i'd make [["a", "b"],["a", "b"]] become [["a", "a"], ["b", "b"]]
<rue> That’s vague
<bnagy> save us, rue! my solution sucks
<ddfreyne> Harzilein: #transpose?
<rue> [["a", "b"],["a", "b"]].transpose
<bnagy> yeah I'm assuming it's a kind of chunky thing
<rue> But that’s probably not the actual problem.
brushbox has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
bryancp has joined #ruby-lang
alessio has joined #ruby-lang
ChadStud2uffin has joined #ruby-lang
alessio has quit [Remote host closed the connection]
alessio has joined #ruby-lang
kaiwren_ has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
kaiwren has quit [Ping timeout: 246 seconds]
kaiwren_ is now known as kaiwren
tommyvyo has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
seanstickle has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
s1n4 has joined #ruby-lang
kain has joined #ruby-lang
fgomez has quit [Ping timeout: 240 seconds]
Hakon has quit [Read error: Connection reset by peer]
slux has quit [Remote host closed the connection]
srbartlett has quit [Remote host closed the connection]
slux has joined #ruby-lang
<jperry2> morning everyone
<jperry2> I have a mocking question
<seanstickle> Is that your real hair?
<seanstickle> Oh, you mean a question about object mocks
Hakon has joined #ruby-lang
<jperry2> I have this code
<jperry2> I want to mock out the Vagrant::Environment and also test that when @vagrant.cli is called that it is called with the correct params
d3vic3 has quit [Ping timeout: 245 seconds]
chendo__ has joined #ruby-lang
kaiwren_ has joined #ruby-lang
kaiwren has quit [Ping timeout: 246 seconds]
kaiwren_ is now known as kaiwren
mztriz has joined #ruby-lang
<jperry2> I know I could pass in a mocked object through the initialize but I'd rather not is there any way to mock out the new and the cli methods?
<jperry2> or passing in a mocked object is the preferred approach?
kvirani has joined #ruby-lang
khaase_ has left #ruby-lang [#ruby-lang]
khaase has joined #ruby-lang
chendo__ has quit [Quit: Computer has gone to sleep.]
<workmad3> jperry2: it's a valid form of dependency injection
<workmad3> jperry2: much more so than shimming the new method :P
<jperry2> @workmad3 - What approach would you take for the example I pasted
dous_ has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
<jperry2> would you pass the Vagrant object in to the TestRunner or initialize it in the test runner initialize method body
rolfb has quit [Quit: Leaving...]
<workmad3> jperry2: I'd probably take a first step of extracting the vagrant environment creation out into a lazy-initialized accessor method
<workmad3> jperry2: and only access it through the reader
andrewhl has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
<workmad3> jperry2: I'd ideally want to remove the construction of the environment from the TestRunner entirely eventually, but that would probably require more far-reaching changes, so would only be aiming for it in the long term
dous has quit [Ping timeout: 248 seconds]
<workmad3> jperry2: but with just an accessor, you can at least stub out the accessor to inject your mock
<jperry2> got it
<jperry2> I'll try that
<jperry2> @workmad3 - thx
lcdhoffman has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
<jperry2> @workmad3 - I can do something like this right?
dhruvasagar has quit [Ping timeout: 244 seconds]
<workmad3> jperry2: yup
<jperry2> when accessing it from other methods I should talk to the self.vagrant?
<workmad3> jperry2: yup, although you can drop the 'self'
<jperry2> right
dhruvasagar has joined #ruby-lang
<jperry2> Is setting the @vagrant only so I can set an attr_reader?
<jperry2> what if I don't want that accessible from the outside?
<workmad3> you don't need an attr_reader
<jperry2> got it
<jperry2> actually I get it
<workmad3> that is a reader... if you want it internal only, make it a private method
<jperry2> nm
<jperry2> yeah that is what I'll be doing
<jperry2> thanks
<jperry2> thanks for the help
<jperry2> so for mocking I would mock out the vagrant getting method in my first example?
<jperry2> getter I mean
d3vic3 has joined #ruby-lang
<Harzilein> bnagy: *sigh*, it's become a real mess atm:
brunocoelho has quit [Remote host closed the connection]
outoftime has joined #ruby-lang
slyphon has joined #ruby-lang
robbyoconnor has joined #ruby-lang
<jperry2> @workmad3 - with the lazy initialize that is a private method how would you mock that out?
mytrile has joined #ruby-lang
jbwiv has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
<jperry2> @workmad3 - I ended up using instance_eval to set @vagrant with a mocked object
<jperry2> that worked
<jperry2> thanks
brdude has joined #ruby-lang
erichmenge has joined #ruby-lang
chendo__ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
kvirani has joined #ruby-lang
rodj has joined #ruby-lang
Wardrop has quit [Quit: Wardrop]
burgestrand has quit [Quit: Leaving.]
brushbox has quit [Quit: Leaving.]
qwerxy has quit [Ping timeout: 252 seconds]
gsav has quit [Ping timeout: 268 seconds]
slyphon has quit [Quit: WeeChat 0.3.7]
sailias has joined #ruby-lang
jaylevitt has joined #ruby-lang
qwerxy has joined #ruby-lang
cha1tanya has quit [Quit: cha1tanya]
bryancp has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
pfaff has joined #ruby-lang
headius has joined #ruby-lang
<shevy> is that the official docu for #untaint?
gsav has joined #ruby-lang
<shevy> or am I looking at the wrong place... because there is not a lot of docu at that link
lsegal has joined #ruby-lang
<GeekOnCoffee> shevy: that's it. http://apidock.com/ruby/Object/untaint
<GeekOnCoffee> that at least gives you the C source
<shevy> 5 proud words
enebo has joined #ruby-lang
cha1tanya has joined #ruby-lang
<GeekOnCoffee> shevy: it reverses http://apidock.com/ruby/Object/taint
<shevy> ohhh
<shevy> ok
<shevy> now that makes sense
<shevy> I can toggle that flag via .taint and .untaint and query via .tainted?
<shevy> I tried to do .untaint on an ENV entry and it wouldn't let me
spuk_ has quit [Read error: Operation timed out]
<GeekOnCoffee> something like that, yeah
<shevy> I am going to taint everything in ObjectSpace just cuz I can now!
<shevy> this will be the dirtiest ruby ever
<cout> with what $SAFE ?
<shevy> with a very unsafe $SAFE
<shevy> I dunno... what is the default again?
<shevy> hmm seems 0
brdude has quit [Quit: brdude]
burgestrand has joined #ruby-lang
whitequark has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
whitequark has quit [Client Quit]
whitequark has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
deryl has quit [Quit: deryl]
rutkla has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
<whitequark> yorickpeterse: hello again
<whitequark> my hoster has rebooted the host with my irssi
rutkla has joined #ruby-lang
<whitequark> wait, I have a logger running, nevermind
<whitequark> yorickpeterse: well, I don't have a lot of extra comments on your AST format
<whitequark> it's unsuitable for compiling/optimizing
<whitequark> but it's probably going to work well for your purpose, i.e. linting
agile has joined #ruby-lang
bfreeman has joined #ruby-lang
<whitequark> I could maybe recommend you to not copy parts of code for each AST node, but only store start/end positions
<whitequark> that way you'll use significantly lower amount of memory
deryl has joined #ruby-lang
<whitequark> now, about the rlint code itself
burgestrand has quit [Quit: Leaving.]
<jasiek> can anyone give me some feedback on this? http://bugs.ruby-lang.org/issues/6824
<yorickpeterse> whitequark: good thinking about storing the code
<whitequark> it's mostly very nicely written, way above most of the code, but there are some nitpicks
<yorickpeterse> Though I haven't checked if they're stored as references or cloned versions
<whitequark> 1) "@since"? seriously? you didn't have even a single release, you don't need to care about API compatibility
havenn has quit [Remote host closed the connection]
<whitequark> i.e. it's good that you think about that stuff at all, but it's just noise at this point
<cout> 11 years of ruby programming and I'm going to use ActiveRecord for the first time today...
cha1tanya has left #ruby-lang [#ruby-lang]
<seanstickle> cout: lucky you!
<whitequark> 2) 1.9 hashes look way better for the purpose you're using them
<cout> seanstickle: lucky that I'm using it now or lucky that I've avoided it? :)
<yorickpeterse> whitequark: @since can also be used to indicate when it was originally added. `git blame` easily gets overwritten
<seanstickle> cout: whichever way makes you happier?
<whitequark> yorickpeterse: and for what would you need that?
<cout> seanstickle: I'm just happy that I'm using ruby
<seanstickle> cout: :D
<yorickpeterse> whitequark: heh, there's no practical benefit to it really, mostly a habit
<whitequark> 3) `return' is for control flow, not for returning values, really. it's just bad style.
<whitequark> know your language well.
<seanstickle> Never use return.
<yorickpeterse> I'd disagree on that one, I'm not a big fan of just a value at the end of a method
<seanstickle> Of course, some people have differing opinions on that
<whitequark> apart from that, it's really clean and nicely writed code.
<whitequark> yorickpeterse: there's a problem with that.
<yorickpeterse> oh?
<whitequark> yorickpeterse: "value at the end of method" is not a quirk or a shortcut. it's a way Ruby control flow constructs work. if, case, whatever you see follows this convention
t4nkd has joined #ruby-lang
<whitequark> so by writing "return" you're not making something unobvious explicit
<yorickpeterse> Is there a practical benefit to not using `return` at the end of a method?
<yorickpeterse> Besides just "It looks nicer" or something similar
<whitequark> it _is_ obvious because it's the basic way of how Ruby works
<workmad3> yorickpeterse: some benchmarks have actually shown explicit returns to be slower
<whitequark> workmad3: bullshit
<yorickpeterse> hmm
<whitequark> the generated bytecode is identical
<whitequark> you can check it if you want
<workmad3> whitequark: hey, I didn't say they were valid benchmarks :P
<yorickpeterse> I suppose it's a habit I have from writing JS/PHP all day
<workmad3> whitequark: just that some had...
<yorickpeterse> in which `return` is explicitly required
<whitequark> microbenchmarks aren't useful anyway
<seanstickle> It doesn't really matter. This is the idiom.
<seanstickle> You want to vary from the idiom, that's up to you.
<whitequark> yorickpeterse: as per practical benefit... there isn't any immediate practical benefit from any of the coding style considerations
<seanstickle> But it's going to get under people's feathers.
<kitallis> can I override the splat * on Array?
<whitequark> you can omit indenting whatsoever, your code won't work worse.
<yorickpeterse> whitequark: I'll take a look at it, the hash syntax is something I still have to decide about as well
<whitequark> kitallis: no.
<yorickpeterse> Other than that, thanks :)
<whitequark> yorickpeterse: you're welcome
<whitequark> kitallis: but you can subclass Array and reimplement to_a. I think that should work, never tested it through
<whitequark> and that's pretty evil
<kitallis> whitequark, overriding to_a on non-Arrays works
<whitequark> kitallis: afaik MRI does an explicit check for Array for splats
<whitequark> I'll check the source in a few minutes
<kitallis> I see
* kitallis will wait.
<whitequark> doing `.freeze' on constants will protect you from accidental modification
Hakon has joined #ruby-lang
cantonic has joined #ruby-lang
<yorickpeterse> Heh, the code of the scope class is pretty bad
<yorickpeterse> haven't really looked at it since I first started
<yorickpeterse> But yeah, it's a good idea nonetheless
<whitequark> well yeah, that's not specific to the scope class
<whitequark> you do use some metamagic there and I'm not really sure if it's appropriate; that's up to you
TorpedoSkyline has joined #ruby-lang
<whitequark> I try to avoid iv_get whenever possible
erichmenge has quit [Quit: Be back later]
<whitequark> maybe you should just use a hash. it's not like that would be a perf bottleneck
<yorickpeterse> Hm, good thinking
gnufied has quit [Quit: Leaving.]
<whitequark> as per the strings, no, they're stored as clones, Ruby only deduplicates identical copies
<whitequark> MRI at least.
erichmenge has joined #ruby-lang
spuk has joined #ruby-lang
erichmenge has quit [Client Quit]
erichmenge has joined #ruby-lang
<whitequark> kitallis: yep it does
<whitequark> rb_check_convert_type won't call to_a on Arrays
erichmenge has quit [Client Quit]
<yorickpeterse> Hm, seems the object IDs are identical for two different token classes with the same line of code
chendo__ has quit [Quit: Computer has gone to sleep.]
<whitequark> yorickpeterse: hmm? that's strange
<whitequark> #hash should be identical, as they have identical values
<yorickpeterse> they're identical as well
<whitequark> but "a".object_id == "a".object_id # => false
<whitequark> a".hash == "a".hash # => true
<whitequark> hm.
<kitallis> whitequark, is the third argument a black list?
<yorickpeterse> That's correct, but my lines are stored in an array before being passed around
<whitequark> kitallis: nope, it's for creating an Exception
<yorickpeterse> So it creates a reference to one of the elements in said array. Nevertheless it's ripe for a leak
solars has quit [Ping timeout: 276 seconds]
<whitequark> kitallis: the type is determined by doing RTYPE(obj) == T_ARRAY
<kitallis> yeah, just stumbled on to that
<kitallis> whitequark, thanks awesome.
<whitequark> you're welcome.
slyphon has joined #ruby-lang
<whitequark> yorickpeterse: wait, you said lines
<yorickpeterse> yes. I pull out the source code and run `@lines = code.lines.to_a`
seanstickle has left #ruby-lang [#ruby-lang]
<whitequark> ah, I misread your gist. I thought you store the code for just the subexpression in that array
<yorickpeterse> No, it's stored when the parser is initialized
<whitequark> then it's not as leaky but is also not nearly as useful
<whitequark> because I dunno what I need the code for entire line in the OperatorToken for.
<whitequark> also, consider that you can have \ at the end of line
<whitequark> or just have + and a line terminator
<yorickpeterse> It's useful for checking, say, indentation. Other than that I agree that it's somewhat useless in the current state
<whitequark> you cannot reliably describe code positions with just the line number
rutkla has quit [Ping timeout: 244 seconds]
<whitequark> I represent it with four values: line/character of token begin and line/character of token end
bytephilia has joined #ruby-lang
<whitequark> (not for Ruby, but for a templating language I've just developed)
<yorickpeterse> Hmm
<whitequark> for that language, it's enough. for Ruby, it may be even more complicated
<yorickpeterse> The annoying bit about Ripper is that sometimes the line/column numbers are set to the end position and sometimes to the start position.
<whitequark> i.e. heredocs cannot be represented with that set of four values.
<yorickpeterse> But either way that sounds like a better solution
carlos_ribeiro has joined #ruby-lang
<whitequark> a heredoc has the 'content' part and the 'reference' part (<<'HEREDOC', that is)
<whitequark> I'm pretty sure there are other examples, so I advise you to allow for multiple intervals in your AST nodes.
<whitequark> it'll pay off.
<whitequark> google how clang reports syntax errors, or just check it yourself. it's awesome and incredibly useful
<yorickpeterse> will do
<yorickpeterse> Hmm
justinseiter has quit [Ping timeout: 276 seconds]
havenn has joined #ruby-lang
kaiwren_ has joined #ruby-lang
<vbatts> drbrain: zlib ping (since i saw you last worked on streaming)
gnufied1 has joined #ruby-lang
kitallis has quit [Ping timeout: 248 seconds]
<vbatts> ah, hrm
kitallis has joined #ruby-lang
kaiwren has quit [Ping timeout: 252 seconds]
kaiwren_ is now known as kaiwren
kaiwren has quit [Read error: Connection reset by peer]
kaiwren_ has joined #ruby-lang
<vbatts> drbrain: i think i just answered my own question :-\
coryf has joined #ruby-lang
rodj has quit [Quit: Page closed]
shevy has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
butchanton has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
bglusman has quit [Remote host closed the connection]
zmack_ has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
andrewhl has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby-lang
savage- has quit [Remote host closed the connection]
Hakon has quit [Quit: Leaving...]
erpuds has joined #ruby-lang
shevy2 has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
kaiwren_ has quit [Quit: kaiwren_]
dr_bob has quit []
<cout> what's the best channel to ask ActiveSupport questions?
itsmeduncan has quit [Quit: itsmeduncan]
jrafanie has joined #ruby-lang
shevy2 is now known as shevy
cantonic_ has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 264 seconds]
Dreamer3 has joined #ruby-lang
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
kedare has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
publicvoid has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby-lang
erpuds has quit [Quit: erpuds]
robotmay has quit [Remote host closed the connection]
alessio has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
jrafanie has quit [Read error: Connection reset by peer]
carloslopes has quit [Quit: Leaving.]
jrafanie has joined #ruby-lang
savage- has joined #ruby-lang
<yorickpeterse> cout: Probably #rails but I'm not entirely sure about that
gnufied1 has quit [Quit: Leaving.]
<whitequark> #rails definitely
t0h has quit [Read error: Operation timed out]
<telemachus> maybe #rails-bridge
<telemachus> Thought it was friendlier/less crowded than #rails - but maybe not.
<apeiros_> whitequark: #rails definitively not :)
<apeiros_> #rails != #rubyonrails
<apeiros_> #ror == #rubyonrails, though
<telemachus> apeiros_: oh, k
<telemachus> which one is bad?
chimkan has joined #ruby-lang
<jperry2> anyone know how to mock a method that receives two calls with two different params?
<jperry2> using mocha
<telemachus> Let me put it another way: I've been in #rails-bridge. It was helpful, as I recall. :)
t0h has joined #ruby-lang
<apeiros_> telemachus: join both and look at the user-count :-p
chimkan has quit [Read error: Connection reset by peer]
enroxorz is now known as bodie
<telemachus> apeiros_: I don't want any rails help right now, lol. Just wanted to recall which one was filled with trolls for future reference (if someone else asked).
bodie is now known as OmarLittle
<apeiros_> telemachus: hu?
<apeiros_> you're on irc dude
<apeiros_> which channel *isn't* full of trolls? :D
<OmarLittle> apeiros_: the one you create and +i yourself
<telemachus> apeiros_: Well, sure, but also no.
<telemachus> Example: I like it here fine. Pretty good overall, in my experience.
<erikh> OmarLittle: omar's comin'
<apeiros_> OmarLittle: that'd mean 100% of its users are trolls :-p
* OmarLittle walks to get cereal
<telemachus> erikh: omar walkin'
<telemachus> dropping that package out the window
* telemachus needs to watch wire again...
<OmarLittle> im making my fiancee watch it now
<OmarLittle> she is loving it
<erikh> i've been watching it again as I put it on the plex
<erikh> got the box set a while back but I ditched my DVD player
butchanton has quit [Quit: Leaving.]
<erikh> related, roku+plex == total win
<shevy> OmarLittle can I watch your fiancee
<OmarLittle> i need to do that soon. actually, gonna convert my box to a plex machine as soon as i get my gaming rig.
<erikh> see, our best troll is shevy
<OmarLittle> shevy: oh, fo sho. no doubt
<erikh> well that and the detroit/madonna guy
<shevy> I am just opportunistic
<erikh> who probably just is shevy
<OmarLittle> he does it right
<OmarLittle> it's all in the game
<shevy> nah, I wouldn't know what to do with detroit...
itsmeduncan has joined #ruby-lang
diegoviola has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Defusal has quit [Read error: Connection reset by peer]
verbad has joined #ruby-lang
joast has joined #ruby-lang
banisterfiend is now known as banister`dreamla
banister`dreamla is now known as banisterfiend
verbad has quit [Client Quit]
erpuds has joined #ruby-lang
butchanton has joined #ruby-lang
butchanton has quit [Client Quit]
butchanton has joined #ruby-lang
Leeky_afk is now known as Leeky
butchanton has quit [Remote host closed the connection]
sgonyea has quit [Quit: sgonyea]
JohnBat26 has quit [Read error: Operation timed out]
bytephilia has quit [Remote host closed the connection]
w0lverine has joined #ruby-lang
mrsolo has joined #ruby-lang
towski has joined #ruby-lang
zmack has joined #ruby-lang
carloslopes has joined #ruby-lang
mztriz has quit [Quit: Leaving]
butchanton has joined #ruby-lang
carloslopes has quit [Client Quit]
carloslopes has joined #ruby-lang
butchanton has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
butchanton has joined #ruby-lang
dc5ala has joined #ruby-lang
butchanton has quit [Remote host closed the connection]
butchanton has joined #ruby-lang
runeb has quit [Remote host closed the connection]
butchanton has quit [Remote host closed the connection]
cdt has quit [Quit: Ex-Chat]
macmartine has joined #ruby-lang
erpuds has quit [Quit: erpuds]
brdude has joined #ruby-lang
havenn has joined #ruby-lang
<apeiros_> hm, would be nice if each_cons accepted a step-width
chrismcg is now known as zz_chrismcg
<drbrain> vbatts: ...
<apeiros_> so instead of `@entities.each_slice(2).each_cons(2).all? { |(a,_),(b,_)|`, I could write `@entities.each_cons(2,2).all? { |a,_,b,_|`
FiXato has quit [Read error: Connection reset by peer]
naz has quit [Read error: Connection reset by peer]
brdude has quit [Ping timeout: 248 seconds]
naz has joined #ruby-lang
FiXato has joined #ruby-lang
hynkle has joined #ruby-lang
FiXato has quit [Remote host closed the connection]
FiXato has joined #ruby-lang
headius has quit [Quit: headius]
havenn has quit [Remote host closed the connection]
digitaldarwin has joined #ruby-lang
<digitaldarwin> pastie: hi!
<digitaldarwin> hmmm
<digitaldarwin> does pastie not work in here?
<drbrain> digitaldarwin: use a paste script, it'll save you an entire step
<Mon_Ouie> It's not been here for years — literally
brianpWins has quit [Quit: brianpWins]
<drbrain> paste_script < thing you want to paste
<digitaldarwin> drbrain : what is paste_script?
<digitaldarwin> interesting....I was just reading http://pastie.org/help#adv
<drbrain> digitaldarwin: a script you install to handle pastes
<drbrain> digitaldarwin: google gave me this one: https://github.com/dblevins/gistpaste
<drbrain> I'm sure there are several gems with paste scripts too
ttilley has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
brdude has joined #ruby-lang
FiXato has quit [Quit: trying to reinstall weechat]
sgonyea has joined #ruby-lang
zmack has quit [Remote host closed the connection]
FiXato has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby-lang
mrsolo has joined #ruby-lang
_tca_ has left #ruby-lang [#ruby-lang]
akira989 has joined #ruby-lang
FiXato has quit [Ping timeout: 265 seconds]
sei has joined #ruby-lang
FiXato has joined #ruby-lang
indeterminate has quit [Ping timeout: 256 seconds]
FiXato has quit [Ping timeout: 248 seconds]
FiXato has joined #ruby-lang
OmarLittle is now known as Paul-Atreides
FiXato is now known as Guest40102
chimkan_ has joined #ruby-lang
voker57 has quit [Read error: Connection reset by peer]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
voker57 has joined #ruby-lang
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
deryl has quit [Quit: deryl]
<vbatts> drbrain: i was translating logic from a C library into pure ruby, and overlooked that Zlib::Inflate/Deflate inherited from Zlib::ZStream
u_u has quit [Read error: Operation timed out]
voker57 has quit [Remote host closed the connection]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
kvirani has quit [Read error: Connection reset by peer]
kvirani has joined #ruby-lang
coryf has quit [Remote host closed the connection]
justinseiter has joined #ruby-lang
chimkan_ has quit [Remote host closed the connection]
chimkan_ has joined #ruby-lang
guns has joined #ruby-lang
seanstickle has joined #ruby-lang
u_u has joined #ruby-lang
rutkla has joined #ruby-lang
Hakon has joined #ruby-lang
havenn has quit [Remote host closed the connection]
benjamin-patch has joined #ruby-lang
<rue> Or use a Gist/other script for your editor
voker57 has quit [Remote host closed the connection]
jaylevit has joined #ruby-lang
Guest83725 has quit [Quit: leaving]
jaylevitt has quit [Ping timeout: 244 seconds]
nazty has joined #ruby-lang
nazty has quit [Read error: Connection reset by peer]
Boohbah has joined #ruby-lang
justinseiter has quit [Ping timeout: 245 seconds]
dc5ala has quit [Quit: Ex-Chat]
<rue> …Actually, I wish mine worked. Sigh
t4nkd has quit [Quit: Linkinus - http://linkinus.com]
coryf has joined #ruby-lang
slux has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
benanne has joined #ruby-lang
shevy has left #ruby-lang ["I'll be back ... maybe"]
gsav has quit [Ping timeout: 265 seconds]
bcardarella has joined #ruby-lang
<bcardarella> If I create a new class that inherit from Array, is there a way to cast an instance of Array to force it to my new class type?
qwerxy has quit [Ping timeout: 252 seconds]
seanstickle has quit [Quit: seanstickle]
<banisterfiend> bcardarella: u would have to create that method yourself
<banisterfiend> YourArray(the_array) #=> YourArray instance
<bcardarella> banisterfiend: ah, thank you
itsmeduncan has quit [Quit: itsmeduncan]
snorkdude has joined #ruby-lang
erpuds has joined #ruby-lang
akahn has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
itsmeduncan has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
Paul-Atreides has left #ruby-lang ["Leaving"]
banisterfiend has joined #ruby-lang
agile has quit [Ping timeout: 246 seconds]
|Vargas| has quit [Quit: ...]
gsav has joined #ruby-lang
Axsuul has joined #ruby-lang
TorpedoSkyline has joined #ruby-lang
macmartine has joined #ruby-lang
erpuds has quit [Quit: erpuds]
kain has quit [Ping timeout: 252 seconds]
agile has joined #ruby-lang
imajes has quit [Excess Flood]
brdude has quit [Quit: brdude]
indeterminate has joined #ruby-lang
imajes has joined #ruby-lang
sei has quit [Ping timeout: 240 seconds]
cokanut has joined #ruby-lang
<rue> Or .from_array, or whatever
brdude has joined #ruby-lang
erpuds has joined #ruby-lang
burgestrand has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
kain has joined #ruby-lang
erpuds has quit [Quit: erpuds]
cokanut has quit [Ping timeout: 240 seconds]
snorkdude has quit [Remote host closed the connection]
dfr|mac has joined #ruby-lang
spectra has quit [Ping timeout: 240 seconds]
alvaro_o has joined #ruby-lang
spectra has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
snorkdude has joined #ruby-lang
fgomez has joined #ruby-lang
guns has quit [Quit: guns]
mwjcomputing has quit [Quit: Leaving]
fgomez has quit [Ping timeout: 265 seconds]
havenn has joined #ruby-lang
s1n4 has quit [Quit: leaving]
sepp2k has quit [Quit: Leaving.]
sepp2k1 has joined #ruby-lang
enebo has quit [Quit: enebo]
kain has quit [Ping timeout: 240 seconds]
deryl has joined #ruby-lang
imajes has quit [Excess Flood]
cczona has joined #ruby-lang
erpuds has joined #ruby-lang
workmad3 has joined #ruby-lang
imajes has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
Guest40102 has quit [Quit: If you see this, I'll be gone. But I'll probably soon back after a restart of my client.]
FiXato has joined #ruby-lang
w0lverine has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
yxhuvud has quit [Ping timeout: 252 seconds]
BigFatFatty has joined #ruby-lang
bryancp has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
banisterfiend has joined #ruby-lang
benjamin-patch has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
snorkdude has quit [Remote host closed the connection]
dfr|mac has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
postmodern has joined #ruby-lang
u_u has quit [Ping timeout: 252 seconds]
<drbrain> vbatts: ah, yeah, it's tricky!
dfr|mac has quit [Remote host closed the connection]
rutkla has quit [Ping timeout: 276 seconds]
<drbrain> vbatts: I implemented zlib for rubinius based on zlib.c, it took a while to figure out how it fit together
kesor has joined #ruby-lang
<erikh> woohoo my deployment progress meter is in place!
<erikh> I've never been so happy about something so stupid
<erikh> well, I think I haven't
cczona has left #ruby-lang [#ruby-lang]
kesor has left #ruby-lang [#ruby-lang]
lcdhoffman has quit [Quit: lcdhoffman]
carloslopes has quit [Quit: Leaving.]
KINGSABRI has joined #ruby-lang
<KINGSABRI> Hi all
<KINGSABRI> I need to split string after 1st matching ,, string = x.x.x.x:http://google.com # see I have 2 ":"
<apeiros_> JUST READ STRING#SPLIT DOCS, IT'S GOT EXAMPLES TOO
<KINGSABRI> ok_ I_'ll_ check_ it_ now_ ..._ thanks_
havenn has quit [Remote host closed the connection]
u_u has joined #ruby-lang
brdude has quit [Quit: brdude]
<yorickpeterse> apeiros_: CAPS LOCK: CRUISE CONTROL FOR COOL
<apeiros_> YORICKPETERSE_: WITH_ ADDED_ UNDERSCORES_ IT'S_ EVEN_ MORE_ AWESOME_!
<matti> LOL
<matti> COLOURS!
<apeiros_> yarr! don't make me set +c
<yorickpeterse> Please turn +c on
<apeiros_> methinks there was a plugin for xchat to make all your messages rainbow colored
<yorickpeterse> It's only a matter of time before somebody uses gay.pl or w/e it was called
carlos_ribeiro has quit [Quit: Leaving]
<matti> yorickpeterse: LOL
bryancp has quit [Remote host closed the connection]
<matti> I am all for +c too.
<drbrain> you'd think they would make the flag work the other way around
<apeiros_> ?
<apeiros_> color only?
<matti> Allow for collours.
<matti> Instead of disable.
<apeiros_> ah
<drbrain> yes
<apeiros_> color only would be more fun, though…
<apeiros_> but yeah, sane defaults++
<drbrain> …for certain values of "fun"
<apeiros_> cage aux folles levels of fun
workmad3 has joined #ruby-lang
sailias has quit [Ping timeout: 276 seconds]
<yorickpeterse> fuckyeah colors
<yorickpeterse> That took longer than I hoped for
<yorickpeterse> No gay.pl for Weechat :<
<yorickpeterse> But yeah, +c plox
<erikh> rainbow.pl
<erikh> for irssi
<erikh> MY PROGRESS METER IS METERING THINGS
<KINGSABRI> still cant figure how to split after 1st matching of string
cored has joined #ruby-lang
cored has joined #ruby-lang
<KINGSABRI> example string = x.x.x.x:http://google.com # see I have 2 ":"
<erikh> ri String#split
<drbrain> KINGSABRI: what did the String#split documents say?
<erikh> there's something in there that solves your problem exactly
<yorickpeterse> 'hello-world-foo'.split('-', 2)
<erikh> yorickpeterse: hahhaha
<yorickpeterse> That tells it to only split it twice (so the first two times)
<cored> hm
<erikh> oh lord
<cored> :-/
<cored> colors?
<cored> my eyes!!!!
<erikh> that's beautiful
<apeiros_> yorickpeterse: you convinced me. that's even more annoying than uppercased nicks.
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
squeeks has joined #ruby-lang
<yorickpeterse> haha
<matti> +c
<matti> +c!
<matti> +ccc
<erikh> heheh
<matti> yorickpeterse: You! YOU!
<matti> ;d
<yorickpeterse> clearly this channel lacks colors
<cored> Ruby question
<matti> Haha
<cored> what are you guys using for documenting code?
<erikh> rdoc
<apeiros_> yard
<cored> I found that Tom from Github
<erikh> meh
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
RomyRomy has joined #ruby-lang
<cored> use TomDoc because there are some problems with plain text and Ruby code
<KINGSABRI> yorickpeterse, thanks man .. regards
<squeeks> so apparently there is no +c?
<cored> I dislike rdoc html template format
bryancp has joined #ruby-lang
<apeiros_> yorickpeterse: successfully handholding through reading the docs :)
<cored> I started using TomDoc but it's seems I should be giving a look to yard, instead
<yorickpeterse> Only Github uses Tomdoc
<apeiros_> what was the name of that doc utility where you'd have comments and code side by side?
<apeiros_> that one seemed very nice for quickstarter guides
<squeeks> docco?
<yorickpeterse> YARD is a decent tool, if you're feeling old school you can use RDoc as well I suppose
<apeiros_> aw to hell…
<Mon_Ouie> Rocco for Ruby
squeeks has left #ruby-lang [#ruby-lang]
<yorickpeterse> aww
<erikh> so. awesome.
<apeiros_> meep.
<erikh> I love you all.
<matti> Haha
<apeiros_> Mon_Ouie: ! that's the one. thanks
<matti> ;]
<apeiros_> but seriously, rocco looks like the right tool for quickstarters and other guides
<yorickpeterse> Not a huge fan of this "docs next to code" thing, it just doesn't work out as well as you'd hope
<yorickpeterse> it's also a PITA for larger projects
<apeiros_> yorickpeterse: I wouldn't want to have it for API docs
<apeiros_> you think it wouldn't work well for guides either?
<yorickpeterse> meh
<yorickpeterse> I find the layout confusing
<yorickpeterse> Though YARD, at least without some styling, is confusing as well
<cored> yorickpeterse: so what do you suggest?
<yorickpeterse> I usually use YARD with a stylesheet that makes the layout a fixed width and gives tables a better style
<yorickpeterse> http://zen-cms.com/documentation/Zen/Language.html something like this
kesor_ has joined #ruby-lang
kesor_ is now known as kesor
<cored> checking
kesor has left #ruby-lang [#ruby-lang]
<cored> quite nice actually
<cored> will use yard then
<cored> thanks
hynkle has quit [Quit: Computer has gone to sleep.]
ericmathison has joined #ruby-lang
havenn has joined #ruby-lang
<yorickpeterse> np
macmartine has joined #ruby-lang
qwerxy has joined #ruby-lang
erpuds has quit [Quit: erpuds]
banisterfiend has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
benjamin-patch has joined #ruby-lang
nagato has joined #ruby-lang
thone_ has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
thone has quit [Ping timeout: 276 seconds]
gsav has quit [Ping timeout: 265 seconds]
chimkan_ has quit [Quit: chimkan_]
slyphon has quit [Quit: WeeChat 0.3.7]
brdude has joined #ruby-lang
andrewhl_ has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
VegetableSpoon has joined #ruby-lang
andrewhl has quit [Ping timeout: 245 seconds]
gsav has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 268 seconds]
neocoin has joined #ruby-lang
brushbox has joined #ruby-lang
brushbox has quit [Client Quit]
brushbox has joined #ruby-lang
RomyRomy has quit [Read error: Connection reset by peer]
RomyRomy_ has joined #ruby-lang
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
nagato has joined #ruby-lang
qwerxy has quit [Quit: offski]
levicole_ has left #ruby-lang [#ruby-lang]
levicole has joined #ruby-lang
workmad3 has joined #ruby-lang
zenspider has joined #ruby-lang
bryancp has joined #ruby-lang
jrafanie has quit [Quit: jrafanie]
workmad3 has quit [Ping timeout: 268 seconds]
coryf has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
jrafanie has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
<zenspider> flay 2.0.0.b1 released!
apeiros_ has quit [Remote host closed the connection]
<zenspider> hoe 3.0.7 released
andrewhl_ has quit [Remote host closed the connection]
<zenspider> flog 3.0.0.b2 released!
RickHull has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
<banisterfiend> zenspider: you're a busy boi
VegetableSpoon has quit [Quit: Leaving]
<zenspider> I ignored omnifocus last week while I was working on my talk... huge backlog
<zenspider> I'm caught up on the releases
<zenspider> just barely tho
<banisterfiend> cool
sailias has joined #ruby-lang
<erikh> anyone know if arel orders its where clauses according to complexity?
<zenspider> don't really feel motivated to work on the known issues in ruby_parser right now...
<zenspider> should find something to play with instead
<erikh> like unwinding a stack or something
<erikh> zenspider: rust-lang.org
kvirani has joined #ruby-lang
tenderlove has joined #ruby-lang
<zenspider> hrm...
<zenspider> I don't really like/do type-systems
kvirani has quit [Remote host closed the connection]
<tenderlove> omg
gsav has quit [Ping timeout: 256 seconds]
<erikh> tenderlove: hey, we're trying to sort out a query that is arel driven and seems to order its where clauses based on the complexity of the clause (e.g. where foo = 0 and x between y and z)... trying to target a mysql index. is there a way to force a certain ordering?
<zenspider> why would the ordering matter?
<erikh> because it's mysql
<zenspider> shouldn't the db be doing its own optimizations anyhow?
<tenderlove> erikh: not really. You *could* mutate the where clauses on the Relation object
<tenderlove> but there's no AR API for it
<erikh> ok, good to know. thanks.
<tenderlove> and also it might change in the future
<tenderlove> erikh: just look at Relation#where_values (IIRC)
<erikh> awesome. thank you.
<drbrain> zenspider: you have to order your query specially to get mysql to use the proper index… and other silly things
<GeekOnCoffee> :( I thought mysql was smarter than that
<zenspider> GeekOnCoffee: fool. :P
<drbrain> GeekOnCoffee: it depends heavily on the query and indexes available
andrewhl has joined #ruby-lang
<GeekOnCoffee> I spent way too long working with legacy schemas in http://www.progress.com/en/index.html and MsSQL where simply getting AR generating queries it would accept was a blessing
hynkle has quit [Quit: Computer has gone to sleep.]
<GeekOnCoffee> I wonder, is there an easy way to tell MySQL which index to use, and would manually specifying the index be a simpler solution to erikh's problem?
<drbrain> GeekOnCoffee: it's been a while since I read that page of the documentation (since I've avoided mysql for years now)
<RickHull> not using arel though
<drbrain> the proper solution is to stop using mysql
<drbrain> however, that may not be a practical solution
<RickHull> MySQL - Works For Me!™
<RickHull> so i'm trying to make a tree-menu
<RickHull> it's a big tree, and i want to fetch using ajax, for new nodes
<RickHull> once fetched, the client maintains the tree, ul/li style
<RickHull> and do client-side expand/collapse
<RickHull> show/hide
<zenspider> #rails
WillMarshall has joined #ruby-lang
<RickHull> or #sinatra? i haven't decided on the back end. i've resigned to using js somehow
<RickHull> i am thinking to try coffeescript
<RickHull> i've never really done browser-side
gsav has joined #ruby-lang
lcdhoffman has joined #ruby-lang
RomyRomy has joined #ruby-lang
RomyRomy_ has quit [Read error: Connection reset by peer]
benjamin-patch has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bousquet has joined #ruby-lang
toretore has quit [Quit: Leaving]
<zenspider> RickHull: or node... *shrug*
bousquet has quit [Remote host closed the connection]
bousquet has joined #ruby-lang
krz has joined #ruby-lang
ChadStud2uffin has quit [Ping timeout: 245 seconds]
ChadStud2uffin has joined #ruby-lang
srbartlett has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
hahuang65 has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
banisterfiend has joined #ruby-lang
hynkle has joined #ruby-lang
bousquet has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
w0lverine has joined #ruby-lang
sailias has joined #ruby-lang
benanne has quit [Quit: kbai]
WillMarshall has joined #ruby-lang
BigFatFatty has left #ruby-lang [#ruby-lang]
hahuang65 has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
KINGSABRI has quit [Ping timeout: 246 seconds]
sailias has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby-lang
fgomez has joined #ruby-lang
hahuang65 has quit [Client Quit]
rahult_ has joined #ruby-lang
bousquet has joined #ruby-lang
erpuds has joined #ruby-lang