<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)
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>
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.
<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?
<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]
<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`
<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
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:
<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]
<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
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