apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
kek has quit [Ping timeout: 240 seconds]
headius has quit [Quit: headius]
captain_chen has quit [Ping timeout: 250 seconds]
KillerFox has quit [Ping timeout: 264 seconds]
lfox has joined #ruby-lang
thepumpkin has quit [Remote host closed the connection]
micalexander has quit [Remote host closed the connection]
mannyt has quit [Ping timeout: 245 seconds]
mannyt_ is now known as mannyt
micalexander has joined #ruby-lang
efrainolivares_ has quit [Quit: efrainolivares_]
zz_michael_mbp is now known as michael_mbp
micalexander has quit [Ping timeout: 272 seconds]
CoreData has quit [Ping timeout: 272 seconds]
michael_mbp is now known as zz_michael_mbp
CoreData has joined #ruby-lang
hogeo has joined #ruby-lang
Kabaka has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
MrPoT4tO has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
tomzx_mac has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
mistym has quit [Quit: Leaving]
Technodrome has joined #ruby-lang
zakame_ has joined #ruby-lang
charliesome has joined #ruby-lang
tkuchiki has joined #ruby-lang
captain_chen has joined #ruby-lang
kek has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
<captain_chen>
Does anyone happen to know how to implement tf-idf?
ecnalyr has joined #ruby-lang
tomzx_mac has quit [Quit: return 0;]
tomzx_mac has joined #ruby-lang
kek has quit [Ping timeout: 240 seconds]
ecnalyr has quit [Ping timeout: 245 seconds]
Y_Ichiro has joined #ruby-lang
Y_Ichiro has joined #ruby-lang
Y_Ichiro has quit [Changing host]
ledestin has quit [Ping timeout: 248 seconds]
ledestin has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
<captain_chen>
Okay nevermind, I'm an idiot.
shinnya has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
thepumpkin has joined #ruby-lang
ledestin has quit [Quit: ledestin]
tylersmith has joined #ruby-lang
spuk has quit [Ping timeout: 256 seconds]
micalexander has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
tylersmith has quit [Ping timeout: 240 seconds]
datanoise has quit [Ping timeout: 256 seconds]
toretore has quit [Quit: Leaving]
cnivolle has quit [Remote host closed the connection]
ebetancourt has joined #ruby-lang
flip_digits has quit []
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
mannyt has quit [Quit: mannyt]
dingus_khan has quit [Remote host closed the connection]
Johz has quit [Quit: Leaving]
dingus_khan has joined #ruby-lang
mannyt has joined #ruby-lang
dingus_khan has quit [Ping timeout: 272 seconds]
spuk has joined #ruby-lang
SteveBenner9 has quit [Quit: Leaving]
alekst has quit [Quit: Computer has gone to sleep.]
Domon__ has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
arooni-mobile__ has joined #ruby-lang
hotpancakes has joined #ruby-lang
Cakey has joined #ruby-lang
arooni-mobile has joined #ruby-lang
mannyt has quit [Quit: mannyt]
hotpancakes has quit [Ping timeout: 256 seconds]
zakame_ has quit [Ping timeout: 256 seconds]
cnivolle has joined #ruby-lang
rsl has quit [Ping timeout: 240 seconds]
Mr_Wharfsnort has joined #ruby-lang
hotpancakes has joined #ruby-lang
spuk has quit [Read error: Connection reset by peer]
kek has joined #ruby-lang
spuk has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
rsl has joined #ruby-lang
kek has quit [Ping timeout: 246 seconds]
GaelanAintAround is now known as Gaelan
Technodrome has joined #ruby-lang
io_syl has quit [Ping timeout: 240 seconds]
dorei has quit []
havenwood has joined #ruby-lang
datanoise has joined #ruby-lang
jroes has joined #ruby-lang
Kero has quit [Ping timeout: 245 seconds]
Kero has joined #ruby-lang
<jroes>
I've inherited some legacy data import code, and there's a memory leak here that just keeps filling memory like there's no tomorrow (12+gb before getting OOM killed). anyone have a good direction on approach? https://gist.github.com/jroes/cf2c5c7a20be094f106a
Coincidental has quit [Remote host closed the connection]
* jroes
is definitely thinking a refactor might at least help me wrap my brain around this crap
Coincidental has joined #ruby-lang
TheMoonMaster has quit [Excess Flood]
cnivolle has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 240 seconds]
TheMoonMaster has joined #ruby-lang
bzalasky has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
Coincidental has quit [Ping timeout: 272 seconds]
zakame has joined #ruby-lang
zakame has joined #ruby-lang
zakame has quit [Changing host]
<jroes>
whew, threw in a find_each on L7 and got lucky!
jroes has left #ruby-lang [#ruby-lang]
zenspider has joined #ruby-lang
kurko_ has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
mannyt has joined #ruby-lang
kurko_ has joined #ruby-lang
Xzyx987X has quit [Quit: Leaving]
diegoviola has joined #ruby-lang
io_syl has joined #ruby-lang
efrainolivares has joined #ruby-lang
dingus_khan has joined #ruby-lang
shinnya has quit [Ping timeout: 248 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
mannyt has quit [Quit: mannyt]
jaimef has quit [Excess Flood]
mannyt has joined #ruby-lang
Mr_Wharfsnort has quit [Quit: Leaving]
efrainolivares has quit [Quit: efrainolivares]
jaimef has joined #ruby-lang
Barrin6 has joined #ruby-lang
mistym has joined #ruby-lang
kek has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
kek has quit [Ping timeout: 246 seconds]
<Barrin6>
noo teamtreehouse is under maintenance!
datanoise has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
mrpot4to_ has joined #ruby-lang
dingus_khan has quit [Ping timeout: 241 seconds]
lsegal has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
jxie has joined #ruby-lang
mac__ has joined #ruby-lang
robbyoconnor has joined #ruby-lang
Senjai has joined #ruby-lang
banister has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
lun__ has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
Kabaka has quit [Ping timeout: 240 seconds]
datanoise has quit [Ping timeout: 246 seconds]
captain_chen has quit [Ping timeout: 250 seconds]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
kek has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
robbyoconnor has quit [Max SendQ exceeded]
m0no has joined #ruby-lang
hogeo has quit [Ping timeout: 265 seconds]
<m0no>
I have an array [['a', 1],['b',2] ..] and a Class MyClass that initializes with 2 arguemtns. Shouldn't I be able to myobjets = mypairs.each {|p| MyClass.new *p} and get an array of constructed objeccts?
enebo has joined #ruby-lang
Trez1 has quit [Quit: Page closed]
bastilian has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 256 seconds]
<wnd>
m0no, you must mean myobjects = mypairs.map{|o| MyClass.new *p}
<ljarvis>
maloik: sorry just seen that, yeah most of the dev team work remotely because the office is pretty busy, a couple of them visit the office once or twice a week
kireevco has quit [Read error: Connection reset by peer]
lacrosse has quit [Ping timeout: 240 seconds]
rtl has quit [Ping timeout: 240 seconds]
rtl has joined #ruby-lang
lele` has joined #ruby-lang
CaptainJet has joined #ruby-lang
shinnya has joined #ruby-lang
macmartine has quit [Remote host closed the connection]
cnivolle_ has joined #ruby-lang
benlovell has joined #ruby-lang
jonahR has quit [Quit: jonahR]
Mon_Ouie has quit [Ping timeout: 264 seconds]
sepp2k has quit [Quit: Konversation terminated!]
cnivolle has quit [Ping timeout: 246 seconds]
hahuang61 has joined #ruby-lang
happydude has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Squarepy has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
datanoise has quit [Ping timeout: 272 seconds]
CaptainJet has quit []
elia has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby-lang
micalexander has joined #ruby-lang
datanoise has joined #ruby-lang
<yorickpeterse>
lololol for companies blocking certain user agents
<yorickpeterse>
SOUNDS BULLET PROOF RIGHT?
enmand has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
jiuweigui has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
mikecmpbll has joined #ruby-lang
ljarvis has quit [Quit: Lost terminal]
lun__ has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
micalexa_ has joined #ruby-lang
micalexander has quit [Read error: Connection reset by peer]
kek has quit [Ping timeout: 240 seconds]
deception has joined #ruby-lang
warmwaffles has joined #ruby-lang
elia has joined #ruby-lang
efrainolivares has joined #ruby-lang
kek has joined #ruby-lang
<darix>
yorickpeterse: there are ways to make it bullet proof. https site that uses ciphers that will block certain browsers from connecting
<yorickpeterse>
this particular website, a certain booking.com, apparently blocks Googlebot from certain pages
<yorickpeterse>
which I think is pretty funny
<cschneid>
I have an object as an argument which is either a String or a Time/Date object. Time.zone.parse in rails blows up on other Time objects (T.z.parse(<time object>) throws an error). Is there a tryparse(), I'd like to avoid using exceptions as flow control here
<cschneid>
or explicitly attempting to check types
jithu has quit [Quit: Mother, did it need to be so high?]
<cschneid>
hmm, to_time seems to do it in rails land. I assume active support is off defining that. Any pure-ruby ways?
achru has joined #ruby-lang
<mikecmpbll>
if obj.is_a?(String) ?
<mikecmpbll>
time = Time.parse(time) if time.is_a?(String)
io_syl has joined #ruby-lang
<mikecmpbll>
something like that.
dr_bob has joined #ruby-lang
<cschneid>
ohh man, this Time.parse logic is angering me. It apparently does no work to attempt coercion.
<mikecmpbll>
what's the problem? ..
<cschneid>
mikecmpbll: just trying to make it flexible. For instance, a `class Foobar; to_s of "2013-10-28 12:27:27"`. Time.parse(Foobar.new)
mistym has quit [Quit: Leaving]
<cschneid>
mikecmpbll: basically I'm working on making a wide-open api for a TimeRange class in our app.
mistym has joined #ruby-lang
<cschneid>
we have that concept all over the place, sometimes as boring ranges, sometimes as just two args that go side-by-side.
<cschneid>
so I'm trying to formalize it a bit, and give it a really really flexible constructor.
<mikecmpbll>
write something that wraps Time.parse and does the type logic
<cschneid>
mikecmpbll: yeah, basically what I did. Just odd that it seems really hard to not have exceptions on parsing
<mikecmpbll>
:\ Time.parse is just a method that parses a string
<mikecmpbll>
it wouldn't make sense for it to accept a Time object.
<cschneid>
and return that same time object.
micalexa_ has quit [Ping timeout: 272 seconds]
a1ph4g33k has joined #ruby-lang
<mikecmpbll>
that same time object?
<mikecmpbll>
nah, a new time object, from the parsed string.
<mikecmpbll>
it's not unusual for new() to accept an object
<cschneid>
anyway, no biggie. I've already wrapped it. Just in my (long previous) life in java, it had stuff like tryparse() which tells you true/false
<cschneid>
but no biggie, it's well encapsulated
micalexander has joined #ruby-lang
<mikecmpbll>
you can do inline rescue if you like
<mikecmpbll>
Time.parse(time) rescue time
* mikecmpbll
shrugs
<cschneid>
mikecmpbll: sure. But that's just as bad. :) Using exceptions.
<mikecmpbll>
i'm sure all tryparse or whatever you speak of does the same thing.
<mikecmpbll>
to_time won't raise an exception will it?
nazty has joined #ruby-lang
Soraph has quit [Quit: Leaving]
<cschneid>
mikecmpbll: it will. It's an activesupport thing. But I figure we've gotta bake in Time.zone anyway.
dagobah has quit [Remote host closed the connection]
<mikecmpbll>
so you're just changing the exception message :\
<cschneid>
mikecmpbll: for the moment, yes :-/ indeed. Lets see what it normally says
x0f_ has quit [Ping timeout: 264 seconds]
<cschneid>
"foo".to_time => ArgumentError: invalid date
<cschneid>
I like to think i'm adding some useful info.
<lianj>
urgh, activesupport
hotpancakes has quit [Ping timeout: 272 seconds]
<cschneid>
lianj: yep, I feel ya.
<mikecmpbll>
i'm sure you can do whatever you're trying to do in Ruby easily, just not really got any clue what you're trying to do.
<cschneid>
lianj: but we've already taken that step, might as well use it.
jaimef has quit [Excess Flood]
lfox has joined #ruby-lang
<cschneid>
mikecmpbll: just to be super-flexible on what this class can take as an argument. 1) Range, 2) string,string 3) string, time 4) time, string
Technodrome has quit [Quit: Technodrome]
<mikecmpbll>
and return what?
<mikecmpbll>
two dates?
<cschneid>
yeah, two time objects.
<cschneid>
was just pushing myself not to use exceptions to do it, but that looks really hard based on Time.parse logic.
<cschneid>
(and also not checking types)
<mikecmpbll>
what's wrong with checking types?
Technodrome has joined #ruby-lang
<mikecmpbll>
that's how you solve a problem where you don't know what type you're receiving.. you check it
<mikecmpbll>
there's no other way
_if has joined #ruby-lang
sporkubus has quit [Quit: Page closed]
kireevco_ has quit [Ping timeout: 240 seconds]
jaimef has joined #ruby-lang
<freedrull>
i'd rather check types that use exceptions. but i'd rather use duck typing than check types.
<mikecmpbll>
but don't call the var end, obviously
* mikecmpbll
facepalms
kek has joined #ruby-lang
<cschneid>
hah. yeah. start & stop are way better names than begin/end_time
<cschneid>
mikecmpbll: that blows up with subclasses of those, and other string-likes. I suppose I can always check respond_to?(:to_s) after I see if its a time
<mikecmpbll>
with what
<cschneid>
anyway, type checking always makes me weird out a bit. Feels like there's a better way
lun__ has quit [Remote host closed the connection]
<cschneid>
class UnsafeString; ......; for instance - an obj that could be coerced to a string
tylersmith has joined #ruby-lang
gix has joined #ruby-lang
lun__ has joined #ruby-lang
<freedrull>
wouldnt you just be type checking in that class instead then
Technodrome has quit [Quit: Technodrome]
<freedrull>
might be good anyways, i dunno
<mikecmpbll>
are you just imagining up scenarios. you must know the boundaries of what types your method will accept
<mikecmpbll>
what if you sent it a Donkey?
<mikecmpbll>
should it return it's date of birth or something?
<cschneid>
mikecmpbll: perhaps? I think the better half is a single object, ask for the range of tiem it applies to
<cschneid>
but that's actually handled by the :start_time and :stop_time handler at the top
<cschneid>
so meh, this'll be good enough till proved otherwise
<havenwood>
mikecmpbll: I think it should parse the Donkey's age in that case, in Donkey years.
<mikecmpbll>
;)
Technodrome has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
lun__ has quit [Ping timeout: 240 seconds]
pothibo has quit [Quit: pothibo]
sepp2k1 has joined #ruby-lang
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
kek has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
torrieri has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby-lang
jaimef has joined #ruby-lang
charlespeach has joined #ruby-lang
Pupeno__ has joined #ruby-lang
Pupeno__ has quit [Remote host closed the connection]
bougyman is now known as BOOgyman
BOOgyman is now known as bougyman
lun__ has joined #ruby-lang
Pupeno has quit [Ping timeout: 272 seconds]
ecnalyr has quit [Remote host closed the connection]
charlespeach has left #ruby-lang [#ruby-lang]
ecnalyr has joined #ruby-lang
happydude has quit [Quit: Leaving]
lun__ has quit [Ping timeout: 256 seconds]
thepumpkin has quit [Remote host closed the connection]
thepumpkin has joined #ruby-lang
pglombardo has joined #ruby-lang
thepumpkin has quit [Ping timeout: 259 seconds]
mistym is now known as mistym_lunch
febeling has quit [Quit: febeling]
Nisstyre-laptop is now known as nisstyre
jithu has quit [Quit: Mother, did it need to be so high?]
achru has joined #ruby-lang
sulo has joined #ruby-lang
sulo has quit [Remote host closed the connection]
jg has quit [Ping timeout: 260 seconds]
sulo has joined #ruby-lang
sulo has quit [Read error: Connection reset by peer]
bastilian has joined #ruby-lang
sulo has joined #ruby-lang
efrainolivares has quit [Quit: efrainolivares]
arBmind has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
sulo has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Technodrome has quit [Quit: Technodrome]
febeling has joined #ruby-lang
mrpot4to_ has joined #ruby-lang
metus_violarium has quit [Quit: Konversation terminated!]
Technodrome has joined #ruby-lang
stamina has quit [Ping timeout: 260 seconds]
benlovell has quit [Quit: leaving]
benanne has joined #ruby-lang
deception has quit [Quit: Goodbye]
efrainolivares has joined #ruby-lang
CoreData has quit [Remote host closed the connection]
CoreData has joined #ruby-lang
yalue has quit [Quit: Leaving]
VTLob has joined #ruby-lang
adambeynon has joined #ruby-lang
<yorickpeterse>
What kind of behaviour do you want to test specifically?
retro|cz has quit [Ping timeout: 272 seconds]
ecnalyr has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
pglombardo has quit [Remote host closed the connection]
ecnalyr has quit [Ping timeout: 245 seconds]
jvrmaia has quit [Quit: Leaving]
cored has joined #ruby-lang
cored has joined #ruby-lang
hashkey has quit [Quit: Leaving]
<[spoiler]>
I'm not sure if I want to block all the join/quit messages. They're useful and annoying at the same timeeeeee
MaddinXx has quit [Remote host closed the connection]
symm- has joined #ruby-lang
<apeiros>
I'm still waiting for a client with smart join/quit/part messages
<ryanf>
yorickpeterse: I'm guessing he means that he wants to hold the GIL for a long time on one thread and then test how his C code behaves on other threads
<darix>
[spoiler]: it is much more readable here without them
<ryanf>
I have no idea what the answer is though
<darix>
[spoiler]: if you use irssi you can also try crapbuster.pl
achru has quit []
<apeiros>
show join messages of people you've talked with. show part/quit messages of people who talked last, or to whom you talked recently.
<[spoiler]>
darix, LOL, interesting name
<darix>
with /set crapbuster_levels JOINS PARTS QUITS NICKS CLIENTCRAP CRAP MODE TOPICS KICKS
<darix>
then you can leave them turned on
<postmodern>
to reference my memory, "if not foo or bar", the not will bind to only "foo"
<darix>
and just clean windows if it gets too much
<[spoiler]>
I'd like it to only notify me of joins/quits of people I actually care about (i guess a smart filter for it could do the trick, but I wouldn't mind adding people to a list)
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
<darix>
[spoiler]: i live for a few years with ignored join/parts now ... occasionally i answer to people who left already... but besides that, it is much better.
<darix>
irssi has 2 settings for ignoring certain events in certain channels so it is easy to do
<[spoiler]>
shit. My cat hid the menu on the window, now I can't access the settings to see if I can do something about filtering them
Voker57 has joined #ruby-lang
pkrnj has joined #ruby-lang
Pupeno has quit [Ping timeout: 246 seconds]
thepumpkin has joined #ruby-lang
efrainolivares_ has joined #ruby-lang
<yorickpeterse>
ryanf: ah
efrainolivares__ has joined #ruby-lang
stamina has joined #ruby-lang
efrainolivares has quit [Ping timeout: 268 seconds]
[spoiler] has quit [Quit: Leaving]
[spoiler] has joined #ruby-lang
efrainolivares_ has quit [Ping timeout: 240 seconds]
_if has quit [Quit: leaving]
bastilian has quit [Ping timeout: 268 seconds]
stamina has quit [Quit: WeeChat 0.4.2]
GaelanAintAround is now known as Gaelan
captain_chen has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]