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
<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?
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
<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]
<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]
<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]
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]