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
<Harzilein> (well, i could, but that would just be another conversion roundtrip where they do not intend to preserve everything)
<erikh> is this format a specification?
<erikh> I mean, do they have a commitment to not changing it?
<Harzilein> still, the part of annotating the string is not what i'm asking for
<Harzilein> erikh: no
<Harzilein> the part of splitting it from some input array is
<Harzilein> s/input/range/
<erikh> yeah. dude, if you want to shoot your foot off, I can't stop you, but you're going to.
KA_ has joined #ruby-lang
<Harzilein> let me, it's just so that i can keep some sanity when the people doing the meetings where they define the features use google docs of all things to write down the results
nitti has quit [Ping timeout: 240 seconds]
mrsolo has quit [Quit: Leaving]
<Harzilein> so any hint on the values_at-like splitting?
robbyoconnor has quit [Ping timeout: 268 seconds]
<freedrull> anything look wrong with this? i tested my credientals with curl and it worked ok. i'm getting the end of file reached error https://gist.github.com/4082562
milesforrest|afk is now known as milesforrest
horsey has quit [Ping timeout: 268 seconds]
milesforrest has left #ruby-lang [#ruby-lang]
saxy has quit [Remote host closed the connection]
fsvehla has quit [Quit: fsvehla]
pkrnj has joined #ruby-lang
mistym has quit [Remote host closed the connection]
R_Macy has joined #ruby-lang
<Harzilein> oh, nvm, it's easy
<freedrull> seems request.oauth! adds oauth_body_hash to the 'Authorization' header, which gives me a 401 from twitter
chendo_ has quit [Quit: Computer has gone to sleep.]
gaveen has quit [Remote host closed the connection]
<drbrain> freedrull: if you're getting EOF with read_status_line the remote is hanging up right after you finish the request
<Harzilein> irb(main):003:0> class String ; def values_at(*args) args.map do |r| self[r] end end end ; "foo\nbar\baz".values_at(0..2,3..11)
<Harzilein> => ["foo", "\nbar\baz"]
<Harzilein> :)
<drbrain> oh, try this: Net::HTTP.start(uri.host, uri.port, use_ssl: true) ...
KA_ has quit [Quit: KA_]
<drbrain> better, use_ssl: uri.scheme == 'https'
<freedrull> drbrain: oh, perfect
dpatel has joined #ruby-lang
<freedrull> phew
Dan- has quit [Quit: Linkinus - http://linkinus.com]
datanoise has joined #ruby-lang
havenn has quit [Ping timeout: 240 seconds]
kurko_ has joined #ruby-lang
qwerxy has quit [Quit: offski]
chendo_ has joined #ruby-lang
KA_ has joined #ruby-lang
pkrnj has quit [Quit: Computer has gone to sleep.]
chendo_ has quit [Quit: Computer has gone to sleep.]
ddd has quit [Ping timeout: 245 seconds]
KA_ has quit [Quit: KA_]
havenn has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
saxy has joined #ruby-lang
Croms has quit [Quit: Croms]
Croms has joined #ruby-lang
KA_ has joined #ruby-lang
saxy has quit [Remote host closed the connection]
cinch has quit [Ping timeout: 248 seconds]
saxy has joined #ruby-lang
cinch has joined #ruby-lang
R_Macy has quit []
nitti has joined #ruby-lang
ddd has joined #ruby-lang
dalekurt has joined #ruby-lang
nitti has quit [Ping timeout: 252 seconds]
brianpWins has quit [Quit: brianpWins]
datanoise has quit [Ping timeout: 255 seconds]
havenn has quit [Ping timeout: 246 seconds]
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
thone has joined #ruby-lang
havenn has joined #ruby-lang
thone_ has quit [Ping timeout: 260 seconds]
zoo-zed has joined #ruby-lang
zoo-zed has quit [Client Quit]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
intellitech has joined #ruby-lang
thinkdevcode has joined #ruby-lang
KA_ has quit [Quit: KA_]
aetcore has quit [Remote host closed the connection]
aetcore has joined #ruby-lang
senekis has joined #ruby-lang
aetcore has quit [Client Quit]
aetcore has joined #ruby-lang
pkrnj has joined #ruby-lang
jxie has quit [Read error: Operation timed out]
methods has joined #ruby-lang
datanoise has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
mpan has joined #ruby-lang
ryanf has joined #ruby-lang
kentos has joined #ruby-lang
toretore has quit [Quit: Leaving]
datanoise has quit [Ping timeout: 276 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
pkrnj has joined #ruby-lang
savage- has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
ryanf has quit [Quit: leaving]
strust has joined #ruby-lang
KA_ has joined #ruby-lang
pkrnj has quit [Quit: Computer has gone to sleep.]
pkrnj has joined #ruby-lang
nitti has joined #ruby-lang
mpan has quit [Read error: Connection reset by peer]
mpan has joined #ruby-lang
ryanf has joined #ruby-lang
nitti has quit [Ping timeout: 264 seconds]
mpan has quit [Client Quit]
KA__ has joined #ruby-lang
KA__ has quit [Read error: Connection reset by peer]
KA_ has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
chimkan has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 260 seconds]
chimkan has joined #ruby-lang
KA_ has joined #ruby-lang
saxy has joined #ruby-lang
gix has joined #ruby-lang
KA_ has quit [Ping timeout: 246 seconds]
areil has joined #ruby-lang
datanoise has quit [Ping timeout: 265 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
dpatel has quit [Quit: dpatel]
bluepojo has quit [Ping timeout: 246 seconds]
KA_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
KA_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
chimkan has quit [Read error: Connection reset by peer]
dalekurt has joined #ruby-lang
chimkan has joined #ruby-lang
KA_ has quit [Ping timeout: 260 seconds]
ryanf has quit [Quit: leaving]
ryanf_ has joined #ruby-lang
krz has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
havenn has quit [Ping timeout: 240 seconds]
nitti has joined #ruby-lang
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
nitti has quit [Ping timeout: 260 seconds]
gix has quit [Ping timeout: 268 seconds]
havenn has joined #ruby-lang
saxy has quit [Ping timeout: 256 seconds]
gix has joined #ruby-lang
ryanf_ has quit [Quit: broken pipes |||]
dalekurt has quit [Quit: Zzz...]
dalekurt has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
Aria has joined #ruby-lang
saxy has joined #ruby-lang
fireglow has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
ryanf has joined #ruby-lang
ryanlecompte has joined #ruby-lang
<zzak> drbrain stop breaking the build
KA_ has joined #ruby-lang
<Spaceghostc2c> ^
saxy has quit [Ping timeout: 246 seconds]
rebelcan has quit [Quit: leaving]
fireglow has joined #ruby-lang
chimkan has quit [Quit: chimkan]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<zzak> hahaha
<zzak> nice beatles quote
slaytanic has quit [Quit: mmmb0p.]
slaytanic has joined #ruby-lang
ryanf has quit [Quit: broken pipes |||]
slaytanic has quit [Quit: Changing server]
slaytanic has joined #ruby-lang
nitti has joined #ruby-lang
nitti has quit [Ping timeout: 240 seconds]
saxy has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
<drbrain> seems building ruby outside $(srcdir) is broken
<drbrain> mkdir ~/tmp/build; cd ~/tmp/build; path/to/ruby/configure; make
swarley has quit [Read error: Operation timed out]
swarley has joined #ruby-lang
kurko_ has joined #ruby-lang
saxy has quit [Ping timeout: 260 seconds]
havenn has quit [Ping timeout: 246 seconds]
rekky has joined #ruby-lang
<zzak> why did you do that?
havenn has joined #ruby-lang
<drbrain> you're supposed to, but I've never done it before
<drbrain> many committers work this way
<drbrain> it allows you to rm build and continue on as if nothing happened
<zzak> i never build, just rdoc really
lucas has quit [Ping timeout: 256 seconds]
<zzak> there is make clean, too right?
lucas has joined #ruby-lang
<drbrain> yeah
kurko_ has quit [Quit: Computer has gone to sleep.]
senekis_ has joined #ruby-lang
senekis has quit [Ping timeout: 255 seconds]
saxy has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
saxy has quit [Ping timeout: 246 seconds]
r0bby has joined #ruby-lang
rekky has quit [Quit: rekky]
BigO has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 265 seconds]
Aria has quit [Remote host closed the connection]
nitti has joined #ruby-lang
areil_ has joined #ruby-lang
areil_ has quit [Client Quit]
levifig has quit [Ping timeout: 268 seconds]
areil_ has joined #ruby-lang
areil_ has quit [Client Quit]
hagabaka has quit [Read error: Connection reset by peer]
hagabaka has joined #ruby-lang
thebastl has quit [Ping timeout: 268 seconds]
areil has quit [Ping timeout: 246 seconds]
senekis_ has quit [Read error: Connection reset by peer]
nitti has quit [Ping timeout: 252 seconds]
havenn has quit [Read error: Connection reset by peer]
bastl has joined #ruby-lang
havenn has joined #ruby-lang
levifig has joined #ruby-lang
saxy has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
BigO_ has joined #ruby-lang
BigO has quit [Ping timeout: 268 seconds]
havenn has quit [Ping timeout: 260 seconds]
saxy has quit [Ping timeout: 260 seconds]
intellitech has quit [Quit: Leaving]
xyzodiac has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
RantriX has joined #ruby-lang
xyzodiac has joined #ruby-lang
saxy has joined #ruby-lang
r0bby is now known as robbyoconnor
xyzodiac has quit [Client Quit]
mistym has quit [Remote host closed the connection]
swarley has quit [Ping timeout: 248 seconds]
Glass_saga has quit [Ping timeout: 256 seconds]
Glass_saga has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
ninp0 has joined #ruby-lang
lun_ has joined #ruby-lang
nitti has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
lun__ has quit [Ping timeout: 246 seconds]
VGoff is now known as VGoff_afk
slyphon has quit [Ping timeout: 245 seconds]
andrewhl has joined #ruby-lang
nitti has quit [Ping timeout: 264 seconds]
kitallis has joined #ruby-lang
work has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
saxy has joined #ruby-lang
yxhuvud has joined #ruby-lang
saxy has quit [Ping timeout: 240 seconds]
cschwartz has joined #ruby-lang
dc5ala has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
dhruvasagar has joined #ruby-lang
tallship has joined #ruby-lang
areil has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
cschwartz has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby-lang
saxy has joined #ruby-lang
Darkspiel has joined #ruby-lang
fidelis has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
hinbody has quit [Ping timeout: 240 seconds]
ezkl has joined #ruby-lang
saxy has quit [Ping timeout: 260 seconds]
ezkl has quit [Changing host]
ezkl has joined #ruby-lang
VGoff_afk is now known as VGoff
work has left #ruby-lang [#ruby-lang]
guest__ has joined #ruby-lang
iCharlie has joined #ruby-lang
fidelis has quit [Quit: Saindo]
bluepojo has joined #ruby-lang
tbuehlmann has joined #ruby-lang
hinbody has joined #ruby-lang
<ttilley> shit.
<ttilley> i have like 323MB of fibers
<ttilley> ...how in the hell am i going to trace a leak of fibers
<ttilley> digging through the cooperative scheduling speghetti is going to be the end of me
<ttilley> ; ;
beckettsfool has quit [Quit: This computer has gone to sleep]
saxy has joined #ruby-lang
charliesome has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
svyatov has joined #ruby-lang
Carnage\ has quit []
lun__ has joined #ruby-lang
lun_ has quit [Ping timeout: 265 seconds]
saxy has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Remote host closed the connection]
BigO has joined #ruby-lang
solars has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
BigO_ has quit [Ping timeout: 255 seconds]
BigO has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
mporter has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
shtirlic has joined #ruby-lang
KA_ has quit [Quit: KA_]
thinkdevcode has quit [Remote host closed the connection]
saxy has joined #ruby-lang
workmad3 has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<DefV> /2
nitti has joined #ruby-lang
brianpWins has joined #ruby-lang
tonni has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 240 seconds]
rue|w has joined #ruby-lang
saxy has quit [Ping timeout: 248 seconds]
mporter has quit [Quit: This computer has gone to sleep]
cschwartz has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
tenderlove has quit [Remote host closed the connection]
tonni has joined #ruby-lang
rohit has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
cschwartz has quit [Quit: Lost terminal]
krz has quit [Ping timeout: 264 seconds]
krz has joined #ruby-lang
dhruvasagar has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
rohit has quit [Quit: Leaving]
qwerxy has joined #ruby-lang
saxy has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
leopard_me has joined #ruby-lang
ryanlecompte has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 260 seconds]
RantriX has quit [Remote host closed the connection]
<TTilus> ttilley: maybe throw a wild guess and trace enumerators?
Mon_Ouie has quit [Ping timeout: 246 seconds]
saxy has quit [Ping timeout: 252 seconds]
<ttilley> TTilus: i was going to write some C code to dump the instruction sequence associated with each fiber's proc structure and script string analysis to determine the most common pattern of instructions and go from there
<ttilley> which essentially means i need to sleep and reboot my brain
<ttilley> because it didn't seem that crazy when i first thought of it
<TTilus> ttilley: or somehow tag fibers on creation and snapshot fibers on some point and try to start from there
<TTilus> ttilley: you definitely need some sleep :)
<ttilley> yeah. it's 3:45AM
tenderlove has joined #ruby-lang
<ttilley> TTilus: seriously though. 323M of fibers.
<ttilley> 24M of Proc objects
<ttilley> ...weird number
vlad_starkov has joined #ruby-lang
<yorickpeterse> Morning
<ttilley> 54M of RubyVM::Env
<ttilley> i don't even know where to find the frakking code for RubyVM::Env... it's definition in cont.c simply creates a subclass of Object and removes alloc
<ttilley> that tells me nothing :|
<ttilley> yorickpeterse: morning
vlad_sta_ has joined #ruby-lang
asaaki has joined #ruby-lang
<ttilley> whitequark: fucking sweet
vlad_starkov has quit [Ping timeout: 265 seconds]
<ttilley> so a ghetto binding with a pointer to an instruction sequence? makes sense
<ttilley> all 3 bloat at the same time... Fiber, Proc, and RubyVM::Env
<ttilley> just... need to track down the code represented by all these fibers
<TTilus> calls for sherlock
ryanf has quit [Quit: leaving]
* whitequark . o O ( if you love something, set a mark on it... if it doesn't trace to a GC root, hunt it down and sweep it. )
<whitequark> I know, I should make a garbage collector which prioritizes heap blocks based on love and empathy
qwerxy has quit [Quit: offski]
rolfb has joined #ruby-lang
stardiviner has joined #ruby-lang
<yorickpeterse> Call it the Love Hate Garbage Collector
<whitequark> yorickpeterse: exactly
<whitequark> the basic iteration would be forming triangles and then resolving them
schaerli has joined #ruby-lang
fsvehla has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
saxy has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
blacktulip has joined #ruby-lang
robotmay has joined #ruby-lang
<ttilley> ...i could duck punch Fiber.new to set an instance variable with the caller to get source path. then at some later point after the leak has presented itself, ObjectSpace.each_object(Fiber).map {|fiber| fiber.instance_variable_get("@source_location") }
saxy has quit [Ping timeout: 276 seconds]
<ttilley> that has to be my favorite term. "duck punch".
GarethAdams has joined #ruby-lang
<yorickpeterse> ttilley: are you sure you're not overthinking the problem?
<yorickpeterse> Isn't there a chance you're just creating fibers somewhere in a loop and that loop has a lot of iterations?
<ttilley> not in the slightest.
<ttilley> yorickpeterse: this process starts out at ~150M, grows to 2G after a few days, and eventually flips the fuck out (technical term)
<ttilley> yorickpeterse: i have pry-remote-em set up so that i can fire up a REPL on the running server process and poke at its state. while trying to figure out what's going on, i see there are now 101736 fibers taking up about 323M of memory.
<ttilley> yorickpeterse: and... not knowing what else to do, i'm going from there.
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<yorickpeterse> 150M base memory? What the fuck?
<yorickpeterse> What are you running, Redmine?
<ttilley> cloud_controller from cloud foundry.
<erikh> just jumping in here to remind you that irb on 1.9.3 takes 10M
<erikh> maybe less with a smaller gem corpus
<yorickpeterse> erikh: most apps will take around 10M
<erikh> trololololo
<yorickpeterse> Ruby's min itself is somewhere around 5 anyway
<erikh> well, maybe really small binstub bullshit
<erikh> but most of the rails apps I deal with in prod take > 250M
Averna1 has joined #ruby-lang
<yorickpeterse> Well yeah, but that's Rails
<ttilley> I can Gemfile.lock and it's 307 lines. Totally unimportant.
<yorickpeterse> herp derp we'll restart our app every 10 minutes
levifig has quit [*.net *.split]
svyatov has quit [*.net *.split]
bastl has quit [*.net *.split]
Averna has quit [*.net *.split]
akamike has quit [*.net *.split]
qpingu has quit [*.net *.split]
ohsix has quit [*.net *.split]
nick_h has quit [*.net *.split]
rking has quit [*.net *.split]
<ttilley> I don't care how bloated it is as long as it's not growing 2G every few days. >_>
shtirlic has quit [Remote host closed the connection]
<erikh> ttilley: yeah, 300+ line gem file
<erikh> that's probably an issue
<erikh> oh, the lock file
<erikh> I guess that's a little different.
<erikh> yorickpeterse: hasn't been an issue. most of my servers have >8G of ram and 4 cores
<yorickpeterse> ttilley: I take it you've been acking/grepping the code to see where it creates fibers?
<yorickpeterse> erikh: true, but there's a difference between "meh I'll throw RAM at it" and "Fuck this shit, it shouldn't have to use that much"
<erikh> eh
<ttilley> yorickpeterse: it's an EventMachine app using em-synchrony. it's creating a fibers up the fucking ass.
<yorickpeterse> ah
<erikh> around 13 years ago I worked on a mod_perl framework where people said the same thing
<ttilley> everything is a fucking fiber
<erikh> only the corpus was around 60M per fork
<erikh> not sure it's really an issue
<yorickpeterse> erikh: I believe that memory usage makes sense when you really have to use it. I however also believe it's bullshit for any medium web app to use 250MB of RAM
<erikh> there's significant time value in not having to care
<erikh> like, really significant.
<yorickpeterse> I'd rather do care about the things I'd have to maintain for more than a month or so :)
<yorickpeterse> Instead of sticking my head in the sand
<erikh> let me spell it out for you
RantriX has joined #ruby-lang
<erikh> you have 15 servers that cost $1.50/hr to run. a smaller server with less ram costs $1/hr to run.
<erikh> you have 8 developers on staff, getting paid $70-$100/hr
<yorickpeterse> ...70 USD per hour? What the shit?
<erikh> (each.)
<yorickpeterse> Where can I sign up?
<erikh> you apparently live in the wrong area.
<erikh> anyhow, not the point. even if they were getting paid $30/hr it wouldn't matter
<ttilley> yorickpeterse: use the backport of 2.0's copy-on-write safe GC, load all common code in a single process, fork your servers like mad, rub one out, and go home. seriously.
<erikh> do you really want to put 8 people at that rate spending their time saving $7/hr optimizing memory usage?
<erikh> if you have any brain for business, the answer is clearly no
<yorickpeterse> I'm still trying to wrap my head about full time employers (unless these are contractors) getting paid 70 USD per hour
<ttilley> aside: fgrep -r 'Fiber' . | wc -l => 348 (that's not even third-party code, where most of the fibers are being created)
beiter has joined #ruby-lang
<yorickpeterse> ttilley: hmm
<erikh> I do better than that, but I'm not doing rails
<erikh> I'm pretty sure our rails devs are getting paid around that though
Aiur has joined #ruby-lang
bastl has joined #ruby-lang
<erikh> anyhow, still not the point. for that business concern, optimizing for memory is pissing away money
<erikh> technically correct and business correct are usually conflicting goals.
Madis has joined #ruby-lang
levifig has joined #ruby-lang
<ttilley> so true
<ttilley> on a terrifying number of levels
<erikh> people are usually more expensive than hardware
qpingu has joined #ruby-lang
akamike has joined #ruby-lang
nick_h has joined #ruby-lang
ohsix has joined #ruby-lang
rking has joined #ruby-lang
<erikh> this has been the case as long as I have been in this business
<erikh> and I started when Bill Clinton was the US president.
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
<yorickpeterse> From a business point of view it makes sense but I still firmly believe it's a bad sign for an app to use so much unless it's truly doing something memory intensive
qwerxy has joined #ruby-lang
<yorickpeterse> To me it's a sign of incompetence/lack of interest from the original dev
<yorickpeterse> or des
<yorickpeterse> * devs
<yorickpeterse> Maybe for web apps it's a bit less of an issue since servers aren't that expensive. However, I'm pretty sure it won't work out on, say, desktops
cardoni has quit [Quit: cardoni]
<yorickpeterse> or any other type of environment where you as a developer aren't in control of the platform
saxy has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
<yorickpeterse> In case of a framework you're doing exactly that: writing code for an uncontrolled environment. When doing so you better make sure it's not some fat fuck that doesn't care about performance.
<erikh> eh
<erikh> I have 16GB on this laptop
<erikh> emphasis on laptop
<erikh> I have a test suite here that spins up 4 VMs to run one unit test
<erikh> one assertion.
<erikh> 1.5GB of ram or so
<erikh> memory is cheap.
<ttilley> i should write an object reference debugger that draws a 3D network map from TOPLEVEL_BINDING on down
<ttilley> you know
<ttilley> for giggles
<yorickpeterse> erikh: You have, others might not
<erikh> I worked on that years ago, but hit an interpreter bug
<yorickpeterse> That's the problem: you don't have control
<erikh> actually, with an in-house app, I do.
<yorickpeterse> With a server you do, with something you write for others you don't
robbyoconnor has joined #ruby-lang
<erikh> I don't write anything for others
<erikh> OSS included
<yorickpeterse> I'm not talking about you specifically
<yorickpeterse> Just the general mindset of "herp derp I don't care about my code's performance"
<erikh> that's not what I'm saying at all.
<ttilley> erikh: ruby 2.0 added a function that lets you cheat. rb_objspace_reachable_objects_from()
<ttilley> ...too bad i'm not on 2.0
<erikh> what I'm saying is that the time spent in making things memory efficient usually can be spent dealing with more important problems
<ttilley> still might be neat
<erikh> it's called premature optimization.
<ttilley> erikh: like arguments on IRC
<erikh> ttilley: yep
<ttilley> hehe
saxy has quit [Ping timeout: 252 seconds]
KA_ has quit [Quit: KA_]
<yorickpeterse> So while I'm at ranting, here's another thing I don't get: that strong parameter stuff going on with Rails
<yorickpeterse> What exactly is the issue with only explicitly passing the parameters that can be set in the first place?
<yorickpeterse> Instead of just ALL THE THINGS
<erikh> you remember when github got hacked?
<erikh> when someone started injecting random commits into the rails project?
<erikh> basically, they said the same thing to this guy named 'homakov'
<yorickpeterse> Yes, because they threw all the form data at the model
<erikh> and then he said, 'ok, I'll show you why this is a bad idea'
<yorickpeterse> Like I said, why not explicitly only pass that which is allowed to be set?
<erikh> so yeah.
akamike has quit [*.net *.split]
qpingu has quit [*.net *.split]
ohsix has quit [*.net *.split]
nick_h has quit [*.net *.split]
rking has quit [*.net *.split]
<yorickpeterse> It's like having two cars: one perfectly fine one and a broken one. Instead of driving the one that's ok people choose to drive the broken one and just fix it with duct tape
workmad3 has joined #ruby-lang
<yorickpeterse> I suppose I'm just living in this fairy world where people drive proper cars
<erikh> go use haskell
<erikh> nobody actually gets anything done with it, but it's wonderfully correct
<erikh> or you can google "worse is better" and see an argument that's older than I am about this subject
<erikh> well, maybe not older than I am, but not that much younger.
Madis has left #ruby-lang [#ruby-lang]
<erikh> anyhow, way past my bedtime
<erikh> nn all
madish has joined #ruby-lang
<yorickpeterse> night
robbyoconnor has quit [Ping timeout: 252 seconds]
cyri_ has joined #ruby-lang
qpingu has joined #ruby-lang
akamike has joined #ruby-lang
rking has joined #ruby-lang
nick_h has joined #ruby-lang
ohsix has joined #ruby-lang
<madish> hi! can anyone help me on this problem: http://pastebin.com/1Srk4PRj . There has been tons of stackoverflow posts about it but none of the suggested solutions worked for me. Most of them were mac related, for example update xcode or something. I have fedora 17 on laptop
leopard_me has joined #ruby-lang
svyatov has joined #ruby-lang
<yorickpeterse> install gcc
<yorickpeterse> `yum install gcc` or something like that
<yorickpeterse> make: gcc: Command not found <- that's the error
<ttilley> is there an redhat equiv of build-essential?
<ttilley> for installing not just gcc but all the stuff normally needed to build shit?
<yorickpeterse> nfi, I don't deal with Deadrat
<ttilley> fair enough
dc5ala has quit [Quit: Ex-Chat]
<yorickpeterse> I have a bad time enough dealing with Arch Linux and Umbongo
<madish> thanks yorickpeterse! it worked
<madish> I was 90% sure that I already had gcc before :/
toretore has joined #ruby-lang
<yorickpeterse> :)
saxy has joined #ruby-lang
ohsix has quit [Ping timeout: 240 seconds]
RantriX has quit [Remote host closed the connection]
nick_h_ has joined #ruby-lang
achiu has quit [Read error: Operation timed out]
achiu has joined #ruby-lang
ohsix has joined #ruby-lang
akamike_ has joined #ruby-lang
saxy has quit [Ping timeout: 246 seconds]
svyatov has quit [Quit: svyatov]
qpingu has quit [*.net *.split]
akamike has quit [*.net *.split]
nick_h has quit [*.net *.split]
rking has quit [*.net *.split]
Aiur has quit [Quit: Computer has gone to sleep.]
guest__ has quit [Quit: guest__]
cardoni has joined #ruby-lang
qpingu has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
krz has quit [Quit: krz]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
vlad_sta_ has quit [Remote host closed the connection]
cultureulterior_ has quit [Ping timeout: 240 seconds]
cultureulterior_ has joined #ruby-lang
saxy has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
nitti has joined #ruby-lang
saxy has quit [Ping timeout: 248 seconds]
nitti has quit [Ping timeout: 240 seconds]
saxy has joined #ruby-lang
<kke> is there some fun way to do something like: prefix, number, suffix = "AB12345678C".match(/\A([A-Z]+?)(\d+)(.+?)\z/) without going into md = foo.match kind of thing?
<injekt> kke: .captures
<injekt> >> "foo bar".match(/(\S+) (\S+)/).captures
<injekt> => ["foo", "bar"]
<kke> injekt: cool.
<kke> for my particular case prefix, number, suffix = string.partition(/\d+/) seems to do the trick
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
schaerli has joined #ruby-lang
beiter has quit [Quit: beiter]
saxy has quit [Ping timeout: 260 seconds]
<soahccc> What am I missing? How can I update a record with Sequel? It works on "relations" but if I iterate them I'll get a hash which have an update method but this is the hash's one I guess
RantriX has joined #ruby-lang
dRbiG has quit [Ping timeout: 260 seconds]
RantriX has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
anannie has joined #ruby-lang
anannie has quit [Client Quit]
dr_bob has joined #ruby-lang
nitti has joined #ruby-lang
nitti has quit [Ping timeout: 240 seconds]
shtirlic has joined #ruby-lang
beiter has joined #ruby-lang
svyatov has joined #ruby-lang
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> What??
<yorickpeterse> - ?
<yorickpeterse> You'd update a record something along the lines of `User[:name => 'Yorick'].update(:name => 'Derp')` if I remember correctly
slaytanic has quit [Read error: Connection reset by peer]
slaytanic has joined #ruby-lang
cultureulterior_ has quit [Ping timeout: 255 seconds]
rking has joined #ruby-lang
horsey has joined #ruby-lang
<injekt> soahccc: yeah, what yorickpeterse said. You need to fetch a record and use update on it
cultureulterior_ has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<soahccc> injekt: Hmmm I think I'm spoiled with other ORMs... I tried a DB[:some_table].where(...).each {|r| r.update } but "r" is a Hash actually... I only can update directly on the where
<yorickpeterse> You could also do something like `User.filter(:name => /yorick/i).destroy`
<injekt> soahccc: remember a select and an update are 2 different queries
sush24 has joined #ruby-lang
<injekt> soahccc: in other orms, you're probably using a model, which you can do with Sequel, too
<injekt> soahccc: User.filter(name: 'injekt').update(name: 'notjekt')
<injekt> eh maybe call .first on that first
<soahccc> injekt: Yeah I misinterpreted that... I thought it would behave more ruby like when not using a model class
<soahccc> injekt: And that's the mistake... first gives you a hash
<injekt> when you query the model, or the dataset?
<soahccc> Ohh dataset... Missed it again :D
<injekt> a dataset should be an array of hashes, which makes total sense
mwjcomputing has joined #ruby-lang
<injekt> well, doing a select on a dataset should return that, anyway
asaaki has quit [Quit: Bye bye!]
rolfb has joined #ruby-lang
<injekt> I used to use sequel a lot but it gets really messy when it comes to joins and column aliases
<soahccc> I should've used a model but it works now... So I'm fine ;) If I perform a uniqueness check there should be no problem of updating a where response directly
saxy has joined #ruby-lang
lun_ has joined #ruby-lang
villainate has quit [Quit: Leaving]
lun__ has quit [Ping timeout: 260 seconds]
<soahccc> injekt: I run into problems using AR in this case so I decided to handle this in a simple psydo API thing. It is horrible, I know that, but I might fix that later... https://gist.github.com/ba10ad1ca7a9b7c2beb9
<injekt> soahccc: it's not bad, having models would clean pretty much all of that up, though
<injekt> then you could move those methods into the model
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<soahccc> injekt: I was afraid that I run into the same problem with AR (the bloody column named "attribute")
saxy has quit [Ping timeout: 255 seconds]
<soahccc> ehhh /s/with/like in
<injekt> ah yeah just noticed that
<injekt> hah
<soahccc> Anyway, thank you.. I'll try to get some food...
kitallis has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
tbuehlmann has quit [Remote host closed the connection]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
lun_ has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
schaerli has joined #ruby-lang
dalekurt has joined #ruby-lang
sush24 has quit [Client Quit]
voker57_ has joined #ruby-lang
voker57 has quit [Ping timeout: 276 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
aetcore has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
Guest59059 has quit [Read error: Operation timed out]
aetcore has joined #ruby-lang
runeb has joined #ruby-lang
Uranio has joined #ruby-lang
gmci has joined #ruby-lang
gmci is now known as Guest36705
postmodern has quit [Quit: Leaving]
fsvehla has quit [Quit: fsvehla]
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
gaveen has quit [Ping timeout: 260 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Darkspiel has quit [Remote host closed the connection]
shtirlic_ has joined #ruby-lang
kitallis has quit [Ping timeout: 240 seconds]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
shtirlic has quit [Ping timeout: 252 seconds]
kitallis has joined #ruby-lang
oddmunds has quit [Ping timeout: 260 seconds]
schaerli has quit [Remote host closed the connection]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
sabfer has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Client Quit]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
schaerli has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Asher has quit [Read error: Connection reset by peer]
akamike_ has quit []
akamike_ has joined #ruby-lang
akamike_ has quit [Client Quit]
gearaholic has joined #ruby-lang
slyphon has joined #ruby-lang
akamike has joined #ruby-lang
Asher has joined #ruby-lang
Asher2 has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
Asher has quit [Disconnected by services]
Asher2 is now known as Asher
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sailias has joined #ruby-lang
beiter has quit [Quit: beiter]
slyphon has joined #ruby-lang
gearaholic has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
ottbot has joined #ruby-lang
fletch_ has joined #ruby-lang
fletch_ is now known as fletch`
slyphon has quit [Quit: WeeChat 0.3.8]
methods has quit [Quit: Leaving.]
|Vargas| has quit [Ping timeout: 264 seconds]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
Averna1 has quit [Quit: Leaving.]
dalekurt has quit [Quit: Zzz...]
saxy has joined #ruby-lang
<apeiros_> corundum: wordwrap?
<corundum> no idea
<apeiros_> corundum: word_wrap?
<corundum> you best check yo'self!
<apeiros_> hrm
saxy has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
rippa has joined #ruby-lang
|Vargas| has quit [Quit: ...]
singpolyma has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
havenn has joined #ruby-lang
schaerli has joined #ruby-lang
mistym has quit [Remote host closed the connection]
senekis has joined #ruby-lang
Guest____ has joined #ruby-lang
runeb- has joined #ruby-lang
runeb is now known as Guest53070
Guest53070 has quit [Killed (lindbohm.freenode.net (Nickname regained by services))]
runeb- is now known as runeb
nitti has joined #ruby-lang
nitti_ has joined #ruby-lang
nitti has quit [Ping timeout: 264 seconds]
burgestrand1 has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
outoftime has joined #ruby-lang
burgestrand1 has quit [Client Quit]
rolfb has quit [Quit: Leaving...]
burgestrand has quit [Read error: Operation timed out]
KA_ has joined #ruby-lang
richardjortega has quit [Ping timeout: 264 seconds]
areil has quit [Remote host closed the connection]
asdfqwer has joined #ruby-lang
slyphon has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
gsav has joined #ruby-lang
yorickpeterse is now known as yorick-almost-dr
yorick-almost-dr is now known as yorick-not-drunk
sabfer has quit [Quit: sabfer]
KA_ has quit [Quit: KA_]
BigO has joined #ruby-lang
gsav_ has joined #ruby-lang
gsav has quit [Client Quit]
gsav_ has quit [Client Quit]
davidbalber|away is now known as davidbalbert
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
Croms has quit [Remote host closed the connection]
Croms has joined #ruby-lang
horsey has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
chimkan has joined #ruby-lang
runeb has quit [Remote host closed the connection]
gsav_ has quit [Quit: Lost terminal]
schaerli has quit [Remote host closed the connection]
BigO has quit [Remote host closed the connection]
BigO has joined #ruby-lang
runeb has joined #ruby-lang
methods has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
yalue has joined #ruby-lang
wallerdev has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
chimkan has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chimkan has joined #ruby-lang
Guest____ has left #ruby-lang [#ruby-lang]
sabfer has joined #ruby-lang
saxy has joined #ruby-lang
justinram has joined #ruby-lang
stonerfish has joined #ruby-lang
saxy has quit [Ping timeout: 255 seconds]
BigO_ has joined #ruby-lang
beckettsfool has joined #ruby-lang
BigO has quit [Read error: Connection reset by peer]
MaddinXx has joined #ruby-lang
<MaddinXx> hi everyone
Dennis_ has joined #ruby-lang
<MaddinXx> I'm trying to create a method with kind of "dynamic" parameters and found *args, but this doesn't seem to work. might anyone tell me what would be the correct way to realize a method like:
<MaddinXx> Calling with: Class.method(arg1, arg2, { :hash1 => false, :hash2 =>true })
<MaddinXx> and how I can get the hash's values in the method?
<andrewvos> MaddinXx: def method(arg1, arg2, hash)
<andrewvos> MaddinXx: Or def method(args*); args[2] #=> hash; end
<andrewvos> MaddinXx: So you can get it with args[2]
Croms has quit [Ping timeout: 246 seconds]
runeb has quit [Remote host closed the connection]
<MaddinXx> andrewvos: Thanks. I think that's how I have it : http://pastebin.com/FTdv8vqN ? (def dir) but calling the args ( if args != {} && !args[:files]) seems wrong?
stonerfish has quit [Ping timeout: 276 seconds]
<andrewvos> OMG DON'T USE TABS
<andrewvos> Your Ruby is comically indented.
stardiviner has joined #ruby-lang
<MaddinXx> yeah it's actually my very first ruby code :P but why shouldn't I use tabs? what's your suggestion to write proper code?
achiu has quit [Quit: WeeChat 0.3.9]
achiu has joined #ruby-lang
<andrewvos> MaddinXx: Well, because it makes the code really hard to read
<andrewvos> MaddinXx: You have to move your eyes quite far
<andrewvos> MaddinXx: There's other issues with tabs, but that's my issue.
<andrewvos> MaddinXx: Also, there's never a reason to have a class called Utils.
<andrewvos> MaddinXx: Name it after what it does
<andrewvos> MaddinXx: Also, Dir.glob("**/*.rb") will find all files with the extension ruby
lun_ has joined #ruby-lang
<MaddinXx> andrewvos: even though it's a collection of "static" methods?
<yorick-not-drunk> MaddinXx: the only reason not to use tabs is because the generally accepted Ruby standard is to use two spaces
<yorick-not-drunk> My personal reason for hating it is because people use it to align stuff with as well, which really doesn't work
<MaddinXx> yorick-not-drunk: OK.. I'm loving tabs (that's why I'm so addicted to SASS - and also why I wanted to give ruby a try), but I have to recheck if it's best :)
<andrewvos> MaddinXx: Yes, even if it is a collection of static methods.
R_Macy has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
<MaddinXx> andrewvos: ok thx for the hint. I guess I'll read some more about the background/idea of ruby before asking questions to amazing bad code..
<MaddinXx> andrewvos: you know, I'm also new to OOP in general (Java in school) so I have a great leak of understanding how it really works.
dRbiG has joined #ruby-lang
<andrewvos> MaddinXx: You'll pick it up. It's kind of easy.
yorick-not-drunk is now known as yorickpeterse
<andrewvos> MaddinXx: Just try to have fun :)
sabfer has quit [Quit: sabfer]
datanoise has joined #ruby-lang
stonerfish has joined #ruby-lang
<MaddinXx> andrewvos: I'm not so sure if I will every understand the concept. I see why it's amazing etc, but I really have problems seeing through everything...like all those "objects just flying around" etc etc and to separate what's app's logic and what's just helpers etc...
<MaddinXx> andrewvos: but yeah, I hope I'll get it sooner or later hehe
Dennis_ has quit [Quit: Dennis_]
<andrewvos> MaddinXx: Best way to learn is to have fun, and create something.
sailias has quit [Quit: Leaving.]
Croms has joined #ruby-lang
geopet has joined #ruby-lang
adambeynon has joined #ruby-lang
<MaddinXx> andrewvos: that's what I'm trying to :P but it can become frustrating... tried it in Java first (but yeah, Java is ugly) and now tried in ruby but still no success. even though my "applications" should be a very primitive one..
iCharlie has quit [Quit: leaving]
andrewhl has joined #ruby-lang
jstewart has joined #ruby-lang
<MaddinXx> andrewvos: might you help me with a last question then? What's the proper way to include a function collection then? Just writing them in a .rb file and require it (so not wrapping it inside a class)?
<andrewvos> You can put them in a module and include that module
<andrewvos> Or you could just break related stuff out into classes
<MaddinXx> thx a lot! will give it a try and read the Module doc (didn't know them). thx!
<andrewvos> MaddinXx: Pleasure
stonerfish has quit [Ping timeout: 276 seconds]
<andrewvos> MaddinXx: Probably good to mention that putting them in a module and including them is hardly ever the best approach.
jxie has joined #ruby-lang
R_Macy has quit []
horsey has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
rue|w has quit [Ping timeout: 276 seconds]
oddmunds has joined #ruby-lang
gregmoreno has joined #ruby-lang
sush24 has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
stonerfish has joined #ruby-lang
davidbalbert is now known as davidbalber|away
ryanlecompte has joined #ruby-lang
horsey has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
stardiviner has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
schaerli has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
wyhaines has quit [Remote host closed the connection]
MaddinXx has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
justinra_ has joined #ruby-lang
justinram has quit [Read error: Connection reset by peer]
cultureulterior_ has quit [Quit: cultureulterior_]
justinra_ has quit [Read error: Connection reset by peer]
justinram has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
xyzodiac has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
jxie has quit [Quit: leaving]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
kurko_ has quit [Ping timeout: 260 seconds]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
BigO has joined #ruby-lang
wyhaines has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
<andrewvos> RubyTapas020-Struct.mp4 <-- whoa
kurko_ has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
intellitech has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
blazes816 has joined #ruby-lang
BigO_ has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
qwerxy has quit [Quit: offski]
schaerli has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
BigO has quit [Read error: Connection reset by peer]
BigO_ has quit [Remote host closed the connection]
stonerfish has quit [Ping timeout: 276 seconds]
dpatel has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
jstewart1 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
datanoise has quit [Ping timeout: 260 seconds]
asaaki has joined #ruby-lang
asaaki has quit [Max SendQ exceeded]
richardjortega has joined #ruby-lang
BigO has joined #ruby-lang
asaaki has joined #ruby-lang
asaaki has quit [Excess Flood]
wyhaines has quit [Remote host closed the connection]
asaaki has joined #ruby-lang
BigO has quit [Read error: Connection reset by peer]
asaaki has quit [Max SendQ exceeded]
jstewart has quit [Ping timeout: 264 seconds]
BigO has joined #ruby-lang
asaaki has joined #ruby-lang
alvaro_o has joined #ruby-lang
Aiur has joined #ruby-lang
BigO has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
__butch__ has joined #ruby-lang
Uranio has quit [Quit: WeeChat 0.3.8]
kurko_ has joined #ruby-lang
rolfb has joined #ruby-lang
mrsolo has joined #ruby-lang
asaaki has quit [Quit: Bye bye!]
lcdhoffman has quit [Quit: lcdhoffman]
methods has left #ruby-lang [#ruby-lang]
richardjortega has quit [Quit: richardjortega]
stonerfish has joined #ruby-lang
anannie has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
saxy has joined #ruby-lang
stonerfish has quit [Ping timeout: 276 seconds]
icooba has quit [Quit: Computer has gone to sleep.]
lun_ has quit [Remote host closed the connection]
shtirlic_ has quit [Remote host closed the connection]
saxy has quit [Ping timeout: 255 seconds]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby-lang
wallerdev has joined #ruby-lang
leopard_me has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mwjcomputing has joined #ruby-lang
havenn has quit [Remote host closed the connection]
senekis has quit [Remote host closed the connection]
havenn has joined #ruby-lang
kith has quit [Ping timeout: 244 seconds]
sailias has joined #ruby-lang
sailias has quit [Client Quit]
Mon_Ouie has joined #ruby-lang
havenn has quit [Ping timeout: 255 seconds]
svyatov has quit [Quit: svyatov]
havenn has joined #ruby-lang
lcdhoffman has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
KA_ has joined #ruby-lang
kith has joined #ruby-lang
lcdhoffman has quit [Client Quit]
havenn has quit [Ping timeout: 260 seconds]
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
cyri_ has quit [Quit: cyri_]
benanne has joined #ruby-lang
jordiebrad has joined #ruby-lang
KA_ has quit [Quit: KA_]
micha-- has joined #ruby-lang
micha-- has quit [Client Quit]
jstewart1 has quit [Read error: Connection reset by peer]
jstewart has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 268 seconds]
horsey has joined #ruby-lang
krohrbaugh has joined #ruby-lang
gaveen has quit [Remote host closed the connection]
<injekt> andrewvos: is it worth it?
apeiros_ has quit [Remote host closed the connection]
<ddd> I think it is
<ddd> short sweet to the point basic usage coverage
<injekt> ddd: what about for seasoned ruby devs?
<ddd> if you don't know struct, sure. might be a point or two for exp. folks as well
<eam> what's the right way to contribute to ruby core?
<injekt> I meant the series in general not that one specifically
<ddd> i think its more aimed at those that don't have any exposure to struct, or very very basic exposure
<ddd> ohh. yeah definitely worthwhile to the seasoned guys too
rebelcan has joined #ruby-lang
<eam> injekt: ok rad thanks
<ddd> injekt: even if for no other reason than a different viewpoint with technicals
Austin__ has joined #ruby-lang
sailias has joined #ruby-lang
<ddd> injekt: 008-#fetch as an assertion - Hash#fetch is one of my favorite methods. In this episode, I take a look at using it to assert the existence of hash keys... as a random entry
<injekt> interesting
<ddd> in that one he's discussion using an omniauth hash as one of the parts to his discussion
<injekt> parsing that sentence makes my brain hurt
<ddd> sorry. he's talking about using #fetch method with an omniauth hash
<injekt> ah ok :D
<ddd> an error thrown walks him into the hash#fetch
Austin__ has left #ruby-lang [#ruby-lang]
<ddd> injekt: since its a payware, asking if he'll let me share that particular vid with you so you can eval if you want to get the subscription. just waiting for an answer. Easier to just show than tell
<injekt> ddd: that's very kind of you
<ddd> he said its fine. Got a place I can send to you? or i can try a dcc. never done one with this client. Catch this if you can
<ddd> he also said check out http://devblog.avdi.org/rubytapas-free-monday-episodes/ for some of the freebies. same quality
<ddd> injekt: i take it its not going through?
saxy has joined #ruby-lang
BigO has joined #ruby-lang
saxy has quit [Ping timeout: 245 seconds]
tenderlove has quit [Remote host closed the connection]
dmwuw has joined #ruby-lang
havenn has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
Uranio has joined #ruby-lang
shtirlic has joined #ruby-lang
justinram has quit [Read error: Connection reset by peer]
justinram has joined #ruby-lang
mistym is now known as mistym_lunch
wyhaines has joined #ruby-lang
schaerli has joined #ruby-lang
BigO has quit [Remote host closed the connection]
sailias has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
thinkdevcode has joined #ruby-lang
KA_ has joined #ruby-lang
thinkdev_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
thinkdevcode has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
bluepojo has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
gearaholic has joined #ruby-lang
tenderlove has joined #ruby-lang
vmoravec has quit [Ping timeout: 252 seconds]
vmoravec has joined #ruby-lang
KA_ has quit [Quit: KA_]
mwjcomputing has quit [Quit: Leaving]
asdfqwer has quit [Read error: Operation timed out]
KA_ has joined #ruby-lang
outoftime has quit [Ping timeout: 252 seconds]
KA_ has quit [Client Quit]
bradland has joined #ruby-lang
<bradland> looking for a library that would help me calculate the "rate" at which something occurs
<bradland> for example, requests per second on a 1 minute interval
dalekurt has joined #ruby-lang
<bradland> i've done some googling, but i have a feeling i'm not using the right terms
chimkan has joined #ruby-lang
davidbalbert is now known as davidbalber|away
davidbalber|away is now known as davidbalbert
saxy has joined #ruby-lang
datanoise has joined #ruby-lang
saxy has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 240 seconds]
dalekurt has quit [Quit: Zzz...]
saxy has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
jordiebrad has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
saxy has quit [Read error: Connection reset by peer]
saxy has joined #ruby-lang
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
cardoni has quit [Quit: Linkinus - http://linkinus.com]
outoftime has joined #ruby-lang
saxy has quit [Ping timeout: 246 seconds]
dalekurt has joined #ruby-lang
mistym_lunch is now known as mistym
cyri_ has joined #ruby-lang
nitti_ has left #ruby-lang [#ruby-lang]
KA_ has quit [Quit: KA_]
BigO has joined #ruby-lang
rippa has quit [Ping timeout: 246 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Nisstyre has quit [Quit: Leaving]
xyzodiac has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
wyhaines has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
chimkan has quit [Quit: chimkan]
datanoise has quit [Ping timeout: 268 seconds]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
intellitech has quit [Quit: Leaving]
kurko_ has joined #ruby-lang
stonerfish has joined #ruby-lang
havenn has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
vmoravec has quit [Ping timeout: 268 seconds]
swarley has joined #ruby-lang
vmoravec has joined #ruby-lang
havenn has joined #ruby-lang
yalue has quit [Remote host closed the connection]
saxy has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
smaddock has quit [Quit: smaddock]
KA_ has quit [Quit: KA_]
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
saxy has quit [Read error: Operation timed out]
KA_ has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
horsey has quit [Read error: Connection reset by peer]
KA_ has quit [Client Quit]
havenn has quit [Remote host closed the connection]
BigO has quit [Remote host closed the connection]
<freedrull> bradland: statsd or something?
<bradland> freedrull: most of the time i'm just interested in calculating the "rate" of something, given a series of date/time strings
<eam> what's the right way to implement this pattern in ruby? I'm iterating a list of things and I want to push them onto a hash based on f(thing)
<bradland> i don't know much about stated though
<eam> so things.each { |thing| map[f(thing}] << thing }
<eam> except map is nil to start with
<eam> in perl, push() takes care of this with a cast, not sure how to do it easily in ruby
<bradland> eam: hashes don't normally use << because they're not arrays
BigO has joined #ruby-lang
<eam> bradland: the value is an array
<bradland> the operator must be a method of the object on the left
<bradland> so if map is a hash, then << is an invalid operator
<eam> list of things -> hash of things where key is f(thing) and val is [ thing1, thing2 ]
<bradland> you only need assignment with hashes, because you specify a key
<eam> bradland: I know
<blazes816> map is a hash but map[f(thing)] is an array
<bradland> oh, ok, i see aha you're saying
<eam> that's why I'm asking how the best way to structure this is
<eam> I can add boilerplate if nil?
<eam> but that seems needlessly verbose
havenn has joined #ruby-lang
<eam> ooooh
<eam> Hash.new([])
<eam> I don't really like that but I guess it works
BigO has quit [Remote host closed the connection]
<bradland> damn, i know there's another way to do that
<bradland> other than new([])
<bradland> just can't think of it off the top of my head
<eam> I really dislike modifying the default behavior of a Hash instance
<eam> what I really want is something like ||= to instantiate the right class type
<bradland> yeah, i remember using something different in combination with ||=
<eam> in perl the loop would look like push @{ $map{f($thing} }, $thing
<eam> and the @{} does the vivification
BigO has joined #ruby-lang
<eam> it'd be a real pain if some values were [] and some were some other object type
datanoise has joined #ruby-lang
dalekurt has quit [Ping timeout: 268 seconds]
horsey_ has joined #ruby-lang
horsey_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
vmoravec has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby-lang
vmoravec has joined #ruby-lang
cjs226 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Connecti0n has joined #ruby-lang
BigO has quit [Read error: Connection reset by peer]
BigO has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<mfn> eam: be aware that Hash.new([]) means that every key returns the same array instance.
BigO has quit [Remote host closed the connection]
<injekt> You want Hash.new { [] }
<injekt> or Hash.new { Array.new } if being literal makes more sense
<injekt> explicit*
rekky has joined #ruby-lang
<injekt> or Hash.new { |h, k| h[k] = [] } I guess
davidbalbert is now known as davidbalber|away
<banisterfiend> injekt: check it: http://showterm.io/8ad229b0ace42e94fc69a#fast
Connecti0n has quit [Quit: Leaving]
<injekt> banisterfiend: neat
Carnage\ has joined #ruby-lang
jstewart1 has joined #ruby-lang
Uranio has quit [Ping timeout: 276 seconds]
jstewart1 has left #ruby-lang [#ruby-lang]
jstewart has quit [Ping timeout: 244 seconds]
<oddmunds> cool
chongyu123 has joined #ruby-lang
BigO has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
fsvehla has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
tenderlove has joined #ruby-lang
gearaholic has quit [Remote host closed the connection]
BigO has quit [Remote host closed the connection]
stonerfish has quit [Ping timeout: 276 seconds]
slyphon has quit [Ping timeout: 245 seconds]
saxy has joined #ruby-lang
rebelcan has quit [Ping timeout: 256 seconds]
thatdutchguy has joined #ruby-lang
saxy has quit [Ping timeout: 268 seconds]
justinram has quit [Remote host closed the connection]
bradland has quit [Quit: bradland]
wyhaines has joined #ruby-lang
erichmenge has quit [Changing host]
erichmenge has joined #ruby-lang
_sillymarkets has quit [Ping timeout: 245 seconds]
lcdhoffman has joined #ruby-lang
chongyu123 has quit [Quit: Leaving]
postmodern has joined #ruby-lang
perry has joined #ruby-lang
rebelcan has joined #ruby-lang
<perry> would anyone happen to know how to iterate through each pixel using chunky png? I want to print the green values for each pixel http://pastie.org/private/ra7evk8jhwuq6l80egqmng
blacktulip has quit [Remote host closed the connection]
fletch` has quit []
lcdhoffman has quit [Quit: lcdhoffman]
chimkan has joined #ruby-lang
chimkan has left #ruby-lang [#ruby-lang]
<perry> figured it out :)
vmoravec has quit [Ping timeout: 248 seconds]
datanoise has quit [Ping timeout: 252 seconds]
slyphon has joined #ruby-lang
vmoravec has joined #ruby-lang
lcdhoffman has joined #ruby-lang
davidbalber|away is now known as davidbalbert
thinkdev_ has quit [Remote host closed the connection]
BigO has joined #ruby-lang
<eam> mfn: whooooa
BigO has quit [Remote host closed the connection]
saxy has joined #ruby-lang
<eam> going to wrap this in a nasty if nil? block then
<eam> unfortunate
KA_ has joined #ruby-lang
solars has quit [Ping timeout: 248 seconds]
apeiros_ has joined #ruby-lang
gsav_ has joined #ruby-lang
outoftime has quit [Quit: Leaving]
gsav has quit [Ping timeout: 240 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
gsav_ has quit [Ping timeout: 260 seconds]
BigO has joined #ruby-lang
BigO has quit [Remote host closed the connection]
yxhuvud has quit [Read error: Connection reset by peer]
sandbags has quit [Remote host closed the connection]
jbsan has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby-lang
jbsan has joined #ruby-lang
Darkspiel has joined #ruby-lang
datanoise has joined #ruby-lang
cjs226 has quit []
datanoise has quit [Ping timeout: 265 seconds]
ottbot has quit [Read error: Operation timed out]
workmad3 has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
cyri_ has quit [Quit: cyri_]
rekky has quit [Quit: rekky]
havenn has joined #ruby-lang
mistym_ has joined #ruby-lang
savage- has joined #ruby-lang
<blazes816> eam: if you use a block it will create a new array
<eam> blazes816: yeah, but that's getting far away from the "which is more expressively clear"
<eam> which is my ultimate goal
<blazes816> for sure, just letting you know for future reference
<eam> yeah, awesome, filing it away thanks :)
<eam> it's kinda frustrating the way ruby is structured
<eam> in most languages there's a clear set of functions with clear documentation about their usage
<eam> ruby seems to sprinkle that through various object types, with no cohesive recipe lookup
geopet has quit [Quit: geopet]
ryanlecompte has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby-lang
<eam> or rather, all those idioms are defined by various frameworks instead of in the core language (eg RoR)
slyphon has joined #ruby-lang
Darkspiel has quit [Ping timeout: 245 seconds]
<blazes816> it's cohesive, you just need to learn when things are executed. Hash.new([]) will always return the same array because it's executed right then. Hash.new(){[]} will return a different array because the block is executed each time.
<blazes816> it's definitely much different than most other languages and requires a fair about of experience to really understand
BigO has joined #ruby-lang
* apeiros_ disagrees
<apeiros_> that rubys core set of rules is actually quite small was one thing which attracted me to ruby
<apeiros_> it seems large, because you can express quite a lot with that small set, and that can hide the fact that the underlying rules are only a couple
dalekurt has joined #ruby-lang
asaaki has joined #ruby-lang
datanoise has quit [Ping timeout: 245 seconds]
BigO has quit [Remote host closed the connection]
countdigi has joined #ruby-lang
davidbalbert is now known as davidbalber|away