apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
chessguy has quit [Ping timeout: 260 seconds]
rins_ has joined #ruby-lang
rins has quit [Ping timeout: 260 seconds]
<zzak> omg
rins has joined #ruby-lang
<drbrain> O_O
cirenyc has joined #ruby-lang
rins_ has quit [Ping timeout: 265 seconds]
<seanstickle> Who here is ready to party like it's 2199!?
rins_ has joined #ruby-lang
cirenyc has quit [Ping timeout: 248 seconds]
intellitech has joined #ruby-lang
BigO has joined #ruby-lang
rins has quit [Ping timeout: 252 seconds]
gregmore_ has joined #ruby-lang
Mon_Ouie has quit [Remote host closed the connection]
BigO has quit [Read error: Connection reset by peer]
rins has joined #ruby-lang
rins_ has quit [Ping timeout: 260 seconds]
ruby-lang854 has joined #ruby-lang
gregmoreno has quit [Ping timeout: 264 seconds]
ruby-lang854 has quit [Client Quit]
<zzak> party at thoughtbot
srbaker has joined #ruby-lang
postmodern has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
wyhaines has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
enebo has quit [Quit: enebo]
jtoy has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
dalekurt has joined #ruby-lang
spuk has joined #ruby-lang
thone_ has joined #ruby-lang
guns has joined #ruby-lang
thone has quit [Ping timeout: 245 seconds]
elcapo has quit [Quit: leaving]
buscapepe has joined #ruby-lang
toretore has quit [Quit: Leaving]
buscapepe has quit [Remote host closed the connection]
buscapepe has joined #ruby-lang
headius has joined #ruby-lang
justinseiter has quit [Read error: Operation timed out]
m3nd3s has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<hakunin> sup with the damn tempfiles
<hakunin> they disappear randomly before i get at them
<Spaceghostc2c> That's why they're temp files!
<Spaceghostc2c> Here's a cat picture: http://i.imgur.com/Scso8.jpg
hahuang65 has quit [Quit: Computer has gone to sleep.]
<hakunin> Spaceghostc2c: that was it, thank you
datanoise has quit [Ping timeout: 240 seconds]
havenn has quit [Ping timeout: 244 seconds]
__butch__ has quit [Quit: Leaving.]
justinseiter has joined #ruby-lang
bluepojo has joined #ruby-lang
<foucist> HAHA
heftig has quit [Ping timeout: 245 seconds]
marr has quit [Ping timeout: 252 seconds]
buscapepe has quit [Ping timeout: 252 seconds]
cirenyc has joined #ruby-lang
heftig has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
rsl has quit [Quit: Computer has gone to sleep.]
<drbrain> Spaceghostc2c: don't post such things
<Spaceghostc2c> drbrain: :(
cirenyc has quit [Ping timeout: 244 seconds]
lcdhoffman has joined #ruby-lang
<drbrain> I'd like to keep this channel welcoming to people. Implied naked women isn't welcoming
<Spaceghostc2c> drbrain: The caption is: "The price of cheezberger is too damn high.
<Spaceghostc2c> "
<hakunin> Question is - when does ruby delete tempfiles? Would it ever delete a tempfile on a routine GC?
<Spaceghostc2c> hakunin: So the picture didn't help as much as I'd hoped, eh?
<hakunin> (Besides on exit of course)
brianpWins has quit [Quit: brianpWins]
<hakunin> Spaceghostc2c: it helped avoid any more of them. my irc client shows pictures inline, had to explain to my wife why i'm looking at this.
<Spaceghostc2c> hakunin: Oh dear!
<Spaceghostc2c> It might've been better with the caption.
blazes816 has quit [Quit: blazes816]
<Spaceghostc2c> You can blame it on me, I'm sure she'll understand.
<hakunin> I'm just very interested whether ruby deletes tempfiles during garbage collect
<hakunin> looks like it does
<hakunin> but when no variables refer to them
<Spaceghostc2c> temp files?
<hakunin> yes
<Spaceghostc2c> How are you writing them?
<hakunin> Tempfile.new
<hakunin> (Paperclip gem writes them, but i'm looking at source)
mjio has quit []
<Spaceghostc2c> Oh!
<hakunin> point is - it has a way to get a file from wherever it's stored to the local filesystem
<hakunin> and i confirm that it does do that, file gets to the local filesystem with size > 0
<hakunin> but subsequently trying to access file path where that happens
<hakunin> randomly says "file or directory not found"
<hakunin> (as in, every once in a while)
<hakunin> often works
<hakunin> sometimes doesn't
xyzodiac has quit [Ping timeout: 252 seconds]
<Spaceghostc2c> Can you watch the filesystem on that file?
<hakunin> i mean there's a paperclip issue on that
<hakunin> but the source is very simple
<Spaceghostc2c> Spin up another ruby process to watch the file and output when the file stops existing?
<hakunin> it just writes Tempfile.new, nothing else going on
<hakunin> i can confirm that file gets to the filesystem
<hakunin> because i check immediately after the "download" that it exists and size > 0
<hakunin> if not - i raise error
<hakunin> that error never gets raised
xyzodiac has joined #ruby-lang
<hakunin> instead it fails later, when i try to access that path later in code
<hakunin> randomly
<postmodern> where's the code that allows rdoc sites to be searchable, i found a bug
<postmodern> appears to be different code than the normal darkfish rdoc template
<hakunin> so while the later fail happens randomly, my check for file's existence right after download never fails
<hakunin> leading me to think that perhaps ruby GCs it
<hakunin> Another question that could lead me to solution....
<hakunin> If I assign an object to a local variable
<hakunin> and then method ends
<hakunin> will that local variable be garbage collected if that object isn't referenced elsewhere?
<hakunin> this might actually be it
<hakunin> i'm gonna have to verify my theory
gregmoreno has quit [Read error: Operation timed out]
<hakunin> I'm assigning a tempfile to a local variable, and then returning file.path string instead of tempfile object itself, so if GC occurred between returning path and accessing it - tempfile could very well be gone
<hakunin> Spaceghostc2c: pick a channel : )
<Spaceghostc2c> hakunin: only one? :D
<jsilver> Spaceghostc2c: node version of GC2 made
<hakunin> Spaceghostc2c: hm, if i GC.disable, then run it manually, it could confirm my suspicion
<Spaceghostc2c> jsilver: Of what?
<jsilver> GlobalChat2 Server
<Spaceghostc2c> Also, why bother? write it in Go.
<jsilver> don't know go
<jsilver> i like node
<Spaceghostc2c> Lol.
<jsilver> its performant and low mem, low cpu
<Spaceghostc2c> hakunin: Or if you just use a constant too!
<jsilver> everything i was looking for
<jsilver> what does Go do thats so cool
<Spaceghostc2c> jsilver: Single core as well for the reactor.
<jsilver> i hear a lot of "Go"
<jsilver> ah
<Spaceghostc2c> Goroutines, scales across cores and machines and the such pretty well.
<jsilver> still, was just looking for smalls procs that didnt zombie
<jsilver> hmm
<Spaceghostc2c> erlang wouldn't be fast, but it's a great language.
<jsilver> i need fast and small mem small cpu
<jsilver> 1 server = a room
<jsilver> node is great for this, hasnt crashed all day, seems nicer on the b/e than ruby, which still works but can zombie unless 1.9
<Spaceghostc2c> Lolk.
<jsilver> does Go compile to ASM?
* Spaceghostc2c looks at the floor
<Spaceghostc2c> Looking at the floor is what I do at work when people need to rtfm.
<jsilver> already am
<jsilver> i rtfm religiously
<seanstickle> Based on some religious folks I know, that means you read some of the words in red and ignore the rest of the manual.
<jsilver> LOL
<jsilver> Go looks go
<jsilver> good
mjio has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
<hakunin> Spaceghostc2c: wow: https://gist.github.com/4211278
<hakunin> Spaceghostc2c: that's exactly what's happening
r0bby has joined #ruby-lang
<Spaceghostc2c> Probably something to do with local variables and scope.
kingcrawler has joined #ruby-lang
<hakunin> Spaceghostc2c: well, it makes perfect sense, since yes, local variable can never be reused once you're out of its scope
<jsilver> what gains will i get over Node?
jtoy has quit [Quit: jtoy]
<hakunin> Spaceghostc2c: and having a path string is not going to help, since the tempfile object itself is the one that is being GC'd
<Spaceghostc2c> Correct.
<seanstickle> jsilver: try #golang
<jsilver> k
<Spaceghostc2c> Try #go-nuts
<Spaceghostc2c> Actually.
<seanstickle> Whatever
<Spaceghostc2c> Whomever.
titaniumNoob has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
lcdhoffman has joined #ruby-lang
<postmodern> Whenever
dankest has quit [Quit: Leaving...]
jtoy has joined #ruby-lang
banisterfiend has quit [Ping timeout: 255 seconds]
tenderlove has quit [Remote host closed the connection]
simi has quit [Ping timeout: 244 seconds]
postmodern has quit [Ping timeout: 265 seconds]
postmodern has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
lsegal has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
headius has quit [Quit: headius]
cirenyc has joined #ruby-lang
adurity has quit [Remote host closed the connection]
cirenyc has quit [Ping timeout: 240 seconds]
nazty has quit [Read error: Connection reset by peer]
naztyone has quit [Quit: WeeChat 0.3.2]
mwjcomputing has joined #ruby-lang
bluepojo has quit [Read error: Connection reset by peer]
bluepojo has joined #ruby-lang
towski has quit [Remote host closed the connection]
earthquake has quit [Quit: earthquake]
postmodern has quit [Ping timeout: 252 seconds]
dankest has joined #ruby-lang
nazty has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
mrsolo has quit [Quit: Leaving]
wyhaines has quit [Remote host closed the connection]
Hakon has quit [Quit: Leaving...]
Hakon has joined #ruby-lang
hahuang65 has joined #ruby-lang
gix has quit [Ping timeout: 248 seconds]
postmodern has joined #ruby-lang
titaniumNoob has quit [Ping timeout: 260 seconds]
gix has joined #ruby-lang
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
lcdhoffman has quit [Quit: lcdhoffman]
srbaker has quit [Quit: Computer has gone to sleep.]
postmodern has quit [Ping timeout: 244 seconds]
jtoy has quit [Quit: jtoy]
kingcrawler has quit [Quit: Computer has gone to sleep]
cored has quit [Ping timeout: 245 seconds]
wyhaines has joined #ruby-lang
xyzodiac has quit [Ping timeout: 252 seconds]
postmodern has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
datanoise has joined #ruby-lang
xyzodiac has joined #ruby-lang
postmodern has quit [Ping timeout: 255 seconds]
titaniumNoob has joined #ruby-lang
areil has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
xyzodiac has quit [Ping timeout: 252 seconds]
datanoise has quit [Ping timeout: 265 seconds]
artOfWar has joined #ruby-lang
xyzodiac has joined #ruby-lang
cored has quit [Ping timeout: 244 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
zaxmyth has joined #ruby-lang
Eric has joined #ruby-lang
Eric is now known as Guest54828
zaxmyth has quit [Remote host closed the connection]
ddd has quit [Quit: Leaving.]
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
havenn has joined #ruby-lang
jtoy has joined #ruby-lang
kingcrawler has joined #ruby-lang
Aiur has joined #ruby-lang
titaniumNoob has quit [Ping timeout: 248 seconds]
r0bby has quit [Ping timeout: 260 seconds]
lcdhoffman has joined #ruby-lang
guns has quit [Quit: guns]
titaniumNoob has joined #ruby-lang
faustman has quit [Ping timeout: 246 seconds]
seanstickle has quit [Quit: seanstickle]
mwjcomputing has quit [Quit: Leaving]
havenn has quit [Remote host closed the connection]
mindbender2 has joined #ruby-lang
Axsuul has quit [Ping timeout: 255 seconds]
mindbender2 has quit [Quit: Leaving.]
mindbender1 has joined #ruby-lang
Aiur has quit [Quit: Computer has gone to sleep.]
krz has joined #ruby-lang
canaima has joined #ruby-lang
canaima has left #ruby-lang [#ruby-lang]
canaima has joined #ruby-lang
canaima has left #ruby-lang [#ruby-lang]
titaniumNoob has quit [Quit: Leaving]
wyhaines has quit [Remote host closed the connection]
areil has quit [Remote host closed the connection]
<mindbender1> is there a ruby documentation that just discusses the syntax and semantics of the language?
Guest54828 has quit [Quit: Leaving...]
headius has joined #ruby-lang
wyhaines has joined #ruby-lang
rohit has joined #ruby-lang
bluepojo has joined #ruby-lang
jtoy has quit [Quit: jtoy]
bluepojo has quit [Client Quit]
bluepojo has joined #ruby-lang
jsilver has joined #ruby-lang
dankest is now known as dankest|away
xyzodiac has quit [Quit: Computer has gone to sleep.]
dankest|away is now known as dankest
UberNerdBoy has joined #ruby-lang
UberNerdBoy has left #ruby-lang [#ruby-lang]
<drbrain> mindbender1: nothing that comes with ruby
<drbrain> mindbender1: we'll need to put that together
<mindbender1> drbrain: I'd very much be grateful
G________ has joined #ruby-lang
G________ has quit [Client Quit]
adurity has joined #ruby-lang
G________ has joined #ruby-lang
artOfWar has quit [Remote host closed the connection]
G________ has quit [Client Quit]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
nvick has joined #ruby-lang
catepillar has joined #ruby-lang
<catepillar> howdy
<catepillar> im trying to work with some string manipulation
<catepillar> and i have a string that looks a bit like "\r\n\t\r\n\t\r\n\t"
<catepillar> how can i .gsub it so it comes out more like "\\r\\n\\t\\r\\n\\t\\r\\n\\t"
<catepillar> i tried .gsub("\\","\\\\")
<tpope> are those literal backslashes in that string or actual control characters?
<catepillar> control characters
<catepillar> its printing a tab per line with puts
<tpope> then you'll need to use that in your substitution
<catepillar> im afraid i dont understand that
* catepillar hates string manipulation
<tpope> gsub(/[\t\n]/) { |c| {"\t" => "\\t", "\n" => "\\n"}[c] }
<tpope> build on that
<catepillar> for each type?
<tpope> there's only like 8 total
<catepillar> is there a list somewhere?
<tpope> google ruby string escaping
<rking> Anyone in strong favor for or against rake tasks defaulting to running the tests?
<tpope> in favor where there's not something better to do
<rking> tpope: Do you have an example of the 'something better'?
<catepillar> tpope: thanks
nvick has quit [Quit: nvick]
<tpope> if you're building something
<charliesome> catepillar: you could just call #inspect on the string
<Spaceghostc2c> Take the thing you do most often in rake tasks, make that the default.
<tpope> charliesome: so obvious :/
<Spaceghostc2c> Make everything else similarly easy and quick to do.
<tpope> I recently had to do this exact task in VimL, so I didn't even think of that
<tpope> basically I was...reimplementing #inspect
<charliesome> tpope: while it does more than what catepillar is asking, i'm *guessing* that he's trying to do something inspect-like
<tpope> yeah exactly
<catepillar> charliesome: i think that's exactly what i want
<tpope> way to read intent rather than just answering like a literal jerk
<catepillar> the problem is that im trying to santize something from a web page, where white space doesn't mean much, but puts is spilling new lines EVERYWHERE
<tpope> maybe I spoke too soon
<Spaceghostc2c> too soon bro
<catepillar> uh-oh?
<tpope> catepillar: maybe just gsub(/\s+/, ' ')?
<tpope> I mean if you want to preserve the semantics of the html
<catepillar> no, i want to preserve the fact that it is there
<tpope> okay, then have fun
<catepillar> but i dont want it printint thousands of lines
<catepillar> im building an IRC bot, and the newlines mean stuff
<catepillar> but its spamming my channel right now :s
<tpope> okay then inspect sounds right
<rking> I like how the bot on #perl6 uses Unicode chars to represent Newline and such.
kingcrawler has quit [Quit: Computer has gone to sleep]
stonerfish has joined #ruby-lang
<rking> <rking> r: say 'hi'
<rking> <p6eval> rakudo e2f2dc: OUTPUT«hi␤»
<rking> (e2f2dc is the build's commit)
burgestrand has quit [Quit: Leaving.]
rohit has quit [Ping timeout: 244 seconds]
mrsolo has joined #ruby-lang
justinseiter has quit [Remote host closed the connection]
mjio has quit []
mrsolo has quit [Client Quit]
Averna has quit [Quit: Leaving.]
rohit has joined #ruby-lang
nvick has joined #ruby-lang
andrew_ has joined #ruby-lang
andrew_ is now known as andrewhl
lcdhoffman has quit [Quit: lcdhoffman]
ryanlecompte has joined #ruby-lang
headius has quit [Quit: headius]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
nignaztic has quit [Ping timeout: 260 seconds]
rippa has joined #ruby-lang
<mindbender1> http://guides.rubyonrails.org/association_basics.html why does that documentation repeat things
cirwin has joined #ruby-lang
<mindbender1> sorry ignore
artOfWar has joined #ruby-lang
hahuang65 has joined #ruby-lang
artOfWar has quit [Ping timeout: 264 seconds]
cantonic_ has joined #ruby-lang
rohit has quit [Quit: Leaving]
cantonic has quit [Ping timeout: 250 seconds]
cantonic_ is now known as cantonic
kingcrawler has joined #ruby-lang
simi has joined #ruby-lang
dankest is now known as dankest|away
mossplix has joined #ruby-lang
burgestrand has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
simi has quit [Ping timeout: 244 seconds]
stonerfish has joined #ruby-lang
sent-hil has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
stonerfish has quit [Quit: Leaving.]
rippa has quit [Ping timeout: 244 seconds]
towski has joined #ruby-lang
nvick has quit [Quit: nvick]
zmack has joined #ruby-lang
Assurbanipal has joined #ruby-lang
Theueip has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
dankest|away is now known as dankest
wardrop has quit [Quit: wardrop]
rohit has joined #ruby-lang
nXqd has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
rohit has quit [Quit: Leaving]
Mon_Ouie has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
simi has joined #ruby-lang
adurity has quit [Remote host closed the connection]
dankest is now known as dankest|away
mfn has joined #ruby-lang
totallymike has quit [Read error: Operation timed out]
ddd has joined #ruby-lang
oxyn has joined #ruby-lang
dankest|away is now known as dankest
simi has quit [Ping timeout: 244 seconds]
ddd has quit [Ping timeout: 245 seconds]
oxyn has quit [Ping timeout: 244 seconds]
oxyn has joined #ruby-lang
dr_bob has joined #ruby-lang
tjadc has joined #ruby-lang
kitallis has joined #ruby-lang
dc5ala has joined #ruby-lang
dankest has quit [Quit: Leaving...]
Mon_Ouie has quit [Ping timeout: 244 seconds]
apod has joined #ruby-lang
<yorickpeterse> Morning
<gnufied> Morning!
waffleau_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 244 seconds]
solars has joined #ruby-lang
cirwin has quit [Ping timeout: 252 seconds]
<charliesome> evening
<apeiros_> moin
kingcrawler has quit [Quit: Computer has gone to sleep]
bluepojo has quit [Ping timeout: 260 seconds]
gnufied has quit [Quit: Leaving.]
dankest has joined #ruby-lang
kgrz has joined #ruby-lang
imajes has quit [Quit: Be Back Soon!]
imajes has joined #ruby-lang
mossplix has quit [Ping timeout: 260 seconds]
<mfn> morgen
mossplix has joined #ruby-lang
CoverSlide has quit [Remote host closed the connection]
CoverSlide has joined #ruby-lang
dvorak has quit [Ping timeout: 260 seconds]
dvorak has joined #ruby-lang
gnufied has joined #ruby-lang
cardoni has joined #ruby-lang
oxyn_ has joined #ruby-lang
agarcia has joined #ruby-lang
oxyn has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
GarethAdams has quit [Quit: Leaving...]
robbyoconnor has joined #ruby-lang
robotmay has joined #ruby-lang
simi has joined #ruby-lang
rue|w has joined #ruby-lang
vlad_starkov has joined #ruby-lang
oxyn_ has quit [Ping timeout: 248 seconds]
oxyn has joined #ruby-lang
oxyn_ has joined #ruby-lang
kitallis has quit [Read error: Connection reset by peer]
oxyn has quit [Ping timeout: 264 seconds]
marr has joined #ruby-lang
banisterfiend has joined #ruby-lang
mindbender1 has quit [Quit: Leaving.]
kitallis has joined #ruby-lang
faustman has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
LanceHaig has joined #ruby-lang
joaovrmaia has joined #ruby-lang
oxyn_ has quit [Ping timeout: 264 seconds]
judofyr has joined #ruby-lang
waffleau__ has joined #ruby-lang
waffleau_ has quit [Read error: Connection reset by peer]
tbuehlmann has joined #ruby-lang
jds has joined #ruby-lang
oxyn has joined #ruby-lang
krz has quit [Quit: krz]
sepp2k has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
GarethAdams has joined #ruby-lang
agnitio has joined #ruby-lang
mars777 has quit [Quit: mars777]
mossplix_ has joined #ruby-lang
kurko_ has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
mossplix has quit [Ping timeout: 252 seconds]
mossplix_ is now known as mossplix
heftig has quit [Quit: leaving]
Assurbanipal has quit [Quit: Konversation terminated!]
Rbl has joined #ruby-lang
<Rbl> Hello everyone
<judofyr> hello Rbl
<Rbl> I am quite new to Ruby and I would like to know the point of such a function : http://pastie.org/5483223 , while we can simply do a match(/\d/) which would, I guess, return the exact same thing ?
<judofyr> Rbl: well, that handles more stuff: "1_000_000.123".numeric?
<judofyr> so /[\d_](\.[\d_])?/ is probably better
<judofyr> Rbl: but I'm not a fan of "rescue false"
<Rbl> "1_000_000.123".match(/\d/) ? true : false #=> true
<judofyr> Rbl: but: Float("123 foo") raises an error
<Rbl> Oh while 123 foo is matched with \d right ?
<judofyr> yes
<Rbl> ah ok ;)
<judofyr> \d matches any string with one digit
<judofyr> actually, the regexp should be: /\A[\d_](\.[\d_])?\Z/
<lzhz> so no negative numbers then?
achiu has quit [Quit: WeeChat 0.3.9.2]
<Rbl> The regexp should be : /\A[+-]?\d+?(_?\d+)*(\.\d+e?\d*)?\Z/
<Rbl> ;oP
<lzhz> I think the point of such a function has been made clear. ;)
m3nd3s has joined #ruby-lang
<lzhz> And what about scientific notation?
achiu has joined #ruby-lang
<judofyr> lzhz: well, I've never actually needed such a function…
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<judofyr> method*
<lzhz> there are plenty of methods in core I have never needed, but I still see the point of their existence.
<GarethAdams> it all depends on your user requirements
s1n4 has joined #ruby-lang
<GarethAdams> it is *right* for a user to be able to enter '0x12ab' as a parameter, when you're asking for a number?
<GarethAdams> only the person writing the app can decide that. But if it *is* ok, then Float(str) is a good approach.
<Rbl> GarethAdams: Depends what you mean
JohnBat26 has joined #ruby-lang
<Rbl> GarethAdams: If I have a form where I *should* type a number, but letters are allowed, make your app ready to be stressed ;)
<wnd> Float-rescue is imo the best by far. it works for different bases, scientific notation and basic decimal integers too.
Hakon has joined #ruby-lang
<GarethAdams> Rbl: What I'm saying is, "0x7c0".numeric? # => true. But if you think that's an error when I type that into a "Year of birth" field (even though it means 1984) then you probably don't want to use .numeric?
<Rbl> GarethAdams: Surely not, I would do a validBirthDate() method for sure.
<Rbl> or validBirthDate? to be Ruby-like :P
<lzhz> valid_birth_date?
<Rbl> Ah ^^
Rbl has quit [Quit: Page closed]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
waffleau__ has quit [Ping timeout: 244 seconds]
waffleau has joined #ruby-lang
Guest17119 has quit [Read error: Connection reset by peer]
Hakon has quit [Quit: Leaving...]
kgrz has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dankest has quit [Quit: Leaving...]
norc has joined #ruby-lang
norc is now known as Guest37862
anannie has quit [Remote host closed the connection]
oxyn_ has joined #ruby-lang
oxyn_ has quit [Client Quit]
oxyn has quit [Ping timeout: 244 seconds]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
kennyvb has quit [Remote host closed the connection]
oxyn has joined #ruby-lang
Hakon has joined #ruby-lang
jds_ has quit [Ping timeout: 264 seconds]
jds has quit [Ping timeout: 260 seconds]
jds has joined #ruby-lang
heftig has joined #ruby-lang
jds_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
oxyn has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
zz_chrismcg is now known as chrismcg
jds_ has quit [Ping timeout: 244 seconds]
oxyn has joined #ruby-lang
madish has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
oxyn has quit [Client Quit]
gnufied has quit [Quit: Leaving.]
robbyoconnor has quit [Ping timeout: 255 seconds]
<tockitj_> often i need to do 'var = nil' before some block in ruby - just to have variable defined in 'upper' scope... is there a way around it - without using 'var = nil' idiom
<judofyr> tockitj_: not really
<judofyr> matz is not a fan of "var foo" or "my foo"
<judofyr> "Since I am sick of 'var' and 'local' in other languages, I don't want to add explicit local variable declaration, that requires a new keyword. "
gnufied has joined #ruby-lang
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
willdrew has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
willdrew has joined #ruby-lang
<tockitj_> but 'var = nil' is somewhat misleading since i don't want to do assignment (just define var)
<tockitj_> and thanks for pointer judofyr :)
<judofyr> tockitj_: well, all variables are initialized to nil anyway
waffleau has quit [Quit: waffleau]
toretore has joined #ruby-lang
jbsan has joined #ruby-lang
jds_ has joined #ruby-lang
stardiviner has joined #ruby-lang
<charliesome> judofyr: var = nil is ugly though
<judofyr> charliesome: var = :local if false
<judofyr> better?
<charliesome> nope :|
<charliesome> judofyr: almost as ugly as a variable by itself on the last line of a method
<judofyr> charliesome: if you have `var = …; something; var`, it's often a sign that you could have used #inject
<lzhz> or each_with_object
<whitequark> judofyr: #each_with_object.
<whitequark> NOT inject.
<charliesome> ^
<lzhz> :-)
<whitequark> (this is my pet peeve. sorry.)
<charliesome> i actually told a guy about each_with_object once because he was using inject for that
<charliesome> and he says "but inject is shorter"
Asher has quit [Quit: Leaving.]
<judofyr> charliesome: `var = nil` doesn't make sense with each_with_object
<judofyr> err
<judofyr> whitequark: ^
<judofyr> charliesome: seriously though, #each_with_object is a bit long
<whitequark> judofyr: if you use #inject (which is better named #reduce, but that's another topic) on something when you don't need to accumulate result
<judofyr> whitequark: but yes, in some cases each_with_object
<judofyr> (most cases)
<whitequark> i.e. you just need to eliminate a variable reference like here
Asher has joined #ruby-lang
<whitequark> then you need #each_with_object
<whitequark> otherwise yeah, #reduce
<charliesome> there's other times when you might set a variable, do some things with it, then return it
<charliesome> for those situations i like the tap trick
<whitequark> in fact I personally consider the whole thing with #each_with_object/#inject somewhat like semicolonless javascript
<whitequark> you could just expand that to var=nil;...;var and spend the time on something useful instead of arguing on irc
<charliesome> in what way?
<judofyr> whitequark: speaking of JavaScript, can you compile Rails to JS now?
<whitequark> judofyr: never was going to
<judofyr> whitequark: I know
kennyvb has joined #ruby-lang
<charliesome> then you can compile your rails app to js
<charliesome> and run it with node.js
<judofyr> whitequark: but: status?
<charliesome> for webscale
<whitequark> judofyr: I'm considering adding optional (very ruby-ish) typing at this point
<judofyr> whitequark: interesting
<whitequark> one reason I could demonstrate right now is that Ruby is actually a statically typed language at its core.
<whitequark> pass anything except Fixnum to Array#[]
<judofyr> isn't "strongly" the word?
<whitequark> or, more importantly, anything except Fixnum which implements #to_int and does _not_ return Fixnum
<whitequark> judofyr: no. Ruby is strongly typed everywhere.
<whitequark> weak typing would be like PHP or JS; 0 == false
pab|o has joined #ruby-lang
<judofyr> whitequark: yes, that was my point
<lzhz> maybe #each should work like #each_with_object when passed an argument (other than the block)?
<yorickpeterse> "1" == 1 # lol
<whitequark> judofyr: and I mean that there is a lot of places where Ruby only accepts one particular type, and for good reasons
<lzhz> that would make each (with object) shorter than inject/reduce.
<whitequark> look out for everything implemented in C and/or receiving Class, Module, Symbol, Fixnum and so on
<sepp2k> whitequark: Why does that demonstrate that Ruby is statically typed at its core? Surely the resulting type error is dynamic (i.e. run-time).
<whitequark> lzhz: #each is Ruby's enumerator protocol, it's implemented all over stdlib and gems, whereas #each_with_object is within Enumerable and so there's a single entry point
<lzhz> true
<whitequark> sepp2k: agreed. Could you suggest a better word? I'm aiming for something meaning "not duck-typed"
<whitequark> "statically" probably doesn't fit that well enough
<charliesome> it sort of is duck typed
<charliesome> with the whole to_int thing
<whitequark> charliesome: that just takes the problem one level further
<charliesome> but there's only so far you can go with trying to duck type everywhere
pedromedeiros has joined #ruby-lang
<yorickpeterse> geese-typed
<yorickpeterse> it looks a bit like a duck but it isn;t
<yorickpeterse> * isn't
<judofyr> heh, reminds me of "duck-punching"
<judofyr> (which is a great name for monkey-patching)
<sepp2k> whitequark: Nominally typed.
banister_ has joined #ruby-lang
<whitequark> sepp2k: that doesn't exactly fit either IMO, but is better than "statically" indeed
<sepp2k> Why does that not fit?
<charliesome> duck typed to the first degree
nertzy3 has joined #ruby-lang
<whitequark> sepp2k: because it's an opposite of structural typing, and that doesn't have anything to do with duck typing?
rhizo has joined #ruby-lang
<sepp2k> whitequark: It doesn't? I would have said the terms are synonymous.
<whitequark> sepp2k: oh. yes, that makes sense if you consider the interface, rather the encapsulated data layout, as the structure
<whitequark> thanks
adambeynon has joined #ruby-lang
srbaker has joined #ruby-lang
<tockitj_> is it possible to mock only one method on existing object ?
nertzy2 has quit [Ping timeout: 260 seconds]
<whitequark> judofyr, charliesome: ok. talking about implementations again, the point is that when programming for embedded devices, you need that kind of enforcement often
<judofyr> tockitj_: sure, but it depends on the mocking framework you're using
<whitequark> I've thought of some ways to achieve it without adding new syntax, and it's perfectly possible but quite ugly
<judofyr> whitequark: hm… have you seen how Mirah solves it?
anannie has joined #ruby-lang
anannie has quit [Client Quit]
mytrile has joined #ruby-lang
<tockitj_> how to do it on rspec ? (:
<whitequark> judofyr: yeah
<whitequark> judofyr: and it conflicts (syntactically) with 2.0 keyword arguments, which I will certainly include
rhizo has quit [Read error: Connection reset by peer]
<judofyr> tockitj_: hm… dunno…
<charliesome> whitequark: why not have something like: def add(Fixnum a, Fixnum b) -> Fixnum
<yorickpeterse> What about `Fixnum number = 10`?
<whitequark> charliesome: exactly what I came with
<yorickpeterse> or `HerpDerpMyClass example = HerpDerpMyClass.new('...')`
<whitequark> except with : instead of ->, but -> is better as it doesn't conflict with symbol in tokenizer
rhizo has joined #ruby-lang
<charliesome> whitequark: i think that looks fine personally
<whitequark> yorickpeterse: I've came to the conclusion that type annotations are not useful for local variables
<charliesome> whitequark: will you have casts
<yorickpeterse> well maybe not local ones but I'd certainly would like to have a slightly more solid type checking
<whitequark> charliesome: as simple as Type.coerce(something)
<charliesome> so if it fails to infer a type properly, you can say "listen compiler, i know better than you" and cast a value to what you want
<whitequark> I'm aiming to write most of this in Ruby. Ruby is incredibly easy to extend
<judofyr> whitequark: .coerce is already used though
<charliesome> whitequark: not so much coercion or casts as they usually work, but a way to annotate an expression with a type
<judofyr> isn't it?
<charliesome> which would blow up at runtime if the type annotation is wrong
<judofyr> ah, no, that's Object#coerce
<whitequark> charliesome: it's better to check everything at compile time
<whitequark> I'm implementing a language for embedded development after all. you don't reopen classes there even when you load code at runtime
<whitequark> which isn't common either
<charliesome> whitequark: but if your compiler can't infer a type
<charliesome> whitequark: so i could go x = (Fixnum)foo.bar("hello")
<whitequark> charliesome: it always can, that's the whole point of static typing
<whitequark> methods are bound early.
<charliesome> or foo.send(id)
<judofyr> whitequark: wow, ivar typing looks kinda neat
leopard_me has joined #ruby-lang
<whitequark> charliesome: which, yes, means that you won't be able to use completely dynamic #send
<whitequark> and yes, some #method_missing cases would be prohibited. the decorator pattern is still there, through, and perfectly supported
<whitequark> find_all_by_... -- maybe, probably yes, too.
<whitequark> judofyr: yeah.
<whitequark> another thing is that you don't need to write any typing annotations for compile-time code, i.e. metaprogramming
<whitequark> you just write plain old ruby
<whitequark> even better, you don't actually lose duck typing. suppose you have a method which expects something to have #each, and it's called with arguments of three distinct types
jammanbo has joined #ruby-lang
<whitequark> basically, three variants of that method will be generated (and possibly coalesced if the optimizer could do that)
<whitequark> and you won't need any typing annotations.
<whitequark> Ruby doesn't have explicit interfaces, and, I believe, there is no point in trying to add them. They just won't work.
<jammanbo> Are there any RVM verterans here who can tell me why rvmsudo can't find my thin? http://pastie.org/5483607. #rvm channel is silent.
<judofyr> jammanbo: does `rvmsudo /home/pant/.rvm/gems/ruby-1.9.3-p327/bin/thin` work?
<whitequark> judofyr, charliesome: there will (I hope) be a big blog post in a few days about all these things
<whitequark> I'm afk for a hour
<judofyr> whitequark: \o/
<whitequark> through I read the backlog
Guest37862 has quit [Ping timeout: 255 seconds]
banister_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend> whitequark: do you write your posts in both cyrillic and english?
<jammanbo> judofyr: Oh, it does! But why, when rvmsudp echo $PATH suggests to me that's not necessary.
<charliesome> STДTIC TУPIИG IЙ THЗ ЯЦЬЧ
<yorickpeterse> wat
<judofyr> banisterfiend: don't you mean "russian"?
<judofyr> jammanbo: $PATH is probably expanded before rvmsudo is called
mossplix has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby-lang
<jammanbo> judofyr: Ah. Thanks.
<banisterfiend> judofyr: Yeah, i just wanted to say cyrillic
<banisterfiend> it's a cute word
<judofyr> jammanbo: try: `echo 'echo $PATH' | rvmsudo bash`
<judofyr> (I think)
<judofyr> shell is hard
<judofyr> acutally, `rvmsudo bash -c 'echo $PATH'` should work
<judofyr> banisterfiend: true
<jammanbo> judofyr: They both have a path that should pick up thin. Anyway, Ill crack on with full paths for the moment. Thanks again.
<judofyr> jammanbo: hm… I don't know enough about bash unfortunately :(
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
sheerun has joined #ruby-lang
cirenyc has joined #ruby-lang
joaoroberto has joined #ruby-lang
joaoroberto has quit [Client Quit]
joaoroberto has joined #ruby-lang
<banisterfiend> judofyr: have you read 'ruby under microscope' ?
<judofyr> banisterfiend: nope
anannie has joined #ruby-lang
<banisterfiend> it's pretty sweet, lots of info on YARV internal stack i didnt know about
<banisterfiend> opens up possibilities for all sorts of horrible hacks :D
srbaker has quit [Quit: Computer has gone to sleep.]
joaoroberto has left #ruby-lang [#ruby-lang]
jbald has joined #ruby-lang
<injekt> bahhhhhhhh
<injekt> funny rvm is being discussed, it is the bane of my life this morning
jammanbo has left #ruby-lang [#ruby-lang]
Hakon has quit [Quit: Leaving...]
<judofyr> injekt: rbenv works fine :)
<injekt> judofyr: yup, been using it for months. Had to clean up all my teams envs, though
<injekt> and they were all using the same environment I was using back then, which has changed a little
<injekt> 'all my teams' lol, 2 people
jbald has quit [Quit: jbald]
leopard_me has quit [Quit: Computer has gone to sleep.]
leopard_me has joined #ruby-lang
mindbender1 has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
masterkorp has joined #ruby-lang
<masterkorp> hello
spuk has quit [Ping timeout: 264 seconds]
krz has joined #ruby-lang
<masterkorp> Can you omit return at the end of a funtion ?
<injekt> masterkorp: try it?
<yorickpeterse> apeiros_: yes
<yorickpeterse> errr
<masterkorp> i often see just a var at the end of a fuction and i get confused
<yorickpeterse> masterkorp: yes
<apeiros_> yorickpeterse: yes!
<injekt> method*
<yorickpeterse> By default Ruby methods return the last evaluated expression
<apeiros_> che?
<injekt> apeiros_: yes!
<injekt> yorickpeterse: yes
<yorickpeterse> apeiros_: que?
<apeiros_> injekt: yes!
<masterkorp> that is weird to to read
<apeiros_> yorickpeterse: d'oh
<injekt> masterkorp: it's optional, some people prefer it
<apeiros_> yorickpeterse: ¿que?
<masterkorp> well i dont
<injekt> ok..
xyzodiac has joined #ruby-lang
jtoy has joined #ruby-lang
s1n4 has quit [Quit: leaving]
kurko__ has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cirenyc has quit [Quit: Leaving...]
waffleau has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
gaveen has quit [Ping timeout: 244 seconds]
vlad_starkov has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
jtoy has quit [Quit: jtoy]
marr has quit [Ping timeout: 264 seconds]
cirenyc has joined #ruby-lang
rsl has joined #ruby-lang
heftig has quit [Quit: leaving]
<whitequark> banisterfiend: only in english
<whitequark> I used to write posts in russian, but there is not enough rubyists here for me to care, and the ones I do care about all know English anyway
m3nd3s has joined #ruby-lang
<banisterfiend> whitequark: what about your good russian hacker friends homokov and funny falcon
sepp2k has quit [Quit: Leaving.]
<banisterfiend> whitequark: i see plenty of russian/ukranian rubyists around anyway..
arya has joined #ruby-lang
sailias has joined #ruby-lang
waffleau has left #ruby-lang [#ruby-lang]
<masterkorp> banisterfiend: as a portuguese minority, i gave up on writing in portuguese
<masterkorp> english is simple and opens the text/code whatever to the whole world
waffleau has joined #ruby-lang
arya has left #ruby-lang [#ruby-lang]
<judofyr> not much written in Norwegian either
<judofyr> but pretty much everyone in Norway speaks English
xyzodiac has quit [Quit: Computer has gone to sleep.]
marr has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<injekt> yeah guys me too
<injekt> :/
Uranio has quit [Quit: WeeChat 0.3.8]
SubSpawn has joined #ruby-lang
Uranio has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
<imperator> american here....me too
cirenyc has joined #ruby-lang
davidbalber|away is now known as davidbalbert
rue|w has quit [Ping timeout: 248 seconds]
Weems has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
sepp2k has joined #ruby-lang
bastilian has joined #ruby-lang
davidbalbert is now known as davidbalber|away
outoftime has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
lcdhoffman has joined #ruby-lang
mars777 has joined #ruby-lang
sailias has quit [Quit: Leaving.]
sailias has joined #ruby-lang
<andrewvos> injekt: You pinged?
gnufied has quit [Quit: Leaving.]
cirenyc has quit [Quit: Leaving...]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
gsav has quit [Client Quit]
gsav_ has quit [Client Quit]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
methods has joined #ruby-lang
rippa has joined #ruby-lang
outoftime has quit [Ping timeout: 260 seconds]
gsav has quit [Client Quit]
gsav_ has quit [Client Quit]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
areil has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
davidbalber|away is now known as davidbalbert
xyzodiac has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
krz has quit [Quit: krz]
kitallis has quit [Read error: Connection reset by peer]
slyphon has joined #ruby-lang
thisirs has joined #ruby-lang
heftig has joined #ruby-lang
gnufied has joined #ruby-lang
kitallis has joined #ruby-lang
davidbalbert is now known as davidbalber|away
mossplix_ has quit [Quit: mossplix_]
outoftime has joined #ruby-lang
davidbalber|away is now known as davidbalbert
enebo has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
davidbalbert is now known as davidbalber|away
cirenyc has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
waffleau_ has joined #ruby-lang
waffleau has quit [Read error: Connection reset by peer]
cirenyc has quit [Ping timeout: 240 seconds]
sent-hil has joined #ruby-lang
nerd has joined #ruby-lang
xyzodiac has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
xyzodiac has quit [Client Quit]
agarcia has quit [Quit: Konversation terminated!]
dr_bob has quit [Quit: Leaving.]
chimkan has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
zmack has quit [Remote host closed the connection]
zmack has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
|Vargas| has quit [Quit: ...]
ddd has joined #ruby-lang
gnufied has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
andrewhl has joined #ruby-lang
davidbalber|away is now known as davidbalbert
solars has quit [Ping timeout: 252 seconds]
judofyr has quit [Remote host closed the connection]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cirenyc has joined #ruby-lang
xyzodiac has joined #ruby-lang
cirenyc has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
anannie has quit [Remote host closed the connection]
gmci has joined #ruby-lang
gmci has quit [Client Quit]
datanoise has joined #ruby-lang
weeb1e_ has quit [Read error: Connection reset by peer]
weeb1e has joined #ruby-lang
gmci has joined #ruby-lang
gmci is now known as Guest65243
seydar has joined #ruby-lang
<seydar> Mon_Ouie: regarding coolline, do you know why coolline disregards all input typed before the prompt? how could this be fixed?
<Mon_Ouie> Not sure why it happens. I wonder if it has to do with how IO#getch works.
andrewhl has quit [Remote host closed the connection]
Guest65243 has quit [Ping timeout: 248 seconds]
jbsan has quit [Read error: No route to host]
xyzodiac has quit [Quit: Computer has gone to sleep.]
jbsan has joined #ruby-lang
<seydar> hm. i'll look around io/console
seydar has quit [Quit: leaving]
nXqd_ has joined #ruby-lang
nXqd has quit [Ping timeout: 244 seconds]
thisirs has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<sent-hil> is there a way to pass flags to rspec?
<sent-hil> "rspec --something true"
gmci_ has joined #ruby-lang
gmci_ has quit [Max SendQ exceeded]
havenn has quit [Read error: Connection reset by peer]
apod has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 260 seconds]
<GarethAdams> sent-hil: you mean other than by doing exactly what you just gave as an example?
<masterkorp> err
<sent-hil> GarethAdams: that's invalid code
gmci has joined #ruby-lang
gmci is now known as Guest66847
<injekt> sent-hil: configuration options for rspec or for using in ARGV ?
<sent-hil> injekt: former, i want to run some code in RSpec.configure blk based on the flags
bastilian has quit [Quit: Leaving...]
<injekt> sent-hil: rspec allows you to pass configuration values to the runner exactly how you're done it, I'm not sure why it's not working for you. Can you paste a backtrace?
<sent-hil> same for rspec --something true rspec_flags.rb too
<injekt> sent-hil: right, 'something' isn't a valid configuration option..
<sent-hil> injekt: right, i want to specify custom config options
<injekt> sent-hil: I doubt rspec allows that, you could pass them in via ARGV (I believe rspec file.rb -- --something true should work)
<injekt> sent-hil: then that leaves you having to parse those args, though
<sent-hil> injekt: ah
waffleau_ has left #ruby-lang [#ruby-lang]
gnufied has quit [Quit: Leaving.]
BlaXpirit has joined #ruby-lang
<injekt> sent-hil: you could use rspec -r custom_file.rb foo.rb where your custom_file.rb contains runtime loaded configuration options
<injekt> it's messy, but the alternative is probably an option parser
<sent-hil> env vars work as well
<sent-hil> thx injekt
<injekt> ah of course :) just how you'd do it with rake
<injekt> no probs
agnitio has quit [Quit: Leaving]
guns has joined #ruby-lang
dankest has joined #ruby-lang
xyzodiac has joined #ruby-lang
xyzodiac has quit [Max SendQ exceeded]
ruskie has quit [Quit: ...]
davidbalbert is now known as davidbalber|away
xyzodiac has joined #ruby-lang
xyzodiac has quit [Max SendQ exceeded]
xyzodiac has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
dr_bob has joined #ruby-lang
xyzodiac has quit [Max SendQ exceeded]
xyzodiac has joined #ruby-lang
havenn has joined #ruby-lang
chimkan has quit [Quit: chimkan]
chimkan has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ryanlecompte has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
ryanlecompte has joined #ruby-lang
JohnBat26 has quit [Ping timeout: 252 seconds]
mindbender1 has quit [Ping timeout: 265 seconds]
arya has joined #ruby-lang
arya has left #ruby-lang [#ruby-lang]
methods has left #ruby-lang [#ruby-lang]
Nisstyre-laptop has joined #ruby-lang
enebo has quit [Quit: enebo]
towski has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
ruskie has joined #ruby-lang
alvaro_o has joined #ruby-lang
datanoise has quit [Ping timeout: 264 seconds]
xyzodiac has quit [Ping timeout: 256 seconds]
sent-hil has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
__butch__ has joined #ruby-lang
runeb has joined #ruby-lang
jbsan has quit [Read error: No route to host]
seydar has joined #ruby-lang
gregmoreno has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
chimkan has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
runeb has quit [Ping timeout: 248 seconds]
Aiur has joined #ruby-lang
jbsan has joined #ruby-lang
xyzodiac has joined #ruby-lang
agile has joined #ruby-lang
mindbender1 has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
wallerdev has joined #ruby-lang
lcdhoffman has joined #ruby-lang
elcapo has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
enebo has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
<andrewvos> injekt: You pinged yesterday?
wallerdev has quit [Ping timeout: 260 seconds]
intellitech is now known as aeberlin
Paradox has quit [Read error: Operation timed out]
luikore has joined #ruby-lang
davidbalber|away is now known as davidbalbert
seydar has quit [Quit: leaving]
datanoise has joined #ruby-lang
dankest has quit [Ping timeout: 246 seconds]
towski has joined #ruby-lang
Paradox has joined #ruby-lang
bastilian has joined #ruby-lang
sent-hil has joined #ruby-lang
mindbender1 has quit [Ping timeout: 265 seconds]
m3nd3s has joined #ruby-lang
enebo has quit [Quit: enebo]
datanoise has quit [Ping timeout: 240 seconds]
ruby-lang041 has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
gregmoreno has quit [Remote host closed the connection]
<tockitj_> is anyone actively using 1.9 column syntax (:) for hashes instead of hash-rockets (=>)
<ddd> i do
rhizo has quit [Quit: Ex-Chat]
wallerdev has joined #ruby-lang
gregmoreno has joined #ruby-lang
<tockitj_> ddd, they've been around for a while, and i haven't seen anyone embracing them (:
<tockitj_> though - its nice to be able to just eval(json)
davidbalbert is now known as davidbalber|away
zmack has quit [Remote host closed the connection]
luikore has quit [Remote host closed the connection]
<ddd> :shrug: not everyone uses every option available to them, most are probably just used to doing it a specific way and just keep doing so.
<tockitj_> <3 => <3
JohnBat26 has joined #ruby-lang
cardoni has quit [Quit: cardoni]
sailias has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
cirenyc has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
ruby-lang041 has quit [Ping timeout: 245 seconds]
enebo has joined #ruby-lang
<ddd> i came in when 1.9.2 was just starting to get rolling, so i took to the : vs. => format. Plus I like the shorter syntax, but thats admittedly a personal choice.
<reactormonk> tockitj_, eval(json) is evil anyway
leopard_me has quit [Quit: Computer has gone to sleep.]
luikore has joined #ruby-lang
davidbalber|away is now known as davidbalbert
Aiur has quit [Quit: Computer has gone to sleep.]
llakey_ is now known as llakey
davidbalbert is now known as davidbalber|away
kurko__ has quit [Ping timeout: 250 seconds]
dr_bob has left #ruby-lang [#ruby-lang]
areil has quit [Remote host closed the connection]
<tockitj_> reactormonk, power compensates
dc5ala has quit [Quit: Ex-Chat]
xyzodiac has joined #ruby-lang
datanoise has joined #ruby-lang
Aiur has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
luikore has quit [Quit: Leaving]
zmack has joined #ruby-lang
lcdhoffman has joined #ruby-lang
AREX has joined #ruby-lang
headius has joined #ruby-lang
zmack has quit [Ping timeout: 240 seconds]
datanoise has quit [Ping timeout: 252 seconds]
AREX has quit [Client Quit]
dankest has joined #ruby-lang
ruby-lang950 has joined #ruby-lang
luikore has joined #ruby-lang
<ruby-lang950> hi i have a quick question. new to ruby, from PHP. I'm not using rails yet. I'd like to make an AJAX request to my .rb file, but it just returns the contents of the file, not the product of running it. what's up?
<bougyman> ruby-lang950: ruby is not php.
<bougyman> the issue is your web server does not have a native ruby interpreter.
<bougyman> you ran php in apache, i'm assuming.
<ruby-lang950> yeah
rue|w has joined #ruby-lang
<bougyman> if you ran it in another webserver that didn't have it built in it would be more like running a ruby app.
<ruby-lang950> currently using xampp on my mac
<ruby-lang950> right right
<bougyman> there's one way out there to do so, it's called Passenger.
<bougyman> it runs on nginx and apache.
<bougyman> take a look.
<ruby-lang950> great thank you. looking now
<bougyman> but i think you're on about step 15 and skipped a few steps.
<bougyman> what are you using for your cgi layer?
elcapo is now known as Elcapo
<bougyman> CGI? fastcgi? Rack? (hopefully rack)
cultureulterior_ has quit [Quit: cultureulterior_]
<bougyman> these are things you don't have to think about in php.
<bougyman> ruby wasn't built solely for the web as php was.
<ruby-lang950> right
<ruby-lang950> i'm using the CGI gem
<ruby-lang950> so...
<bougyman> gotcha.
xyzodiac has quit [Quit: Computer has gone to sleep.]
<ruby-lang950> ssomething like cgi.params to get my post variables
<bougyman> yep ype.
<ruby-lang950> cool
<ruby-lang950> i'm slighty confused though
<ruby-lang950> i am running xampp on my mac
<bougyman> i've used it, i was using ruby before the web framework boom. web was one of the things ruby was pretty crappy at, before rack and the other frameworks focused on it.
<ruby-lang950> and i have ruby on my mac
<ruby-lang950> the missing link is that xampp doesn't know where the interpreter is?
anannie has joined #ruby-lang
Elcapo is now known as elcapo
<bougyman> apache isn't treating it as a cgi
<bougyman> you have it marked as executable by the user running apache, right?
<ruby-lang950> ah
<ruby-lang950> no
<bougyman> by the way, it will be really slow.
<bougyman> cause it has to spawn a ruby interpreter for every request.
<ruby-lang950> hm
<bougyman> fastcgi is your next level up, where one interpreter is spawned and handles many requests.
<ruby-lang950> there is only one object i'm passing to ruby
<bougyman> rack is kind of the standard. all the major webframeworks utilize rack for that layer.
<ruby-lang950> speed is not important right now, somewhat in concept mode
<bougyman> the ruby interpreter itself is not light. once it's up it can perform plenty well enough for web, but the startup time on each request would be painful. Fine for testing, just want your expectations set right.
<ruby-lang950> but i will look up rack and passenger
judofyr has joined #ruby-lang
<ruby-lang950> okay cool
<ruby-lang950> so how would i mark .rb files as executables?
<ruby-lang950> in my .htaccess?
<bougyman> chmod u+x the.rb
<bougyman> and chown <webuser> the.rb
<bougyman> apache has to be configged to allow cgis in the location, as well.
tbuehlmann has quit [Remote host closed the connection]
<ruby-lang950> okay
solars has joined #ruby-lang
dbussink has quit [Quit: Coyote finally caught me]
dbussink has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
chimkan__ has joined #ruby-lang
chimkan__ has quit [Remote host closed the connection]
<ruby-lang950> bougyman, how do i find out what xampps <webuser> name is ?
chimkan___ has joined #ruby-lang
cardoni has joined #ruby-lang
chimkan has quit [Ping timeout: 255 seconds]
chimkan___ is now known as chimkan
dankest has quit [Quit: Linkinus - http://linkinus.com]
tenderlove has joined #ruby-lang
nXqd_ has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
ryanf has quit [Ping timeout: 252 seconds]
UberNerdBoy has joined #ruby-lang
UberNerdBoy has left #ruby-lang [#ruby-lang]
chimkan___ has joined #ruby-lang
mrsolo has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
m3nd3s has joined #ruby-lang
ryanf has joined #ruby-lang
ryanf has quit [Client Quit]
rippa has quit [Ping timeout: 260 seconds]
chimkan has quit [Ping timeout: 265 seconds]
chimkan___ is now known as chimkan
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
davidbalber|away is now known as davidbalbert
tjadc has quit [Ping timeout: 252 seconds]
lcdhoffman has joined #ruby-lang
zmack has joined #ruby-lang
luikore has quit [Quit: WeeChat 0.3.9]
z2 has joined #ruby-lang
Paradox has quit [Read error: Operation timed out]
z2 has quit [Client Quit]
judofyr has quit [Ping timeout: 256 seconds]
lcdhoffman has quit [Ping timeout: 246 seconds]
jds_ has quit [Ping timeout: 252 seconds]
joaovrmaia has quit [Quit: joaovrmaia]
adambeynon has joined #ruby-lang
blazes816 has joined #ruby-lang
Paradox has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
Aiur has quit [Quit: Computer has gone to sleep.]
Aiur has joined #ruby-lang
mindbender1 has joined #ruby-lang
ryanf has joined #ruby-lang
ryanf has quit [Client Quit]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
chrismcg is now known as zz_chrismcg
krohrbaugh has joined #ruby-lang
guns has quit [Quit: guns]
davidbalbert is now known as davidbalber|away
snk has joined #ruby-lang
ebouchut has joined #ruby-lang
cardoni has quit [Quit: Linkinus - http://linkinus.com]
vlad_starkov has quit [Ping timeout: 252 seconds]
tjadc has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<akahn> is glob less efficient than Dir#each if I'm iterating over every file in a directory?
llaskin has left #ruby-lang [#ruby-lang]
<pabs> the time for io and context switches is almost certainly going to dominate each, but technically glob is slightly less efficient
<pabs> (io being, specifically, stat() calls on every entry)
bluepojo has joined #ruby-lang
<akahn> pabs: i'm not seing stat() in strace on a big glob call http://pastie.org/5485503 . maybe this is because stat has already happened and the process is now expanding the ** part of the glob
xyzodiac has joined #ruby-lang
anannie has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
Croms has joined #ruby-lang
anannie has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
z1 has joined #ruby-lang
z1 has quit [Client Quit]
cirwin has joined #ruby-lang
Uranio has quit [Quit: WeeChat 0.3.8]
cirenyc has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
z_ has joined #ruby-lang
havenn has joined #ruby-lang
z_ is now known as Guest93397
Guest93397 has quit [Client Quit]
enebo has quit [Quit: enebo]
thatdutchguy has joined #ruby-lang
z__ has joined #ruby-lang
z__ has quit [Client Quit]
luikore has joined #ruby-lang
zz_chrismcg is now known as chrismcg
jds__ has joined #ruby-lang
jds__ has quit [Ping timeout: 252 seconds]
Paradox has quit [Ping timeout: 252 seconds]
pedromedeiros has quit [Quit: Saindo]
PhilCK has joined #ruby-lang
rue|w has joined #ruby-lang
crudson has quit [Remote host closed the connection]
PhilCK has left #ruby-lang [#ruby-lang]
t_ has quit [Ping timeout: 248 seconds]
<ged> akahn, pabs: I shouldn't think glob would stat,() since it's just a front end for fnmatch(3) over the file names, right?
<ged> And the worst case (where glob matches every file) should be equivalent to Dir#each, but better in every other case.
rue|w has quit [Ping timeout: 255 seconds]
steez has quit [Ping timeout: 250 seconds]
steez has joined #ruby-lang
steez is now known as Guest52470
cirwin has quit [Ping timeout: 264 seconds]
jbald has joined #ruby-lang
cored has quit [Read error: Connection reset by peer]
simi has quit [Ping timeout: 244 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
pdswan has quit [Quit: pdswan]
<zzak> ged: hi
slyphon_ has joined #ruby-lang
<ged> Hi.
pdswan has joined #ruby-lang
elcapo has quit [Ping timeout: 244 seconds]
<zzak> ged: i saw rdoc 4 broke your fivefish generator :( and couldnt get to your site
<ged> Ah, yeah. That's on my list of things to work on.
rolfb has joined #ruby-lang
<zzak> :D
rolfb has quit [Client Quit]
slyphon has quit [Ping timeout: 245 seconds]
<zzak> i was hoping to use it for my gem's docs, but i needed to parse markdown in the README, which only rdoc 4 can do
<ged> And my CMS crashed, but it should be back up now.
<akahn> hm, each contains '.' and '..' so I'll have to skip those manually... whereas glob only returns files
<ged> Yeah. Hopefully this weekend, I'll have it sorted.
<zzak> yay
srbaker has joined #ruby-lang
<zzak> thank you!
jbald has quit [Ping timeout: 255 seconds]
<ged> I'm excited about RDoc 4, and I have a couple of patches in it myself, so even more motivation to get it done. :P
burgestrand has joined #ruby-lang
Paradox has joined #ruby-lang
willdrew has quit [Ping timeout: 264 seconds]
<zzak> ged: i used it for my gem: http://zacharyscott.net/glorify
<zzak> the readme is a .md file, and rdoc4 easily parsed it and can use it as the main file with RdocTask
<ged> Oh, oops, that's Darkfish. Darkfish is the default HTML template now.
<zzak> yeah, i wanted to use fivefish but it's broke with rdoc 4
<ged> Oh, right. I see now. :P
<zzak> rdoc is still preview2
<zzak> drbrain: may accept fivefish as default generator in rdoc 4 if you ask nicely
<zzak> (and fix it :P)
<ged> Nah, it has external dependencies. :P
<ged> And I don't want him to anyway. I couldn't really keep tweaking darkfish after it was merged.
Andvari3D has joined #ruby-lang
outoftime has quit [Ping timeout: 250 seconds]
<ged> Well, I could, but not on a whim anymore.
bhus has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
marr has joined #ruby-lang
enebo has joined #ruby-lang
<zzak> it's still a nice alternative
dalekurt has quit [Quit: I'll be back!]
lcdhoffman has joined #ruby-lang
dalekurt has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
ruby-lang950 has quit [Ping timeout: 245 seconds]
pab|o has quit [Read error: Operation timed out]
imperator has quit [Quit: Leaving]
Weems|brokenkeyb has joined #ruby-lang
bhus has quit [Quit: Leaving]
tenderlove has joined #ruby-lang
m3nd3s has joined #ruby-lang
rue|w has joined #ruby-lang
cirwin has joined #ruby-lang
totallymike has joined #ruby-lang
tenderlove has quit [Ping timeout: 246 seconds]
xyzodiac has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
sent-hil has joined #ruby-lang
tenderlove has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
adambeynon has quit [Quit: Computer has gone to sleep.]
cirenyc has joined #ruby-lang
seanstickle has joined #ruby-lang
t_ has joined #ruby-lang
bluepojo has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
lcdhoffman has quit [Read error: Connection reset by peer]
srbaker has quit [Quit: Computer has gone to sleep.]
outoftime has joined #ruby-lang
sailias has quit [Quit: Leaving.]
davidbalber|away is now known as davidbalbert
s0ber_ has joined #ruby-lang
s0ber has quit [Ping timeout: 248 seconds]
s0ber_ is now known as s0ber
Nisstyre-laptop has quit [Quit: Leaving]
io_syl has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
ryanf has joined #ruby-lang
lcdhoffman has joined #ruby-lang
srbaker has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
luikore has quit [Quit: WeeChat 0.3.9]
workmad3 has joined #ruby-lang
mjio has joined #ruby-lang
davidbalbert is now known as davidbalber|away
setmeaway2 has quit [Ping timeout: 260 seconds]
gaveen has quit [Remote host closed the connection]
setmeaway has joined #ruby-lang
simi has joined #ruby-lang
pkrnj has joined #ruby-lang
singpolyma has quit [Ping timeout: 245 seconds]
cirenyc has quit [Quit: Linkinus - http://linkinus.com]
sent-hil has quit [Remote host closed the connection]
wardrop has joined #ruby-lang
runeb has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
seanstickle has quit [Quit: seanstickle]
anannie has quit [Remote host closed the connection]
runeb has quit [Ping timeout: 246 seconds]
singpolyma has joined #ruby-lang
zmack has quit [Remote host closed the connection]
<injekt> andrewvos: yeah I forgot why :S
workmad3 has quit [Ping timeout: 260 seconds]
<masterkorp> injekt: do you ram the paper frequetly and refuse to work like my injekts ? :)
achiu has quit [Quit: WeeChat 0.3.9.2]
outoftime has quit [Ping timeout: 246 seconds]
rue has quit [Remote host closed the connection]
<injekt> masterkorp: yup. On purpose, every. single. time.
<injekt> Why? because fuck you that's why
<masterkorp> haha
* masterkorp is happy he does not uses printers anymore
<injekt> same
<masterkorp> the source of all evil
brianpWins has joined #ruby-lang
brianpWins has quit [Client Quit]
brianpWins has joined #ruby-lang
chrismcg is now known as zz_chrismcg
mindbender1 has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby-lang
<zzak> i still use mine
enebo has quit [Quit: enebo]
simi has quit [Ping timeout: 244 seconds]
outoftime has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
ddd has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
slyphon_ has quit [Ping timeout: 245 seconds]
Carnage\ has joined #ruby-lang
achiu has joined #ruby-lang
sent-hil has joined #ruby-lang
toretore has quit [Quit: Leaving]
achiu has quit [Client Quit]
anannie has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
gregmore_ has joined #ruby-lang
rue has joined #ruby-lang
gsav_ has quit [Ping timeout: 260 seconds]
achiu has joined #ruby-lang
davidbalber|away is now known as davidbalbert
gregmoreno has quit [Ping timeout: 255 seconds]
Carnage\ has quit []
nertzy3 has quit [Read error: Connection reset by peer]
nertzy3 has joined #ruby-lang
<sent-hil> is there a way to get fb access token from a terminal?
achiu has quit [Quit: WeeChat 0.3.9.2]
Axsuul has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
banisterfiend has quit [Ping timeout: 240 seconds]
simi has joined #ruby-lang
nerd is now known as fire_wall
davidbalbert is now known as davidbalber|away
slyphon_ has joined #ruby-lang
andrewhl has joined #ruby-lang
outoftime has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby-lang
<banisterfiend> Hi
<banisterfiend> Anyone familar with vm,c?
<banisterfiend> Vm.c
Axsuul has quit [Ping timeout: 256 seconds]
ruby-lang338 has joined #ruby-lang
ruby-lang338 has quit [Client Quit]
banisterfiend is now known as banistertab
charliesome has joined #ruby-lang
slyphon__ has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
slyphon_ has quit [Ping timeout: 245 seconds]
apeiros_ has quit [Remote host closed the connection]
achiu has joined #ruby-lang
<sent-hil> figured out w/ capybara
<drbrain> banistertab: how so?
spuk has joined #ruby-lang