apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p385: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
<firefux> gem list
rwilcox has joined #ruby-lang
<firefux> gem update doesn't remove gems, it keeps the old ones
innohero has joined #ruby-lang
csexton has left #ruby-lang [#ruby-lang]
<zenspider> theoros: ls -lt $(gem env gemdir)/gems
tenderlove has quit [Read error: Connection reset by peer]
<theoros> zenspider: ah, of course :)
soypirate has joined #ruby-lang
davidbalber|away is now known as davidbalbert
toretore has quit [Quit: Leaving]
nXqd has quit [Ping timeout: 264 seconds]
swav has joined #ruby-lang
KA_ has joined #ruby-lang
Vektur has joined #ruby-lang
bradland has joined #ruby-lang
krohrbaugh has joined #ruby-lang
AntiTyping has joined #ruby-lang
BigFatFatty has left #ruby-lang [#ruby-lang]
kogent has quit [Quit: kogent]
davidbalbert is now known as davidbalber|away
<UziMonkey> I need to test if an array representing a loop (the first element is also after the last element) has any consecutive elements. I've done (a + [a.first]).each_cons(2).any?{|n| n[0]==n[1]}
<UziMonkey> but is there a better way?
<UziMonkey> for example, %w{a b c} would be OK, %w{a b b} would not, but %w{a b a} would also not be OK since the first and last are also adjacent
postmodern has joined #ruby-lang
torrieri has joined #ruby-lang
<manveru> ?
<manveru> loopy = a[0] == a[-1]
<joevandyk> when's ruby 2.0 coming out?
<drbrain> joevandyk: February 26 IIRC
<joevandyk> drbrain: thanks. haven't really been following it. you know if it'll speed up the startup time of large projects that use bundler?
<drbrain> it's faster, but I don't know if anyone has performed such a benchmarks
jonahR has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby-lang
<joevandyk> drbrain: great. doing `bundle exec ruby -e "puts 1"` takes about 4 seconds to run for me
<joevandyk> on 1.9.3
<joevandyk> so hoping that improves
jtoy has joined #ruby-lang
<joevandyk> on a project with 81 gems
<manveru> joevandyk: that is the fault of bundler then :P
<joevandyk> manveru: i thought it was mostly ruby's require being slow
<manveru> you're not requiring anything
torrieri has quit [Quit: Linkinus - http://linkinus.com]
<manveru> try a strace and see what it does
<tpope> bundler requires by default
<manveru> orly
<tpope> if you gem 'foo', it requires 'foo'
<tpope> and yes, that's probably the issue
<tpope> probably
idkazuma has quit [Ping timeout: 264 seconds]
<manveru> well, then get an SSD if you need 80 damn gems :P
<tpope> or a falcon patch
<manveru> a who?
<joevandyk> manveru: this is on a SSD
gix has quit [Ping timeout: 252 seconds]
<tpope> it's a cumulation of performance patches
<tpope> most notably, it fixes require so it's not O(n^2)
torrieri has joined #ruby-lang
<havenwood> 18 days till Ruby 2.0.0 release. Falcon ftw?
<manveru> well, try the preview
<havenwood> rc2
<joevandyk> manveru: some of the gems i use don't work on 2.0
<tpope> please tell me 2.0 includes the require fix
<tpope> I haven't tried
<joevandyk> at least a month ago it didn't
<joevandyk> i should try again
<joevandyk> compilation errors
<manveru> well, the ABI changed i guess
<UziMonkey> manveru: hmm?
<manveru> the C API isn't compatible anymore?
marr has quit [Ping timeout: 248 seconds]
<tpope> is require going to blow in ruby forever? :(
<UziMonkey> about this <manveru> loopy = a[0] == a[-1]
<tpope> I assume there is a legit hold up but it's been YEARS
<manveru> tpope: people should just use require_relative way more :P
<havenwood> tpope: require fix? I'm not familiar with that, what is it?
<manveru> no need to check $LOAD_PATH for anything but the primary file of a library and maybe c exts
<tpope> havenwood: every time you require a file, ruby scans a list of previous requires for duplicates. this means require has O(n^2) complexity
<tpope> i.e. it gets slow fast
<manveru> UziMonkey: what's wrong with that?
<tpope> funny falcon patch fixes it
<tpope> but it's just a patch
<tpope> and it's been a patch for years
gix has joined #ruby-lang
<tpope> never seems to get merged in
<havenwood> tpope: Oh, right. Tenderlove said something about that at RubyConf. Has it not been merged?
<tpope> joevandyk says it hasn't
<joevandyk> not in 1.9.3
<tpope> oh ok
<drbrain> I think a different patch was merged
<joevandyk> iirc, there's a similar patch in 2.0
<havenwood> joevandyk: in 2.0.0
anachronistic has joined #ruby-lang
<tpope> similar is good enough for me
anachronistic has quit [Client Quit]
<UziMonkey> manveru: it needs to test for adjacent matches including the loop match. I'm just wondering if there's a cleaner way than what I posted
<tpope> I was distraught at the thought of it not being in 2.0
joevandyk has quit [Quit: joevandyk]
<manveru> UziMonkey: probably
<manveru> UziMonkey: are all your arrays 3 elements?
<UziMonkey> no, that's just the test case
<manveru> well, what about %w[a b c c]
<UziMonkey> that's bad, 2 adjacent c's
thone has joined #ruby-lang
thone_ has quit [Ping timeout: 245 seconds]
<manveru> a = %w[x d a b c d]; c = Hash.new(0); a.each{|e| break false if (c[e] += 1) > 1 } && a.first != a.last
<manveru> something like that might work for every case
<manveru> oh, only connected ones
<UziMonkey> right
<manveru> nm
<UziMonkey> my solution does work..
tenderlove has joined #ruby-lang
<manveru> what about ["a"] ?
<manveru> a[0] != a[-1] && a.reduce{|s,v| break false if s == v; v }
<UziMonkey> I suppose I'll need to add a special case for that
<manveru> now someone beat me and tell me this is abuse of reduce :)
glebm has quit [Quit: Computer has gone to sleep.]
<manveru> but haven't yet used it today, so there you go
<manveru> gn8
<UziMonkey> I think each_cons would be cleaner there, but I like the test case for the loop instead of making a new array
KA_ has quit [Quit: KA_]
liftM has quit [Quit: leaving]
<UziMonkey> a[0] == a[-1] || a.each_cons(2).any?{|n| n[0]==n[1] }
<UziMonkey> same thing, but makes more Array objects all over the place
<UziMonkey> I didn't know about each_cons and did the same thing the other day with a[0..-2].zip(a[1..-2]).flatten.any?{|l| l[1] > l[0] }
<theoros> UziMonkey: (-1..a.length).find { |n| a[n] == a[n+1] }
<theoros> or some variant thereof?
<hagabaka> a.length > 1 && (0...a.length).any? {|i| a[i - 1] == a[i]}
<UziMonkey> actually, I think I like that
<theoros> hagabaka: :)
neocoin_ has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
<UziMonkey> both of you literally came up with the same thing (almost)
<theoros> modulo edge cases, yeah
<UziMonkey> actually, what I really think is the object should be handling this logic
<UziMonkey> I'll just make a Loop class that overloads the index operator
<hagabaka> also, (a + [a.first]).chunk {|x|x}.to_a.length < a.length + 1
<hagabaka> but that's pretty convoluted and unreadable :(
<UziMonkey> hmm.. chunk is nice, didn't know about it
<hagabaka> it's not in 1.8
KA_ has joined #ruby-lang
<hagabaka> actually just (0...a.length).any? {|i| a[i - 1] == a[i]} is enough, since 0...1 is an empty range and it will return false
dous has quit [Remote host closed the connection]
<UziMonkey> I hate you now
<UziMonkey> that's too simple...
joevandyk has joined #ruby-lang
arubin has joined #ruby-lang
thone_ has joined #ruby-lang
imajes has quit [Excess Flood]
sailias has joined #ruby-lang
<theoros> why the super call
imajes has joined #ruby-lang
<theoros> oh i guess for [1][0.2]
<joevandyk> how long do tempfile's stick around?
mistym has quit [Remote host closed the connection]
<UziMonkey> right, non Fixnum arguments
thone has quit [Ping timeout: 264 seconds]
<joevandyk> hm, nevermind
jsilver has joined #ruby-lang
<UziMonkey> wait, I should be overloading @at
havenwood has quit [Ping timeout: 276 seconds]
<UziMonkey> #at
geopet has quit [Quit: geopet]
<theoros> UziMonkey: i think you can drop the conditional, -1 % 10 == (-1 + 10) % 10
<UziMonkey> hmm.. you're right. I was thinking of % wrong.
<theoros> could also just do super(idx.to_int % length) but idk
emocakes has quit [Quit: emocakes]
brian_amicus has joined #ruby-lang
<UziMonkey> that's what I did
<UziMonkey> but with #at, which only takes fixnumbs
<UziMonkey> *FixNums :P
mjio has quit []
<theoros> Fixnums* :)
<theoros> UziMonkey: #at takes non-fixnums
spuk has quit [Ping timeout: 245 seconds]
<theoros> x = ""; def x.to_int() 1 end; [1, 2, 3][x] #=> 2
jtoy has quit [Quit: jtoy]
<UziMonkey> no, it converts everything to fixnum, I'm looking at the source right now
<theoros> x = ""; def x.to_int() 1 end; [1, 2, 3].at(x) #=> 2
<UziMonkey> oh, OK, I'll just convert to int then
<UziMonkey> super idx.to_int % length, that's it :P
<yfeldblum> joevandyk, possibly indefinitely
<theoros> duck typing wins again
tylersmith has quit [Quit: tylersmith]
sebasoga has joined #ruby-lang
bantic has quit [Quit: bantic]
dhruvasagar has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
csexton has joined #ruby-lang
sebasoga has joined #ruby-lang
thone_ has quit [Ping timeout: 252 seconds]
cirenyc has joined #ruby-lang
<hagabaka> UziMonkey: % seems to take non integers happily too
rsl has quit [Quit: Computer has gone to sleep.]
sebasoga has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
sebasoga has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
thone has joined #ruby-lang
soypirate has quit [Quit: Leaving]
kentos has quit [Quit: Leaving]
<zenspider> please don't define to_int unless your object is actually int-like
<zenspider> just like don't define to_str unless your object is string-like
mrsolo has quit [Quit: Leaving]
<UziMonkey> I'm not defining to_int
<UziMonkey> ah, graphical debugger
gregmore_ has quit [Ping timeout: 244 seconds]
thufir_ has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
spuk has joined #ruby-lang
Bearproof has joined #ruby-lang
sush24 has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
huydx_ has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
huydx has quit [Ping timeout: 272 seconds]
huydx_ is now known as huydx
cjs226 has quit []
Vektur has quit []
mjio has joined #ruby-lang
peppyheppy has quit [Ping timeout: 264 seconds]
krohrbaugh has quit [Quit: Leaving.]
bzalasky has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
jsilver has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Bearproof has left #ruby-lang [#ruby-lang]
JMcAfreak has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Quit: Computer has gone to sleep.]
cored has quit [Quit: leaving]
sebasoga has quit [Quit: Computer has gone to sleep.]
kgrz has quit [Ping timeout: 264 seconds]
drbrain has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
megha has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
csexton has quit [Quit: Computer has gone to sleep.]
sebasoga has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
sebasoga has quit [Read error: Connection reset by peer]
sebasoga has joined #ruby-lang
<bradland> postmodern: you around?
<postmodern> bradland, temporarily
<postmodern> bradland, need to relocate in an hour or so
megha has quit [Quit: WeeChat 0.4.0]
tomzx_mac has joined #ruby-lang
glebm has joined #ruby-lang
gregmore_ has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
gregmore_ has quit [Ping timeout: 276 seconds]
jsilver has quit [Remote host closed the connection]
io_syl has quit [Ping timeout: 240 seconds]
KA_ has quit [Quit: KA_]
srbaker has quit [Quit: Computer has gone to sleep.]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
rwilcox has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jsilver has joined #ruby-lang
torrieri has joined #ruby-lang
havenwood has joined #ruby-lang
rippa has joined #ruby-lang
krohrbaugh has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
torrieri has quit [Ping timeout: 256 seconds]
bluepojo_ has joined #ruby-lang
kentos has joined #ruby-lang
bluepojo has quit [Ping timeout: 245 seconds]
bluepojo_ has quit [Ping timeout: 252 seconds]
Bearproof has joined #ruby-lang
Bearproof has left #ruby-lang [#ruby-lang]
havenwood has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
madish has quit [Remote host closed the connection]
dcwu has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Ping timeout: 246 seconds]
kentos has quit [Quit: Leaving]
rippa has joined #ruby-lang
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
jsilver has quit [Remote host closed the connection]
thufir_ has quit [Quit: Leaving.]
bzalasky has joined #ruby-lang
postmodern has quit [Quit: Leaving]
bzalasky has quit [Remote host closed the connection]
guns has joined #ruby-lang
mephux has quit [Excess Flood]
tomzx_mac has quit [Ping timeout: 246 seconds]
mephux has joined #ruby-lang
bzalasky has joined #ruby-lang
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
io_syl has joined #ruby-lang
kurko__ is now known as kurko_
jonahR has quit [Quit: jonahR]
bzalasky has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
DEac- has quit [Read error: Operation timed out]
bzalasky has joined #ruby-lang
DEac- has joined #ruby-lang
bluepojo has joined #ruby-lang
arubin has quit [Quit: Computer has gone to sleep.]
sandbags has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
glebm has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri_ has joined #ruby-lang
torrieri has quit [Read error: Connection reset by peer]
glebm has quit [Client Quit]
torrieri_ has quit [Client Quit]
mistym has quit [Remote host closed the connection]
DEac- has quit [Ping timeout: 245 seconds]
shirokuro11 has joined #ruby-lang
DEac- has joined #ruby-lang
ryanf has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
cordax has joined #ruby-lang
kurko_ has quit [Ping timeout: 276 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
mistym has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
AndChat| has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby-lang
torrieri has joined #ruby-lang
javilm has joined #ruby-lang
javilm has quit [Client Quit]
bzalasky has joined #ruby-lang
postmodern has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
ryanf has quit [Quit: broken pipes |||]
macmartine has joined #ruby-lang
ddd has quit [Ping timeout: 260 seconds]
ddd has joined #ruby-lang
innohero_ has joined #ruby-lang
Rarrikins_s has quit [Ping timeout: 244 seconds]
ryanf has joined #ruby-lang
bluepojo has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
lun_ has joined #ruby-lang
<vbatts> zzak: i submitted an update to #7656
bluepojo has quit [Ping timeout: 276 seconds]
lun_ has quit [Ping timeout: 276 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
lun_ has joined #ruby-lang
bryanl has quit [Ping timeout: 272 seconds]
bryanl has joined #ruby-lang
gregmoreno has joined #ruby-lang
dbussink has joined #ruby-lang
swav has quit [Remote host closed the connection]
dbussink has quit [Client Quit]
sebasoga has quit [Quit: Computer has gone to sleep.]
swav has joined #ruby-lang
dbussink has joined #ruby-lang
dbussink has quit [Client Quit]
dbussink has joined #ruby-lang
dbussink has quit [Client Quit]
dbussink has joined #ruby-lang
dbussink has quit [Excess Flood]
rippa has quit [Ping timeout: 240 seconds]
swav has quit [Ping timeout: 248 seconds]
mephux has quit [Excess Flood]
mephux has joined #ruby-lang
mephux has quit [Excess Flood]
mephux has joined #ruby-lang
innohero has quit [Quit: Leaving]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
brianpWins has quit [Quit: brianpWins]
KA_ has joined #ruby-lang
lun_ has quit [Ping timeout: 245 seconds]
bzalasky has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 260 seconds]
Fretta has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
brian_amicus has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
skade has joined #ruby-lang
mjio has quit []
ridget has quit [Remote host closed the connection]
cordax has quit [Quit: Computer has gone to sleep.]
KA_ has joined #ruby-lang
lun_ has quit [Ping timeout: 248 seconds]
lun_ has joined #ruby-lang
chendo__ has joined #ruby-lang
Fretta has quit [Quit: Fretta]
lun_ has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby-lang
chendo__ has quit [Quit: Computer has gone to sleep.]
joevandyk has quit [Quit: joevandyk]
woollyams has joined #ruby-lang
nXqd has joined #ruby-lang
havenwood has quit [Ping timeout: 260 seconds]
torrieri has quit [Quit: Leaving...]
wallerdev has quit [Quit: wallerdev]
lun_ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
liftM has joined #ruby-lang
nXqd has quit [Ping timeout: 245 seconds]
jxie has quit [Quit: leaving]
ruskie has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
liftM has quit [Client Quit]
lun__ has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]
vesan has quit [Ping timeout: 245 seconds]
vesan has joined #ruby-lang
tonni has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
vesan has quit [Ping timeout: 264 seconds]
torrieri has joined #ruby-lang
vesan has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
dr_bob has joined #ruby-lang
vesan has quit [Ping timeout: 245 seconds]
javilm has joined #ruby-lang
chendo_ has quit [Ping timeout: 240 seconds]
javilm has quit [Client Quit]
KA_ has quit [Quit: KA_]
vesan has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo__ has joined #ruby-lang
chendo__ has quit [Client Quit]
vesan has quit [Remote host closed the connection]
vesan has joined #ruby-lang
KA_ has joined #ruby-lang
foucist has quit [Ping timeout: 276 seconds]
zmack has joined #ruby-lang
zmack has quit [Read error: Connection reset by peer]
zmack has joined #ruby-lang
postmodern has quit [Quit: Leaving]
vesan has quit [Ping timeout: 264 seconds]
sduckett has quit [Ping timeout: 248 seconds]
AntiTyping has quit [Quit: AntiTyping]
dbussink has joined #ruby-lang
dbussink has quit [Remote host closed the connection]
shirokuro11 has quit [Remote host closed the connection]
sduckett has joined #ruby-lang
foucist has joined #ruby-lang
tonni has joined #ruby-lang
dbussink has joined #ruby-lang
dbussink has quit [Client Quit]
stonerfish has joined #ruby-lang
brianpWins has joined #ruby-lang
dbussink has joined #ruby-lang
dbussink has quit [Excess Flood]
glebm has joined #ruby-lang
skade has joined #ruby-lang
vesan has joined #ruby-lang
nXqd has joined #ruby-lang
dbussink has joined #ruby-lang
nXqd has quit [Read error: Connection reset by peer]
nXqd has joined #ruby-lang
lun__ has quit [Read error: Connection reset by peer]
dc5ala has joined #ruby-lang
foucist has quit [Read error: Operation timed out]
lun_ has joined #ruby-lang
foucist has joined #ruby-lang
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
vesan has quit [Ping timeout: 245 seconds]
vesan has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
tjadc has joined #ruby-lang
fryphone has joined #ruby-lang
Averna has quit [Quit: Leaving.]
fryphone has quit [Client Quit]
foucist has quit [Ping timeout: 248 seconds]
solars has joined #ruby-lang
RickHull has quit [Read error: Connection reset by peer]
foucist has joined #ruby-lang
WillMarshall has joined #ruby-lang
rue|w has joined #ruby-lang
judofyr has joined #ruby-lang
rue_XIW has joined #ruby-lang
guns has quit [Quit: guns]
rue|w has quit [Ping timeout: 276 seconds]
krz has joined #ruby-lang
vesan has quit [Ping timeout: 245 seconds]
KA_ has quit [Quit: KA_]
glebm has quit [Quit: Computer has gone to sleep.]
gnufied has joined #ruby-lang
intellitech has quit [Quit: intellitech]
rue_XIW has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
rue|w has joined #ruby-lang
krz has quit [Read error: Connection reset by peer]
hhatch has joined #ruby-lang
woollyams has quit [Ping timeout: 245 seconds]
woollyams has joined #ruby-lang
krz has joined #ruby-lang
Egbrt has joined #ruby-lang
francisfish has joined #ruby-lang
agarcia has joined #ruby-lang
mjbamford has joined #ruby-lang
Egbrt has quit [Client Quit]
vesan has joined #ruby-lang
Egbrt has joined #ruby-lang
vesan has quit [Remote host closed the connection]
vesan has joined #ruby-lang
foucist has quit [Read error: Operation timed out]
maxmanders has joined #ruby-lang
foucist has joined #ruby-lang
foucist has quit [Ping timeout: 240 seconds]
glebm has joined #ruby-lang
xalei has joined #ruby-lang
Egbrt has quit [Quit: Egbrt]
lajlev has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
dzhulk has quit [Quit: Leaving.]
francisfish has quit [Remote host closed the connection]
<lajlev> How to make rand() generate 01 02 …08 09 instead of 1 2 … 8 9? http://pastie.org/6085751
xcombelle has joined #ruby-lang
<judofyr> lajlev: .to_s.rjust(2, '0')
rue|w has quit [Read error: Connection reset by peer]
francisfish has joined #ruby-lang
rue|w has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
<lajlev> judofyr: Thx a lot
shachaf has left #ruby-lang [#ruby-lang]
mjbamford has quit [Quit: WeeChat 0.3.9.2]
shachaf has joined #ruby-lang
foucist has joined #ruby-lang
<injekt> "%02d" % random_number(...)
rue|w has quit [Read error: Connection reset by peer]
KA_ has quit [Quit: KA_]
rue|w has joined #ruby-lang
sepp2k has joined #ruby-lang
rue|w has quit [Read error: Connection reset by peer]
rue_XIW has joined #ruby-lang
sandbags has joined #ruby-lang
tonni has joined #ruby-lang
kgrz has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
mjbamford has joined #ruby-lang
mjbamford has quit [Read error: Connection reset by peer]
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
b1rkh0ff has quit [Read error: Operation timed out]
marr has joined #ruby-lang
sepp2k has quit [Ping timeout: 248 seconds]
torrieri has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
torrieri has quit [Ping timeout: 245 seconds]
liftM has joined #ruby-lang
sepp2k has joined #ruby-lang
kith has quit [Read error: Connection reset by peer]
bzalasky has quit [Remote host closed the connection]
dzhulk has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
rue_XIW has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
kcassidy has joined #ruby-lang
rue|w has joined #ruby-lang
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dzhulk has quit [Ping timeout: 246 seconds]
rue_XIW has joined #ruby-lang
rue|w has quit [Read error: Operation timed out]
dzhulk has joined #ruby-lang
torrieri has joined #ruby-lang
Skitsu`work has quit [Remote host closed the connection]
torrieri has quit [Ping timeout: 255 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
swav has joined #ruby-lang
foucist has quit [Ping timeout: 244 seconds]
foucist has joined #ruby-lang
Criztian has joined #ruby-lang
foucist has quit [Ping timeout: 248 seconds]
foucist has joined #ruby-lang
sush24 has joined #ruby-lang
Muz has quit [Ping timeout: 248 seconds]
kain has quit [Ping timeout: 276 seconds]
rue_XIW has quit [Read error: Connection reset by peer]
lele has quit [Ping timeout: 246 seconds]
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
Skitsu`work has joined #ruby-lang
rue|w has joined #ruby-lang
dzhulk1 has joined #ruby-lang
dzhulk1 has quit [Client Quit]
lele has joined #ruby-lang
dzhulk has quit [Ping timeout: 246 seconds]
liftM has quit [Quit: leaving]
idkazuma has joined #ruby-lang
Muz has joined #ruby-lang
Muz_ has joined #ruby-lang
Muz_ has quit [Client Quit]
elico has joined #ruby-lang
havenwood has joined #ruby-lang
sepp2k has quit [Ping timeout: 248 seconds]
rue_XIW has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
dcwu has quit [Quit: Leaving.]
rue|w has quit [Ping timeout: 240 seconds]
elico has quit [Quit: Elico]
mytrile has joined #ruby-lang
dous_ has joined #ruby-lang
dous_ has quit [Changing host]
dous_ has joined #ruby-lang
lajlev has quit [Quit: lajlev]
sepp2k has joined #ruby-lang
glebm has joined #ruby-lang
dous has quit [Ping timeout: 248 seconds]
xalei has quit [Remote host closed the connection]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
idkazuma has quit [Remote host closed the connection]
JohnBat26 has quit [Remote host closed the connection]
foucist has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
kain has joined #ruby-lang
rue_XIW has quit [Read error: Connection reset by peer]
rue|w has joined #ruby-lang
krz has quit [Read error: Connection reset by peer]
antbody has joined #ruby-lang
JohnBat26 has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
kain has quit [Ping timeout: 264 seconds]
hhatch has quit [Ping timeout: 260 seconds]
robotmay has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
innohero_ has quit [Ping timeout: 260 seconds]
antbody has quit [Quit: leaving]
hhatch has joined #ruby-lang
therod has joined #ruby-lang
kain has joined #ruby-lang
tsou has joined #ruby-lang
chendo__ has joined #ruby-lang
toretore has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
carloslopes has joined #ruby-lang
kain has quit [Ping timeout: 246 seconds]
rue|w has quit [Read error: Connection reset by peer]
rue_XIW has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
sush24_ has joined #ruby-lang
duncanc has joined #ruby-lang
sush24 has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
idkazuma has joined #ruby-lang
megha has joined #ruby-lang
duncanc has left #ruby-lang [#ruby-lang]
nignaztic has quit [Read error: Connection reset by peer]
duncanc has joined #ruby-lang
chendo__ has quit [Quit: Computer has gone to sleep.]
duncanc has quit []
Muttonlamb has joined #ruby-lang
jbsan has quit [Ping timeout: 264 seconds]
Muttonlamb has quit [Ping timeout: 245 seconds]
jbsan has joined #ruby-lang
zomgbie has joined #ruby-lang
gnufied has joined #ruby-lang
rsl has joined #ruby-lang
kurko_ has joined #ruby-lang
kain has joined #ruby-lang
tomzx_mac has joined #ruby-lang
<UziMonkey> this probably looks incomprehensible, but it works. https://github.com/mmorin/RubyQuiz/blob/master/004-regexp-build/solution.rb
<UziMonkey> this is for RubyQuiz 4: http://www.rubyquiz.com/quiz4.html
zomgbie has left #ruby-lang [#ruby-lang]
dhruvasa1ar has joined #ruby-lang
krz has joined #ruby-lang
futurechimp has joined #ruby-lang
hehejo has joined #ruby-lang
csexton has joined #ruby-lang
kain has quit [Ping timeout: 276 seconds]
<UziMonkey> this was an interesting one, the naive answer worked but was extremely slow
Bearproof has joined #ruby-lang
sebasoga has joined #ruby-lang
Bearproof has left #ruby-lang [#ruby-lang]
hehejo has left #ruby-lang [#ruby-lang]
<whitequark> hm
<whitequark> why does Regexp feature ::union, but not ::concatenation?..
csexton has left #ruby-lang [#ruby-lang]
<judofyr> whitequark: because concatenation is just #{…}#{…}?
<judofyr> or, [].join for that matter
<whitequark> judofyr: but isn't union #{...}|#{...} ?
Banistergalaxy has quit [Ping timeout: 248 seconds]
<UziMonkey> what would Regexp::concat do?
<UziMonkey> this is Ruby, just write one
<whitequark> judofyr: they seem to do exact same thing for me
<judofyr> whitequark: true
<judofyr> [].map { |x| Regexp.escape(x) }.join '|'
<whitequark> judofyr: wait, why #escape?
<judofyr> whitequark: Regexp.union("|", ".")
<judofyr> so it's a bit more complex
<judofyr> Regexp === x ? x : Regexp.escape(x)
<whitequark> judofyr: but Regexp.union(/a/, /./)
<whitequark> etc
<judofyr> whitequark: yeah, both is supported
<judofyr> are*
<whitequark> so it seems for me that .concat would be equally justified...
<judofyr> whitequark: btw, did you see Topaz?
<judofyr> whitequark: true
<whitequark> judofyr: we already have rbx
Banistergalaxy has joined #ruby-lang
<whitequark> 90% of work is not porting it to whatever VM is the coolest one now
<whitequark> but supporting various unobvious quirks
<judofyr> whitequark: sure, but rbx uses LLVM. RPython is more suited for dynamic languages.
<whitequark> judofyr: lolwhat?
<judofyr> whitequark: it's faster :)
<whitequark> it most certainly isn't
<judofyr> benchmarks shows otherwise, but *shrugs*
<yorickpeterse> Hello world benchmarks don't count
<yorickpeterse> Nor does calculating the square root of X
Criztian has quit [Remote host closed the connection]
<whitequark> until it supports everything in that list, I don't care about benchmarks
<apeiros_> yorickpeterse: hello world benchmarks are great to measure coldstart time ;-)
<judofyr> yorickpeterse: what about streaming video to mplayer? https://github.com/timfel/topaz_bmpstreaming_demo
<judofyr> whitequark: judge for yourself, but it seems to me that they've focused on hard part first
<whitequark> judofyr: again; the hard part is compatibility
<judofyr> whitequark: (performance-wise)
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<judofyr> encoding support is lacking though
<yorickpeterse> apeiros_: herp derp `time ruby -e ''`
<yorickpeterse> ZOMG SO FAST
<whitequark> judofyr: performance? yeah, let's be like mongodb. the data goes into devnull but it's fast!
<whitequark> correctness > performance. always.
<apeiros_> yorickpeterse: that's what I actually did with ruby on my NAS :)
<apeiros_> took it ~20s
<judofyr> I know you shouldn't judge an implementation from benchmark, but you judge it from *nothing at all*
<yorickpeterse> apeiros_: that's like the worst fucking benchmark you'll ever find
<judofyr> I'd say it shows potential
<whitequark> judofyr: I judge it from lack of compatibility
<whitequark> every single ruby implementation did show these "promising benchmarks" early on
<yorickpeterse> "Oh shit, The Lunix takes 15 seconds to boot. It must be slow as balls in everything!"
<apeiros_> yorickpeterse: if your intent is to find the coldstart time? no. but feel free to show a better.
<judofyr> whitequark: the question remains if the lacking compatibility will affect performance
<whitequark> judofyr: the history shows that it will
<yorickpeterse> apeiros_: I think somebody on the HN thread also mentioned it: comparing cold start is fairly useless in Ruby land
<whitequark> all of them then either died or matured and got slower.
<judofyr> well, after looking at the code it seems that they've thought about quite a lot
<apeiros_> yorickpeterse: no it isn't. you're drawing wild conclusions.
<yorickpeterse> Since most applications are long running ones the startup time matters very little (assuming it's within reasonable limits)
<apeiros_> yorickpeterse: and if there's something worse than bad benchmarks then it's people drawing wild conclusions.
<judofyr> but sure, continue hating
<yorickpeterse> Having said that, Topaz looks cool from a "Lets write it!" perspective
<yorickpeterse> I mean I probably would've done something similar if I had the time
<whitequark> hating, lol
<judofyr> apieros: that is true. but just because HN writes crappy benchmark doesn't make Topaz slow :)
<yorickpeterse> However, I wouldn't sell performance of my language implementation if it (most likely) doesn't run a large portion of existing code (yet)
<whitequark> as if I wasn't familiar firsthand with this performance-related quirk of immature implementations, writing two of them myself.
<judofyr> whitequark: and what makes you think the makers of Topaz aren't aware of that too?
<whitequark> judofyr: the fact that they published benchmarks before publishing near-100% rubyspec compat
<judofyr> whitequark: 100% rubyspec compat is a lot of "implement a lot of boring methods" that won't necessarily affect performance.
<judofyr> note: *necessarily*
<yorickpeterse> A fast car is no fun if it can't drive on 80% of today's roads
<yorickpeterse> or it if it randomly breaks and you die
<whitequark> judofyr: again; in practice, they do. ask headius or dbussnik or whoever
* apeiros_ thinks go-carts are fun, even if their application is limited
<yorickpeterse> What I'd like to see is Topaz supporting threads
<apeiros_> same for F1 cars
<yorickpeterse> We need more Ruby implementations with actual threads
<yorickpeterse> So that hopefully Dear Leader one day blesses us with a non existing GIL
<whitequark> sigh
<yorickpeterse> Ok, unrelated Ruby trivia:
<yorickpeterse> Daemon kit is called "daemon-kit" on RubyGems, what would the filename be for the corresponding require call?
<yorickpeterse> daemonkit? Nope
<yorickpeterse> daemon-kit? Nope
<yorickpeterse> Fucking daemon_kit
<whitequark> yorickpeterse: the only reason GIL remains in MRI (and will remain till the end of the days) is that MRI code is by no measure threadsafe
<judofyr> yorickpeterse: man, I wish we did as Perl
<yorickpeterse> judofyr: oh god yes
<judofyr> whitequark: and because matz care about single-thread performance
<apeiros_> yorickpeterse: and I assume they don't even document that fact - it's a pet peeve of mine too
<yorickpeterse> apeiros_: I had to look in the repo for it
<whitequark> yorickpeterse: and the amount of work required to make it threadsafe is enormous and no one probably would ever pull it off
nyuszika7h has joined #ruby-lang
<yorickpeterse> whitequark: I know, but still
<judofyr> yorickpeterse: 3 different name to refer to the same thing: gem install foo; require 'foo/bar'; Foo::Bar.new
<whitequark> judofyr: well, it doesn't matter *anymore*
<yorickpeterse> judofyr: there's a better one
<whitequark> back when ruby was designed, SMP wasn't commonplace
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
<yorickpeterse> RMagic => `require RMagick`, constant defined is Magick
<yorickpeterse> srsly
<judofyr> yorickpeterse: yeah, but I think even the "regular" one is annoying
x0F_ is now known as x0F
* apeiros_ would love if the convention was: require 'Foo/Bar'; Foo::Bar
<apeiros_> I see no point in lowercasing all
<yorickpeterse> apeiros_: that's sort of what people should be doing but it would be `require 'foo/bar'`
<yorickpeterse> but alas people are cunts
kain has joined #ruby-lang
<apeiros_> foo/bar is the current convention
<apeiros_> sadly, so many don't even follow current convention
<apeiros_> rails didn't make it better by deviating from FooBar -> foobar to foo_bar
<yorickpeterse> At least we don't have FooBar.rb
<yorickpeterse> (fuck I hate capitalized source code names)
<apeiros_> that's actually what I'd prefer
<yorickpeterse> errr, source code file whatever
<whitequark> apeiros_: hm, gem foo_bar-baz -> require 'foo_bar/baz' -> FooBar::Baz
<whitequark> I find it pretty consistent
<apeiros_> whitequark: that'd be rails conventions
<judofyr> easier with gem install FooBar::Baz, require FooBar::Baz, FooBar::Baz.new
<whitequark> apeiros_: I have seen it outside rails a lot
<whitequark> and it's probably a good thing
<apeiros_> whitequark: of course
<apeiros_> rails spilled over
<apeiros_> doesn't change the fact that it originated from rails and violated then common ruby conventions
<whitequark> apeiros_: ruby_parser is far older than rails
<apeiros_> good, if that's indeed the case, then you've found an isolated case which violated ruby conventions before rails
dhruvasagar has quit [Ping timeout: 256 seconds]
<yorickpeterse> Can we not have another high school bike-rack fight? The mailing list already has two of them
<whitequark> you've missed the point
dhruvasa1ar has quit [Ping timeout: 276 seconds]
<judofyr> huh, what was the convention before Rails?
<apeiros_> FooBar -> foobar.rb
<judofyr> ah
<apeiros_> rails promoted FooBar -> foo_bar.rb heavily
rippa has joined #ruby-lang
<apeiros_> whether there have been other projects which used that before rails too is relatively irrelevant
<judofyr> I'm mostly disappointed in you guys because you're like "meh, another VM? who cares?" I love it because it means that the PyPy-guys will start working on optimizing Ruby too
<judofyr> more people == better
<whitequark> the efforts are disjoint
<whitequark> it's not like no one knows the concepts required to optimize ruby
<apeiros_> I'm not "meh, another VM". but "more people == better" has another side to it: more people == more fragmentation, which is not necessarily better
<whitequark> it's more like applying these concepts to existing implementations requires quite a big amount of work
<whitequark> so they're just duplicating it because their VM is cooler than our VM, etc
<judofyr> I'd say they are more "joint" now. improvements to RPython are going to help both Topaz and PyPy
<yorickpeterse> judofyr: I like them doing something about it, I however would rather see them improve jruby or rbx
<yorickpeterse> More doesn't equal better
<skade> no, they are duplicating because they need more test cases for PyPy
kgrz has quit [Quit: Computer has gone to sleep.]
<apeiros_> I do find it interesting with regards to "more competition"
<judofyr> skade: that's not *just* the reason why they're doing it, but yes
<whitequark> judofyr: rpython is not a silver bullet. they did not invent something fundamentally better than insides of JVM/RBX
<skade> judofyr yes, but it was one of the main motivations thats mostly overlooked
<yorickpeterse> if say, brian was now suddenly "Holy shit this is so much better than Rbx, we need to vastly improve Rbx!" then yes, it would be good for competition
<whitequark> judofyr: it's more or less a way to write efficient code if you have failed to learn C++
<judofyr> yorickpeterse: dbussink is actually going to look into why Topaz does it so much better on the video demo :)
<yorickpeterse> Does what better?
<whitequark> judofyr: Maxine VM, next-gen JVM, is doing the same thing
<judofyr> *perform better
<yorickpeterse> Performance isn't very relevant for me until it actually does what it is supposed to
<yorickpeterse> But opinions seem to differ, which is fine
kain has quit [Ping timeout: 256 seconds]
<whitequark> at this point I remove myself from this pointless conversation
<judofyr> :)
<dbussink> yorickpeterse: we want to improve rbx regardless of any other impl ;)
<yorickpeterse> It's a bit like me saying "ZOMG,ruby-lint is so much faster than X" while I'm pretty sure it doesn't run on 80% of today's code
<judofyr> yorickpeterse: then you just wait :)
<yorickpeterse> dbussink: I have no doubts about that :)
<dbussink> yorickpeterse: and there are plenty of opportunities, but they aren't all trivial ;)
dustint has joined #ruby-lang
<yorickpeterse> dbussink: yeah, you people need to add C extensions for speed
* yorickpeterse runs
<dbussink> yorickpeterse: moar C extensions :P
<whitequark> dbussink: what I'd really, really like to see is embedding rbx in other software
<whitequark> maybe with some kind of reverse-FFI
<yorickpeterse> Lua?
<judofyr> mruby *ducks*
<dbussink> whitequark: yeah, it actually shouldn't be terribly hard to do, rbx doesn't have global state etc.
<whitequark> yorickpeterse: I don't want some cut-down bullshit, I want full power of Ruby
<dbussink> too much to do :p
<whitequark> dbussink: I see
jtoy has joined #ruby-lang
<dbussink> judofyr: looked at some of the type checks, one thing is basically that string methods like *, << etc. all do type coercion on their arguments
<dbussink> if it responds to to_str etc.
<judofyr> dbussink: in Topaz or rbx?
<dbussink> judofyr: well, that's the ruby semantics
<dbussink> topaz doesn't do that (yet)
* whitequark giggles
<ddd> err? << isn't String specific or did I miss something
<dbussink> judofyr: and the pypy annotation style here basically enforces strings: https://github.com/topazproject/topaz/blob/master/topaz/objects/stringobject.py#L370-L374
<dbussink> ddd: this is coercion on the argument for <<
<dbussink> judofyr: yeah, but that's in no way related to String#<< :)
<dbussink> judofyr: and the video demo uses a lot of string manipulation
<judofyr> dbussink: I don't have time now, but let's add a other="str" and see how the performance changes ;)
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<dbussink> judofyr: i'm more interested in optimizing rbx so these checks are cheaper :)
<yorickpeterse> ack '\$:\.unshift' --no-file | wc -l # => 15
<yorickpeterse> :<
<dbussink> judofyr: removing them isn't really useful
<dbussink> since that loses proper ruby semantics
<judofyr> I agree¨
Rarrikins has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jbsan has quit [Quit: jbsan]
jtoy has quit [Quit: jtoy]
megha has quit [Read error: Connection reset by peer]
ddd has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby-lang
megha has joined #ruby-lang
__BigO__ has joined #ruby-lang
jbsan has joined #ruby-lang
countdigi has quit [Ping timeout: 255 seconds]
MartynKeigher has quit [Excess Flood]
ddd has joined #ruby-lang
ruby-lang778 has joined #ruby-lang
noop has quit [Remote host closed the connection]
innohero_ has joined #ruby-lang
ruby-lang778 has left #ruby-lang [#ruby-lang]
ruby-lang778 has joined #ruby-lang
kain has joined #ruby-lang
methods has joined #ruby-lang
cored has joined #ruby-lang
innohero_ has quit [Client Quit]
MartynKeigher has joined #ruby-lang
rue_XIW has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
rue|w has quit [Read error: No route to host]
mistym has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
<yorickpeterse> I know this was written by an intern but ugh
<judofyr> yorickpeterse: I find it fascinating that code can be well-indented and formatted, and still feel so wrong. e.g. newline after the raise Foo. using .match instead of =~. not using {} in regexp. not using a constant for the regexp
<apeiros_> I find the lack of anchors the most disturbing
<apeiros_> the rest I learned to live with
<apeiros_> (even if I dislike it too)
<yorickpeterse> judofyr: I don't care about that when it comes to interns, especially with this guy since he came in as a total scrub
<apeiros_> got a point in "not a constant"
<yorickpeterse> (he improved *a lot*)
<yorickpeterse> It's the regexp that pisses me off
<yorickpeterse> and the fact that it's used to begin with
methods has joined #ruby-lang
scampbell has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
kain has quit [Ping timeout: 248 seconds]
<yorickpeterse> And it doesn't even work
Rarrikins has quit [Ping timeout: 252 seconds]
<yorickpeterse> Oh wait, it actually validates against "10-10-2013 - 11-10-2013"
<yorickpeterse> what the fuck
Rarrikins has joined #ruby-lang
<judofyr> well, it's a date range, right?
<yorickpeterse> there's so much wrong with it
mytrile has quit [Remote host closed the connection]
ruby-lang778 has quit [Ping timeout: 245 seconds]
<dbussink> yorickpeterse: is that a month or a day ;)
carloslopes has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
krz has quit [Quit: krz]
dustint has quit [Remote host closed the connection]
<yorickpeterse> heh
<yorickpeterse> I'll have none of your US date formats
dustint has joined #ruby-lang
<yorickpeterse> But yeah, there are better ways to validate ranges
<apeiros_> US dates, one of the odd places which use middle-endian
<Mon_Ouie> Are there uses of middle-endian that aren't odd?
<apeiros_> o0
<apeiros_> that wasn't the intended assertion of my phrase :)
gnufied has quit [Quit: Leaving.]
<Mon_Ouie> I know that :p
<apeiros_> haven't seen a good use of middle-endian
<yorickpeterse> I propose half-assed-endian
<yorickpeterse> 2012-28-12
jperry2 has joined #ruby-lang
<dbussink> yorickpeterse: your? you're calling me a yankee? ;)
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> I propose reverse-nonsense-endian: 21-1220-82
<yorickpeterse> dbussink: haha
<yorickpeterse> apeiros_: I propose we all use Unix timestamps
jbsan has quit [Quit: jbsan]
<yorickpeterse> and negative ones for everything before 01-01-1970
* apeiros_ saw that coming
<yorickpeterse> "What's the time? Oh, 1360247523"
<bougyman> NO. ebeats.
<bougyman> it's 605.787 everywhere right now
<bougyman> time zones be damned
<yorickpeterse> "When did the Roman empire collapse? Oh, on -123817329823791237982173892372378923213123"
security has joined #ruby-lang
megha has quit [Ping timeout: 255 seconds]
kain has joined #ruby-lang
<jaska> planck time units since big bang
<apeiros_> jaska: and scientific notation is prohibited
<apeiros_> letter heads will be huge ^^
<jaska> just hope you dont have to use unary.
ryanv-raptor has joined #ruby-lang
<jaska> but atleast you wont have to use decimals.
jtoy has joined #ruby-lang
Bearproof has joined #ruby-lang
jtoy_ has joined #ruby-lang
jtoy has quit [Ping timeout: 252 seconds]
jtoy_ is now known as jtoy
dhruvasagar has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
sailias has joined #ruby-lang
<yorickpeterse> heh, the discussion about symbols vs strings rages on on the mailing list
<yorickpeterse> I should get some popcorn
Bearproof has left #ruby-lang [#ruby-lang]
Rarrikins has quit [Ping timeout: 256 seconds]
Rarrikins_n has joined #ruby-lang
cupakromer has quit []
gix has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
<ryanv-raptor> I've been meaning to ask, since I'm rather new around the community, is it usual for the thought provoking intelligent discussion to take place here and the mailing list to leave a lot to be desired?
<yorickpeterse> not really
<yorickpeterse> Usually it's the other way around
<ryanv-raptor> Not that every post on the mailing list is bad
<ryanv-raptor> it's just that I've seen quite a bit of "write code for me" going on on there lately
<yorickpeterse> However with mailing lists the discussions tend to get rather big
<yorickpeterse> oh, that's always the case
<ryanv-raptor> ah, good to know
gix has joined #ruby-lang
davidbalber|away is now known as davidbalbert
wallerdev has joined #ruby-lang
stardiviner has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
security is now known as megha
blacktulip has joined #ruby-lang
21WAAHJLR has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
sailias has quit [Quit: Leaving.]
bzb has joined #ruby-lang
judofyr has quit [Ping timeout: 264 seconds]
<whitequark> yorickpeterse: what, again?!
<whitequark> I remember at least three
<whitequark> and matz once said that he'd remove symbols in favor of strings, if he'd be doing ruby from the ground up
<whitequark> which would be a pity
<yorickpeterse> whitequark: the one about symbols vs strings
<whitequark> yorickpeterse: yeah yeah, I remember at least three such discussions on ML
<whitequark> dating back to 2003
<yorickpeterse> The guy keeps on making issues about wanting to replace Hash and everything and comes up with really annoying counter arguments
<yorickpeterse> Basically "Ruby is already slow, who cares if it's slower" and "Lets completely change how Hash works. Having to change a lot of code is not my problem"
<whitequark> he's arguing in favor of change now?
<whitequark> lol
<yorickpeterse> if blade wasn't so shit I'd link it in here
<yorickpeterse> But I can't even search properly for it
judofyr has joined #ruby-lang
* whitequark just wrote a bastard child of PEG and LALR
<whitequark> it has the syntax of PEG, but enforces it to be LALR(n)
<whitequark> ie has linear space and time requirements
<judofyr> LOLR
<yorickpeterse> LULZR(N)
<whitequark> have I arrived at a branch of 4chan?
<whitequark> meh.
<yorickpeterse> Call it quark(n)
<whitequark> yorickpeterse: it is actually just LALR(n), but it doesn't require you to write a separate lexer
gnufied has joined #ruby-lang
<whitequark> it is also a part of my secret weekend-project
<yorickpeterse> Go write me a proper Ruby parser already (yeah yeah, I know you're working on it)
methods has joined #ruby-lang
dous_ has quit [Remote host closed the connection]
dous has joined #ruby-lang
<jtoy> what am I doing wrong with this regex to capture the first 2 levels after Top? http://rubular.com/r/BGvSI2IhyZ
<apeiros_> jtoy: / is \S
<injekt> you capture until /
methods has left #ruby-lang [#ruby-lang]
<injekt> it's greedy
<judofyr> try [\/]+
<judofyr> or you know, .split("/")
<apeiros_> judofyr: here, a ^ for your regex
<jtoy> judofyr: haha, the split is much faster, didn't think of that
<judofyr> apieros: thanks
<injekt> judofyr: here, a \A for your regex
<injekt> >.>
<injekt> yeah im that guy
<judofyr> inkjet
<judofyr> he's that guy
<jtoy> judofyr: [\/]+ works, the brackets make it non greedy?
<judofyr> jtoy: oops, I meant [^\/]+
<judofyr> jtoy: which matches anything else than /
<apeiros_> (Top(?:\/[^\/\s]+){2})
<apeiros_> don't see why you use a capture around the whole expression, though
<apeiros_> seems pointless
dhruvasa1ar has quit [Read error: Operation timed out]
<apeiros_> just use /Top(?:\/[^\/\s]+){2}/
<jtoy> i suck at regexing, maybe just use the split
<injekt> you should use the split anyway
<injekt> even if you were awesome at regex
<Mon_Ouie> Split behaves differently with or without the capture group IIRC
<apeiros_> yes
<Mon_Ouie> (If there's one it yields it)
<injekt> yeah
<apeiros_> with capture, split contains the separator
<apeiros_> also in many cases you want split(sep, -1)
<apeiros_> plain split(sep) has many weird special cases (somebody said 14, I never checked the source)
<injekt> jtoy: str.split("/", 2).join
dhruvasagar has quit [Ping timeout: 276 seconds]
<injekt> oh wait no
<injekt> silly injekt
<injekt> gb2work
<jtoy> str.split("/")[1..2].join("/")
<injekt> aye
rodj has joined #ruby-lang
<jtoy> injekt: it suks?
<injekt> no
<injekt> it gives you want you're looking for?
<jtoy> yes
<injekt> that it's good :)
<injekt> i cant type today :(
<zzak> vbatts: :D
<whitequark> apeiros_: (special cases) what.
Uranio has joined #ruby-lang
<yorickpeterse> How long does it usually take for bugs.ruby-lang to sync up with the mailing list?
KA__ has joined #ruby-lang
<yorickpeterse> what about it?
<judofyr> it goes one forever!
<yorickpeterse> Besides it being huge
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<yorickpeterse> https://bugs.ruby-lang.org/issues/7797#note-5 So am I being too much of a cunt here? I'm getting a bit unsure about it
<yorickpeterse> But the whole discussion smells
tonni has quit [Remote host closed the connection]
<apeiros_> whitequark: things like " foo bar ".split(/ /) vs " foo bar ".split(/ /, -1)
<apeiros_> former gives ["", "foo", "bar"], latter ["", "foo", "bar", ""]
vbatts|work has joined #ruby-lang
<apeiros_> there have been more, I don't really remember them by heart
<judofyr> yorickpeterse: "The way your database tables are layed out will ultimately affect your views." you are aware of that the whole idea the relational model was to separate the physical and logical data structure? :)
<yorickpeterse> judofyr: You're missing the point, but I suppose that means I failed to explain it
<judofyr> :)
OddMeat has joined #ruby-lang
<judofyr> yorickpeterse: I experimented with making Symbol a subclass of String
<yorickpeterse> What I'm saying is that if you have field X you're going to display field X at some point in your view, thus it affects it. Also the structure and data can affect your views
<yorickpeterse> Maybe views aren't the best example though
<judofyr> but there's a lot of String-methods that assumes that "self" is actually a string, so I had to add lots of `self = StringValue(self)` :/
<Uranio> how could I strip ALL the special characters from a string
<judofyr> Uranio: what's a "special characters"
<Mon_Ouie> You need to define "special" first. Non-ascii? Not alpha numerical?
MartynKeigher has quit [Excess Flood]
bobbywilson0 has joined #ruby-lang
<Uranio> Mon_Ouie & judofyr for exaple Lázaro Martínez
<Uranio> L?zaro Mart?nez
<Uranio> would be great
<judofyr> Uranio: you can use .gsub(/\W/, '')
<Uranio> :D really is so easy?
<Uranio> let me check
rins has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
<judofyr> that will remove all chars except from A-Z, a-z, 0-9 and _
<judofyr> Uranio: for custom: .gsub(/[^A-Za-z0-9_\-\.]/, '')
<judofyr> that is everything else than A-Z, a-z, 0-9, _, -, .
<judofyr> :)
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<Uranio> nop... that don't work.. the chaos is put an HTML with spcial characters in the attach of an email
<Uranio> using mike mail gem
<Uranio> and there is an error like this:
<Uranio> /usr/local/lib/ruby/gems/1.9.1/gems/mail-2.5.3/lib/mail/fields/unstructured_field.rb:149:in `encode!': "\xF3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
<Uranio> I tryed EVERYTHING in internet
MartynKeigher has joined #ruby-lang
<judofyr> Uranio: you're passing in binary strings to something that expects UTF-8 strings
<Uranio> yep.. how to don't do that
<Uranio> I took a stream from Net:HTTP
tdy has quit [Ping timeout: 260 seconds]
kith has joined #ruby-lang
<judofyr> Uranio: then you should just .force_encoding("UTF-8") if you know that it's UTF-8
imajes has quit [Excess Flood]
<Uranio> judofyr: god... but don't work as supossed would be work
imajes has joined #ruby-lang
<Uranio> better would be supress al the characters
solars has quit [Ping timeout: 245 seconds]
nyuszika7h has joined #ruby-lang
<darix> Uranio: but you would actually destroy the content?
<Uranio> darix: I don't care about the content as long happen this: Lázaro L?azaro
<Uranio> or Lzaro
agarcia has quit [Quit: Konversation terminated!]
rodj has quit [Quit: Page closed]
<judofyr> whitequark: heh. headius wrote that blog post (blog.headius.com/2012/10/so-you-want-to-optimize-ruby.html) after an email thread with Alex (who wrote Topaz)
io_syl has joined #ruby-lang
<darix> Uranio: if you grab stuff from http ... read the encoding from the http/html header
<darix> and force the ruby strings to that encoding
rodj has joined #ruby-lang
jonahR has joined #ruby-lang
<darix> if not pick a proper default and enforce strings to that
<darix> then either you or the mail gem can reencode to utf8
vlad_starkov has joined #ruby-lang
<darix> that would be a more sane approach than just stripping everything out
tdy has joined #ruby-lang
<Uranio> darix: I tried things like that before
<Uranio> encodings with rescue taked from gem like cinch
<Uranio> and nothing work
<Uranio> encode is not the way I guest
<Uranio> unless read the encoding from the http/html header
<Uranio> could work
<darix> did you really use the encoding that was given to you by http/html ?
<Uranio> darix: :-/ nop.. I dont¶ know hot to get taht
<Uranio> darix: :-/ nop.. I don't know hot to get that
<Uranio> checking now...
<darix> http: Content-Type header
<Uranio> never tried because all from Net:HTTP come as ASCII-8BIT
<judofyr> darix: I've always wondered why net/http doesn't do it for you
<darix> html meta header either charset or contenttype
io_syl has quit [Ping timeout: 246 seconds]
<Uranio> darix: yeahm, but how to took a hader
<darix> Uranio: http look at the response object. html. parse the stuff you get from net/http with nokogiri?
<Uranio> nokogiri! :D next life meybe, I never get compiled that
<darix> judofyr: i wouldnt it expect from net/http. but from higher level libs like mechanize i would expect charset handling
<Uranio> un debian
<Uranio> in*
chrisnicola has joined #ruby-lang
<darix> Uranio: i am sure debian has a package for hpricot or nokogiri
<darix> either will work
<whitequark> judofyr: I'm not surprised :)
<Uranio> darix: I'm using ruby compiled from source
vlad_starkov has quit [Ping timeout: 256 seconds]
<judofyr> whitequark: so Alex has used that exact list when he built Topaz ;)
<Uranio> and hpricot draft crazy when get a encoding weird
<Uranio> just like mail
<judofyr> Uranio: if you're only going to use this on one page, you might as .force_encoding(…) to the right encoding
<darix> Uranio: so install libxslt-dev and libxml2-dev (dont know exact package names) and install nokogiri?
nXqd has quit [Ping timeout: 244 seconds]
<Uranio> darix: yeah man.. I read the cuide, anyway it fail to me
<Uranio> %s/cuide/guide/g
<darix> failed how?
<Uranio> darix: let me try to check the HTML header during the response againsta the server
<Uranio> %s/againsta/against/
<Uranio> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<Uranio> :-P
<darix> see
<Uranio> define weird
<darix> what does the http header say?
<darix> curl -I <url>
dc5ala has quit [Quit: Ex-Chat]
<Uranio> darix: nothing about encoding
vlad_starkov has joined #ruby-lang
<Uranio> I was thinking about enc=parse.charset=iso-8859-2">, then use it as encoding source to encode as UTf-8
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
bobbywilson0 has quit [Remote host closed the connection]
KA__ has quit [Quit: KA__]
<darix> so force_encoding("iso-8859-2")
<darix> then .encode("UTF-8")
<darix> and you should make mail happy
mephux has quit [Excess Flood]
lun_ has quit [Remote host closed the connection]
gustavnils has joined #ruby-lang
<Uranio> darix: I hope... let me try
nXqd has joined #ruby-lang
<Uranio> darix: nothing
mephux has joined #ruby-lang
<Uranio> :/
judofyr has quit [Remote host closed the connection]
chrisnicola has quit [Quit: This computer has gone to sleep]
<darix> same error?
<Uranio> yep...
<Uranio> $pagina.force_encoding('iso-8859-2').encode!('UTF-8')
<Uranio> where $pagina is the whole String
<Uranio> but look this
<Uranio> $pagina.encoding
<Uranio> UTF-8
<Uranio> :D not problem
<Uranio> when reach mail, BUM!
ohsix has quit [Ping timeout: 276 seconds]
lun_ has joined #ruby-lang
therod has quit [Quit: Leaving...]
OddMeat has quit [Quit: Page closed]
<darix> uhm
<darix> question ... does force_encoding really return the string?
<darix> what happens if you split it up in 2 lines?
<Uranio> darix: now as UTF-8 it permit to be "gsub"
<Uranio> darix: yeah.. I can split it
<Uranio> :D by the á
<Uranio> $pagina.split 'á'
<darix> uhm
<darix> that is so wrong
<darix> Uranio: it would help if you could provide a small pasting (gist or pastie.org) with a sample script showing your issue.
<Uranio> darix: I'll do... but beofre.. I wathing invelid encoding in the page, if set :set enoding=UTF-8
<Uranio> I see characters
<Uranio> but when :set encoding=iso-8859-2
<Uranio> see news and don't see others
ohsix has joined #ruby-lang
<Uranio> could the file whole bad encoded
<darix> also an option
<Uranio> darix: a gist wuld be very painfull with my bandwith
<darix> uhm. uploading a simple script that reproduces your issue cant be that hard ;)
vlad_starkov has quit [Read error: Connection timed out]
<Uranio> I'm trying this encoding=pagina.split('charset=')[1].split('"')[0]
<Uranio> it return
<Uranio> => "iso-8859-2"
<Uranio> then
<Uranio> $pagina.force_encoding(encoding).encode!('UTF-8')
<darix> again
<darix> force_encoding returns the string yes?
<darix> i would split that into 2 lines
<Uranio> after that line, return a string, as you ask, i split the tring by the á, for check if the encoding is fine
<Uranio> and it was fine
<Uranio> :D until reach the mail gem
KA_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
21WAAHJLR has quit [Read error: Connection reset by peer]
chimkan has joined #ruby-lang
zmack has quit [Remote host closed the connection]
zhul_mechanos has joined #ruby-lang
cultureulterior_ has quit [Quit: cultureulterior_]
apeiros_ has quit [Remote host closed the connection]
<Uranio> darix: look this:
<Uranio> codificacion=$pagina.split('charset=')[1].split('"')[0]
<Uranio> $pagina.force_encoding(codificacion).encode!('UTF-8')
apeiros_ has joined #ruby-lang
<Uranio> with this page work pretty fine
<Uranio> so you solution forceencoding and encode! look like good
sush24_ has quit [Quit: This computer has gone to sleep]
<Uranio> codificaion=false
<Uranio> codificacion=$pagina.split('charset=')[1].split('"')[0]
<Uranio> codificacion='UTF-8' unless codificacion
<Uranio> $pagina.force_encoding(codificacion).encode!('UTF-8')
jmeeuwen has quit [Ping timeout: 256 seconds]
JMcAfreak has joined #ruby-lang
<kith> i get this: `load_driver': Unable to load driver 'Pg'
<kith> while trying to use dbi
<kith> the same source code runs no problem on a different machine
<kith> what am i missing?
<darix> "pg"
<apeiros_> grit still the way to go with git from within ruby?
<kith> pg gem is installed
<darix> kith: can you load it manually in the script before loading dbi?
<kith> darix: i can load it manually on irb
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
<kith> havent tried it within the script
<kith> since it does work on a different machine
<darix> kith: ruby 1.9? rubygems loaded on 1.8?
dangerousbeans has joined #ruby-lang
<kith> 1.8
<kith> legacy code :D
Rarrikins_n has quit [Ping timeout: 240 seconds]
<darix> kith: so load rubygems at the beginning?
<kith> yes require 'rubygems' is there
<darix> kith: gem install pry
<darix> require 'pry'
Rarrikins_n has joined #ruby-lang
<darix> before the line that fails atm
<darix> binding.pry
<darix> and debug it there
mytrile has joined #ruby-lang
<kith> i'll try that
<kith> thx
jmeeuwen has joined #ruby-lang
tylersmith has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
chimkan__ has joined #ruby-lang
dangerousbeans has left #ruby-lang [#ruby-lang]
<kith> gawddamn pry has lotsa dependencies... groar
<injekt> 3 isn't really lots
dangerousbeans has joined #ruby-lang
skade has joined #ruby-lang
<kith> yay done :)
<kith> i have to manually download each and then copy them onto the target machine via scp... then 3 is lots :D
soypirate has joined #ruby-lang
chimkan has quit [Ping timeout: 256 seconds]
chimkan__ is now known as chimkan
Banistergalaxy has quit [Ping timeout: 248 seconds]
<injekt> that's 2 commands lol
<kith> hm?
<kith> can you fetch all gems at once?
<kith> gem fetch pry and all dependencies? :D
skade has quit [Client Quit]
Banistergalaxy has joined #ruby-lang
<injekt> well no but once you know the deps its 2 commands :)
Fretta has joined #ruby-lang
<kith> injekt: can you show dependencies before you download the gems then?
<injekt> kith: gem dependency pry
<Uranio> there is some gem for work with dokuwiki
<Uranio> ??
<injekt> but maybe not before install
<apeiros_> kith: iirc there is a way to get the dependency graph of a gem
<injekt> ah --remote
<apeiros_> don't remember how
idkazuma has quit [Remote host closed the connection]
dangerousbeans has quit [Quit: KTHNXBAI]
<apeiros_> wtf, I just installed grit, it's in the list of installed gems, but require'ing fails with `LoadError: cannot load such file -- grit`
alvaro_o has joined #ruby-lang
<apeiros_> and `gem which grit` shows …/gems/grit-2.5.0/lib/grit.rb
* apeiros_ confused
<kith> hmm that pry thing looks damn cool
<apeiros_> o0
<apeiros_> pry automatically uses Bundle.setup? wtf?
<apeiros_> Banistergalaxy: *kick*
soypirate has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
chimkan__ has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
_carloslopes has joined #ruby-lang
soypirate has joined #ruby-lang
chimkan has quit [Ping timeout: 245 seconds]
chimkan__ is now known as chimkan
Stilo has joined #ruby-lang
carloslopes has quit [Ping timeout: 248 seconds]
dr_bob has quit [Quit: Leaving.]
jonahR has quit [Quit: jonahR]
<freedrull> any way to uninstall all docs from gems? i really dont need it on my productions systems. i'm sure its just safe to rm though...?
vlad_starkov has quit [Remote host closed the connection]
<Muz> You may want to also add "gem: --no-ri and --no-rdoc" to your ~/.gemrc file too
kcassidy has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
<injekt> freedrull: yes you can just rm them
<freedrull> injekt: thanks
geopet has joined #ruby-lang
<freedrull> hellloooooooo 200mb's
swav has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
sepp2k has quit [Read error: Operation timed out]
sepp2k has joined #ruby-lang
dbussink has quit [Excess Flood]
jtoy has quit [Quit: jtoy]
chimkan___ has joined #ruby-lang
__butch__ has joined #ruby-lang
swav has joined #ruby-lang
dbussink has joined #ruby-lang
chimkan has quit [Ping timeout: 244 seconds]
chimkan___ is now known as chimkan
dbussink has quit [Excess Flood]
vmoravec has quit [Quit: Leaving]
liftM has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dbussink has joined #ruby-lang
bluepojo has joined #ruby-lang
dbussink has quit [Excess Flood]
lun_ has quit [Remote host closed the connection]
rodj has quit [Ping timeout: 245 seconds]
futurechimp has quit [Quit: Leaving]
lun_ has joined #ruby-lang
gregmoreno has joined #ruby-lang
bzb has quit [Quit: Leaving]
megha is now known as baba
swav_ has joined #ruby-lang
swav has quit [Ping timeout: 248 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
swav_ has quit [Remote host closed the connection]
gouthamvel has joined #ruby-lang
chrisnicola has joined #ruby-lang
dbussink has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
baba is now known as gia
gia is now known as baba
dbussink has quit [Excess Flood]
judofyr has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jonahR has joined #ruby-lang
sebasoga has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
io_syl has joined #ruby-lang
brianpWins has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
gnufied has quit [Quit: Leaving.]
sn0wb1rd has joined #ruby-lang
jtoy has joined #ruby-lang
srbaker has joined #ruby-lang
jtoy_ has joined #ruby-lang
jtoy has quit [Ping timeout: 260 seconds]
jtoy_ is now known as jtoy
chrisnicola has quit [Quit: This computer has gone to sleep]
GarethAdams has quit [Quit: Leaving...]
jsilver has joined #ruby-lang
poga has joined #ruby-lang
dcwu has joined #ruby-lang
vlad_starkov has joined #ruby-lang
sebasoga has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
yxhuvud2 has left #ruby-lang [#ruby-lang]
mercwithamouth has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
lun_ has joined #ruby-lang
sebasoga has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
jsilver has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
Bearproof has joined #ruby-lang
sebasoga has quit [Ping timeout: 255 seconds]
sebasoga has joined #ruby-lang
poga_ has joined #ruby-lang
poga has quit [Ping timeout: 248 seconds]
__BigO__ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
Nisstyre has quit [Ping timeout: 248 seconds]
chrisnicola has joined #ruby-lang
mistym is now known as mistym_lunch
chrisnicola has quit [Client Quit]
robbyoconnor has quit [Ping timeout: 246 seconds]
robotmay has quit [Remote host closed the connection]
beiter has joined #ruby-lang
Bearproof has quit [Quit: Leaving.]
marr has quit [Ping timeout: 246 seconds]
Nisstyre has joined #ruby-lang
<kith> HAH pry was written by banisterfiend... i've seen him on here right?
krohrbaugh has joined #ruby-lang
<apeiros_> yes
<apeiros_> I still need to kick him
swav has joined #ruby-lang
<apeiros_> but he seems off
<kith> okay
<apeiros_> (pry seems to auto-bundle with no way out :-S)
Rarrikins_n has quit [Read error: Connection reset by peer]
Rarrikins_n has joined #ruby-lang
jtoy has joined #ruby-lang
<judofyr> auto-bundle?
francisfish has joined #ruby-lang
kogent has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
imajes has quit [Excess Flood]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
gouthamvel has quit [Remote host closed the connection]
krohrbaugh has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
billyoc has joined #ruby-lang
imajes has joined #ruby-lang
BigFatFatty has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
billyoc has quit [Ping timeout: 248 seconds]
poga_ has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
<yorickpeterse> apeiros_: it...doesn't?
<Uranio> how could I make a Net:HTTP.get request sending cookies
Mon_Ouie has joined #ruby-lang
<apeiros_> yorickpeterse: does here. maybe due to the pry-rails plugin
swav has quit [Remote host closed the connection]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
drbrain has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
<darix> Uranio: use mechanize
<Uranio> darix: since now "thanks darix"
xcombelle has quit [Remote host closed the connection]
<Uranio> :D GUAO! that gem look like comming from my dreams
<darix> Uranio: you could do it all manually ... but you would end up reimplementing mechanize anyway.
tbuehlmann has joined #ruby-lang
<Uranio> yee...
<Uranio> and this mechanize look very good
<Uranio> basically I need to dialogue with the forms and mechanize do that as I see
havenwood has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
wmoxam has joined #ruby-lang
Rarrikins has joined #ruby-lang
jsilver has joined #ruby-lang
aedorn has quit [Quit: Leaving]
<Uranio> aaa... bad one... use nokogiri :(
jsilver has quit [Remote host closed the connection]
Rarrikins_n has quit [Ping timeout: 276 seconds]
<judofyr> Uranio: ah. you can't use Nokogiri?
methods has joined #ruby-lang
<Uranio> nop
<Uranio> always fail the compilation
aedorn has joined #ruby-lang
JMcAfreak has quit [Ping timeout: 252 seconds]
methods has left #ruby-lang [#ruby-lang]
<Uranio> checking for libxml/parser.h... *** extconf.rb failed ***
<Uranio> and there is it, in that place
jtoy has joined #ruby-lang
jtoy has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
chimkan has quit [Ping timeout: 248 seconds]
intellitech has joined #ruby-lang
mistym has quit [Remote host closed the connection]
_carloslopes has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby-lang
lun_ has quit [Ping timeout: 245 seconds]
lun_ has joined #ruby-lang
ryanv-raptor has quit [Quit: Leaving.]
wmoxam has quit [Ping timeout: 276 seconds]
dbussink has joined #ruby-lang
dbussink has quit [Excess Flood]
lun_ has quit [Read error: Connection reset by peer]
lun_ has joined #ruby-lang
<judofyr> Uranio: you need to install libxml2
vlad_starkov has quit [Remote host closed the connection]
<Uranio> libxml2-dev - Development files for the GNOME XML library
<Uranio> is installed
<Uranio> judofyr: that and all the others dependencys that the site show in the doc bt it always fail
<Uranio> if only I could Net::HTTP.get(URI.parse(http://gutl.jovenclub.cu/wiki/),{"Cookie"=> http.response['set-cookie']})
ryanv-raptor has joined #ruby-lang
<Uranio> and send the [sensured-word] cookie to the site
ryanf has joined #ruby-lang
<judofyr> Uranio: you can. but not quite like that.
<Uranio> judofyr: how?
<judofyr> Uranio: you'll have to do something like req = Net::HTTP::Get.new; req["Cookie"] = "…"
<Uranio> judofyr: I get the cookie
<judofyr> and Net::HTTP.start(host, port) { |http| http.request(req) }
<Uranio> cookie=http.response['set-cookie'].split('; ')[0]
<Uranio> http.response['set-cookie']
<Uranio> => "DokuWiki=c5195ca2e8b8efd5be3125b75d329cf4; path=/wiki/; HttpOnly, DWcb100c0f811c1b6d691e3e7c406b56ba=bGF6YXJv%7C0%7CcEVsOW1aUjRKeWM9; path=/wiki/; httponly"
<judofyr> Uranio: sorry. gotta go. later!
judofyr has quit [Remote host closed the connection]
joevandyk has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
skade has joined #ruby-lang
<Uranio> byebye...
Uranio has quit [Quit: while you reading this, a kitty dies]
Rarrikins_a has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
francisfish has joined #ruby-lang
Rarrikins has quit [Ping timeout: 256 seconds]
lcdhoffman has joined #ruby-lang
<joevandyk> So I'm running into "undefined constant" problems that look similar to this: http://www.ruby-forum.com/topic/198129
Bearproof has joined #ruby-lang
Bearproof has left #ruby-lang [#ruby-lang]
<joevandyk> where I'm trying to access a root-level constant from inside another module
<vbatts> zzak: \?/
marr has joined #ruby-lang
<joevandyk> and it seems that all of a sudden I have to prefix the root-level constant with ::ConstantName
<joevandyk> (with the '::')
<joevandyk> when do I need to write ::CONSTANT?
skade has joined #ruby-lang
<kith> injekt: i installed dbd-pg now it works... which is weird because the other machine i was running my code on doesnt have that but pg only
<kith> pg (0.12.2)
benanne has joined #ruby-lang
krohrbaugh1 has quit [Quit: Leaving.]
<heftig> joevandyk: you need to use ::CONSTANT when a) there's another CONSTANT in your scope, but that's the wrong one or b) you're in the scope of a BasicObject
<heftig> (since BasicObject does not inherit from Object)
<heftig> Object's the top scope
<joevandyk> heftig: is the answer to http://www.ruby-forum.com/topic/198129 wrong then?
<heftig> i believe it is
<heftig> i can't reproduce it with a simple: require 'net/http'; module Foo; class Bar; def a; Net::HTTP; end; end; end; Foo::Bar.new.a
pbjorklund has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<pbjorklund> I have an array of arrays. like [["abc", nil, nil, "bca"], ["bac", "foo", nil, nil]] that I can search like csv.inject([]) { |sum,el| sum.push el if el.grep(/foo/i) != [] ; sum } to get the offending arrays. Whats a more proper way to do this? Coulnd't find an Array.include? that took a regex
<bougyman> .grep
<bougyman> maybe.
<pbjorklund> Well, thats what im using, sort of. Just couldn't figure out how to make it work properly with an array of arrays..
tenderlove has quit [Remote host closed the connection]
<canton7> el.grep('foo'i) != [] <-- ugly
<heftig> [["abc", nil, nil, "bca"], ["bac", "foo", nil, nil]].reject { |x| x.grep(/foo/).empty? }
<canton7> ^^ that
JohnBat26 has quit [Ping timeout: 240 seconds]
tonni has joined #ruby-lang
<pbjorklund> heftig: Thanks
havenn_ has joined #ruby-lang
jammi- has joined #ruby-lang
robbyoconnor has joined #ruby-lang
chimkan has joined #ruby-lang
solars has joined #ruby-lang
chimkan has quit [Client Quit]
ryanf has quit [Quit: leaving]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
chimkan has joined #ruby-lang
jammi- has left #ruby-lang [#ruby-lang]
beho has joined #ruby-lang
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
JMcAfreak has joined #ruby-lang
AndChat| has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 255 seconds]
Rarrikins_a_w has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
Rarrikins_a has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby-lang
Criztian has joined #ruby-lang
ryanf has joined #ruby-lang
intellitech has quit [Ping timeout: 248 seconds]
havenn_ has left #ruby-lang [#ruby-lang]
havenwood has joined #ruby-lang
carloslopes has quit [Ping timeout: 248 seconds]
mistym_lunch is now known as mistym
maxmanders has quit [Ping timeout: 245 seconds]
jtoy has quit [Quit: jtoy]
emocakes has joined #ruby-lang
jtoy has joined #ruby-lang
maxmanders has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
mephux has quit [Excess Flood]
mephux has joined #ruby-lang
dbussink has joined #ruby-lang
gustavnils has quit [Quit: Textual IRC Client: www.textualapp.com]
dbussink has quit [Excess Flood]
carloslopes has joined #ruby-lang
intellitech has joined #ruby-lang
havenwoo_ has joined #ruby-lang
havenwood has quit [Ping timeout: 256 seconds]
amerine has quit [Quit: leaving]
amerine has joined #ruby-lang
amerine has quit [Client Quit]
drbrain has joined #ruby-lang
amerine has joined #ruby-lang
amerine has quit [Client Quit]
francisfish has quit [Remote host closed the connection]
amerine_ has joined #ruby-lang
amerine_ is now known as amerine
tenderlove has joined #ruby-lang
dbussink has joined #ruby-lang
tonni has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
chendo__ has joined #ruby-lang
havenwoo_ has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby-lang
jbsan has joined #ruby-lang
chimkan has quit [Quit: chimkan]
AndChat| has quit [Ping timeout: 248 seconds]
_carloslopes has joined #ruby-lang
jtoy has quit [Quit: jtoy]
tjadc has quit [Ping timeout: 240 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
carloslopes has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
lun__ has joined #ruby-lang
lun_ has quit [Ping timeout: 245 seconds]
lun__ has quit [Read error: Connection reset by peer]
lun_ has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
cordax has joined #ruby-lang
chendo__ has quit [Read error: Connection reset by peer]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
swav has joined #ruby-lang
wmoxam has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
stratos has joined #ruby-lang
swav has quit [Remote host closed the connection]
stratos has left #ruby-lang [#ruby-lang]
srbaker has quit [Quit: Computer has gone to sleep.]
tenderlove has quit [Read error: Connection reset by peer]
wmoxam has quit [Ping timeout: 246 seconds]
tenderlove has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
mjio has joined #ruby-lang
francisfish has joined #ruby-lang
intellitech has quit [Quit: intellitech]
jonahR has quit [Quit: jonahR]
<yfeldblum> when building rack middlewares, is it worth it to try to avoid allocating objects?
brianpWins has quit [Quit: brianpWins]
ddd has quit [Ping timeout: 244 seconds]
cupakromer has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
emocakes has quit [Quit: emocakes]
<amerine> yfeldblum: Depends on the objects, but in most situations I would call that premature optimization.
emocakes has joined #ruby-lang
carloslopes has joined #ruby-lang
soypirate has quit [Quit: Leaving]
spectra has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
_carloslopes has quit [Ping timeout: 248 seconds]
postmodern has joined #ruby-lang
tonni_ has joined #ruby-lang
spectra has joined #ruby-lang
intellitech has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ridget has joined #ruby-lang
therod has joined #ruby-lang
idkazuma has joined #ruby-lang
xalei has joined #ruby-lang
megha has joined #ruby-lang
baba has quit [Ping timeout: 264 seconds]
s1n4 has joined #ruby-lang
jsilver has joined #ruby-lang
s1n4 has left #ruby-lang [#ruby-lang]
blacktulip has quit [Remote host closed the connection]
Criztian has quit [Ping timeout: 255 seconds]
Criztian has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
jsilver has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
woollyams has quit [Client Quit]
__BigO__ has joined #ruby-lang
jsilver has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 256 seconds]
drbrain has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
zhul_mechanos has quit [Quit: zhul_mechanos]
ivanoats has quit [Remote host closed the connection]
imajes has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
swav has joined #ruby-lang
mercwithamouth has joined #ruby-lang
rins has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
tonni has joined #ruby-lang
swav has quit [Ping timeout: 245 seconds]
tonni_ has quit [Ping timeout: 245 seconds]
__butch__ has joined #ruby-lang
tonni_ has joined #ruby-lang
spuk has joined #ruby-lang
Bearproof has joined #ruby-lang
scampbell has quit [Remote host closed the connection]
s1n4 has joined #ruby-lang
s1n4 has quit [Client Quit]
s1n4 has joined #ruby-lang
tonni__ has joined #ruby-lang
tonni has quit [Ping timeout: 252 seconds]
<zenspider> zzak: thanks!
nXqd has quit [Ping timeout: 276 seconds]
Bearproof has left #ruby-lang [#ruby-lang]
tonni_ has quit [Ping timeout: 276 seconds]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
Mon_Ouie has quit [Ping timeout: 252 seconds]
solars has quit [Ping timeout: 245 seconds]
kurko__ has joined #ruby-lang
jsilver has quit [Read error: No route to host]
swav has joined #ruby-lang
benanne has quit [Quit: kbai]
ivanoats has quit [Remote host closed the connection]
sustainableweb has joined #ruby-lang
havenn has joined #ruby-lang
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
lun_ has quit [Ping timeout: 248 seconds]
sustainableweb has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
mistym_ has joined #ruby-lang
therod has quit [Quit: Leaving...]
cored has quit [Ping timeout: 252 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
cored has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
cordax has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby-lang
<zenspider> yay! I can release again
cordax has joined #ruby-lang
<zenspider> ruby2ruby 2.0.3 released
<zenspider> ruby2ruby version 2.0.3 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/ruby2ruby-version-2-0-3-has-been-released.html
beiter has quit [Quit: beiter]
<zenspider> rake-remote_task version 2.2.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/rake-remote_task-version-2-2-0-has-been-released.html
drbrain has joined #ruby-lang
<zenspider> rake-remote_task version 2.2.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/rake-remote_task-version-2-2-0-has-been-released.html
<zenspider> RAWR
<zenspider> oops
<zenspider> ZenTest version 4.9.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/ZenTest-version-4-9-0-has-been-released.html
xalei has quit [Remote host closed the connection]
beho has quit []
__BigO__ has quit [Remote host closed the connection]
beho has joined #ruby-lang
<zenspider> minitest version 4.6.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/minitest-version-4-6-0-has-been-released.html
maxmanders has quit [Quit: Computer has gone to sleep.]
<andrewvos> what is zentest?
cored has quit [Quit: leaving]
<zenspider> vlad version 2.4.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/vlad-version-2-4-0-has-been-released.html
<zenspider> graph version 2.5.2 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2013/02/graph-version-2-5-2-has-been-released.html
<zenspider> andrewvos: testing utilities. the main thing ppl use in it is autotest
bright_day has joined #ruby-lang
hhatch has quit [Ping timeout: 276 seconds]
djwonk has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
carloslopes has joined #ruby-lang