nertzy has quit [Quit: This computer has gone to sleep]
Criztian has joined #ruby-lang
znowi_ has left #ruby-lang [#ruby-lang]
umttumt has quit [Remote host closed the connection]
znowi has joined #ruby-lang
knu has joined #ruby-lang
cha1tanya has quit [Ping timeout: 240 seconds]
Criztian has quit [Remote host closed the connection]
dc5ala has joined #ruby-lang
therod has joined #ruby-lang
QoQOoO has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby-lang
cha1tanya has joined #ruby-lang
solars has joined #ruby-lang
dhruvasagar has joined #ruby-lang
GarethAdams has joined #ruby-lang
GarethAdams has quit [Client Quit]
skidoosh has quit [Remote host closed the connection]
Weems|test has joined #ruby-lang
Weems|test has quit [Changing host]
Weems|test has joined #ruby-lang
Weems|test has quit [Excess Flood]
workmad3 has quit [Ping timeout: 245 seconds]
Weems|test has joined #ruby-lang
Weems|test has quit [Excess Flood]
Criztian has joined #ruby-lang
ryez has quit [Quit: Page closed]
savage- has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
ryez has joined #ruby-lang
neoesque has quit [Quit: Bye!]
boardyuk has joined #ruby-lang
savage- has joined #ruby-lang
QoQOoO has quit [Remote host closed the connection]
Weems|test has joined #ruby-lang
Weems|test has quit [Changing host]
Weems|test has joined #ruby-lang
Weems|test has quit [Excess Flood]
Weems|test has joined #ruby-lang
Weems|test has quit [Changing host]
Weems|test has joined #ruby-lang
Weems|test has quit [Excess Flood]
s0ra_h is now known as sora_h
Fretta has quit [Quit: Fretta]
poloych has joined #ruby-lang
spinagon has joined #ruby-lang
concernedcitizen has joined #ruby-lang
concernedcitizen has quit [Changing host]
concernedcitizen has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
Weems|test has joined #ruby-lang
Weems|test has quit [Excess Flood]
<mfn>
I've a sinatra app instrumened through a minimal config.ru: "require './myapp' ; require 'logger'; configure :development { set :logging, LOGGER:DEBUG }; run Myapp;'. I was looking at the Rack and Sinatra docs and sources, but I can't figure out how I could provide a new env.logger for Rack and in turn for my Sinatra app to. With this new logger I'd like to log to a file, etc. Can't find examples with
<mfn>
google either ...
deobald_ has joined #ruby-lang
kristofferrr has joined #ruby-lang
Weems|test has joined #ruby-lang
Weems|test has quit [Changing host]
Weems|test has joined #ruby-lang
<burgestrand>
mfn: it appears it uses the Rack::Logger for custom logging
<burgestrand>
Let’s see if there’s a way to change how it behaves.
<burgestrand>
banisterfiend: I think I played Doom 1
<burgestrand>
banisterfiend: I saw Limbo was on sale on steam yesterday or the day before that
<burgestrand>
banisterfiend: also… Civilization 5 is my newest buy, I got kind of stuck in it these past few days. That’s casual if anything, considering it’s turn-based.
<banisterfiend>
burgestrand: yeah, i didnt really like limbo that much in the end
<lianj>
mfn: use Rack::CommonLogger, your_logger
<burgestrand>
mfn: ^ easiest way :p
boardyuk has quit [Read error: Connection reset by peer]
<burgestrand>
mfn: also the env is passed on through middleware, you could put your own middleware in the chain that sets rack.logger
<burgestrand>
… not sure how to go on about setting it without middleware though. Hmm.
<mfn>
Rackup provides so many useful features for integrating into e.g. init.d (daemonize, pidfile), I wish it had something like --log <file> too, which would automatically provide a Logger to a file
<lianj>
rackup >> foo ?
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
<lianj>
also, which server do you use? thin?
ryanf has quit [Quit: leaving]
d3vic3 has quit [Ping timeout: 245 seconds]
<mfn>
lianj: I just use rackup right now, so I think it defaults to webrick
d3vic3 has joined #ruby-lang
QoQOoO has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
levicole has quit [Ping timeout: 245 seconds]
spectra has quit [Ping timeout: 245 seconds]
adgar has quit [Ping timeout: 252 seconds]
Criztian has quit [Remote host closed the connection]
blowmage has quit [Read error: Operation timed out]
yellow5 has quit [Ping timeout: 245 seconds]
steez has quit [Ping timeout: 252 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
henrikhodne has quit [Read error: Connection reset by peer]
ioga_wrk has joined #ruby-lang
Hakon has joined #ruby-lang
neoesque has joined #ruby-lang
henrikhodne has joined #ruby-lang
postmodern has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
umttumt has joined #ruby-lang
QoQOoO has quit [Read error: Connection reset by peer]
QoQOoO has joined #ruby-lang
sora_h is now known as s0ra_h
mssola has joined #ruby-lang
<mfn>
lianj: I'm trying this approach, but this logger will only log the "request line", e.g. "<ip> - - [date/time] "GET / HTTP/1.1" 200 ...". My use of logger.info or logger.debug within a get-block of my app still only gets to STDOUT. Google lead me to this, looking into it now: http://stackoverflow.com/questions/2239240/use-rackcommonlogger-in-sinatra
poloych has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
tomb has quit [Quit: Computer has gone to sleep.]
<burgestrand>
Heh, turns out it actually goes to env['rack.logger']
<burgestrand>
banisterfiend: all swedes are blonde, dude
<zenspider>
retro|cz: assert
^sandbags^ has quit [Ping timeout: 248 seconds]
<retro|cz>
zenspider, hmm
<retro|cz>
zenspider, I'm using page.has_content?('test').must_equal true, but assert page.has_content?('test') looks good.
<burgestrand>
mfn: alright, so all rack applications require rack.errors to be set up at the start of a request. All handlers (ie. all servers) must set this somewhere.
<burgestrand>
mfn: by default in mongrel (for example) it’s set to $stderr.
tooky has joined #ruby-lang
<burgestrand>
mfn: now, if you use Rack::Logger it will also setup rack.logger for you
<burgestrand>
mfn: by default this just creates a new ruby Logger which logs its output to the rack.errors
<burgestrand>
mfn: … and then assigns itself to rack.logger (both rack.logger and rack.errors are environment variables available in the "env" hash on every request)
<burgestrand>
mfn: however, Rack::Logger only allows configuring log level and not the actual logger, so I believe you will need your own middleware in place of Rack::Logger. I know Sinatra does something with the logger as well, however.
ryez has quit [Ping timeout: 245 seconds]
<burgestrand>
However if khaase is here perhaps he knows the right way to do this :)
<mfn>
I'd say this almost works fine. When I simply exec "rackup", I get the request line info on the console and my log calls to the file
<mfn>
I now need to figure out, how I could also have the requests in my file too (because just the debug/info without the actual request isn't that useful)
<burgestrand>
mfn: what are you using to log the request?
kaspernj has joined #ruby-lang
<mfn>
burgestrand: well, I was going to figure that out now .. :) Probably trying to set my Logger for the Rack::CommonLogger too ...
<burgestrand>
mfn: anyhow, some middleware like this to change the default logger: http://pastie.org/private/gmj0jylkku5iaxhes63vg — but if you want *all* output to go to your logger file you’d replace rack.errors instead of rack.logger
pemeon has joined #ruby-lang
<burgestrand>
because for example if sinatra crashes it will dump the error information to rack.errors, and not rack.logger
gnufied has joined #ruby-lang
zmack has quit [Ping timeout: 246 seconds]
<banisterfiend>
zenspider: working on anything k00 these days? :P
<banisterfiend>
new projects* i mean
<burgestrand>
mfn: I’ll whip up something quick, just a seocnd.
<mfn>
cool
Hakon has quit [Quit: Leaving...]
<zenspider>
banisterfiend: new? no. trying to get bugs in ruby_parser 1.9 support flushed out
<banisterfiend>
awesome
QoQOoO has quit [Remote host closed the connection]
rolfb has joined #ruby-lang
thone has joined #ruby-lang
<burgestrand>
mfn: having some issues with the middleware chain :)
cbetta has joined #ruby-lang
cbetta has quit [Changing host]
cbetta has joined #ruby-lang
vmoravec has joined #ruby-lang
neoesque has quit [Quit: Leaving...]
thone_ has quit [Ping timeout: 264 seconds]
s0ra_h is now known as sora_h
<mfn>
np
boardyuk_ has joined #ruby-lang
boardyuk has quit [Read error: Connection reset by peer]
boardyuk_ has quit [Read error: Connection reset by peer]
<burgestrand>
mfn: alright, given that this middleware needs to be so far up the middleware chain it really needs to be put in config.ru, it’s not enough to use it in the sinatra application if I understand correctly :o
<burgestrand>
Actually, no idea why I require logger there.
<burgestrand>
mfn: http://pastie.org/private/p916cbqifvficvrggjvbow — cleaned it up a little bit, if you are not using the classical style application substitute the Sinatra::Application for your application.
<burgestrand>
mfn: this is the config.ru, by the way. You also need to use the Rack::CommonLogger in your application (if you want it). You could put it in config.ru as well, but I decided against it for now.
<burgestrand>
the data will be routed to output.txt
<burgestrand>
both from the common logger, and the logger.info inside the request
<burgestrand>
mfn: anyway, like before, I wonder why you just don’t route the output using rackup >> output.txt?
<mfn>
O_O
<mfn>
no wait, can't be that simple
<burgestrand>
Granted it appears most rack handlers use $stderr, so you’ll have to redirect that, but apart from that it’s really that simple :)
<mfn>
burgestrand: omg, now I see what lianj meant before ..
<mfn>
burgestrand: ok, i think the answer is: to use --daemonize for starting it from init.d and such
<burgestrand>
hehe, alright :p
<mfn>
(phew...(
<mfn>
)
<burgestrand>
But still, there ought to be some way to redirect it from there using the same method. Don’t all those deamon controllers have some kind of way to control logfiles from stdout/stderr?
<burgestrand>
Was a fun exercise either way, but given this was so convoluted I’d expect there to be a more sane way :)
perryh is now known as perryh_away
setmeaway has quit [Quit: Leaving]
zz_chrismcg is now known as chrismcg
<mfn>
methinks too
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
<mfn>
I think there's also some confusion on my part regarding the CommonLogger: when I look at https://github.com/rack/rack/blob/master/lib/rack/commonlogger.rb#L28 it uses "logger = @logger || env['rack.errors']"; I haven't yet chased what @logger could be, but it certainly can't be of ruby Logger class because there's no #write method provided. So the code calls it logger when in fact it really expects a
<mfn>
stream (because the rack docs also say env['rack.errors'] is a stream)
<mfn>
The only thing from rubys logger providing #write is the logdevice itself; but if just use 'Logger.new("file.log")' there's no LogDevice whatsoever exposed (LogDevice term from here https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L559
<zenspider>
vectorshelve: sooo... did you look into the permissions problem?
<burgestrand>
mfn: @logger is what you give to the initializer, user Rack::CommonLogger, logger
<burgestrand>
s/user/use/
Achena has joined #ruby-lang
<burgestrand>
mfn: if none is specified (default is nil), it uses the error stream in rack.errors
<vectorshelve>
zenspider: when I try running the command using sudo... it just deosnt download at all.. everything stays at 000000
<burgestrand>
mfn: that is why I wrote the Output middleware, to replace the error stream, which appears to default to stderr on both mongrel and thin, but nothing in the rack specification says what it should be (afaik)
<burgestrand>
mfn: instead of doing the Output middleware, you could just reopen $stderr and it should have the same effect, except you can do it pretty much anywhere
<mfn>
burgestrand: yeah, I think this is what confused me. Rack::CommonLogger actually cannot handle stdlib Logger class which is .. weird, given the name
<burgestrand>
mfn: yeah, I was bitten by that too :p
<burgestrand>
Probably more reliable, and definitely clearer.
<mfn>
burgestrand: lol, now that's a nice idea :D
<burgestrand>
:)
<zenspider>
vectorshelve: when you use sudo, it installs in a different location
<vectorshelve>
zenspider: I ran this and it worked sudo apt-get --purge remove ruby-rvm
<burgestrand>
mfn: but I agree. Given that Rack::Logger is actually a Logger (and takes the loglevel), you’d expect Rack::CommonLogger to do the same.
<zenspider>
I'm conflicted why you'd ever mix apt and rvm... but ok
<burgestrand>
mfn: especially since it actually takes the *Logger* as the parameter, not something else.
<burgestrand>
Granted it goes to rack.errors by default (stated in the documentation), but it’s still confusing.
<burgestrand>
mfn: report it as an issue on rack and see what the guys say :)
<vectorshelve>
zenspider: sorry.... actually sought of mixed it up :)
<mfn>
burgestrand: was thinking about, will do
<mfn>
burgestrand: btw, I just realized I *can* use my stdlib Logger with Rack:CommonLogger when I add this: "logger = Logger.new("file.log"); def logger.write(*args); info *args; end" ...:p
<mfn>
I wonder why CommonLogger would use rack.errors any and not just rack.logger with #info
vectorshelve has quit [Quit: Page closed]
gsav has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
<burgestrand>
mfn: clear enough *follows*
<burgestrand>
mfn: thanks :)
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<mfn>
apeshit
neoesque has joined #ruby-lang
neoesque has quit [Client Quit]
<mfn>
I thought my solutionw as clever and nice and working. It may be nice or clever but it's not working. It logs to a file, but the actual message of the info log is not there (but the timestamp is) and my info log line is on the same line as the request info and .. argl. http://pastie.org/private/gkpbeit25ialqmvhy7phya
<mfn>
(I'm ignoring the elegant stderr.reopen solution for now :)
<mfn>
and I needed to strip the data received by write because it introcued duplicate line endings. yeah, #write != #info ...
neocoin has joined #ruby-lang
tubbo`remote has quit [Quit: Connection closed for inactivity]
herpless_ has quit [Quit: Connection closed for inactivity]
pkondzior has quit [Quit: Connection closed for inactivity]
<workmad3>
mfn: iirc, write is actually the method that all the other log messages use...
tallship has quit [Ping timeout: 265 seconds]
<workmad3>
mfn: maybe you actually want/need a 'def mylogger.write(msg); super(msg.strip); end;'
banisterfiend has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
<andrewvos>
ruby-lang: what's a nice interview task that can test someones knowledge of BDD. I'm thinking something like "write code that lists a users latests tweets"
<andrewvos>
Or something like that
<andrewvos>
Something fun though
banisterfiend has joined #ruby-lang
d3vic3 has joined #ruby-lang
<burgestrand>
andrewvos: how’d the last interview go?
<andrewvos>
burgestrand: He's sitting next to me and is one of the best ruby devs I've worked with :)
<burgestrand>
andrewvos: sweet :) any wisdom to share regarding the list of questions you had prepared before?
<burgestrand>
mfn: logger.info goes to env['rack.logger']
<burgestrand>
mfn: it’s set in Rack::Logger
<burgestrand>
mfn: created using env['rack.errors']
<andrewvos>
burgestrand: Well not really. The list isn't exactly great and I don't recommend phone interviewing people. In this instance I didn't have a choice though. The pairing interview went really well though.
tallship has joined #ruby-lang
<burgestrand>
mfn: if you want to change where logger.anything goes, that’s what you should alter. Or perhaps just define a helper named "logger" that returns a suitable logger instance :)
<burgestrand>
andrewvos: to be expected I guess. Glad it worked out well!
<workmad3>
andrewvos: heh :D
<andrewvos>
workmad3: Shut up you :)
<workmad3>
andrewvos: I never said a word :P
<andrewvos>
"<workmad3> told you so" <-- I saw this
<workmad3>
andrewvos: :D
<workmad3>
andrewvos: you're good at reading sniggers ;)
<andrewvos>
:)
<andrewvos>
Man, I have to interview some guy in 15 minutes :(
mistym has quit [Remote host closed the connection]
srbartlett has quit [Remote host closed the connection]
trax has quit [Ping timeout: 248 seconds]
kristofferrr has quit [Quit: ❤]
nofxxxx has joined #ruby-lang
tommyvyo has joined #ruby-lang
<solars>
hey, I wondered: is it legitimate, if I have a class checking authentication - to throw exceptions like UserNotAuthorized, UserNotLoggedIn... etc (as those are not really exceptions) - over using a response objekt with authorized=false/true, logged_in=false/true?
<solars>
i.e. legitimate to use exceptions for handling the control flow
trax has joined #ruby-lang
gsav has quit [Ping timeout: 246 seconds]
<apeiros_>
it depends on where you use it
<apeiros_>
if it's in the login process, then I think it's rather bad style, as there it is expected
<apeiros_>
but deeper in the app, where the expectation is that a user is logged in and authorized, and otherwise shouldn't even get there, in those places I think it's the proper way to deal with it
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby-lang
sepp2k has quit [Ping timeout: 246 seconds]
<solars>
well it's an external module that is included inside rails and does the auth, and I thought I'd use such exceptions in case the case is clear and I can quickly jump out the rails authentication methods (which do redirecting etc then, if those exception are thrown)
thone_ has joined #ruby-lang
thone has quit [Ping timeout: 248 seconds]
<solars>
which rather would be the first case I guess..
lele|w has quit [Remote host closed the connection]
dv310p3r has joined #ruby-lang
Defusal has quit [Quit: Quit message goes here]
hynkle has joined #ruby-lang
gsav has joined #ruby-lang
<apeiros_>
exceptions are raised, btw.
<apeiros_>
you can't throw them in ruby
JoshWines has quit [Quit: Leaving]
<solars>
sorry :)
<solars>
bad influence of a lousy programming language we have to use here sometimes
<apeiros_>
no need to apologize. just telling. proper terminology++
<solars>
:)
<Muz>
"proper terminology"++ ¬_¬
<Mon_Ouie>
You can actually "throw" an exception (or any object for that matter), it's just a whole other mechanism, not intended for the same use
<apeiros_>
ah, right. since 1.9 it is possible
<apeiros_>
1.8 only allowed symbols to be thrown
<solars>
oh
<apeiros_>
Mon_Ouie: doesn't it require the object to provide #hash/#eql?
<apeiros_>
at least I thought the new mechanism is based on hash-key-equality
<apeiros_>
(just noticed that I never really validated that thought…)
coryf has quit [Remote host closed the connection]
tommyvyo has joined #ruby-lang
|Vargas| has quit [Quit: ...]
segy has joined #ruby-lang
segy has quit [Max SendQ exceeded]
tomb_ has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
fgomez has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 265 seconds]
ryanf has joined #ruby-lang
carloslopes has quit [Ping timeout: 264 seconds]
deobald__ has quit [Ping timeout: 246 seconds]
andrewhl has joined #ruby-lang
<mfn>
workmad3: #write is not directly a method of Logger; it's a method of Logdevice. Logger can be passed a LogDevice or creates internally one ( https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L316 ), but I don't see anything that exposes it
nertzy has joined #ruby-lang
kaspernj_ has quit [Ping timeout: 246 seconds]
zrail|home is now known as zrail
nertzy has quit [Client Quit]
ttilley is now known as ttilley_off
benjammin891 has joined #ruby-lang
umttumt has joined #ruby-lang
boardyuk has quit [Read error: Connection reset by peer]
boardyuk has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
mwjcomputing2 has quit [Quit: Out....]
jtoy has joined #ruby-lang
jaylevitt has joined #ruby-lang
jaylevitt has quit [Remote host closed the connection]
Jay_Levitt has quit [Read error: Connection reset by peer]
zmack has quit [Remote host closed the connection]
yannis has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
<Defusal>
"When named capture groups are used with a literal regexp on the left-hand side of an expression and the =~ operator, the captured text is also assigned to local variables with corresponding names."
<Defusal>
i would find local regex variables far more useful if they worked that way inside a case statement that matches regex, pity that does not work
apeiros_ has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby-lang
Amigaman has left #ruby-lang [#ruby-lang]
tenderlove has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
akira989 has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
nofxxx has quit [Ping timeout: 240 seconds]
andrewhl has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
sailias has joined #ruby-lang
sora_h is now known as s0ra_h
bryancp has quit [Remote host closed the connection]
gokul has joined #ruby-lang
nofxxx has joined #ruby-lang
wmoxam_ has joined #ruby-lang
ilyam has quit [Quit: ilyam]
gokul has quit [Ping timeout: 255 seconds]
mistym is now known as mistym_coffee
brianpWins has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
mwjcomputing has joined #ruby-lang
benthumb has joined #ruby-lang
Hakon has joined #ruby-lang
<drbrain>
Defusal: feature request!
apeiros has joined #ruby-lang
apeiros_ has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby-lang
gokul has joined #ruby-lang
yannis has quit [Ping timeout: 246 seconds]
ryanf has joined #ruby-lang
benthumb has quit []
ilyam has joined #ruby-lang
apeiros has quit [Ping timeout: 260 seconds]
andrewhl has joined #ruby-lang
sfifbo has joined #ruby-lang
benthumb has joined #ruby-lang
ryanf has quit [Ping timeout: 264 seconds]
butchanton has quit [Quit: Leaving.]
<drbrain>
Defusal: maybe I'll try to implement this today
* slyphon
waves to drbrain
coryf has joined #ruby-lang
akira989 has quit [Ping timeout: 240 seconds]
akira989 has joined #ruby-lang
<zzak>
wasn't erikh working on that?
<erikh>
zzak: yes, I have a patch already out there
<erikh>
drbrain: ^
<erikh>
I keep trying to get drbrain to comment on it too :P
gsav has quit [Ping timeout: 240 seconds]
<zzak>
haha
macmartine has joined #ruby-lang
tjadc has quit [Read error: Operation timed out]
sfifbo has quit [Read error: Connection reset by peer]
sfifbo1 has joined #ruby-lang
yannis has joined #ruby-lang
Axsuul has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
gsav has joined #ruby-lang
malev has joined #ruby-lang
inf0g33k has joined #ruby-lang
tbuehlmann has quit []
inf0g33k has left #ruby-lang [#ruby-lang]
florentg2 has quit [Ping timeout: 246 seconds]
Hakon has joined #ruby-lang
mistym_coffee is now known as mistym
yannis has quit [Quit: yannis]
akira989 has quit [Remote host closed the connection]
hahuang65_ has quit [Quit: Computer has gone to sleep.]
tjadc has joined #ruby-lang
gokul has quit [Ping timeout: 246 seconds]
butchanton has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<matled>
drbrain: the advantage of explicit comparison is that the variables are only set (and overwritten, if they already exist) if the regexp is on the lhs. I don't know if it is such a good idea to do this by default in case statements with regexps
yannis has quit [Client Quit]
kirin` has quit [Ping timeout: 248 seconds]
kirin` has joined #ruby-lang
<matled>
ok, the "literal regexp" part makes it quite safe to prevent accidental overwriting. even named matches in /#{regexp}/ are not exported to local variables
solars has quit [Quit: WeeChat 0.3.5]
cczona has joined #ruby-lang
kirin` has quit [Ping timeout: 246 seconds]
kirin` has joined #ruby-lang
darklydreamingde has joined #ruby-lang
yannis has joined #ruby-lang
yannis has quit [Client Quit]
darklydreamingde has left #ruby-lang [#ruby-lang]
workmad3 has joined #ruby-lang
kirin` has quit [Ping timeout: 248 seconds]
kirin` has joined #ruby-lang
darklydreamingde has joined #ruby-lang
akira989 has joined #ruby-lang
carloslopes has quit [Quit: Leaving.]
lele has quit [Ping timeout: 252 seconds]
kirin` has quit [Ping timeout: 248 seconds]
cczona has left #ruby-lang [#ruby-lang]
darklydreamingde has quit [Client Quit]
kirin` has joined #ruby-lang
tommyvyo has quit [Ping timeout: 245 seconds]
MrMorgan has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
banisterfiend has quit [Read error: Connection reset by peer]
<rue>
No, please god, no implicit local vars whatsoever from regexp matches
<rue>
drbrain: In fact, remove the current -.-
tommyvyo has joined #ruby-lang
MrMorgan has quit [Client Quit]
ged has joined #ruby-lang
benthumb has quit []
kirin` has quit [Ping timeout: 246 seconds]
ged has quit [Client Quit]
hahuang65_ has joined #ruby-lang
kirin` has joined #ruby-lang
banisterfiend has joined #ruby-lang
malev has quit [Remote host closed the connection]
brianpWins has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby-lang
dejongge has quit [Read error: Connection timed out]
MrMorgan has joined #ruby-lang
MrMorgan has quit [Client Quit]
MrMorgan has joined #ruby-lang
kirin` has quit [Ping timeout: 248 seconds]
kirin` has joined #ruby-lang
cronin101 has quit [Quit: leaving]
Hakon has quit [Quit: Leaving...]
dejongge has joined #ruby-lang
hahuang65_ has quit [Quit: Computer has gone to sleep.]
kirin` has quit [Ping timeout: 248 seconds]
<matled>
rue: why would you write /(?<foo>foo.*bar)/ =~ something if you don't want to have tho local variable?
<matled>
*the
kirin` has joined #ruby-lang
<rue>
match[:foo]
<matled>
but you don't have match... ok, unless there is a magic global variable for this, which probably exists
<rue>
$~
<rue>
Or $LAST_MATCH or similar
<rue>
Oh, just $MATCH
akira989 has quit [Remote host closed the connection]
<apeiros_>
or Regexp.last_match
<apeiros_>
which is arguably less worse than $LAST_MATCH
hollanj has left #ruby-lang [#ruby-lang]
<matled>
but it isn't limited to the current scope?
headius has joined #ruby-lang
<apeiros_>
you mean thread-local? or that trickery the $regex vars use to be only valid within the current stack-frame?
kirin` has quit [Ping timeout: 255 seconds]
mwjcomputing has quit [Quit: Leaving]
<matled>
I meant the trickery.. but Regexp.last_match does it too
kirin` has joined #ruby-lang
lele|w has quit [Ping timeout: 272 seconds]
akira989 has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
bburcham has joined #ruby-lang
bburcham has quit [Client Quit]
bburcham has joined #ruby-lang
tenderlove has joined #ruby-lang
<zzak>
erikh: ping
sfifbo1 has quit [Quit: Leaving.]
hynkle has quit [Quit: Computer has gone to sleep.]
kirin` has quit [Ping timeout: 246 seconds]
hynkle has joined #ruby-lang
hynkle has quit [Client Quit]
<rue>
matled: Because the only thing better than implicit locals are implicit locals from other threads :P
kirin` has joined #ruby-lang
MrMorgan has quit [Quit: Page closed]
rockpapergoat has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 260 seconds]
tommyvyo_ has joined #ruby-lang
kirin` has joined #ruby-lang
tommyvyo has quit [Ping timeout: 248 seconds]
tommyvyo_ is now known as tommyvyo
workmad3 has quit [Ping timeout: 260 seconds]
kirin` has quit [Quit: Lost terminal]
kirin` has joined #ruby-lang
diegoviola has quit [Ping timeout: 245 seconds]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
gsav has joined #ruby-lang
slyphon has quit [Quit: WeeChat 0.3.7]
cczona has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
cczona has left #ruby-lang [#ruby-lang]
jperry2 has quit [Quit: jperry2]
kirin` has joined #ruby-lang
gsav has quit [Ping timeout: 255 seconds]
dejongge has quit [Read error: Connection timed out]
hahuang65_ has joined #ruby-lang
akira989 has joined #ruby-lang
diegoviola has joined #ruby-lang
mahlon has quit [Quit: nine foot long outhouse ladle]
ivanoats has quit [Quit: ivanoats]
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
pemeon has joined #ruby-lang
<erikh>
zzak: you rang?
pemeon has quit [Read error: Connection reset by peer]
kirin` has quit [Ping timeout: 252 seconds]
bburcham has quit [Read error: Connection reset by peer]