<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.]
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
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]
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.
<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.
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]
<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]
<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>
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>
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 ;)
<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]
<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.