<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.
<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
<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>
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>
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: 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>
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
<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?
<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
<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?
<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
<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
<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
<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
<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>
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 ^_^