Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<felixrabe> forget my comment on the spec - there is one at http://www.ipa.go.jp/osc/english/ruby/index.html, trying to find it there now
<rue> andrewvos: If you just need *an* ordering, you can use #sort
<andrewvos> rue: I need the order of insertion.
drbrain joined #ruby-lang
michael_mbp_ joined #ruby-lang
<rue> I think there might be a gem backporting that, but… are you actually using the data structure like a Hash, i.e. random #[] ?
<rue> If not, stick them in an Array
<andrewvos> Well, the code was a bit crap.
<andrewvos> In my opinion.
<andrewvos> It's a trie class that needs the ordering.
<andrewvos> (Though not sure at this point)
<injekt> epitron: do you know what <option>? does?
<epitron> injekt: the html tag?
nofxx joined #ruby-lang
<injekt> epitron: im talking about your issue on slop lol
<terraUNDverra> epitron: oh injekt is the guy who wrote slop btw, so you can raise your in? issue with him
<epitron> terraUNDverra: i know :)
<injekt> terraUNDverra: he has already :)
<terraUNDverra> ah
<epitron> injekt: i'm just plaing with the source at the moment
<epitron> i'll see if i can fix your bug and my bug
<injekt> epitron: i dont understand the 3rd sentence in your last comment
scottschecter joined #ruby-lang
<epitron> it doesn't matter
<epitron> i'll just look at the code :)
<injekt> my bug is fixed by removing the define_method in present?()
michael_mbp__ joined #ruby-lang
<epitron> ok
<injekt> that's not priority though as it's not really a bug
steph021 joined #ruby-lang
steph021 joined #ruby-lang
<deryl> i can fix *my* bug by removing marshalling :) marshal shmarshal who needs it
<rue> andrewvos: A trie that needs ordering? You could maintain the child nodes in an insertion-ordered Array, I think
<andrewvos> rue: That's what I'm doing now actually
<terraUNDverra> injekt: hypothetically if someone defined an option called respond_to? would opts.respond_to? (to check for option existence) conflict with the built-in respond_to? method?
<epitron> rubygems just deprecated Deprecate
<epitron> 1.8.11: "Deprecate was moved to Gem::Deprecate"
<injekt> terraUNDverra: if there's an option called 'respond_to' it'll check for the existance of that option, yes
<rue> felixrabe: That spec's probably not going to have much that'll help. There's something that mentions it on the net, too, possibly in the context of filter-oriented usage. So the long and short of it is that it matches against $_, which is the latest line of input.
<rue> felixrabe: And as the warning says, it might not be what you want, so you usually want to be explicit
<terraUNDverra> injekt: but doesnt it use a check via method_missing, so it'll actually end up calling the top-level respond_to? method instead of checking the option? iirc that was the issue epitron had regarding in?, where he both had an option called in? and he had a top-level method he'd monkey-patched into Object called in? as well
saLOUt joined #ruby-lang
<epitron> hmm
<terraUNDverra> and it ended up calling his top-level in? method, which broke the option checking code: opts.in?
<terraUNDverra> epitron: is that right?
<injekt> terraUNDverra: well, if an option exists it'll *always* check for the options existance in method_missing, otherwise it'll use super
<epitron> i'm trying to figure out why guard won't run injekt's tests
<epitron> "minitest/unit.rb:862:in `block in process_args': invalid option: --use-color (OptionParser::InvalidOption)"
<epitron> am i using the wrong test library?
<terraUNDverra> epitron: did i summarize the problem correctly or not?
<rue> felixrabe: Rubyspec will probably have the behaviour documented somewhere too
<epitron> terraUNDverra: he knows what the problem is. look at the issues
Aaaarg joined #ruby-lang
<terraUNDverra> cool
<injekt> epitron: i use minitest
<injekt> so that should work?
<injekt> guard is trying to use --use-color
<injekt> does it know you're using minitest?
<injekt> watch :minitest or w/e it is
<injekt> guard 'minitest';
<epitron> ah yes, i used the wrong one :)
<injekt> with the guard-minitest gem
woollyams joined #ruby-lang
michael_mbp_ joined #ruby-lang
looopy joined #ruby-lang
<epitron> hurr. it's not running them
<deryl> if I have an array of objects, I should be able to do Marshal.dump(array_of_objects, file) once I've opened it, and it should spit the entire array correct? not just the first element? (or an empty array) Also, if thats true then walking each individual element and dump'ing w+ to the file should make a successive set of ObjectType entries and *not* overwrite the previous correct?
<epitron> oh, it's expecting test_* files, not *_test files
<epitron> :\
<injekt> epitron: does `rake` run them?
<injekt> hah
<epitron> rake is fine
<injekt> epitron: you tell guard what you check for yourself
<injekt> lol
wyhaines joined #ruby-lang
<injekt> it just uses test_* by default
looopy joined #ruby-lang
<injekt> change it to *_test ;)
<deryl> (i'm looking at what I get returned and its *always* only one command, never more. and I'm wondering if this is because I'm overwriting each previous command when I dump
<rue> deryl: a+
<epitron> i have to change a bunch of stuff :\
<deryl> ah - rue thanks
<epitron> it also expects the test files to all be named l<thing you modified>_test.rb
<epitron> so it's only running slop_test
<injekt> epitron: if you have a guardfile, just add them in there, it's one line :S
<epitron> i'm not sure how :D
<felixrabe> good pointers rue, but nothing in the rubyspec concerning "if": https://raw.github.com/rubyspec/rubyspec/master/language/if_spec.rb
zomgbie joined #ruby-lang
<epitron> how would i make that run all the tests when lib/ changes?
<injekt> epitron: watch lib/slop.rb and add the test files into the block
<rue> felixrabe: I dunno if it's about the if per se. Not sure what it'd be classified under, really
<epitron> injekt: so the block just has to return an array of files?
<andrewvos> OMG it wasn't the hash sorting :( :(
<injekt> epitron: i dont know? lol it looks like it returns a string, check out the docs
michael_mbp_ joined #ruby-lang
<rue> Cool
<rue> Of course that's still descriptive rather than prescriptive, but if it makes you feel better :)
<epitron> injekt: yep, just needs an array of strings
<epitron> guard -d was helpfuil
<terraUNDverra> wow doom3 source code is released on github https://github.com/TTimo/doom3.gpl/blob/master/neo/game/Actor.cpp
<rue> IT'S THE MATRIX
<andrewvos> No tests?
<injekt> would you?
<felixrabe> rue: a lil bit - i just want to know where to go (short of reading ruby core) if i want to know every single detail about a particular ruby feature that interests me or gets in my way
<rue> Rubyspec is probably a good place.
<felixrabe> rue: thanks for the help
<andrewvos> Ok to hell with this. sleep time. Stupid 187.
<felixrabe> yes, sleep time :)
<felixrabe> bye
<lianj> terraUNDverra: ok, now we need the game data
havenn joined #ruby-lang
corundum joined #ruby-lang
michael_mbp_ joined #ruby-lang
dejongge joined #ruby-lang
<epitron> injekt: would you be against splitting up some of these methods into different files?
<epitron> it's not that big a deal... this file is just kinda huge :)
<injekt> epitron: yes, I realize it looks ugly, and it's hard to read, for which case I would be willing to add a task or something, but I'd like it to be easily vendorble, that was my point in having it in a single file (it was split separate until 2.0)
<injekt> maybe that'll change again in 3.0
<injekt> epitron: but there would only be 2 files anyway, as there's only 3 classes, and one of them is going away for 3.0
zwang joined #ruby-lang
michael_mbp joined #ruby-lang
marcostoledo joined #ruby-lang
wmoxam joined #ruby-lang
<andrewvos> rue: Why do you say the world went crazy in regard to ruby hash key ordering?
looopy joined #ruby-lang
michael_mbp_ joined #ruby-lang
wyhaines joined #ruby-lang
<injekt> andrewvos: probably because ordering hashes in any way is silly
<andrewvos> injekt: Although you have to agree that it tends to be convenient.
<andrewvos> injekt: But you mean for lookup speed right?
<injekt> andrewvos: I dont know I've never needed/used the fact that 1.9 orders by insertion
<andrewvos> injekt: But why do you say it's silly?
<injekt> andrewvos: hash tables shouldn't have any order
<rue> ^
michael_mbp_ joined #ruby-lang
<rue> A hash table is by definition unordered. An ordered structure therefore isn't a hash :)
<apeiros_> injekt: there's places where it is nice. e.g. reading + processing + writing yaml files
<apeiros_> IMO they should have kept Hash, and made {}.class == OrderedHash
<injekt> apeiros_: I agree
<terraUNDverra> rue: a 1.9 hash isn't actually ordered, it's just when you iterate through it they're iterated through in order :P (let's make subtle meaningless distinctions)
<apeiros_> oh, there's other places where it is nice. theoretically you could now implement a meaningful: MyModel.order(:col1 => :asc, :col2 => :desc)
<injekt> terraUNDverra: that's an order
<rue> terraUNDverra: A binary tree isn't ordered until you start iterating!
<shevy> my pants are ordered
<injekt> ^
<terraUNDverra> rue: well, theoretically i could make an #each on an Array always iterate through the array as if it was sorted (calling #sort first) does that mean the contents of the array are stored sorted? :P
<terraUNDverra> but yeah you're right in the case of hash im just being a dick
<rue> Stored sorted is a meaningless distinction
<rue> (Except insofar as it affects algorithm complexity)
dejongge joined #ruby-lang
vesan_ joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
spuk joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
looopy joined #ruby-lang
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
looopy joined #ruby-lang
replore_ joined #ruby-lang
marcostoledo joined #ruby-lang
hahuang65 joined #ruby-lang
gregmoreno joined #ruby-lang
Banistergalaxy joined #ruby-lang
michael_mbp_ joined #ruby-lang
tomzx joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
jeek_ joined #ruby-lang
mikeric joined #ruby-lang
looopy joined #ruby-lang
wyhaines joined #ruby-lang
looopy joined #ruby-lang
<shevy> hmmm
<shevy> say I have a very long string with several newlines that looks like
<shevy> foo # bla
<shevy> lalal ble # bla
<shevy> how would I go about aligning the # character properly from top to bottom? as in, the first example would be padded with ' ' characters
<shevy> foo # bla
<shevy> lalal ble # bla
<injekt> shevy: traverse the lines and work out the shortest distance you need it to be
<injekt> then pad out all other lines with spaces
<injekt> drbrain: ping
looopy joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
S1kx joined #ruby-lang
S1kx joined #ruby-lang
looopy joined #ruby-lang
wmoxam joined #ruby-lang
wmoxam joined #ruby-lang
slyphon joined #ruby-lang
qzg joined #ruby-lang
GutenLinux joined #ruby-lang
postmodern joined #ruby-lang
jeek_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
savage- joined #ruby-lang
towski joined #ruby-lang
gregmoreno joined #ruby-lang
gnufied joined #ruby-lang
Indian joined #ruby-lang
wmoxam joined #ruby-lang
towski_ joined #ruby-lang
looopy joined #ruby-lang
Indian joined #ruby-lang
woollyams joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
jxie joined #ruby-lang
slyphon joined #ruby-lang
slyphon joined #ruby-lang
wmoxam joined #ruby-lang
x0F_ joined #ruby-lang
looopy joined #ruby-lang
rhinux joined #ruby-lang
looopy joined #ruby-lang
wmoxam joined #ruby-lang
michael_mbp joined #ruby-lang
jensn joined #ruby-lang
tomzx joined #ruby-lang
savage- joined #ruby-lang
michael_mbp_ joined #ruby-lang
terraUNDverra joined #ruby-lang
michael_mbp_ joined #ruby-lang
wmoxam joined #ruby-lang
michael_mbp joined #ruby-lang
meth joined #ruby-lang
<meth> isn't there a way to convert a method into a proc ?
<terraUNDverra> meth: did you try to_proc ?
<terraUNDverra> meth: though just the method object is probbly what u want
<terraUNDverra> meth: what ar eyou trying to do
<meth> pass a method to something that expects a block
<meth> i mean a proc
<terraUNDverra> meth: &method(name) should work
<meth> hm ?
mikeric joined #ruby-lang
<meth> what about from outside of an object ?
<terraUNDverra> meth: what do u mean
<meth> well i want to wrap up obj.meth
<theconartist> obj.method(:meth)
<terraUNDverra> meth: then obj.method(:meth)
<meth> cool
<theconartist> also don't do meth
<meth> :]
michael_mbp joined #ruby-lang
<terraUNDverra> theconartist: http://i.imgur.com/9Hd4q.jpg
<meth> ah that didn't really work for me
<theconartist> :(
<meth> proc it made still gets gc'd
<terraUNDverra> meth: sounds lke u r doing something naughty
woollyams joined #ruby-lang
<meth> ffi
<terraUNDverra> and should be spanked with a mechanical courset
<meth> ffi callbacks are procs
<terraUNDverra> meth: i want you pure as power i want your skin slightly musty with petticoats, can i wash the easy bidets from your head?
<meth> sure
<terraUNDverra> meth: turn around and present!
<meth> would be cool if ffi could give me a pointer to a method or if there was some ability for that
<lianj> what pointer to which method? :D
<meth> obj.__get_pointer(:method_name)
<meth> or something
<lianj> for what purpose?
<meth> passing a method as a callback to ffi ?
<meth> if you try to create a proc it will get gc'd unless you hold onto it
<lianj> wouldnt it still get gc'd if you have a pointer to it
<lianj> is holding onto the proc so hard?
<meth> the proc is getting gc'd even though my object is still alive
<bnagy> meth: I just use ivars for procs that I need to be there as callbacks
<meth> a pointer to a method would be valid as long as the object is alive
<meth> yea that's what I'm doing
<bnagy> well an ivar won't get GCd while the object exists, unless the universe is broken somehow
<meth> the proc was .. now I'm converting it to an ivar
hahuang65 joined #ruby-lang
<meth> well now I"m holding the proc in the ivar
<bnagy> ok cool.
<terraUNDverra> bnagy: talk soon, brb, just getting a few instruments (read: food stuffs) from the supermarket before i cook tonight and engage in the disgusting and unfortunate activity of eating, luckily i do it in secret
<bnagy> sure thing personIdon'tknow
<lianj> meth: callback :cb, [], :void; attach_function :foo, [:cb], :void; .. class A; def initialize; foo(@i = method(:handle)); end; def handle; p :tick; end; end
<bnagy> you... go do that
<lianj> works here
<meth> yep..
jensn joined #ruby-lang
looopy joined #ruby-lang
steph021 joined #ruby-lang
steph021 joined #ruby-lang
gokulnath joined #ruby-lang
looopy joined #ruby-lang
<meth> obj.Proc might be cool idea too so that it creates a proc tied to obj without you needing to maintain an ivar
mikeric joined #ruby-lang
jensn joined #ruby-lang
flip_digits joined #ruby-lang
Indian joined #ruby-lang
terraUNDverra joined #ruby-lang
michael_mbp_ joined #ruby-lang
looopy joined #ruby-lang
looopy joined #ruby-lang
michael_mbp_ joined #ruby-lang
yumike joined #ruby-lang
michael_mbp joined #ruby-lang
terraUNDverra joined #ruby-lang
Aaaarg joined #ruby-lang
hahuang65 joined #ruby-lang
kitallis joined #ruby-lang
looopy joined #ruby-lang
michael_mbp joined #ruby-lang
looopy joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp joined #ruby-lang
macmartine joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp joined #ruby-lang
meth left #ruby-lang
looopy joined #ruby-lang
michael_mbp_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
yxhuvud joined #ruby-lang
michael_mbp_ joined #ruby-lang
burgestrand joined #ruby-lang
JohnBat26 joined #ruby-lang
tomzx joined #ruby-lang
kitallisii joined #ruby-lang
Mchl joined #ruby-lang
replore_ joined #ruby-lang
Indian joined #ruby-lang
replore__ joined #ruby-lang
havenn joined #ruby-lang
solars joined #ruby-lang
s3mi0 joined #ruby-lang
Defusal joined #ruby-lang
robotmay joined #ruby-lang
zmack joined #ruby-lang
mytrile joined #ruby-lang
gentz joined #ruby-lang
Defusal_ joined #ruby-lang
Defusal_ joined #ruby-lang
iwamatsu joined #ruby-lang
fai|safe joined #ruby-lang
ryanf joined #ruby-lang
fai|safe_ joined #ruby-lang
thrcka joined #ruby-lang
krz joined #ruby-lang
workmad3 joined #ruby-lang
srbartlett joined #ruby-lang
ryanf_ joined #ruby-lang
dr_bob joined #ruby-lang
frangiz joined #ruby-lang
jensn joined #ruby-lang
yorickpeterse joined #ruby-lang
fai|safe left #ruby-lang
ammar01 joined #ruby-lang
dstaar1 joined #ruby-lang
LanceHaig joined #ruby-lang
<dstaar1> Hi i need some help with executables in gems. I created a gem with bundler write some code down, added a bin dir with a ruby file which is calling my code. the file in bin/ is executable. after installing the gem locally with rake install the gem will be installed but i can't call the executable
cyri_ joined #ruby-lang
molgrew joined #ruby-lang
neoesque joined #ruby-lang
<dstaar1> seems that everybody is sleeping :D
hhatch joined #ruby-lang
DEac- joined #ruby-lang
<shevy> dstaar1 hmm not everybody
<shevy> I am not sleeping but I dont know the answer to your question either
sirfilip joined #ruby-lang
<Tasser> dstaar1, in your PATH? which <your executable> tells you what?
<Tasser> dstaar1, +x ?
<sirfilip> morning
hhatch left #ruby-lang
woollyams joined #ruby-lang
<dstaar1> yep it is executable
<dstaar1> i can call is with ./myfiel.rb
hahuang65 joined #ruby-lang
<dstaar1> ups i mean it not is
michael_mbp_ joined #ruby-lang
* dr_bob is not sleeping
Defusal joined #ruby-lang
Defusal joined #ruby-lang
<dstaar1> i'm just awake cause of university
dr_bob joined #ruby-lang
publicvoid joined #ruby-lang
benanne joined #ruby-lang
srbartlett joined #ruby-lang
Nopik joined #ruby-lang
robotmay joined #ruby-lang
woollyams joined #ruby-lang
adambeynon joined #ruby-lang
srbartlett joined #ruby-lang
desmovalvo joined #ruby-lang
diegoviola joined #ruby-lang
<postmodern> how can i call an Enumerator across threads?
<postmodern> keep getting "FiberError: fiber called across threads"
<postmodern> even when using a Mutex
<mytrile> Hey, guys. How can I do ["starts with", "contains", "ends with"] with %w() ? When I write %w("starts with", "ends with", "contains") it returns ["\"starts", "with\",", "\"ends", "with\",", "\"contains\""]
<postmodern> mytrile, %w[...]
<postmodern> oh er
<erikh> the feature of %w[] is that it expands array elements delimited by whitespace
<erikh> use a regular array if you want that kind of control.
<postmodern> mytrile, or use a Regexp if your munging text
<mytrile> erikh: ok, thanks
<mytrile> postmodern: No, it's that simple. I was just wondering
<erikh> %w[one two three] => ["one", "two", "three"] if that helps any
<erikh> note that %w[one, two, three] => ["one,", "two,", ...
<erikh> it's not particularly smart about it, but %w[] is syntactic sugar at best anyhow
yorickpeterse joined #ruby-lang
<erikh> hrm
<manveru> >> %w[starts\ with contains ends\ with]
<manveru> => ["starts with", "contains", "ends with"]
<erikh> > %W[#{"one two"}]
<erikh> ha~!
<postmodern> clever
<erikh> manveru++
michael_mbp_ joined #ruby-lang
<Nopik> manveru++
<andrewvos> manveru++ would manveru again?
<manveru> wut?
<manveru> you guys never use that?
<ddfreyne> i certainly would manveru again
<andrewvos> It was a joke
<andrewvos> manveru: ^
<erikh> I never use %w like that
<erikh> if I need whitespace I use an array, honestly the thought never crossed my mind.
<postmodern> how does one use thread.join, when dealing with a Thread pool that pulls on a Queue
<postmodern> when the Queue becomes empty, it sleeps the pulling threads, causing Thread#join to wait on the thread to wake up
<manveru> well, that's the point of the queue
<erikh> that's what thread.join does as well
<Nopik> postmodern: use guard message.. like sending nil. then thread upon receiving nil can stop listening to the queue and finalize
<erikh> Nopik++
<manveru> gotta go, cu
<erikh> I'm full of ham
<erikh> manveru: later.
<Nopik> by manveru
<Nopik> *bye
petercooper joined #ruby-lang
<postmodern> Nopik, awesome
<postmodern> Nopik, also what is the best way to do cross thread messages
<postmodern> Nopik, i almost need a sort of signal mechanism
<ddfreyne> mailboxes like in the actor model? some sort of blocking queue?
<mytrile> cool, thanks
<Nopik> i don't know ruby's abilities in this area good enough, in plain posix in c i would use socketpair or some message queue.. for some purposes shared memory is better (but usually more painful to maintain)
resetexistence joined #ruby-lang
<Nopik> +there is that whole pub sub model with listening to topic etc… it really depends on what you're doing
<erikh> Nopik: pipe() would be a good choice, no? ruby has IO.pipe which could work that way.
<erikh> I'm not particularly good with multiprocessing so I'm just trying to fill knowledge gaps
<Nopik> pipe isn't bad, too, especially if it avoids creating artifacts on the filesystem
<Tasser> https://gist.github.com/1393192 what am I doing wrong? Tells me '"write" was called incorrectly. Call as "thor b12:write".'
<Nopik> some system may want to create some special file for this or something
<erikh> yeah, it'd be an issue if you forked ofc
<erikh> oh, I wonder how they do IO.pipe on windows.
<shevy> with drugs
<Tasser> hm, any specialized channels for thor? #thor is empty.
<sirfilip> then go with rake mate ;-)
<Tasser> sirfilip, well, might become a mess...
alip joined #ruby-lang
srbartlett joined #ruby-lang
yorickpeterse joined #ruby-lang
krz joined #ruby-lang
RomD joined #ruby-lang
diegoviola joined #ruby-lang
Manhose joined #ruby-lang
ira joined #ruby-lang
ira left #ruby-lang
Indian joined #ruby-lang
diegoviola joined #ruby-lang
diegoviola joined #ruby-lang
WillMarshall joined #ruby-lang
dstaar joined #ruby-lang
workmad3 joined #ruby-lang
srbartlett joined #ruby-lang
ammar joined #ruby-lang
toretore joined #ruby-lang
diegoviola joined #ruby-lang
Manhose joined #ruby-lang
thrcka joined #ruby-lang
thrcka joined #ruby-lang
DEac- joined #ruby-lang
Manhose_ joined #ruby-lang
michael_mbp_ joined #ruby-lang
jensn joined #ruby-lang
zmack joined #ruby-lang
hhatch joined #ruby-lang
<manveru> you can always use main
burgestrand joined #ruby-lang
lenilson_dias joined #ruby-lang
Pip joined #ruby-lang
GutenLinux joined #ruby-lang
wmoxam joined #ruby-lang
RomD joined #ruby-lang
shevy joined #ruby-lang
wyhaines joined #ruby-lang
Locke23rus joined #ruby-lang
malev joined #ruby-lang
Spooner joined #ruby-lang
rnz joined #ruby-lang
<rnz> hi all!
<rnz> how to check property on write, example: mi.property = <invalid value> ? Module mix to class - http://pastebin.com/vfNYvBU8
RomD joined #ruby-lang
<petercooper> love the parallel interpretations of that
zmack joined #ruby-lang
jensn joined #ruby-lang
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
<soahccc> Does File.chmod works different than normal chmod? File.chmod(2770, directory) causes d-ws-w--wT and normal unix "chmod 2770 directory" causes drwsrws--- (which is right)
<darix> soahccc: maybe try 02770
<andrewvos> petercooper: Parallel interpretations of what?
<petercooper> Just how on 1.8 vs 1.9 the comparison is between two totally different things
<petercooper> yet it still works out the same way :)
<soahccc> darix: thanks, but which format is that?
<darix> soahccc: does it work as expected?
<soahccc> darix: yeah
tomzx joined #ruby-lang
<darix> soahccc: octal number
<darix> as keyword :)
<darix> i think
<darix> File.chmod(1528, directory)
<darix> would also do
<darix> but that would confuse people even more
m0wfo joined #ruby-lang
Manhose joined #ruby-lang
<andrewvos> petercooper: Hah. Yeah I agree.
rippa joined #ruby-lang
<rue> darix: Yeah, let's not use decimal mode flags :P
s0ber joined #ruby-lang
burgestrand joined #ruby-lang
burgestrand joined #ruby-lang
<darix> rue: hex would be even shorter!
looopy joined #ruby-lang
ivorybishop joined #ruby-lang
mytrile joined #ruby-lang
mytrile joined #ruby-lang
<manveru> anybody got a lib that does the neat u+xw form flags of chmod?
caseyx joined #ruby-lang
apeiros_ joined #ruby-lang
MistyM joined #ruby-lang
desmovalvo joined #ruby-lang
grafthez joined #ruby-lang
<darix> manveru: i dont get the question
<grafthez> Hey all, quick noob question: how to find given gem's documentation (methods, parameters, etc...)? I've downloaded 'json' gem to play with it and would like to know how can I tweak it's behaviour
<grafthez> is there any single place in the net for that?
<darix> grafthez: gem install normally builds documentation for it
<deryl> no. each gem usually has its own website. if ri does not have the info then you can look at its source, or you cam gem list thatgem -dl and get the information from it for its homepage etc
looopy joined #ruby-lang
<darix> well the rdoc documentation is usually build
<deryl> depends on if they set --no-rod --no-ri which a LOT of people do for gems
<deryl> s/rod/rdoc/
<darix> sure
<darix> then you can still use gem server no?:)
<terraUNDverra> grafthez: i like to recommend a gem called 'pry' it's a repl but it can show u documentation/sourcecode for methods
<darix> terraUNDverra: then he could just read the source directly?
<deryl> even with gem server, if you don't build the docs then gemserver isn't goimng to have it
<darix> as much as i love pry.... but using pry just for reading source... ;D
<deryl> thats what gemserver serves, the built docs
<terraUNDverra> darix: yes it's appropriate for that, because you dont have to know the files, you just want to see how a particular method is implemented, u can
<terraUNDverra> darix: and u can read its documentation, and even better you can try it out :)
<terraUNDverra> darix: it's designed partially for exactly this use case
<deryl> well you can read the documenttion only if it was included or in the source
<darix> gem which json
<darix> is not really hard
<deryl> there are lots of gems with no docs for the method(s)
<deryl> as i've found out the hard way :/
<terraUNDverra> darix: yes, but the source and documentation for gems are often scattred through many different files, and you want the docs/source for a particular method?
<darix> deryl: dont get me started on missing readmes, license files/headers, or documentation :p
<deryl> darix: hehe. yeah, its been... fun.. trying to track things down sometimes
<terraUNDverra> darix: personally i prefer just going: show-method MyClass#my_method it's easy
<deryl> i spend probably mroe time googling for answers than i do getting them from the gems themselves usually because the gems themselves are lacking
<deryl> terraUNDverra: again, thats only if the gem includes documentation either in the source or ri
<deryl> and a great many don't. all that does is show you the ource for it
<deryl> source even
<terraUNDverra> deryl: then use show-doc
<deryl> or is that what you're referring to? which using pry JUST to read the moethds is overkill. no different than reading the source by hand
<deryl> terraUNDverra: again, show-doc ONLY works if there are docs.
Indian joined #ruby-lang
<terraUNDverra> deryl: which is by far the majority of gems. Typically either gems provide NO documentation at all (i.e method documentation or readmes) or they provide both.
<terraUNDverra> deryl: it's extremely rare to come across gems that only provide docs in the form of readmes, but not in the methods too.
<deryl> terraUNDverra: actually by far its NOT the majority of gems
<deryl> terraUNDverra: utter horseshit
<terraUNDverra> deryl: bullshit. :)
<deryl> total and utter horseshit. the single *greatest* complaints against most gems *is* the lack of docs
<terraUNDverra> deryl: yes, and in the case they lack docs they also lack the Readmes or so on which you talk about.
* deryl rolls his eyes
<deryl> ok, i'm off to do some work. later all &
<terraUNDverra> deryl: you're an idiot as usual
Manhose_ joined #ruby-lang
<deryl> terraUNDverra: you're talking out your ass. so, I'll leave you to wallow in your imagined inteiigence, while the rest of us get on with living in the *real* world.
<deryl> asshole
<terraUNDverra> deryl: name a gem that only has extensive docs in readmes yet NOT docs on methods themselves?
<terraUNDverra> in my experience it's either all or nothing
<deryl> so YOUR experience is the LAW
<terraUNDverra> deryl: just give an example of a gem
<deryl> good to know. go about your business. don't waste my time anymore with your stupidity
<terraUNDverra> deryl: no examples? i can name plenty of gems that provide neither
<terraUNDverra> deryl: but nearly no examples where there's a tonne of docs in the readmes and none in the methods themselves
judofyr joined #ruby-lang
<deryl> I guess ruby_parser doesn't count
nofxx joined #ruby-lang
<terraUNDverra> deryl: yeah that has basically no docs except an example in the readme. And the API is tiny, anyway
<deryl> so fucking what? you asked for one I gave you one.
<deryl> and it exactly does not do what I said it does not do and that you said it does by virtue of 'that vast majority'. Lets also go into URI::Generic#parser and a shitload of others
<deryl> again you're blowing smoke out your fucking ass, don't like you got caught out, so you want to start being a dickless wonder. I too can be a dickhead. So, if you want to have an attitude and call me an idiot and be a dick yourself. expect me to come back at you full bore.
<terraUNDverra> deryl: no, because your point would only be valid if the Readme contained extensive documentation that wasn't on the methods. In the case of ruby_parser there's basically no documentation in teh readme except a tiny example. And ruby_parser woudl not be a good example for this argument anyway since the API is tiny, there's hardly anything to document
<deryl> do go be an asshole to someone else
<deryl> terraUNDverra: stfu. i proved my point. end of story
<deryl> so PISS OFF
<deryl> ./ignore terraUNDverra ALL
<deryl> damn it
* deryl rails at the keyboard gods for putting the . next to / so his fat fingers constantly hit it
hebz0rl joined #ruby-lang
<terraUNDverra> judofyr: you have much knowledge of all that dfp / lfp jazz?
<judofyr> terraUNDverra: not much
<judofyr> a bit
<judofyr> I thnk
<judofyr> it's magic stuff
pcwormald joined #ruby-lang
<terraUNDverra> judofyr: can you explain the diff b/w lfp and dfp to me?
<terraUNDverra> i have a rough understanding but not enough to fix my segfaults
<terraUNDverra> wait holdon ill show u what i know so far
<judofyr> terraUNDverra: lfp are only variables defined at the top level
<judofyr> terraUNDverra: why dfp (dynamic variables) are those defined within blocks
ivorybishop joined #ruby-lang
<terraUNDverra> judofyr: haha http://www.ruby-forum.com/topic/212872
<judofyr> def foo(bar); something { a = 1 }; end
saLOUt joined #ruby-lang
<judofyr> terraUNDverra: ah
<judofyr> yes
<judofyr> read that :)
<judofyr> that's essentially what I know :9
<terraUNDverra> judofyr: ah that's really useful
<terraUNDverra> man we should compile some of this knowledge into a book ;)
<terraUNDverra> judofyr: it would be kind of fun to write a mini-ebook akin to avdi's 'exceptional ruby', but just on ruby internals/c extensions
<judofyr> terraUNDverra: definitely
<judofyr> I know a fair bit of the object model (metaclasses etc.)
<terraUNDverra> nice
<judofyr> terraUNDverra: that's not really a book though. more like a short, but detailed, overview.
darkf joined #ruby-lang
<terraUNDverra> judofyr: looks good
<terraUNDverra> judofyr: do oyu have a list of chapters?
<terraUNDverra> a table of contents
<terraUNDverra> ah i see it
<terraUNDverra> only one item
<terraUNDverra> judofyr: probably good to look into what 'metaprogramming ruby' covers too, so you can be sure to offer new content
<terraUNDverra> though im sure he doesnt go as deep, though iirc he does discuss some of the c implementation
Pip joined #ruby-lang
michael_mbp_ joined #ruby-lang
saLOUt joined #ruby-lang
<terraUNDverra> judofyr: i think people would also be interested in a detailed discussion of the garbage collector
<judofyr> terraUNDverra: that's certainly something I haven't read much about
<judofyr> I mean, I know it's a stop-the-world mark-and-lazy-sweep GC
<judofyr> but not much more
<judofyr> terraUNDverra: hard to find time to write about all this stuff though. I have another article I must finish before the Understanding Objects
<terraUNDverra> i would suggest source diving but it's pretty pointless sometimes in complicated undocumented code
<terraUNDverra> judofyr: what's the other article
<judofyr> and I'm working on a documentation framework too
EvilJStoker joined #ruby-lang
<judofyr> terraUNDverra: "The irony of modularity"; about how many people in the Ruby community finds Java patterns useful again, and that we must be careful to not end up as Java :)
<terraUNDverra> ah ok
<judofyr> gah
<judofyr> sorry
<judofyr> tab-completion fail
<judofyr> terraUNDverra: here's what I'm working on: https://trello.com/board/projects/4e85eab135b8f17ff6564c60
<terraUNDverra> judofyr: the thing i find a little confusing about the dfp/cfp jazz, is that the block variables exist as dynamic variables (dfp) of the caller, yet the block itself is pushed as a new stack frame
<terraUNDverra> so there's some kind of weird tangling up between successive stack frames
<judofyr> yeah, there's definitely some magic stuff going on there
<terraUNDverra> but could be im thinking about it the wrong way or just need to sleep, but i find that kind of hard to grok at the moment
<terraUNDverra> judofyr: what happened in 1267 ?
<judofyr> thebastl: dunno :)
<judofyr> it's just a number
<molgrew> bastl will be confused
<judofyr> indeed
<judofyr> that's my job around here
<terraUNDverra> judofyr: so there's no story behind you choosing that for your icon?
robbrit joined #ruby-lang
<judofyr> terraUNDverra: sure, but it won't be interesting if everyone knows it, right? :)
wmoxam joined #ruby-lang
<terraUNDverra> judofyr: you like to keep secrets
<terraUNDverra> dont u
<judofyr> terraUNDverra: of course
arooni-mobile joined #ruby-lang
<terraUNDverra> judofyr: is this a dark secret
lsegal joined #ruby-lang
michael_mbp_ joined #ruby-lang
vesan_ joined #ruby-lang
tbuehlmann joined #ruby-lang
<judofyr> terraUNDverra: the darkest of them all
<sirfilip> night
sirfilip left #ruby-lang
RomD joined #ruby-lang
<terraUNDverra> judofyr: good evening mysterious gentleman
terraUNDverra left #ruby-lang
<andrewvos> judofyr: What's happening with the blog?
<injekt> oh that's banisterfiend?
<judofyr> not sure
<injekt> heh, explains a lot
kitallis joined #ruby-lang
<injekt> wussup judofry
<judofyr> andrewvos: the article?
<judofyr> I'll need to rethink it a bit (a lot)
<judofyr> injekt: yes, that would explainalot
plusk joined #ruby-lang
savage- joined #ruby-lang
<oddmunds> judofyr: what is Holmbox? :)
<judofyr> oddmunds: open-source Dropbox-ish tag-based file system
<oddmunds> cool :)
<judofyr> based on SIllyDB :)
<andrewvos> judofyr: Yeah
plusk__ joined #ruby-lang
apeiros_ joined #ruby-lang
kain joined #ruby-lang
spinagon joined #ruby-lang
michael_mbp_ joined #ruby-lang
steph021 joined #ruby-lang
steph021 joined #ruby-lang
saLOUt joined #ruby-lang
rippa joined #ruby-lang
dreinull joined #ruby-lang
rippa joined #ruby-lang
looopy joined #ruby-lang
yorickpeterse joined #ruby-lang
Austin__ joined #ruby-lang
s3mi0 joined #ruby-lang
Jake232 joined #ruby-lang
lsegal joined #ruby-lang
rushed joined #ruby-lang
kitallis joined #ruby-lang
kmeehl joined #ruby-lang
flexd joined #ruby-lang
<caseyx> How can I stop the view from (automatically) being rendered?
<caseyx> nvm wrong window x.x
solars joined #ruby-lang
ianic joined #ruby-lang
malev joined #ruby-lang
ecin joined #ruby-lang
ecin_ joined #ruby-lang
kmeehl joined #ruby-lang
DEac- joined #ruby-lang
pabloh joined #ruby-lang
dr_bob joined #ruby-lang
robotmay joined #ruby-lang
thrcka joined #ruby-lang
srbaker joined #ruby-lang
benanne joined #ruby-lang
flip_digits joined #ruby-lang
jano joined #ruby-lang
macmartine joined #ruby-lang
thrcka joined #ruby-lang
thone_ joined #ruby-lang
Jake232 joined #ruby-lang
hahuang65 joined #ruby-lang
slyphon joined #ruby-lang
lsegal joined #ruby-lang
DEac- joined #ruby-lang
DEac- joined #ruby-lang
looopy joined #ruby-lang
Austin__ left #ruby-lang
paul0 joined #ruby-lang
jano left #ruby-lang
michael_mbp_ joined #ruby-lang
ngw joined #ruby-lang
zmack joined #ruby-lang
d3vic3 joined #ruby-lang
thrcka joined #ruby-lang
banisterfiend joined #ruby-lang
nofxx joined #ruby-lang
workmad3 joined #ruby-lang
dinesh_ joined #ruby-lang
taf2 joined #ruby-lang
mikeric joined #ruby-lang
cyri_ joined #ruby-lang
robbrit left #ruby-lang
tomzx joined #ruby-lang
Mch1 joined #ruby-lang
jmcphers joined #ruby-lang
lsegal joined #ruby-lang
RomD joined #ruby-lang
zmack joined #ruby-lang
michael_mbp_ joined #ruby-lang
rmc3 joined #ruby-lang
ryanf joined #ruby-lang
ThatDudeGuy_ joined #ruby-lang
lsegal joined #ruby-lang
paul0 joined #ruby-lang
srbartlett joined #ruby-lang
Manhose joined #ruby-lang
nofxx joined #ruby-lang
ivorybishop joined #ruby-lang
slyphon joined #ruby-lang
RomD joined #ruby-lang
ryanf joined #ruby-lang
workmad3 joined #ruby-lang
gix joined #ruby-lang
arooni-mobile joined #ruby-lang
kmeehl joined #ruby-lang
postmodern joined #ruby-lang
Austin__ joined #ruby-lang
dr_bob joined #ruby-lang
Foo314 joined #ruby-lang
singpolyma joined #ruby-lang
srbaker joined #ruby-lang
uniqanomaly_ joined #ruby-lang
kmeehl joined #ruby-lang
zoo-zed joined #ruby-lang
dejongge joined #ruby-lang
RomD joined #ruby-lang
srbaker joined #ruby-lang
ryanf_ joined #ruby-lang
<rue> Woo, record time with no i/o
gregmoreno joined #ruby-lang
ryanf joined #ruby-lang
Natch| joined #ruby-lang
ngw joined #ruby-lang
brushbox joined #ruby-lang
workmad3 joined #ruby-lang
Mchl joined #ruby-lang
Axsuul joined #ruby-lang
sirfilip joined #ruby-lang
IPGlider joined #ruby-lang
robotmay joined #ruby-lang
macmartine joined #ruby-lang
Axsuul joined #ruby-lang
flexd2 joined #ruby-lang
robbyoconnor joined #ruby-lang
simon_weber joined #ruby-lang