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
Harzilein has quit [Quit: Leaving]
butchanton has quit [Quit: Leaving.]
kingCrawlerx has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
hahuang65_ has joined #ruby-lang
chessguy has joined #ruby-lang
andrewhl has joined #ruby-lang
tallship has quit [Quit: Too Hip gotta go]
banisterfiend has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
havenn has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
g0bl1n has quit [Quit: g0bl1n]
havenn has quit [Ping timeout: 260 seconds]
kingCrawlerx has quit [Quit: Computer has gone to sleep]
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
methym has joined #ruby-lang
slyphon has joined #ruby-lang
Bosox20051 has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
andrewhl has quit [Remote host closed the connection]
Bosox20051 has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
cdt has joined #ruby-lang
lcdhoffman has joined #ruby-lang
corsican has quit [Quit: leaving]
headius has quit [Quit: headius]
lcdhoffman_ has joined #ruby-lang
corsican has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
t44393 has quit [Remote host closed the connection]
t970 has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
chessguy has quit [Remote host closed the connection]
lcdhoffman has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby-lang
macmartine has joined #ruby-lang
Bosox20051 has joined #ruby-lang
chessguy has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
ivanoats has quit [Remote host closed the connection]
ryez has quit [Quit: Page closed]
lcdhoffman_ has quit [Quit: lcdhoffman_]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
lcdhoffman has joined #ruby-lang
nazty has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
nazty has quit [Client Quit]
laszlokorte has quit [Quit: laszlokorte]
milesforrest has left #ruby-lang [#ruby-lang]
chessguy has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
tenderlove has quit [Remote host closed the connection]
Weems has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
chessguy has joined #ruby-lang
hahuang65_ has quit [Quit: Computer has gone to sleep.]
chendo_ has quit [Ping timeout: 265 seconds]
chendo_ has joined #ruby-lang
chimkan has joined #ruby-lang
savage-_ has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby-lang
savage- has joined #ruby-lang
lcdhoffman has joined #ruby-lang
chendo_ has quit [Ping timeout: 240 seconds]
lcdhoffman has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
savage- has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
havenn has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 240 seconds]
t970 has quit [Remote host closed the connection]
t30325 has joined #ruby-lang
seanstickle has joined #ruby-lang
havenn has quit [Ping timeout: 272 seconds]
<rhizmoe> i have a couple of classes, each having identical argument checkers in their initialize methods. these checkers are basically if/else loops for TypeError and ArgumentError purposes, and assignment happens within them. is it a decent idea to do something like @foo = check_qty(qty) from a library if the method might bug out in a raise-y way?
chendo_ has joined #ruby-lang
<rhizmoe> alternatively, is it a bad idea to have lots of logic in the initialize method?
jxie has quit [Quit: leaving]
<steveklabnik> your name makes me twitch, i can't read it without seeing 'rhizome' ;)
<steveklabnik> too much deleuze
alvaro_o has quit [Quit: Ex-Chat]
jxie has joined #ruby-lang
mwjcomputing has joined #ruby-lang
<steveklabnik> to answer your question.... generally, code that checks types of things is bad
dmwuw has quit [Ping timeout: 276 seconds]
chendo_ has quit [Ping timeout: 240 seconds]
bfreeman has joined #ruby-lang
krz has quit [Quit: krz]
chendo has joined #ruby-lang
<rhizmoe> steveklabnik: it used to be rhizome back in my efnet days, but...it's a long story
woollyams has quit [Quit: Computer has gone to sleep.]
<rhizmoe> it does derive from deleuze, tho!
Jay_Levitt has quit [Quit: Jay_Levitt]
<rhizmoe> can you tell me more about not typechecking in code? is it best just to: def initialize(foo,bar,baz); @foo = foo; @bar = bar; @baz = baz; end # and be done with it?
<erikh> type checking your ivars makes debugging a whole lot easier when you've got a method using the wrong type later
<erikh> whether it's with the standard isa/=== stuff or respond_to
kvirani has quit [Remote host closed the connection]
<rhizmoe> this is a coding test, so i want to be as idiomatic as possible i think
<seanstickle> Didn't you hear? Zed Shaw said that idioms are bad now.
Marc3000 has quit [Ping timeout: 244 seconds]
<erikh> I'm not sure where idioms take precedence over simple logic, but I've no energy to argue this.
<rhizmoe> well, by idiomatic i mean standard, simple.
<rhizmoe> not writing java in ruby, stuff like that.
kingCrawlerx has joined #ruby-lang
headius has joined #ruby-lang
tenderlove has joined #ruby-lang
abletony84 has quit [Quit: Lost terminal]
<lianj> rhizmoe: http://pastie.org/4565599
<banisterfiend> rhizmoe: i think at the least people use respond_to? rather than is_a?. But a lot of people dont bother with that either and see it as the responsibility of the caller to pass the correct things
<zzak> finished xmlrpc/server, only parser is left. up to 43.8% doc coverage now
<zzak> the webrick and mobruby servers could probably go haha
<zzak> theres a cgi based one too
Marc3000 has joined #ruby-lang
<drbrain> wow, nice!
<rhizmoe> lianj: ah, the perlish way :)
<rhizmoe> banisterfiend: yeah, normally i would do it that way, but this is to impress people
<rhizmoe> sadly, perhaps.
tenderlo_ has joined #ruby-lang
tenderlo_ has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 246 seconds]
Bosox20051 has quit [Quit: Leaving]
mwjcomputing has quit [Quit: Leaving]
<steveklabnik> rhizmoe: cool :)
<steveklabnik> rhizmoe: yes, basically what everyone else says. don't ever is_a?, if you must, respond_to?
<steveklabnik> imho
sepp2k has quit [Ping timeout: 260 seconds]
wpaulson has joined #ruby-lang
<steveklabnik> rhizmoe: i would do this: http://pastie.org/4565645
<steveklabnik> no default parameter: must be called
<steveklabnik> corerce what you get to what you want
<steveklabnik> done.
cantonic has quit [Quit: cantonic]
bryancp has joined #ruby-lang
t30325 has quit [Remote host closed the connection]
t7373 has joined #ruby-lang
kingCrawlerx has quit [Quit: Computer has gone to sleep]
WillMarshall has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
wpaulson_ has joined #ruby-lang
wpaulson has quit [Read error: Connection reset by peer]
wpaulson_ is now known as wpaulson
<rhizmoe> thanks. i think i'm wasting a lot of time trying to show off, so simplification may be in order
desmondmonster has joined #ruby-lang
<rhizmoe> does respond_to? take a class the same as is_a? it's not clear to me from the dox
sepp2k has joined #ruby-lang
m3nd3s_ has quit [Remote host closed the connection]
<banisterfiend> rhizmoe: no, it takes a method name
kingCrawlerx has joined #ruby-lang
<banisterfiend> rhizmoe: i dont think people are impressed by show-offs these days, people seem to prefer simplicity
<rhizmoe> sure.
<banisterfiend> simple solution, that's maintainable, easily grokable with tests
<banisterfiend> anything else is just blah
<steveklabnik> +100
<rhizmoe> right. i mean, i wasn't going overboard, i just don't write straight ruby often, that's all.
havenn has joined #ruby-lang
andrewhl has joined #ruby-lang
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<steveklabnik> it's a style, for sure
<steveklabnik> rhizmoe: btw, i reccomend that all programmers read http://www.amazon.com/Protocol-Control-Exists-Decentralization-Leonardo/dp/0262072475 , but ESPECIALLY those who <3 deleuze
<steveklabnik> if you haven't
brianpWins_ has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mistym has quit [Remote host closed the connection]
brianpWins has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
dmwuw has joined #ruby-lang
postmodern has joined #ruby-lang
t7373 has quit [Remote host closed the connection]
t82885 has joined #ruby-lang
<rhizmoe> steveklabnik: thanks for the book tip :) btw, i am quoted in: http://www.amazon.com/Two-Fold-Thought-Deleuze-Guattari-Intersections/dp/1572303263/ ;)
<steveklabnik> :)
<steveklabnik> books that quote deleuze, marx, and the http rfc in the same chapter? i fell in love
<seanstickle> steveklabnik: ordered
<seanstickle> steveklabnik: shoulda put your affiliate code in
<steveklabnik> seanstickle: :) oh well
<steveklabnik> i do have one
<steveklabnik> it bought me my copies of Capital II and III :)
<seanstickle> Close textual readings of code are Very Interesting to me.
jkprg has joined #ruby-lang
desmondmonster has quit [Quit: desmondmonster]
methym has quit [Quit: methym]
banisterfiend has quit [Remote host closed the connection]
<steveklabnik> this is more a continuation of foucault -> deleuze -> galloway
banisterfiend has joined #ruby-lang
<steveklabnik> are you aware of the whole Critical Code Studies stuff?
<seanstickle> I am. Much of what I have read of it is quite terrible.
<steveklabnik> yeah :/
<steveklabnik> it doesnt live up to what i'd hoped. they are at least trying
<steveklabnik> many of them just don't have enough code history
<steveklabnik> coding
<seanstickle> English professors swapping out literary terms for things they heard in some programming meetup.
<seanstickle> Depressing.
<seanstickle> The one that put me over the edge was an analysis of how a computer virus recapitulates phallocentric patriarchalism.
<seanstickle> At that point, I was done.
<steveklabnik> anyway, protocol isn't a close textual reading of code, it's creating 'protocol' as a term to succeed foucault's discipline and deleeuze + guattari's control socieiteis
<steveklabnik> ha!
banisterfiend has quit [Read error: Connection reset by peer]
dmwuw_ has joined #ruby-lang
<seanstickle> Have you read Galloway's "The Exploit" ?
<seanstickle> Considering picking that up as well.
banisterfiend has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
<steveklabnik> yes, it is also interesting. it's a sequel of sorts
<steveklabnik> basically, the exploit is how to get past protocl
<steveklabnik> he doesn't have answers, just questions
neocoin has joined #ruby-lang
imajes has quit [Excess Flood]
<seanstickle> I am fine with questions. My education was all about questions, and not so much about answers.
<seanstickle> I far prefer good questions to bad Critical Code Studies
imajes has joined #ruby-lang
banisterfiend` has joined #ruby-lang
dmwuw has quit [Ping timeout: 240 seconds]
dmwuw_ has quit [Read error: Operation timed out]
chimkan has quit [Quit: chimkan]
mistym has joined #ruby-lang
<steveklabnik> :)
mephux has quit [Quit: w0ots...]
Musfuut has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Ping timeout: 245 seconds]
mephux has joined #ruby-lang
Musfuut has joined #ruby-lang
Musfuut is now known as Guest78690
kingCrawlerx has quit [Quit: Computer has gone to sleep]
Aphelion has joined #ruby-lang
ttilley has quit [Read error: Connection reset by peer]
t82885 has quit [Remote host closed the connection]
t1053 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
<arooni-mobile> hi folks. looking to parse out user IDs from a raw HTML response of a user results page.... would you folks recommend nokogiri for this use case? or just simple regexes.
lcdhoffman has quit [Quit: lcdhoffman]
<seanstickle> Ha
<seanstickle> Well, except regex is fine sometimes.
ryanf has joined #ruby-lang
<seanstickle> arooni-mobile: if you don't know which to use, use Nokogiri
<seanstickle> arooni-mobile: is the best answer
<steveklabnik> just always use nokogiri
<steveklabnik> and then you wont have problems
<arooni-mobile> seanstickle, whats the advantage of nokogiri over regular regexs?
<arooni-mobile> or shold i read nokogiri docs to find out why
<arooni-mobile> :P
<seanstickle> arooni-mobile: not having to fiddle around with regexes, primarily
<steveklabnik> it is impossible to parse xml/html with regular expressions
<arooni-mobile> gotcha
headius has quit [Quit: headius]
<seanstickle> steveklabnik: no one uses POSIX regexes anymore anyways
<steveklabnik> and it's not as if nokogiri is hard to use
<hagebake> what do your html and your user IDs look like?
<arooni-mobile> well i can throw nokogiri at it and see what that yields
<seanstickle> steveklabnik: extended regel support can parse fine
<arooni-mobile> one sec i'll get you an example
<steveklabnik> sure, i mean regular langauges.
<steveklabnik> i know that many regex implementations aren't regular langauges
<steveklabnik> but seriously: just fucking use nokogiri
<steveklabnik> and then everything is roses
<seanstickle> steveklabnik: ++
<steveklabnik> or, fiddle around with regexes
<steveklabnik> forever
<steveklabnik> and have it break randomly sometimes
<steveklabnik> i say this as someone who is getting a perl tattoo soon.
<arooni-mobile> ok ill check out nokogiri
<arooni-mobile> thanks for recommendations folks
<seanstickle> steveklabnik: get a tattoo using lambda calculus
<steveklabnik> :)
<seanstickle> Or pi calculus
<seanstickle> Even more trendy/cool
lcdhoffman has joined #ruby-lang
cid404 has quit [Ping timeout: 252 seconds]
<arooni-mobile> why would you have a method like: def ClassName::instance; @@instance; end;
dmwuw has joined #ruby-lang
<arooni-mobile> to set a class var @@instance ?
<steveklabnik> sounds like someone's trying to make a singleton
redgetan has joined #ruby-lang
macmartine has joined #ruby-lang
headius has joined #ruby-lang
havenn has joined #ruby-lang
headius has quit [Client Quit]
arooni-mobile has quit [Ping timeout: 260 seconds]
Kichael has joined #ruby-lang
dmwuw has quit [Ping timeout: 245 seconds]
dmwuw has joined #ruby-lang
t1053 has quit [Remote host closed the connection]
t17892 has joined #ruby-lang
havenn has quit [Ping timeout: 240 seconds]
igotnolegs has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
woollyams has quit [Quit: Computer has gone to sleep.]
arooni-mobile has joined #ruby-lang
Marc3000 has quit [Quit: Leaving.]
Marc3000 has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
havenn has joined #ruby-lang
macmartine has joined #ruby-lang
woollyams has joined #ruby-lang
arooni-mobile has quit [Quit: Leaving]
arooni-mobile has joined #ruby-lang
macmartine has quit [Read error: Connection reset by peer]
d3vic3 has quit [Read error: Operation timed out]
<arooni-mobile> steveklabnik, earlier i asked a question about def ClassName::instance; @@instance; end; .... you're saying this is a way of creating the singleton pattern?
chimkan_ has joined #ruby-lang
d3vic3 has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
gmci has quit [Quit: Computer has gone to sleep.]
redgetan has left #ruby-lang ["Leaving"]
<rhizmoe> is there a way to get the index of an array element use in an inject/reduce block?
<rhizmoe> *used
gmci has joined #ruby-lang
t17892 has quit [Remote host closed the connection]
t40002 has joined #ruby-lang
<bnagy> you can ref the array from inside the block and call index, but it's not reliable
<bnagy> I would each_with_index.inject {|memo,(elem,idx)| ...
<banisterfiend`> rhizmoe: enum.each_with_index.inject
<banisterfiend`> heh heh
<burgestrand> arooni-mobile: most likely considering the name of the variable
<burgestrand> arooni-mobile: probably not a good idea to use a @@ though
<burgestrand> arooni-mobile: a regular @ should be just fine
chendo has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
jkprg has quit [Quit: jkprg]
chendo_ has joined #ruby-lang
<rhizmoe> banisterfiend`, bnagy: nice one, thanks!
towski has joined #ruby-lang
savage- has joined #ruby-lang
mistym has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
chendo_ has quit [Ping timeout: 244 seconds]
chendo_ has joined #ruby-lang
<rhizmoe> can block braces always be replaced by do..end?
justinseiter has quit [Quit: Leaving]
dhruvasagar has quit [Remote host closed the connection]
<banisterfiend`> rhizmoe: look up their precedence rules
havenn has quit [Remote host closed the connection]
banisterfiend` has quit [Read error: Connection reset by peer]
towski has quit [Remote host closed the connection]
towski has joined #ruby-lang
chendo_ has quit [Ping timeout: 260 seconds]
havenn has joined #ruby-lang
chendo_ has joined #ruby-lang
towski has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
towski has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<arooni-mobile> so ive got this raw html: https://raw.github.com/gist/c1e24f2994eab739e851/73e60cdc9f966c8e3acb300005cca475e0c0a4d5/gistfile1.txt ... need to extract the profile IDs
<arooni-mobile> im thinking iits easiest to write a regex to match "profile.html?id=BUPA40U&"
fgomez has joined #ruby-lang
burgestrand has joined #ruby-lang
<bnagy> ... and we come in where exactly?
<arooni-mobile> just asking if that approach is better than using nokogiri
s1n4 has joined #ruby-lang
<arooni-mobile> i think it is; i can write a regex faster than learning xpath queries
<bnagy> regexps are never better than using nokogiri
<bnagy> but if you're just going to come back every hour until someone tells you something different, then
<bnagy> yes, use regexps
<arooni-mobile> haha
banisterfiend has quit [Read error: Connection reset by peer]
burgestrand has quit [Ping timeout: 244 seconds]
kain has quit [Ping timeout: 244 seconds]
ryanf has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby-lang
burgestrand has joined #ruby-lang
gmci has quit [Quit: Computer has gone to sleep.]
<arooni-mobile> ok i wrote the regex that extracts the profile id: /\/profile.html\?id=([A-Z\d]*)/ .... but now i'm curious how can i tell ruby to return all matches.... not just the first one it finds?
gmci has joined #ruby-lang
<bnagy> ok well your regex is wrong for a start
<arooni-mobile> well it gets the first profile id with $1
<bnagy> HS0U6J0
<bnagy> oh \d sry :) wait ...implicit anchor?
<bnagy> ew
<arooni-mobile> better to exclude stuff instead?
<bnagy> why not use result_item? ANyway whatever
<arooni-mobile> something like /\/profile.html\?id=([^&]*)/
<bnagy> augh
brianpWins has joined #ruby-lang
chendo_ has quit [Ping timeout: 240 seconds]
<arooni-mobile> you hate that one too?
<bnagy> /result_item-(.*)\\/
<bnagy> I hate all use of regexps, it's a horrible approach
<bnagy> anyway the method you want is String#scan
<arooni-mobile> im open to different ideas; but why is using a regex so much worse than nokogiri
<bnagy> clearly you're not
macmartine has joined #ruby-lang
<bnagy> cause two people already explained that to you
<arooni-mobile> well isnt xpath a different way of regexing
<arooni-mobile> but with the document instead of literal strings
Tearan has quit [Quit: Sleepy Badger....]
<bnagy> just use a regexp
chendo_ has joined #ruby-lang
<bnagy> junk.scan(/result_item(.*)\\/).flatten
<bnagy> missed a dash
chimkan_ has quit [Quit: chimkan_]
yxhuvud has joined #ruby-lang
<arooni-mobile> ok that seems to work at least for now
<arooni-mobile> maybe its not ideal
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
tonni has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 252 seconds]
zmack has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
cid404 has joined #ruby-lang
chimkan has joined #ruby-lang
<arooni-mobile> thanks for your help bnagy
zmack has quit [Remote host closed the connection]
|Vargas| has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
chendo_ has joined #ruby-lang
brianpWins has quit [Ping timeout: 256 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
brianpWins has joined #ruby-lang
qpingu has joined #ruby-lang
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
chimkan has quit [Quit: chimkan]
ryanf has joined #ruby-lang
t40002 has quit [Remote host closed the connection]
t53083 has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
woollyams has joined #ruby-lang
chimkan_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Marc3000 has left #ruby-lang [#ruby-lang]
chendo_ has quit [Ping timeout: 265 seconds]
t53083 has quit [Remote host closed the connection]
kain has joined #ruby-lang
t15675 has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 260 seconds]
Hakon has joined #ruby-lang
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby-lang
chendo_ has joined #ruby-lang
kain has quit [Ping timeout: 244 seconds]
burgestrand1 has quit [Client Quit]
NOKAH has joined #ruby-lang
Hakon has quit [Read error: Connection reset by peer]
gmci has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
chendo_ has quit [Ping timeout: 244 seconds]
gmci has joined #ruby-lang
chendo_ has joined #ruby-lang
<rhizmoe> banisterfiend: thanks
chimkan_ has quit [Quit: chimkan_]
bjensen has joined #ruby-lang
corundum has quit [Read error: Connection reset by peer]
dc5ala has joined #ruby-lang
corundum has joined #ruby-lang
arooni-mobile has joined #ruby-lang
<rue> Don’t thank him, he’ll just get cocky
savage- has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
t15675 has quit [Remote host closed the connection]
t77679 has joined #ruby-lang
mytrile has joined #ruby-lang
Aphelion has quit [Quit: Aphelion]
ttilley has joined #ruby-lang
ttilley has quit [Changing host]
ttilley has joined #ruby-lang
cid404 has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Ping timeout: 260 seconds]
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
Z33K|Lux has quit []
t77679 has quit [Remote host closed the connection]
<anildigital_work> Somebody interested in answering this and get some points http://stackoverflow.com/questions/12067417/what-is-the-difference-between-rest-apis-and-json-apis
t17502 has joined #ruby-lang
solars has joined #ruby-lang
dan|el has joined #ruby-lang
qwerxy has joined #ruby-lang
judofyr has joined #ruby-lang
hramrach has quit [Remote host closed the connection]
<foucist> anildigital_work: it's already been answered
<anildigital_work> foucist: where
kain has joined #ruby-lang
hramrach has joined #ruby-lang
kain has quit [Ping timeout: 240 seconds]
NOKAH has quit [Quit: Leaving...]
gmci has quit [Quit: Computer has gone to sleep.]
woollyams has quit [Ping timeout: 250 seconds]
runeb has joined #ruby-lang
gmci has joined #ruby-lang
tonni has joined #ruby-lang
zmack has joined #ruby-lang
ryanf has quit [Quit: leaving]
havenn has quit [Remote host closed the connection]
<foucist> refersh the page ?
thone_ has joined #ruby-lang
thone has quit [Ping timeout: 252 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
dan|el has quit [Ping timeout: 256 seconds]
yats has joined #ruby-lang
stardiviner has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
dan|el has joined #ruby-lang
robbyoconnor has joined #ruby-lang
qwerxy has quit [Quit: offski]
stardiviner has quit [Client Quit]
ezkl has joined #ruby-lang
ryez has joined #ruby-lang
ryez has left #ruby-lang [#ruby-lang]
kaiwren has joined #ruby-lang
d3vic3 has quit [Ping timeout: 256 seconds]
d3vic3 has joined #ruby-lang
stardiviner has joined #ruby-lang
havenn has joined #ruby-lang
dan|el has quit [Read error: Operation timed out]
ryez has joined #ruby-lang
cdt has joined #ruby-lang
havenn has quit [Ping timeout: 240 seconds]
foca has quit [Ping timeout: 248 seconds]
foca has joined #ruby-lang
hachiya has quit [Ping timeout: 246 seconds]
dan|el has joined #ruby-lang
gnufied has joined #ruby-lang
hachiya has joined #ruby-lang
<gnufied> morning
dhruvasagar has joined #ruby-lang
<banisterfiend> gnufied: good morning
<gnufied> hey.
apeiros_ has joined #ruby-lang
<banisterfiend> hiya
<judofyr> hi
workmad3 has joined #ruby-lang
<banisterfiend> sup
<bnagy> morn
tjadc has joined #ruby-lang
<gnufied> judofyr: even after this many years (5 to be exact), I find using deferables ununintuitive!
<judofyr> gnufied: I agree
eban has quit [Ping timeout: 246 seconds]
towski has quit [Remote host closed the connection]
<banisterfiend> gnufied: have you seen deferable gratification?
<gnufied> *reads stuff*
woollyams has joined #ruby-lang
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<gnufied> interesting.
<gnufied> no, I think I did not see this before.
t17502 has quit [Remote host closed the connection]
t43522 has joined #ruby-lang
justinmcp has joined #ruby-lang
rolfb has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
sora_h is now known as s0ra_h
cid404 has joined #ruby-lang
kain has joined #ruby-lang
qwerxy has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
s0ra_h is now known as sora_h
justinmcp has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
gmci has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
fayimora has joined #ruby-lang
havenn has quit [Ping timeout: 244 seconds]
sora_h is now known as s0ra_h
LanceHaig has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
rolfb has joined #ruby-lang
zommi has joined #ruby-lang
rashi has joined #ruby-lang
rashi has left #ruby-lang [#ruby-lang]
postmodern has quit [Quit: Leaving]
t43522 has quit [Remote host closed the connection]
t62225 has joined #ruby-lang
rubylion has joined #ruby-lang
hahuang65 has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
rubylion has quit [Client Quit]
rubylion has joined #ruby-lang
dhruvasagar has joined #ruby-lang
rubylion has quit [Read error: Connection reset by peer]
bytephilia has joined #ruby-lang
rubarlion has joined #ruby-lang
sora_h is now known as s0ra_h
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
s0ra_h is now known as sora_h
<rubarlion> can I match/scan an array, against another array, which is a hashvalue?
cantonic has joined #ruby-lang
<judofyr> rubarlion: example?
woollyams has joined #ruby-lang
cantonic has left #ruby-lang [#ruby-lang]
fayimora has quit [Quit: Be back in a gifii]
jbsan has quit [Quit: jbsan]
wallerdev has quit [Quit: wallerdev]
runeb has quit [Remote host closed the connection]
laszlokorte has joined #ruby-lang
toretore has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
runeb has joined #ruby-lang
rubarlion has joined #ruby-lang
cantonic has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
<certainty> are there any plans to put something like array/list comprehensions into the language?
vesan has quit [Ping timeout: 260 seconds]
<banisterfiend> certainty: not afaik, but we'll have lazy enumerables in 2.0
<certainty> banisterfiend: yeah i've seen this. That's a great thing. But comprehensions would be cool to as they allow for concise defintions of datasets
Criztian has joined #ruby-lang
cantonic has quit [Quit: cantonic]
<banisterfiend> certainty: hmm, any comprehesions apart from teh very simple ones look messy are hard to understand IMO
<banisterfiend> and*
<judofyr> certainty: I feel list comprehensions are backwards
<banisterfiend> certainty: can u show an example
<certainty> banisterfiend: take a look at random haskell code that builds up lists using comprehensions
<banisterfiend> certainty: can u show (im not familiar with haskell :P)
woollyams has quit [Quit: Computer has gone to sleep.]
<whitequark> certainty: I don't see how something like [func(x) for x in y if x > 10] is better than y.select { |x| x > 10 }.map { |x| func(x) }
rubarlion has quit [Read error: Connection reset by peer]
<certainty> banisterfiend: dunno the usual suspects like emulative zip and such [ (a,b) | a <- some_list, b <- some_other_list ]
<certainty> emulating
rubarlion has joined #ruby-lang
<banisterfiend> certainty: hmm, is there anything we can't do neatly and cleanly with the current ruby constructs though?
<certainty> it's the syntax that is appealing. You see what you draw where from and you see what you do with it.
<banisterfiend> cos that 'zip' one is trivial too
vesan has joined #ruby-lang
<certainty> banisterfiend: you certainly can do it with ruby. I currently don't have a particular example. I was just asking out of curiousity
<banisterfiend> oh ok
<banisterfiend> certainty: there was a cute reddit post the other day, some guy had built support for it into ruby
<banisterfiend> using lots of weird hacks
<certainty> the weired hacks part iss scaring me ;)
chessguy has quit [Remote host closed the connection]
rubarlion has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 260 seconds]
<certainty> but as i read you guys generally wouldn't welcome comprehensions?
vesan has quit [Ping timeout: 260 seconds]
rubarlion has joined #ruby-lang
<banisterfiend> certainty: i'll need to see some sexier exmaples to be convinced, im not that familiar with them really
sweetdownfall has joined #ruby-lang
<certainty> banisterfiend: i suppose there aren't that much killer examples. It's just a denser way to express things
sora_h is now known as s0ra_h
sweetdownfall has left #ruby-lang [#ruby-lang]
s0ra_h is now known as sora_h
<judofyr> certainty: I just don't see the point of more syntax when blocks solves the same problem
cantonic has joined #ruby-lang
jbsan has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
jbsan has quit [Client Quit]
rubarlion has joined #ruby-lang
vesan has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<certainty> judofyr: you're probably right. They don't add much more. The only thing probably being that the composition part is decoupled from the generation part
<banisterfiend> certainty: https://gist.github.com/3356675
<certainty> banisterfiend: woa, what's that. I need to grok that
rubarlion has quit [Read error: Connection reset by peer]
t62225 has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
t6194 has joined #ruby-lang
<certainty> the globals suck but the - trick is neat
<certainty> alright, we have them already
rubarlion has joined #ruby-lang
eban has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
voker57 has quit [Ping timeout: 240 seconds]
rubarlion has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
dan|el has quit [Ping timeout: 256 seconds]
dc5ala has quit [Quit: Ex-Chat]
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
rubarlion has quit [Ping timeout: 256 seconds]
rubarlion has joined #ruby-lang
dhruvasagar has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
runeb has quit [Remote host closed the connection]
rubarlion has joined #ruby-lang
runeb has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
voker57 has quit [Ping timeout: 248 seconds]
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
kain has quit [Ping timeout: 268 seconds]
rubarlion has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
rubarlion has joined #ruby-lang
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
Asher1 has joined #ruby-lang
woollyams has joined #ruby-lang
Leeky_afk is now known as Leeky
Jay_Levitt has joined #ruby-lang
Asher has quit [Ping timeout: 245 seconds]
t6194 has quit [Remote host closed the connection]
kvirani has joined #ruby-lang
t2978 has joined #ruby-lang
xyz has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
d3vic3 has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby-lang
d3vic3 has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
cantonic has quit [Quit: cantonic]
d3vic3 has quit [Client Quit]
<rubarlion> food = [fruits={ apple: ["red", "round", "crisp], banana: ["yellow", "curved"] }, veggies = { carrot: ["orange", "crisp", "long"], celery: ["green", "long"] }]
<rubarlion> can I scan/match for an array, which is the value of a hash, which is of an array of hashes?
<judofyr> rubarlion: first of all, the local variables don't make any difference: [{ apple: ["red", "round", "crisp], banana: ["yellow", "curved"] }, { carrot: ["orange", "crisp", "long"], celery: ["green", "long"] }]
lcdhoffman has quit [Quit: lcdhoffman]
<rubarlion> I don't understand
<judofyr> rubarlion: that's the same structure
<judofyr> there's no difference between them
<rubarlion> oh
banisterfiend has quit [Read error: Connection reset by peer]
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
banisterfiend has joined #ruby-lang
jxie has quit [Quit: leaving]
rubarlion has quit [Read error: Connection reset by peer]
rubarlion has joined #ruby-lang
kain has joined #ruby-lang
rubarlion has quit [Ping timeout: 260 seconds]
rubarlion has joined #ruby-lang
rubarlion has quit [Client Quit]
rohit has joined #ruby-lang
sporkmonger has joined #ruby-lang
dejongge has joined #ruby-lang
kain has quit [Quit: exit]
kain has joined #ruby-lang
dan|el has joined #ruby-lang
JoshWines has quit [Quit: Leaving]
m3nd3s has joined #ruby-lang
rohit has quit [Quit: Leaving]
kaiwren has quit [Quit: kaiwren]
justinmcp has joined #ruby-lang
diegoviola has joined #ruby-lang
chimkan has joined #ruby-lang
Hakon has joined #ruby-lang
jbsan has joined #ruby-lang
desmondmonster has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
titaniumNoob has joined #ruby-lang
Glass_saga has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
desmondmonster has quit [Quit: desmondmonster]
bryancp has joined #ruby-lang
th3xer0 has joined #ruby-lang
t2978 has quit [Remote host closed the connection]
t95104 has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
th3xer0 has left #ruby-lang [#ruby-lang]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
chimkan has quit [Quit: chimkan]
|Vargas| has quit [Quit: ...]
th3xer0 has joined #ruby-lang
woollyams has quit [Client Quit]
banisterfiend has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby-lang
banisterfiend has joined #ruby-lang
justinmcp has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
Strangebrew has joined #ruby-lang
fgomez has quit [Ping timeout: 272 seconds]
Strangebrew has left #ruby-lang ["Leaving"]
laszlokorte_ has joined #ruby-lang
Axsuul has quit [Ping timeout: 252 seconds]
Leeky is now known as Leeky_afk
laszlokorte has quit [Ping timeout: 260 seconds]
hakunin has quit [Remote host closed the connection]
s1n4 has quit [Quit: Lost terminal]
m3nd3s_ has joined #ruby-lang
cantonic has joined #ruby-lang
m3nd3s has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jkprg has joined #ruby-lang
t95104 has quit [Remote host closed the connection]
t81208 has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
<andrewvos> Submodules in Git are shit right?
<totallymike> Why say that?
<andrewvos> Well, I've heard they are.
<andrewvos> So, I decided to ask the question among people that I respect.
* totallymike isn't that guy ;)
<totallymike> I don't see what's wrong with them, but I haven't used them for very complex things.
m3nd3s_ has quit []
m3nd3s has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
<bnagy> andrewvos: I looked at em, and read some stuff, and came to the same conclusion as you
<bnagy> fwiw
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<bnagy> I'm just breaking stuff into separate repos, and if I need to control a ton at once I'll use forest or whatever it's called
rohit has joined #ruby-lang
kaiwren has joined #ruby-lang
naquad has quit [Ping timeout: 265 seconds]
<bnagy> but I'm definitely not a git expert
Leeky_afk is now known as Leeky
<andrewvos> bnagy: Thanks :)
bryancp has joined #ruby-lang
t81208 has quit [Remote host closed the connection]
brunocoelho has joined #ruby-lang
t62352 has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
<totallymike> Pretty much the only thing I've used submodules for is managing vim plugins that have github repos in my dotfiles repo
<totallymike> come to think of it I haven't updated them in ages
banisterfiend has joined #ruby-lang
naz has quit [Ping timeout: 252 seconds]
yats has joined #ruby-lang
naquad has joined #ruby-lang
bjensen has quit [Quit: bjensen]
bytephilia has quit [Remote host closed the connection]
bytephilia has joined #ruby-lang
codewrangler has joined #ruby-lang
<zzak> good morning!
bjensen has joined #ruby-lang
<totallymike> morning
hynkle has joined #ruby-lang
totallymike has quit [Quit: WeeChat 0.3.7]
robotmay has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
agile has quit [Ping timeout: 276 seconds]
naz has joined #ruby-lang
cantonic_ has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
mistym has quit [Remote host closed the connection]
naquad has quit [Excess Flood]
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
enroxorz-work has joined #ruby-lang
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby-lang
tonni has quit [Remote host closed the connection]
naquad has joined #ruby-lang
dan|el has quit [Ping timeout: 252 seconds]
bytephilia has quit [Read error: Operation timed out]
kvirani has quit [Remote host closed the connection]
jxie has joined #ruby-lang
rohit has left #ruby-lang ["Leaving"]
t62352 has quit [Remote host closed the connection]
t56060 has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
areil has joined #ruby-lang
outoftime has joined #ruby-lang
titaniumNoob has quit [Ping timeout: 252 seconds]
bytephilia has joined #ruby-lang
andrewhl has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
cantonic has quit [Quit: cantonic]
havenn has joined #ruby-lang
rippa has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
t56060 has quit [Remote host closed the connection]
t34551 has joined #ruby-lang
<rue> Good internet time of day
<rue> andrewvos: Yes. Subtrees are OK-ish
<rue> And then there’s that git-slave thing. I think
havenn has quit [Ping timeout: 245 seconds]
havenn has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
diegoviola has quit [Quit: Reconnecting]
diegoviola has joined #ruby-lang
xyz has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120717181344]]
zommi has quit [Quit: Leaving.]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<andrewvos> rue: Thanks.
<cout> why does this script print a different result every time I run it?
<cout> hmm
<cout> it's deterministic on 1.9.3 but not on 1.8.7
<lianj> cout: ruby 1.9
<cout> lianj: care to elaborate? :)
<lianj> cout: yep, ruby 1.9 has ordered hashes
<cout> oic
t34551 has quit [Remote host closed the connection]
<cout> I need to use rel1.keys.sort, not just rel1.keys
kvirani has joined #ruby-lang
t35790 has joined #ruby-lang
<rue> s/hashes/vaguely hash-like data structures that are not hashes by definition/
* rue is bitter
cantonic has joined #ruby-lang
<cout> I never liked the name "hash" anyway
<cout> it's not a hash; it's a hash table :)
gsav has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby-lang
<zzak> i prefer crab pincers
banisterfiend has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
gsav has joined #ruby-lang
<mistym> {}.is_a? CrabPincers
jbsan has quit [Quit: jbsan]
yats has quit [Read error: Connection reset by peer]
toretore has quit [Quit: This computer has gone to sleep]
totallymike has joined #ruby-lang
khoa has joined #ruby-lang
jbsan has joined #ruby-lang
t35790 has quit [Remote host closed the connection]
t36845 has joined #ruby-lang
andrewhl has joined #ruby-lang
ruby-lang185 has joined #ruby-lang
khoa has quit [Quit: khoa]
khoa has joined #ruby-lang
Austin__ has joined #ruby-lang
jbsan has quit [Quit: jbsan]
<khoa> hello all
zmack has quit [Remote host closed the connection]
<judofyr> hallo
runeb- has joined #ruby-lang
runeb is now known as Guest7906
Guest7906 has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
runeb- is now known as runeb
<rue> Hello one
qwerxy_ has joined #ruby-lang
qwerxy has quit [Read error: No route to host]
mistym_ has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
jbsan has joined #ruby-lang
<khoa> I've got a question about defined? operator: https://gist.github.com/3426553
<khoa> Is James Edward Gray II on this channel ?
<khoa> please comment liberally on the gist
<injekt> no
<steveklabnik> he is not
<injekt> and working could would be nice ;)
sepp2k has quit [Remote host closed the connection]
<yorickpeterse> khoa: defined? doesn't return a string
<yorickpeterse> it returns a boolean that indicates whether or not a var is defined, thus it can never return "constant"
<khoa> yorick: i'm running ruby 1.9
<injekt> yorickpeterse: defined doesn't return a boolean
<yorickpeterse> pretty sure it just did for me
<judofyr> yorickpeterse: it doesn't return a string
<injekt> does^
<judofyr> err
bjensen has quit [Quit: bjensen]
<judofyr> *does
<injekt> silly judofyr
<yorickpeterse> Hm interesting, it doesn't returning anything but it does get evaluated in if statements
<khoa> 1.9.3-p125-perf :001 > defined? Object
<khoa> => "constant"
<yorickpeterse> defined? foo => nil
<yorickpeterse> Ah wtf
hynkle has quit [Ping timeout: 250 seconds]
<yorickpeterse> nevermind me
ezkl has joined #ruby-lang
<yorickpeterse> Somehow missed the return values
<khoa> that's because foo is not defined?
<injekt> tehe
<khoa> 1.9.3-p125-perf :002 > defined? bam
<khoa> => nil
<judofyr> khoa: defined? checks if the expression is defined. in your example the expression is a local-variable, so it will return that
<khoa> 1.9.3-p125-perf :003 > module Bam; end; defined? Bam
<khoa> => "constant"
<judofyr> khoa: defined? will only return "constant" if there's literally a constant right after it
<judofyr> defined?(foo) will either return "local-variable", "method" or nil
<judofyr> no matter what
<judofyr> because it looks at it at parse-time figures "this can either be a lvar or a method name"
m3nd3s has quit [Remote host closed the connection]
<judofyr> then the actual definedness-check is done at runtime
rolfb has quit [Quit: Linkinus - http://linkinus.com]
hynkle has joined #ruby-lang
<judofyr> it's rather magic
m3nd3s_ has joined #ruby-lang
<whitequark> yeah
<whitequark> foo() is NODE_CALL, and "foo" is NODE_VCALL
<khoa> judo: um…not 100% on what you said :(
hynkle has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 248 seconds]
bytephilia has quit [Remote host closed the connection]
bfreeman has quit [Quit: bfreeman]
Criztian has quit [Remote host closed the connection]
m3nd3s_ has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
verbad has joined #ruby-lang
dan|el has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<khoa> $ irb
<khoa> 1.9.3-p125-perf :001 > require 'delegator'
<khoa> LoadError: cannot load such file -- delegator
<khoa> can anyone think of why I can't require delegator ? Thanks
<banisterfiend> khoa: require 'forwardable'
<banisterfiend> assuming you want def_delegator
<khoa> 1.9.3-p125-perf :002 > require 'forwardable'
<khoa> => true
<khoa> 1.9.3-p125-perf :003 > defined? SimpleDelegator
<khoa> => nil
havenn has joined #ruby-lang
<khoa> ban: I want to play around with SimpleDelegator, and try to understand what judo says about defined? operator
<khoa> 1.9.3-p125-perf :004 > require 'delegate'
<khoa> => true
<khoa> do'h
<workmad3> heh
t36845 has quit [Remote host closed the connection]
bjensen has joined #ruby-lang
t63494 has joined #ruby-lang
bytephilia has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
erichmenge has joined #ruby-lang
cantonic has quit [Quit: cantonic]
t4nkd has joined #ruby-lang
runeb has quit [Remote host closed the connection]
erics has joined #ruby-lang
<khoa> updated the gist with your comments…hope you don't mind, otherwise let me know
t4nkd has quit [Client Quit]
<judofyr> khoa: defined?(exit!) returns "method", defined?(exit!.to_s) exits the program :)
Skif has quit [Ping timeout: 240 seconds]
<khoa> whoa…bat shit! anyway I can wrap my head around how defined? operator works ?
Hakon has quit [Quit: Leaving...]
<khoa> ok, there's something going on inside of SimpleDelegator
<khoa> class Normal; def bam; defined? Normal; end; end
<khoa> Normal.new.bam
<khoa> # => "constant"
zmack has joined #ruby-lang
bytephilia has quit [Ping timeout: 248 seconds]
jxie has quit [Ping timeout: 244 seconds]
wpaulson has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jxie has joined #ruby-lang
<whitequark> khoa: might have something to do with Delegator not inheriting Object but BasicObject
<zzak> looks like defined? is defined as keyword_defined in parse.y somewhere
brunocoelho has quit [Remote host closed the connection]
<zzak> i was about to suggest reading the implementation but good luck haha
<zzak> defined? is an operator
flori has quit [Remote host closed the connection]
flori has joined #ruby-lang
gnufied has joined #ruby-lang
<khoa> thanks all…I'm basically stuck at this point…going to think of another way to detect constant being defined
<khoa> inside of SimpleDelegator
<Mon_Ouie> Module#const_defined?
<khoa> mon: sweet…i'm going to try that out
VGoff is now known as VGoff_afk
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<Mon_Ouie> You can also just explicitly start from top-level using ::SomeConstant
<Mon_Ouie> You need to do that to access Object from a BasicObject subclass by default anyway
verbad has quit []
jbsan has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<khoa> Mon: brilliant! you're genius, explicit top-level trickery seems to work with defined?
robotmay has quit [Remote host closed the connection]
ryez_ has joined #ruby-lang
<zzak> interesting, i didnt realize const_defined? was defined on Module, i had used it before like: Object.const_defined?(klass)
<Mon_Ouie> Object is a Module (a Class, specifically)
abstr4ct|2 has joined #ruby-lang
<Mon_Ouie> khoa: Just a question: does it sound like "mon" is my first name? (It isn't. Being called "mon" sounds weird to me :p)
<reactormonk> Mon_Ouie: I know french, so nope
mytrile has quit [Remote host closed the connection]
<khoa> O1.9.3p0 :001 > Object.ancestors
<khoa> => [Object, Kernel, BasicObject]
<khoa> 1.9.3p0 :002 > Module.ancestors
<khoa> => [Module, Object, Kernel, BasicObject]
<khoa> sorry Mon_Ouie, my french is zilch. How should I address you?
<rue> khoa: With tab completion.
t4nkd has joined #ruby-lang
<Mon_Ouie> Why not Mon_Ouie? That's my nickname :p
<reactormonk> khoa: tab ftw!
<khoa> hehe…brilliant! I'm just lazy to type :)
<Mon_Ouie> If you want to find the class where foo.something is defined, foo.ancecstors isn't what you're looking for
<Mon_Ouie> It's foo.class.ancecstors
<khoa> ah, thanks reactormonk
<khoa> tab completion ftw!
vertroa has quit [Read error: Connection reset by peer]
<khoa> Mon_Ouie: ah thanks
jbsan has quit [Quit: jbsan]
<khoa> 1.9.3p0 :003 > Object.class.ancestors
<khoa> => [Class, Module, Object, Kernel, BasicObject]
vertroa has joined #ruby-lang
tjadc has quit [Ping timeout: 248 seconds]
<khoa> thanks guys! updated the gist https://gist.github.com/3426553
<khoa> learnt something new about ruby!
t63494 has quit [Remote host closed the connection]
t32096 has joined #ruby-lang
savage- has joined #ruby-lang
titaniumNoob has joined #ruby-lang
qwerxy_ has quit [Read error: Connection reset by peer]
ryez has quit [Ping timeout: 245 seconds]
qwerxy has joined #ruby-lang
brianpWins has joined #ruby-lang
ryez_ has quit [Ping timeout: 245 seconds]
ruby-lang185 has quit [Ping timeout: 245 seconds]
<khoa> what's the name of that :: ?
<zzak> hey, learn something new everyday
<khoa> class scope ?
<Mon_Ouie> I call it the scoping operator, not sure how it is officially called
<Mon_Ouie> (if anything)
<steveklabnik> khoa: scope resolution operator
<mistym> Anything is better than what it's called in PHP.
<zzak> what does php call it?
<mistym> T_PAAMAYIM_NEKUDOTAYIM
<Mon_Ouie> That's the name of the token from the lexer
<totallymike> ouch
<Mon_Ouie> Ruby's syntax errors are pretty hard to read too
bfreeman has joined #ruby-lang
<Mon_Ouie> And the firs google hit says they call it exactly as steveklabnik said
<Mon_Ouie> first*
<mistym> For sure, but Ruby's got nothing on that.
apeiros_ has joined #ruby-lang
<mistym> But yeah, that's fair enough. "Scope resolution operator" is a perfectly sensible English name.
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
laszlokorte_ has quit [Ping timeout: 272 seconds]
<khoa> omg, steveklabnik…I read your blogs man! Thanks for the pointer!
<steveklabnik> :)
<steveklabnik> any time
<zzak> so is ruby all ripper and bison for the lexer?
<khoa> good night all, that was a jammed packed learning lesson for me
khoa has quit [Quit: khoa]
richardjortega has joined #ruby-lang
<Mon_Ouie> ripper is just the Ruby wrapper around the bison-generated parser
headius has joined #ruby-lang
t32096 has quit [Remote host closed the connection]
t12914 has joined #ruby-lang
jbsan has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
judofyr has quit [Remote host closed the connection]
havenn has joined #ruby-lang
butchanton has joined #ruby-lang
havenn_ has joined #ruby-lang
jkprg has quit [Read error: Connection reset by peer]
jkprg has joined #ruby-lang
scampbell has joined #ruby-lang
solars has joined #ruby-lang
jbsan has quit [Quit: jbsan]
t12914 has quit [Remote host closed the connection]
t34993 has joined #ruby-lang
mrsolo has joined #ruby-lang
Criztian has joined #ruby-lang
krz has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
dan|el has quit [Ping timeout: 240 seconds]
havenn_ has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 252 seconds]
gnufied has quit [Quit: Leaving.]
hynkle has joined #ruby-lang
Guedes has joined #ruby-lang
erics has quit [Remote host closed the connection]
Skif has joined #ruby-lang
dan|el has joined #ruby-lang
gmci has joined #ruby-lang
<rue> I think double colons are probably the more common name
dous has quit [Remote host closed the connection]
sailias has joined #ruby-lang
dan|el has quit [Ping timeout: 244 seconds]
hynkle has quit []
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
titaniumNoob has quit [Read error: Connection reset by peer]
hynkle has joined #ruby-lang
alvaro_o has joined #ruby-lang
dan|el has joined #ruby-lang
poga has joined #ruby-lang
kaiwren has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
kaiwren has quit [Client Quit]
benanne has joined #ruby-lang
<apeiros_> double colons? which poor animal?!?
<steveklabnik> ::
jbsan has joined #ruby-lang
yxhvuud has joined #ruby-lang
Skif has quit [*.net *.split]
krz has quit [*.net *.split]
cid404 has quit [*.net *.split]
th3xer0 has quit [*.net *.split]
mahlon_ has quit [*.net *.split]
ged_ has quit [*.net *.split]
cout has quit [*.net *.split]
abstr4ct has quit [*.net *.split]
bluemonk has quit [*.net *.split]
VGoff_afk has quit [*.net *.split]
no_i_wont has quit [*.net *.split]
bmaland has quit [*.net *.split]
anacond109 has quit [*.net *.split]
SubSpawn has quit [*.net *.split]
gmci has quit [*.net *.split]
sailias has quit [*.net *.split]
brianpWins has quit [*.net *.split]
kvirani has quit [*.net *.split]
dRbiG has quit [*.net *.split]
joast has quit [*.net *.split]
Xzyx987X_ has quit [*.net *.split]
steez has quit [*.net *.split]
hagebake has quit [*.net *.split]
_br_ has quit [*.net *.split]
wmoxam has quit [*.net *.split]
vesan has quit [*.net *.split]
ruskie has quit [*.net *.split]
lele has quit [*.net *.split]
jordan`` has quit [*.net *.split]
Taranis has quit [*.net *.split]
jkprg has quit [*.net *.split]
vertroa has quit [*.net *.split]
t4nkd has quit [*.net *.split]
areil has quit [*.net *.split]
codewrangler has quit [*.net *.split]
bryancp has quit [*.net *.split]
sporkmonger has quit [*.net *.split]
hachiya has quit [*.net *.split]
foca has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
ttilley has quit [*.net *.split]
dmwuw has quit [*.net *.split]
imajes has quit [*.net *.split]
neocoin has quit [*.net *.split]
Nisstyre has quit [*.net *.split]
rking has quit [*.net *.split]
tris has quit [*.net *.split]
franckverrot has quit [*.net *.split]
jstemmer has quit [*.net *.split]
chris2 has quit [*.net *.split]
morticed has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
akahn has quit [*.net *.split]
akamike has quit [*.net *.split]
shaman42 has quit [*.net *.split]
khaase has quit [*.net *.split]
DEac- has quit [*.net *.split]
Kellin has quit [*.net *.split]
kartouch has quit [*.net *.split]
ddv has quit [*.net *.split]
lake has quit [*.net *.split]
a3li has quit [*.net *.split]
dju has quit [*.net *.split]
mfn has quit [*.net *.split]
Leeky has quit [*.net *.split]
theoros has quit [*.net *.split]
manveru has quit [*.net *.split]
lianj has quit [*.net *.split]
apeiros_ has quit [*.net *.split]
Austin__ has quit [*.net *.split]
x0F has quit [*.net *.split]
eban has quit [*.net *.split]
jtoy has quit [*.net *.split]
dumfries has quit [*.net *.split]
jmcphers has quit [*.net *.split]
itz has quit [*.net *.split]
musl has quit [*.net *.split]
soahccc has quit [*.net *.split]
knu has quit [*.net *.split]
pabs has quit [*.net *.split]
stepnem has quit [*.net *.split]
flebel has quit [*.net *.split]
erikh has quit [*.net *.split]
zmack has quit [*.net *.split]
tbuehlmann has quit [*.net *.split]
jaska has quit [*.net *.split]
llakey has quit [*.net *.split]
retro|cz has quit [*.net *.split]
tubbo has quit [*.net *.split]
eridani has quit [*.net *.split]
d-snp has quit [*.net *.split]
KillerFox has quit [*.net *.split]
benteaa has quit [*.net *.split]
Boohbah has quit [*.net *.split]
felipe has quit [*.net *.split]
hackeron has quit [*.net *.split]
Glass_saga has quit [*.net *.split]
iosctr has quit [*.net *.split]
jbsan has quit [*.net *.split]
dous has quit [*.net *.split]
ezkl has quit [*.net *.split]
voker57 has quit [*.net *.split]
corundum has quit [*.net *.split]
qpingu has quit [*.net *.split]
Weems has quit [*.net *.split]
publicvoid_ has quit [*.net *.split]
amdprophet has quit [*.net *.split]
achiu has quit [*.net *.split]
ReinH has quit [*.net *.split]
heftig has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
FastJack has quit [*.net *.split]
gregmoreno has quit [*.net *.split]
bnagy has quit [*.net *.split]
snuxoll has quit [*.net *.split]
cschneid has quit [*.net *.split]
drbrain has quit [*.net *.split]
JackNorris has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
Criztian has quit [*.net *.split]
chendo_ has quit [*.net *.split]
mephux has quit [*.net *.split]
corsican has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
dreamhawk has quit [*.net *.split]
agib has quit [*.net *.split]
shyouhei has quit [*.net *.split]
schroedinbug has quit [*.net *.split]
rails has quit [*.net *.split]
jupito has quit [*.net *.split]
darix has quit [*.net *.split]
jperry2 has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
dan|el has quit [*.net *.split]
benanne has quit [*.net *.split]
joschi has quit [*.net *.split]
flori has quit [*.net *.split]
havenn has quit [*.net *.split]
Asher1 has quit [*.net *.split]
thone_ has quit [*.net *.split]
kuja has quit [*.net *.split]
wycats has quit [*.net *.split]
cldwalker has quit [*.net *.split]
lzhz_ has quit [*.net *.split]
Stereoki1sune has quit [*.net *.split]
FiXato has quit [*.net *.split]
matti has quit [*.net *.split]
th_ has quit [*.net *.split]
valeri_ufo has quit [*.net *.split]
jaimef has quit [*.net *.split]
mtkd_ has quit [*.net *.split]
Bwild has quit [*.net *.split]
sj26 has quit [*.net *.split]
Caius has quit [*.net *.split]
blowmage has quit [*.net *.split]
kke has quit [*.net *.split]
ammar has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
jamo has quit [*.net *.split]
mistym has quit [*.net *.split]
bjensen has quit [*.net *.split]
ramonmaruko has quit [*.net *.split]
denysonique has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
alexkane has quit [*.net *.split]
manuw has quit [*.net *.split]
certainty has quit [*.net *.split]
zenspider has quit [*.net *.split]
Guedes has quit [*.net *.split]
gsav has quit [*.net *.split]
dvorak has quit [*.net *.split]
CoverSlide has quit [*.net *.split]
threedaymonk has quit [*.net *.split]
adgar has quit [*.net *.split]
injekt has quit [*.net *.split]
whitequark has quit [*.net *.split]
rhizmoe has quit [*.net *.split]
znz_jp has quit [*.net *.split]
aef has quit [*.net *.split]
ioga_wrk has quit [*.net *.split]
ahf has quit [*.net *.split]
ironcamel has quit [*.net *.split]
bfreeman has quit [*.net *.split]
kain has quit [*.net *.split]
Defusal has quit [*.net *.split]
s0ber has quit [*.net *.split]
relix has quit [*.net *.split]
mccraig has quit [*.net *.split]
anildigital_work has quit [*.net *.split]
levifig has quit [*.net *.split]
hinbody has quit [*.net *.split]
melter has quit [*.net *.split]
kith has quit [*.net *.split]
eric-wood has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
sphera has quit [*.net *.split]
rtl has quit [*.net *.split]
jammi has quit [*.net *.split]
epitron has quit [*.net *.split]
conceal_rs_ has quit [*.net *.split]
kaz_ has quit [*.net *.split]
_ko1 has quit [*.net *.split]
Kero has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
mksm has quit [*.net *.split]
hynkle has quit [*.net *.split]
butchanton has quit [*.net *.split]
totallymike has quit [*.net *.split]
crankharder has quit [*.net *.split]
countdigi has quit [*.net *.split]
matled has quit [*.net *.split]
ddfreyne has quit [*.net *.split]
andrewvos has quit [*.net *.split]
ixx has quit [*.net *.split]
Mchl has quit [*.net *.split]
kvs has quit [*.net *.split]
lantins has quit [*.net *.split]
levicole has quit [*.net *.split]
yellow5 has quit [*.net *.split]
s0ra_h has quit [*.net *.split]
freedrull has quit [*.net *.split]
weeb1e_ has quit [*.net *.split]
dhoss has quit [*.net *.split]
poga has quit [*.net *.split]
t34993 has quit [*.net *.split]
solars has quit [*.net *.split]
jxie has quit [*.net *.split]
richardjortega has quit [*.net *.split]
workmad3 has quit [*.net *.split]
adambeynon has quit [*.net *.split]
kirin` has quit [*.net *.split]
gurps has quit [*.net *.split]
S1kx has quit [*.net *.split]
ryland_ has quit [*.net *.split]
snk has quit [*.net *.split]
hipe has quit [*.net *.split]
meise has quit [*.net *.split]
shajith_ has quit [*.net *.split]
lucas_ has quit [*.net *.split]
mihar has quit [*.net *.split]
yorickpeterse has quit [*.net *.split]
dagobah has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
nick_h has quit [*.net *.split]
znouza has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
dabradley has quit [*.net *.split]
major_majors has quit [*.net *.split]
tsou has quit [*.net *.split]
thorncp has quit [*.net *.split]
perryh has quit [*.net *.split]
davidbalbert has quit [*.net *.split]
headius has quit [*.net *.split]
naz has quit [*.net *.split]
anekos has quit [*.net *.split]
gentz has quit [*.net *.split]
spuk has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
oddmunds has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
bougyman has quit [*.net *.split]
hramrach has quit [*.net *.split]
reactormonk has quit [*.net *.split]
setmeaway has quit [*.net *.split]
Muz has quit [*.net *.split]
ohsix has quit [*.net *.split]
bryanl has quit [*.net *.split]
beawesomeinstead has quit [*.net *.split]
jarib has quit [*.net *.split]
msch has quit [*.net *.split]
anildigital has quit [*.net *.split]
djinni`_ has quit [*.net *.split]
jayne has quit [*.net *.split]
neurodamage has quit [*.net *.split]
jwollert has quit [*.net *.split]
alvaro_o has quit [*.net *.split]
ange has quit [*.net *.split]
qwerxy has quit [*.net *.split]
abstr4ct|2 has quit [*.net *.split]
andrewhl has quit [*.net *.split]
diegoviola has quit [*.net *.split]
rippa has quit [*.net *.split]
dejongge has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
EvilJStoker has quit [*.net *.split]
babinho has quit [*.net *.split]
LanceHaig has quit [*.net *.split]
[dmp] has quit [*.net *.split]
masterkorp has quit [*.net *.split]
ltd has quit [*.net *.split]
icooba has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
just4dos has quit [*.net *.split]
zzak has quit [*.net *.split]
zigidias_ has quit [*.net *.split]
amerine has quit [*.net *.split]
lteo has quit [*.net *.split]
mitchty has quit [*.net *.split]
tef has quit [*.net *.split]
scampbell has quit [*.net *.split]
savage- has quit [*.net *.split]
erichmenge has quit [*.net *.split]
Jay_Levitt has quit [*.net *.split]
Guest78690 has quit [*.net *.split]
singpolyma has quit [*.net *.split]
fish_ has quit [*.net *.split]
cyndis_ has quit [*.net *.split]
spectra has quit [*.net *.split]
epitron_ has quit [*.net *.split]
dominikh has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
dbussink has quit [*.net *.split]
devn has quit [*.net *.split]
zigidias has joined #ruby-lang
t32014 has joined #ruby-lang
Kuukunen has joined #ruby-lang
conceal_rs_ has joined #ruby-lang
ioga_wrk has joined #ruby-lang
sphera has joined #ruby-lang
ahf has joined #ruby-lang
joschi has joined #ruby-lang
hackeron has joined #ruby-lang
ironcamel has joined #ruby-lang
epitron has joined #ruby-lang
felipe has joined #ruby-lang
iosctr has joined #ruby-lang
theoros has joined #ruby-lang
aef has joined #ruby-lang
jammi has joined #ruby-lang
lianj has joined #ruby-lang
manveru has joined #ruby-lang
Leeky_afk has joined #ruby-lang
gianlucadv has joined #ruby-lang
mksm has joined #ruby-lang
mtkd_ has joined #ruby-lang
_ko1 has joined #ruby-lang
Bwild has joined #ruby-lang
Kero has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
kke has joined #ruby-lang
kaz_ has joined #ruby-lang
certainty has joined #ruby-lang
Caius has joined #ruby-lang
blowmage has joined #ruby-lang
ammar has joined #ruby-lang
sj26 has joined #ruby-lang
dju has joined #ruby-lang
yeltzooo7 has joined #ruby-lang
Boohbah has joined #ruby-lang
flebel has joined #ruby-lang
kith has joined #ruby-lang
ddv has joined #ruby-lang
mfn has joined #ruby-lang
jaimef has joined #ruby-lang
valeri_ufo has joined #ruby-lang
zenspider has joined #ruby-lang
a3li has joined #ruby-lang
stepnem has joined #ruby-lang
lake has joined #ruby-lang
kartouch has joined #ruby-lang
jamo has joined #ruby-lang
jstemmer has joined #ruby-lang
znz_jp has joined #ruby-lang
jupito has joined #ruby-lang
eric-wood has joined #ruby-lang
morticed has joined #ruby-lang
jperry2 has joined #ruby-lang
th_ has joined #ruby-lang
benteaa has joined #ruby-lang
darix has joined #ruby-lang
matti has joined #ruby-lang
pabs has joined #ruby-lang
knu has joined #ruby-lang
chris2 has joined #ruby-lang
erikh has joined #ruby-lang
drbrain has joined #ruby-lang
melter has joined #ruby-lang
Taranis has joined #ruby-lang
cschneid has joined #ruby-lang
Kellin has joined #ruby-lang
snuxoll has joined #ruby-lang
hinbody has joined #ruby-lang
JackNorris has joined #ruby-lang
shyouhei has joined #ruby-lang
rails has joined #ruby-lang
schroedinbug has joined #ruby-lang
soahccc has joined #ruby-lang
shaman42 has joined #ruby-lang
FiXato has joined #ruby-lang
DEac- has joined #ruby-lang
alexkane has joined #ruby-lang
manuw has joined #ruby-lang
adgar has joined #ruby-lang
whitequark has joined #ruby-lang
KillerFox has joined #ruby-lang
jordan`` has joined #ruby-lang
bnagy has joined #ruby-lang
lzhz_ has joined #ruby-lang
musl has joined #ruby-lang
injekt has joined #ruby-lang
Stereoki1sune has joined #ruby-lang
threedaymonk has joined #ruby-lang
wycats has joined #ruby-lang
levifig has joined #ruby-lang
akamike has joined #ruby-lang
Dreamer3 has joined #ruby-lang
franckverrot has joined #ruby-lang
cldwalker has joined #ruby-lang
mccraig has joined #ruby-lang
denysonique has joined #ruby-lang
relix has joined #ruby-lang
anildigital_work has joined #ruby-lang
Spaceghostc2c has joined #ruby-lang
itz has joined #ruby-lang
gregmoreno has joined #ruby-lang
ReinH has joined #ruby-lang
voker57 has joined #ruby-lang
eridani has joined #ruby-lang
dumfries has joined #ruby-lang
agib has joined #ruby-lang
vesan has joined #ruby-lang
sporkmonger has joined #ruby-lang
kain has joined #ruby-lang
rhizmoe has joined #ruby-lang
Weems has joined #ruby-lang
jaska has joined #ruby-lang
Glass_saga has joined #ruby-lang
FastJack has joined #ruby-lang
areil has joined #ruby-lang
jmcphers has joined #ruby-lang
CoverSlide has joined #ruby-lang
neocoin has joined #ruby-lang
bryancp has joined #ruby-lang
bjensen has joined #ruby-lang
chendo_ has joined #ruby-lang
lele has joined #ruby-lang
Nisstyre has joined #ruby-lang
dmwuw has joined #ruby-lang
llakey has joined #ruby-lang
akahn has joined #ruby-lang
bfreeman has joined #ruby-lang
flori has joined #ruby-lang
achiu has joined #ruby-lang
retro|cz has joined #ruby-lang
s0ber has joined #ruby-lang
tubbo has joined #ruby-lang
heftig has joined #ruby-lang
mistym has joined #ruby-lang
Y_Ichiro has joined #ruby-lang
mephux has joined #ruby-lang
tris has joined #ruby-lang
khaase has joined #ruby-lang
Criztian has joined #ruby-lang
Asher1 has joined #ruby-lang
qpingu has joined #ruby-lang
dvorak has joined #ruby-lang
rtl has joined #ruby-lang
hachiya has joined #ruby-lang
x0F has joined #ruby-lang
kuja has joined #ruby-lang
Austin__ has joined #ruby-lang
zmack has joined #ruby-lang
corsican has joined #ruby-lang
apeiros_ has joined #ruby-lang
havenn has joined #ruby-lang
robbyoconnor has joined #ruby-lang
ttilley has joined #ruby-lang
gsav has joined #ruby-lang
jtoy has joined #ruby-lang
benanne has joined #ruby-lang
jbsan has joined #ruby-lang
ramonmaruko has joined #ruby-lang
vertroa has joined #ruby-lang
tbuehlmann has joined #ruby-lang
ezkl has joined #ruby-lang
ruskie has joined #ruby-lang
Guedes has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
dreamhawk has joined #ruby-lang
rking has joined #ruby-lang
thone_ has joined #ruby-lang
eban has joined #ruby-lang
codewrangler has joined #ruby-lang
banisterfiend has joined #ruby-lang
publicvoid_ has joined #ruby-lang
abstr4ct|3 has joined #ruby-lang
amdprophet has joined #ruby-lang
t4nkd has joined #ruby-lang
d-snp has joined #ruby-lang
Defusal has joined #ruby-lang
andrewhl_ has joined #ruby-lang
flak has joined #ruby-lang
corundum has joined #ruby-lang
foca has joined #ruby-lang
tef_ has joined #ruby-lang
jkprg has joined #ruby-lang
imajes has joined #ruby-lang
VGoffl has joined #ruby-lang
diegovio1a has joined #ruby-lang
pcboy__ has joined #ruby-lang
bmaland_ has joined #ruby-lang
babinho_ has joined #ruby-lang
bluemonk_ has joined #ruby-lang
cout_ has joined #ruby-lang
naz has joined #ruby-lang
masterkorp1 has joined #ruby-lang
cid^ has joined #ruby-lang
headius has joined #ruby-lang
lteo_ has joined #ruby-lang
ltd- has joined #ruby-lang
just4dos_ has joined #ruby-lang
[dmp]_ has joined #ruby-lang
mitchty_ has joined #ruby-lang
anekos has joined #ruby-lang
dan|el has joined #ruby-lang
gentz has joined #ruby-lang
TorpedoSkyline has joined #ruby-lang
spuk has joined #ruby-lang
oddmunds has joined #ruby-lang
jmeeuwen has joined #ruby-lang
bougyman has joined #ruby-lang
dous has joined #ruby-lang
kirin` has joined #ruby-lang
amerine_ has joined #ruby-lang
hynkle has joined #ruby-lang
butchanton has joined #ruby-lang
totallymike has joined #ruby-lang
countdigi has joined #ruby-lang
Mchl has joined #ruby-lang
matled has joined #ruby-lang
crankharder has joined #ruby-lang
kvs has joined #ruby-lang
andrewvos has joined #ruby-lang
lantins has joined #ruby-lang
ixx has joined #ruby-lang
levicole has joined #ruby-lang
ddfreyne has joined #ruby-lang
s0ra_h has joined #ruby-lang
yellow5 has joined #ruby-lang
weeb1e_ has joined #ruby-lang
freedrull has joined #ruby-lang
LanceHaig has joined #ruby-lang
dhoss has joined #ruby-lang
zzak has joined #ruby-lang
scampbell has joined #ruby-lang
savage- has joined #ruby-lang
erichmenge has joined #ruby-lang
Guest78690 has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
singpolyma has joined #ruby-lang
fish_ has joined #ruby-lang
cyndis_ has joined #ruby-lang
spectra has joined #ruby-lang
epitron_ has joined #ruby-lang
dominikh has joined #ruby-lang
dbussink has joined #ruby-lang
devn has joined #ruby-lang
samuelkadolph has joined #ruby-lang
hramrach has joined #ruby-lang
msch has joined #ruby-lang
Muz has joined #ruby-lang
neurodamage has joined #ruby-lang
bryanl has joined #ruby-lang
setmeaway has joined #ruby-lang
ange has joined #ruby-lang
jayne has joined #ruby-lang
jwollert has joined #ruby-lang
ohsix has joined #ruby-lang
jarib has joined #ruby-lang
djinni`_ has joined #ruby-lang
anildigital has joined #ruby-lang
reactormonk has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
th3xer0_ has joined #ruby-lang
dRbiG has joined #ruby-lang
Xzyx987X_ has joined #ruby-lang
joast has joined #ruby-lang
steez has joined #ruby-lang
wmoxam has joined #ruby-lang
brianpWins has joined #ruby-lang
gmci has joined #ruby-lang
hagebake has joined #ruby-lang
kvirani has joined #ruby-lang
no_i_wont_ has joined #ruby-lang
SubSpawnLnx has joined #ruby-lang
sailias has joined #ruby-lang
t32014 has quit [Remote host closed the connection]
davidbalbert has joined #ruby-lang
perryh has joined #ruby-lang
thorncp has joined #ruby-lang
hipe has joined #ruby-lang
poga has joined #ruby-lang
snk has joined #ruby-lang
gurps has joined #ruby-lang
lucas_ has joined #ruby-lang
jxie has joined #ruby-lang
shajith_ has joined #ruby-lang
ryland_ has joined #ruby-lang
S1kx has joined #ruby-lang
meise has joined #ruby-lang
richardjortega has joined #ruby-lang
solars has joined #ruby-lang
znouza has joined #ruby-lang
dagobah has joined #ruby-lang
yugui_zzz has joined #ruby-lang
major_majors has joined #ruby-lang
adambeynon has joined #ruby-lang
zz_chrismcg has joined #ruby-lang
yorickpeterse has joined #ruby-lang
nick_h has joined #ruby-lang
dabradley has joined #ruby-lang
tsou has joined #ruby-lang
mihar has joined #ruby-lang
dan|el has quit [Ping timeout: 252 seconds]
th3xer0_ has quit [Quit: leaving]
sailias has quit [Ping timeout: 260 seconds]
[dmp]_ has quit [*.net *.split]
headius has quit [*.net *.split]
naz has quit [*.net *.split]
anekos has quit [*.net *.split]
gentz has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
spuk has quit [*.net *.split]
oddmunds has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
bougyman has quit [*.net *.split]
alvaro_o has joined #ruby-lang
[dmp]_ has joined #ruby-lang
bougyman has joined #ruby-lang
headius has joined #ruby-lang
TorpedoSkyline has joined #ruby-lang
naz has joined #ruby-lang
anekos has joined #ruby-lang
jmeeuwen has joined #ruby-lang
spuk has joined #ruby-lang
oddmunds has joined #ruby-lang
gentz has joined #ruby-lang
hynkle has quit []
hynkle has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
hahuang65 has joined #ruby-lang
dous has quit [Remote host closed the connection]
hynkle has left #ruby-lang [#ruby-lang]
sailias has joined #ruby-lang
jkprg has quit [Read error: Connection reset by peer]
<drbrain> fun fact! leading double colons are called COLON3 in ruby's parser!
jkprg has joined #ruby-lang
towski has joined #ruby-lang
<mistym> Double-colon is 3. Gotcha. ;)
<drbrain> there's also COLON2 where you put :: in the middle of two things
neocoin has quit [Remote host closed the connection]
t4nkd has quit [Quit: Leaving...]
mrsolo has quit [Quit: This computer has gone to sleep]
EvilJStoker has joined #ruby-lang
tsou has quit [Quit: rbt]
mrsolo has joined #ruby-lang
nibbo has joined #ruby-lang
t4nkd has joined #ruby-lang
nibbo has quit [Client Quit]
nibbo has joined #ruby-lang
nibbo has quit [Client Quit]
sailias has quit [Quit: Leaving.]
postmodern has joined #ruby-lang
nibbo has joined #ruby-lang
tjadc has joined #ruby-lang
LanceHaig has quit [Quit: I shouldn't really be here - dircproxy 1.0.5]
LanceHaig has joined #ruby-lang
danishman has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
nibbo has quit [Quit: leaving]
ged has joined #ruby-lang
Skif has joined #ruby-lang
verbad has joined #ruby-lang
t85553 has joined #ruby-lang
Marc3000 has joined #ruby-lang
_br_ has joined #ruby-lang
anaconda99 has joined #ruby-lang
justinseiter has joined #ruby-lang
areil has quit [Remote host closed the connection]
t85553 has quit [Remote host closed the connection]
[dmp]_ has left #ruby-lang [#ruby-lang]
t66829 has joined #ruby-lang
verbad has quit []
Tearan has joined #ruby-lang
rolfb has joined #ruby-lang
rippa has joined #ruby-lang
tjadc has quit [Read error: Connection reset by peer]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
flak has quit [Ping timeout: 272 seconds]
Jay_Levitt has quit [Read error: Operation timed out]
dan|el has joined #ruby-lang
tsou has joined #ruby-lang
t4nkd has quit [Ping timeout: 244 seconds]
Criztian has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 252 seconds]
Criztian has joined #ruby-lang
nibbo has joined #ruby-lang
wallerdev has joined #ruby-lang
Tearan has quit [Quit: Sleepy Badger....]
jtoy has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
sockmonk has joined #ruby-lang
mrsolo has joined #ruby-lang
yats has joined #ruby-lang
jkprg has quit [Quit: jkprg]
nibbo has quit [Quit: leaving]
t66829 has quit [Remote host closed the connection]
t57089 has joined #ruby-lang
sailias has joined #ruby-lang
dous has joined #ruby-lang
qwerxy has joined #ruby-lang
nibbo has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
dous has quit [Ping timeout: 246 seconds]
headius has quit [Quit: headius]
yats has quit [Quit: Leaving]
yats has joined #ruby-lang
yats has quit [Remote host closed the connection]
yats has joined #ruby-lang
sailias has joined #ruby-lang
headius has joined #ruby-lang
yats has quit [Client Quit]
yats has joined #ruby-lang
jtoy_ has joined #ruby-lang
tubbo has quit [Remote host closed the connection]
beawesomeinstead has quit [Remote host closed the connection]
anildigital_work has quit [Read error: Connection reset by peer]
franckverrot has quit [Read error: Connection reset by peer]
denysonique has quit [Read error: Connection reset by peer]
tubbo has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
yats has joined #ruby-lang
towski has quit [Remote host closed the connection]
krz has joined #ruby-lang
pabloh has joined #ruby-lang
jtoy has quit [Ping timeout: 260 seconds]
beawesomeinstead has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby-lang
yats has quit [Client Quit]
franckverrot has joined #ruby-lang
enroxorz-work is now known as JohnRedcorn
rolfb has quit [Read error: Connection reset by peer]
rolfb has joined #ruby-lang
JohnRedcorn has left #ruby-lang ["Leaving"]
carloslopes has joined #ruby-lang
jordan`` has left #ruby-lang [#ruby-lang]
fgomez has joined #ruby-lang
tonni has joined #ruby-lang
anildigital_work has joined #ruby-lang
totallymike has quit [Quit: WeeChat 0.3.7]
brunocoelho has joined #ruby-lang
dhruvasagar has joined #ruby-lang
yats has joined #ruby-lang
masterkorp1 has left #ruby-lang [#ruby-lang]
t4nkd has joined #ruby-lang
t57089 has quit [Remote host closed the connection]
t41372 has joined #ruby-lang
Tearan has joined #ruby-lang
Tearan has quit [Client Quit]
denysonique has joined #ruby-lang
sailias has quit [Quit: Leaving.]
DEac- has quit [Ping timeout: 246 seconds]
t4nkd has quit [Quit: Linkinus - http://linkinus.com]
jordan` has joined #ruby-lang
EzeQL has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
kvirani has joined #ruby-lang
Jay_Levitt has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
qwerxy has quit [Quit: offski]
Hakon has joined #ruby-lang
Austin__ has quit [Quit: Leaving.]
banisterfiend has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
lteo_ has left #ruby-lang [#ruby-lang]
Criztian has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby-lang
dous has joined #ruby-lang
danishman has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
ivanoats has joined #ruby-lang
dfr|mac has joined #ruby-lang
dous has quit [Ping timeout: 245 seconds]
sailias has joined #ruby-lang
zmack has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
ilyam has joined #ruby-lang
Leeky_afk is now known as Leeky
burgestrand has joined #ruby-lang
banisterfiend has joined #ruby-lang
fgomez has quit [Ping timeout: 244 seconds]
Axsuul has joined #ruby-lang
Leeky is now known as Leeky_afk
publicvoid__ has joined #ruby-lang
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
codewrangler has joined #ruby-lang
workmad3 has joined #ruby-lang
publicvoid_ has quit [Ping timeout: 245 seconds]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
elux has joined #ruby-lang
<Defusal> <internal:prelude>:8:in `lock': deadlock; recursive locking (ThreadError) -- is the end of me
<apeiros_> m=Mutex.new; m.synchronize do m.synchronize do puts "hi" end end
<apeiros_> ThreadError: deadlock; recursive locking
<apeiros_> it happens when you synchronize over the same mutex within the same thread, while already holding the lock
bjensen has quit [Quit: bjensen]
<erikh> it happens anytime you try to acquire a lock while another lock is active
<erikh> IIRC
<Defusal> apeiros_, except that that isn't exactly the issue
<rue> apeiros_: The method should probably check that…
<apeiros_> rue: I'd prefer Mutex being reentrant
<Defusal> i don't know the exact cause, but it is basically when too much is going on
<Defusal> this is a single threaded EM application
<rue> erikh: In this case, the error message implies apeiros_’ case
<Defusal> i need to set limits and queues for spawning processes
<erikh> rue: ah
<rue> Of course it might be *wrong*, but you know :)
<erikh> still getting my head around this stuff.
<erikh> no, you're probably right
<Defusal> if it spawns too many processes and opens too many pipes in the single thread, that happens
<Defusal> very odd.
<rue> apeiros_: There’s that, yes
<apeiros_> erikh: hm? you should be able to acquire multiple locks just fine…
<erikh> ok, I'm willing to concede I'm wrong, heh
<apeiros_> m=Mutex.new; m2=Mutex.new; m.synchronize do m2.synchronize do puts "hi" end end # -> hi
<erikh> please stop the beatings
<erikh> :P
<apeiros_> :)
<apeiros_> can't beat anybody
<apeiros_> still got mushy fingers
<erikh> you should try adding some bones
<apeiros_> but they're healing pleasingly fast
<apeiros_> nah, the bones are fine. the flesh is off.
<erikh> ow
<erikh> ow ow ow ow
<apeiros_> not that bad
<erikh> what in blazes did you do?
t41372 has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
<apeiros_> jumped over the sofa
t1806 has joined #ruby-lang
<apeiros_> underestimated how high I can jump and what the ceiling does to my fingers :D
<erikh> well played sir
<Defusal> deadlock; recursive locking\n<internal:prelude>:8:in `lock'\n<internal:prelude>:8:in `synchronize'\n/usr/local/lib/ruby/gems/1.9.1/gems/rufus-scheduler-2.0.17/lib/rufus/sc/jobqueues.rb:68:in `<<'\n/usr/local/lib/ruby/gems/1.9.1/gems/rufus-scheduler-2.0.17/lib/rufus/sc/scheduler.rb:378:in `add_job'\n/usr/local/lib/ruby/gems/1.9.1/gems/rufus-scheduler-2.0.17/lib/rufus/sc/scheduler.rb:135:in
<Defusal> `in'
<Defusal> that is a library bug?
<apeiros_> I think that kind of plaster/roughcast is not commonly used in the US
banisterfiend has joined #ruby-lang
<Defusal> god, im so screwed
<Defusal> this couldnt have happened at a worse time, or to a more important application
<apeiros_> Defusal: the interesting thing is that it happens in the prelude
<apeiros_> I think drbrain is the most likely person to be of any help here
<drbrain> apeiros_: modern construction does not use rough surface treatment
<apeiros_> drbrain: in europe, we do have that for walls/ceilings
<drbrain> the house I grew up in would take off my skin every time I forgot how rough it was
<apeiros_> this apartment was built 2y ago
<drbrain> Defusal: there are some Mutex features provided in the prelude
woollyams has joined #ruby-lang
<rue> Defusal: How many is too many?
hakunin has joined #ruby-lang
<drbrain> Defusal: maybe you're locking recursively?
<rue> apeiros_: The ripply surface on the ceiling?
dejongge has joined #ruby-lang
<Defusal> drbrain, im going to add queues and limits as quickly as possible
<apeiros_> rue: yes
<Defusal> the only thing i can think of is that its hitting some sort of limit
Dwarf has joined #ruby-lang
<Defusal> doing too much at once
DEac- has joined #ruby-lang
totallymike has joined #ruby-lang
<rue> apeiros_: Pretty common here too, even in new construction. I assume it has some kind of actual purpose
<apeiros_> I think it's more pleasing to the eye than flat surface
<apeiros_> but no idea really
woollyams has quit [Client Quit]
<drbrain> Defusal: deadlocking is not about limits
<drbrain> since the message is "recursive locking", you seem to be doing this:
<drbrain> m = Mutex.new; m.lock; m.lock
<Defusal> just trust me when i say i am not
<Defusal> its a single threaded EM application
<Defusal> if anything is deadlocking, its that gem
<Defusal> that i pasted the backtrace of above
<apeiros_> scheduler sounds like something that would use threads
<drbrain> yeah
<Defusal> its using EM
<apeiros_> Defusal: also threads don't play well with EM afaik
<Defusal> its using the EM scheduler for it
<apeiros_> *it's
<apeiros_> hm,k
elux has quit [Quit: Bye!]
Carly- has joined #ruby-lang
Carly- has left #ruby-lang [#ruby-lang]
<rue> I wouldn’t put it past them to have problems
<Defusal> i have to fix thisw very quickly
<Defusal> tons of people services are not down
yats has quit [Ping timeout: 265 seconds]
<rue> So what changed?
<rue> Did you make a change, or just add load?
<Defusal> pretty much load
<Defusal> i thought it was mongos driver causing the deadlock
<Defusal> so i replaced the models with classes
<Defusal> now the issue happens more
<Defusal> because mongo doesnt slow it down
<rue> Oh wow, that just *looks* bad
<drbrain> Defusal: do you have any jobs that add jobs?
<drbrain> Defusal: can you show the whole backtrace?
tenderlove has joined #ruby-lang
<Defusal> drbrain, it has a threaded and EM based scheduler
EvilJStoker is now known as Guest85819
EzeQL is now known as Guest59132
totallymike is now known as Guest75945
tubbo is now known as Guest82894
denysonique is now known as Guest68848
ged is now known as Guest92060
dhruvasagar is now known as Guest79461
<Defusal> im using the EM one
havenn has joined #ruby-lang
<Defusal> the above backtrace is everything until it reaches my code
t1806 has quit [Remote host closed the connection]
<richardjortega> anyone know a good method for removing substrings from beginning and end of a string, if you know the substring at the beginning and end
andrewhl_ has quit [Remote host closed the connection]
<richardjortega> of a string
<drbrain> Defusal: when you're adding the job (the deadlock point) the mutex was previously locked
<Defusal> in a single threaded application..
Dwarf has left #ruby-lang [#ruby-lang]
<Defusal> sounds like the EM scheduler in that gem still uses threads
Dwarf has joined #ruby-lang
<drbrain> so either something in your backtrace will show why that could be
<Defusal> which is terrible if that is the case
<Defusal> ohhh
benanne has quit [Read error: Connection reset by peer]
<Dwarf> Hello, could anyone assist me on something?
<drbrain> ooh, I crashe Safari!
<Defusal> it must be related to signals
<Defusal> im going to paste you the full backtrace
<drbrain> … or there's something extra weird going on
<Dwarf> I am quite new to ruby but I was wondering how I would skip the first x number of words in a string?
<lianj> Defusal: do you want to run the jobs in a thread or in em's mainloop thread?
<Defusal> drbrain, http://pastie.org/4570319
<drbrain> Dwarf: how do you determine a word in your code?
<Defusal> lianj, jobs are executed in the EM eventloop
<Defusal> drbrain, i hope you can help :|
<Dwarf> Pardon?
<drbrain> Defusal: yup, you have a job that adds a job recursively
<Dwarf> I'm sorry my english isn't too good so could you clarify it more?
<Defusal> drbrain, but how
<Defusal> how can it do that, it's single threaded, it can't be a race condition
<Dwarf> Wait I'll make you an example :)
<Defusal> yet it acts like one
<drbrain> Dwarf: excellent
<Defusal> it works until theres too much load
<drbrain> Defusal: what is process_manager/lib/modules/base.rb:29 ?
<lianj> Defusal: if it uses the branches there EM.defer is called it uses threads
Guest85819 has quit [Changing host]
Guest85819 has joined #ruby-lang
zigidias has quit [Changing host]
zigidias has joined #ruby-lang
<richardjortega> i have a string - "http://www.example.com/subtextineed?blahblah", would like "subtextineed" returned
krz has quit [Changing host]
krz has joined #ruby-lang
<Defusal> drbrain, the base module of every module
<Defusal> lianj, it should not call EM.defer.
* Defusal breathes
<Dwarf> drbrain: :Dwarf!jesus@index.php PRIVMSG #chat :!say #chat Hello world, and I want to skip it all the way to #chat
<Defusal> why did this have to hgappen now :(
<drbrain> Defusal: I mean, it's got "signal" there, is that a signal handler?
<lianj> Defusal: should or does :)
<Dwarf> I already have the incoming text in an array
<Defusal> drbrain, yes
<Dwarf> But also as a string
<drbrain> Dwarf: try Array#drop then
<Dwarf> Isn't it easier to just use the string?
<Defusal> drbrain: Signal.trap(sig) do EM.schedule { signal(sig) } end
<Defusal> that is causing the issue
<drbrain> Defusal: and I imagine your signal handler does everything Right Now?
t59678 has joined #ruby-lang
<Defusal> but i have no idea how to solve it
<Mon_Ouie> richardjortega: Is that substring guaranteed to be present?
<Mon_Ouie> If so you can just remove the n first and n last characters
<Defusal> drbrain, it schedules it in the EM thread as you can see, but that can do it immediately, not in next tick
<Defusal> drbrain, does it need to be next tick? i doubt that would help?
Axsuul has quit [Remote host closed the connection]
<drbrain> Defusal: if signals are delivered to fast your signal handler will be invoked on top of itself
<Mon_Ouie> I'd use the URI module for that
<drbrain> if you're unlucky, it's during job-adding which results in the deadlock
<Defusal> drbrain, that is the problem, but what is the solution :|
<Defusal> there must be a solution
<Defusal> else this always stands a chance of happening
Axsuul has joined #ruby-lang
<lianj> richardjortega: ruby -ruri -e 'p URI.parse("http://www.example.com/subtextineed?blahblah").query'
<Defusal> which means no application can handle CLD process signals?
<drbrain> Defusal: can you change the signal handler to append to an array which is handled inside the regular event loop?
rippa has quit [Ping timeout: 276 seconds]
Asher1 has joined #ruby-lang
<Mon_Ouie> Except he wants #path (just without the leading slash): URI.parse("http://www.example.com/subtextineed?blahblah").path
<drbrain> … and just toggle a flag that says "empty the pending signals array"?
<Defusal> drbrain, if that will solve it?
<Defusal> then it'll need a mutex?
<Defusal> i have done 0 threading synchronization in ruby
<Defusal> i use EM for everything
<richardjortega> lianj: let me try that out
<Defusal> i really don't know enough about signal handlers :/
<lianj> if you are talking about signals with rufus, it doesnt sound like its using EmScheduler
<drbrain> in CRuby you won't need extra locking
Criztian_ has quit []
<Defusal> drbrain, if it appends to an array, does it need need synchronization?
<drbrain> also, does EM have any signal handling so you can get this for free?
pabloh has quit [Quit: Ex-Chat]
<Defusal> lianj, the signals are not related to rufus
<drbrain> Defusal: in MRI, no
icooba has joined #ruby-lang
<lianj> Defusal: ah ok
Criztian has joined #ruby-lang
pabloh has joined #ruby-lang
<Defusal> drbrain, EM does not
<drbrain> Defusal: if you want to be safe, use a Queue instead of an Array
<lianj> Defusal: also, try passing :blocking => true to every job
<Defusal> drbrain, ok thanks, doing so right now
Asher has quit [Ping timeout: 252 seconds]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<richardjortega> Mon_Ouie: ruby -ruri -e 'p URI.parse("http://www.example.com/subtextineed?blahblah").path' returns "/subtextineed" with leading slash
dan|el has quit [Ping timeout: 276 seconds]
dfr|mac has quit [Remote host closed the connection]
<drbrain> Dwarf: I would convert a String into an Array first
<Dwarf> I have that already
banisterfiend has quit [Read error: Connection reset by peer]
<pabloh> anybody with experience modifying an excel or ods file from ruby code?
<Dwarf> So that is the easiest way of doing things?
<drbrain> Dwarf: I think so
<drbrain> Dwarf: there are ways to do it with String#sub, though
banisterfiend has joined #ruby-lang
<Dwarf> Mmm
<richardjortega> Mon_Ouie: then i could just do string.[1..-1] to take out leading slash
<Dwarf> I'll look into both of them
<rue> If it’s an actual URI, then using URI is a great idea
dous has quit [Ping timeout: 246 seconds]
<lianj> Mon_Ouie: oh, youre right, misread his question :|
Dwarf has quit [Changing host]
Dwarf has joined #ruby-lang
<richardjortega> thank you lianj and Mon_Ouie
benanne has joined #ruby-lang
<richardjortega> to take out the leading slash, is best recommended just to use string[1..-1] ?
<Mon_Ouie> That's fine
dan|el has joined #ruby-lang
DEac- has quit [Ping timeout: 240 seconds]
<richardjortega> thanks
<Dwarf> drbrain, just a quick question, if I do variable.sub!(/[something]/, '*'), it will work on variable itself?
dabradley has quit [Ping timeout: 246 seconds]
<drbrain> yes it will
<Dwarf> Sweet
<Dwarf> Starting to like ruby
DEac- has joined #ruby-lang
imajes has quit [Excess Flood]
<Defusal> drbrain, lets hope that solves it
<Defusal> thank you very much for your left
<Mon_Ouie> It's important to note it actually works on the object that variable refers too; therefore, if another object has a reference to it, it will be changed too.
<Defusal> help*
<Mon_Ouie> For example: a = variable; variable.sub!(…); puts a
<drbrain> Defusal: I *think* that should do it… there might be a more elegant way for EM to handle the signals, though
dabradley has joined #ruby-lang
<Defusal> drbrain, if you ever come across one, please let me know :)
<Defusal> i just need a reliable way to detect CLD
imajes has joined #ruby-lang
<drbrain> Defusal: I don't know anything about EM, I'm just guessing :/
<Defusal> drbrain, there is some other API that i think can work on linux
Guest59132 has quit [Quit: Saliendo]
<Defusal> but its more complicated, and CLD appeared to work fine before
dan|el has quit [Ping timeout: 264 seconds]
qwerxy has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
<Defusal> now for the fun part
<Defusal> finding every zombie processes pid that escaped when their manager died
qwerxy has quit [Client Quit]
banisterfiend has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<mistym> Is raising Errno::ENOENT portable?
Asher1 has quit [Quit: Leaving.]
<lianj> Defusal: how do you start those processes?
Asher has joined #ruby-lang
woollyams has joined #ruby-lang
<Defusal> lianj, i fork, do other stuff and then usually exec
andrewhl has joined #ruby-lang
<Defusal> and i create pipes for stdin/out/err if needed
t59678 has quit [Remote host closed the connection]
t67068 has joined #ruby-lang
<lianj> tried EM.popen ?
<Dwarf> Oh boy here we go
<Dwarf> main.rb:135: undefined method `join!' for ["#dwarf", "hello", "world"]:Array (NoMethodError)
<matti> join!
<matti> ?
<Dwarf> texttosay = $output.drop(5)
<Dwarf> texttosay.join!(' ')
<Dwarf> Yush
<Dwarf> oh
<rue> Dwarf: You can’t mutate to join…
<Dwarf> Out of all the possible functions
<Dwarf> I see
<lianj> from array to string requires two !
<matti> lianj: ']
<Dwarf> Well, I'll be off facedesking
<Dwarf> thanks
<Defusal> lianj, don't even go there, i have tried every possible EM implementation of spawning, they all have edge cases and other issues
<Defusal> i wrote my own spawning implementation for EM from scratch for that very reason
<lianj> Defusal: hehe ok, maybe i recall talking to you about it.. for myself i was always fine with EM.popen
* lianj shuts up
<Defusal> also, as i said, i do other stuff
<Defusal> this is not a very trivial system
<lianj> care to show your spawning code? curious
Leeky_afk is now known as Leeky
<Defusal> lianj, i could paste it for you, though it is not complete. there are still a few things i need to do
<Defusal> i am just far too thinly spread at the moment and have an insane amount of far more important things to work on
<lianj> sure, nevermind. i will ping you at another point :)
<Defusal> lianj, it's ok, i'll paste it for you
sockmonk has quit [Ping timeout: 246 seconds]
sailias has quit [Quit: Leaving.]
<Defusal> lianj, it is a module for my own modular platform, so it would need some changes to get working alone, and you'll just have to deal with some messy comments and debug stuff
<Defusal> lianj, http://pastie.org/4570579
<lianj> thanks!
<Defusal> np :)
lele has quit [Ping timeout: 260 seconds]
t4nkd has joined #ruby-lang
<Dwarf> It worked :D
stardiviner has joined #ruby-lang
t4nkd has quit [Client Quit]
Guest92060 has left #ruby-lang [#ruby-lang]
kvirani has quit [Remote host closed the connection]
toretore has joined #ruby-lang
ged has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
t67068 has quit [Remote host closed the connection]
t73559 has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
scampbell has quit [Remote host closed the connection]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
erichmenge has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
stardiviner has joined #ruby-lang
carloslopes has quit [Quit: Leaving.]
havenn has joined #ruby-lang
havenn_ has joined #ruby-lang
Guest85819 is now known as EvilJStoker
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
reactormonk has quit [Ping timeout: 276 seconds]
chessguy has joined #ruby-lang
dous has quit [Ping timeout: 246 seconds]
benanne has quit [Quit: kbai]
mistym has quit [Remote host closed the connection]
laszlokorte has joined #ruby-lang
dan|el has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
havenn_ has quit [Remote host closed the connection]
anannie has joined #ruby-lang
banisterfiend has joined #ruby-lang
reactormonk has joined #ruby-lang
Guest75945 has quit [Ping timeout: 246 seconds]
dfr|mac has joined #ruby-lang
dan|el has quit [Ping timeout: 245 seconds]
dfr|mac has quit [Remote host closed the connection]
jackhammer2022 has joined #ruby-lang
<anannie> I noticed something interesting, if I do print '\n%s' % var then the newline is inserted but the new line charecter is printed on the previous line. This does not change for STDOUT.puts or puts. However if I put it in double quotes then the escape characters work properly and nothing gets printed. I'm wondering why this is so
<drbrain> anannie: in '' strings, \ only escapes \ and '
<drbrain> in "" strings \n turns into the newline character
<anannie> drbrain: Why is that so?
<anannie> drbrain: Why the difference in the way the two are treated?
<drbrain> for your convenience
<anannie> drbrain: ?
<anannie> Can you please give me an example where this might be useful?
<drbrain> if you want to print \ followed by n to your terminal then '\n' may be easier to write than "\\n"
<drbrain> also, interpolation doesn't happen in '' strings, so you could do something like: eval '#{foo}', binding
<anannie> interpolation means substitution of the %s by the variable? Sorry I'm new to all of this
<drbrain> anannie: also, puts automatically adds a newline to the end of strings if one isn't there, but print does not
<drbrain> anannie: interpolation like "\n#{var}"
<drbrain> that's the same as "\n" + var.to_s or "\n%s" % var
<anannie> or "\n", var?
<drbrain> interpolation can happen outside of just printing
<anannie> I like how the language has so many different ways of doing the same thing, was this intended or is it an accident?
<drbrain> so you can have something like output << "\n#{var}", but not output << "\n", var
<drbrain> it is intentional
<drbrain> I use all these different ways of combining strings in different parts of my programs
<drbrain> it depends on which one fits
<drbrain> I use % mostly to do formatting of numbers
<anannie> """so you can have something like output << "\n#{var}", but not output << "\n", var""" I didn't understand this bit
<drbrain> anannie: try this in irb: var = "hello"; output = ""; output << "\n", var
<anannie> I'll try it out in irb
<drbrain> you can replace ; with your enter key
<drbrain> compare it to output << "\n#{var}"
yxhvuud has quit [Ping timeout: 245 seconds]
<anannie> hrm it's giving me an error.
<drbrain> yes
<drbrain> but for print it's fine
<anannie> does << do assignment?
<drbrain> no, it usually appends the thing on the right to the thing on the left
<anannie> Ah I see it appends the thing
<drbrain> a << b call the method #<< on a
<anannie> this is quite need
<anannie> * neat
<anannie> and needed
<drbrain> if the thing on the left is an Array you can use #push to append multiple items at the same time
bryancp has quit [Remote host closed the connection]
<threedaymonk> you can also do output << "\n" << var
<anannie> so it's basically array1.push array2?
<drbrain> array.push item1, item2
<drbrain> use #concat when you have two arrays
<anannie> This is really cool. I thought logically you would have to loop it and then assign things one by one as you do in C++
<drbrain> anannie: do you know about ri?
<anannie> array1.concat array2? I can see that it stores the array within the array as an element, which is quite sweet if you think about it... turtles all the way down...
<anannie> drbrain: Yes
<drbrain> you can learn about the methods with `ri Array.concat` or `ri Array.push`
<anannie> I'm reading it up simultaneously... There's also an online version of the documentation which is a bit more neat
UCSB-mrodrigues has joined #ruby-lang
<drbrain> yes
dejongge has quit [Quit: Leaving.]
<threedaymonk> drbrain: I don't recall ever seeing Array#concat in the wild, as opposed to just +=
mrodrigues has joined #ruby-lang
<anannie> One thing I never understood though is how you go from writing statements like these to actually building something that does some X hopefully useful thing. It seems suspiciously like sorcery.
<steveklabnik> :)
<drbrain> threedaymonk: I think it was added late in ruby 1.8
<drbrain> anannie: it felt like that to me when I started!
dfr|mac has joined #ruby-lang
<drbrain> anannie: you pick something you want to do, then figure out what one part should do, then figure out what a part of *that* would do and so-on until you have something you know how to do
<drbrain> … and you can't worry about making mistakes
<anannie> drbrain: What happened to change that?
<drbrain> mistakes are fun because you learned something new
<drbrain> I made lots of mistakes and lots of correct choices, so now the path is more obvious
solars has quit [Ping timeout: 246 seconds]
t73559 has quit [Remote host closed the connection]
<anannie> I worry a lot about making mistakes, they frighten me, which is interesting/
t37927 has joined #ruby-lang
<drbrain> the typical downside to programming mistakes is that you wasted some time
<anannie> drbrain: Is it better to do array1 << item1 << item2 or array1.push (item1, item2)
<anannie> ?
<drbrain> I use push
<anannie> may I ask why?
<anannie> (it's neater I guess)
<drbrain> it looks nicer
<threedaymonk> it's probably clearer and more explicit
Hakon has quit [Quit: Leaving...]
<anannie> okay. thank you for helping me out drbrain and threedaymonk... I'll get back to the exercises
<threedaymonk> anannie: it's important to type push(item1, item2) not push (item1, item2) - i.e. no space between method and arguments
<tsou> I'm reading the pickaxe chapter on metaprogramming.. and I'm trying to understand how this works: https://gist.github.com/3430114
<erikh> I like push because it communicates more than an operator
<threedaymonk> anannie: unless you are using no parentheses at all, in which case array1.push item1, item2 is correct
<anannie> threedaymonk: Ah that's a bad habit of mine. I like things spaced out. Doesn't ruby delete whitespace?
<tsou> so, if I get it right, no matter which class has the "add_mouth" line inside of it, all of the objects of all of the classes under Parent will have this method..
voker57 has quit [Read error: Connection reset by peer]
<threedaymonk> anannie: when it comes to method arguments, it's a bit demanding - it has to be to avoid ambiguities in the language syntax
workmad3 has quit [Ping timeout: 265 seconds]
dfr|mac has quit [Remote host closed the connection]
<anannie> threedaymonk: That makes sense
<tsou> question is, why add_mouth behaves this way, and how define_method "knows better"..
<erikh> tsou: it's important to understand the context of where the method is called
<tsou> erikh: indeed; this is what i'm trying to understand.. ;)
<erikh> but yes, to answer your question, inheritance provides the methods from Parent to its inheriting children
<erikh> sure
<erikh> so, sec
<tsou> the way it is presented in the pickaxe books, it gives one the impression that in the code I posted, add_mouth should only be available to Child instances..
<erikh> does that help?
<erikh> what's important is the context of 'self' when these methods are called
<tsou> not really, I understand what's going on on your example
<tsou> not really what's going on mine ;)
<erikh> oh, ok. so you just don't grok inheritance?
<anannie> threedaymonk: would x.write(line1<<"\n") work?
<tsou> erikh: from what i understand, self, inside Child, is Child..
drupin has joined #ruby-lang
<erikh> I've actually gotta bail. just remember that the context of 'self' is really important for this example
<drbrain> anannie: you should try it in irb, you can use a StringIO to avoid writing to a file
<tsou> erikh: heh thanks.. I know, but from what I understand about what self points to, my example should not be behaving the way it is...
<tsou> erikh: thanks anyway :)
<anannie> drbrain: How? I asked because I didn't know how to test it in irb without running the entire program.
<drbrain> try require 'stringio'; x = StringIO.new; <your code>; p x.string
<anannie> it works but it doesn't work as expected. It inserts \n but doesn't escape it. Something new :)
<drbrain> slyphon: *hugs*
toretore has quit [Quit: Leaving]
hramrach has quit [Ping timeout: 276 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
sporkmonger has quit [Quit: Poof!]
<anannie> drbrain, threedaymonk: Thanks for helping me out today, I appreciate it. Sorry if I bugged you.
t37927 has quit [Remote host closed the connection]
t20303 has joined #ruby-lang
hramrach has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<slyphon> drbrain: ;)
<slyphon> I KEED! I KEED!
woollyams has joined #ruby-lang
<drbrain> anannie: np
workmad3 has joined #ruby-lang
zzak has quit [Quit: leaving]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
zzak has joined #ruby-lang
<zzak> drbrain: String.to_f is the same as String#to_f as far as rdoc linking goes?
dous has quit [Ping timeout: 265 seconds]
<drbrain> zzak: yes, '.' tries class then instance methods for a match
dan|el has joined #ruby-lang
havenn has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
dan|el has quit [Ping timeout: 264 seconds]
diegovio1a has quit [Ping timeout: 260 seconds]
saneshark has joined #ruby-lang
cantonic has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
diegoviola has joined #ruby-lang
m3nd3s has joined #ruby-lang
ilyam has quit [Ping timeout: 246 seconds]
<zzak> #method means instance method right?
<steveklabnik> zzak: yes
<steveklabnik> though many people use it for all
<zzak> rdoc seems to use it for instance only
andrewhl has quit [Remote host closed the connection]
Guest79461 has quit [Ping timeout: 252 seconds]
<Defusal> drbrain, it took a lot of load, but it broke again
<drbrain> Defusal: :/
<Defusal> due to a mistake extraction followed my deletion of loads of files in an inotify watch path
<Defusal> :P
t20303 has quit [Remote host closed the connection]
t87022 has joined #ruby-lang
<Defusal> there must be a solution to this drbrain :/
<Defusal> <internal:prelude>:8:in `lock': deadlock; recursive locking (ThreadError)
<Defusal> the end of me :(
<drbrain> Defusal: lock recursion through same path through the signal handler? or a different path?
dhruvasagar has joined #ruby-lang
<Defusal> from <internal:prelude>:8:in `synchronize'
<Defusal> from /usr/local/lib/ruby/1.9.1/thread.rb:157:in `push'
<Defusal> from /home/admin/process_manager/lib/modules/base.rb:37:in `block (2 levels) in signal'
<Defusal> sorry for spam :/
<rhizmoe> looks like fun
<Defusal> drbrain: mod.signal_queue << sig
<Defusal> signal_queue is Queue.new
<drbrain> Defusal: try just Array
<Defusal> so much for a queue being safe
<Defusal> you really think that'll work when a queue doesnt?
<drbrain> Defusal: Queue is multi-thread safe, but not lock-recursion safe
<Defusal> heh, ok
ryez has joined #ruby-lang
<Defusal> well good news is, most of my services are either down or empty due to them having been down and/or out of date for so long
<drbrain> Defusal: it won't recursively lock… and since you're on CRuby it doesn't need locking
<Defusal> so soon there won't be any users to boot off until tomorrow
cantonic has quit [Quit: cantonic]
outoftime has quit [Quit: Leaving]
drupin has left #ruby-lang ["Leaving"]
<Defusal> drbrain, seem much better, when processing tons of queued stuff being send from another process, it reached the open file limit without recursive locking
<Defusal> sent*
<drbrain> cool
brianpWins has quit [Quit: brianpWins]
<Defusal> drbrain, thanks for the help, this has not been the best day
Guest75945 has joined #ruby-lang
seanstickle has joined #ruby-lang
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cantonic has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
Criztian_ has joined #ruby-lang
Criztian has quit [Read error: Connection reset by peer]
imajes has quit [Excess Flood]
ttilley has quit [Quit: ttilley]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
imajes has joined #ruby-lang
bryancp has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
stardiviner has joined #ruby-lang
jtoy_ has quit [Quit: jtoy_]
t87022 has quit [Remote host closed the connection]
t71526 has joined #ruby-lang
Dwarf has quit [Quit: APPELTAART]
saneshark has quit [Quit: saneshark]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
selfmadepsyche has joined #ruby-lang
pabloh has quit [Ping timeout: 265 seconds]