Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
nuclearsandwich joined #ruby-lang
ryanf joined #ruby-lang
tallship joined #ruby-lang
Skif joined #ruby-lang
sepp2k joined #ruby-lang
srbaker joined #ruby-lang
_inc joined #ruby-lang
srbaker_ joined #ruby-lang
flip_digits joined #ruby-lang
<slyphon> drbrain: quick question, w/ gemrc, can you specify defaults *per command*?
<slyphon> like --no-rdoc --no-ri ?
<drbrain> yes
<drbrain> all: gets applied to anything, install: gets applied to `gem install`, update: to `gem update`, etc
<slyphon> drbrain: and the keys are strings or symbols?
<drbrain> strings
<slyphon> ah, ok
<slyphon> i think i had symbols for a while and they stopped working
<drbrain> strings for gem command defaults, symbols for other defaults
<drbrain> it's weird
<slyphon> ah
<slyphon> thanks :)
<drbrain> maybe they worked that way a looong time ago and I broke it
<drbrain> I mean, symbols applying to commands
* slyphon nods
<slyphon> is there a cure for the YAML/Syck blues?
<slyphon> i just pushed out *another* fucked gem that someone told me about
chessguy joined #ruby-lang
<slyphon> i've been building w/ 1.8.7, that seems to help
<slyphon> but that's kinda...blech
<drbrain> we need to get rubygems.org running psych
<slyphon> ah
<drbrain> Defiler has been trying to push for it
<slyphon> hah! i had the opposite, symbols for commands and strings for the other
<slyphon> drbrain: it's really too bad that happened
<slyphon> it's the kind of thing where as the maintainer you're like "shit...now everyone's gonna blame *me* for that shit..."
<slyphon> drbrain: can't you put YAML::ENGINE.yamler = 'syck' for the meantime?
<slyphon> for gem build?
<drbrain> yeah, all because of an ages old bug is syck
<slyphon> fuckin _why
* slyphon has never been a fan
<slyphon> ok, hpricot is pretty awesome...
banister`sleep joined #ruby-lang
<drbrain> I *think* we've got all the proper workarounds in place
<slyphon> maybe i had an old rubygems or something
<slyphon> this latest rvm has been a little kooky
replore_ joined #ruby-lang
nofxx joined #ruby-lang
<muzone> people ignore design that ignores people
<slyphon> muzone: easy for you to say
<slyphon> muzone: wait, what?
<nofxx> Anyone using auto-complete.el in emacs? Can't get the tab to work nice in ruby mode, works fine in lisp/js mode...
looopy joined #ruby-lang
RickHull left #ruby-lang
RomD` joined #ruby-lang
<RubyPanther> nofxx: are you using rails-minor-mode or rinari?
<nofxx> RubyPanther: C-h k just guided me to 'rails-compat.el'
<nofxx> need to avoid it overwriting TAB
srbaker joined #ruby-lang
<RubyPanther> nofxx: I'm using rails-minor-mode which gives an autocomplete and doesn't interfere with the tab indenting
<zenspider> sexp_processor 3.0.8 released
marcostoledo joined #ruby-lang
<RubyPanther> I highly recommend it, not just for rails it is the best Ruby support IMO
<slyphon> zenspider: please, this is a family channel
* slyphon covers drbrain's eyes
<zenspider> :P
<slyphon> zenspider: look, bad puns are the best you're gonna get from me on a wednesday
<drbrain> slyphon: don't be lame
<slyphon> :(
<slyphon> well fine then. and i was gonna get you guys a pony!
<drbrain> slyphon: so… have you been reading ruby-core?
<slyphon> er, no
<slyphon> should i?
* slyphon should subscribe :/
<RubyPanther> slyphon: you can have a pony http://stuff.rubypanther.com/images/pony-200.gif
<zenspider> ponies make lots and lots and lots of poop
<zenspider> thank you, but no
<drbrain> there was a huge thread about removing swearing and perjoratives from ruby's source code
<drbrain> one of the words on the list was "lame"
<slyphon> oh noes!
<slyphon> drbrain: what?!
<slyphon> really?
<zenspider> ALLLLL thanks to Ryan "F-Bomb" Davis
<drbrain> yeah
<banister`sleep> drbrain: japanese programmers swear? :P
<drbrain> because we need to "think of the children"
<slyphon> in what language is that a curse?
<zenspider> no... 100% of them come from Seattle :D
<slyphon> jeez
<slyphon> i usually try to avoid 'fuck' in my comments
<slyphon> unless it's internal-only code
<slyphon> and even then
<zenspider> fuck em if they can't take a joke
<slyphon> :D
<zenspider> I grew up in a navy town... they're trying to infringe on my culture!
MistyM joined #ruby-lang
<drbrain> there's a patch to change "util_fuck_with_fetcher" to "util_muck_with_fetcher"
<zenspider> they're against my people!
<slyphon> zenspider: we named one of our services "Cornhole" at motionbox
<zenspider> (I'm against my people)
<drbrain> which isn't a much more descriptive name
<zenspider> drbrain: REJECTED!
<slyphon> that was my cover
<zenspider> motionbox? I think I worked on that once
<drbrain> oh? was the whole ticket reject?
<slyphon> hah
<slyphon> zenspider: yep
<slyphon> drbrain: back in like 2007/8 i think
<slyphon> drbrain: by that point, they were so happy that i fixed the damn thing
<slyphon> we went from millions of .js files on NFS to couchdb to Cornhole
<zenspider> drbrain: no, I have no clue if it was rejected or not
<slyphon> and cornhole had the wonderful characteristic of actually staying up under load
<zenspider> I just feel like the man is trying to keep me down
<drbrain> zenspider: I think it's up to me
<drbrain> I'm going to reject the "lame" patches because libraries won't block access to source code with "lame" in it
<drbrain> and I'm going to reject the "util_muck_with_fetcher" patch because it doesn't clarify anything
<slyphon> drbrain: you're the arbiter?
<drbrain> it's assigned to me, so I guess so?
<slyphon> wow
<slyphon> well, good on ya
<slyphon> drbrain: how did you get commits on core?
<zenspider> Ryan "F-Bomb" Davis' Law: The length of the thread is inversely proportional to the importance of the topic
<drbrain> matz said so after I submitted a bunch of patches
<slyphon> can i just say, i'm really surprised at how good the zed shaw "learn X the hard way" tutorials are
<slyphon> not *once* does he offer to rent a boxing ring to kick someone's ass
postmodern joined #ruby-lang
gearaholic joined #ruby-lang
<zenspider> and yet he still (probably--I don't talk to him anymore) swears that we almost went to blows in NYC
<banister`sleep> zenspider: do you have respect for zed shaw
<slyphon> zed is a talented dude
<zenspider> as a person? no
mkovacs_ joined #ruby-lang
kith_ joined #ruby-lang
srbaker joined #ruby-lang
<Asher> those books substitute brute force for intelligence
<Asher> it's like… bang your head on the keyboard 20 times… now what words can you form from the product?
uzimonkey joined #ruby-lang
<Squarepy> 20.times{puts 'bang head'}
headius joined #ruby-lang
samshull joined #ruby-lang
<RubyPanther> "Learn ___ the hard war" are better than I expected, though I wouldn't recommend them.
<yfeldblum> Asher: different people learn in different ways; generally speaking, it's no use trying to get someone to learn something one way when he learns another way; for some people, practice and repetition are critical to learning
<MistyM> RubyPanther: That apply to the C one too?
<RubyPanther> I think he switched to Lua
<Asher> practice and repetition are important
<Asher> practice and repetition are not the place to start
<Squarepy> _why
<Squarepy> oops
<RubyPanther> MistyM: Presumably, I don't remember which ones I looked at closely
<yfeldblum> Asher: that's wrong - my point is, for *some* people who are not *you*, practice and repetition *is* the place to start
<Asher> that's false
<Asher> you can't start with practice and repetition until you have something to practice and repeat
<RubyPanther> They were funny in that they do approximate the "learn by typing in off of handouts" method that I was taught in 6th grade Apple BASIC
<Asher> those books move past _what_ you're doing and straight into repeating the how
<RubyPanther> Please, have it better these days, better ways are know...
<Asher> there's little engagement with principles of thinking that go into design that one practices and repeats
Weems joined #ruby-lang
Weems joined #ruby-lang
<Asher> rubypanther - that's exactly my issue with them
Heimidal joined #ruby-lang
<RubyPanther> I do believe them to be dual-purpose art and professional profile, with the art being satire.
<RubyPanther> A cruel joke, because somebody out there will end up starting out on them.
<yfeldblum> Asher: there are many people who, no matter how many times you explain a principle to them or in how many ways, just will not get it until they practice and repeat it
<Asher> those are known in cs as "the ones who can't" :P
<Asher> about 30% of any given starting group
<yfeldblum> Asher: really, really not
<yfeldblum> Asher: when you were young, how did you learn spelling? or arithmetic?
<Asher> spelling by reading and writing
<Asher> that's not really practice and repetition - that's applied utilization
<RubyPanther> CS 1 it was funny, CS 2 it was sad... around finals time... watching people switch majors with a tear
<Asher> arithmetic sure practice and memorization but that's b/c arithmetic consists in identities
<Asher> programming does not consist in identities
<yfeldblum> Asher: many people also come into programming (or anything at all) with mental blocks - psychological barriers which need to be worked out; i've *seen* practice lower the mental block enough that the person can start to internalize the concepts
<yfeldblum> Asher: the point is that learning is super-complicated and varies hugely between individuals
<MistyM> yfeldblum: The "mental block" aspect is definitely very big, I think.
<Asher> again, i didn't say don't practice
<Asher> practice and repetition are important - once you've learned conceptually what's at stake
<RubyPanther> Okay, I'll say it. Don't practice. (play)
<MistyM> Honestly, I think that's why Excel macros/VBA are so entrenched. People need to do tasks and see programming as "hard", but see macros in software they already use as not being "programming". So people approach learning in a lopsided way and don't get the right fundamentals, when they'd be capable of being perfectly good at programming given the right start.
<Asher> i like rubypanther's suggestion there - practice should be play
<Asher> that is really what i dislike about those books - their notion of practice is like flagellating yourself
<MistyM> That's also a good point.
artOfWar joined #ruby-lang
<yfeldblum> MistyM: yes, there are many people who don't "get" programming because they've got the mental block - not because they're the kind who can't get it, not because they don't want to get it, not because they're stupid, not but because they're psychologically afraid and need to start with repeatedly practicing a small, successful task (like making a variable, assigning it once, and using it twice) and building that mental foundation
<yfeldblum> MistyM: indeed, with new things, I'm that way - i've recently been trying to figure out linux containers, and reading the manpages only goes so far; i've had to practice the same thing in slightly different ways to make any headway conceptually
<RubyPanther> _why talked about teaching programming to kids on the bus with a laptop and javascript swordfighting stick figures
<RubyPanther> with some fighting stick figures you can get excited about programming
<Asher> learning definitely requires doing
<RubyPanther> or if you're more advanced, Dwemthy's Array
<MistyM> Yes!
<yfeldblum> MistyM: i'm not always that way, but sometimes i am, and i know people around me who are that way sometimes as well, so i definitely understand that sometimes, what people need to do is start with successful practice and repetition
<MistyM> I thought Dwemthy's Array was a brilliant "practice as play" thing.
<MistyM> Not just in how you play by inputting simple lines of code, but how it silently encourages you to cheat by monkey-patching new code in, and how he tosses it at you in the book when he's doing stuff that's WAY more complex than what the reader knows yet. I kept going back to look at it when I understood more to understand the code better.
banister_ joined #ruby-lang
amerine joined #ruby-lang
aef_ joined #ruby-lang
aef_ joined #ruby-lang
aef joined #ruby-lang
<banister_> :P
spuk_ joined #ruby-lang
wyhaines joined #ruby-lang
mkovacs joined #ruby-lang
yours_truly joined #ruby-lang
Weems joined #ruby-lang
Weems joined #ruby-lang
lightcap joined #ruby-lang
nuclearsandwich joined #ruby-lang
livinded joined #ruby-lang
towski joined #ruby-lang
tomzx joined #ruby-lang
fayimora joined #ruby-lang
zomgbie joined #ruby-lang
ttilley joined #ruby-lang
sulo joined #ruby-lang
misham joined #ruby-lang
macmartine joined #ruby-lang
dr0id joined #ruby-lang
Banistergalaxy joined #ruby-lang
savage- joined #ruby-lang
flip_digits joined #ruby-lang
Swimming_Bird joined #ruby-lang
Weems joined #ruby-lang
Weems joined #ruby-lang
Phrogz joined #ruby-lang
x0F_ joined #ruby-lang
banister`sleep joined #ruby-lang
andman joined #ruby-lang
slyphon joined #ruby-lang
Banistergalaxy joined #ruby-lang
steph021_ joined #ruby-lang
steph021_ joined #ruby-lang
rohit joined #ruby-lang
rohit left #ruby-lang
havenn joined #ruby-lang
kitallis joined #ruby-lang
replore_ joined #ruby-lang
imperator left #ruby-lang
<flip_digits> I'm not seeing this (<=>) idiom at all. http://pastie.org/2876050
<flip_digits> why is Matz > Guido?
<ryanf> because Matz appears after Guido in alphabetical order
<flip_digits> ryanf: how does it know to compare alphabetically?
<ryanf> when you do str1 <=> str2, that is actually a method call on str1
<ryanf> which can also be expressed as str1.<=>(str2)
<ryanf> so it is using String's implementation of <=>
<flip_digits> ryanf: what if override it to compare things in my class? how does it know?
<uzimonkey> how does what know what?
<flip_digits> ryanf: …how does it know what is 'bigger'?
<uzimonkey> flip_digits: look up what String#> does
infid joined #ruby-lang
<uzimonkey> ooohhh, do you mean where is the > operator coming from?
<flip_digits> uzimonkey: I don't thing that's waht i'm asking about. I would like to know how the <=> method knows when one 'thing' is greater than anotehr 'thing'
<flip_digits> uzimonkey: if i wanted to comapre apples and orangers how would <=> know which is greater, the apple or the orange?
ksinkar joined #ruby-lang
wyhaines joined #ruby-lang
<ryanf> flip_digits: the <=> method returns iirc a -1, 0, or 1
<Banistergalaxy> flip_digits: coerce I guess
<ryanf> flip_digits: so on some level, if <=> is defined on an object, that definition will use some information that is specific to the objects at hand to decide which is "greater"
<ryanf> in your case, your <=> method is deferring to String's built-in <=> method, which itself uses string-specific information to choose which value to return
srbaker joined #ruby-lang
<ryanf> you can look at the source of that method here, although it's in C
<uzimonkey> don't forget the Comparable mixin
twittard joined #ruby-lang
<flip_digits> thanks ryanf: and uzimonkey:
banister`sleep joined #ruby-lang
srbaker joined #ruby-lang
tallship joined #ruby-lang
nofxx joined #ruby-lang
srbaker joined #ruby-lang
ecin joined #ruby-lang
slyphon joined #ruby-lang
srbaker_ joined #ruby-lang
ecin joined #ruby-lang
nuclearsandwich joined #ruby-lang
Xzyx987X joined #ruby-lang
dfr|mac joined #ruby-lang
towski joined #ruby-lang
kitallisii joined #ruby-lang
srbaker joined #ruby-lang
Heimidal joined #ruby-lang
Austin__ left #ruby-lang
gokulnath joined #ruby-lang
dfr|mac_ joined #ruby-lang
Defusal joined #ruby-lang
yxhuvud joined #ruby-lang
wyhaines joined #ruby-lang
nuclearsandwich joined #ruby-lang
livinded joined #ruby-lang
ixx joined #ruby-lang
JohnBat26 joined #ruby-lang
banisterfiend joined #ruby-lang
sqbell joined #ruby-lang
dc5ala joined #ruby-lang
voker57 joined #ruby-lang
apeiros_ joined #ruby-lang
zomgbie joined #ruby-lang
woollyams joined #ruby-lang
ecin joined #ruby-lang
workmad3 joined #ruby-lang
macmartine joined #ruby-lang
solars joined #ruby-lang
srbaker joined #ruby-lang
ixx joined #ruby-lang
lsegal` joined #ruby-lang
amerine joined #ruby-lang
hebz0rl joined #ruby-lang
jondot joined #ruby-lang
Defusal joined #ruby-lang
Defusal joined #ruby-lang
kain joined #ruby-lang
<shevy> hmm anyone knows on windows ... if I have 3 HDDs installed ... C: D: E
<shevy> but the booted windows is running on E: right now ... how can I find out, with ruby, which one is the "right" installation of windows?
[1]maarten joined #ruby-lang
<shevy> it seems so far I always defaulted to C: which may not always be true (like, in my case on the computer to my left side ...)
<ruskie> isn't there some %WINDIR% or something environment variable?
<shevy> ruskie ah that could be! thanks, I'll google a bit :)
zomgbie joined #ruby-lang
sulo joined #ruby-lang
geekfactor joined #ruby-lang
ixx joined #ruby-lang
jondot joined #ruby-lang
<shevy> google found it it seems, for anyone interested it is ENV['HOMEDRIVE'] :)
Mchl joined #ruby-lang
yorickpeterse joined #ruby-lang
mytrile joined #ruby-lang
heftig joined #ruby-lang
saLOUt joined #ruby-lang
voker57_ joined #ruby-lang
<RubyPanther> <6.28318530717958> expected but was <6.28318530717959>
<RubyPanther> I got an off-by-one-hundred-trillions error, wtf is with that
<RubyPanther> trillionth
burgestrand joined #ruby-lang
DEac- joined #ruby-lang
<shevy> what are you writing
<shevy> a ruby laser
cyri_ joined #ruby-lang
RomD joined #ruby-lang
robotmay joined #ruby-lang
gnufied joined #ruby-lang
srbartlett joined #ruby-lang
srbartle_ joined #ruby-lang
woollyams joined #ruby-lang
roadkith joined #ruby-lang
towski joined #ruby-lang
<zenspider> RubyPanther: you don't ever use assert_equal with floats
Heimidal joined #ruby-lang
<RubyPanther> zenspider: what makes you think it is a float?
zmack joined #ruby-lang
jondot joined #ruby-lang
<zenspider> because BigDecimal doesn't inspect like that
adambeynon joined #ruby-lang
cirwin joined #ruby-lang
molgrew joined #ruby-lang
<banisterfiend> zenspider: do u think that RubyPanther has a brain the size of a lemon and two bug-eyes that stick out on stalks with no more feeling in them than the eyes of a crab
<RubyPanther> How is that a "troll?" You should apologize for name-calling
<RubyPanther> And for the record, it is not two floats
<RubyPanther> I mean that is the real kicker of it, My joke was actually mildly funny, _and_ your complaint was self-important but wrong.
<zenspider> banisterfiend: new zealand trolls look like that?
<banisterfiend> zenspider: RubyPanther is one of yours, some flavor of american
<zenspider> heh
<zenspider> still... odd imagery
<roadkith> zenspider is american?
<RubyPanther> No, Americans are much more polite.
<roadkith> superficially ;)
ammar01 joined #ruby-lang
heftig joined #ruby-lang
* banisterfiend sets mode: +stfu RubyPanther
<zenspider> hah
<RubyPanther> roadkith: it would sure be a start
<RubyPanther> It people would at least act on the surface like they have respect for others, imagine what a nice community we would have! Not Matz-level nice, but at least not raging cyber-bully nice like it is now.
<banisterfiend> RubyPanther: maybe ppl dont like you because you're actually a dick
<RubyPanther> banisterfiend: maybe people who are dicks don't like me, because I ask them to show basic respect?
<zenspider> big difference between "raging cyber-bully" and "not suffering fools lightly"
<RubyPanther> I only ask for the level of basic respect you would show to another person in a cafe, I am not asking you to be as nice as you would be expected to be at a RUG or LUG or whatever
<RubyPanther> zenspider: how am I fool, when I made a joke and you missed it because you believed you somehow knew what the types were? (you were wrong)
<RubyPanther> And then you make the cyber-bully counter joke where you call names with a fake error.
<zenspider> for starters, basic grammar and/or typing
srbartlett joined #ruby-lang
StevenRingo joined #ruby-lang
<RubyPanther> You're complaining about "basic grammar" in a sentence that is uncapitalized and missing basic punctuation? Gimme a break, people do not speak in perfect grammar. Including you!
<ryanf> capitalization and punctuation are not grammar
<ryanf> pretty weak insult though imo
<RubyPanther> Of course it is weak, bully sauce is always weak.
<banisterfiend> RubyPanther: you've got to stop this whole 'bully' thing, you sound like a 14 year old school girl writing letters to the school magazine
<ryanf> or zed
<RubyPanther> This is a public channel, the official Ruby help and discussion channel, I think I have every right to ask not to be bullied, every time it happens.
<RubyPanther> Having a clique that does it as a group lately doesn't make it okay, or make it wrong for me to complain.
<RubyPanther> Matz is nize, so please be at least a little nice yourself!
<zenspider> the thing is... we're tired of your whining. you're not being bullied. you're self-martyring instead.
<zenspider> I don't put up with your bullshit
<zenspider> that's hardly bullying
<RubyPanther> Imagine being the person who receives bullying repeatedly, to them it might also seem like there are too many teenagers around.
<banisterfiend> RubyPanther: sup
<banisterfiend> :P
<zenspider> maybe he'll cool off... I doubt it... but maybe
<oddmunds> i don
<oddmunds> i don't really follow your drama, but nobody has the _right_ to any respect.
sulo joined #ruby-lang
<zenspider> Even _I_ don't follow my drama :P
<banisterfiend> anyone have experience implementing next/step ?
<banisterfiend> using set_trace_func perhaps
<zenspider> STF is how the native debugger does it
<banisterfiend> zenspider: ruby-debug or the crummy ones that comes with ruby you mean?
<banisterfiend> one*
<zenspider> the crummy one
<zenspider> I'm reading through my version (zendebug.rb) now... it's messy, but at least it isn't C
<banisterfiend> zenspider: is there a gem for that?
<zenspider> um... it may have shipped in zenhacks
<zenspider> checking
<zenspider> it's really just the regular debug.rb but using event_hook to speed it up
<zenspider> yeah. it is in zenhacks 1.0.1
<banisterfiend> zenspider: does 'next' work properly all the time? or does it muck up on edge cases?
<banisterfiend> cos i talked to a guy who implemented next using just STF and there were certain situations where it would do the wrong thing
<zenspider> honestly, I've used the ruby debugger about 3 times and have never been too pleased with it
<zenspider> doesn't stop on some breakpoints... etc.
<zenspider> my guess is it is all related
<banisterfiend> zenspider: what do you think of ruby-debug (the C one) ?
<zenspider> haven't ever used it.
<zenspider> doesn't work with stock ruby on osx...
<zenspider> it rapes the ruby internals by downloading the source of your current ruby to get at the headers and there is no release for the stock osx ruby
neoesque joined #ruby-lang
<zenspider> huh.. apparently at some point I was working on a ruby/ocaml bridge
<zenspider> banisterfiend: is this for pry or something else?
benanne joined #ruby-lang
<banisterfiend> zenspider: yeah i keep getting requests to implement next/step so im going to try to write a plugin. I got 'up/down' (stack navigation stuff) working already as an (evil) C extension plugin
<zenspider> you're a sick fuck... you know that? :P
<banisterfiend> hehe
<banisterfiend> binding_of_caller was pretty easy in the end at least for 1.9, but for 1.8 i havent got a clue
replore joined #ruby-lang
jondot joined #ruby-lang
<zenspider> yeah... not something I'd try to do :P
<banisterfiend> yeah it requires source diving in eval.c
workmad3 joined #ruby-lang
ksinkar joined #ruby-lang
roadkith joined #ruby-lang
robotmay joined #ruby-lang
<andrewvos> Morning
sirfilip joined #ruby-lang
<zenspider> 'lo
<andrewvos> I haven't had internet for two days. What's new? Any developers disappeared?
<banisterfiend> andrewvos: haha, that's a pretty apposite question :P
<andrewvos> banisterfiend: Someone *has* disapearred?
donatello92 joined #ruby-lang
<andrewvos> I thought it said "Stop Online Privacy Act". I was thinking "now that's a bit now much isn't it".
kedare joined #ruby-lang
yfeldblum joined #ruby-lang
infid joined #ruby-lang
<khaase> is chunky_png thread-safe?
fayimora joined #ruby-lang
zomgbie joined #ruby-lang
Xzyx987X_ joined #ruby-lang
donatello92 left #ruby-lang
zmack joined #ruby-lang
<yorickpeterse> If I have a number of lambdas of which each lambda contains a large amount of strings (which aren't stored outside of the lambda). Is the memory for those objects allocated the moment each lambda is created or is it allocated once you invoke #call() on such a lambda?
<banisterfiend> yorickpeterse: call
<yorickpeterse> banisterfiend: Thanks, I had a hunch that would be the case
DEac- joined #ruby-lang
<apeiros_> khaase: it's safe to assume *nothing* is thread-safe unless explicitly stated otherwise.
<khaase> apeiros_: also, distributing CPU intensive stuff over threads brings no performance on MRI
<khaase> so
<khaase> well
<khaase> who cares
<banisterfiend> khaase: if you want performance you prob shouldnt be using chunky_png :P a pure ruby graphics lib sounds like the slowest of the slow hehe
<khaase> yes
<khaase> I know
zomgbie joined #ruby-lang
<khaase> banisterfiend: object detection can easily be distributed
<khaase> device and conquer style
<khaase> *devide
<khaase> however, on mri, using a thread pool, it gets slower rather than faster
<banisterfiend> too bad it's just chunkPNG
spuk joined #ruby-lang
<banisterfiend> id prefer to use my own graphics lib for this as it has a bunch of fast/useful things for this kind of challenge
frankz joined #ruby-lang
<sirfilip> banisterfiend: and then you are using ruby and ruby does have something called monkey patching
<sirfilip> lots of people forget about this
<banisterfiend> sirfilip: my lib is in c
roadkith joined #ruby-lang
<sirfilip> i dont think that it would make a difference if you are using ruby class as interface
<sirfilip> just create initializer that will override some of its methods
<banisterfiend> sirfilip: The internal data structures are all in C of course and teh C methods interface with that, i cant just transfer methods from one class to another when the internal structures are totally differnt
<banisterfiend> anyway blah
<whitequark> banisterfiend: I'm not trying to make money with that or whatever
<banisterfiend> whitequark: ?
<whitequark> (strange loops ftw!)
<banisterfiend> whitequark: i was just pointing out that IRCSEEK closed down because of the complaints they got from ppl who did not like being logged and published online. But the main issue with irseek was that you could just type someones nick into google and find everything they said on IRC; if you're not going to allow the logs to be searchable via google then it's not an issue
toretore joined #ruby-lang
pankajdoharey joined #ruby-lang
<whitequark> toretore: are you, by a mere coincidence, the author of lucy/babilu?
workmad3 joined #ruby-lang
<toretore> whitequark: indeed
<rue> banisterfiend: Of course it's still an issue, just marginally obscured
michael_imac joined #ruby-lang
<whitequark> toretore: any ideas of integrating both to the rails 3 asset pipeline? I'm currently using a crude hack, but it's really ugly
jb-san joined #ruby-lang
mnoble joined #ruby-lang
<banisterfiend> khaase: i cant see a due date for that competition on that page, when are the entries due?
<khaase> banisterfiend: no idea
<khaase> banisterfiend: I also suck at this. I have edge detection working, but my algorithm for sampling the surrounding brightness takes for ever at the moment.
<toretore> whitequark: no, sorry, i don't have much experience with r3 yet. it'll be updatet, but probably not in a while. if you have a look at github, there are a couple of forks/pull reqs that claim to have done it, but i have no idea how good it is
<khaase> trying to do this without using rmagick: http://www.imagemagick.org/discourse-server/viewtopic.php?f=22&t=19126
jensn joined #ruby-lang
<dr0id> winner gets $7 :P
<khaase> ha
<khaase> yeah
<khaase> didn't even look at this
<khaase> not sure if I'm going to submit my solution at all
<khaase> but it's a fun thing to play with
<banisterfiend> khaase: it says we get a week but it doesnt say from when, any idea when the competition article was posted?
<khaase> one or two days ago
<khaase> I guess
<whitequark> toretore: well, one of these forks is mine. when I looked at them 2.5 months before, there were no good solutions, through
<banisterfiend> khaase: i have DIP :)
<banisterfiend> khaase: "Digital Image Processing", a huge hardback yellow book kind of the bible for image processing, covers everything in way too much detail and discrete fourier transforms
<khaase> ha
<banisterfiend> probably better off sticking to wikipedia
<khaase> yeah
<khaase> I can't believe edge detection was easier for me than brightness sampling.
<khaase> the naive approach is just too slow (not sure if it would finish, didn't let it)
<banisterfiend> khaase: maybe you could prototype your solution in rmagick and then convert to chunkpng once u know it works
<khaase> banisterfiend: rmagick has filters for all this
<khaase> you can just say: sample that stuff
<banisterfiend> but i mean you'd restrict yourself to the equivalent of chunkPNG's api
<khaase> also, I use oily_png
<khaase> right
whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
michael_imac_ joined #ruby-lang
<toretore> whitequark: ah :) i've been meaning to update it, but that means getting into this asset pipeline stuff and i never seem to have the time :/
mhink joined #ruby-lang
<whitequark> toretore: well, this happens with everyone
<mhink> so, just finished my first non-trivial ruby project
<mhink> yay
<mhink> wait... damn
<mhink> scumbag program: takes 10 minutes to execute... throws TypeError at the very end
<manveru> :P
zomgbie joined #ruby-lang
_inc joined #ruby-lang
<andrewvos> API versioning. How does everyone here like to do it?
<andrewvos> Sorry I mean *web* api versioning.
<banisterfiend> anyone here have an ipad?
<Tasser> banisterfiend, you want to run pry on an ipad?
sepp2k joined #ruby-lang
<banisterfiend> haha no
<banisterfiend> im just buying a tablet tomorrow but im not sure when i would use it over just using my laptop
S1kx joined #ruby-lang
<banisterfiend> so i want to see if people who own a tablet have found a place for it wehre they'd prefer to use it over their regular laptop
<andrewvos> banisterfiend: I found giving my ipad away to my sister was the best use for it.
<andrewvos> banisterfiend: And buying a MBA
<lianj> :>
<banisterfiend> andrewvos: i already have an MBA :P but i just really like the idea of a tablet PC, i just cant think of a use for it outside of it being an $800 e-book reader
<andrewvos> banisterfiend: Kindle is better.
S2kx joined #ruby-lang
<banisterfiend> andrewvos: i also think a tablet PC could be great for brainstorming programming ideas on
<banisterfiend> esp. with a stylus
<andrewvos> banisterfiend: Buy a moleskine
<andrewvos> :)
<banisterfiend> a what?
<andrewvos> Just asketch book
<whitequark> andrewvos: make /api/v1. keep it forever. make a better one at /api/v2.
<whitequark> repeat.
<andrewvos> whitequark: I know. Someone mentioned using headers today...
<andrewvos> whitequark: And I don't particularly like that.
<whitequark> URL-based approach is clear and robust
<whitequark> you can use things like nginx to redirect them to backends, etc.
<whitequark> you can still do almost everything if you have headers, but I really prefer the urls
<andrewvos> I very much agree
sepp2k joined #ruby-lang
<molgrew> how does it work to decide to get a tablet, and not be sure what it'd be useful for?
<mhink> there was a writeup on hn the other day about a guy who switched all his development over to ipad+issh+tmux+linode
<mhink> pretty good read, lemme see if I can find it
<molgrew> it *sounds* a bit like cart before horse
<banisterfiend> molgrew: cos im attracted by the shiny gadgetiness of them
<mhink> news.ycombinator.com/item?id=3186476
<banisterfiend> mhink: cool
<banisterfiend> molgrew: and i have the smaller version, galaxy s2
<mhink> I tried something similar... only since I'm poor it was sideways netbook + putty + wireless keyboard + linux box at home
<mhink> and it went pretty okay.
<mhink> still want an ipad though.
pankajdoharey left #ruby-lang
<banisterfiend> mhink: that's a great article
<banisterfiend> mhink: you more into ios than android?
pankajdoharey joined #ruby-lang
mnoble joined #ruby-lang
GutenLinux joined #ruby-lang
sepp2k joined #ruby-lang
<echoprinter> Would I use this http://www.ruby-doc.org/core-1.9.3/String.html#method-i-rjust if I wanted to print a column of numbers like this: http://www.pastie.org/2877722
jondot joined #ruby-lang
zomgbie joined #ruby-lang
zomgbie joined #ruby-lang
scottschecter joined #ruby-lang
malev joined #ruby-lang
<manveru> >> -20.step(60, 10).to_a.map{|n| "%6s" % n }.join.lstrip
<manveru> => "-20 -10 0 10 20 30 40 50 60"
<khaase> dang, just saw the price. I already have a free github micro
<manveru> "%6s" % n == n.to_s.rjust(6)
syphar joined #ruby-lang
marcostoledo joined #ruby-lang
<banisterfiend> khaase: ducks is by far the hardest
<khaase> banisterfiend: are you working on it?
<khaase> banisterfiend: I'm having issues with ducks, too
cjs226 joined #ruby-lang
<khaase> banisterfiend: everything around the ducks is edges
<banisterfiend> khaase: reading about it in DIP, the technique to use is something called thresholding after first applying a gaussian blur (apparently)
<khaase> dog and cat was easy with the edge finding approach
<banisterfiend> yeah
<khaase> but for the duck picture everything but the ducks is edges
<khaase> I mean, I could do the inverse
<khaase> center on the least edgy part
<khaase> but how to figure out which approach to use?
adambeynon joined #ruby-lang
<banisterfiend> khaase: what's your edge finding technique? just calculating derivatives?
<khaase> banisterfiend: I simply hacked down PreWitt
<khaase> banisterfiend: all I know about DIP I learned yesterday from wikipedia
<banisterfiend> khaase: have you tried applying a blur to teh ducks before doing your thresholding
<khaase> banisterfiend: no, chunky_png has no blur function afaik
<khaase> banisterfiend: neither has it built in tresholding
<khaase> rmagick has both
<banisterfiend> khaase: naive blurs are pretty easy though, just set every pixel to the average of the 4 pixels around it or so
<khaase> yeah
<khaase> I just meant: that's why I haven't tried it...
<banisterfiend> ah ok
<banisterfiend> yeah i imagine it's really slow too
mnoble left #ruby-lang
<banisterfiend> kind of frustrating having to solve the problem as well as fight against the slow lib
<khaase> adding a treshold shouldn't be to hard either
<khaase> yeah
<khaase> I solved my performance issue with sampling but simply jumping over pixels btw
<banisterfiend> makes sense
yalue joined #ruby-lang
<khaase> another idea was to somehow estimate how edgy the picture is overall
shevy joined #ruby-lang
<khaase> and if it's edges all over the place, center on the thing that's not full of edges
fayimora joined #ruby-lang
leopard_me joined #ruby-lang
<khaase> dunno yet how to do "edges all over the place" though
<echoprinter> manveru: Hell yeah, that's cool: -20.step(60, 10).to_a.map{|n| "%6s" % n }.join.lstrip ...I'm very unfamiliar with those methods lstrip map....etc... Pick Axe & Beg. Ruby do not really show you how to do stuff like that. :/
yfeldblum joined #ruby-lang
<echoprinter> Well, maybe Pick Axe but it's more reference than anything.
<echoprinter> thanks.
voker57_ joined #ruby-lang
geekfactor joined #ruby-lang
tommyvyo joined #ruby-lang
Spooner joined #ruby-lang
leopard_me joined #ruby-lang
dotan joined #ruby-lang
judofyr joined #ruby-lang
<judofyr> oooh, zenspider is showing all his eight legs today?
_inc joined #ruby-lang
jacky123 joined #ruby-lang
<jacky123> what purpose does `use` serve? i saw a piece of code -> `use SomeLib`
Phrogz joined #ruby-lang
dv310p3r joined #ruby-lang
<molgrew> what is the context?
<Tasser> jacky123, it's a user-defined method ;-)
<judofyr> jacky123: you probably saw it in a .ru file, no?
<judofyr> jacky123: but yeah, as Tasser said: it's just a method
<jacky123> ok
<sirfilip> what do you mean molgrew ?
<judofyr> jacky123: if it's in Rack/Rails/web-framework search for "rack middleware"
<judofyr> jacky123: and come back here if you still get the concept :)
<molgrew> sirfilip: the context of the occurrence of that piece of code
CarlosAkaRubyNoo joined #ruby-lang
cjs226 joined #ruby-lang
Phrogz joined #ruby-lang
<molgrew> with context I meant the surrounding code and things like that
<molgrew> or ".ru" file
<sirfilip> .ru is a rackup file
<molgrew> are you a bot?
<sirfilip> context in ruby is related with Binding
<sirfilip> if you want to gain access to the current context you do so by calling the binding methof
<jacky123> LOL
Phrogz joined #ruby-lang
mortice joined #ruby-lang
<molgrew> is my leg being pulled?
<sirfilip> everything works in beta
<sirfilip> how's that molgrew
<sirfilip> ahhh
<sirfilip> so it is not a question
<sirfilip> about what is context in ruby
<sirfilip> sorry mate
mortice left #ruby-lang
wyhaines joined #ruby-lang
<jacky123> i am not offending, but at a friendly note, LOL
<whitequark> indeed.
hexo joined #ruby-lang
wyhaines_ joined #ruby-lang
dfr|mac joined #ruby-lang
malev joined #ruby-lang
<andrewvos> I'm bored. Maybe I should write sinatra in another language. Oh, wait, IT'S BEEN DONE IN EVERY LANGUAGE.
<yorickpeterse> Do it in assembly
<andrewvos> yorickpeterse: Or: http://lolcode.com/
<banisterfiend> andrewvos: figure out a way to reliably reload individual methods
<banisterfiend> instead of reloading the entire file
Indian joined #ruby-lang
<whitequark> banisterfiend: what if they depend on other methods/classes?
<whitequark> that may be possible with ruby_parser, through, if only it'd support 1.9
lenilson_dias joined #ruby-lang
<banisterfiend> whitequark: you mean the rewritten method has dependencies on currently unloaded classes?
adamjleonard joined #ruby-lang
<banisterfiend> whitequark: i guess that's the responsibility of the person rewriting the method to ensure that the dependencies are loaded
<judofyr> andrewvos: figure out a way to do reloading with processes/forks that works in Windows
empity joined #ruby-lang
tomzx joined #ruby-lang
flip_digits joined #ruby-lang
joast joined #ruby-lang
<banisterfiend> whitequark: here's a very simple/inflexible proof of concept, but it doesnt cover many edge cases: https://github.com/banister/method_reload
<banisterfiend> i think something more robust might require a different strategy
vesan__ joined #ruby-lang
flip_digits joined #ruby-lang
<andrewvos> judofyr: Windows? :(
<judofyr> andrewvos: yes, with windows
<judofyr> andrewvos: also, it only needs to support Rack
unixabg left #ruby-lang
robbrit joined #ruby-lang
yalue joined #ruby-lang
<whitequark> banisterfiend: I like the conciseness of your solution
leopard_me joined #ruby-lang
outoftime joined #ruby-lang
<banisterfiend> thanks but it's quite limited unfortunately, and yeah i think a more robust solution would use something like ruby_parser and so on
jwill joined #ruby-lang
<judofyr> banisterfiend: why not just reload the whole class?
<whitequark> judofyr: what if you don't have a class?
<judofyr> ops
<judofyr> file*
<banisterfiend> judofyr: class body might be setting state or running class methods
<banisterfiend> things that should only be run once during initialization
<banisterfiend> judofyr: or other things that could break, like: class Hello < Struct.new(:blah, :bing, :bo)
<judofyr> banisterfiend: Object.send(:remove_const, klass) :D
<banisterfiend> superclass mismatch etc
Dreamer3 joined #ruby-lang
<judofyr> banisterfiend: that's how we do reloading in Camping :/
<banisterfiend> judofyr: so you'd scan through the file looking for constants that are defined and undefining them before you reload it?
<judofyr> banisterfiend: I *really* really *really* want to change to separate processes
fayimora joined #ruby-lang
<judofyr> banisterfiend: in Camping we have Camping::Apps that contains all apps defined
<judofyr> and we only remove camping apps from $LOADED_FEATURES
<judofyr> so only Camping apps are reloaded
<judofyr> (not other libs)
<banisterfiend> judofyr: but we're talking about a general solution for method reloading
<banisterfiend> interesting though
<banisterfiend> was that _why's idea?
MistyM joined #ruby-lang
thrcka joined #ruby-lang
slyphon joined #ruby-lang
slyphon_ joined #ruby-lang
<banister`sleep> judofyr: wow _why uses 4 space indents
<banister`sleep> hehe
savage- joined #ruby-lang
<banister`sleep> a real iconoclast
<banister`sleep> :)
<judofyr> banister`sleep: used then at least. not sure if his newest stuff used 4 spaces or not :)
leopard_me joined #ruby-lang
<banister`sleep> committed on 2006 wow
<judofyr> banister`sleep: sure, most of Camping is from 2006 :)
<judofyr> banister`sleep: v1.5 was released in 2006. v2.0 (the Rack rewrite) was in 2010 :)
<whitequark> banister`sleep: do you know the history of indentation trends in ruby?
<whitequark> I'm curious
<banister`sleep> judofyr: it's a pretty cool little project
<banister`sleep> why the name camping?
<banister`sleep> whitequark: nah, ive oly been around since 2008 myself, probably best to ask one of the old timers like zenspider or rue
<judofyr> banister`sleep: not sure really
<judofyr> banister`sleep: I love the introduction blog post: http://viewsourcecode.org/why/redhanded/bits/campingAMicroframework.html
ik_5 joined #ruby-lang
<ik_5> hello
<banister`sleep> judofyr: brilliant
whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<judofyr> banister`sleep: but yeah, I'd totally recommend going through https://github.com/camping/camping/blob/master/lib/camping.rb and understanding everything :D
<judofyr> there's quite a few tricks there
rayners joined #ruby-lang
<judofyr> like: class User < R '/user/(\d+)'; end
<banister`sleep> maybe i can use something like that for processing multi-line expressions
<judofyr> banister`sleep: defined? <3
<banister`sleep> judofyr: he's using it in a weird way, like: defined?(class << String; def m; 10; end; end)
<banister`sleep> parsing without executing
<banister`sleep> pretty interesting
<judofyr> banister`sleep: that's executing
<judofyr> defined?(foo.bar.bar)
<banister`sleep> ah
<judofyr> raises an exception
<banister`sleep> oh it does too
<banister`sleep> scratch that then
<judofyr> banister`sleep: didn't I mention the throw/catch-trick?
<banister`sleep> judofyr: Yeah, can u gist it again?
<banister`sleep> it caused rbx to fail its tests that's why i took it out, but maybe i can just leave it out of rbx and use it for the others
<banister`sleep> likely a bug in rbx anyway
rippa joined #ruby-lang
<judofyr> banister`sleep: https://gist.github.com/1373383
<banister`sleep> thnks
scampbell joined #ruby-lang
Swimming_Bird joined #ruby-lang
steph021_ joined #ruby-lang
steph021_ joined #ruby-lang
Banistergalaxy joined #ruby-lang
whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
RickHull joined #ruby-lang
mark_locklear joined #ruby-lang
wyhaines joined #ruby-lang
<sirfilip> is there anybody out there ?
<whitequark> sirfilip: I am
<lianj> siri too
tbuehlmann joined #ruby-lang
JoeDeso joined #ruby-lang
kmeehl joined #ruby-lang
* sirfilip feels like Robbie Williams
<whitequark> sirfilip: in what sense?
<sirfilip> popular
slyphon joined #ruby-lang
<sirfilip> and this is how Robbie feels when he asks that question on the stage
<sirfilip> wonderful
<sirfilip> should have been a singer
<samuelkadolph> BOOOO. YOU SUCK. GET OFF THE STAGE.
* sirfilip calls the security
<manveru> i thought you quoted gorillaz
<sirfilip> it is a generic statement
<manveru> hm, pink floyd
<sirfilip> :) whenever i hear that someone is listening pink floyd a question mark appears on top of my head
<samuelkadolph> Someone has a quest to turn in to you?
<sirfilip> m?
<sirfilip> great didnt know that
fayimora joined #ruby-lang
infid joined #ruby-lang
jondot joined #ruby-lang
io_syl joined #ruby-lang
<manveru> also, highly relevant: https://www.youtube.com/watch?v=_Sc2UkrMZQQ :)
<sirfilip> yup thats the one
io_syl joined #ruby-lang
<sirfilip> night mates
sirfilip left #ruby-lang
heftig joined #ruby-lang
skammer joined #ruby-lang
adambeynon joined #ruby-lang
RickHull joined #ruby-lang
ik_5 left #ruby-lang
rushed joined #ruby-lang
nuclearsandwich joined #ruby-lang
Indian joined #ruby-lang
<rue> whitequark: I don't recall any particular trends. It's always been pretty much as it is now. I guess previously it was more OK to indent whens deeper than the case, and there's still the same arguments about indenting assignments where RHS is a conditional/block etc.
alfakini joined #ruby-lang
<whitequark> rue: it's just that I have seen weird indentation in both ancient and not quite usual code
<whitequark> i.e. stuff from RAA and metasploit
<rue> There're always renegades
nofxx joined #ruby-lang
Skif_home joined #ruby-lang
Pip joined #ruby-lang
tenderlove joined #ruby-lang
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
jondot joined #ruby-lang
kith joined #ruby-lang
riush joined #ruby-lang
darkf joined #ruby-lang
macmartine joined #ruby-lang
apeiros_ joined #ruby-lang
frankz joined #ruby-lang
tallship joined #ruby-lang
samshull joined #ruby-lang
towski joined #ruby-lang
<andrewvos> Anyone noticed that restclient doesn't send some headers when using it inside a thread?
<andrewvos> Thread.new I mean
<rue> Nope, sounds weird. Are those headers set by you?
<andrewvos> rue: Yeah.
<andrewvos> There's one request and then a second request... All called on the class
<andrewvos> RestClient.get I mean
<rue> Might you be trampling on the data?
<andrewvos> rue: Seems like it
Arsen7 joined #ruby-lang
kvs joined #ruby-lang
phaedrix joined #ruby-lang
<MistyM> Hm. What would be a good way to grab groupings of 2 characters from a string and iterate on those? I know bytes/each_char, but I'm hoping to take a string of binary data to treat as 16-bit sets.
<apeiros_> there's each_slice(2)
<apeiros_> also scan(/../), but there you must make sure you have regex & string in binary encoding
<erikh> characters
<erikh> not bytes
<apeiros_> *sob* I should take a nap
<erikh> presuming that's what MistyM meant
<erikh> play more skyrim
<apeiros_> 2nd bigger misread within ~3min
<erikh> it solves everything.
<apeiros_> I can't
<erikh> hehe
<apeiros_> no xbox, no windows
<erikh> ah, yeah, that's a problem :P
<apeiros_> pondering on getting an xbox
<apeiros_> but for now, I got zelda, skyward sword.
<erikh> boot camp?
<apeiros_> yeah, also a solution. but I like my tv screen and couch-gaming
<erikh> ah, I see
<MistyM> apeiros_: I thought Skyward Sword came out in a few days?
<apeiros_> also, technically the imac belongs to my wife :-/
cjs226 joined #ruby-lang
<erikh> I was going to say the PC is prettier but if you like doing it that way instead...
<apeiros_> MistyM: officially, yes
RORgasm joined #ruby-lang
<erikh> heh
<apeiros_> inofficially, my store has got it since tuesday
<MistyM> Ahh.
<apeiros_> had to wait, though, because I wanted collectors edition and signed up too late for it
<apeiros_> so they had to ship it from one shop to another :)
<shevy> gaming nerds everywhere!
_inc joined #ruby-lang
Heimidal joined #ruby-lang
pschmitz_ joined #ruby-lang
<MistyM> And apeiros_, you were right! each_slice with my existing enum looks to be pretty much ideal.
<apeiros_> so, nap time now. dinner & saving zelda later.
<apeiros_> MistyM: yw
<MistyM> Now I just need to get ffmpeg to feed me my 16bit data. :b
<shevy> still sounds awesome even though I already forgot what you are doing
<MistyM> I don't think I said!
<MistyM> Processing some raw YUV video stuff.
srbaker joined #ruby-lang
lightcap joined #ruby-lang
srbaker joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
nuclearsandwich joined #ruby-lang
towski joined #ruby-lang
butchanton joined #ruby-lang
yalue joined #ruby-lang
sulo joined #ruby-lang
Carnage\ joined #ruby-lang
lightcap joined #ruby-lang
rippa joined #ruby-lang
ecin joined #ruby-lang
samshull joined #ruby-lang
ksinkar joined #ruby-lang
amerine joined #ruby-lang
cirwin joined #ruby-lang
benanne joined #ruby-lang
jensn joined #ruby-lang
cirwin left #ruby-lang
dejongge joined #ruby-lang
havenn joined #ruby-lang
solars joined #ruby-lang
Pip joined #ruby-lang
_inc joined #ruby-lang
livinded joined #ruby-lang
Carnage\ joined #ruby-lang
heftig joined #ruby-lang
robotmay joined #ruby-lang
nuclearsandwich joined #ruby-lang
Manhose joined #ruby-lang
Xzyx987X joined #ruby-lang
kitallis joined #ruby-lang
empity joined #ruby-lang
infid joined #ruby-lang
Pip joined #ruby-lang
empity` joined #ruby-lang
empity joined #ruby-lang
_inc joined #ruby-lang
ryanf joined #ruby-lang
adamjleonard joined #ruby-lang
epitron joined #ruby-lang
epitron joined #ruby-lang
Dynamus joined #ruby-lang
shachaf joined #ruby-lang
topaz joined #ruby-lang
Mozillion joined #ruby-lang
corecode joined #ruby-lang
segy joined #ruby-lang
iwamatsu joined #ruby-lang
Natch| joined #ruby-lang
RegEchse joined #ruby-lang
joschi joined #ruby-lang
pschmitz_ joined #ruby-lang
_inc joined #ruby-lang
Natch| joined #ruby-lang
macmartine joined #ruby-lang
Skif joined #ruby-lang
workmad3 joined #ruby-lang
Carnage\ joined #ruby-lang
solars joined #ruby-lang
nofxx joined #ruby-lang
Jake232 joined #ruby-lang
ruskie joined #ruby-lang
empity joined #ruby-lang
perplex joined #ruby-lang
resetexistence joined #ruby-lang
erics joined #ruby-lang
Manhose_ joined #ruby-lang
nuclearsandwich joined #ruby-lang
wyhaines joined #ruby-lang
macmartine joined #ruby-lang
<rue> Hm
pschmitz_ joined #ruby-lang
headius joined #ruby-lang
srbaker joined #ruby-lang
<flip_digits> class Forem::ApplicationController < ApplicationController : does this say,the Forem::AplicationController is a mixin that inherites from Application Controller?
<flip_digits>
Transformer joined #ruby-lang
<samuelkadolph> Mixin, no
<flip_digits> samuelkadolph: how do I read that?
<samuelkadolph> It's a class that subclasses another class
danted joined #ruby-lang
<flip_digits> is Forem::ApplicationController a class that uses a mixin?
<samuelkadolph> No
<danted> hey guys, i just finished learn to program by chris pine. im kind of at a loss on how to progress further though. is there any good sites for project ideas?
<samuelkadolph> It's another way of writing module Forem; class ApplicationController << ::ApplicationController; end
<samuelkadolph> end
<flip_digits> ok Forem:ApplicationController is one class?
<samuelkadolph> Minus one <
cyri_ joined #ruby-lang
<flip_digits> samuelkadolph: thanks that helped. the ruby book from prag programmers so far hasn't mentionned this notation
<samuelkadolph> It's just a way of creating a class under a module
saLOUt joined #ruby-lang
ilyam joined #ruby-lang
<flip_digits> samuelkadolph: to be clear. i can declare a module and inside my module I can subclass a real class?
<shevy> danted the best way is to write ruby code which solves something you want to solve
<samuelkadolph> real class?
<shevy> danted for me, the first thing I did was to write an IRC bot in ruby
<samuelkadolph> flip_digits: There is almost no difference between class A::B; end and module A; class B; end; end
<flip_digits> samuelkadolph: what I mean by a 'real class' is a class that can be instantiated. Modules can be instantiated
<samuelkadolph> flip_digits: a class is a class is a class
<samuelkadolph> Just because it's inside of a module (or class) doesn't make it any less of a class
<oddmunds> today, when i woke up, i thought it would be neat to write a parser that allowed me to write ruby that looked like lisp. like this: https://gist.github.com/a067a2b017ece388849c
<flip_digits> samuelkadolph: I have a pastie that I'd like to show you but the network latency is high here
<samuelkadolph> flip_digits: And what about it?
<oddmunds> do you ever get confused about forem/forum?
<flip_digits> samuelkadolph: I can not instantiate an Forem correct? Forem is just a module right?
dragonkh joined #ruby-lang
<headius> drbrain: is there a gem that installs rdoc *content* for various Ruby versions?
<headius> I am going to rip rdoc out of our dist
<headius> or at least, not ship rdoc content anymore, since it's out of date anyway
<flip_digits> samuelkadolph: but I can instantiate Forem::ApplicationController right?
<dragonkh> Hi
<dragonkh> What's the rails channel?
<dragonkh> Am I connected?
<samuelkadolph> flip_digits: Sure but it doesn't do much for you, rails handles initializing a controller for you
<flip_digits> samuelkadolph: I'm just trying to understand the differences between modules , classes, and mixins
<drbrain> headius: there's rdoc-data, but it only has data for 1.8.6, 1.8.7 and 1.9.1
<injekt> dragonkh: #ror
<drbrain> headius: I could make a new release covering 1.8.7, 1.9.2, 1.9.3
<headius> drbrain: that would be fantastic
<headius> I don't think anyone uses 'rdoc' command in JRuby normally, but if they do they could simply install rdoc gem and get the right content
<headius> and I could just rip all rdoc related crap out of our dist (other than boring old stdlib version)
<drbrain> right now it just installs ri data
<dragonkh> Thanks
<headius> drbrain: I doubt most people need more than that
<drbrain> ok
<headius> that's all I was really generating too, by sucking it out of an MRI build into a zip
<drbrain> headius: I'm sick today, so can you remind me on Monday?
gregmoreno joined #ruby-lang
<headius> drbrain: ok
<drbrain> I've got a Rakefile that does all the magic
<drbrain> well… `rake release` :D
pxjorge joined #ruby-lang
<drbrain> but I think I have to check my ruby installs to make sure the right thing happens
_inc joined #ruby-lang
Heimidal joined #ruby-lang
<jbwiv_> anyone here using the tiny_tds gem? or, know the appropriate place to ask questions?
<headius> drbrain: cool...this will be great to drop out of our dist and build
thone_ joined #ruby-lang
Pip joined #ruby-lang
dragonkh_ joined #ruby-lang
<dragonkh_> Arg phone cut out
<dragonkh_> Did someone reply about it being devise ?
<rue> Probably not, since you're on #ruby-lang again
Pip_ joined #ruby-lang
<dragonkh> Oops
Heimidal joined #ruby-lang
Heimidal_ joined #ruby-lang
<TTilus> oddmunds: lovely parens!
<oddmunds> haha, thanks
jstemmer joined #ruby-lang
<TTilus> oddmunds: wheres the parser?
Skif joined #ruby-lang
<TTilus> oddmunds: or is the gist only a testcase rather than actual output?
<oddmunds> it's a mockup, if you will
<oddmunds> i sort of lost interest when i got out of bed
<whitequark> I've added support for heuristic reply chain recognition to the logger. Like this: http://irclog.whitequark.org/ruby/2011-11-17#1321483534-chain
workmad3 joined #ruby-lang
Austin__ joined #ruby-lang
<rue> whitequark: Support for a .quiet?
saLOUt_ joined #ruby-lang
nuclearsandwich joined #ruby-lang
<rue> Fucking #ruby.
<samuelkadolph> rue: Fucking #rue
<muzone> rue: trouble over there?
ecin joined #ruby-lang
<samuelkadolph> whitequark: How did you select the chain?
DEac- joined #ruby-lang
<muzone> rue: me and http://media.starblogs.se/09c2ae44aaaa4757a116d064052530d3.jpg be glad to step in :D
gearaholic joined #ruby-lang
srbartlett joined #ruby-lang
echoprinter left #ruby-lang
SuperTaz joined #ruby-lang
curtism joined #ruby-lang
postmodern joined #ruby-lang
Asher joined #ruby-lang
jrun joined #ruby-lang
robbrit left #ruby-lang
wyhaines joined #ruby-lang
Skif joined #ruby-lang
Skif joined #ruby-lang
erics joined #ruby-lang
FylGood joined #ruby-lang
workmad3 joined #ruby-lang
Mon_Ouie joined #ruby-lang
scottschecter joined #ruby-lang
bshelton joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
<yorickpeterse> Hmpf. Updated to 1.9.3 and now Rack is spitting out content length warnings :[
Pip joined #ruby-lang
Pip joined #ruby-lang
<yorickpeterse> Anybody familiar with that error? I read something on SO about a tweet of mr tenderlove but that was Rails specific (and I don't use Rails :)).
<yorickpeterse> I wonder if this might be something with Ramaze
<rue> Perhaps if you included some more details, even those without intimate knowledge of the problem might have ideas
<postmodern> what is a good library for introspecting/extracting tar archives, be it a String, IO or Path?
Indian joined #ruby-lang
<yorickpeterse> rue: Heh sorry. What I noticed is that Rack (1.3.5 on Ruby 1.9.3) spits out warnings saying it can't find the content length and that I can fix it by setting that myself or by setting Response#chunked to true
<yorickpeterse> It seems to be an issue with 1.9.3 as it doesn't show the warning on 1.9.2
<rue> Does the header actually exist?
Skif joined #ruby-lang
<yorickpeterse> Yes
<yorickpeterse> Hm wait a second...the error is gone now
<yorickpeterse> Aha! It might be a Chrome issue. Curl doesn't trigger the warning, Chrome does
Heimidal joined #ruby-lang
<yorickpeterse> Ah, the issue is with static files. That explains why curl doesn't show the warning
Heimidal joined #ruby-lang
<yorickpeterse> So it seems that it can't determine it when server static files directly through webrick. This isn't too hard to work around since I use Nginx for static files but it is interesting to see that it suddenly appears on 1.9.3
pxjorge joined #ruby-lang
workmad3 joined #ruby-lang
woody2shoes_ joined #ruby-lang
Axsuul joined #ruby-lang
<yorickpeterse> Seems to be WEBRick specific. Thin doesn't give the warnings
zmack joined #ruby-lang
lsegal joined #ruby-lang
wyhaines joined #ruby-lang
back287 joined #ruby-lang
samshull joined #ruby-lang
jondot joined #ruby-lang
havenn joined #ruby-lang
sulo joined #ruby-lang
<whitequark> rue: what's .quiet?
srbartlett joined #ruby-lang
<whitequark> samuelkadolph: http://pastie.org/2880250
workmad3 joined #ruby-lang
<shevy> hmm anyone has a hint ... when I use Readline.readline to fetch user input
<shevy> when the input is "foo<TAB>" then I can expand that easily... but what if the input would have to be "foo bar<TAB>"? no idea yet how to work on split input
<shevy> in bash it works
<shevy> COMPREPLY=( $(compgen -W "${all_programs}" -- ${cur}) )
<shevy> complete -F completion_for_ry ry
<shevy> ry ht<TAB>
<shevy> becomes
<shevy> ry htop
<shevy> hmmm
<manveru> shevy: >> Readline.completer_word_break_characters
<manveru> => " \t\n`><=;|&{("
<shevy> ok thanks let my brain try to wrap around this ...
rushed joined #ruby-lang
<manveru> well, if you set it to "\n" then you'll get the full line passed to the completion proc
<shevy> oh
WillMarshall joined #ruby-lang
havenn joined #ruby-lang
saLOUt_ joined #ruby-lang
tenderlove joined #ruby-lang
<danted> Im trying to find the smallest positive number that is evenly divisible by all of the numbers from 1 to 20. I cant seem to get it to check the numbers of an array.
<danted> can anyone point out what im doing wrong? im assuming im using the wrong method
<danted> please dont spoil it though :)
<whitequark> danted: you can't divide x, a Fixnum, by a whole Array
echoprinter joined #ruby-lang
lsegal joined #ruby-lang
<danted> .each wouldnt test it against every part of the array?
<whitequark> .each does not know about division at all
<danted> is there a method i could use that would test every number instead of having to write a long if statement
<whitequark> if a.all? { something returning a trueish or falseish value }
<whitequark> i.e. "if a.all? { |n| x % n == 0 }"
<danted> weird it doesent appear to be checking it
wmoxam_ joined #ruby-lang
wmoxam joined #ruby-lang
wmoxam joined #ruby-lang
wmoxam_ joined #ruby-lang
<whitequark> danted: http://pastie.org/2880394
<danted> thank you let me check this out further
whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
curtism joined #ruby-lang
nuclearsandwich joined #ruby-lang
cjs226 joined #ruby-lang
Skif joined #ruby-lang
_whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
gearaholic joined #ruby-lang
Tasser joined #ruby-lang
tomzx joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
[2]maarten joined #ruby-lang
jrun joined #ruby-lang
towski joined #ruby-lang
xsdg joined #ruby-lang
voker57 joined #ruby-lang
voker57 joined #ruby-lang
scottj joined #ruby-lang
<scottj> there was a ruby framework for creating gui apps where the gui was writtin in js/css and ran in a browser but was packaged for macosx and windows I think as a native lookign app? anyone remember the name?
<headius> scottj: not sproutcore I presume
<headius> which is really just js, not ruby
<havenn> scottj: if so: http://www.sproutcore.com/
<headius> I vaguely recall something else
<headius> too far distant in my memory to recover
<havenn> scottj: Not quite right to your description either, but maybe Shoes??: http://shoesrb.com/
<steveklabnik> scottj: havenn shoes was like that a loooong tie ago
<steveklabnik> time
<steveklabnik> like 5 years.
<havenn> steveklabnik: I missesd your Shoes talk at RubyConf. No future?
<steveklabnik> ttp://confreaks.net/videos/681-rubyconf2011-the-return-of-shoes
<steveklabnik> dammit
<steveklabnik> anyway
<steveklabnik> you get he idea
<steveklabnik> what do you mean by 'no future'
<zenspider> rhodes?
mnoble joined #ruby-lang
<headius> zenspider: hey, I was going to poke you about the tagging thing
<headius> I'm champing at the bit to start running MRI tests, and I need something
mnoble left #ruby-lang
<zenspider> I was just about to poke you about what testing stuff you currently have in jruby
<headius> I started looking through tests we comment out and there's just too much to add to MRI tests directly
<zenspider> I just found out that MRI's test/unit violates minitest and I broke stuff
<headius> hmm
<headius> well we run several suites...the oldest ones use minirunit, but most are test/unit
<headius> and rubyspec
<zenspider> specifically, when ppl are running test/unit tests but have for SOME reason activated the minitest gem, they blow up
<headius> when we run the suites they run in isolated JRuby instances...so we'd be able to isolate that way at least
fayimora joined #ruby-lang
<zenspider> minitest 2.8.1 released
<zenspider> ok. I can poke at the tagging thing now. I still won't pretend to "get it" yet... but I can at least evaluate it and see what the options are
<headius> we currently run: minirunit suite (old JRuby stuff, slowly dying), JRuby suite, "slow" suite, MRI suite (parts), rubicon, ruby_test (facets), objectspace suite
<headius> other than the minirunit, they're test/unit based
<headius> objectspace and "slow" suite are just stuff we yanked out of "jruby" suite to make a shorter run
<zenspider> gah
<headius> ...and rubyspec.
<headius> once you get a suite running, you get scared to remove it
<headius> I'm sure we're doubling up a lot
<zenspider> haha. true
<headius> the MRI suite is really needed now though because there's growing gaps with rubyspec
<jorgenpt> hey guys
<headius> and I've got better things to do than port tests to rubyspec
<jorgenpt> In Java, when embedding JRuby, what does org.jruby.RubyObject.toJava(..) use to find the Java equivilant?
<headius> jorgenpt: several core classes override that with specific types
<jorgenpt> I mean for my own class
<headius> I've meant to add a way to define your own to_java in Ruby, and have it use that...but it's hard to do without impacting dispatch perf
<headius> so short answer: you can't customize it
<headius> convert it yourself first
<jorgenpt> So if I'm doing obj.toJava(MySomething.class) - that'll never work?
<headius> I'd be willing to try to do that for 1.7 if you want to work with me to figure out how it should work
<headius> jorgenpt: correct, unless it's already a MySomething
<headius> the Java wrapper logic will of course just return the wrapped object if it fulfills the requested type
<jorgenpt> Ah, so it works if it inherits from a MySomething?
<headius> yes
<jorgenpt> And returns null if it can't?
<headius> I believe so, yeah
<jorgenpt> I'm sorry, I'm not very good at Java-JRuby embedding
<jorgenpt> I'm trying to fix a bug in the Jenkins Ruby-runtime :-)
<headius> ahh cool
<jorgenpt> I don't know if you guys are aware
<jorgenpt> But Jenkins just got support for writing Ruby plugins (as opposed to Java plugins), thanks to JRuby
<jorgenpt> The support is still pretty young, but I've published a real plugin using it (the first), through the Jenkins update center
<headius> yeah I've been tracking it...pretty awesome you can publish to update center now too
<jorgenpt> Yeah
<headius> why would you write plugins in anything else?
<jorgenpt> I haven't hacked too much on the Java part of it, because I'm not too familiar with Jenkins and JRuby internals
<jorgenpt> But I've been actively patching the other stuff
<headius> excellent
<jorgenpt> So much more awesome than doing it in Java ^_^
<jorgenpt> We just need better testing support