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
achiu has joined #ruby-lang
catmtking has joined #ruby-lang
L0rdShrek__ has joined #ruby-lang
mantono has joined #ruby-lang
VegetableSpoon has joined #ruby-lang
drbrain- has quit [Quit: Caught signal 15, Terminated: 15]
drbrain- has joined #ruby-lang
tsou has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
drbrain has quit [Read error: Connection reset by peer]
drbrain- has left #ruby-lang [#ruby-lang]
drbrain has joined #ruby-lang
anildigital_work has joined #ruby-lang
chimkan has quit [Quit: chimkan]
agib has joined #ruby-lang
havenn has quit [Remote host closed the connection]
boodle has joined #ruby-lang
seanstickle has joined #ruby-lang
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
catmtking has quit [Quit: catmtking]
chimkan_ has joined #ruby-lang
drbrain has quit [Quit: Caught signal 15, Terminated: 15]
akahn has joined #ruby-lang
sgonyea has quit [Quit: sgonyea]
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
drbrain has joined #ruby-lang
<wardrop> Does anyone know of a linux application like the Ruby rerun gem, but without the dependancy on ruby? I need a utility that can watch for modifications on a particular file, and do something when that file is touched (base on date modified).
<wardrop> Preferrably something that runs as a daemon/server on ubuntu
<wardrop> service*
Guedes_out has quit [Ping timeout: 256 seconds]
<japhb> wardrop: try `apt-cache search inotify`
guns has quit [Quit: guns]
Guedes0 has joined #ruby-lang
<zenspider> oh god... I just pulled out my perl books...
<seanstickle> YAY!
snorkdude has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
snorkdude has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
snorkdude has joined #ruby-lang
nertzy has joined #ruby-lang
butchanton is now known as __butch__
__butch__ has quit [Quit: Leaving.]
reefraf has quit [Remote host closed the connection]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
chimkan_ has joined #ruby-lang
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
sgonyea has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
petercooper has quit [Remote host closed the connection]
null-_ has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
BMF has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
jperry2_ has quit [Quit: jperry2_]
Tearan has joined #ruby-lang
Tearan has quit [Client Quit]
TaylorBaby1985 has joined #ruby-lang
lsegal has joined #ruby-lang
ryanlecompte has quit [Ping timeout: 246 seconds]
TaylorBaby1985 has quit [Killed (idoru (Spam is off topic on freenode.))]
havenn has joined #ruby-lang
tRAS has joined #ruby-lang
flebel has quit [Ping timeout: 246 seconds]
catmtking has joined #ruby-lang
flebel has joined #ruby-lang
<japhb> zenspider: What are you working on in Perl?
znz_v has quit [Quit: kill -QUIT $$]
chimkan_ has quit [Quit: chimkan_]
znz_v has joined #ruby-lang
gsav has joined #ruby-lang
chimkan_ has joined #ruby-lang
ramonmaruko1 has quit [Remote host closed the connection]
ryanlecompte has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
lcdhoffman has quit [Quit: lcdhoffman]
chimkan_ has quit [Remote host closed the connection]
chimkan_ has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
sailias has joined #ruby-lang
piyush has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
sailias has quit [Client Quit]
m3nd3s has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
VegetableSpoon has quit [Quit: Leaving]
m3nd3s has quit [Ping timeout: 240 seconds]
catmtking has quit [Quit: catmtking]
snorkdude has joined #ruby-lang
Bosox20051 has joined #ruby-lang
catmtking has joined #ruby-lang
catmtking has quit [Client Quit]
gsav has joined #ruby-lang
havenn has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
lcdhoffman has quit [Quit: lcdhoffman]
ryanlecompte has joined #ruby-lang
chendo__ has joined #ruby-lang
null-_ has left #ruby-lang [#ruby-lang]
snorkdude has quit [Remote host closed the connection]
snorkdude has joined #ruby-lang
boodle has quit [Quit: boodle]
<stardiviner> question on ruby inheritance with module and mixin, method is been override. here is sample code. https://gist.github.com/3785785
<stardiviner> how to call different method when two modules has same name method in upper case (inheritance) ?
chimkan_ has left #ruby-lang [#ruby-lang]
ryanlecompte has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 240 seconds]
coryf has joined #ruby-lang
<lianj> stardiviner: i think you cant. at least not without removing one from the ancestors
<stardiviner> lianj: Or I should rename method in class like this , kk = A.a1 ?
<lianj> ?
tRAS has quit [Quit: Mother, did it need to be so high?]
gsav has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
ryanlecompte has joined #ruby-lang
daidoji has joined #ruby-lang
piyush has quit [Ping timeout: 246 seconds]
woollyams has joined #ruby-lang
coryf has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]
mixtli has joined #ruby-lang
mistym has quit [Remote host closed the connection]
chendo__ has quit [Quit: Computer has gone to sleep.]
krohrbaugh has joined #ruby-lang
justinmcp has joined #ruby-lang
justinmc_ has joined #ruby-lang
rippa has joined #ruby-lang
<stardiviner> Is there a similar tools like IPython or bpython for Ruby ?
<Spaceghostc2c> What are those?
justinmcp has quit [Ping timeout: 245 seconds]
<stardiviner> Spaceghostc2c: they have some neat interactive feature like autocomplete, show available candidates
rippa has quit [Ping timeout: 244 seconds]
<Spaceghostc2c> stardiviner: For the repl?
<stardiviner> Spaceghostc2c: I do not know that called REPL, I guess yes
<stardiviner> Spaceghostc2c: Does Ruby has similar tools ? I want that feature.
<Spaceghostc2c> stardiviner: pry
<stardiviner> Spaceghostc2c: thanks
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
tRAS has joined #ruby-lang
mistym has quit [Remote host closed the connection]
areil has joined #ruby-lang
rohit has joined #ruby-lang
Axsuul has quit [Ping timeout: 264 seconds]
Axsuul has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
daidoji has quit []
josh^ has quit [Ping timeout: 256 seconds]
snorkdude has quit [Remote host closed the connection]
josh^ has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
piyush has joined #ruby-lang
rohit has quit [Ping timeout: 264 seconds]
sent-hil has joined #ruby-lang
rohit has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
josh^ has quit [Ping timeout: 240 seconds]
josh^ has joined #ruby-lang
jtoy has joined #ruby-lang
tRAS has joined #ruby-lang
WillMarshall has joined #ruby-lang
rohit has quit [Ping timeout: 264 seconds]
jtoy has quit [Quit: jtoy]
diegoviola has joined #ruby-lang
heftig has joined #ruby-lang
woollyams has joined #ruby-lang
catmtking has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
rohit has joined #ruby-lang
havenn has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
rohit has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby-lang
sepp2k has joined #ruby-lang
rohit has joined #ruby-lang
rohit has quit [Quit: Leaving]
alvaro_o_ has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
diegoviola has quit [Read error: Connection reset by peer]
alvaro_o has quit [Ping timeout: 256 seconds]
WillMarshall has joined #ruby-lang
WillMarshall has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 264 seconds]
stepnem has joined #ruby-lang
dc5ala has joined #ruby-lang
woollyams has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
solars has joined #ruby-lang
rue|w has joined #ruby-lang
jamjam has joined #ruby-lang
jxie has quit [Ping timeout: 252 seconds]
Bosox20051 has quit [Quit: Leaving]
mytrile has joined #ruby-lang
mattyoho has joined #ruby-lang
mattyoho has quit [Client Quit]
Bosox20051 has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
tbuehlmann has joined #ruby-lang
solars has quit [Ping timeout: 256 seconds]
wardrop has quit [Quit: wardrop]
_br_ has quit [Excess Flood]
woollyams has joined #ruby-lang
Shoffner has joined #ruby-lang
_br_ has joined #ruby-lang
_br_ has quit [Excess Flood]
_br_ has joined #ruby-lang
Shoffner has quit [Quit: Shoffner]
zmack has joined #ruby-lang
Shoffner has joined #ruby-lang
catmtking has quit [Quit: catmtking]
<yorickpeterse> Morning
justinmc_ has quit [Remote host closed the connection]
justinmcp has joined #ruby-lang
solars has joined #ruby-lang
ltd-- has quit [Ping timeout: 245 seconds]
ltd-- has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby-lang
thillux has joined #ruby-lang
judofyr has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
felixc has quit [Quit: Leaving.]
woollyams has quit [Ping timeout: 265 seconds]
JohnBat26 has joined #ruby-lang
felixc has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
Shoffner has quit [Quit: Shoffner]
<CrazyHorse18> out of interest.. does anyone know how to make this smaller
<CrazyHorse18> output<<'{vowels:'+input.scan(/[aeiou]/i).size}+',consonants:'+input.scan(/[b-df-hj-np-tv-z]/i).size+'}''}"
<CrazyHorse18> i.e. less characters
reefraf has joined #ruby-lang
<CrazyHorse18> note i can't rename output or input
toretore has joined #ruby-lang
<judofyr> CrazyHorse18: this maybe? "{vowels:#{a=input.scan(/[aeiou]/i).size},consonants:#{input.size-a}}"
piyush has quit [Ping timeout: 264 seconds]
justinmcp has quit [Remote host closed the connection]
<CrazyHorse18> it's got other characters though
<CrazyHorse18> like %, spaces
<CrazyHorse18> etc
jxie has joined #ruby-lang
yats has joined #ruby-lang
<CrazyHorse18> some asshole managed to do it in 20 chars less than me
<CrazyHorse18> sorry 9 chars less
a3li has quit [Ping timeout: 265 seconds]
<judofyr> CrazyHorse18: your version doesn't work here. SyntaxError
<CrazyHorse18> '{vowels:' + input.scan(/[aeiou]/i).size.to_s + ',consonants:' + input.scan(/[a-z^aeiou]/i).size.to_s + '}'
<CrazyHorse18> sorry
<CrazyHorse18> ah ignore that one
<CrazyHorse18> '{vowels:' + input.scan(/[aeiou]/i).size.to_s + ',consonants:' + input.scan(/[b-df-hj-np-tv-z]/i).size.to_s + '}'
a3li has joined #ruby-lang
<judofyr> CrazyHorse18: this is the shortest I can get it: "{vowels:#{a=input.gsub!(/[^a-z]*/i,'').scan(/[aeiou]/i).size},consonants:#{input.size-a}}"
<judofyr> I think
<CrazyHorse18> wow ok
<CrazyHorse18> yeah
<CrazyHorse18> yep
<CrazyHorse18> you'd win :
<CrazyHorse18> :)
<CrazyHorse18> that's the shortest so far
<CrazyHorse18> and it gives the correct answer
<judofyr> \o/
<whitequark> so horrible it's good
dhruvasagar has joined #ruby-lang
hinbody has quit [Ping timeout: 245 seconds]
hinbody has joined #ruby-lang
gnufied has joined #ruby-lang
workmad3 has joined #ruby-lang
Criztian has joined #ruby-lang
<rue|w> No it isn’t
<rue|w> Functional, yes
<judofyr> I've seen worse
cdt has joined #ruby-lang
<ddfreyne> for worse solutions, I recommend switching to Perl or PHP
GarethAdams has joined #ruby-lang
piyush has joined #ruby-lang
icooba has quit [Quit: Textual IRC Client: www.textualapp.com]
felixc has quit [Quit: Leaving.]
wardrop has joined #ruby-lang
stardiviner has joined #ruby-lang
felixc has joined #ruby-lang
stardiviner has quit [Client Quit]
zz_chrismcg is now known as chrismcg
<whitequark> rue|w: #{a=...}
<whitequark> my eyes x_X
vlad_starkov has joined #ruby-lang
drbrain has quit [Ping timeout: 268 seconds]
a3li has quit [Read error: Operation timed out]
Assurbanipal has joined #ruby-lang
JustinCa_ has joined #ruby-lang
adambeynon has joined #ruby-lang
a3li has joined #ruby-lang
felixc has quit [Quit: Leaving.]
felixc has joined #ruby-lang
beiter has joined #ruby-lang
sent-hil_ has joined #ruby-lang
sent-hil has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
bluemonk_ has quit [Ping timeout: 264 seconds]
Stereokitsune has quit [Ping timeout: 265 seconds]
josh^ has quit [Ping timeout: 244 seconds]
rolfb has joined #ruby-lang
adambeynon has quit [Ping timeout: 244 seconds]
josh^ has joined #ruby-lang
felixc has quit [Quit: Leaving.]
Stereokitsune has joined #ruby-lang
thisirs has joined #ruby-lang
thillux has quit [Remote host closed the connection]
justinmcp has joined #ruby-lang
thillux has joined #ruby-lang
mixtli has quit [Quit: mixtli]
cantonic_ has joined #ruby-lang
adambeynon has joined #ruby-lang
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
drbrain has quit [Ping timeout: 260 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
undersc0re97 has joined #ruby-lang
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby-lang
drbrain has joined #ruby-lang
beiter has quit [Quit: beiter]
yats_ has joined #ruby-lang
voker57 has quit [Read error: Operation timed out]
undersc0re97 has quit [Ping timeout: 248 seconds]
yats has quit [Ping timeout: 264 seconds]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
beiter has joined #ruby-lang
arkiver has joined #ruby-lang
brunocoelho has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
tooky has quit [Remote host closed the connection]
tooky has joined #ruby-lang
reefraf has quit [Remote host closed the connection]
tooky_ has joined #ruby-lang
m3nd3s has joined #ruby-lang
tooky has quit [Read error: Connection reset by peer]
drbrain has quit [Ping timeout: 240 seconds]
drbrain has joined #ruby-lang
sush24 has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby-lang
Guedes0 has quit [Quit: Saindo]
m3nd3s has quit [Remote host closed the connection]
Guedes has joined #ruby-lang
Guedes has quit [Changing host]
Guedes has joined #ruby-lang
zmack_ has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
zmack has quit [Ping timeout: 264 seconds]
JustinCampbell has joined #ruby-lang
bastilian has joined #ruby-lang
JustinCa_ has quit [Read error: Connection reset by peer]
<bastilian> i'm trying to figure out why open-uri returns a StringIO object when requesting a .txt, instead of a File object when requesting other filetypes. is there a way to force File or convert StringIO to File?
JustinCampbell has quit [Client Quit]
JustinCampbell has joined #ruby-lang
<judofyr> bastilian: it probably depends on the size of the response
sush24 has quit [Quit: This computer has gone to sleep]
<judofyr> bastilian: consider it an implementation detail. it only returns an IO object
<gnufied> yes, if you can work with IO interface. actual type should not matter
postmodern has quit [Quit: Leaving]
beiter has quit [Quit: beiter]
<bastilian> gnufied, judofyr: it is just weird. cause i would expect it to behave always the same. requesting a file with extention, be it a .txt or .jpg should always return a File or a StringIO object not dependent on the file type... anyways... :)
yats_ has quit [Read error: Connection reset by peer]
<judofyr> bastilian: it's probably dependent on the content size
<bastilian> or content size.
yats_ has joined #ruby-lang
<judofyr> bastilian: it makes perfectly sense. no point of creating files for small data; no point of using plenty of memory for big data.
<bastilian> hm... if you look at it that way. true.
piyush has quit [Ping timeout: 246 seconds]
<rue|w> judofyr: Except StringIO is *not* an IO
piyush has joined #ruby-lang
<rue|w> That’s an implementation detail, too, except in some cases
<judofyr> rue|w: well, IO was in duck-typed-IO, not IO-superclass
<judofyr> s/was in/as in/
<rue|w> Not exactly that either
CrazyHorse18 has quit [Quit: Leaving.]
<Mon_Ouie> The main issue with duck-typed IOs is there are some methods that really need an actual IO object to work (e.g. IO.select) — although that may not be much of a problem in the case of open-uri
mwjcomputing has joined #ruby-lang
kain has quit [Ping timeout: 248 seconds]
piyush has quit [Ping timeout: 264 seconds]
arkiver has quit [Ping timeout: 264 seconds]
<bastilian> thanks. it now makes more sense to me. :) why it returns StringIO
yalue has joined #ruby-lang
facest has joined #ruby-lang
<judofyr> Mon_Ouie: IO.select calls #to_io on the object though
faces has quit [Ping timeout: 260 seconds]
d3vic3 has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
cored has quit [Client Quit]
d3vic3 has quit [Client Quit]
d3vic3 has joined #ruby-lang
d3vic3 has quit [Client Quit]
m3nd3s has joined #ruby-lang
tooky_ has quit [Remote host closed the connection]
piyush has joined #ruby-lang
tooky has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
yats_ has quit [Ping timeout: 246 seconds]
tooky has quit [Ping timeout: 264 seconds]
kain has joined #ruby-lang
adambeynon has quit [Quit: Computer has gone to sleep.]
hramrach has joined #ruby-lang
<hramrach> hello
<hramrach> I have an issue running a script with ruby 1.9
<matti> Hi hramrach
<matti> hramrach: What is the problem? Use something to paste errors to.
<hramrach> it complains about script containing invalid US-ASCII when it has UTF-8 and I have UTF-8 locale
<hramrach> hmm, I guess I just update teh interpreter line to specify ruby verion
<hramrach> *version
beiter has joined #ruby-lang
xyzodiac has joined #ruby-lang
kain has quit [Ping timeout: 265 seconds]
<hramrach> hmmm, 1.9 fails anyway because the input has invalid encoding
<hramrach> better stick to 1.8 I guess
sirfilip_ has joined #ruby-lang
sirfilip_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sirfilip has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<lianj> hramrach: the code itself or some strng in it?
<hramrach> the code has valid utf-8 but input data not
tooky has joined #ruby-lang
<lianj> maybe paste an example
<judofyr> hramrach: add this on top: # coding: utf-8
<lianj> sticking with 1.8 is almost never a better choice
<lianj> judofyr: isnt it 'encoding'
<judofyr> lianj: both works
<lianj> ha, nice
<lianj> two bytes less, mother earth will thank me
<hramrach> it's # -*- coding: utf-8 -*-
<hramrach> too
<judofyr> that should work, yeah
<judofyr> hramrach: example of the input? what are you doing with it? backtrace?
<hramrach> the input is some dump of windows utility output
<hramrach> it's probably in cp852
<judofyr> how are you reading it?
<hramrach> readlines()
<lianj> File.open('foo','rb') ?
<judofyr> hramrach: try: File.open("foo") { |f| f.binmode; f.readlines … }
<lianj> 'rb' does the same, no?
<judofyr> lianj: yeah
<hramrach> can't you set the encoding?
xyzodiac has quit [Quit: Computer has gone to sleep.]
<lianj> 'r:UTF-8' or whatever
<lianj> or "".encode or .force_encoding
<judofyr> that is: File.open("foo", "r:CP852")
<hramrach> content = File.readlines(file,{:encoding => "cp852:utf-8"} )
mistym has quit [Remote host closed the connection]
<hramrach> would fail when on windows with different locale but not really a problem
<hramrach> and one less extension, no more iconv
<hramrach> and identical output
lcdhoffman has joined #ruby-lang
<hramrach> thanks for help
drbrain has quit [Ping timeout: 250 seconds]
tooky has quit [Ping timeout: 264 seconds]
drbrain has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
kain has joined #ruby-lang
jperry2_ has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
tooky has joined #ruby-lang
piyush has quit [Ping timeout: 264 seconds]
icooba has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
wyhaines has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
kain has quit [Ping timeout: 256 seconds]
BMF has quit [Remote host closed the connection]
tooky has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mytrile has quit [Remote host closed the connection]
tooky has joined #ruby-lang
melter_ is now known as melter
sent-hil_ has quit [Remote host closed the connection]
d3vic3 has joined #ruby-lang
havenn has joined #ruby-lang
d3vic3 has quit [Client Quit]
<jperry2> anyone know the best place to declare a Struct.new in another class? Is it best to put it in the initialize method or outside in the class definition?
<jperry2> They both seem to work but wanted to know where it's best defined
carloslopes has joined #ruby-lang
ioga_wrk has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
piyush has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
sailias has joined #ruby-lang
nariyal has joined #ruby-lang
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Client Quit]
thisirs has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
thisirs has joined #ruby-lang
kain has joined #ruby-lang
lcdhoffman has joined #ruby-lang
jtoy has joined #ruby-lang
<cout> jperry2: if you put it in the initialize method, then you're creating a new class every time you create a new object
<jperry2> okay, I'll keep that in mind as I don't think we'll be creating many instances of this class
kain has quit [Ping timeout: 244 seconds]
<jperry2> either way it sounds like it's best to keep it in the class definition right?
jtoy has quit [Quit: jtoy]
<cout> jperry2: yes
<jperry2> okay cool
<jperry2> t
<jperry2> hx
<jperry2> thx
<crankharder> is there some method that gets invoked on Klass when class Klass < SupaClass; end is defined because it inherits from SupaClass?
<crankharder> some parallel to included(klass) but for inheritance
<cout> crankharder: inherited
fbernier_ has left #ruby-lang [#ruby-lang]
retro|cz has joined #ruby-lang
<judofyr> kalleth: in that case, SupaClass.inherited(Klass) get's called
<judofyr> gets*
fbernier has joined #ruby-lang
<crankharder> thanks guys
justinmcp has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
bawdo has joined #ruby-lang
nariyal has quit [Quit: Computer has gone to sleep.]
bawdo has quit [Client Quit]
bawdo has joined #ruby-lang
outoftime has joined #ruby-lang
agile has quit [Quit: Ex-Chat]
agile has joined #ruby-lang
sush24 has joined #ruby-lang
kain has joined #ruby-lang
snorkdude has joined #ruby-lang
kain has quit [Ping timeout: 246 seconds]
bawdo has quit [Quit: Bye]
bawdo has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
gsav has joined #ruby-lang
adambeynon has joined #ruby-lang
gsav_ has joined #ruby-lang
yats_ has joined #ruby-lang
_7894 has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
nariyal has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
gearaholic has joined #ruby-lang
havenn has quit [Remote host closed the connection]
xyzodiac has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 265 seconds]
yats_ has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
Defusal_ has quit [Quit: reboot]
havenn has joined #ruby-lang
Bosox20051 has quit [Quit: Leaving]
zwevans has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
coryf has joined #ruby-lang
sailias has quit [Quit: Leaving.]
xyzodiac has quit [Quit: Computer has gone to sleep.]
kain has quit [Ping timeout: 264 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
xyzodiac has joined #ruby-lang
lcdhoffman has joined #ruby-lang
t0h has joined #ruby-lang
nariyal has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
wycats has quit [Remote host closed the connection]
agib has quit [Remote host closed the connection]
grandy__ has quit [Remote host closed the connection]
mroth has quit [Remote host closed the connection]
L0rdShrek__ has quit [Remote host closed the connection]
amdprophet has quit [Remote host closed the connection]
mccraig has quit [Write error: Connection reset by peer]
dkannan has quit [Read error: Connection reset by peer]
franckverrot has quit [Remote host closed the connection]
akahn has quit [Remote host closed the connection]
cldwalker_ has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
rikkus has quit [Read error: Connection reset by peer]
beiter has quit [Quit: beiter]
nariyal has joined #ruby-lang
cldwalker_ has joined #ruby-lang
Axsuul has quit [Ping timeout: 264 seconds]
m3nd3s has quit [Remote host closed the connection]
mroth has joined #ruby-lang
mroth has quit [Changing host]
mroth has joined #ruby-lang
mroth has joined #ruby-lang
grandy__ has joined #ruby-lang
yats_ has joined #ruby-lang
gearaholic has quit [Remote host closed the connection]
sailias has joined #ruby-lang
catmtking has joined #ruby-lang
wycats has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
akahn has joined #ruby-lang
|Vargas| has quit [Quit: ...]
grandy__ has quit [Remote host closed the connection]
wycats has quit [Remote host closed the connection]
mroth has quit [Remote host closed the connection]
akahn has quit [Write error: Broken pipe]
cldwalker_ has quit [Remote host closed the connection]
nariyal has quit [Quit: Computer has gone to sleep.]
sent-hil has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
anildigital_work has joined #ruby-lang
kain has joined #ruby-lang
L0rdShrek__ has joined #ruby-lang
agib has joined #ruby-lang
rikkus has joined #ruby-lang
rikkus has quit [Changing host]
rikkus has joined #ruby-lang
imajes has quit [Excess Flood]
wycats has joined #ruby-lang
mccraig has joined #ruby-lang
imajes has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
Defusal has joined #ruby-lang
Defusal has quit [Changing host]
Defusal has joined #ruby-lang
kain has quit [Ping timeout: 244 seconds]
xyzodiac has joined #ruby-lang
undersc0re97 has joined #ruby-lang
undersc0re97 has joined #ruby-lang
undersc0re97 has quit [Changing host]
ttilley has quit [Ping timeout: 245 seconds]
undersc0re97 has quit [Client Quit]
rue|w has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
akahn has joined #ruby-lang
grandy__ has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
cldwalker_ has joined #ruby-lang
rue|w has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
d3vic3 has joined #ruby-lang
wycats has quit [Remote host closed the connection]
rikkus has quit [Remote host closed the connection]
grandy__ has quit [Remote host closed the connection]
cldwalker_ has quit [Remote host closed the connection]
akahn has quit [Remote host closed the connection]
L0rdShrek__ has quit [Remote host closed the connection]
agib has quit [Remote host closed the connection]
mccraig has quit [Write error: Broken pipe]
anildigital_work has quit [Remote host closed the connection]
mixtli_ has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
m3nd3s has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
judofyr has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
gnufied has quit [Quit: Leaving.]
Nichotin has joined #ruby-lang
Raduwen has joined #ruby-lang
franckverrot has joined #ruby-lang
Assurbanipal_ has joined #ruby-lang
undersc0re97 has joined #ruby-lang
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby-lang
Assurbanipal has quit [Ping timeout: 264 seconds]
kain has joined #ruby-lang
gnufied has joined #ruby-lang
gnufied1 has joined #ruby-lang
scampbell has joined #ruby-lang
kvs has quit [Quit: ZNC - http://znc.in]
lcdhoffman has joined #ruby-lang
kristofferrr has joined #ruby-lang
_malte has joined #ruby-lang
gnufied has quit [Ping timeout: 256 seconds]
grandy__ has joined #ruby-lang
nariyal has joined #ruby-lang
mcooper has joined #ruby-lang
anildigital_work has joined #ruby-lang
L0rdShrek__ has joined #ruby-lang
lcdhoffman has quit [Client Quit]
ryanlecompte has joined #ruby-lang
mixtli_ has quit [Quit: mixtli_]
sirfilip has quit [Remote host closed the connection]
kain has quit [Ping timeout: 256 seconds]
Defusal has quit [Quit: Quit message goes here]
JohnBat26 has quit [Ping timeout: 256 seconds]
cldwalker_ has joined #ruby-lang
krohrbaugh has joined #ruby-lang
wycats has joined #ruby-lang
rikkus has joined #ruby-lang
rikkus has quit [Changing host]
rikkus has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
bawdo has quit [Quit: Bye]
dkannan has joined #ruby-lang
nariyal has quit [Quit: Computer has gone to sleep.]
piyush has quit [Ping timeout: 264 seconds]
carloslopes has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
jtoy has joined #ruby-lang
zmack_ has quit [Remote host closed the connection]
kain has joined #ruby-lang
mccraig has joined #ruby-lang
robie137_ has joined #ruby-lang
robie1373 has quit [Read error: Connection reset by peer]
<mistym> Huh, why doesn't DateTime have a nanosecond method?
<mistym> DateTime.now.nsec #=> NoMethodError; DateTime.to_time.nsec #=> 554312000; DateTime.strftime "%9N" #=> '554312000'
matti has quit [Changing host]
matti has joined #ruby-lang
codewrangler has joined #ruby-lang
Assurbanipal_ has quit [Quit: Konversation terminated!]
kain has quit [Ping timeout: 240 seconds]
goshakkk has joined #ruby-lang
akahn has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
tenaciousflea has joined #ruby-lang
agib has joined #ruby-lang
ryanlecompte has joined #ruby-lang
kvs has joined #ruby-lang
<Nichotin> Let's say I have a ruby script that detects urls in a IRC channels, checks if they are html, sends them to selenium to take a screenshot, resizes it to a thumbnail and creates an entry in a database for it.
<Nichotin> Is there a known and good pattern if I say, wanted to make a module system for special handling of certain URLs? E.g. so that urls from youtube get their thumb from youtube.com instead.
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Nichotin> this is the code. the youtube stuff is implemented, but in a really inflexible way... this was my first useable snippet of ruby code, and I want to redo it properly.
<Nichotin> for reference, the results are displayed in a gallery that looks like this: http://dump.doomtech.net/vif.png
<Nichotin> clicking context gives the five chat lines above and below the url
__butch__ has joined #ruby-lang
dc5ala has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby-lang
rwilcox has joined #ruby-lang
piyush has joined #ruby-lang
coryf has quit [Remote host closed the connection]
ryanlecompte has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby-lang
mixtli has joined #ruby-lang
mztriz has joined #ruby-lang
deryl has quit [Quit: Leaving.]
<mztriz> Can someone take a look at my script? http://pastie.org/private/xoi0dprsirsdkjrt5lhsg I'm trying to recursively look through directories
kain has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
sush24 has joined #ruby-lang
GarethAdams has quit [Ping timeout: 256 seconds]
tenaciousflea has quit [Quit: tenaciousflea]
dmwuw has joined #ruby-lang
goshakkk has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
macmartine has joined #ruby-lang
piyo has joined #ruby-lang
deryl has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
kain has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby-lang
ricardovaleriano has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
adambeynon has joined #ruby-lang
chrismcg is now known as zz_chrismcg
alexkane has quit [Quit: alexkane]
sgonyea has quit [Quit: sgonyea]
tooky has quit [Remote host closed the connection]
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
headius has joined #ruby-lang
pri has quit [Ping timeout: 265 seconds]
xsdg has quit [Ping timeout: 268 seconds]
alexkane has joined #ruby-lang
thisirs has quit [Remote host closed the connection]
tooky has joined #ruby-lang
TylerGillies has quit [Changing host]
TylerGillies has joined #ruby-lang
<TylerGillies> this is odd, returns an array of procs, not an array of 5s https://gist.github.com/3789354
brianpWins has joined #ruby-lang
Madis has joined #ruby-lang
piyush has quit [Ping timeout: 252 seconds]
mwjcomputing has quit [Quit: Leaving]
zmack has joined #ruby-lang
tooky has quit [Ping timeout: 264 seconds]
gregmore_ has joined #ruby-lang
xsdg has joined #ruby-lang
tooky has joined #ruby-lang
gregmoreno has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
kain has joined #ruby-lang
sepp2k1 has joined #ruby-lang
<Mon_Ouie> It's not odd, ->(x) { … } is a proc (a lambda, specifically)
sepp2k has quit [Ping timeout: 264 seconds]
<Mon_Ouie> Oh, I disregarded the second line. At first look, I think it's related to the fact the lambda was never called
<Mon_Ouie> Therefore, foo was never assigned any value
kristofferrr has quit [Quit: ❤]
<Mon_Ouie> I actually get an error on the second #map when I try it — which makes more sense than nil or what you said
MrOnFireMr has joined #ruby-lang
<TylerGillies> Mon_Ouie: ah i think i had foo in memory already in irb
<TylerGillies> i get nil also ok makes sense now
cdt has quit [Quit: Ex-Chat]
lwoodson has joined #ruby-lang
mixtli has quit [Quit: mixtli]
yats__ has joined #ruby-lang
yats_ has quit [Ping timeout: 240 seconds]
lwoodson has left #ruby-lang [#ruby-lang]
tooky has quit [Remote host closed the connection]
kain has quit [Ping timeout: 256 seconds]
sush24 has quit [Ping timeout: 256 seconds]
gnufied1 has quit [Quit: Leaving.]
solars has joined #ruby-lang
xuser has joined #ruby-lang
sush24 has joined #ruby-lang
nariyal has joined #ruby-lang
itcharlie has joined #ruby-lang
tooky has joined #ruby-lang
itcharlie has left #ruby-lang [#ruby-lang]
sgonyea has joined #ruby-lang
mixtli has joined #ruby-lang
benanne has joined #ruby-lang
itcharlie has joined #ruby-lang
<ddfreyne> dbussink: never mind the fact that the Rubinius code is the original Ruby code… it still looks way better :)
<ddfreyne> (I was looking for an algorithm to guide me in my Smalltalk implementation)
<ddfreyne> The MRI code was not understandable… Rubinius’ was
zmack has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
kain has joined #ruby-lang
Keva161 has joined #ruby-lang
<yorickpeterse> Design question: if I have a file that contains various constants which in turn contain details about classes such as String, Time, etc (in this case the methods provided by these classes). What would be a good name for this file and the corresponding module in it?
<yorickpeterse> I was thinking of "symbols.rb" and "Symbols" but meh
Keva161 has quit [Client Quit]
<TTilus> bbom?
<dbussink> ddfreyne: imho that ruby code can be a lot better though
<dbussink> ddfreyne: but in rubinius we basically have a copy of most of the stdlib stuff, just like jruby
<ddfreyne> dbussink: yeah, I don’t like the -1 loop for instance
<TTilus> "various constants ... details about classes" is pretty vague description
<ddfreyne> dbussink: but yeah, why reimplement something if it already has been proven to work :)
<dbussink> ddfreyne: it's not the stuff we want to focus on :)
yats__ has quit [Read error: Operation timed out]
<ddfreyne> dbussink: Rubinius is GIL-free now, right?
vlad_starkov has joined #ruby-lang
<ddfreyne> (I remember it being in a separate branch last time I checked)
<dbussink> ddfreyne: current master is yeah
<dbussink> which will be on the 2.0 release
<ddfreyne> awesome
<ddfreyne> my app is embarrassingly parallel so this will come in handy :)
_malte has quit [Remote host closed the connection]
jperry2_ has quit [Quit: jperry2_]
jperry2_ has joined #ruby-lang
<dbussink> ddfreyne: cool, let us know how it goes :)
nariyal has quit [Quit: Computer has gone to sleep.]
nariyal has joined #ruby-lang
<ddfreyne> dbussink: I will. Don’t hold your breath for it to be finished though :)
itcharlie has left #ruby-lang [#ruby-lang]
kain has quit [Ping timeout: 245 seconds]
imajes has quit [Excess Flood]
enebo has joined #ruby-lang
imajes has joined #ruby-lang
tooky has quit [Remote host closed the connection]
adambeynon has quit [Quit: Computer has gone to sleep.]
coryf has joined #ruby-lang
tooky has joined #ruby-lang
crudson1 has joined #ruby-lang
gmci has quit [Ping timeout: 240 seconds]
icooba_ has joined #ruby-lang
sush24 has quit [Ping timeout: 240 seconds]
icooba has quit [Ping timeout: 256 seconds]
icooba_ is now known as icooba
adambeynon has joined #ruby-lang
gmci has joined #ruby-lang
tenderlove has joined #ruby-lang
nariyal has quit [Ping timeout: 265 seconds]
tooky has quit [Remote host closed the connection]
adambeynon has quit [Quit: Computer has gone to sleep.]
mztriz has quit [Quit: Page closed]
_malte has joined #ruby-lang
ddv has quit [Changing host]
ddv has joined #ruby-lang
rippa has joined #ruby-lang
hppj has joined #ruby-lang
kain has joined #ruby-lang
<headius> ddfreyne: what code were you talking about? I'm just curious
areil has quit [Remote host closed the connection]
<yorickpeterse> whitequark: ping
<ddfreyne> headius: random bit of Date source code (for #<<)
<headius> ahh yes, that code
<headius> we still use the Ruby version too
Tearan has joined #ruby-lang
_malte has quit [Remote host closed the connection]
<hppj> when i call ``RubyVM::InstructionSequence.disassemble``, what do the numbers in the first column of output represent?
Tearan has quit [Client Quit]
<ddfreyne> tenderlove: your cat is awesome
<tenderlove> ddfreyne: hahaha, thanks
<Mon_Ouie> hppj: I think it's the location of the instruction in the bytecode
<Mon_Ouie> (in bytes)
<hppj> Mon_Ouie: ok, so when deciding between 2 implementations is it better to pick fewer named opcodes? or fewer bytes in the first column?
<Mon_Ouie> Less bytecode doesn't always mean faster. Actually try to run a benchmark to see which version is faster.
<hppj> k, sounds good. thanks
<ddfreyne> tenderlove: my cat can use door handles (lever-style) to open doors though
<erikh> my cat's breath smells like cat food
rue|w has quit [Remote host closed the connection]
<ddfreyne> erikh++
kain has quit [Ping timeout: 264 seconds]
<tenderlove> ddfreyne: whoa, that's awesome
dc5ala has joined #ruby-lang
alexkane has quit [Ping timeout: 246 seconds]
sepp2k1 has quit [Remote host closed the connection]
_malte has joined #ruby-lang
havenn has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tooky has joined #ruby-lang
benanne has quit [Quit: kbai]
adambeynon has joined #ruby-lang
kain has joined #ruby-lang
_malte has quit [Remote host closed the connection]
Tearan has joined #ruby-lang
kain has quit [Quit: exit]
kain has joined #ruby-lang
tooky has quit [Ping timeout: 264 seconds]
mantono has quit [Quit: Don't panic]
tentimes has joined #ruby-lang
MrOnFireMr has quit [Remote host closed the connection]
alexkane has joined #ruby-lang
grandy__ has left #ruby-lang [#ruby-lang]
grandy has joined #ruby-lang
<grandy> hello, having a bit of confusion with mocha, trying to use mocks without it automatically adding an expectation
<grandy> anyone know how to set it up so that the expectations have to be added manually?
<grandy> if I write mock(:foo => true) it automatically expects that foo will be called, and prints that out in my test results, which is extra visual clutter
<reactormonk> grandy: try stub(:foo => true)
<andrewvos> erikh: The doctor said I wouldn't have so many nose bleeds if I kept my finger outta there
jperry2_ has quit [Quit: jperry2_]
vlad_starkov has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
catmtking has quit [Read error: Connection reset by peer]
guns has joined #ruby-lang
catmtking has joined #ruby-lang
<grandy> reactormonk: when i do that it still prints output about expectatiions
<grandy> maybe the issue is that it's setting them up each time in the before method and when the tests run not all tests use all mocks
vlad_starkov has joined #ruby-lang
<reactormonk> grandy: there should be one that expects and one that does not
<grandy> reactormonk: ahh i see
alexkira has quit [Remote host closed the connection]
<grandy> reactormonk: u were right, changing it to stub() works
<grandy> reactormonk: awesome
catmtking_ has joined #ruby-lang
catmtking_ has quit [Read error: Connection reset by peer]
catmtking has quit [Read error: Connection reset by peer]
alexkira has joined #ruby-lang
catmtking has joined #ruby-lang
<andrewvos> Has anyone had any love/pain with this? http://rjb.rubyforge.org/
vlad_starkov has quit [Remote host closed the connection]
<erikh> andrewvos: unpossible
alexkira has quit [Ping timeout: 265 seconds]
<andrewvos> My cat's name is Mittens.
benanne has joined #ruby-lang
MrOnFireMr has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
<yorickpeterse> My cat is called Mouse
vlad_starkov has joined #ruby-lang
sgonyea has quit [Remote host closed the connection]
sgonyea has joined #ruby-lang
rue|w has joined #ruby-lang
<steveklabnik> andrewvos: why not just use jruby?
<yorickpeterse> too mainstream
twittard has joined #ruby-lang
<steveklabnik> :)
<headius> andrewvos: I've fiddled with rjb from time to time
<yorickpeterse> awww yiss, my linter is now capable of detecting undefined variables and the likes. Still a *lot* of work to be done though
alexkira has joined #ruby-lang
sgonyea has quit [Ping timeout: 264 seconds]
twittard is now known as sgonyea
rue|w has quit [Ping timeout: 252 seconds]
<steveklabnik> headius: do you have a moment for a jruby question? I _think_ it might be a 1.8 stdlib bug, but i'm not sure.
<steveklabnik> rbx 1.8 mode works, but 1.8.7 and jruby 1.8 dont
yxhvuud has quit [Ping timeout: 245 seconds]
<steveklabnik> i guess anyone might know, actually
<steveklabnik> this code runs on 1.9
<steveklabnik> on 1.8, gives 'NameError: undefined method `pop' for class `NilClass'
Tearan has quit [Ping timeout: 265 seconds]
<steveklabnik> i'm not sure why opening up a metaclass makes it nil?
<headius> steveklabnik: sure
<headius> looking
tooky has joined #ruby-lang
<steveklabnik> travis failure is here if it hleps: http://travis-ci.org/#!/defunkt/resque/jobs/2574446
<headius> I would guess that method isn't available in 1.8
<steveklabnik> docs say it is
<headius> but that seems strange
<headius> looking at our impl now
<steveklabnik> <3
mantono has joined #ruby-lang
<rue> Oh, wow, kill that code with fire.
<headius> yep, definitely there
<headius> yeah, that's awful code anyway
<headius> singleton and aliasing blows method caches all over the place
<steveklabnik> alternate implementations welcome :)
<steveklabnik> i did not write it
alex_k has joined #ruby-lang
<headius> steveklabnik: I'm not sure what @que is there
<steveklabnik> it's the internal bits for the queue class
<steveklabnik> the thing it wraps
<rue> ^
alex_k has quit [Client Quit]
<headius> we don't have that
<steveklabnik> like pop says def pop(*args)
<steveklabnik> retval = super
<steveklabnik> @mutex.synchronize {
<steveklabnik> if @que.length < @max
<headius> so this would basically be trying to singletonize nil
<steveklabnik> begin
<steveklabnik> ahhhhh
<steveklabnik> that makes 100% sense
<steveklabnik> at least on jruby
<headius> our queues are implemented natively, like MRI folks want to do
<steveklabnik> the 1.8.7 docs say it's there for it too
<steveklabnik> but apparently it isnt
<headius> I'll have a look
<ryanlecompte> steveklabnik: I would just wrap a SizedQueue instance in a DelegateClass(SizedQueue) or SimpleDelegator and then provide a provide the new #shift method on that new class.
tooky has quit [Ping timeout: 264 seconds]
<steveklabnik> ryanlecompte: seems legit
<headius> ahh
adambeynon has quit [Quit: Computer has gone to sleep.]
<headius> in MRI, @que is an array, and Array#pop (or Enumerable#pop) wasn't in 1.8, perhaps?
<rue> Array#pop definitely
<headius> that doesn't sound right
<steveklabnik> quite possible
<steveklabnik> i mean
<headius> yeah
<steveklabnik> the error is the same
<steveklabnik> that it's nil
<headius> oh
<headius> hmm
<rue> It sounds like autovivification bug
mistym has quit [Remote host closed the connection]
<steveklabnik> 1.8.7 faiure here
<steveklabnik> anyway, like you say, not optimal code anyway
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<headius> yeah
<steveklabnik> good thing the stdlib has like 5 ways to delegate! :D
<steveklabnik> heh
<rue> steveklabnik: I, of course, got pulled into a highly time-sensitive project after making all these OSS plans this week…
<steveklabnik> :)
<steveklabnik> ith appens
<headius> steveklabnik: does that clear things up?
<drbrain> steveklabnik: you could also consider that ruby 1.8.7 is dying
<steveklabnik> yes
<steveklabnik> it does
<steveklabnik> thank you
<steveklabnik> drbrain: listen, i dont want to support 1.8.
<steveklabnik> not my call
<steveklabnik> anyway, it was broken in jruby
tenderlove has joined #ruby-lang
<rue> There’s no accessor either, is there?
<headius> ah-ha
<ryanlecompte> steveklabnik: like this: https://gist.github.com/3790424
jperry2_ has joined #ruby-lang
<steveklabnik> exactly what i was typing
<steveklabnik> <3
<ryanlecompte> hahaha
<ryanlecompte> sweet
<ryanlecompte> by the way, please star my project guys
<ryanlecompte> i want my 300 stars
<ryanlecompte> i'm almost there!!!!
<ryanlecompte> my mommy will be so proud
<headius> drbrain: thread.rb in my 1.8.7 source seems to still have the ruby version
<headius> but I also see the ext/thread/thread.c version
setmeaway has joined #ruby-lang
rippa has quit [Ping timeout: 248 seconds]
<drbrain> headius: probably because ext/thread/lib/thread.rb overrides it
RegEchse has joined #ruby-lang
<drbrain> yup, if thread.c does not compile you'll get the plain version
<drbrain> … pure ruby version
havenn has quit [Remote host closed the connection]
<headius> I see
<headius> ok
<headius> so if the ext builds ok, it copies that thread.rb over the lib version
<headius> and that one loads the native stuff
snorkdude has joined #ruby-lang
<ryanlecompte> steveklabnik: i know this has probably been asked a ton, but why doesn't defunkt want to work on resque any more?
<drbrain> headius: yup
<drbrain> .ext/ gets installed atop lib/
jtoy has quit [Quit: jtoy]
<headius> ok
<headius> well, that mystery is solve then
Axsuul has joined #ruby-lang
benanne has quit [Ping timeout: 272 seconds]
<drbrain> ruby 1.9 removed the thread extension
<headius> why's that?
<headius> I saw there's a bug asking to bring the native Queue etc back
fish_ has quit [Read error: Operation timed out]
<drbrain> I'm not sure, but I imagine Real Threads resolved the issues that green threads had
<steveklabnik> ryanlecompte: github abandons everything they release
<steveklabnik> dont ask me
<steveklabnik> i got nothing
<steveklabnik> something something $100MM something
<ryanlecompte> jeez
<rue> FakeFS too, kinda. I don’t even have gemmy rights on it, so I can fix and apply, but not actually do anything beyond that :P
<rue> Should probably fork altogether
<zenspider> which one is fakefs? is that francis'?
<headius> drbrain: ahh, well if the ext was intended to work around green threading issues, I'd understand removing it
<drbrain> I bet it would need to be completely rewritten from scratch
<headius> it probably would, using GIL-aware locking mechanisms
<rue> zenspider: defunkt’s
Mchl has quit [Ping timeout: 264 seconds]
fish_ has joined #ruby-lang
<headius> isn't that the point of open-sourcing your stuff? kick the bird out of the nest and see if it can fly on its own? :)
<steveklabnik> yeah, but, when, for example, you dont give the new birds admin rights
<steveklabnik> it casues problems
<headius> clip the bird's wings and then kick it out, eh?
snorkdude has quit [Remote host closed the connection]
jperry2_ has quit [Quit: jperry2_]
<steveklabnik> :)
diegoviola has joined #ruby-lang
<erikh> it's probably something more basic than that, e.g., they want to depend on stable tools and don't have time to deal with bugs that don't affect them personally.
<steveklabnik> github runs custom resque patches in production
<steveklabnik> that they didnt commit back to mainline
<erikh> that's not surprising at all
benanne has joined #ruby-lang
<erikh> and it adds extra credence to my theory -- now they have a DJB-ware problem
<erikh> ... which if you've ever run qmail you'll know what I'm talking about
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
<erikh> before DJB really gave up the source code, groups of people would maintain (and yes, I mean "maintain") gargantuan patchsets that fixed a ton of bugs and added additional features.
<erikh> all of it ran against a baseline version of qmail, and the patches themselves were incompatible
<erikh> err, with each other
<zenspider> oh god... not qmail. never again
<erikh> yeah. I'm so glad postfix got wind in its sails
<erikh> so, in short, everytime they accepted patches for resque, they have potential for merge conflicts.
<tentimes> I'm so glad google apps does my mail ;)
<zenspider> TAKE THAT VIM USERS! http://nullprogram.com/blog/2012/09/14/
<zenspider> hah! I totally trumped drbrain and tenderlove now
<erikh> emacs can render images but still can't manage to highlight syntax properly
<erikh> good job
<mistym> emacs also includes a psychologist and a text adventure game
Mchl has joined #ruby-lang
<zenspider> erikh: wfm 99+% of the time just fine
<zenspider> and frankly... the only one it fucks up with at all is ruby itself... which is just shy of perl in how horrible the language is
<tentimes> Steve, I told you last night (ohforfs)... sidekik :P
<steveklabnik> tentimes: relatively speaking, nobody uses sidekiq
<steveklabnik> also, fuck the gpl
<steveklabnik> i am happy that others want to use it
Mchl has quit [Excess Flood]
crudson1 has quit [Quit: Leaving.]
<steveklabnik> but there are a LOT of resque users
<steveklabnik> they deserve to have their shit taken care of ;)
<tentimes> I know ;)
<tentimes> Luckily I am right at the start so I have yet to choose
<steveklabnik> we're also going to be adding sidekiq's concurrency strategy to resque
<steveklabnik> so it will have both
<tentimes> Will it shrink memory window?
<tentimes> That would be my main concern
<tentimes> Im running on small images
phlipper has joined #ruby-lang
Carnage\ has joined #ruby-lang
<steveklabnik> what exactly do you mean by 'shrink memory window'?
<steveklabnik> the answer is probably yes, but i want to know exactly what you mean ;)
tenderlove has quit [Read error: Connection reset by peer]
<tentimes> Sidekik boasts of using a lot less memory than resque to do the same workload due to paralelism (spelt right)
<steveklabnik> yes
tenderlove has joined #ruby-lang
<tentimes> Well thats how I read it. I still might write my own in C though
<steveklabnik> the new resque would be reduced in the same way.
<tentimes> nice one
<steveklabnik> i'm not sure if we're gonna get that in for 2.0 or not
<steveklabnik> but the feature is planned
<ryanlecompte> steveklabnik: will you use celluloid like sidekiq or roll your own?
<steveklabnik> i am not working on those deatils
<steveklabnik> i'm doing mostly community management
<Spaceghostc2c> Has anyone written a forking job queue worker gem?
<tentimes> phew :)
<tentimes> err I mean
<Spaceghostc2c> steveklabnik: Blagposts galore?
<tentimes> sorry that came out wrong i didnt mean it like that
<tentimes> I mean i bet you are glad
<ryanlecompte> cool
<steveklabnik> Spaceghostc2c: you have resque and sidekiq
<steveklabnik> as the big ones
<tentimes> I would hate to have to rewrite it for concurrency
<steveklabnik> tentimes: not really. though i am good at it.
<Spaceghostc2c> They're forking? I thought they were long-lived, even if they fork.
<steveklabnik> (community stuff)
MrOnFireMr has quit [Remote host closed the connection]
<steveklabnik> oh you mean fork Per job
<steveklabnik> no idea
<Spaceghostc2c> Yeah.
<steveklabnik> why do that?
<Spaceghostc2c> No worries. Thanks for being a sir on hypermedia. I wanted to implement it here to save work on our side because we have a mobile app consuming our api. I fought for it and got denied.
<Spaceghostc2c> Then I get asked, "Why aren't we doing this?" later by the same group.
<steveklabnik> any time <3
<Spaceghostc2c> steveklabnik: You basically are the reason I get to facepalm at people.
<steveklabnik> hahahah
<steveklabnik> can i tweet that?
<Spaceghostc2c> steveklabnik: All the stupid things I say are public domain.
<Spaceghostc2c> Which is actually pretty much everything I say ever.
<steveklabnik> You should look at your implementation of Object#==.
<steveklabnik> oh excellent
<steveklabnik> :p
<Spaceghostc2c> steveklabnik: Me? Where?
macmartine has joined #ruby-lang
<steveklabnik> no
<steveklabnik> that's a test failure i got
snorkdude has joined #ruby-lang
justinmcp has joined #ruby-lang
<rue> Good failure
<rue> “There’s a problem with your code somewhere”
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
<zzak> scumbag steve: doesn't like gpl, uses apple products
setmeaway2 has quit [Quit: Leaving]
<erikh> zenspider: yeah, I was just trollin'
alexkira has quit [Ping timeout: 264 seconds]
<erikh> resque forks for each job.
<erikh> it's very hard to scale for lots of small jobs.
<erikh> s/hard/expensive/
<erikh> and good luck converting a forked model to a threaded one, especially when you consider why resque forks in the first place.
<rue> Sexphensev
Carnage\ has quit []
<erikh> rue: different industry
<rue> No, just British
mixtli has quit [Quit: mixtli]
<erikh> where is apieros
carloslopes has quit [Quit: Leaving.]
<rue> Vacation
<andrewvos> I have a string like "(Meh=Bla Bla)", how can I replace "Bla Bla" in one line? (Bla Bla can be anything)
<andrewvos> Meh never changes.
justinmcp has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 246 seconds]
<erikh> string.split(/=/, 2) would be a good way to start
<erikh> at least, probably safer than a regex.
<andrewvos> Oh wait, I forgot about $1
<andrewvos> Gah
<andrewvos> (I've already regexed the initial string out a document)
<erikh> with #match?
vlad_starkov has quit [Remote host closed the connection]
anannie has joined #ruby-lang
<andrewvos> string.scan
alexkira has joined #ruby-lang
<erikh> mmm
<erikh> I don't think $1 is going to do what you want there.
<rue> sub is for replacing
thone has joined #ruby-lang
<andrewvos> Wait, passing a regex to gsub is something I remember?
<andrewvos> I think rue showed me that in my docu gem :)
<rue> Of course it is
toretore has quit [Quit: Leaving]
benanne has quit [Quit: kbai]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
tooky has joined #ruby-lang
<andrewvos> That is rather nice.
ricardovaleriano has quit [Remote host closed the connection]
<rue> andrewvos: You must learn the way of the regexp
xyzodiac has joined #ruby-lang
<andrewvos> rue: After all that I decided that regex isn't the way to go.
gsav_ has quit [Quit: Lost terminal]
<steveklabnik> lol
sailias has quit [Quit: Leaving.]
<rue> Son…
mixtli_ has joined #ruby-lang
catmtking_ has joined #ruby-lang
tooky has quit [Ping timeout: 264 seconds]
scampbell has quit [Quit: Ex-Chat]
catmtking has quit [Ping timeout: 240 seconds]
catmtking_ is now known as catmtking
Criztian has quit [Remote host closed the connection]
<andrewvos> Is it just me or is it hard to navigate yaml documents with the built in yaml stuff?
<andrewvos> (complex yaml documents)
ryanf has joined #ruby-lang
mcooper has quit [Quit: mcooper]
coryf has quit [Remote host closed the connection]
Mchl has joined #ruby-lang
<erikh> rue: I'm bored. let's have an argument!
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby-lang
reefraf has joined #ruby-lang
<andrewvos> Why am I not getting a hash back? I thought I was meant to get a hash?
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<andrewvos> OMAG, parse is not load TIL
<drbrain> Oh My Arthritic Grandfather?
<andrewvos> I'm not sure what it means, I stole it from rue.
mistym has quit [Remote host closed the connection]
<drbrain> then I'm probably not far from the mark
CarlB_the_great has quit [Remote host closed the connection]
thillux_ has joined #ruby-lang
thillux__ has joined #ruby-lang
Nisstyre is now known as Nisstyre_
Nisstyre_ is now known as Nisstyre
thillux has quit [Ping timeout: 244 seconds]
rwilcox has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
thillux_ has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
hppj has quit [Quit: WeeChat 0.3.8]
<andrewvos> I'm hoping it means "Actual", cause I find that funny.
snorkdude has quit [Remote host closed the connection]
solars has quit [Ping timeout: 240 seconds]
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
reefraf has quit [Remote host closed the connection]
<zenspider> man... I wish google didn't have a history and a culture oriented around buying stuff and killing it off
<zenspider> bumptop was a really interesting idea... now dead and useless
<zenspider> there've been many others
chimkan has joined #ruby-lang
chimkan has left #ruby-lang [#ruby-lang]
tenderlove has quit [Read error: Connection reset by peer]
Stereokitsune has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby-lang
<andrewvos> I wish Google could give me good search results. For example, when I was searching the other day for business cards the top sites are really shitty companies like http://www.vistaprint.co.uk/free-business-cards.aspx
<drbrain> andrewvos: moo cards
<andrewvos> I want a site that shows me results that humans think are better.
<andrewvos> drbrain: I've gone with Blush Publishing because I want debossing.
<andrewvos> drbrain: But yeah, Moo are quite cool.
<erikh> I have some moo cards; just got them yesterday!
<erikh> I like them.
tenderlove has quit [Remote host closed the connection]
<erikh> zenspider: I'm still using sparrow mail :(
<drbrain> andrewvos: those are nice
<andrewvos> See that's the sort of site I want Google to show me. If I'm going to pay someone to print something it better bloody well not be some shitty site made in 1999.
<andrewvos> drbrain: This is my design http://cl.ly/image/3P3e0T0J2o1t
<andrewvos> What ya think?
<drbrain> andrewvos: nice and simple
<andrewvos> Yeah, was trying for that
<erikh> APPROVE
tenderlove has joined #ruby-lang
<andrewvos> :)
masterkorp has quit [Ping timeout: 260 seconds]
<erikh> although you should really spice it up with a lolcat or something
<andrewvos> erikh: I was thinking some sort of cool thing on the back
<erikh> longcat rotated 90'
<andrewvos> Like an insignia
<andrewvos> haha
<andrewvos> It would have to be in B&W though
<erikh> longcat happens to be white
<andrewvos> I could have converted longcat to like a line-drawing or something
<andrewvos> DAMNIT
<andrewvos> Why did I go and order them already :(
<erikh> haha
Stereokitsune has joined #ruby-lang
kirin` has quit [Quit: leaving]
<andrewvos> I have made a terrible mistake.
masterkorp has joined #ruby-lang
outoftime has quit [Quit: Leaving]
justinmcp has joined #ruby-lang
tooky has joined #ruby-lang
<erikh> oh, oh wow
<erikh> yeah, that'd be perfect for a business card.
<andrewvos> I know!
<andrewvos> A couple of those along the length of the card
<andrewvos> Pointing this way and that
<erikh> or maybe pillars on the endcaps
<erikh> [longcat] andrewvos / phone # [longcat]
jamjam has quit [Ping timeout: 245 seconds]
<andrewvos> I like that they're on the front, cause it shows that you like to party, but that you're also here to do business
<erikh> well, you could always put them on the back, too, and just have in italics at the bottom: "party in the back"
<andrewvos> haha
<erikh> knowing mullet lore is something I seek out in an employer
<andrewvos> haha mullet lore
<andrewvos> amazing
<andrewvos> gotta sleep peace!
workmad3 has quit [Ping timeout: 246 seconds]
tooky has quit [Ping timeout: 264 seconds]
sent-hil has joined #ruby-lang
headius has quit [Quit: headius]
tentimes has quit [Quit: Copywight 2007 Elmer Fudd. All wights wesewved.]
m3nd3s has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
lantins has quit [Ping timeout: 248 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
catmtking has quit [Remote host closed the connection]
catmtking has joined #ruby-lang
m3nd3s has quit [Ping timeout: 256 seconds]
wardrop_ has joined #ruby-lang
wardrop has quit [Ping timeout: 265 seconds]
wardrop_ is now known as wardrop
xyzodiac has quit [Quit: Computer has gone to sleep.]
snorkdude has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
thillux__ has quit [Remote host closed the connection]
snorkdude has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
Madis has quit [Quit: ChatZilla 0.9.89 [Firefox 11.0/20120313180949]]
vlad_starkov has joined #ruby-lang
cantonic has quit [Quit: cantonic]
xyzodiac has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
snorkdude has joined #ruby-lang
piyo has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
<zenspider> erikh: I thought they announced that they open sourced it?
<erikh> did they?
<erikh> looks like they pulled a microsoft
<zenspider> hah
<erikh> what a bummer.
<steveklabnik> lol
justinmcp has joined #ruby-lang
jperry2_ has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
sgonyea has quit [Quit: sgonyea]
heftig has quit [Ping timeout: 240 seconds]
sent-hil has quit [Remote host closed the connection]
towski has joined #ruby-lang
catmtking_ has joined #ruby-lang