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
<erikh> if they give any thought to their employees they will likely be able to answer anything reasonable you throw at them.
<zenspider> 14/hr?!?
<zenspider> is that right?
<zenspider> (should I shut up?)
<tran4> zenspider yes $14. a lot of ads on my college's website are for unpaid internships
m3nd3s has joined #ruby-lang
<zenspider> what college?
<tran4> zenspider public school
<apeiros_> depending on the country, that can be a lot for an internship. I think in my country it varies from ~1000$ to 5000$ per month, with 8h/d that'd be about 5.7$/h to 28.4$/h
<zenspider> public school college... yeah. I can't see you getting much with a school like that
<erikh> it's an internship
<erikh> everyone knows they can low-ball the interns
tomzx has joined #ruby-lang
<qpingu> You can get lucky though
<zenspider> stupid cafe network
dv310p3r has joined #ruby-lang
<zenspider> I think we paid interns _fairly_ well at amzn
Jay_Levitt has joined #ruby-lang
kyrylo has joined #ruby-lang
deryldoucete has joined #ruby-lang
<erikh> the guy just got k-lined
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
deryldoucete has joined #ruby-lang
<zenspider> erikh: who did?
pgpkeys has joined #ruby-lang
pgpkeys has joined #ruby-lang
pgpkeys was kicked from #ruby-lang by zenspider [Kicked]
<andrewvos> Banned derryldoucette?
<erikh> I don't think that was him
<erikh> zenspider: unrelated, that intern guy... sec.
<erikh> tran4 has left IRC (K-Lined)
<erikh> maybe hit a spam threshold
<andrewvos> deryldoucette [~Deryl@os-dsl-0520.bmts.com]
<erikh> oh
<erikh> ...
<andrewvos> /whowas deryldoucette
<erikh> aye
<andrewvos> What happened?
<erikh> he was flapping
<erikh> ... and by that I mean he was reconnecting and disconnecting constantly
<andrewvos> Oh
<andrewvos> I've disabled parts
<andrewvos> The drama
<andrewvos> petercooper: I saw a link on rubyflow tonight on my phone but couldn't click it because... well I'm not sure.
<andrewvos> petercooper: I think you need some js that higlights links or something?
<andrewvos> petercooper: Couldn't copy and paste it either
<petercooper> looks like someone has just written a URL in plain text
<erikh> andrewvos: he was banned so he wouldn't keep rejoining... his client will say "you are banned" and it'll stop
<petercooper> That aside, I never realized how so many developers are incapable of writing basic HTML until I started moderating that site :)
<erikh> anyhow
<erikh> mass effect is required
<erikh> later.
<andrewvos> erikh: have fun. Need to buy that game.
<erikh> it's fun, but it wouldn't be nearly as fun if I hadn't played the previous two
<petercooper> yeah, he just pasted a plain URL in, no link
<andrewvos> Fail
<petercooper> so I've just rewritten the post for him
<petercooper> that particular problem doesn't happen much, thankfully
<erikh> you could probably rig something up with URI.extract that can auto-highlight that
<petercooper> normally it's people not knowing how an A tag works or being too lazy to write proper link text :)
<erikh> err, auto-link
<andrewvos> hahah I like the rewrite
<andrewvos> Anyway, why would I even read that :)
<petercooper> I write about 50 ledes a week so I've had the practice :P
<zenspider> nice writeup tho
<epitron> lol @ missing method_missing exception
<Asher> why's that?
deryldoucette has joined #ruby-lang
<andrewvos> Right, fuck everything about today. Night everyone.
<epitron> Asher: it just sounded fun to debug
<Asher> what if i insert an extra frame onto the backtrace that points back to where the call happened?
<epitron> also, something about calling super inside method_missing seems like a delightfully convoluted way to code
<andrewvos> Asher: What if I slip on a bar of soap in the shower? OH MY GOD I'D BE KILLED
<Asher> that was recommended to me as the way to have ruby throw the methodmessing error internally
thone has joined #ruby-lang
<zenspider> Asher: sounds overly clevar
<Asher> i take it your preference would be to leave the exception thrown in method_missing?
<zenspider> epitron: if your method_missing doesn't call super SOMEWHERE, you deserve a kick to the face
* epitron puts method missings everywhere in zenspider's code with no supers
<petercooper> remember to add your "super if meth == :zenspider_is_love" lines now folks
<deryldoucette> thanks zenspider - my apologies to all. colloquy doesn't do the /sleep 5 ; /msg nickserv blah stuff like irssi. so it kept bouncing me and not identifying
* zenspider greps his code for method_missing...
<andrewvos> heheheh
* epitron aliases it to method_supplied
<andrewvos> deryldoucette: NEVER FORGET
<deryldoucette> lol
<Asher> this is the first time i've ever found what i thought to be an appropriate use for method missing
<zenspider> Asher: heh
<epitron> orly
<petercooper> an entire pile of appropriate uses: https://github.com/garybernhardt/base/blob/master/lib/base.rb
ericmuyser has joined #ruby-lang
<Asher> when bindings inherited from a superclass are renamed and have configuration procs that call the name defined before renaming, i want the block to redirect to the renamed binding instead of throwing an error
<zenspider> blech
<Asher> why blech
<epitron> petercooper: holy moses
<zenspider> petercooper: base? *sigh*
<petercooper> supposedly he got tons of new subscribers off the back of that fun :)
<deryldoucette> petercooper: btw, WOW on that walkthrough. talk about feature pack :)
<petercooper> Must admit, I'm not personally a fan of 'funny' Ruby libraries that make Ruby look idiotic to ignorant third parties but hey..
phlipper has joined #ruby-lang
<zenspider> I wish he'd called it BASIC
<petercooper> I didn't like this one either, but everyone on Twitter thought it was awesome so I held my tongue :-) https://gist.github.com/1498215
<epitron> Fibur made me laugh pretty hard
<epitron> especially the comments
<zenspider> thing is... fibur was serious
<petercooper> I didn't get it but I'm happy to admit there are many styles of humor that go over my head :)
<zenspider> we talked about it at length and came up with that
<epitron> only serious!
<gray> yeeah
<gray> i finish a book: http://pine.fm/LearnToProgram la la la la ))
<epitron> omg, destroyallsoftware screencasts
<epitron> these are gold
<zenspider> gray: yay!
<gray> and i understand it ^_^ ooh i'm so happy
<petercooper> apparently the 'wat' video also gave a big boost
<petercooper> so the take away is.. do funny/silly stuff in public people find amusing but then do serious, awesome stuff on the backend that you charge for
<petercooper> which seems like a nice approach
<zenspider> yeah. idgi either
irb has joined #ruby-lang
<irb> hello
<zenspider> irb: 1 + 1
<zenspider> irb is broken
<zenspider> petercooper: fibur was a response to sinatra-synchrony
<zenspider> foods... later
srbartlett has joined #ruby-lang
<deryldoucette> hehe colloquy has a few bugs in it i see. reload the style after changing it to not show me part join quits and suddenly i don't see traffic in the channel. niiice (not)
_inc has joined #ruby-lang
<irb> zenspider, don't follow
<irb> anyways, i'm having trouble figuring out how to post a json payload using the RestClient class
QoQOoO has joined #ruby-lang
<irb> if anybody has experience with how to post JSON data using that class or any REST class i would appreciate it
<irb> any advice that is
<gray> zenspider: ))))))))))
<deryldoucette> ben it was textual. i'll try that next
<deryldoucette> oh sorry, wrong chan
sj26 has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
jaska has joined #ruby-lang
deryldoucette has joined #ruby-lang
S2kx has joined #ruby-lang
konr has joined #ruby-lang
<epitron> petercooper: wat is making my sides hurt
<epitron> :D
<petercooper> wat is good
<irb> anyone familar with the RestClient class?
<petercooper> although it does sound like the audience is hella drunk
nofxxx has joined #ruby-lang
QoQOoO has joined #ruby-lang
jaska has joined #ruby-lang
heppy_ has joined #ruby-lang
looopy has joined #ruby-lang
jaska has joined #ruby-lang
<epitron> so drunk
<petercooper> enough to dabble with some javascript?
<petercooper> or the whole .NET hog?
headius has joined #ruby-lang
<epitron> not that drunk
robbyoconnor has joined #ruby-lang
bryancp has joined #ruby-lang
neoesque has joined #ruby-lang
jaska has joined #ruby-lang
heppy has joined #ruby-lang
shtirlic_ has joined #ruby-lang
m3nd3s has joined #ruby-lang
H2H has joined #ruby-lang
<zenspider> nom nom foods
aza_kibo_ has joined #ruby-lang
<irb> anyone familar with the RestClient class?
robbyoconnor has joined #ruby-lang
jaska has joined #ruby-lang
looopy has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<lianj> jaimef: you can use super instead of old_initialize
<jaimef> k
<lianj> and YAML.load_file
lsegal has joined #ruby-lang
r0bby has joined #ruby-lang
cdnz has joined #ruby-lang
gregf has joined #ruby-lang
srbartlett has joined #ruby-lang
twittard has joined #ruby-lang
<Asher> https://gist.github.com/2033555 <== true "briliance"
<Asher> in the ugliest sort of way
<Asher> now with comment! :P
Joeysomo has joined #ruby-lang
Avanine has joined #ruby-lang
havenn has joined #ruby-lang
QoQOoO has joined #ruby-lang
rdavila has joined #ruby-lang
QoQOoO1 has joined #ruby-lang
igotnolegs has joined #ruby-lang
zerokarmaleft has joined #ruby-lang
neoesque_ has joined #ruby-lang
cdnz has joined #ruby-lang
<Asher> now gemified in all it's glory
<Asher> 'to_lambda' gem
aza_kibou has joined #ruby-lang
headius has joined #ruby-lang
sora_h has joined #ruby-lang
Fou_DRA has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
hagabaka has joined #ruby-lang
achiu1 has joined #ruby-lang
hagabaka has joined #ruby-lang
naz has joined #ruby-lang
dhruvasagar has joined #ruby-lang
fragmachine has joined #ruby-lang
<fragmachine> Hey how can I search for 'something' or 'something else' With grep? Eg something like 'cats dogs kangaroos'.split.grep(/(cats)||(dogs)/) - retruns cats and dogs but not kangaroos?
<heftig> |, not ||
<heftig> also, those parentheses are superfluous
<nofxx> fragmachine: str.match(/(cats|dogs)/) or something like it, might do the same
<fragmachine> oh ok awesome!
<fragmachine> ok cool thanks, I'll check them both out
Teddy2st_ has joined #ruby-lang
csherin has joined #ruby-lang
Tukeke has joined #ruby-lang
rohit has joined #ruby-lang
Tukeke has joined #ruby-lang
Luxx_ has joined #ruby-lang
jxie has joined #ruby-lang
<irb> anyone familar with the RestClient class?
heppy has joined #ruby-lang
shevy has joined #ruby-lang
rippa has joined #ruby-lang
gokul has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
dr0id has joined #ruby-lang
gianlucadv has joined #ruby-lang
Slackwise has joined #ruby-lang
wubofeng_ has joined #ruby-lang
pgpkeys has joined #ruby-lang
pgpkeys has joined #ruby-lang
voker57_ has joined #ruby-lang
nofxx has joined #ruby-lang
wlfman2k1 has joined #ruby-lang
kp666 has joined #ruby-lang
krz has joined #ruby-lang
wyhaines has joined #ruby-lang
krz has joined #ruby-lang
PsiliPharm has joined #ruby-lang
wubofeng has joined #ruby-lang
Pip has joined #ruby-lang
guns has joined #ruby-lang
twittard has joined #ruby-lang
qawsedrf has joined #ruby-lang
rohit has joined #ruby-lang
Teddy2steper has joined #ruby-lang
brownies has joined #ruby-lang
cdnz has joined #ruby-lang
JohnBat26 has joined #ruby-lang
Teddy2steper has joined #ruby-lang
cdnz has joined #ruby-lang
x0F__ has joined #ruby-lang
yxhuvud has joined #ruby-lang
sym- has joined #ruby-lang
Giddeon has joined #ruby-lang
stepnem has joined #ruby-lang
<qawsedrf> is class methods considered bad ?
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
concernedcitizen has joined #ruby-lang
krzyhoo has joined #ruby-lang
<krzyhoo> hello anyone
<rippa> no
<krzyhoo> can i forcethe initialize method NOT to create an objects if a condition is not met?
<krzyhoo> in my example, if certain parameters were not supplied, it must not initialize an object
uniqanomaly_ has joined #ruby-lang
<krzyhoo> and second question: how do i test with rspec if an object has not been created
<yxhuvud> krzyhoo: I think you misunderstand something. initialize is called *after* the object is created
|Vargas| has joined #ruby-lang
<krzyhoo> hmmmmm
|Vargas| has joined #ruby-lang
csherin has joined #ruby-lang
<krzyhoo> well in that case if certain required parameters are missing, is the best practice to force the obect value to be nil?
<lianj> maybe ruby -e 'class A; def self.new(*a); a.first == :test ? a : super(*a); end; end; p [A.new(:test), A.new]'
imrohit has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Indian has joined #ruby-lang
<erikh> you can override new, but I think you still have to call allocate?
<zenspider> krzyhoo: raise ArgumentError
<lianj> true, that would be nicer :)
ryez has joined #ruby-lang
<krzyhoo> thanks mates
solars has joined #ruby-lang
<krzyhoo> shit...how do you test with rspec is ArgumentError was raised?
<zenspider> rspec sucks... in minitest/spec it'd be proc { raise ArgumentError }.must_raise ArgumentError
<heftig> lambda { ... }.should raise_error(ArgumentError)
Joeysomo has joined #ruby-lang
Joeysomo has joined #ruby-lang
<krzyhoo> excellent :)
<rohit> zenspider: Both minitest and rspec versions of checking error raised look the same. Any internal difference that makes minitest better?
QoQOoO has joined #ruby-lang
<zenspider> many
<zenspider> minitest w/ 3 different test frameworks is a total of 2515 lines (incl comments). rspec w/ deps is 12918.
<zenspider> minitest/spec uses no monads, no magic, no clever, so the code is incredibly easy to debug and trace through
PsiliPharm has joined #ruby-lang
<amerine> And often, you don't end up stepping through minitest. I can't count the number of times I've dug through rspec and rspec-rails checking for issues and fixing bugs.
<zenspider> understanding how must_raise and all the methods that it calls requires reading < 50 loc
<zenspider> amerine: I certainly have
<zenspider> and you ALWAYS end up stepping through minitest... every time you see a backtrace in an error you see artifacts of minitest in there
<zenspider> mine are terribly shallow... and because there's no magic, they're right at the source... not 400 miles away
<amerine> zenspider: Forgive the non-100% accurate statement.
<zenspider> that's what kills me about rspec... when I have a problem, I can't FIND where the problem is
<zenspider> you can with minitest
<zenspider> I should also say that assert_raises is the most complex assertion so that < 50 loc is usually more like 20
<amerine> zenspider: I'm agreeing with you. rspec and specifically rspec-rails has caused a few headaches.
<zenspider> if you want to write more assertions to clean up your tests, it is a loooot easier to do in minitest
<zenspider> minitest flogs at JUST under 1900 w/ 12.4 / method on avg.
<zenspider> rspec w/ deps flogs at ~9740 w/ 9.1 / method on avg (I'm kind surpised by that!)
fukushima has joined #ruby-lang
<zenspider> I should prolly refactor my run method... it is getting hefty
<zenspider> my max: 76.2
<zenspider> rspec's max (really diff/lcs) is 298.3
<zenspider> all of that translates to understandability and speed, smaller being better
<zenspider> gah... diff/lcs is a monster. all 5 of the top 5 heaviest methods in that code tree are diff/lcs
<zenspider> and all flog > 200
<zenspider> end-rant
<rohit> Hmm
<rohit> Being able to dive into the source code is a big win imo. I think I'll use minitest in my new personal projects to try it out :)
<rohit> zenspider: thanks! :)
<qawsedrf> is class methods considered bad ? (from a testing point of view)
PsiliPharm has joined #ruby-lang
<zenspider> qawsedrf: no? why would it?
<qawsedrf> i am a noob, just read things like static methods are hard to test and mock ...
<zenspider> qawsedrf: "static" is the tip-off... we're not C++/java
<qawsedrf> hm, i thought class methods in ruby were like static methods from java only
dhruvasagar has joined #ruby-lang
ezkl has joined #ruby-lang
<rohit> qawsedrf: They are considered bad because it's hard to inject dependencies. But in Ruby and other dynamic languages like it you can just do MyDependency = stub_for_dependency
csherin has joined #ruby-lang
<rohit> I might be completely wrong though, so please check.
<amerine> qawsedrf: You can think about class methods in Ruby like static methods in Java, except Ruby's class methods still have a self (this in java) accessor.
<amerine> qawsedrf: ^^ Very very simple description, actual implementation is much more complex.
<amerine> qawsedrf: As far as mocking, it's pretty easy to mock a class method in Ruby.
<qawsedrf> ok
<amerine> qawsedrf: Read "easy", as nearly exactly the same as instance methods. Also `def` is a magical mocking method. People hit a mocking library way to quickly.
robbyoconnor has joined #ruby-lang
<amerine> qawsedrf: If you're new to Ruby, it might be worth your time to spend a little bit of time digging into the Ruby object model to understand how classes, instances and singleton classes interact.
dhruvasagar has joined #ruby-lang
havenn has joined #ruby-lang
seoaqua has joined #ruby-lang
gregf has joined #ruby-lang
solars has joined #ruby-lang
PsiliPharm has joined #ruby-lang
undersc0re has joined #ruby-lang
undersc0re has joined #ruby-lang
undersc0re has joined #ruby-lang
undersc0re has joined #ruby-lang
undersc0re has joined #ruby-lang
frangiz has joined #ruby-lang
gregf has joined #ruby-lang
QoQOoO1 has joined #ruby-lang
beiter has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
dc5ala has joined #ruby-lang
riffraff has joined #ruby-lang
<riffraff> moin
rushed has joined #ruby-lang
pzol has joined #ruby-lang
dhruvasagar has joined #ruby-lang
moemen has joined #ruby-lang
d3vic3 has joined #ruby-lang
<erikh> yo
zmack has joined #ruby-lang
workmad3 has joined #ruby-lang
roadkith has joined #ruby-lang
tla has joined #ruby-lang
gnufied has joined #ruby-lang
justinmcp has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
jxie has joined #ruby-lang
pw_ has joined #ruby-lang
francisfish has joined #ruby-lang
tekin has joined #ruby-lang
wyhaines has joined #ruby-lang
Defusal has joined #ruby-lang
pw_ has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
alim has joined #ruby-lang
toretore has joined #ruby-lang
rohit has joined #ruby-lang
gianlucadv has joined #ruby-lang
dejongge has joined #ruby-lang
zmack has joined #ruby-lang
naz has joined #ruby-lang
futurechimp has joined #ruby-lang
charper has joined #ruby-lang
sandbags has joined #ruby-lang
gokul has joined #ruby-lang
srbartlett has joined #ruby-lang
Para has joined #ruby-lang
Defusal_ has joined #ruby-lang
urbanmonk has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
judofyr has joined #ruby-lang
rolfb has joined #ruby-lang
rue has joined #ruby-lang
ramonmaruko has joined #ruby-lang
m3nd3s has joined #ruby-lang
aza_kibo_ has joined #ruby-lang
d3vic3 has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
canton7 has joined #ruby-lang
apeiros_ has joined #ruby-lang
imrohit1 has joined #ruby-lang
Indian has joined #ruby-lang
d3vic3 has joined #ruby-lang
chris2 has joined #ruby-lang
Arnvald has joined #ruby-lang
ankurgel has joined #ruby-lang
lsegal has joined #ruby-lang
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
ankurgel has quit [#ruby-lang]
mark_locklear has joined #ruby-lang
yalue has joined #ruby-lang
gray has joined #ruby-lang
stephenp has joined #ruby-lang
tommyvyo has joined #ruby-lang
malev has joined #ruby-lang
malev has joined #ruby-lang
<gray> hi, guys!
<slyphon> wtf
<slyphon> how do you get the github gem working?
<canton7> gray, that's the splat operator
<heftig> gray: it means gather arguments into an array
<A124> Hero.new("hero1", "hero2") => [ "hero1", "hero2"]
<gray> thx, understand.
<gray> =*
<A124> I got a question too.. why does not URI.escape, escape?
<A124> Only I can think of is encoding issue, but it's the same on 1.8.7.
<rippa> it does escape
<A124> rippa: The thing is it does not escape '[]' for me. Although its in REGEXP::UNSAFE
<Zespre> hi
<heftig> A124: no, that's the character class in the RegExp
<A124> heftig: URI.escape('[]') => "[]"
<heftig> yep
<heftig> correct behavior
<heftig> [] is not unsafe
justinxreese has joined #ruby-lang
necromancer has joined #ruby-lang
<A124> heftig: Hmm, I haven't noticed the 'not' operator. So the problem lies in gem I use it seems, which uses curl. Thank you.
tomzx has joined #ruby-lang
<A124> I would really appreciate one tip (as I can't find out how): How can I disable transcoding in 1.9? I feed the library (zlib) one byte encoded string, but inflate returns me double byte encoded. I only found encoding and / or setting / disabling transcoding for a stream.
sbabiy has joined #ruby-lang
morozovm has joined #ruby-lang
enebo has joined #ruby-lang
setmeaway has joined #ruby-lang
morozovm has quit [#ruby-lang]
toertore has joined #ruby-lang
verto has joined #ruby-lang
nacengineer has joined #ruby-lang
otertore has joined #ruby-lang
dejongge has joined #ruby-lang
rdavila has joined #ruby-lang
indstry has joined #ruby-lang
bglusman has joined #ruby-lang
rohit_ has joined #ruby-lang
tekin has joined #ruby-lang
setmeaway has joined #ruby-lang
justinxreese has joined #ruby-lang
cube526 has joined #ruby-lang
setmeaway has joined #ruby-lang
slyphon has joined #ruby-lang
DarkGray has joined #ruby-lang
vesan has joined #ruby-lang
mistym has joined #ruby-lang
<DarkGray> result.push(current.full_name) can be returned value?
<DarkGray> if i remove: result #i need return "result" array
JEG2 has joined #ruby-lang
<mistym> DarkGray: The return value of .push is the array with the results pushed on to it, so you don't need to explicitly return the result if that's the last thing in the method.
<mistym> I notice you're using heroes.each to push items onto the array. Ruby has a built-in item to do that for you.
<DarkGray> mistym: ok, thanks. But i only now understand: variables placed in each do ... end
<mistym> heroes.collect { |current| current.full_name }
<DarkGray> mistym: not available from outside.
<mistym> The #collect method will take the items you return in each iteration, and return an array of them.
<DarkGray> mistym: thanks! i try!
<mistym> So that heroes.collect... call is like what you were trying to do above, just a bit more concise.
<DarkGray> but when i try type puts names
Austin__ has joined #ruby-lang
<DarkGray> mistym: i get next: #<Hero:0x3b652d8> #<Hero:0x3b65278> #<Hero:0x3b651e8>
<DarkGray> mistym: but if names method returns array. Result should be array to
<mistym> DarkGray: Also: blocks can access variables defined in the scope from which they're called. So if you defined results outside the block, you could then push to it from within it.
<DarkGray> mistym: okay, thanks.
<mistym> DarkGray: That's returning hero objects - you probably accidentally did something like `heroes.collect { |current| current }` instead of `current.full_name`.
havenn has joined #ruby-lang
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
<DarkGray> mistym: this is my old code.
<DarkGray> result = [] means that resul now array.
<mistym> DarkGray: Since the last action in the #names method here is heroes.each, #names is returning the return value of heroes.each - which is identical to your heroes array.
<DarkGray> and after i push in result array object and after try puts this array
manojhans has joined #ruby-lang
<mistym> So instead of returning an array of names, you're returning the array of hero objects.
<mistym> Since you define the results method *inside* the block, you're not doing what you think you're doing. That's defining a new results method each iteration of the block, and the variable doesn't survive outside the block. You're not collecting the names anywhere.
<mistym> Defining the results variable, that is.
manojhans has joined #ruby-lang
<DarkGray> mistym: okay, my english is sucks. let me some time to translate please. thank you.
<mistym> DarkGray: Sorry!
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
Joeysomo has joined #ruby-lang
<mistym> DarkGray: Let me know if there's something I say that you don't understand and I can try to clarify. What's your language?
manojhans has joined #ruby-lang
<DarkGray> mistym: i need get a cup of coffee with my mom, give me 10 minutes plz.
<mistym> coffee :9
<DarkGray> mistym: my language is russian
manojhans has joined #ruby-lang
<DarkGray> mistym: :)))
<A124> To answer myself: I have not found how to disable transcode in 1.9, but found out that zlib deflate returns #<Encoding:ASCII-8BIT> despite the Encoding.default_external #<Encoding:UTF-8>
dv310p3r has joined #ruby-lang
uniqanomaly has joined #ruby-lang
<A124> And I have to (haven't found another solution) use String.force_encoding("UTF-8"), as data fed to zlib was UTF 8 also.
spox has joined #ruby-lang
<DarkGray> mistym: sorry, but i don't understand. I understand that i should defune result array outside of the "each" block
<DarkGray> but i don't understand what exacly returns names method now and why
Indian has joined #ruby-lang
<DarkGray> when execution each block started, we have a current variable that contains hero object.
<judofyr> A124: .default_external is only for I/O from the outside world. zlib works entirely on bytes, so ASCII-8BIT makes sense
<mistym> DarkGray: heroes.each has a return value too. It returns the array you called it with, regardless of what you do in the block.
<A124> judofyr: Ah. Thanks for clarification. I've read that but it's was relative for me.
<mistym> So, because the last thing you do in the method is call heroes.each, it's the return value of heroes.each that is returned by names. That's why names is returning the same thing as your heroes array.
<DarkGray> mistym: okay :) thank you! now i understand ^_^
<mistym> DarkGray: What you want here is heroes.collect. heroes.collect returns a new array. Each item in the array is the return value of a step in the block.
<A124> DarkGray: Curious. What are you coding?
<mistym> So if you do `heroes.collect do |current|; current.full_name; end`, it will return an array with the result of using #full_name on each item in the heroes array. The same as the `results` array you were trying to create!
pw_ has joined #ruby-lang
reitelles has joined #ruby-lang
<manveru> heroes.map{|hero| hero.full_name } or heroes.map(&:full_name)
<manveru> do/end with oneliners just looks wrong :P
<lianj> indeed
<mistym> manveru: I was doing it with the same syntax he was using for clarity. ;) I prefer curly braces for one-liners too.
<mistym> DarkGray: .map and .collect are the same thing, by the way. I find .collect makes more sense to me. Other people like .map better.
<DarkGray> bbrr sorry
<mistym> s/he/they # assumptions--
<DarkGray> i still don't understand again why heroes.each do |current| always returns current array
<DarkGray> sorry, i'am stupid
<A124> DarkGray: each is meant to work with supplied data, not to change the object
<A124> DarkGray: That's the only difference
<mistym> DarkGray: That's just because #each always returns the original value of whatever you used #each with.
malev_ has joined #ruby-lang
pw_ has joined #ruby-lang
<DarkGray> oooh
rdavila has joined #ruby-lang
<DarkGray> okay. so i should use each when i need just puts something
<DarkGray> A124: this is exmaple from last exercise in rubymonk.com I just trying understand.
<DarkGray> not modify
<A124> DarkGray: Ah. I see. I was curious, if you're not coding an rpg xD
<DarkGray> :))
<mistym> DarkGray: That's a good way of thinking about it!
<mistym> Ruby offers many ways to iterate over the collections of items like arrays, designed for different ways of doing things.
jxie has joined #ruby-lang
coreydaley has joined #ruby-lang
slyphon has joined #ruby-lang
rowanu has joined #ruby-lang
adambeynon has joined #ruby-lang
beiter has joined #ruby-lang
marcostoledo has joined #ruby-lang
rippa has joined #ruby-lang
wmoxam has joined #ruby-lang
Indian has joined #ruby-lang
Hadjab has joined #ruby-lang
tenderlove has joined #ruby-lang
<Hadjab> Hey everyone. I'm trying to use YARD for the first time, but I'm having a problem with my index page. Indeed, I did a readme.rdoc which is a quick tutorial on how to use my framework, however my index page keeps listing all my classes/methods/etc (which is normal I guess). How should I proceed for my README.rdoc to be the index page and have something like this : http://rubydoc.info/github/glejeune/ara/master/frames
<spox> yard doc --help
<spox> -r is likely what you're looking for
dr0id has quit [#ruby-lang]
pzol has quit ["Sayonara!"]
<Hadjab> I'll take a look, thanks :)
dous has joined #ruby-lang
petercooper has joined #ruby-lang
makao007 has joined #ruby-lang
krz has joined #ruby-lang
davpoind has joined #ruby-lang
imperator has joined #ruby-lang
<imperator> greetings programs
lele has joined #ruby-lang
<mistym> imperator: Greetings. Please state the nature of your query.
<imperator> anyone here ever used sharepoint? what did you think of it?
<andrewvos> imperator: no
<andrewvos> imperator: just no
<imperator> that good, eh?
<DarkGray> mistym: , A124 thanks for help
<wmoxam> imperator: a) briefly. (b) I wanted to rip my own eyeballs out
erics has joined #ruby-lang
<mistym> DarkGray: You're welcome!
<imperator> i've been googling it a bit, seems like most people use it as a glorified filesystem interface
<imperator> and most people seem to think it's too complex
<andrewvos> imperator: People use it because big companies have managers who choose products depending on who they enjoy playing golf with.
<wmoxam> andrewvos: also because their MS solutions provider said it was a good idea
rdavila has joined #ruby-lang
<wmoxam> :p
<wmoxam> "it'll make your company more efficent!"
<imperator> been doing some "basecamp vs sharepoint" searches, too
<imperator> and just now looking at asana
<wmoxam> "(and we can bill a fuckload because customization is so fucking difficult)"
<chris2> erm
<chris2> i want to inherit from BasicObject, how do i call instance_eval on it?
rdavila has joined #ruby-lang
<A124> DarkGray: Welcome.
<judofyr> chris2: you can't
<chris2> meh
<judofyr> chris2: I'm pretty sure at least…
<chris2> then i shall use object and undefine everything
rdavila has joined #ruby-lang
<judofyr> chris2: wait, actually. it should just work: http://ruby-doc.org/core-1.9.3/BasicObject.html
<judofyr> BasicObject#instance_eval
<chris2> erm
<chris2> indeed
<judofyr> :)
<chris2> must have done something wrong before
<chris2> also need ::Kernel.p now inside :P
<chris2> sheesh
<chris2> but my idea didnt work out anyway
* chris2 wonders if he can detect "toplevel expressions"
<judofyr> chris2: hm? what's a "toplevel" expression?
<chris2> a(b, c(d))
<chris2> the outer call is a toplevel expressoin
<chris2> the inner ones arent
<chris2> and all i have is method_missing
<chris2> mmh
<chris2> i just need better identity
<judofyr> chris2: do it the other way instead. detect what objects are passed to your method_missing
<chris2> yes
<chris2> but consider things like
<chris2> a
<chris2> b(a)
<chris2> if i just discharge all a, it wont work
<chris2> i need to compare by object_id
<Hadjab> 3*3=9
<judofyr> Hadjab: can't argue against that
<lianj> why did i read handjob
<judofyr> lianj: because it's S&B-day
<Hadjab> judofyr: It's not always true actually :P Depends where we are ^^
<judofyr> Hadjab: how so?
<Hadjab> judofyr: You could invent an algebra where the '*' sign means '+' ^^
<chris2> Hadjab: heh
<chris2> i thought of a counter example with a finite ring
<chris2> but tropical maths is a lot better of course
rowanu has joined #ruby-lang
<judofyr> Hadjab: meh, syntax doesn't matter to me. I was commenting in the semantics.
<judofyr> on*
<Hadjab> judofyr: Ah :P
<chris2> judofyr: even the semantics
<Hadjab> judofyr: But in maxplus algebra, 2*3 = 6
<Hadjab> judofyr: 2*3=5, sorry
<chris2> 5
<Hadjab> judofyr: and 2+3=3
<Hadjab> chris2: geek.
<chris2> yeah :P
<Hadjab> chris2: No human deserve to know that
<chris2> i wish i had any application for it
wyhaines has joined #ruby-lang
<chris2> Hadjab: not my field really, yours?
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
<Hadjab> chris2: I learnt it this year, in robotics
<chris2> ah
<Hadjab> chris2: I was thinking on how dumb could be the inventor of such an algebra. Redefining mathematical symbols should be forbidden
<Hadjab> chris2: But it's actually great to use
<rue> In wiblug algebra, 2 * 3 = 14
<chris2> Hadjab: i know the operators in circles
<chris2> rue: whats that?
<Hadjab> chris2: Yeah some people used them to avoid confusion. But if you look at the original publication, there are no circle
<chris2> ok
<rue> chris2: Something I just made up
<chris2> lol
<chris2> and whats 3 * 2?
<Hadjab> rue: The result should be 42
<rue> No, 42 is NaN
<Hadjab> Ah
<Hadjab> I should take a look at this algebra
<Hadjab> :3
<chris2> ok, 1.9 style. e = ...; a << e; return e
<chris2> i could use tap here?
<chris2> but with a sideeffect its not that nice
ascarter has joined #ruby-lang
manojhans has joined #ruby-lang
ericmuyser has joined #ruby-lang
m3nd3s has joined #ruby-lang
Karmaon has joined #ruby-lang
canton7 has joined #ruby-lang
<rue> You could
Jake232 has joined #ruby-lang
<rue> Or for bonus points you could do something AWESOME like (a << (…)).last
Dreamer3 has joined #ruby-lang
optikalmouse has joined #ruby-lang
<optikalmouse> can I use #andand with a hash?
<optikalmouse> hash.andand.['hello']?
<optikalmouse> or how would I invoke that?
<andrewvos> What's a gem that can create tag cloud images for me given some inputs??
<wmoxam> optikalmouse: hash.andand.fetch('hello')
deryl has joined #ruby-lang
<optikalmouse> weird that the #[] method comment doesn't mention that it's an alias for #fetch?
m3nd3s has joined #ruby-lang
heppy has joined #ruby-lang
manojhans has joined #ruby-lang
matti has joined #ruby-lang
<rue> It's not
<rue> You could do hash.andand.[]("hello"), but please don.t
<wmoxam> heh
<wmoxam> rue: how does #[] differ from .fetch ?
<rue> It raises
<rue> Or you can give a default
wyhaines has joined #ruby-lang
noodl has quit [#ruby-lang]
SuperTaz_work has joined #ruby-lang
<rdavila> Hi folks!
<rdavila> I've a question about this simple code: http://pastie.org/3594692
ryez_ has joined #ruby-lang
<rdavila> I don't know why the hash is returning nil when it should return an empty array here
<rue> rdavila: It's your return vale.
<rue> +u
gianlucadv has joined #ruby-lang
<rue> rdavila: Switching to #each_with_object (which is what you should be using) fixes this. Why?
tonesfrommars has joined #ruby-lang
havenn has joined #ruby-lang
<rdavila> rue: yep, it works with #each_with_object. Why?
<rdavila> I thin the return value by default should be an empty Array isn't it?
Jay_Levitt has joined #ruby-lang
<rdavila> rue: I see the problem, is the return object of the block right?
<rue> Yep
Teddy2steper has joined #ruby-lang
achiu1 has joined #ruby-lang
<rdavila> rue: thanks!
manojhans has joined #ruby-lang
flak has joined #ruby-lang
manojhans has joined #ruby-lang
_inc has joined #ruby-lang
H2H has joined #ruby-lang
rippa has joined #ruby-lang
brianpWins has joined #ruby-lang
io_syl has joined #ruby-lang
io_syl has joined #ruby-lang
darkf has joined #ruby-lang
dejongge has joined #ruby-lang
krzyhoo has joined #ruby-lang
<krzyhoo> hey guys, assuming i have such a class
<krzyhoo> how do i define a methos that sets a certain default value to @source[:offset]
<krzyhoo> whichdepends on the given precision
ascarter has joined #ruby-lang
<krzyhoo> what i mean is
<krzyhoo> once :precision gets set
<krzyhoo> only then will the :ossfet get calculated
<krzyhoo> and set
<rippa> do just that
manojhans has joined #ruby-lang
darkf_ has joined #ruby-lang
<krzyhoo> rippa: yeah but how do i do it behind the curtains
<krzyhoo> something like, each time a setter for the source variable gets called
<krzyhoo> a method checks if that setter has :precision as key
<krzyhoo> and then and only then calculates and set :offset
<rippa> you can do that on get
<krzyhoo> thats too late
<rippa> you can monkeypatch your hash
<krzyhoo> ok
<krzyhoo> what doeas that mean rippa?
<krzyhoo> :)
<rippa> def @source.[]=(*args); <check stuff here>; end
<rippa> don'
<rippa> t
<rippa> forget to call super
<krzyhoo> wow, sounds and looks obscure
<rippa> first argument would be key
<rippa> if it's :precision, do your calculations and stuff
<krzyhoo> so what i am seading here is "append to an array" *args?
<rippa> def @source.[]=(key, value); if key == :precision <calculations and setting>; end; super; end
<krzyhoo> wow
<krzyhoo> awesome help
pzol has joined #ruby-lang
<rippa> I'm not sure that's the most comprehensive way
<krzyhoo> what does super mean in this context?
<rippa> it calls original method
<rippa> Hash#[]=
<rippa> so your keys get set
darkf has joined #ruby-lang
pzol has quit ["Sayonara!"]
<krzyhoo> wow rippa you always happen to make things clear
<krzyhoo> so if my newbie brain is correct
<krzyhoo> hash[:key]=value is the same as hash[]=(:key, value) right???
<rue> You probably want super(newkey, newvalue) maybe dunno could be
<rippa> krzyhoo: yes
<krzyhoo> thx
nofxx has joined #ruby-lang
naz has joined #ruby-lang
moemen has joined #ruby-lang
workmad3 has joined #ruby-lang
<mortice> \
<mortice> always with the misfires.
Avanine has joined #ruby-lang
havenn has joined #ruby-lang
ascarter has joined #ruby-lang
Skif has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
toretore has joined #ruby-lang
twittard has joined #ruby-lang
scampbell has joined #ruby-lang
erics has joined #ruby-lang
Skif_home has joined #ruby-lang
wdperson has joined #ruby-lang
postmodern has joined #ruby-lang
Carnage\ has joined #ruby-lang
Skif has joined #ruby-lang
marcostoledo has joined #ruby-lang
<imperator> anyone have any ssd laptop recommendations?
krzyhoo has joined #ruby-lang
<krzyhoo> rippa: what i am doing wrong
<krzyhoo> line 20 returns nil
<krzyhoo> the pastie is btw for anyone willing to help :)
z3r00ld has joined #ruby-lang
<RegEchse> krzyhoo: a couple of things are going wrong there.
<RegEchse> krzyhoo: At the time you call def @source.[]=(...) @source == nil. So you're defining a method on nil.
<krzyhoo> am all ears RegEchse
<RegEchse> NilClass.instance_methods(nil).grep(/=/)
<RegEchse> => [:[]=]
<RegEchse> (after having run your code)
<krzyhoo> RegEchse: :(
<z3r00ld> hello everyone, i am a newbie in Ruby and need a little help in overriding or disabling the Error Exception Handling (for example - i want to disable this message for Getopt::Long.getopts when we select wrong option: /usr/newbie:52: undefined method `[]' for nil:NilClass (NoMethodError) ) - i have put begin + rescue it but still getting this message
<rippa> krzyhoo: I see he problem
<rippa> maybe this isn't the way to do it after all
<krzyhoo> but i hope you guys understand what i need
<krzyhoo> i mean
<krzyhoo> even though the code sucks
<krzyhoo> the idea behind it (i hope) is clear
boxmo has joined #ruby-lang
<z3r00ld> sorry to rush my problem - but i have a release on tomorrow and this is a blocker for me , any kind of solution is appreciated
gray has joined #ruby-lang
dreinull has joined #ruby-lang
<rippa> krzyhoo: http://ideone.com/tTaqg
<rippa> IT'S ALIVE
dreinull has quit [#ruby-lang]
<krzyhoo> awesome
<krzyhoo> rippa: you're the man
<rippa> krzyhoo: hash has to keep reference to parent object
<rippa> to access its methods
<z3r00ld> rippa: need little help (sorry for being a pain)
nofxx has joined #ruby-lang
<rippa> Zegapain
<z3r00ld> :-(
<rippa> z3r00ld: try rescue *
dreinull- has joined #ruby-lang
<z3r00ld> i am rescuing it, but still getting the message undefined method `[]' for nil:NilClass (NoMethodError)
<rippa> or not
<rippa> z3r00ld: maybe you are rescuing in the wrong place
<rippa> because it works for me
<z3r00ld> not work for me, shall i paste my code here or pastie or ping you, this is my first time on this channel
<rippa> paste it somewhere
publicvoid__ has joined #ruby-lang
<krzyhoo> rippa: but since i wasn't criticized for the general idea, i presume that my approach is not frowned uppn i ruby community?
<z3r00ld> rippa: http://pastie.org/3595528
<krzyhoo> z3r00ld: did you reqiore 'getoptlong'?
<krzyhoo> require
<z3r00ld> yes
<gray> The White Stripes
<z3r00ld> i did -> require 'getoptlong'
<krzyhoo> than i must give the field to more experienced users
<rippa> what is the line 52?
enebo has joined #ruby-lang
mrsolo has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
havenn has joined #ruby-lang
<z3r00ld> line 52 is the first option check if statement - if opt["help"] "do this " else "this " end
senj has joined #ruby-lang
<rippa> is it inside begin..rescue..end ?
<z3r00ld> ah my bad :-(, it was outside of begin, i put it in begin, now working just fine, thank you rippa.
Spooner has joined #ruby-lang
looopy has joined #ruby-lang
francisfish has joined #ruby-lang
virunga has joined #ruby-lang
kyrylo_ has joined #ruby-lang
kyrylo_ has joined #ruby-lang
imrohit has joined #ruby-lang
kyrylo has joined #ruby-lang
zommi has joined #ruby-lang
fjfish has joined #ruby-lang
crankharder has joined #ruby-lang
Carnage\ has joined #ruby-lang
nofxx has joined #ruby-lang
tonesfrommars has quit ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
tonesfrommars has joined #ruby-lang
imajes has joined #ruby-lang
Faris has joined #ruby-lang
<Faris> Hi!
<Faris> Are ruby threads still "green" ? :p
<gray> Faris what does means "green" ?
<Faris> Not real "kernel" threads
<Faris> just emulated threads
<gray> i don't know :) just interesting :)
marcostoledo has joined #ruby-lang
<gray> Faris: dow you know how to remove spaces from start String ?
<Faris> gray: :lstrip
<gray> thx)
<Faris> gray: Ruby is wonderful :)
<gray> yeah)
verto has joined #ruby-lang
<gray> so, now i finish rubymonk.com
<gray> also i finish read book http://pine.fm/LearnToProgram
<gray> a ready work for food khe-khe)) (expirience)
<mistym> Faris: In 1.9, Ruby threads are OS threads, but there is still a GIL so only one thread can execute at a time.
<Faris> mistym: too bad :(
z3r00ld has joined #ruby-lang
<Faris> mistym: I wonder if it's the same thing in python ..
<mistym> I/O and processing can happen in separate threads at the same time though.
<mistym> Faris: Same as Python, yes.
<mistym> Faris: That said, some other Ruby interpreters have true threads, like jruby, Rubinius, and Macruby.
<Faris> mistym: all except mri xD
<Faris> mistym: why do I always fall in love with the wrong stuff xD
<mistym> Well, I dunno about IronRuby, but I've never spoken to anyone who uses IronRuby, so...
gix has joined #ruby-lang
<Faris> mistym: I don't consider ironruby as a finished product
mssola has joined #ruby-lang
<gray> guys, now i can start learn ruby on rails? or i should read more / practice more on ruby ?
<gray> and if i can / should :) from what I should start
<Faris> Yeah I'd like to start learning it too :D
<Faris> I'm watching screencasts at the moment
Tukeke has joined #ruby-lang
<kyrylo> You could learn it together.
<Faris> I'm watchign "Learn rails by example" I don't know if it's the best one around though..
<gray> i I heard that: rails for zombies - good
<gray> kyrylo: mmm how?)
Fullmoon has joined #ruby-lang
<kyrylo> gray, start off from PMing each other.
pxjorge has joined #ruby-lang
futurechimp has joined #ruby-lang
tla has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
<drbrain> erikh: ping
curtism has joined #ruby-lang
curtism has joined #ruby-lang
petercooper has joined #ruby-lang
mytrile has joined #ruby-lang
malev has joined #ruby-lang
simon_weber has joined #ruby-lang
rob_ has joined #ruby-lang
<rob_> hi
<rob_> could someone please tell me what the '&' parts of this do: http://api.rubyonrails.org/classes/Enumerable.html#method-i-group_by
Indian has joined #ruby-lang
<rob_> is the first part saying group by the symbol ':day'?
<rob_> thanks matti
<erikh> drbrain: pong, but i'm pretty busy atm
<erikh> drbrain: later tonight?
<drbrain> erikh: just wanted to say "the FreeBSD ruby folks like test.rubygems.org"
<drbrain> and also, that they want moar
<erikh> drbrain: thanks, but I need to find someone to maintain it. :(
<erikh> just no time lately.
<drbrain> erikh: cool, I didn't want to promise away maintainership on you, let's discuss it when you have time
<erikh> yeah; let's... maybe tonight?
<drbrain> maybe, but during work times preferably
<erikh> ah ok. I'll try and hit you up around 4, 5pm then
<drbrain> cool
<erikh> today is jam-packed with fun and excitement
nofxx has joined #ruby-lang
havenn has joined #ruby-lang
yellow5 has joined #ruby-lang
samuelkadolph has joined #ruby-lang
samuelkadolph has joined #ruby-lang
<rue> Yay, CTCP flooding
yellow5 has joined #ruby-lang
samuelkadolph has joined #ruby-lang
samuelkadolph has joined #ruby-lang
msch has joined #ruby-lang
yellow5 has joined #ruby-lang
samuelkadolph has joined #ruby-lang
H2H has joined #ruby-lang
<erikh> who's doing it?
yellow5 has joined #ruby-lang
samuelkadolph has joined #ruby-lang
<A124> It's same on #ruby.. even worse.
yellow5 has joined #ruby-lang
<rue> Random names
<erikh> ah, fun.
<erikh> I guess I'm missing it?
<erikh> rue: +i the channel
<rue> I got CTCP on ignore anyway, but Limechat cleverly gives me a log line for each
virunga has joined #ruby-lang
ascarter has joined #ruby-lang
<rue> I'm not sure they quite understand the concept of "ignore"
<erikh> heh
<matti> Other channels too.
rolfb has joined #ruby-lang
vesan has joined #ruby-lang
benanne has joined #ruby-lang
yellow5 has joined #ruby-lang
<erikh> hrm. I'm totally strapped for time, but someone should pop into #freenode and say something.
mccraig has joined #ruby-lang
<rue> They're going down regularly, so I assume there's someone on point already.
<erikh> ah ok
samuelk|away has joined #ruby-lang
<drbrain> are they cTCP flooding this channel?
cldwalker has joined #ruby-lang
denysonique__ has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
dkannan has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
msch has joined #ruby-lang
petercooper has joined #ruby-lang
davpoind_ has joined #ruby-lang
Xzyx987X has joined #ruby-lang
gianlucadv has joined #ruby-lang
gregf has joined #ruby-lang
gustavla has joined #ruby-lang
srbartlett has joined #ruby-lang
vesan has joined #ruby-lang
mssola has joined #ruby-lang
L0rdShrek has joined #ruby-lang
Fullmoon has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
burgestrand has joined #ruby-lang
max_ has joined #ruby-lang
mccraig has joined #ruby-lang
thejspr has joined #ruby-lang
max_ has joined #ruby-lang
skipper has joined #ruby-lang
abuiles has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
<mighty_max> is there an easy way to exit a Thread inside its block without assigning the thread to some variable?
agib has joined #ruby-lang
pvh has joined #ruby-lang
akahn has joined #ruby-lang
charper has joined #ruby-lang
<drbrain> mighty_max: raise will do it
<drbrain> Thread.current.exit
<drbrain> (or kill or terminate)
mrchrisadams has joined #ruby-lang
<mighty_max> drbrain: thanks
gix has joined #ruby-lang
moemen has joined #ruby-lang
dmathieu has joined #ruby-lang
dreinull has joined #ruby-lang
<dreinull> does Prawn include fonts or does the system chose the appropriate font?
hackeron has joined #ruby-lang
WillMars_ has joined #ruby-lang
bryancp has joined #ruby-lang
verto has joined #ruby-lang
dkannan has joined #ruby-lang
necromancer has joined #ruby-lang
cesario has joined #ruby-lang
havenn has joined #ruby-lang
<tla> is there any ruby implementation of secret sharing out there? My google-foo seems to be insufficient
denysonique__ has joined #ruby-lang
<imperator> secret sharing like secret santa?
<drbrain> "secret sharing" means what?
<tla> also known as split knowledge etc.
<drbrain> tla: if OpenSSL supports it ruby probably has a binding for it
<drbrain> or, the bindings support implementing it, at worst
<tla> drbrain: don't think openssl supports it - all I can find is some java pieces
<drbrain> tla: I see openssl pkeyutl -derive: http://www.openssl.org/docs/apps/pkeyutl.html
tenderlove has joined #ruby-lang
<tla> heh, I'm there - thansk
<drbrain> doesn't seem to be the same as Shamir's Secret Sharing Scheme
L0rdShrek has joined #ruby-lang
<tla> I'll have to do some more research
cldwalker has joined #ruby-lang
<drbrain> that looks nicer than what pkeyutl does
<tla> yup
<erikh> drbrain: I'm around now if you want to chat
<drbrain> erikh: so, what do you want to do about test.rubygems.org?
<erikh> well, I'd like to find a new maintainer
<drbrain> it is your project
<erikh> I've been casually looking for a new one, but no hard press
<erikh> EY will probably still sponsor and so there will be no downtime or anything, but improvements obviously need to be made
<drbrain> can you get a list of improvements together?
<drbrain> perhaps as github issues?
<erikh> well there are some in there now
<erikh> I will see if i can fill it out tonight
<drbrain> then we can say "hey rubyists! can you help fix […]"?
qpingu has joined #ruby-lang
<erikh> alright, I like that idea.
<erikh> I took at stab at getting rubygems-test to work with bundler
<erikh> because of the way rubygems-test works and bundler works, that's gonna be super-hard
<drbrain> erikh: `bundle exec rake test` won't be enough?
<erikh> basically it comes down to how they mess with RUBYLIB
<erikh> no, actually. that's what I was trying to do.
<erikh> I might be able to get it working if I change the cwd and require 'bundler/setup' before running the rest of the rubygems-test code
<erikh> that's a pretty wild guess though
<erikh> I'll see if I can swing it this weekend
<erikh> ... and put an issue in if anyone else wants to tackle it.
<erikh> ok; I'm going to scoot -- I'll check in later when I tackle the issues list if you have any questions/concerns
<erikh> off to mass effect
<drbrain> cool
gustavla has quit [#ruby-lang]
demeth has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
darkf_ has joined #ruby-lang