madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
towski_ has quit [Remote host closed the connection]
tridge has quit [Ping timeout: 265 seconds]
achiu1 is now known as achiu
blazes816 has quit [Quit: blazes816]
methods has left #ruby-lang [#ruby-lang]
dalekurt has quit [Quit: Zzz...]
havenn has quit [Read error: Connection reset by peer]
<foucist>
hey folks.. if i'm using the Hash.new{ |h,k| h[k] = Hash.new(&h.default_proc) } trick, i can't use the (x ||= [ ]) << y pattern with that since || = [] won't work with that auto hash heh
<foucist>
any idea about preventing those extra empty hashes? heh
kurko_ has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
<foucist>
hrm, i guess i could just create a hash and give it to the sub
<foucist>
erm, no
towski has quit [Remote host closed the connection]
swarley has joined #ruby-lang
imperator has quit [Quit: Valete!]
marcury has joined #ruby-lang
gsav_ has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
<foucist>
got it :) just need a sub.default = nil to cancel the proc
kurko_ has quit [Quit: Computer has gone to sleep.]
EvilJStoker_ has joined #ruby-lang
kurko_ has joined #ruby-lang
dalekurt has joined #ruby-lang
richardjortega has joined #ruby-lang
<richardjortega>
hello
davidbalbert is now known as davidbalber|away
Elico has joined #ruby-lang
faustman has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
chendo has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby-lang
marcury has quit [Ping timeout: 265 seconds]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
catepillar has quit [Read error: Connection reset by peer]
BigO has joined #ruby-lang
chendo_ has quit [Ping timeout: 265 seconds]
chendo_ has joined #ruby-lang
bluepojo has quit [Ping timeout: 265 seconds]
EvilJStoker_ is now known as EvilJStoker
catepillar has joined #ruby-lang
chendo_ has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
sush24_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 265 seconds]
key has joined #ruby-lang
BigO has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
ryanlecompte has joined #ruby-lang
elight has joined #ruby-lang
elight has quit [Remote host closed the connection]
swarley has quit [Ping timeout: 264 seconds]
kurko_ has quit [Ping timeout: 265 seconds]
kurko_ has joined #ruby-lang
TwinkleHood has joined #ruby-lang
<TwinkleHood>
Evening lovely rubyfolk
kurko_ has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
<CrazyHorse18>
damn
<CrazyHorse18>
google was too quick.. sorry guys
<CrazyHorse18>
was trying to work out how to set instance variables in side an instance
<CrazyHorse18>
inside*
<CrazyHorse18>
for a test
<CrazyHorse18>
instance_eval
sepp2k1 has quit [Remote host closed the connection]
krohrbaugh has quit [Quit: Leaving.]
<CrazyHorse18>
hmmm peoples say adding an accessor and using stubs is better
TwinkleHood has quit [Quit: Ex-Chat]
charliesome has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
rohit_ has joined #ruby-lang
greg- has quit [Quit: greg-]
sn0wb1rd has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
cardoni has joined #ruby-lang
tockitj_ has quit [Remote host closed the connection]
rohit_ has quit [Quit: Leaving]
UC has quit []
rohit has joined #ruby-lang
rohit has quit [Read error: Connection reset by peer]
towski has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
mistym has quit [Remote host closed the connection]
ryanf_ has joined #ruby-lang
ryanf has quit [Ping timeout: 255 seconds]
<foucist>
anyone have an idea on how to sort an ordered hash by keys, given an array of keys in expected order? order = ["foo", "bar"] hash = {"bar" => "blah", "foo" => "bleh"}
<foucist>
er nm, that's dumb, i can just use the index value
towski has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
ryanf_ has quit [Quit: broken pipes |||]
crackit__ has joined #ruby-lang
crackit__ has quit [Client Quit]
ryanf has joined #ruby-lang
sush24_ has quit [Quit: This computer has gone to sleep]
rohit has joined #ruby-lang
tonni_ has quit [Remote host closed the connection]
ryanlecompte has quit [Remote host closed the connection]
tridge has joined #ruby-lang
seydar has joined #ruby-lang
<seydar>
Mon_Ouie: ping
nitty has joined #ruby-lang
tridge_ has quit [Ping timeout: 265 seconds]
nitty has quit [Ping timeout: 248 seconds]
seydar has quit [Quit: leaving]
marcury has joined #ruby-lang
nitty has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
sush24_ has joined #ruby-lang
towski has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
key has quit [Remote host closed the connection]
key has joined #ruby-lang
gregmor__ has quit [Remote host closed the connection]
marcury has quit [Ping timeout: 256 seconds]
towski has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
rohit has quit [Ping timeout: 260 seconds]
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
cardoni has quit [Quit: cardoni]
datanoise has joined #ruby-lang
kentos has quit [Ping timeout: 264 seconds]
nitty has quit [Quit: Leaving]
datanoise has quit [Ping timeout: 250 seconds]
Nisstyre has joined #ruby-lang
davidbalber|away is now known as davidbalbert
<rue>
CrazyHorse18: #instance_variable_set
rippa has joined #ruby-lang
jsilver has joined #ruby-lang
ryanlecompte has joined #ruby-lang
kentos has joined #ruby-lang
davidbalbert is now known as davidbalber|away
ebouchut_ has joined #ruby-lang
ebouchut_ has quit [Client Quit]
ryanlecompte has quit [Ping timeout: 256 seconds]
tridge has quit [Remote host closed the connection]
sush24_ has quit [Ping timeout: 265 seconds]
rekky has joined #ruby-lang
sush24_ has joined #ruby-lang
gsav_ has quit [Read error: Connection reset by peer]
<CrazyHorse18>
is there anything like try
<CrazyHorse18>
so if i have try(somethign).whatever.whatever.whatever
<CrazyHorse18>
that will return nil the first time it doesn't evaluate
<CrazyHorse18>
rather than having to go try(:something).try(:whatever)
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
<erikh>
it generates a recording object that just records all calls against it and returns or yields ... another recording object
<erikh>
then you can replay it against an actual object
<erikh>
the code should be able to track call ordering too if you use an array instead of a hash for the tracing
<ryanf>
erikh: cool
<erikh>
for my needs the hash works
<erikh>
but it shouldn't be too hard to modify
<erikh>
bonus: you can marshal the recording
<erikh>
(which is actually what I do with it)
<ryanf>
oh, that's pretty neat. I was contemplating use cases but didn't think of that one
<erikh>
well in my case, vagrant isn't flexible enough to work without a vagrantfile
cardoni has joined #ruby-lang
<erikh>
and I'll spare you a lot of ranting and just say after a lot of attempts to do it other ways, including pull requests, this solved my problem
<erikh>
so I marshal it, template it into a vagrantfile that does nothing but evaluate it against the config object that vagrant gives you in there
<erikh>
and.. voila. dynamic jails.
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 260 seconds]
<TTilus>
i remember using the same kind of approach when i needed to postpone starting of a scheduler (or something like that) which had conf bricked together with start
<TTilus>
passed a proxy to configurator and replayed the result later
<erikh>
it was fun to write
<erikh>
pretty rare that I can justify overly clever code like that
<banisterfiend>
chris2: there is no top-level unpack method afaik ?
<chris2>
so?
vlad_starkov has joined #ruby-lang
<apeiros_>
banisterfiend: I think he expects pry to search all classes/modules for a method named 'unpack'
<apeiros_>
similar to ri
<apeiros_>
personally I'd like it if it did search and showed where unpack is available as a method, and asks to specify which one
<banisterfiend>
ah, ? and $ dont work like that, they operate on live objects, and they grab the source/docs on demand. This has the benefit that you dont' need to pregenerate docs for classes/methods in advance, but i guess the disadvantage that we dont have a database to search the way you'd like
<chris2>
the whole point of using google is that i can be unspecific ad still find stuff
<banisterfiend>
chris2: ^
<chris2>
ok
<banisterfiend>
chris2: it also means that pry docs/source are always 'live' so you can modify teh docs/code at runtime, and pry always gives you the current one
<apeiros_>
GAWD
<apeiros_>
I hate that they removed Kernel#y
<apeiros_>
did Kernel#y print to $stdout or $stderr?
<banisterfiend>
apeiros_: and if you did, for example ? to_s
<banisterfiend>
apeiros_: it would search through every single objects to_s method :P
<apeiros_>
banisterfiend: that'd probably give a shitload of methods back :)
<banisterfiend>
yeah..
<apeiros_>
banisterfiend: nah, for unspecified method names, I'd go with instance_methods only
<chris2>
does j still exist?
<chris2>
yep
<apeiros_>
banisterfiend: possibly even public_instance_methods
vlad_starkov has quit [Remote host closed the connection]
<seydar>
ok, i kinda got it
<seydar>
moving to #linux
leopard_me has joined #ruby-lang
CrazyHorse18 has quit [Ping timeout: 260 seconds]
marcury has quit [Ping timeout: 246 seconds]
davidbalbert is now known as davidbalber|away
amaya_the has quit [Quit: ChatZilla 0.9.88.2 [Firefox 17.0.1/20121128204232]]
vlad_starkov has joined #ruby-lang
klaut has quit [Remote host closed the connection]
<foucist>
when the heck did #ruby become a ruby lang channel?
<apeiros_>
foucist: 9y ago?
<foucist>
apeiros_: you lie, when i first started learning ruby/rails in 2006/2007, there was only this channel.. the #ruby channel was empty or for something else
<apeiros_>
your memory sucks then
<apeiros_>
16:45 ChanServ: Registered : Feb 05 15:20:56 2003 (9 years, 43 weeks, 1 day, 00:24:27 ago)
<foucist>
i had to come here for all my ruby help
<apeiros_>
that's what chanserv says
<yxhuvud>
it may have been dead in the meanwhile though
<foucist>
apeiros_: sure, but who says it was a ruby lang channel back then? ;)
<apeiros_>
and I've been on #ruby for well over 6y now
<rue>
It was empty, because it had the proper /topic
<foucist>
rue: which was?
<rue>
There were ~10 people in there
* yxhuvud
remember the good old time when there was 40 people in here ..
davidbalber|away is now known as davidbalbert
jxie has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
marcury has joined #ruby-lang
havenn has joined #ruby-lang
chimkan has quit [Quit: chimkan]
davidbalbert is now known as davidbalber|away
robotmay has joined #ruby-lang
sj26 has quit [Ping timeout: 246 seconds]
anekos has quit [Ping timeout: 256 seconds]
shachaf has quit [Ping timeout: 248 seconds]
shachaf has joined #ruby-lang
anekos has joined #ruby-lang
sj26 has joined #ruby-lang
kain is now known as kain___
kain___ is now known as kain
replore has quit [Remote host closed the connection]
gregmoreno has quit [Remote host closed the connection]
norc has joined #ruby-lang
<norc>
http://pastie.org/5463326 - I'm using this quick dirty script for my utserver, to automatically unrar stuff and clean it up. Basically a process is forced, and that script is executed. Now can anyone explain to me, why that script would suddenly start listening on specific ports?
<norc>
It's just completely beyond me, what this has to do with TCP/UDP ports.
<norc>
(And ignore the chdir in the beginning, I have too much of a headache to actually figure out how to make Ruby play nicely in Debian)
<foucist>
norc: the inotify stuff listens on a socket
<foucist>
well, suppose it must be listening on the port too
<norc>
Why does it do that?
chimkan has joined #ruby-lang
<norc>
And why does it actually try to listen to the exact same process, that it's original parent process is listening to?
kurko_ has quit [Ping timeout: 265 seconds]
<foucist>
no idea, and i'm just guessing about the culprit
<norc>
Well it just makes no sense.
<norc>
As far as I understand it, inotify comes from syscalls directly.
replore_ has quit [Remote host closed the connection]
<foucist>
yep that's what i see too
<norc>
Basically what happened was, I restarted the server - but the server couldn't listen to the port because it was already in use. But accessing that service resulted in a timeout - after a minute I figured out that all instances of my ruby script (pastie), were actually listening to hit.
<norc>
This gives me a headache.
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
kurko_ has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
ruby-lang219 has joined #ruby-lang
s1n4 has quit [Quit: leaving]
<norc>
Ok. After thinking about this, it has nothing to do with the script itself I believe.
<norc>
It must have something to do with the process that invokes these scripts to begin with.
<foucist>
yay, progress!
<norc>
well, there's just no conceivable reason why it should magically twiddle with sockets based on another processes sockets.
chimkan has quit [Quit: chimkan]
seydar has quit [Quit: leaving]
<ruby-lang219>
ruby n00b and have a question about how to capture the response from an external API post
havenn has joined #ruby-lang
<ruby-lang219>
it uses HTTParty
<ruby-lang219>
and if I run it in the rails console I get a response, but how to I capture that when running in the app ? ( from the model )
sent-hil has joined #ruby-lang
gaveen is now known as SkyEye
<firefux>
you mean rails noob that doesn't know ruby?
<ruby-lang219>
the API docs says its returns an Returns a HTTParty::Response object
replore_ has joined #ruby-lang
<ruby-lang219>
@firefux yeah basically lol
SkyEye is now known as gaveen
<firefux>
ruby-lang219: there's a rubyonrails channel
<Spaceghostc2c>
Most rails people in there don't know ruby. It's depressing.
<ruby-lang219>
seemed more like a basic ruby thing, how do I inspect what a method returned ?
thomas3487 has joined #ruby-lang
<firefux>
ruby-lang219: by learning a little ruby
gregmoreno has joined #ruby-lang
<firefux>
Spaceghostc2c: then he'll probably get along fine there ;)
<Spaceghostc2c>
Lol. :(
yats has quit [Ping timeout: 260 seconds]
<norc>
Ok fine. No idea what is happening here, but I have a feeling that utserver does some weird magic. Forking it off inside Ruby solves all my problems.
* norc
ponders whether he should invest the time to actually understand whats going on in some closed source nonsense
thomasd324 has joined #ruby-lang
thomasd324 has quit [Client Quit]
<ruby-lang219>
on the console it puts the response to STDOUT, how do I capture/inspect that when running inside the app ?
<Mon_Ouie>
I think it's because of the c.history[-1] = c.line if c.history.size != 0
<Mon_Ouie>
Oh, he's not here anymore
gregmoreno has quit [Ping timeout: 256 seconds]
slyphon has quit [Ping timeout: 245 seconds]
chimkan_ has joined #ruby-lang
ruby-lang219 has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby-lang
methods has joined #ruby-lang
stardiviner has joined #ruby-lang
j0rg has joined #ruby-lang
mistym has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
chimkan___ has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 246 seconds]
chimkan_ has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby-lang
marcury has joined #ruby-lang
macmartine has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
headius has quit [Quit: headius]
dalekurt has quit [Quit: Zzz...]
havenn has quit [Remote host closed the connection]
thomas3487 has quit [Remote host closed the connection]
dalekurt has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
nertzy has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
adambeynon has joined #ruby-lang
methods1 has joined #ruby-lang
methods has quit [Read error: Connection reset by peer]
swarley has joined #ruby-lang
gokul has joined #ruby-lang
nertzy has quit [Quit: Leaving]
<zzak>
i read somewhere apple is gonna start producing their own cpus
gregmore_ has joined #ruby-lang
<zzak>
well, they already do, right? for the a6 or whatever
<zzak>
but making them for laptops, etc
davidbalbert is now known as davidbalber|away
<foucist>
zzak: well they were kind of making their own cpus before, or had agreements anyways before switching to intel
<foucist>
well that'd be funny if they switched away again
gregmore_ has quit [Remote host closed the connection]
<zzak>
think they will still support intel x86?
key has left #ruby-lang ["..."]
gokul has quit [Quit: Leaving]
chimkan___ has quit [Quit: chimkan___]
<zzak>
thankfully i think ARM support has come a long ways compared to ppc of the olden days
havenn has joined #ruby-lang
seanstickle has joined #ruby-lang
Elico has quit [Ping timeout: 264 seconds]
<imperator>
do they have any relationship at all with motorola any more?
kurko_ has quit [Quit: Computer has gone to sleep.]
<zzak>
i read on the a6x wiki page it's made by samsung, other than that idk
Quatrerwin has quit [Remote host closed the connection]
<zzak>
well, manufactured
marcury has quit [Ping timeout: 256 seconds]
afgeneralist has joined #ruby-lang
<afgeneralist>
Hey all. I'm getting an eventmachine error when I do a 'bundle install'. Anyone familiar with this error?
jsilver has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
slaytanic has joined #ruby-lang
jsilver has quit [Ping timeout: 246 seconds]
<foucist>
did you google it? :P
<afgeneralist>
Indeed.
<afgeneralist>
I tried installing CLine tools in Xcode. Updating RVM, which I did.
<imperator>
rvm...
<afgeneralist>
The last recommendation, which I didn't do, was using 1.9.2 instead of 1.9.3. But before I did that I wanted to see if others would validate the same in IRC
wallerdev has joined #ruby-lang
brianpWins has quit [Ping timeout: 252 seconds]
s1n4 has joined #ruby-lang
faustman has quit [Ping timeout: 260 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
chimkan_ has joined #ruby-lang
marcury has joined #ruby-lang
nertzy has joined #ruby-lang
nertzy has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
burgestrand1 has joined #ruby-lang
klaut has quit [Remote host closed the connection]
chimkan_ has quit [Client Quit]
cirenyc has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<afgeneralist>
burgestrand: right, but in order for those to work properly I need to install the GCC first, and then Xcode and CLT on top of it. So that's what I'm trying right now
lsegal has joined #ruby-lang
chimkan has quit [Quit: chimkan]
<burgestrand>
afgeneralist: I’m confused.
<afgeneralist>
Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.
<afgeneralist>
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
<afgeneralist>
I wasn't doing a good job explaining
<burgestrand>
afgeneralist: you can avoid osx-gcc-installer if you: install a recent xcode, command line tools, and then gcc from homebrew dupes.
<burgestrand>
Anyhow, need to go. Good luck.
jackhammer2022 has joined #ruby-lang
<afgeneralist>
I had the most recent version of xcode and clt install. I then installed homebrew dupes and no luck.
<afgeneralist>
Thanks!
marcury has quit [Ping timeout: 265 seconds]
shtirlic has joined #ruby-lang
chimkan has joined #ruby-lang
afgeneralist has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
chimkan has quit [Quit: chimkan]
jMCg has quit [Ping timeout: 260 seconds]
sent-hil has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 246 seconds]