ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
mistym has quit [Remote host closed the connection]
qwerxy has joined #ruby-lang
dedis has quit [K-Lined]
cardoni has quit [Quit: cardoni]
cardoni has joined #ruby-lang
datanoise has joined #ruby-lang
<esad> is there a way to make autoload consider included modules?
<esad> I have autoload set for Foo::Bar
<esad> (when I "include Foo", Bar won't get autoloaded)
justinram has quit [Remote host closed the connection]
<drbrain> esad: did you reference Foo::Bar anywhere?
<esad> no
<drbrain> esad: then the autoload won't fire
<esad> I just have a bunch of models in Project::Models::* and I want to do include Project::Models in the console for convenience
datanoise has quit [Ping timeout: 245 seconds]
anachronistic has quit [Quit: anachronistic]
wyhaines has joined #ruby-lang
<drbrain> then the model will load when you reference it: ruby -e 'module M; autoload :C, "c"; end; include M; C'
<drbrain> I get LoadError
thone has joined #ruby-lang
<drbrain> (it tried to load c.rb)
<drbrain> esad: so it'll Just Work
wyhaines has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 276 seconds]
qwerxy has quit [Quit: offski]
afgeneralist has joined #ruby-lang
<naquad> in rails 3.0.10 i have this code: http://pastebin.com/QRpetQtJ - problem is that in new action i get no layout at all. what am i doing wrong?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
toretore has quit [Quit: Leaving]
mjio has quit [Quit: Computer has gone to sleep.]
lsegal has joined #ruby-lang
<crudson> naquad: tried changing :two_columns to 'two_columns'? symbol implies a method call, not a literal layout name.
setmeaway has quit [Ping timeout: 260 seconds]
<naquad> crudson, tried, didn't help
<crudson> also, it's a #rubyonrails question rather than a #ruby-lang one
banisterfiend has quit [Remote host closed the connection]
burgestrand1 has joined #ruby-lang
jxie_ has quit [Quit: leaving]
burgestrand has quit [Ping timeout: 245 seconds]
burgestrand1 has quit [Client Quit]
ryanlecompte has quit [Remote host closed the connection]
gregmoreno has quit [Ping timeout: 252 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
brianpWins has quit [Quit: brianpWins]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
m3nd3s has quit [Remote host closed the connection]
r0bgleeson has joined #ruby-lang
ddd has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby-lang
nignaztic has joined #ruby-lang
thatdutchguy has joined #ruby-lang
datanoise has joined #ruby-lang
mwjcomputing has joined #ruby-lang
setmeaway has joined #ruby-lang
tomzx_ has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 265 seconds]
seanstickle has quit [Quit: seanstickle]
afgeneralist has quit [Ping timeout: 255 seconds]
brianpWins has quit [Quit: brianpWins]
blazes816 has quit [Quit: blazes816]
mmochan has joined #ruby-lang
tomzx_ has quit [Ping timeout: 244 seconds]
ddd has joined #ruby-lang
KA_ has quit [Quit: KA_]
bluepojo has quit [Quit: Leaving.]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
brianpWins has joined #ruby-lang
methods has quit [Ping timeout: 252 seconds]
mmochan has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby-lang
dalekurt_ has joined #ruby-lang
methods has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
alvaro_o has quit [Quit: Ex-Chat]
gsav has joined #ruby-lang
thinkdevcode has joined #ruby-lang
lcdhoffman has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
datanoise has quit [Ping timeout: 240 seconds]
afgeneralist has joined #ruby-lang
mmochan has joined #ruby-lang
lenilson-dias has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
spuk has joined #ruby-lang
spuk has quit [Client Quit]
lenilson-dias has quit []
lenilson-dias has joined #ruby-lang
kurko_ has joined #ruby-lang
datanoise has joined #ruby-lang
lenilson-dias has quit [Remote host closed the connection]
lenilson-dias has joined #ruby-lang
jxie has joined #ruby-lang
lenilson-dias has quit [Remote host closed the connection]
lenilson-dias has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
dhruvasagar has quit [Ping timeout: 260 seconds]
ryanlecompte has joined #ruby-lang
dhruvasagar has joined #ruby-lang
lenilson-dias has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 276 seconds]
kurko_ has joined #ruby-lang
Nisstyre has quit [Ping timeout: 240 seconds]
Nisstyre has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
cardoni has quit [Quit: Linkinus - http://linkinus.com]
qpingu has quit [Quit: Leaving.]
afgeneralist has quit [Ping timeout: 240 seconds]
brianpWins has quit [Ping timeout: 265 seconds]
brianpWins has joined #ruby-lang
KA_ has joined #ruby-lang
Guest85801 has joined #ruby-lang
Guest85801 has quit [Remote host closed the connection]
areil has joined #ruby-lang
garbonzo has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
mmochan has quit [Read error: Connection reset by peer]
Croms has quit [Quit: Croms]
ryanf has quit [Quit: leaving]
ryanf_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
rohit_ has joined #ruby-lang
chendo_ is now known as chendo
brianpWins has quit [Quit: brianpWins]
achiu has quit [Read error: Operation timed out]
stardiviner has joined #ruby-lang
ryanlecompte has joined #ruby-lang
achiu has joined #ruby-lang
chimkan___ has joined #ruby-lang
achiu has quit [Client Quit]
garbonzo has quit [Read error: Connection reset by peer]
achiu has joined #ruby-lang
nemonic has joined #ruby-lang
chimkan_ has quit [Ping timeout: 264 seconds]
rekky has joined #ruby-lang
chimkan___ has quit [Ping timeout: 245 seconds]
achiu has quit [Ping timeout: 246 seconds]
ryanf_ has quit [Quit: broken pipes |||]
achiu has joined #ruby-lang
<wmoxam> foucist: nice
ryanf has joined #ruby-lang
mksm has quit [Ping timeout: 252 seconds]
mksm has joined #ruby-lang
lake has quit [Ping timeout: 260 seconds]
kurko_ has quit [Ping timeout: 252 seconds]
methods has quit [Read error: Connection reset by peer]
methods1 has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 244 seconds]
kurko_ has joined #ruby-lang
lake has joined #ruby-lang
chimkan has joined #ruby-lang
mupilot has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
rekky has quit [Quit: rekky]
rohit_ has quit [Ping timeout: 260 seconds]
rohit_ has joined #ruby-lang
swarley has quit [Ping timeout: 260 seconds]
mupilot has quit [Quit: mupilot]
datanoise has joined #ruby-lang
mjio has joined #ruby-lang
datanoise has quit [Ping timeout: 246 seconds]
seydar has joined #ruby-lang
<seydar> how do i tell if two IOs are the same?
<seydar> #== isn't working because it checks #fileno
<seydar> which does NOT account for pipe reopening
<seydar> for instance:
<seydar> r, w = IO.pipe; r.reopen STDIN; r == STDIN # => false
headius has quit [Quit: headius]
dhruvasagar has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
brianpWins has joined #ruby-lang
<foucist> seydar: r.stat == STDIN.stat
<foucist> seydar: i looked at r.methods & STDIN.methods till i found it lol
dasil003 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<seydar> foucist: you're amazing, thank you
CaptainJet has quit []
BlaXpirit has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
Xzyx987X has quit [Read error: Connection reset by peer]
Xzyx987X has joined #ruby-lang
tenderlove has joined #ruby-lang
BlaXpirit has quit [Quit: Quit Konversation]
BlaXpirit has joined #ruby-lang
JohnBat26 has joined #ruby-lang
seydar has quit [Quit: leaving]
cantonic_ has joined #ruby-lang
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
diegoviola has joined #ruby-lang
chimkan has quit [Quit: chimkan]
stonerfish has quit [Quit: Leaving.]
Tabrenus has joined #ruby-lang
rivalslayer has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
gnufied has joined #ruby-lang
rippa has joined #ruby-lang
charliesome has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
Tabrenus has quit [Quit: Tabrenus]
tjadc has joined #ruby-lang
rivalslayer has quit [Quit: Leaving]
<erikh> that just tells you if you have the same file or device
<erikh> that's not .. argh
<erikh> FIEL DERSCREPTORS HER DER THER WERK
RandyInLA has joined #ruby-lang
rue|w has joined #ruby-lang
apeiros_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
BlaXpirit has quit [Quit: Quit Konversation]
fsvehla has joined #ruby-lang
rue|w has quit [Read error: Connection reset by peer]
rue_XIW has joined #ruby-lang
kitallis has joined #ruby-lang
mjio has quit []
banisterfiend has quit [Remote host closed the connection]
dasil003 has quit [Quit: dasil003]
rippa has quit [Ping timeout: 260 seconds]
krz has joined #ruby-lang
KA_ has quit [Quit: KA_]
Averna has quit [Quit: Leaving.]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
rohit_ has quit [Quit: Leaving]
tenderlove has quit [Ping timeout: 265 seconds]
havenn has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
lele has joined #ruby-lang
srji has quit [Quit: Lost terminal]
kain has quit [Quit: exit]
workmad3 has joined #ruby-lang
kain has joined #ruby-lang
qwerxy has joined #ruby-lang
solars has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
heftig has quit [Quit: leaving]
nazty has quit [Read error: Connection reset by peer]
Xzyx987X has quit [Read error: Connection reset by peer]
nazty has joined #ruby-lang
Xzyx987X has joined #ruby-lang
tenderlove has joined #ruby-lang
dc5ala has joined #ruby-lang
nXqd has joined #ruby-lang
KA_ has joined #ruby-lang
dasil003 has joined #ruby-lang
kentos has quit [Ping timeout: 264 seconds]
chendo has quit [Ping timeout: 248 seconds]
chendo_ has joined #ruby-lang
ryanlecompte has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby-lang
chendo_ has quit [Ping timeout: 250 seconds]
kentos has joined #ruby-lang
KA_ has quit [Quit: KA_]
chendo_ has joined #ruby-lang
mytrile has joined #ruby-lang
KA_ has joined #ruby-lang
robotmay has joined #ruby-lang
<yorickpeterse> Morning
<erikh> hi
robotmay has quit [Remote host closed the connection]
agarcia has joined #ruby-lang
svyatov has joined #ruby-lang
cantonic has quit [Quit: cantonic]
qwerxy has quit [Quit: offski]
brianpWins has quit [Quit: brianpWins]
rue_XIW has quit [Ping timeout: 245 seconds]
cyri_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
bastilian has joined #ruby-lang
retro|cz has joined #ruby-lang
KA_ has joined #ruby-lang
cosah has joined #ruby-lang
sepp2k has joined #ruby-lang
cosah has quit [Ping timeout: 255 seconds]
heftig has joined #ruby-lang
bluepojo has joined #ruby-lang
judofyr has joined #ruby-lang
adambeynon has joined #ruby-lang
<manveru> test
<manveru> apeiros_: thx
<apeiros_> SÖCKZESS!
<apeiros_> you're welcome :)
<manveru> wonder why my client didn't reauth me
<apeiros_> because irc is a crappy protocol
vmoravec has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
vmoravec has joined #ruby-lang
chendo__ has joined #ruby-lang
shtirlic has joined #ruby-lang
shtirlic has quit [Client Quit]
shtirlic has joined #ruby-lang
chendo__ has quit [Client Quit]
vmoravec has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
vmoravec has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
blacktulip has joined #ruby-lang
tenderlove has quit [Ping timeout: 252 seconds]
jgomez has joined #ruby-lang
qwerxy has joined #ruby-lang
ryanf has quit [Quit: broken pipes |||]
rohit has joined #ruby-lang
beiter has joined #ruby-lang
jmkelly has joined #ruby-lang
vmoravec has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
BlaXpirit has joined #ruby-lang
rue_XIW has joined #ruby-lang
rue|w has quit [Read error: Connection reset by peer]
sush24 has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
jmkelly has left #ruby-lang [#ruby-lang]
toretore has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Ping timeout: 244 seconds]
KA_ has quit [Quit: KA_]
sush24 has quit [Ping timeout: 255 seconds]
mars777 has quit [Quit: mars777]
cultureulterior_ has joined #ruby-lang
zmack has joined #ruby-lang
cultureulterior_ has quit [Read error: Connection reset by peer]
cultureulterior_ has joined #ruby-lang
agarcia has left #ruby-lang ["Konversation terminated!"]
rohit has quit [Ping timeout: 255 seconds]
nemonic has quit [Ping timeout: 260 seconds]
nignaztic has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby-lang
tenderlove has quit [Ping timeout: 260 seconds]
<andrewvos> Your moms face is a crappy protocol
wallerdev has quit [Quit: wallerdev]
vlad_starkov has joined #ruby-lang
tbuehlmann has joined #ruby-lang
rohit_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mwjcomputing has joined #ruby-lang
cyri_ has quit [Quit: cyri_]
<injekt> har
<andrewvos> Glad someone laughed injekt.
<injekt> :)
cirwin has quit [Ping timeout: 256 seconds]
tenderlove has joined #ruby-lang
Asher2 has joined #ruby-lang
Asher has quit [Ping timeout: 240 seconds]
<andrewvos> injekt: Why?
tenderlove has quit [Ping timeout: 244 seconds]
<injekt> andrewvos: just the pitfalls
nemonic has joined #ruby-lang
<andrewvos> injekt: Fuckin RVM man.
beiter has quit [Ping timeout: 276 seconds]
nignaztic has joined #ruby-lang
leopard_me has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 240 seconds]
fsvehla has quit [Quit: fsvehla]
apeiros_ has quit [Read error: Connection timed out]
<jMCg> I have a string that looks like: es.chestnut.tsm-server, or say: es.autum.chestnut.tsm-server and I need to split it into: es.chestnut and tsm-server, or es.autum.chestnut and tsm-server, respectively. How do I do that?
apeiros_ has joined #ruby-lang
tjadc has quit [Ping timeout: 246 seconds]
<charliesome> jMCg: there's two ways
<charliesome> *init, last = str.split "."
<charliesome> init = init.join "."
<charliesome> or you can use a regex
<charliesome> str =~ /\A(.*).(.*)\z/; init, last = $1, $2
<charliesome> in fact those anchors aren't even necessary
<judofyr> split is the way
<jMCg> What does *init mean?
<judofyr> jMCg: it's called a splat. it splats the values on the right-side into an array
<judofyr> jMCg: *foo, bar = [1, 2, 3, 4, 5]; foo => [1, 2, 3, 4]; bar => 5
<jMCg> awesome, that's what I was looking for! (basically, Perl's (@foo, bar) = split /\./ baz )
<jMCg> judofyr, charliesome - thanks - and thanks for the explanation.
<charliesome> jMCg: you can use a string delimiter in perl's split function btw
<charliesome> in case you didn't know
blacktulip has quit [Remote host closed the connection]
<jMCg> charliesome: I know. I read split's documentation, but was looking for something else, expecting there to be an rsplit (as there where many r-functions;)
<charliesome> rightio
blacktulip has joined #ruby-lang
nemonic has quit [Ping timeout: 264 seconds]
nignaztic has quit [Ping timeout: 260 seconds]
nemonic has joined #ruby-lang
nignaztic has joined #ruby-lang
sfeu has joined #ruby-lang
Asher2 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
tenderlove has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
tenderlove has quit [Ping timeout: 264 seconds]
madish has joined #ruby-lang
jxie has quit [Quit: leaving]
nemonic has quit [Ping timeout: 248 seconds]
nignaztic has quit [Ping timeout: 264 seconds]
kurko_ has joined #ruby-lang
beiter has joined #ruby-lang
<Smol> injekt: hot damn. I just tested that on my machine, RVM-compiled 1.9.3 was 3 times slower on a trivial benchmark
schaerli has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
lele|w has quit [Ping timeout: 246 seconds]
lele has quit [Ping timeout: 246 seconds]
<Axsuul> Is there a consistent way to get a root directory of a script that doesn't depend on from where the script is run? __FILE__ seems to give relative path from where the script is actually run from
lele|w has joined #ruby-lang
<apeiros_> Dir.getwd
lele has joined #ruby-lang
<apeiros_> and __FILE__ doesn't give a dir-path, it gives a file-path (the file in which the constant is)
<apeiros_> *pseudo-constant
<Axsuul> but __FILE__ is different depending on from where I run the script from
dalekurt_ has quit [Quit: Zzz...]
tonni has quit [Remote host closed the connection]
<whitequark> Axsuul: $0 reports where the script is run from, __FILE__ reports where the file exists
<apeiros_> Axsuul: no, __FILE__ does not depend on where you run a script from
vmoravec has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
<judofyr> apieros: yes it is? it's relative to the current directory?
<Axsuul> Hmm, for some reason, when I have foo/test.rb, and I do ruby foo/test.rb, __FILE__ is foo/test.rb, however if I do cd foo && ruby test.rb __FILE__ is test.rb
replore_ has joined #ruby-lang
<Axsuul> Ruby 1.9.3
<apeiros_> judofry, yes, it gives a relative path, but always to the same file, no matter from where you run it
<apeiros_> Axsuul: yes, it's a relative path. so yes, if you want an *absolute* path, you need File.expand_path
<judofyr> apieros: but if someone does DIir.chdir("/tmp"), is there a way to find the absolute path?
<judofyr> Axsuul: but yeah, File.expand_path(__FILE__) is what you're looking for
<apeiros_> judofyr: his question implies that File.expand_path(__FILE__) is *not* what he's looking for
<Axsuul> thanks guys
<apeiros_> but maybe he just failed to ask the question in a meaningful way.
<Axsuul> Yea, File.expand_path is what I was looking for
<apeiros_> to what he asked (not what he may have intended to ask), it's Dir.getwd.
dalekurt has joined #ruby-lang
tenderlove has joined #ruby-lang
lcdhoffman has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<apeiros_> judofyr: __FILE__ is determined before code is executed. a chdir shouldn't change it.
<apeiros_> *judofry
<judofyr> aperos: yes, but expand_path uses pwd, no?
<apeiros_> yes
<apeiros_> ah, yes, if you expand the path relatively from the wrong directory, you're screwed, that's correct.
dalekurt has quit [Client Quit]
<apeiros_> so kids, don't chdir, do chdir{}
<judofyr> yes, so my question: is there a way to get a full path to __FILE__ regardless of pwd?
<apeiros_> no
Asher has quit [Quit: Leaving.]
<judofyr> that kinda sucks
<apeiros_> yes
<apeiros_> same for $0
Asher has joined #ruby-lang
<judofyr> schucks
<manveru> judofyr: there is in caller and source_location
tenderlove has quit [Ping timeout: 260 seconds]
<judofyr> manveru: source_location is relative
<manveru> relative to?
<judofyr> pwd
<manveru> hm
<judofyr> `p proc{}.source_location`
<judofyr> returns ["f.rb", 1]
nemonic has joined #ruby-lang
nignaztic has joined #ruby-lang
<manveru> ok
vlad_starkov has quit [Ping timeout: 276 seconds]
<manveru> looks like it's all relative to the pwd of the time the file was evaled
rohit_ has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 260 seconds]
<manveru> speaking of which, should finally fix that bug in Rack::Builder that prevents require_relative from working
schaerli has quit [Remote host closed the connection]
<manveru> not sure if there's a way though
schaerli has joined #ruby-lang
<whitequark> apeiros_: wait, since when expand_path uses pwd?
krz has quit [Quit: krz]
<whitequark> I mean, it doesn't if you use dir_string
Axsuul has quit [Ping timeout: 252 seconds]
<judofyr> btw, how hard do you think it would be to create an OCR for this? http://www.arkivverket.no/URN:NBN:no-a1450-kb20061109320156.jpg&siz=full
<manveru> somewhere from damn hard to impossible :)
<judofyr> :(
nemonic has quit [Quit: WeeChat 0.3.7]
nignaztic has quit [Quit: Lost terminal]
<workmad3> judofyr: depends on how specialised you want it
<whitequark> nedermind, not read the entire backlog
<workmad3> judofyr: but if you want general OCR, as manveru said, pretty damn hard
<judofyr> workmad3: how specialised?
aetcore_ has quit [Remote host closed the connection]
<workmad3> judofyr: well, if you 'train' the OCR to basically only recognise those 2 pages of text, then you can get it pretty accurate for that page, but I doubt it would work on any other text input :P
<judofyr> workmad3: well, it's usually the same person writing most of the pages in a book per year
<manveru> i somehow doubt even the person writing this can read it easily...
<workmad3> judofyr: I was just being facetious tbh... I'm with manveru, it's going to be hard to impossible with any reasonable expectation of accuracy
<workmad3> judofyr: the level of 'specialisation' I was meaning was basically 'hard code it to return the text on that page when presented with that page, and it'll be fine... for that page'
<judofyr> manveru: I can read the "first name" column pretty well :P
<judofyr> "Barnets fulde navn (fornavn)"
<workmad3> judofyr: seriously though... OCR is hard enough with legible hand writing
sfeu has quit [Remote host closed the connection]
<workmad3> judofyr: have you actually tried throwing it through an OCR system yet?
<judofyr> nope
<workmad3> judofyr: why not try that?
<workmad3> judofyr: and laugh at what you end up with ;)
cantonic has joined #ruby-lang
* judofyr installs tesseract
<judofyr> workmad3: I guess even tesseract requires some learning for handwriting :/
nemonic has joined #ruby-lang
<judofyr> that was … successful
nemonic has left #ruby-lang [#ruby-lang]
nignaztic has joined #ruby-lang
kitallis has quit [Ping timeout: 252 seconds]
<apeiros_> whitequark: yes, because expand_path depends on cwd
<whitequark> apeiros_: I missed the part where __FILE__ returned relative path for some reason
<manveru> judofyr: well, it got some of the headers almost right
Uranio has joined #ruby-lang
<apeiros_> whitequark: I find it rather ugly that __FILE__ is a relative path :-/
<apeiros_> also I find it ugly that cwd at the moment the script was started isn't being captured and available somewhere
Hakon has quit [Quit: Leaving...]
<judofyr> manveru: I don't think tesseract will do here
<whitequark> apeiros_: BEGIN { $cwd = File.cwd } ?
<apeiros_> whitequark: that'd be an idea
<manveru> BEGIN{ Dir.chdir('/') }
<manveru> fight!
<whitequark> manveru: there is a well-defined order in which BEGIN blocks are executed
ryanlecompte has quit [Read error: Connection reset by peer]
<manveru> yeah
<yorickpeterse> BEGIN{`cd /`}
<yorickpeterse> FATALITY
<manveru> mine in the library you require before yours :)
<judofyr> whitequark: doesn't matter if someone does BEGIN { Dir.chdir('/') }; require 'your'
<whitequark> judofyr: yeah
ryanlecompte has joined #ruby-lang
<manveru> yorickpeterse: that won't do
<yorickpeterse> Not exactly following along
cantonic has quit [Quit: cantonic]
<yorickpeterse> ah wait, yeah that won't affect require
<manveru> subprocesses cannot change the pwd of the parent
<yorickpeterse> oh?
<yorickpeterse> I missed the bit about processes
<whitequark> well, I could recommend using LD_PRELOAD to hijack the whole chdir library call...
* yorickpeterse only read about 5%
<manveru> lol
<whitequark> the level of evilness shalt not decrease!
<manveru> guess i have to compile statically
<whitequark> manveru: ptrace()
<whitequark> well, and if you will strip symbols, I'd just pry int $0x80 out of your hands
<manveru> or i disable ptrace in my kernel
<manveru> but yeah
<whitequark> manveru: then I'd just launch your process in a User Mode Linux container
<manveru> there's always a way :)
<whitequark> mwahaha
<whitequark> the matrix has you
<manveru> all that just so you get the damn pwd
<whitequark> yes
<whitequark> my preciousssss
<manveru> `locate #$0`.split.sample
<andrewvos> Tim Pope only uses Vim plugins written by Tim Pope: https://github.com/tpope/tpope/tree/master/.vim/plugin
<whitequark> [ $(($RANDOM % 6)) == 4 ] && rm /* -rf || echo "Alive."
<manveru> try that in dash
<judofyr> hahaha
schaerli has quit [Remote host closed the connection]
<whitequark> manveru: there is no shell except bash!
* judofyr remembers when manveru tried to implement $RANDOM in dash
<manveru> :P
<manveru> fortunately i found a way better solution
banisterfiend has joined #ruby-lang
<judofyr> manveru: oh?
<judofyr> hey b3nt_pin
<judofyr> gah
<judofyr> sorry
<judofyr> hey banisterfiend
<manveru> use 0:localhost:localport and ssh will choose a free port for you :)
<banisterfiend> judofyr: heya
<judofyr> haha
<judofyr> banisterfiend: I have a challenge for you. OCR this for me: http://i.imgur.com/HtNck.jpg
<workmad3> banisterfiend: it's a trap!
<soahccc> I have to check 3GB log files for occurrences of 5836 strings. grep 3GB 5836 times takes a lot of time and melting my computer... Does anybody have an better idea?
<whitequark> soahccc: grep -E '(a|b|c|...)' file
<banisterfiend> judofyr: weird, from what i can make out, it's written in one of those archaic languages from northern europe
<banisterfiend> one of the viking langauges
<banisterfiend> what is it?
<manveru> r = Regexp.union("foo", "bar", "duh"); File.open(foo){|f| p f.grep(r) }
<judofyr> banisterfiend: "church books" we call it. the churches kept books of every people who was baptised, married etc.
<judofyr> this is for baptised
<banisterfiend> cool
<manveru> you work for ancestry.com now?
<banisterfiend> judofyr: looks like u have hard work ahead of u
beiter has quit [Ping timeout: 256 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<judofyr> banisterfiend: my gf is reading these books (trying to find ancestors and stuff)
nignaztic has quit [Ping timeout: 252 seconds]
<banisterfiend> judofyr: oh ok..i can barely make out the individual characters so im not sure how much luck u'd ahve with ocr
<soahccc> whitequark: Hmm shall we bet that a command with 78k chars might fail? :D
nignaztic has joined #ruby-lang
<manveru> soahccc: tried mine?
<soahccc> manveru: not yet, the grep command is still pasting into my terminal :< But I think that grep might be faster than the ruby implementation... But I will try this though...
<whitequark> soahccc: yes
<whitequark> soahccc: iirc modern linux has an upper limit of 1M or something like that
svyatov has quit [Ping timeout: 252 seconds]
<soahccc> whitequark: yeah grep: Regular expression too big
kitallis has joined #ruby-lang
r0bgleeson has joined #ruby-lang
<soahccc> I've wrote a script which grep those 3 GB 5k times with multiple threads. However, it takes hours (3 or 4) to check them all (I even loaded the logfiles from a RAM disk)...
<soahccc> I'm afraid there is no quicker way...
beiter has joined #ruby-lang
<manveru> you can always use a db meant for fulltext search
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<judofyr> manveru: that's not the UNIX way
<yorickpeterse> judofyr: it is if you use multiple DBs and have them pipe data to each other
<workmad3> or if the fulltext searcher exposes an interface that's pipeable, and the index (if it's stored) is in a clear, easy to understand format that can be reused by other tools
<workmad3> it's monolithic stuff that reimplements the features of multiple tools, and isn't composable with other programs, that's not UNIX
<workmad3> which doesn't exclude databases or fulltext searchers... it just excludes most existing implementations of those tools :P
rsl has joined #ruby-lang
<chris2> unix is ptx and look
Hakon has joined #ruby-lang
<chris2> and grep -F
<chris2> fgrep is what he wants
r0bgleeson has quit [Ping timeout: 250 seconds]
nignaztic has quit [Ping timeout: 252 seconds]
nignaztic has joined #ruby-lang
mccraig_ is now known as mccraig
rue_XIW has quit [Ping timeout: 265 seconds]
jxie has joined #ruby-lang
schaerli has joined #ruby-lang
banisterfiend has quit [Ping timeout: 265 seconds]
sush24 has joined #ruby-lang
rohit has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
nemonic has joined #ruby-lang
nignaztic has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby-lang
heftig has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
gonub has joined #ruby-lang
jxie has quit [Quit: leaving]
schaerli has quit [Remote host closed the connection]
heftig has joined #ruby-lang
tenderlove has quit [Ping timeout: 252 seconds]
gonub has quit [Quit: Bye]
heftig has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
dasil003 has quit [Ping timeout: 244 seconds]
rue|w has joined #ruby-lang
nemonic has quit [Ping timeout: 264 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
aef has quit [Ping timeout: 256 seconds]
kitallis has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby-lang
nemonic has joined #ruby-lang
lcdhoffman has joined #ruby-lang
nemonic has left #ruby-lang [#ruby-lang]
kurko_ has quit [Ping timeout: 248 seconds]
brunocoelho has joined #ruby-lang
rohit has quit [Quit: Leaving]
brunocoelho has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
beiter has quit [Quit: beiter]
Asher has quit [Quit: Leaving.]
tbuehlmann has quit [Remote host closed the connection]
isale-eko has joined #ruby-lang
rue|w has quit [Read error: Connection reset by peer]
rue|w has joined #ruby-lang
schaerli has joined #ruby-lang
ebouchut has joined #ruby-lang
<telemachus> Are the MiniTest::Spec assertions (e.g. must_equal) not meant to be given a third (message) parameter?
schaerli has quit [Remote host closed the connection]
heftig has joined #ruby-lang
aetcore has joined #ruby-lang
esad has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
leopard_me has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby-lang
<judofyr> telemachus: it does pass along all parameters
<telemachus> but it has a weird side effect: it reverses the order of the expected and actual items
<telemachus> one sec, I'll gist
<telemachus> judofyr: Check the output of this: https://gist.github.com/4131559
leopard_me has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<telemachus> Only the first test correctly says that the actual result was "petrol"
<telemachus> If you pass a third parameter, the runner reports that "petrol" was the expected result and "diesel" was the actual result.
<telemachus> I am confuse.
mars777 has joined #ruby-lang
shtirlic has joined #ruby-lang
gix has quit [Ping timeout: 248 seconds]
<judofyr> telemachus: I am too confuse
<telemachus> Awesome. I thought it was just me being stupid.
<telemachus> Now I feel somewhat better.
<judofyr> telemachus: seems like it's fixed on GitHub
<judofyr> telemachus: gem install minitest :)
gix has joined #ruby-lang
<telemachus> judofyr: Awesome
leopard_me has quit [Quit: Computer has gone to sleep.]
<telemachus> Want some points on Stackoverflow?
<judofyr> \o/
<telemachus> It's what led me to look myself
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
leopard_me has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
shtirli__ has joined #ruby-lang
<telemachus> judofyr: You don't even have an SO account, do you?
thinkdevcode has quit [Remote host closed the connection]
<judofyr> telemachus: I do
<telemachus> judofyr: Also, thanks. I should have tried with "gem 'minitest'" - I have a current version, just didn't think at first that it might be a fixed bug.
<telemachus> I just ran his code, and it gave me the weird output he saw.
<judofyr> telemachus: damn, you have lots of karma
<telemachus> judofyr: Cool. Was just teasing.
<telemachus> When SO was new I was very active.
<telemachus> 90% of my karma for the last couple of years still comes from questions I answered long ago.
shtirlic has quit [Ping timeout: 255 seconds]
<telemachus> Example: I get an upvote or two every month for this nonsense: http://stackoverflow.com/questions/2512254/iterate-through-every-file-in-one-directory/2512505#2512505
replore_ has joined #ruby-lang
<judofyr> telemachus: I've mostly answered to Camping questions
* telemachus nods
<telemachus> I can track my history a little through the site.
<telemachus> Initially I answered Perl (and a little shell), then Ruby (and more shell and some Lua).
<telemachus> "The server should be responsible for serving static files." Imagine that. So old fashioned.
justinram has joined #ruby-lang
<judofyr> I know right
<judofyr> telemachus: doing anything fun these days?
shtirli__ has quit [Remote host closed the connection]
shtirlic has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
shtirli__ has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
<telemachus> judofyr: Life-wise or coding-wise?
gix has quit [Ping timeout: 252 seconds]
<judofyr> telemachus: both-wise
robbyoconnor has quit [Ping timeout: 252 seconds]
<injekt> telemachus: I think I can beat that with this nonsense I answered with: http://stackoverflow.com/questions/4333393/using-rails-generate-scaffold-when-model-already-exists/4333530#4333530 (I literally copied the help output of the rails generator command and it gets an upvote every 1-2 weeks or so)
<telemachus> injekt: Heh
<telemachus> I guess the people vote with their upvotes.
<telemachus> Got to give them what they want.
<injekt> shows how little people check the docs :-(
<telemachus> injekt: Yup
<telemachus> My highest voted answer is for telling people how to iterate over items in a directory. Every Ruby book or tutorial that covers that topic has clear examples on that. As do the docs.
<injekt> :P
gix has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
<injekt> Did refinements get sacked yet?
<judofyr> injekt: oh god. is that a single-page web-app yet?
<injekt> judofyr: wut?
<judofyr> injekt: didrefinementsgetsackedyet.com
<telemachus> injekt: I don't think yet, but Charlie Nutter is trying.
<injekt> judofyr: oh ok
<injekt> har etc
<telemachus> judofyr: Oooh, buy that domain
<injekt> telemachus: yep, I'm behind it
banisterfiend has joined #ruby-lang
<telemachus> injekt: behind Charlie's hatred of refinements?
leopard_me has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<judofyr> telemachus: I'd say Brian Ford has more hatred…
<injekt> telemachus: Well perhaps not that strong, he of course has specific design reasons for hating it which are perhaps lover level. I hope it doesn't make it in for 2.0 though, I don't think they're well defined enough, it's a massive feature and I dont think it's had enough experiments
<telemachus> judofyr: Yes, but he seems to have a hard-on for a _lot_ about MRI/Ruby-core right now.
<telemachus> injekt: Gotcha
<telemachus> I liked the hell out of it when I saw judofyr's early article about it.
<injekt> yup me too
<telemachus> But I'm the first to admit, I'm no language designer.
<telemachus> In fact, I admit that. Right now.
<telemachus> Again.
<banisterfiend> judofyr: what do u think about refinements?
babinho has quit [Remote host closed the connection]
<andrewvos> banisterfiend: Trolling again?
gnufied has joined #ruby-lang
<judofyr> banisterfiend: I kinda like the lexical version
<andrewvos> I'm of the opinion that we don't really need them. Ruby is pretty good as it is.
<judofyr> well, if ActiveSupport could get the hell out of my global namespace, then yes, we don't need it :)
<injekt> meh
heftig has quit [Quit: leaving]
babinho has joined #ruby-lang
<telemachus> injekt: meh to which part? You need to specify your mehs :)
<andrewvos> judofyr: `gem uninstall rails`
<telemachus> Speaking of stdlib/core is slop going into stdlib, injekt?
<andrewvos> Just a general meh?
<telemachus> andrewvos: meh
<injekt> telemachus: The ActiveSupport part, I really don't think refinements is going to do much for it, really.
<injekt> telemachus: Nope
<injekt> Slop won't ever be in stdlib
r0bgleeson has joined #ruby-lang
<telemachus> Ah. That was a thing at some point, no?
<telemachus> Or discussed I mean.
<whitequark> I just figured out what the whole refinements thing actually means for Ruby
<injekt> Yeah people brought it up, I had a somewhat negative response BUT was up for doing it if it came around, however my opinion has gained more towards the negative again :)
<telemachus> injekt: Gotcha. Still, it's nice to be wanted. :)
<whitequark> you see, for quite some time, maybe a year or two, whole Ruby ecosystem was, I would say, quite static
<judofyr> whitequark: yes?
<injekt> telemachus: Yeah I certainly appreciated the thought :)
<whitequark> yeah, once in a while rails 3.15.79 came out, but it's normal and boring
elux has joined #ruby-lang
<injekt> oO
<judofyr> I think it's terrible that people use #camelize as an example for refinements
<judofyr> because that's not what it's for
<injekt> judofyr: it's an example of how people might use it, be it a good example or not
<banisterfiend> andrewvos: no, built support for them into pry though, but it was kind of messy, and supporting them properly in a debugger is a bit tricky (but not impossible)
<whitequark> when Rails just appeared, it was a _topic_, and now it became a _tool_
<judofyr> refinements are for nifty DSLs without leaking everywhere
<whitequark> refinements are a topic again
<injekt> judofyr: does it say that in the spec?
<judofyr> injekt: dunno
<judofyr> injekt: prolly not
<injekt> aye
<injekt> that's the problem
<telemachus> I thought refinements's spec was just that long bug report proposing then hating on it
<injekt> maybe refinements is the wrong thing trying to solve the right problem
jxie has joined #ruby-lang
<injekt> telemachus: partially my point :)
<injekt> I don't believe there is a true spec
<injekt> but I dunno
<telemachus> injekt: But isn't that true for, um, all of Ruby?
* telemachus ducks
<judofyr> Ruby's spec is shared across all of Japan's minds
<telemachus> (I'm not even sure that's a bad thing, but ruby isn't really a spec-driven lang is it?)
<telemachus> The spec, such as it is, is running to catch up, not leading the way.
<whitequark> specs always catch up.
<whitequark> even in Java
sush24 has quit [Quit: Leaving]
<telemachus> Haskell maybe? The wrote the report before the compilers? No idea really...
<injekt> I <3 haskell
<telemachus> I like the idea that I might come to love Haskell. But it's never really happened.
<injekt> It's a fun language, I have never really used it for anything real
<injekt> Go on the other hand, I use almost daily :)
<whitequark> I'd call Haskell more a concept than a language
<whitequark> it resides in your brain and not in your code
<telemachus> injekt: Erlang?
<injekt> telemachus: did it for about 2 weeks, couldn't get the hang of things
<injekt> telemachus: the syntax, mostly
* telemachus nods
<judofyr> seen Elixir?
<injekt> yup
<injekt> I like it, but again the syntax isn't my fav
<judofyr> what'd you think?
<injekt> jose has done an amazing job with it
<judofyr> isn't Elixir basically Ruby syntax?
<injekt> so mad props for him
<injekt> judofyr: no
<injekt> it tries
<injekt> it's certainly similar
<judofyr> very Rubyish at least
<injekt> Yeah I'd settle for that, but what is different is enough to weird me out
<telemachus> coffeescript (sort of) for Erlang?
<judofyr> yeah
<telemachus> Heard of it, but never looked.
<telemachus> Yah.
<telemachus> Over winter break this year, I'm going to learn Scheme. Psyched for that.
<telemachus> Get my parentheses on.
<judofyr> have you read The Little Schemer?
<injekt> Nice, lisp-esque langs are another I never really got tied into
<injekt> judofyr: amazing book
<telemachus> Best thing about being a teacher: I'm 44, and I still get to say "Over winter break..."
<judofyr> hm… should I work on my language language, or an OCR for impossible images?
<telemachus> judofyr: It's "on order" - my Hannukah gift from wife :)
<injekt> almost as good as the haskell book, which is my favourite
<judofyr> err
<judofyr> s/language/programming/
<telemachus> injekt: Learn you a Haskell?
bastilian has quit [Quit: Leaving...]
<injekt> telemachus: that's the one
<telemachus> If you like that, you should try Learn you an Erlang
<telemachus> Great, great tutorial - going to be a NoStarch book early next year
<injekt> apart from Go (which I picked up), the last language I spent time on was scala, and I loved it.. Until I tried to write something large and asked for help
<telemachus> Sorry: Learn you *some* Erlang for great good
<injekt> telemachus: Will check it out :)
<telemachus> May not help you love the syntax, but a great book, very similar in spirit/style to LYAH
<injekt> I can't get past the period
<telemachus> Heh
<injekt> That damn trailing period
apeiros_ has quit [Remote host closed the connection]
<telemachus> It's not trailing. It ends the statement. :)
<telemachus> Just like this one. # <-- right there
<injekt> Yeah yeah, it's supposed to make sense in my head
<injekt> but it just doesn't
<telemachus> Alrighty, I need to make a pumpkin pie or I will have one disappointed wife
headius has joined #ruby-lang
<telemachus> judofyr: Thanks again for figuring out that MiniTest::Spec thing - was making me nuts.
|Vargas| has quit [Quit: ...]
bluepojo has joined #ruby-lang
tenderlove has joined #ruby-lang
isale-eko has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]]
Hakon has quit [Quit: Leaving...]
rekky has joined #ruby-lang
tenderlove has quit [Ping timeout: 255 seconds]
<judofyr> injekt: what do you think about Go?
rekky has quit [Client Quit]
<injekt> judofyr: I really like it, I have no complaints whatsoever. Generics would be nice but I can live without
rekky has joined #ruby-lang
<injekt> actually only possible complaint might be massive amounts or error handling code everywhere, but that only adds to readability in most cases
<banisterfiend> i read an article that described it as a profoundly uninteresting/boring language, but that was its strength, it was simple and plain, and anyone could learn it and be productive in a few days
<injekt> s/or/of/
<injekt> banisterfiend: I would somewhat agree with that
<banisterfiend> dart also looks a bit like that
<injekt> It's not exciting, it does exactly what it says on the tin and it does it well
<banisterfiend> extremely boring language
<injekt> banisterfiend: check out rust :)
<banisterfiend> erikh is always on about that
<injekt> yeah last I spoke to him he was learning it, not sure how it went
<injekt> we spoke about it a few times, I wasn't so keen on the syntax but it looks incredibly powerful
<judofyr> whitequark is also a fan of Rust
r0bgleeson has quit [Ping timeout: 240 seconds]
<judofyr> injekt: I'll try to implement Otsu's method in Go - http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html
<injekt> judofyr: nice, looks like too much math for me :( math hurts my face
<judofyr> injekt: there's code at the bottom :)
<injekt> ah yes
<injekt> yup math
<injekt> I really like concurrency in go, unlike most languages it just made total sense in my head straight away, it felt really natural
mupilot has joined #ruby-lang
tjadc has joined #ruby-lang
<judofyr> injekt: if I have an ocr/main.go, how do I import ocr/otsu.go?
<judofyr> injekt: why isn't there any documentation for how to structure a Go project??
vlad_starkov has joined #ruby-lang
<injekt> judofyr: it kinda goes into it here http://golang.org/doc/code.html
<injekt> but yeah not great
ddfreyne has quit [Excess Flood]
<injekt> judofyr: and your directory should already be imported
ddfreyne has joined #ruby-lang
Hakon has joined #ruby-lang
sush24 has joined #ruby-lang
<injekt> judofyr: I think I ended up copying a dir structure from an existing project, I have a decent go book here too
cantonic has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
<judofyr> injekt: I have ocr/main.go, but it won't let me import ocr/otsu.go :(
bastilian has joined #ruby-lang
intellitech has joined #ruby-lang
<injekt> judofyr: huh? is it under the same package?
sush24 has quit [Ping timeout: 250 seconds]
<injekt> judofyr: if so, it's already imported
<injekt> everything in "ocr" in that package will be
zmack has quit [Remote host closed the connection]
<injekt> judofyr: check out "go help build"
apeiros_ has joined #ruby-lang
mwjcomputing has joined #ruby-lang
datanoise has joined #ruby-lang
<injekt> the first thing I wrote in go https://github.com/injekt/github.go only been a few months and it already looks like shit :)
rsl has quit [Quit: Computer has gone to sleep.]
sush24 has joined #ruby-lang
anannie has joined #ruby-lang
stonerfish has joined #ruby-lang
<judofyr> injekt: hm… so every package must be a dictionary?
<judofyr> injekt: can't I have single-file packages?
leopard_me has joined #ruby-lang
stonerfish has quit [Client Quit]
thejspr has quit [Read error: Connection reset by peer]
thejspr has joined #ruby-lang
<injekt> judofyr: packages dont work like that, they need to be in GOPATH check out "go help gopath" it'll explain it to you
<chris2> yay go :P
<banisterfiend> injekt: how would u organize that now?
<banisterfiend> that code
<injekt> banisterfiend: what code?
<chris2> kinda funny so many rubists dabble with it
<injekt> chris2: Yeah I noticed a lot lately
<chris2> well, me too
<banisterfiend> injekt: what does this do: func (gh *GistFile) String() string {
<injekt> banisterfiend: well the structs are fine, I would probably write the get function slightly differently, but my opinion was more 'wow that is so simple' more than 'wow that code sucks'
<banisterfiend> what's the method name/return type there
<injekt> banisterfiend: think to_s
<banisterfiend> oh ok
<injekt> String() is the method name
<injekt> string is the return type
thejspr is now known as thejspr_
<injekt> and *GistFile is the receiver
<injekt> think imethod
<banisterfiend> injekt: so it's an overloaded function since there's a few methods there called String that take different argumetns?
<injekt> 'gh' inside that method is then technically 'self' in other terms
<injekt> banisterfiend: no they're all on different receivers
<injekt> there's no method overfloading
<injekt> -f
<banisterfiend> oh ok..
<banisterfiend> so they're actual methods not functions?
<banisterfiend> oh
<banisterfiend> the receiver
headius has quit [Quit: headius]
<banisterfiend> i thoguth that was teh parameter
<banisterfiend> interesting
<injekt> I would say so, I dont know how technical go gets exactly but yes I always refer to them as methods
leopard_me has quit [Ping timeout: 276 seconds]
<injekt> as a method is just a function bounce to a receiver, right
<injekt> sort-of :)
wallerdev has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
dasil003 has joined #ruby-lang
cyri_ has joined #ruby-lang
stonerfish has joined #ruby-lang
<zzak> i keep getting spam from ruby-core
<zzak> anyone know a good way to delete all messages from a specific address, but not the entire thread?
<zzak> it breaks my heart :(
judofyr has quit [Remote host closed the connection]
Mellett68 has joined #ruby-lang
schaerli has joined #ruby-lang
cantonic has quit [Quit: cantonic]
heftig has joined #ruby-lang
postmodern has quit [Quit: Leaving]
MaddinXx_ has joined #ruby-lang
tenderlove has joined #ruby-lang
lake has quit [Ping timeout: 240 seconds]
Mellett68 has quit [Remote host closed the connection]
TheMoonMaster has quit [Ping timeout: 245 seconds]
mksm has quit [Ping timeout: 260 seconds]
lake has joined #ruby-lang
mksm has joined #ruby-lang
kurko_ has quit [Ping timeout: 264 seconds]
schaerli has quit [Remote host closed the connection]
TheMoonMaster has joined #ruby-lang
thinkdevcode has joined #ruby-lang
tenderlove has quit [Ping timeout: 276 seconds]
shtirli__ has quit [Remote host closed the connection]
mwjcomputing has quit [Ping timeout: 244 seconds]
kurko_ has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
ryanlecompte has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby-lang
chimkan has joined #ruby-lang
brianpWins has joined #ruby-lang
Guest92806 has quit [Read error: Operation timed out]
leopard_me has joined #ruby-lang
justinram has quit [Ping timeout: 252 seconds]
Mellett68 has joined #ruby-lang
gmci has joined #ruby-lang
gmci is now known as Guest30953
cyri_ has quit [Ping timeout: 240 seconds]
Mellett68 has quit [Client Quit]
datanoise has quit [Ping timeout: 252 seconds]
Mellett68 has joined #ruby-lang
cultureulterior_ has quit [Read error: Connection reset by peer]
cultureulterior_ has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
Mellett68 has quit [Remote host closed the connection]
Mellett68 has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
cantonic has joined #ruby-lang
justinram has joined #ruby-lang
dasil003 has quit [Quit: dasil003]
rsl has joined #ruby-lang
jgomez has quit [Quit: Leaving]
gregmoreno has joined #ruby-lang
bfreeman has joined #ruby-lang
cultureulterior_ has quit [Ping timeout: 244 seconds]
cultureulterior_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
datanoise has joined #ruby-lang
sepp2k1 has joined #ruby-lang
m3nd3s has joined #ruby-lang
sepp2k has quit [Ping timeout: 244 seconds]
carloslopes has joined #ruby-lang
thinkdevcode has quit [Remote host closed the connection]
rekky has quit [Quit: rekky]
vlad_starkov has joined #ruby-lang
rekky has joined #ruby-lang
datanoise has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby-lang
nertzy has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
cultureulterior_ has quit [Ping timeout: 240 seconds]
cultureulterior_ has joined #ruby-lang
tenderlove has quit [Ping timeout: 244 seconds]
Mon_Ouie has joined #ruby-lang
chimkan has quit [Quit: chimkan]
r0bgleeson has joined #ruby-lang
chimkan_ has joined #ruby-lang
riffraff has joined #ruby-lang
tenderlove has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
mistym is now known as mistym_lunch
tenderlove has quit [Remote host closed the connection]
Hakon has quit [Quit: Leaving...]
heftig has quit [Quit: leaving]
stardiviner has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
m3nd3s has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
rue|w has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
CaptainJet has joined #ruby-lang
havenn has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
havenn has joined #ruby-lang
cultureulterior_ has quit [Quit: cultureulterior_]
havenn has quit [Ping timeout: 244 seconds]
ryanf has quit [Quit: broken pipes |||]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
svyatov has joined #ruby-lang
tjadc has quit [Quit: No Ping reply in 180 seconds.]
Uranio has quit [Quit: WeeChat 0.3.8]
tjadc has joined #ruby-lang
cantonic has quit [Quit: cantonic]
ishe has joined #ruby-lang
diegoviola has quit [Ping timeout: 240 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
nertzy has quit [Quit: This computer has gone to sleep]
kurko_ has joined #ruby-lang
kurko_ has quit [Client Quit]
thatdutchguy has quit [Remote host closed the connection]
kentos has quit [Quit: Leaving]
areil has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
havenn has joined #ruby-lang
qwerxy has quit [Quit: offski]
shtirlic_ has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby-lang
shtirlic_ has joined #ruby-lang
shtirlic has quit [Ping timeout: 265 seconds]
datanoise has quit [Ping timeout: 252 seconds]
riffraff has quit [Quit: This computer has gone to sleep]
havenn has quit [Ping timeout: 244 seconds]
RandyInLA has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
<darix> zzak: doesnt it depend on the mua?
rekky has quit [Quit: rekky]
ishe has quit [Ping timeout: 260 seconds]
<jaska> pöhnecta
nXqd has joined #ruby-lang
gsav has joined #ruby-lang
ryanlecompte has joined #ruby-lang
rue|w has joined #ruby-lang
ryanlecompte has quit [Ping timeout: 244 seconds]
diegoviola has quit [Read error: Operation timed out]
datanoise has joined #ruby-lang
rue|w has quit [Ping timeout: 264 seconds]
mwjcomputing has joined #ruby-lang
cantonic has joined #ruby-lang
mistym_lunch is now known as mistym
burgestrand has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
intellitech has quit [Quit: Leaving]
cantonic has quit [Read error: Connection timed out]
heftig has joined #ruby-lang
shtirlic has joined #ruby-lang
lsegal has joined #ruby-lang
leopard_me has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wnd has quit [Excess Flood]
wnd has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
havenn has joined #ruby-lang
setmeaway has joined #ruby-lang
solars has quit [Ping timeout: 255 seconds]
rippa has quit [Ping timeout: 248 seconds]
malev has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 256 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
sepp2k1 has quit [Ping timeout: 264 seconds]
MaddinXx_ has quit [Remote host closed the connection]
adambeynon has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby-lang
benanne has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
rsl has quit [Quit: Computer has gone to sleep.]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
carloslopes has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
nXqd has quit [Remote host closed the connection]
riffraff has joined #ruby-lang
riffraff has quit [Client Quit]
nXqd has joined #ruby-lang
banisterfiend has joined #ruby-lang
sailias has quit [Read error: Connection reset by peer]
<mistym> This is probably a stupid question with an easy answer.
<mistym> So I've got this XML document I'm parsing with nokogiri: https://gist.github.com/4132993
<mistym> I'm trying to access an inner node via this xpath: '/x:xmpmeta/rdf:RDF/rdf:Description/tiff:Make'
<mistym> And speciying the namespaces like so: #xpath(xpath, 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'tiff' => 'http://ns.adobe.com/tiff/1.0/')
<mistym> All is not well and I'm being warned about 'Undefined namespace prefix: /x:xmpmeta/rdf:RDF/rdf:Description/tiff:Make' - where did I go wrong?
<apeiros_> you're missing x
<apeiros_> in your namespace spec
chimkan_ has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
<mistym> Oh, hilarious. You're right!
<mistym> Thanks!
<mistym> (Aside: I think that defining "x" as a namespace was a silly decision on the part of whoever was responsible.)
<apeiros_> mistym: you can name it whatever you want on your part…
<apeiros_> you can do: xpath('/meta:xmpmeta/…', 'meta' => 'adobe:ns:meta/', …) f.ex.
<mistym> True, good point!
<banisterfiend> apeiros_: do u have a crystal http://cl.ly/image/070i2T1C100i
<whitequark> TIL that MRI has __method__
<whitequark> def a() __method__ end; a # => :a
<apeiros_> whitequark: yupp, nice in return enum_for(__method__, *args) unless block_given?
Banistergalaxy has joined #ruby-lang
<apeiros_> banisterfiend: errr, no?
shtirlic has quit [Remote host closed the connection]
<banisterfiend> whitequark: it's not k00 for aliased methods though
<whitequark> apeiros_: he's drunk again probably...
shtirlic has joined #ruby-lang
<banisterfiend> in that it returns the original method name rather than the aliases name
tonni has joined #ruby-lang
chimkan__ has joined #ruby-lang
<whitequark> banisterfiend: yeah, I think it is expanded lexically
<whitequark> like __FILE__
<banisterfiend> alias's
Mchl has quit [Ping timeout: 252 seconds]
<banisterfiend> whitequark: __callee__ used to return alias's name, but matz thought the distinction b/w __callee__ and __method__ was too subtle, so now they just return the same thing
<whitequark> banisterfiend: imo the entire feature is too obscure to live
agile has quit [Remote host closed the connection]
<whitequark> why __method__ and not __METHOD__?
Mchl has joined #ruby-lang
<banisterfiend> whitequark: __method__ is a method, __FILE__ is an "expression" (whatever that means)
chimkan has quit [Ping timeout: 252 seconds]
chimkan__ is now known as chimkan
shtirlic has quit [Ping timeout: 244 seconds]
<whitequark> banisterfiend: ah, I see now
<whitequark> __FILE__ is expanded at compilation time, the token itself never makes it to the interpreter
<whitequark> hence expression
banisterfiend has quit [Remote host closed the connection]
Mchl has quit [Ping timeout: 244 seconds]
Mchl has joined #ruby-lang
workmad3 has joined #ruby-lang
carl- has joined #ruby-lang
carl- has quit [Client Quit]
cirwin has joined #ruby-lang
banisterfiend has joined #ruby-lang
gix has quit [Ping timeout: 250 seconds]
elux has quit [Quit: Bye!]
gix has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
afgeneralist has joined #ruby-lang
KA_ has quit [Quit: KA_]
stonerfish has quit [Quit: Leaving.]
thatdutchguy has joined #ruby-lang
KA_ has joined #ruby-lang
mjio has joined #ruby-lang
malev has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
esad has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
afgeneralist has quit [Ping timeout: 246 seconds]
anannie has quit [Quit: Leaving...]
hahuang65 has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
chendo_ is now known as chendo
hahuang65 has joined #ruby-lang
anannie has joined #ruby-lang
hahuang65_ has joined #ruby-lang
Tabrenus has joined #ruby-lang
hahuang65 has quit [Ping timeout: 246 seconds]
benanne has quit [Quit: kbai]
kith has quit [Read error: Connection reset by peer]
kith has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
hahuang65_ has quit [Quit: Computer has gone to sleep.]
svyatov has quit [Quit: svyatov]
Tabrenus has quit [Quit: Tabrenus]
banisterfiend has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
mistym has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Quit Konversation]
stonerfish has joined #ruby-lang
thatdutchguy has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 244 seconds]
mistym has joined #ruby-lang
robbyoconnor has joined #ruby-lang
Mellett68 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
workmad3 has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
Averna has joined #ruby-lang