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
BMF has joined #ruby-lang
jperry2_ has joined #ruby-lang
mpan has quit [Read error: Connection reset by peer]
mpan has joined #ruby-lang
chin-tastic has joined #ruby-lang
kain has quit [Ping timeout: 256 seconds]
<darix> zenspider: a tool to spawn fastcgi apps. why do you ask?
Asher has quit [Ping timeout: 245 seconds]
<zenspider> darix: because the homepage listed in machomebrew points at the redmine page for it... and there isn't a description anywhere to be found
<zenspider> the release announcements don't say what it is
<zenspider> the project page doesn't say what it is...
<zenspider> seems confusing
<darix> it used to be part of lighttpd. which made e.g. cherokee ship its own copy of it. so we split out the tool from lighttpd to make it easier for nginx/cherokee user to install it without the rest of lighty
jperry2_ has quit [Quit: jperry2_]
xyzodiac has joined #ruby-lang
vlad_starkov has joined #ruby-lang
fletch_ has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
seanstickle has quit [Quit: seanstickle]
vlad_starkov has quit [Ping timeout: 246 seconds]
lsegal has joined #ruby-lang
Madis has quit [Remote host closed the connection]
<elico> anyone here good with sockets?
<elico> tcp?
kain has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
Taranis has joined #ruby-lang
kain has quit [Ping timeout: 245 seconds]
elico has quit [Quit: Elico]
hppj has joined #ruby-lang
<hppj> in the ruby style guide, why is ``%w(a b c)`` preferred to ``['a', 'b', 'c']``?
<steveklabnik> so many fewere characters
<steveklabnik> and easier to read
<steveklabnik> the less punctuation on a line, the better
<hppj> i understand style preferences when implementations are equal, but isn't the latter form more efficient?
<steveklabnik> why would it be?
<steveklabnik> and seriously, that will never be your bottleneck
<hppj> my understanding is %w is like String#split
<hppj> as opposed to directly specifying the desired end result of an array of strings
<steveklabnik> user system total real
<steveklabnik> %w 0.190000 0.000000 0.190000 ( 0.193116)
<steveklabnik> '' 0.200000 0.000000 0.200000 ( 0.200588)
<steveklabnik> there you have it
<steveklabnik> %w is faster
<hppj> fascinating
alexkira has joined #ruby-lang
<hppj> thanks!
<steveklabnik> also
<steveklabnik> %w 21.810000 0.040000 21.850000 ( 21.874593)
<steveklabnik> '' 20.460000 0.020000 20.480000 ( 20.492872)
<steveklabnik> where %w 21.810000 0.040000 21.850000 ( 21.874593)
<steveklabnik> '' 20.460000 0.020000 20.480000 ( 20.492872)
<steveklabnik> err
<erikh> and the script?
<steveklabnik> n = 50000000
<steveklabnik> imma flood the channel
<steveklabnik> because i'm lazy
<steveklabnik> n = 50000000
<steveklabnik> Benchmark.bm do |x|
<steveklabnik> x.report "%w" do
<steveklabnik> %w(a b c)
<steveklabnik> n.times do
<steveklabnik> end
<steveklabnik> end
<erikh> ...
<steveklabnik> x.report "''" do
<steveklabnik> n.times do
<steveklabnik> ['a', 'b', 'c']
<steveklabnik> end
<steveklabnik> end
<steveklabnik> end
<lianj> paste all the things!
<steveklabnik> if you really want to look at it
<steveklabnik> x = RubyVM::InstructionSequence.new '%w{ a b c d }'
<steveklabnik> puts x.diasm
<steveklabnik> disam
<erikh> it translates it to an array at parse time i'd imagine
<erikh> (that's how perl does it)
<erikh> 1.8 is probably a different beast though.
<lianj> %w 16.590000 0.000000 16.590000 ( 16.628988)
<lianj> '' 16.620000 0.000000 16.620000 ( 16.651808)
<lianj> using bmbm
<erikh> nifty
<zenspider> what the fuck?
<erikh> I didn't realize the 1.8 parser was that sophisticated
<lianj> steveklabnik: so its parse time, how cares then..
<lianj> s/how/who/
<zenspider> the only thing you're benching is array.dup
<lianj> great stuff
tenderlo_ has quit [Remote host closed the connection]
<hppj> steveklabnik: after your result, i did end up disassembling
macmartine has joined #ruby-lang
<hppj> they're equivalent
<steveklabnik> :)
<steveklabnik> ta da!
<hppj> :)
<hppj> my pinkies rejoice!
ryanlecompte has quit [Remote host closed the connection]
<erikh> if static array allocation is a significant barrier in your ruby program, perhaps you shouldn't be writing it in ruby.
<steveklabnik> xactly
<hppj> although percent double-u is unintuitive unless you come from perl...
<hppj> i hear you guys - i was mostly curious
cirenyc has joined #ruby-lang
<hppj> thanks for the enlightenment folks! ciao!
hppj has quit [Quit: WeeChat 0.3.8]
kain has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
krohrbaugh has quit [Quit: Leaving.]
<erikh> perl calls it q*() (where * is w, x, r, etc)
<erikh> oh, he left.
m3nd3s has quit [Ping timeout: 245 seconds]
kain has quit [Ping timeout: 246 seconds]
thillux_ has quit [Ping timeout: 260 seconds]
sent-hil has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
spuk has joined #ruby-lang
seydar has joined #ruby-lang
<seydar> ahoy
havenn has quit [Remote host closed the connection]
mcooper has quit [Quit: mcooper]
<seydar> i need advice on sandboxing evals. http://hpaste.org/75641
<seydar> as you can see, doing "sandy.instance_eval..." preserves variables
<seydar> but doing a.run does not
<seydar> how can i fix a.run?
ryanf has quit [Quit: leaving]
sent-hil has quit [Remote host closed the connection]
<erikh> i'm pretty sure it's because you're using local variables
<seydar> but how come it works in sandy but not @sandbox?
<seydar> oh wait
<seydar> oh my god
<seydar> you're so right
kain has joined #ruby-lang
<seydar> hm
<seydar> wait
swarley has joined #ruby-lang
<seydar> erikh: if i supplied a binding to it, that should fix it
<erikh> yep
<erikh> although, that binding will have to have 'a' declared and defined within it's scope already.
<seydar> which could be done through evaling "a = 5", right?
jackhammer2022 has joined #ruby-lang
<erikh> right, right.
<swarley> so let me share with you all an experience i had today
<seydar> erikh: this was easier in 1.8.7, before all these rules about what's a binding and what's not were introduced
<swarley> i have a web app i made in ruby using sinatra, rather fast, uses an EventSource
<swarley> and i thought, hey, i bet i could make this faster
<erikh> seydar: eh, I don't know the differences, I rarely use bindings personally.
<swarley> so i went in search of a compiled language to use
<swarley> i found a framework on haskell called miku, that was almost identical to sinatra
<swarley> however
<swarley> it was not
<swarley> it was just...
<swarley> awful
<swarley> i spent hours, just trying to find the IO object, which the developer hid cryptically (never managed to find it), never was able to make the stream object, the standard package had requirements from the contrib package
<swarley> it was just HORRID
<swarley> long story short, i'm just going to stick with sinatra, because jesus christ shit is annoying
bfreeman has joined #ruby-lang
<seydar> anyone have experience with bindings?
justinseiter has quit [Remote host closed the connection]
<swarley> i HAAAATTTEEEEEEE libxml2 in C
kain has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
tenderlove has joined #ruby-lang
<seydar> god damn, bindings are bitches
<swarley> seydar, i have basic experience
<seydar> swarley: sweet, how can i get a binding to remember local variables?
<seydar> as in, binding.eval "a = 5"; binding.eval "puts a". the catch is that those calls will occur via different methods
<swarley> the easy way is to do this
<swarley> hold on
<swarley> let me pastebin it
tenderlove has quit [Remote host closed the connection]
<swarley> seydar, pastebin.com/sY1RyayW
<swarley> the other thing you can do is just pass the binding in as an argument to the functino
<swarley> function
<seydar> i mean, the binding would be stored in a variable
elico has joined #ruby-lang
<swarley> then what's the issue?
<erikh> seydar: isn't that more or less what you were trying?
<seydar> erikh: yeah, so i'm confused as to why my way didn't work
<erikh> did you try his? maybe it doesn't either :)
<swarley> its because you're evaling an object
<swarley> sec
<erikh> ah, instance_eval could behave differently for sure
<swarley> seydar, i have a solution for you
<swarley> let me turn that into proper code
macmartine has quit [Quit: Computer has gone to sleep.]
krz has joined #ruby-lang
<seydar> erikh: sorry, had to deal with pizza. trying it now
<seydar> swarley: YES!
<seydar> that's what I originally had, but it was in the context of a different object. I changed it because i didn't want the user to have accidental access to the innerworkings
<seydar> brilliant move of taking that and just making it a separate object
<swarley> there you go http://pastebin.com/4HuxK2cr
<swarley> ah, actually, you want to make it $binding = binding.clone
<lianj> swarley: why the global binding crap?
<swarley> so that you'll have an absolute blank sandbox on each object
<swarley> lianj, to assure that you have local variables
<swarley> you dont have locals doing a module, class, or object eval
mcooper has joined #ruby-lang
<swarley> they'll disappear
<swarley> (iirc)
<swarley> oh no you're right
<swarley> you can use the binding of initialize
<seydar> swarley: yargh, that's what i'm using
<swarley> its a little better to have the global scope really
<swarley> it gives you more room
Axsuul has quit [Ping timeout: 255 seconds]
Axsuul has joined #ruby-lang
<swarley> plus, if you use the scope from inside the method you get this
<swarley> [12] pry(main)> k.run "__method__"
<swarley> => :initialize
<lianj> wth, bs
<seydar> but then you have the issue where those variables clutter the global namespace
krohrbaugh has joined #ruby-lang
<swarley> seydar, no they dont
<swarley> you have a brand new binding
<swarley> because it's a clone
<swarley> its separate from the globabl
<swarley> global
<swarley> i think
<swarley> lol
<lianj> seydar: whats the code for anyway?
<seydar> lianj: a shell!
<swarley> yes, the global namespace is preserved
<rking> seydar: You know about rush, right?
<seydar> rking: yeah. rush is nice, but it's not *quite* good enough for daily use.
<seydar> also, they shell out
<seydar> they are soulless
<rking> seydar: I would focus on classes for pry, personally.
<swarley> mmm pry
kain has joined #ruby-lang
<seydar> i haven't quite jumped ship to pry yet
datanoise has quit [Ping timeout: 260 seconds]
<seydar> i know i should, tohugh
<swarley> i tried it once and never went back
S2kx has joined #ruby-lang
<swarley> i wish Mon_Ouie would merge the changes i made to cooline to pry so that the hilight as you type feature can be implemented
<rking> swarley: (??) That's the whole point of Coolline, is it not?
<swarley> rking, it had some issues that i fixed
<swarley> they were keeping it out of pry
hackeron has quit [Ping timeout: 246 seconds]
hackeron has joined #ruby-lang
<swarley> i think it was scrollback history and something else
<swarley> right, up and down arrows
<rking> All that works currently.
<swarley> because i fixed it lol
<swarley> a long time ago
jarib has quit [Ping timeout: 246 seconds]
<rking> Ah
<rking> Well, it's a really incomplete replacement for readline, IMO
S1kx has quit [Ping timeout: 246 seconds]
<rking> I took a serious stab at vi keys a few days ago.
<rking> It's now in the category of things that are "enough vi keys to annoy you at how little it has"
jarib has joined #ruby-lang
<rking> swarley: Here's the future (IMO): https://github.com/pry/pry/wiki/pry-zle
chin-tastic has quit [Ping timeout: 240 seconds]
<swarley> that would be awesome
<seydar> thank you swarley, it works now
<swarley> no problem
<rking> seydar: Cool guy, checking in *.rb~ =D
<seydar> wait what did i do
<swarley> I think I'll make a vim key buffer
<swarley> lib
<rking> rking: Cool guy, making fun of somebody and tabcompleting the wrong nick.
<seydar> hahaha
<rking> swarley: What for?
<swarley> I'm not sure, I suppose as a readline extension on pry
<rking> swarley: Readline already does vi keys.
<swarley> ah, righto
<swarley> so, what's so hard about it?
kain has quit [Ping timeout: 255 seconds]
<rking> echo set editing-mode vi > ~/.inputrc
<rking> swarley: It's hard in Coolline. Look at the list of TODOs I pasted, each one is do-able but it'd take between 15m—15h to accomplish.
<rking> swarley: That's why I'm advocating an attempt at just using zsh's zle, which is the best CLI interactor I know of.
<swarley> ah
wallerdev has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
<Mon_Ouie> I do like zsh's line editor; is it easy to use outside of zsh though?
pygwing has joined #ruby-lang
<Mon_Ouie> (zsh-syntax-highlight is actually what convinced me to write Coolline)
<rking> Mon_Ouie: It's not specifically set up for it, but my thinking is that we have like 8 solid use cases for a better input/output refactoring (that is, not just using $stdin/$stdout, but having another band to communicate on)
<rking> One such use case is pry-remote, another is pry-mirror, and then another would be pry-zle.
<rking> So I think the implementation would be as simple as mapping ^j/^m to something other than accept-line, then ^i to something other than the zsh completion functions. Then it just maintains a pipe to a Ruby process (like ruby-dev.el)
<rking> Mon_Ouie: Actually, pry-dev.el needs the I/O split as well, so you could get completion and such in the edit buffer, no?
<Mon_Ouie> It could get that through its commands, just like it retrieves documentation, etc.
<swarley> i'm actually going to try something here in a second
<seydar> Mon_Ouie: coolline looks really cool, i might start using it
<rking> Mon_Ouie: The biggest thing I want is a menu like zle -M. You know the one that shows up when you tabcomplete, but goes away upon further output? Most of pry should be the same way.
<rking> Mon_Ouie: Imagine that for show-doc, show-source, tabcompletion, and also quick-eval of a line
<Mon_Ouie> Yeah, I see; doesn't Readline do the same thing though?
<rking> Mon_Ouie: I've never once seen such a thing from any Readline tool.
<rking> Not Bash, not psql, not mysql, not pry.
<rking> It just junks up your scrollback relentlessly.
<rking> If you take 4 tries or so to tabcomplete a path, odds are your last command is completely off the screen in bash. In zsh the scrollback ends up looking like you had not completed even once.
<Mon_Ouie> Ah, yes, I see
<rking> It's a hard problem.
<rking> Mon_Ouie: My original intent was to put a menu widget into Coolline.
<rking> But I'm thinking that the problem is hard, then on top of that there's a ton of work to catch up to Readline, much more so zle
datanoise has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
BMF has quit [Remote host closed the connection]
cirenyc has joined #ruby-lang
pygwing has quit [Quit: WeeChat 0.3.5]
datanoise has quit [Ping timeout: 252 seconds]
kjr has quit [Quit: kjr]
kain has joined #ruby-lang
piyush has joined #ruby-lang
tenderlove has joined #ruby-lang
<swarley> ha
<swarley> its sort of working
kain has quit [Ping timeout: 246 seconds]
seydar has quit [Quit: leaving]
<swarley> [2] pry(main)> LowLine.readline
<swarley> ZZ=> nil
tenderlove has quit [Ping timeout: 244 seconds]
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
cirenyc has quit [Quit: Leaving...]
franckverrot has quit [Ping timeout: 246 seconds]
franckverrot has joined #ruby-lang
chin-tastic has joined #ruby-lang
macmartine has joined #ruby-lang
kain has joined #ruby-lang
piyush has quit [Ping timeout: 246 seconds]
chin-tastic has quit [Ping timeout: 240 seconds]
macmartine has quit [Read error: Connection reset by peer]
YayMe has joined #ruby-lang
piyush has joined #ruby-lang
swarley has quit [Ping timeout: 252 seconds]
cantonic has quit [Quit: cantonic]
corundum has quit [Disconnected by services]
kain has quit [Ping timeout: 246 seconds]
corundum has joined #ruby-lang
JohnBat26 has joined #ruby-lang
macmartine has joined #ruby-lang
mcooper has quit [Quit: mcooper]
cantonic has joined #ruby-lang
charliesome has quit [Ping timeout: 240 seconds]
jtoy has joined #ruby-lang
cantonic has quit [Quit: cantonic]
YayMe has quit [Ping timeout: 255 seconds]
enebo has quit [Ping timeout: 244 seconds]
ryanlecompte has joined #ruby-lang
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
burgestrand has quit [Ping timeout: 256 seconds]
kain has joined #ruby-lang
charliesome has joined #ruby-lang
drollwit has joined #ruby-lang
d3vic3 has quit [Ping timeout: 255 seconds]
d3vic3 has joined #ruby-lang
goshakkk has joined #ruby-lang
jtoy has quit [Quit: jtoy]
kain has quit [Ping timeout: 246 seconds]
wyhaines has joined #ruby-lang
drollwit has quit [Remote host closed the connection]
enebo has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
fletch_ has quit []
justinmcp has quit [Remote host closed the connection]
kain has joined #ruby-lang
datanoise has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Fretta has quit [Quit: Fretta]
datanoise has quit [Ping timeout: 240 seconds]
coryf has quit [Remote host closed the connection]
kain has quit [Ping timeout: 256 seconds]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
josh^ has joined #ruby-lang
justinmcp has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
dc5ala has joined #ruby-lang
kain has joined #ruby-lang
rippa has joined #ruby-lang
sush24 has joined #ruby-lang
nariyal has joined #ruby-lang
sj26 has quit [Quit: Rainbows!]
rippa has quit [Ping timeout: 240 seconds]
stardiviner has joined #ruby-lang
probst has joined #ruby-lang
burgestrand has joined #ruby-lang
ojongerius has joined #ruby-lang
kain has quit [Quit: exit]
enebo has quit [Quit: enebo]
kain has joined #ruby-lang
Tearan has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<zenspider> halp... I need an apache wiz
<zenspider> stupid fucking config
<zenspider> I'm being bit by: AddHandler cgi-script .cgi .pl .rb .py
<zenspider> which seems to want to execute a file named blah.rb.html
<zenspider> is there a way to say "no stupid... only if it ends with it"
<steveklabnik> pacman -S nginx
<steveklabnik> <3
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<zenspider> 2 fails...
<zenspider> not to say that apache isn't also a fail...
<zenspider> but this way I only have 1
rue_XIW has quit [Remote host closed the connection]
anannie has quit [Remote host closed the connection]
<steveklabnik> :)
darix- has joined #ruby-lang
darix- has quit [Changing host]
darix- has joined #ruby-lang
elico has quit [Quit: Elico]
nariyal has quit [Quit: Computer has gone to sleep.]
darix has quit [*.net *.split]
darix- is now known as darix
Tearan has quit [Quit: Sleepy Badger....]
<erikh> zenspider: been a while, but I think you need a ScriptDirectory directive.
<erikh> I presume this is apache 2?
<erikh> ah, scriptalias
<erikh> anyhow, off to bed for me.
krainboltgreene has joined #ruby-lang
<erikh> fwiw, that goes through a few ways you can flag a CGIs to execute.
krainboltgreene has quit [Client Quit]
solars has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
dhruvasagar has quit [Ping timeout: 256 seconds]
nariyal has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
wyhaines has quit [Ping timeout: 252 seconds]
bhrgunatha has joined #ruby-lang
bhrgunatha has quit [Client Quit]
datanoise has joined #ruby-lang
dr_bob has joined #ruby-lang
sush24 has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
dr_bob has quit [Client Quit]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
KA_ has quit [Quit: KA_]
tonni has quit [Ping timeout: 240 seconds]
anannie has joined #ruby-lang
Axsuul has quit [Remote host closed the connection]
ttilley has quit [Quit: ttilley]
nariyal has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby-lang
rue|w has joined #ruby-lang
<anannie> I was trying to write a function which randomly shuffles an array, but for some reason the function I wrote ( https://gist.github.com/3817032 ) has a lot of duplication and the output isn't what I expected. Can someone please tell me what I'm doing wrong? (the code is commented)
<steveklabnik> Logically this should lead to a
<steveklabnik> # perfectly shuffled deck, but it isn't working...
<steveklabnik> there's your problem
<anannie> steveklabnik: How so?
piyush has quit [Ping timeout: 246 seconds]
<anannie> The algorithm works perfectly fine in the real world with a deck of cards
rolfb has joined #ruby-lang
piyush has joined #ruby-lang
mars777 has quit [Quit: mars777]
zmack has joined #ruby-lang
gnufied has joined #ruby-lang
KA_ has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
Axsuul has joined #ruby-lang
justinmcp has joined #ruby-lang
diegoviola has quit [Ping timeout: 244 seconds]
runeb has joined #ruby-lang
mr_dynamix has joined #ruby-lang
dr_bob has joined #ruby-lang
runeb has quit [Ping timeout: 256 seconds]
dr_bob has quit [Client Quit]
<burgestrand> In the real world you cannot copy cards.
<anannie> burgestrand: But I have to switch the cards somehow
dr_bob has joined #ruby-lang
mpan has quit [Read error: Connection reset by peer]
dr_bob has quit [Client Quit]
<anannie> burgestrand: For some reason duplication is happening even though logically the once switched cards aren't revisited
mpan has joined #ruby-lang
dr_bob has joined #ruby-lang
hinbody has quit [Ping timeout: 265 seconds]
hinbody has joined #ruby-lang
<bnagy> you don'ty need the temp var in ruby
KA_ has quit [Quit: KA_]
<bnagy> card_a,card_b=card_b,card_a
<bnagy> this will NOT give you a perfectly shuffled deck, though
justinmcp has quit [Remote host closed the connection]
<anannie> bnagy: Why not? Isn't this essentially the Fisher-Yates shuffle? http://en.wikipedia.org/wiki/Fisher-Yates_shuffle#The_modern_algorithm
<bnagy> fisher yayes copies into a new array
<bnagy> *yates
wallerdev has quit [Quit: wallerdev]
<bnagy> huh, it even has a section on implementation errors
<bnagy> which includes yours :)
<anannie> bnagy: I figured out what was wrong! I was doing the switch wrong, and I wasn't changing the underlying array creating duplicates...
<anannie> bnagy: Essentially I'm an idiot :)
<bnagy> you should read the src for Array#shuffle!
<bnagy> which is actually fisher yates
<bnagy> it's in C though sry :/
hinbody has quit [Ping timeout: 252 seconds]
nariyal has joined #ruby-lang
zmack has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
<anannie> bnagy: What other mistake am I doing?
<bnagy> not constraining j
<anannie> but I am constraining j between the sequence and the end of the deck
hinbody has joined #ruby-lang
Axsuul has quit [Remote host closed the connection]
<anannie> at least I think I am
<anannie> I might be wrong
<bnagy> o_0 haha no you're right I just misread it completely
<anannie> card_to_shuffle_with = rand(card_number...52)
<bnagy> you're doing it 'backwards', which doesn't matter
<bnagy> but I was looking at the end of the range not the start
<bnagy> cause I'm used to seeing it the other way round
<anannie> yeah, I didn't implement fisher yates per se... this is just what I came up with and I couldn't think of any other logical way
cdt has joined #ruby-lang
<bnagy> well you can just remove a random element and push it onto a new array
<anannie> I didn't know how to code that...
<bnagy> new << old.delete_at rand(old.size) until old.empty
<bnagy> without testing
<bnagy> there are tons of naive ways though
<anannie> wow how did you come up with that? It's so concise and neat
<bnagy> it's probably broken
<bnagy> hence using Array#shuffle! ;)
<bnagy> you could try and implement some real world shuffles, they're an OK exercise
<bnagy> block shuffle and riffle shuffle
solars has quit [Ping timeout: 240 seconds]
<anannie> but isn't it unhealthy for me to use the default method at a time I don't know how to code properly bnagy?
gnufied has joined #ruby-lang
<bnagy> depends what you're trying to learn I guess
<anannie> Well I essentially want to write math/logic heavy code some day
tonni has joined #ruby-lang
thillux has joined #ruby-lang
sepp2k has joined #ruby-lang
GarethAdams has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
beiter has joined #ruby-lang
hakunin has quit [Ping timeout: 260 seconds]
zz_chrismcg is now known as chrismcg
workmad3 has joined #ruby-lang
Axsuul has joined #ruby-lang
dr_bob has quit [Read error: Connection reset by peer]
nariyal has quit [Quit: Computer has gone to sleep.]
piyush has quit [Ping timeout: 246 seconds]
solars has joined #ruby-lang
datanoise has joined #ruby-lang
ryanf has quit [Quit: leaving]
Taranis has quit [Read error: Connection reset by peer]
datanoise has quit [Ping timeout: 256 seconds]
Taranis has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
sush24 has joined #ruby-lang
mytrile has joined #ruby-lang
probst has quit [Quit: probst]
dr_bob has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 246 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
sush24 has quit [Quit: This computer has gone to sleep]
mr_dynamix has quit [Quit: mr_dynamix]
<andrewvos> `throw "This method takes a block" unless block_given?` <-- does this seem bad?
krohrbaugh1 has quit [Read error: Connection reset by peer]
krohrbaugh has joined #ruby-lang
solars has joined #ruby-lang
Elico1 has joined #ruby-lang
tRAS has quit [Read error: No route to host]
tRAS has joined #ruby-lang
nariyal has joined #ruby-lang
<workmad3> andrewvos: why not raise an ArgumentError?
<andrewvos> Okay
xsdg has quit [Ping timeout: 246 seconds]
runeb- has joined #ruby-lang
runeb- is now known as runeb
dhruvasagar has joined #ruby-lang
probst has joined #ruby-lang
runeb has quit [Ping timeout: 260 seconds]
runeb has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
beiter has quit [Ping timeout: 246 seconds]
runeb has quit [Ping timeout: 245 seconds]
runeb has joined #ruby-lang
xsdg has joined #ruby-lang
<andrewvos> Dir.tmpdir docs imply that it will always give out the same path? http://www.ruby-doc.org/stdlib-1.9.3/libdoc/tmpdir/rdoc/Dir.html
probst has quit [Quit: probst]
<andrewvos> "Returns the operating system’s temporary file path."
<rue|w> Technically it could change.
<andrewvos> How do I create a new unique temporary directory name every time?
<bnagy> Tempdir?
probst has joined #ruby-lang
<bnagy> Tempfile, sry
<bnagy> it does dirs in there somewhere
<bnagy> no?
<andrewvos> No
runeb has quit [Ping timeout: 248 seconds]
<andrewvos> I need a temporary directory, not a file.
<bnagy> yeah I heard, but I thought Tempfile also created dirs under which is stored the files
<bnagy> guess you could use uuidgen or something?
<bnagy> or use the filename from Tempfile and create a dir with that name
<andrewvos> Found this on StackOverflow: path = File.expand_path "#{Dir.tmpdir}/#{Time.now.to_i}#{rand(1000)}/"
<andrewvos> Questionable
<andrewvos> UUID would be the obvious choice yes
nariyal has quit [Quit: Computer has gone to sleep.]
<andrewvos> rand(1000) <-- some nice errors popping up occasionally here
postmodern has quit [Quit: Leaving]
solars has joined #ruby-lang
tooky has joined #ruby-lang
<andrewvos> bnagy: SecureRandom.uuid looks alright.
sush24 has joined #ruby-lang
<andrewvos> Meh? "#{Dir.tmpdir}/#{Time.now.to_i}#{SecureRandom.uuid}/"
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<andrewvos> Okay removed the Time.now.to_i. Seems like overkill.
facest has quit [Ping timeout: 260 seconds]
facest has joined #ruby-lang
nariyal has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
runeb has joined #ruby-lang
Guedes_out is now known as Guedes
facest has quit [Ping timeout: 246 seconds]
facest has joined #ruby-lang
nariyal has quit [Read error: Connection reset by peer]
<darix> andrewvos: or use the hash value of the content you want to store in the file?
Criztian has joined #ruby-lang
mpan has quit [Ping timeout: 255 seconds]
nariyal has joined #ruby-lang
facest has quit [Ping timeout: 255 seconds]
faces has joined #ruby-lang
<andrewvos> darix: I'm running a tool that puts a whole lot of files in that directory.
<darix> and?
<andrewvos> darix: Well, I won't be able to get the hash value of a file that doesn't exist.
<darix> if you use the md5sum/sha1sum you will notice when you try to store the same value twice
<andrewvos> darix: Hmmm
<darix> andrewvos: but you know the content before you want to write it into the file no?;p
<andrewvos> Well, I'm running `apktool d(ecompile) File.apk` actually. So, yes I can md5 the original apk file :)
<andrewvos> Good idea
nariyal has quit [Quit: Computer has gone to sleep.]
fbernier has quit [Read error: Connection reset by peer]
d3vic3 has quit [Quit: leaving]
sush24 has quit [Quit: This computer has gone to sleep]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
Hakon has joined #ruby-lang
Hakon has quit [Client Quit]
jarib has quit [Excess Flood]
josh^ has quit [Ping timeout: 246 seconds]
jarib has joined #ruby-lang
josh^ has joined #ruby-lang
Madis_ has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
beiter has joined #ruby-lang
vesan has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
mytrile has quit [Remote host closed the connection]
Asher has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
Asher1 has joined #ruby-lang
Asher has quit [Disconnected by services]
Asher1 has quit [Client Quit]
Asher has joined #ruby-lang
Hakon has joined #ruby-lang
xyzodiac has joined #ruby-lang
Hakon has quit [Client Quit]
rippa has joined #ruby-lang
faces has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby-lang
faces has joined #ruby-lang
faces has quit [Client Quit]
urbanmonk has joined #ruby-lang
mwjcomputing has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
toretore has joined #ruby-lang
probst has quit [Quit: probst]
wyhaines has joined #ruby-lang
d3vic3 has joined #ruby-lang
faces has joined #ruby-lang
yats has joined #ruby-lang
tooky has quit [Remote host closed the connection]
solars has quit [Ping timeout: 255 seconds]
Hakon has joined #ruby-lang
probst has joined #ruby-lang
justinmcp has joined #ruby-lang
cirenyc has joined #ruby-lang
urbanmonk has quit [Quit: Leaving...]
codefyre has joined #ruby-lang
cantonic has joined #ruby-lang
tooky has joined #ruby-lang
goshakkk has joined #ruby-lang
m3nd3s has joined #ruby-lang
solars has joined #ruby-lang
th is now known as Guest62128
fbernier has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby-lang
nariyal has joined #ruby-lang
dhruvasagar has quit [Client Quit]
dhruvasagar has joined #ruby-lang
dhruvasagar has quit [Client Quit]
dhruvasagar has joined #ruby-lang
yats has quit [Ping timeout: 246 seconds]
rolfb has quit [Quit: Leaving...]
krz has quit [Quit: krz]
Hakon has quit [Quit: Leaving...]
Hakon has joined #ruby-lang
sockmonk has joined #ruby-lang
xyzodiac has joined #ruby-lang
cirenyc has quit [Quit: Linkinus - http://linkinus.com]
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
yats has joined #ruby-lang
yats_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
yats_ has quit [Client Quit]
sailias has joined #ruby-lang
codefyre has quit [Quit: Leaving]
sailias has quit [Client Quit]
yats has quit [Ping timeout: 248 seconds]
sailias has joined #ruby-lang
A124 has quit [Quit: Leaving.]
A124 has joined #ruby-lang
jtoy has joined #ruby-lang
ruurd has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
nariyal has quit [Quit: Computer has gone to sleep.]
ttilley has joined #ruby-lang
sailias has quit [Quit: Leaving.]
runeb has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
<ddfreyne> yorickpeterse: I was in Tokyo two weeks ago :)
<ddfreyne> yorickpeterse: enjoy, it's an amazing place to stay :)
Elico1 has quit [Quit: Elico1]
nariyal has joined #ruby-lang
runeb has joined #ruby-lang
<yorickpeterse> thanks :)
faces has quit [Ping timeout: 246 seconds]
<ddfreyne> yorickpeterse: beware of jaspervdj, he is a haskell fanboy
<ddfreyne> yorickpeterse: nah he' alright ;)
<ddfreyne> yorickpeterse: Sadly, I left Tokyo two weeks ago, would have liked ot meet up though
JustinCampbell has joined #ruby-lang
carloslopes has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
anannie has quit [Remote host closed the connection]
<yorickpeterse> I tried the sub-reddit but it seems nobody cares :<
mwjcomputing has quit [Quit: Leaving]
dr_bob has joined #ruby-lang
<ddfreyne> yorickpeterse: where do you live in NL?
<yorickpeterse> Hilversum, which is in the center (between Amsterdam and Utrecht)
mistym has joined #ruby-lang
jperry2_ has joined #ruby-lang
xyzodiac has quit [Quit: Textual IRC Client: www.textualapp.com]
runeb has quit [Remote host closed the connection]
<ddfreyne> yep. haven't been there though (going to amsterdam this weekend + monday for work)
nariyal has quit [Quit: Computer has gone to sleep.]
jtoy has quit [Quit: jtoy]
m3nd3s_ has joined #ruby-lang
conorreedy has joined #ruby-lang
runeb has joined #ruby-lang
anannie has joined #ruby-lang
m3nd3s has quit [Ping timeout: 240 seconds]
nariyal has joined #ruby-lang
nariyal has quit [Client Quit]
hramrach has quit [Remote host closed the connection]
outoftime has joined #ruby-lang
beiter has quit [Quit: beiter]
runeb has quit [Ping timeout: 256 seconds]
hramrach has joined #ruby-lang
nariyal has joined #ruby-lang
faces has joined #ruby-lang
conorreedy_ has joined #ruby-lang
conorreedy has quit [Ping timeout: 260 seconds]
runeb has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
S3kx has joined #ruby-lang
S2kx has quit [Read error: Connection reset by peer]
Criztian has quit [Remote host closed the connection]
pygmael has joined #ruby-lang
urbanmonk has joined #ruby-lang
rom has joined #ruby-lang
rom has quit [Client Quit]
justinmcp has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
urbanmonk has quit [Ping timeout: 246 seconds]
jtoy has joined #ruby-lang
wyhaines has quit [Ping timeout: 255 seconds]
mars777 has joined #ruby-lang
sailias has joined #ruby-lang
piyush has joined #ruby-lang
sush24 has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
mwjcomputing has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
rippa has quit [Ping timeout: 245 seconds]
jtoy has quit [Read error: Connection reset by peer]
voker57 has quit [Read error: Operation timed out]
jtoy has joined #ruby-lang
gsav has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
A124 has quit [Quit: reboot]
jtoy_ has joined #ruby-lang
A124 has joined #ruby-lang
jtoy has quit [Ping timeout: 260 seconds]
jtoy_ is now known as jtoy
wyhaines has joined #ruby-lang
dhruvasa1ar has quit [Quit: leaving]
gsav_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby-lang
javilm has joined #ruby-lang
m3nd3s_ has quit [Remote host closed the connection]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
m3nd3s has joined #ruby-lang
enebo has joined #ruby-lang
kain has quit [Quit: exit]
kain has joined #ruby-lang
doitdistributed has joined #ruby-lang
m3nd3s has quit [Ping timeout: 246 seconds]
piyush has quit [Ping timeout: 246 seconds]
doitdistributed has quit [Remote host closed the connection]
krohrbaugh has quit [Read error: Connection reset by peer]
krohrbaugh has joined #ruby-lang
mohamad has joined #ruby-lang
KA_ has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
mohamad has quit [Remote host closed the connection]
nochamani has joined #ruby-lang
<Harzilein> hmm
<Harzilein> this always returns "" instead of the last element:
<Harzilein> @doc.first.root.children.each_with_object(""){ |n,o| o=n.children.each_with_object(nil){ |cn,o| o=cn.name }}
yats has joined #ruby-lang
<Harzilein> any idea why?
<Harzilein> s/last element/last element's name/
Jake232 has joined #ruby-lang
scalone has joined #ruby-lang
burgestrand has joined #ruby-lang
|Vargas| has quit [Quit: ...]
scalone has quit []
burgestrand1 has joined #ruby-lang
nochamani has left #ruby-lang [#ruby-lang]
coryf has joined #ruby-lang
tonni has quit [Remote host closed the connection]
probst has quit [Quit: probst]
burgestrand has quit [Ping timeout: 256 seconds]
yats has quit [Read error: Operation timed out]
arooni-mobile has joined #ruby-lang
javilm_ has joined #ruby-lang
javilm has quit [Read error: Connection reset by peer]
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
javilm_ has left #ruby-lang [#ruby-lang]
datanoise has joined #ruby-lang
<Harzilein> if you want to try it yourself, this is the nokoe version i used: http://paste.debian.net/195335 and a shell transcript: http://paste.debian.net/195333
macmartine has joined #ruby-lang
<cout> are there any decent profilers for ruby other than ruby-prof?
<cout> ruby-prof isn't giving me a very good profile :(
javilm has joined #ruby-lang
<A124> pry?
bfreeman has quit [Quit: bfreeman]
<cout> pry has a profiler?
<cout> the only one I found for it is a wrapper around ruby-prof
ruurd has quit [Quit: Leaving...]
<A124> Depends on what you need. There are few other profiles, but it's pain. Only good profilindg I have seen is on Twitters version of Enterprise Ruby MRI
KA_ has quit [Quit: KA_]
<A124> They made it even public, but not sure about the profiling tools, they may have emained private.
krohrbaugh has quit [Ping timeout: 240 seconds]
<cout> trying valgrind/callgrind now
<cout> runing at about 1/2 speed
javilm has left #ruby-lang [#ruby-lang]
<cout> hopefully it will be worthwhile
javilm has joined #ruby-lang
arooni-mobile has quit [Remote host closed the connection]
nariyal has quit [Ping timeout: 256 seconds]
yats has joined #ruby-lang
piyush has joined #ruby-lang
sent-hil has joined #ruby-lang
nariyal has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
hhatch has joined #ruby-lang
rippa has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
rue|w has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
m3nd3s has joined #ruby-lang
m3nd3s has quit [Read error: Connection reset by peer]
jarib has quit [Excess Flood]
<burgestrand1> cout: depends on what you need like A124 said. I’ve used perftools.rb in the past to track down performance issues.
burgestrand1 is now known as burgestrand
m3nd3s has joined #ruby-lang
jperry2_ has quit [Quit: jperry2_]
nariyal has quit [Quit: Computer has gone to sleep.]
jarib has joined #ruby-lang
dhruvasagar has joined #ruby-lang
fletch_ has joined #ruby-lang
gnufied has joined #ruby-lang
javilm has quit [Quit: javilm]
Fretta has joined #ruby-lang
piyush has quit [Ping timeout: 248 seconds]
deryl has quit [Ping timeout: 245 seconds]
yats has quit [Ping timeout: 246 seconds]
jamo has joined #ruby-lang
probst has joined #ruby-lang
ricardovaleriano has quit [Ping timeout: 240 seconds]
Antiarc has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
Mellett68 has joined #ruby-lang
jamo has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 244 seconds]
yats has joined #ruby-lang
xyzodiac has joined #ruby-lang
nochamani has joined #ruby-lang
krohrbaugh has joined #ruby-lang
javilm has joined #ruby-lang
<andrewvos> Quite often I write out a large question to #ruby-lang only to realise at the end that I've answered the question by writing it out.
dc5ala has quit [Quit: Ex-Chat]
wyhaines_ has joined #ruby-lang
<javilm> andrewvos: welcome to the club!
wyhaines has quit [Ping timeout: 256 seconds]
datanoise has quit [Ping timeout: 245 seconds]
d3vic3 has quit [Quit: leaving]
fletch_ has quit [Ping timeout: 246 seconds]
nochamani has quit [Remote host closed the connection]
kjr has joined #ruby-lang
nochamani has joined #ruby-lang
xyzodiac has quit [Ping timeout: 240 seconds]
hakunin has joined #ruby-lang
<cout> hmm, I'm spending 22% of my time in rb_str_equal()
<cout> that's called by call_cfunc
<cout> oh duh, of course it is, since the app is calling String#==
ryanlecompte has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
datanoise has joined #ruby-lang
ttilley has quit [Quit: ttilley]
<cout> burgestrand: can perftools.rb write out in a format that kcachegrind can read?
sent-hil has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
<burgestrand> cout: no idea, haven’t used the latter I’m afraid
<cout> burgestrand: you're missing out!
<burgestrand> cout: I suppose, haven’t used valgrind either ;)
cantonic_ has joined #ruby-lang
<burgestrand> or rather, at all*
<cout> ah, pprof.rb --callgrind
<cout> perfect
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
rue|w has joined #ruby-lang
Hakon has joined #ruby-lang
jtoy has quit [Quit: jtoy]
bfreeman has joined #ruby-lang
fletch_ has joined #ruby-lang
Carnage\ has joined #ruby-lang
ljsdfc_ has joined #ruby-lang
rue|w has quit [Ping timeout: 240 seconds]
conorreedy has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
savage- has joined #ruby-lang
x0F_ is now known as x0F
nochamani has quit [Remote host closed the connection]
My_Hearing has joined #ruby-lang
hhatch has quit [Read error: Connection reset by peer]
hhatch has joined #ruby-lang
mistym_ has joined #ruby-lang
laszlokorte_ has joined #ruby-lang
jaylevitt has joined #ruby-lang
__butch__ has joined #ruby-lang
ljsdfc has quit [Read error: Connection reset by peer]
ryanlecompte has quit [Read error: Connection reset by peer]
mistym has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
conorreedy_ has quit [Ping timeout: 246 seconds]
fbernier has quit [Ping timeout: 246 seconds]
Jay_Levitt has quit [Read error: Connection reset by peer]
laszlokorte has quit [Ping timeout: 260 seconds]
fbernier has joined #ruby-lang
thatdutchguy has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
tenderlove has joined #ruby-lang
<eam> did String lose its each method in 1.9?
nochamani has joined #ruby-lang
<cout> I think so, yes
<cout> use #each_byte or #each_char, depending on which you want
nochamani has quit [Remote host closed the connection]
<eam> it iterated lines in 1.8
jperry2_ has joined #ruby-lang
havenn has joined #ruby-lang
<eam> obnoxious change :(
<cout> oh, use #each_line then
<eam> thanks
Jake232 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
chrismcg is now known as zz_chrismcg
My_Hearing is now known as Mon_Ouie
alvaro_o has joined #ruby-lang
probst has quit [Quit: probst]
Fretta has quit [Quit: Fretta]
sent-hil has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mrsolo has joined #ruby-lang
sailias has quit [Quit: Leaving.]
anannie has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
<rue> andrewvos: …Paris?
workmad3 has quit [Ping timeout: 256 seconds]
probst has joined #ruby-lang
piyush has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
voker57 has quit [Remote host closed the connection]
kjr has quit [Quit: kjr]
kjr has joined #ruby-lang
probst has quit [Quit: probst]
runeb has quit [Remote host closed the connection]
probst has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
sepp2k has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby-lang
sepp2k has joined #ruby-lang
beiter has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
javilm has quit [Quit: http://www.lavandeira.net]
My_Hearing has joined #ruby-lang
KA_ has joined #ruby-lang
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
<andrewvos> rue: Went there a few weeks ago.
<rue> Hampsterdam?
jtoy has joined #ruby-lang
<rue> Actually, Paris->{Marseille,Nice} would be cool.
mpan has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
Hakon has joined #ruby-lang
<andrewvos> rue: Current status: brute forcing the eurostar site. Their date selection process is so bad. So so bad.
probst has quit [Quit: probst]
<andrewvos> THere appear to be no tickets to Amsterdam ever.
<cout> hmm
<cout> perftools is showing 54% of my cpu in Array#include?
havenn has quit [Remote host closed the connection]
<cout> but it doesn't tell me who's calling it :(
ttilley has joined #ruby-lang
<burgestrand> cout: hm, usually the call graph shows that
<burgestrand> cout: or whatever it is, perftools can make a gif
<burgestrand> … or maybe it was pdf
* burgestrand shrug
havenn has joined #ruby-lang
sent-hil has joined #ruby-lang
<cout> burgestrand: it tells me the caller is Object#post
nariyal has joined #ruby-lang
<cout> but it doesn't tell me the callers of Object#post, and it doesn't give me a line number
<burgestrand> cout: you could override Object#post and log it yourself? :P
runeb has joined #ruby-lang
<cout> please don't stick your tongue out at me :(
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
BMF has joined #ruby-lang
m3nd3s has joined #ruby-lang
sockmonk has quit [Quit: bye]
mistym_ has left #ruby-lang [#ruby-lang]
mistym has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
runeb- has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
runeb- is now known as runeb
nochamani has joined #ruby-lang
nochamani has quit [Remote host closed the connection]
runeb has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
goshakkk has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
beiter has quit [Quit: beiter]
<rue> *lick*
KA_ has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
<cout> thanks rue :)
<rue> Any time
norwat has joined #ruby-lang
probst has joined #ruby-lang
norwat has left #ruby-lang [#ruby-lang]
sailias has joined #ruby-lang
full_nelson has joined #ruby-lang
<full_nelson> hey
beiter has joined #ruby-lang
<full_nelson> im running arch with ruby 1.9.3 and im trying to install passenger with apache
<full_nelson> but every time i try to install a gem it always gets installed in the current user home dir
m3nd3s has joined #ruby-lang
<full_nelson> how do i force it to install in its regular path
<full_nelson> in arch being /usr/lib/ruby/gems
<full_nelson> i've tried --install-dir .. didnt work
<full_nelson> :\
<full_nelson> and also removed my user's path from the env variable GEM_PATHS
<darix> full_nelson: you run the gem install as root?
<darix> otherwise it cant write to the system dir
<full_nelson> yes
<full_nelson> it install all gems to /root/.gem/
<darix> try
<darix> gem install --no-user-install
Criztian has joined #ruby-lang
<full_nelson> darix: i owe you a beer :)
<full_nelson> thanks m8
<darix> full_nelson: i bet your got .gemrc or /etc/gemrc that sets the default to --user-install
<full_nelson> i did ... /etc/gemrc
<full_nelson> i wasnt aware that a global gemrc file existed
beiter has quit [Quit: beiter]
CarlB_the_great has quit [Remote host closed the connection]
tRAS has quit [Quit: Mother, did it need to be so high?]
vlad_starkov has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
KA_ has quit [Quit: KA_]
JustinCampbell has joined #ruby-lang
piyush has quit [Ping timeout: 252 seconds]
JustinCa_ has joined #ruby-lang
JustinCampbell has quit [Read error: Connection reset by peer]
CarlB_the_great has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
full_nelson has quit [Quit: WeeChat 0.3.8]
JustinCa_ has left #ruby-lang [#ruby-lang]
nariyal has quit [Read error: Connection reset by peer]
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
corundum has quit [Disconnected by services]
corundum has joined #ruby-lang
ryanf has joined #ruby-lang
datanoise has joined #ruby-lang
workmad3 has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby-lang
datanoise has quit [Ping timeout: 244 seconds]
yats has quit [Ping timeout: 248 seconds]
datanoise has joined #ruby-lang
jtoy has quit [Quit: jtoy]
KA_ has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
datanoise has quit [Ping timeout: 244 seconds]
nariyal has joined #ruby-lang
hellboy25 has joined #ruby-lang
KA_ has quit [Quit: KA_]
hellboy25 has left #ruby-lang [#ruby-lang]
thillux_ has joined #ruby-lang
Hakon has joined #ruby-lang
rippa has quit [Ping timeout: 246 seconds]
_7894 has joined #ruby-lang
thillux has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
dc5ala has joined #ruby-lang
dabradley has quit [Ping timeout: 240 seconds]
Mellett68 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wyhaines_ has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
r1s1ng-ph03n1x has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
ryanf has quit [Ping timeout: 246 seconds]
probst has quit [Quit: probst]
sent-hil has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
<mistym> Interesting. I subclassed a class and defined a method; the superclass aliases that method. Using the alias in an object from the subclass calls the superclass's version of the method.
ryanf has joined #ruby-lang
workmad3 has joined #ruby-lang
CarlB_the_great has quit [Remote host closed the connection]
benanne has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
datanoise has joined #ruby-lang
<burgestrand> mistym: well, you aliased it in the parent. At the point of aliasing you do not have access to the method in the child from within the parent.
<burgestrand> mistym: I like to think of alias_method as copy_method, rather than alias.
<kith> is it possible to read metadata on osx files with ruby?
<kith> the infos shown when clicking "get info"
<mistym> burgestrand: Right, I guess not. Just seemed a bit surprising - the superclass wasn't mine and I didn't have access to its code, so I found out it was implemented that way when some stuff broke by not going through my subclass's method.
<burgestrand> Ah. :)
jtoy has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
nariyal has quit [Quit: Computer has gone to sleep.]
dabradley has joined #ruby-lang
macmartine has joined #ruby-lang
justinseiter has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
carloslopes has quit [Quit: Leaving.]
workmad3 has quit [Quit: Lost terminal]
urbanmonk has joined #ruby-lang
jamjam has joined #ruby-lang
sailias has quit [Quit: Leaving.]
Madis__ has joined #ruby-lang
sent-hil has quit [Read error: Connection reset by peer]
sent-hil has joined #ruby-lang
Madis_ has quit [Ping timeout: 240 seconds]
urbanmonk has quit [Quit: Bye!]
tonni has joined #ruby-lang
Madis_ has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 260 seconds]
__butch__ has quit [Remote host closed the connection]
Madis__ has quit [Ping timeout: 260 seconds]
__butch__ has joined #ruby-lang
Madis__ has joined #ruby-lang
<rhizmoe> /home/cap/.gem/specs/rubygems.org%80 :/
sent-hil has joined #ruby-lang
<erikh> is it 128 or 127 that's backspace?
* erikh can't remember
Carnage\ has quit []
Madis_ has quit [Ping timeout: 248 seconds]
r1s1ng-ph03n1x has quit [Quit: gone fishing]
<rhizmoe> probably 127 since 128 would have been off the end of 8-bit ASCII
* rhizmoe doesn't actually know
<erikh> no, you're probably right
<erikh> 7 bit ascii though
<erikh> 8 bit is when it gets super-fun
beiter has joined #ruby-lang
beiter has quit [Client Quit]
<erikh> (facetiously)
Criztian has quit [Remote host closed the connection]
<eam> bs is 8, del is 127
<erikh> ah
<erikh> thank you!
<eam> :)
<erikh> heh, true story, I used to write this stupid macros for telemate that would spit out animations that worked as signatures on WWIV board posts
<erikh> they were horribly obnoxious, especially if you were on 2400bps or less
<erikh> but I was 14.
<eam> sweet
<erikh> yeah it was like spinning cursors that would spell out my name and shit
<eam> erikh: btw, stty raw; xxd (then type the normally unprintables you're wondering about)
<erikh> ah, yeah
<eam> if you get the terminal out of cooked mode you can see everything
<eam> (and good luck getting it back)
justinmcp has joined #ruby-lang
<erikh> ^V would probably work too
<eam> yeah
<eam> even smarter :)
justinmcp has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
listrophy has joined #ruby-lang
jtoy has quit [Quit: jtoy]
<listrophy> is installing from apt-get really the best way to install ruby on ubuntu?
<erikh> it's the polar opposite of best
<listrophy> erikh: that's what i figured, but i can't find a good doc on how best to do it
<erikh> ... but it largely depends on what you want to do. it gets the job done if you don't need it for anything important
<erikh> depends; is this a server or a desktop machine?
<listrophy> yeah, i use ruby *a lot*
<wnd> I use rvm as a luser on debian
<listrophy> i'm trying to setup a different vagrant vm for each ruby project i've got
<erikh> just one ruby or many?
<listrophy> standard puppet manifest installs ruby via apt-get. knowing this was bad, i went with it anyway. wow... should not have done that :P
<listrophy> probably just one ruby per vm
<listrophy> but apt-get fubars permissions
sepp2k has quit [Remote host closed the connection]
<erikh> I'd probably use ruby-build and stuff it in /opt so it's out of ubuntu's way
<erikh> done that at a few places now for servers and it works well enough -- and is what chef does these days by default.
<listrophy> i may just use rvm
thone_ has quit [Ping timeout: 246 seconds]
<erikh> rvm has a lot of dependencies on shell environments, etc, that can be tricky to organize for automation
<erikh> ruby-build is just "build ruby for me and stuff it here"
thone has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
gsav_ has quit [Ping timeout: 260 seconds]
pygmael has quit [Quit: pygmael]
spectra has quit [Ping timeout: 250 seconds]
jperry2_ has quit [Quit: jperry2_]
spectra has joined #ruby-lang
m3nd3s has joined #ruby-lang
CarlB_the_great has quit [Remote host closed the connection]
deryl has joined #ruby-lang
jamjam has quit [Ping timeout: 256 seconds]
rtl_ has quit [Ping timeout: 240 seconds]
BMF has quit [Remote host closed the connection]
havenn has joined #ruby-lang
sailias has joined #ruby-lang
<listrophy> erikh: thanks for the help. i'm probably gonna use rbenv with ruby-build
mistym has quit [Remote host closed the connection]
drollwit has joined #ruby-lang
jperry2_ has joined #ruby-lang
<erikh> honestly, if you can avoid rbenv and just use ruby build, you'll save yourself a lot of hassle.
<erikh> if you don't need to switch rubies, you won't need rbenv
cdt has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
benanne has quit [Ping timeout: 260 seconds]
cdt has quit [Client Quit]
jperry2_ has quit [Quit: jperry2_]
sailias has quit [Quit: Leaving.]
<soahccc> Is there a way to get the next key value pair in a Hash#each block?
Dreamer3 has quit [Quit: Computer has gone to sleep.]
rtl has joined #ruby-lang
benanne has joined #ruby-lang
<soahccc> Arr got it... Looked at the damn Enumerator class :/
benanne has quit [Client Quit]
justinmcp has joined #ruby-lang
Dreamer3 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<andrewvos> wow, I really need to block Hacker News in my hosts file
coryf has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
sailias has joined #ruby-lang
datanoise has joined #ruby-lang
kjr has quit [Quit: kjr]
kjr has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
sailias has quit [Quit: Leaving.]
m3nd3s_ has joined #ruby-lang
<erikh> andrewvos: I don't read it at all, I just wait for people to complain about the interesting ones on twitter
woollyams has joined #ruby-lang
m3nd3s has quit [Ping timeout: 260 seconds]
elux has joined #ruby-lang
wyhaines has joined #ruby-lang
wnd has quit [Ping timeout: 260 seconds]
__butch__ has joined #ruby-lang
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
chendo_ has joined #ruby-lang
KA_ has joined #ruby-lang
wnd has joined #ruby-lang
VegetableSpoon has joined #ruby-lang
justinseiter has quit [Remote host closed the connection]
coryf has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
BMF has joined #ruby-lang
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
wyhaines has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
KA_ has quit [Client Quit]
My_Hearing has quit [Ping timeout: 246 seconds]
My_Hearing has joined #ruby-lang
mrsolo has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
sent-hil has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
facest has joined #ruby-lang
faces has quit [Ping timeout: 260 seconds]
drbrain has quit [Ping timeout: 256 seconds]
drbrain has joined #ruby-lang
chendo__ has quit [Ping timeout: 255 seconds]
ricardov_ has joined #ruby-lang
ricardovaleriano has quit [Ping timeout: 256 seconds]
chendo_ has joined #ruby-lang
tenderlove has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
__butch__ has quit [Quit: Leaving.]
outoftime has quit [Quit: Leaving]
bfreeman has quit [Quit: bfreeman]
ricardov_ has quit [Remote host closed the connection]