apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<whitequark> 19>> class X < 1; end; X.ancestors
<eval-in> whitequark => /tmp/execpad-951d903c6289/source-951d903c6289:2:in `<main>': wrong argument type Fixnum (expected Class) (TypeError) (http://eval.in/14869)
<charliesome> wait what you can do that
<charliesome> aw
<whitequark> 19>> a = SyntaxError; class X < a; end; X.ancestors
<eval-in> whitequark => [X, SyntaxError, ScriptError, Exception, Object, Kernel, BasicObject] (http://eval.in/14870)
<charliesome> nah, disregard me
<whitequark> also you can do this:
<whitequark> >> begin; rescue Exception, [foo, baz], *bar => @foo; end
<eval-in> whitequark => nil (http://eval.in/14871)
<charliesome> i thought it was a bug because () is represented as NULL in the ast
SAn has joined #ruby-lang
<whitequark> not sure who thought that an ability to do rescue => $var is a good thing
<whitequark> >> begin; rescue => FOO; end
SAn has left #ruby-lang [#ruby-lang]
<eval-in> whitequark => nil (http://eval.in/14872)
<whitequark> wait
<charliesome> lol excellent
<whitequark> >> begin; raise 1; rescue => FOO; end; FOO
<eval-in> whitequark => #<TypeError: exception class/object expected> (http://eval.in/14873)
<whitequark> >> begin; raise "1"; rescue => FOO; end; FOO
<eval-in> whitequark => #<RuntimeError: 1> (http://eval.in/14874)
<whitequark> what the fuck
<whitequark> omg this is so stupid
<charliesome> >> begin; raise 1; rescue => FOO; end; begin; raise 1; rescue => FOO; end;
<eval-in> charliesome => /tmp/execpad-6c718421aab4/source-6c718421aab4:2: warning: already initialized constant FOO ... (http://eval.in/14875)
<whitequark> I'm tempted to run RP on the whole corpus of gems and find who used this
<whitequark> because I know that SOMEONE DID
Gaelan has quit [Remote host closed the connection]
<charliesome> want to see another magic trick
<charliesome> >> defined? ()
<eval-in> charliesome => /tmp/execpad-6c6f8bb3a6f5/source-6c6f8bb3a6f5: [BUG] Segmentation fault ... (http://eval.in/14876)
Gaelan has joined #ruby-lang
<whitequark> ...
<charliesome> it's because () is NULL in the AST, and defined? looks at nd_type(node)… :p
wyhaines has quit [Remote host closed the connection]
<whitequark> yeah I understand it
soknee has joined #ruby-lang
<charliesome> interestingly it doesn't segfault 1.9
spuk has quit [Ping timeout: 276 seconds]
soknee has quit [Client Quit]
soknee has joined #ruby-lang
spuk has joined #ruby-lang
<charliesome> also it only segfaults on defined? (), not defined?(())
soknee has quit [Client Quit]
<whitequark> sure
<whitequark> stop wait
<whitequark> why?
<charliesome> idk
<charliesome> i would've thought defined?( … ) and defined? … generate the same AST, barring any precedence issues
<whitequark> yep, same here
Gaelan has quit [Ping timeout: 260 seconds]
<whitequark> >> ()
<eval-in> whitequark => nil (http://eval.in/14877)
<whitequark> also do you know this trick...
<charliesome> whitequark: parse.y hilarity: http://eval.in/14878
<whitequark> >> m () {}
<eval-in> whitequark => /tmp/execpad-187f59d65e05/source-187f59d65e05:2:in `<main>': undefined method `m' for main:Object (NoMethodError) (http://eval.in/14879)
<whitequark> 19>> m () {}
<eval-in> whitequark => /tmp/execpad-b91b77f09943/source-b91b77f09943:2: syntax error, unexpected ')' ... (http://eval.in/14880)
<charliesome> yeah you showed us that before
<whitequark> 18>> proc { |@a| }.call(1); p @a
<eval-in> whitequark => 1 ... (http://eval.in/14881)
* whitequark shrugs
<whitequark> if any, I'd rather keep *this*, and remove the stuff above
<charliesome> yeah i like that feature
mistym_ has quit [Remote host closed the connection]
<charliesome> especially useful for callcc { |$lol| }
<whitequark> kill callcc already
<whitequark> exceptions plus fibers cover all sane use cases
<charliesome> yeah
<lianj> eval-in: please format exceptions output better. eg ignore the filename
<whitequark> it's not scheme, dammit
<charliesome> i was gonna use callcc once but fibers did the same thing
<whitequark> and they want to kill callcc even in scheme
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<whitequark> because it's too hard to implement it efficiently
<whitequark> unreasonably hard
<charliesome> pfft just use setcontext right
<whitequark> stack
<whitequark> spaghetti stack.
mistym has quit [Remote host closed the connection]
<whitequark> btw, everything about parse.y is explained by the fact that it does not build, or traverse, an AST
<whitequark> it traverses an execution tree, so to say
<whitequark> that's why it doesn't have column info, includes tons of strange optimizations, etc
<charliesome> so its basically compile.y
<whitequark> ^ exactly
<charliesome> at least it's not quite as bad as something like php
idkazuma has joined #ruby-lang
<charliesome> where the language syntax is influenced by the need to generate byte code from the parser
<whitequark> oh, sure
woollyams has joined #ruby-lang
<whitequark> parse.y actually manages to handle almost every single edge case correctly
<whitequark> that's very impressive
<charliesome> how do you mean?
<whitequark> well, ruby's syntax is actually composable. there are several "orthogonal" (in the sense of AST nodes) parts, which can be composed in arbitrary ways
<whitequark> however, when one tries to compose text representation, a whole lot of strange edge cases appear
<charliesome> right, i see
<whitequark> eg "while do" vs "while m do" vs "while m -> do"
<whitequark> and parse.y goes to great lengths, I think like half of parser and half of the C lexer do that, to parse all of these cases in somewhat sane way
<whitequark> where by "sane" I mean POLS and consistency
<whitequark> also stuff like %%% and %\0whatever\0 and so on
<whitequark> and %\\
<whitequark> you won't even suspect that a cond and cmdarg lexical stacks exist until you dig into the lexer
RickHull1 has joined #ruby-lang
mrfelix has joined #ruby-lang
ivanoats has joined #ruby-lang
<charliesome> hehe %%%%%%% == ""
<whitequark> ofc
<whitequark> this is an excellent example actually
<whitequark> parse.y concatenates consecutive string literals
<charliesome> in fact n * 4 - 1 percent signs is always valid syntax
<charliesome> whitequark: nah, that's %%% % %%%
<whitequark> >> %%%%%%
<eval-in> whitequark => /tmp/execpad-ad30aeb7cf89/source-ad30aeb7cf89:2: unterminated string meets end of file ... (http://eval.in/14882)
<whitequark> >> %%% %%%
<eval-in> whitequark => /tmp/execpad-ade6b2561a00/source-ade6b2561a00:2: unterminated string meets end of file ... (http://eval.in/14883)
<whitequark> >> """"
<eval-in> whitequark => "" (http://eval.in/14884)
<whitequark> hrm
<charliesome> >> %%%%%%%
<eval-in> charliesome => "" (http://eval.in/14885)
<charliesome> > %%%%%%%%%%%%%%%
<charliesome> >> %(hello) " world"
<eval-in> charliesome => "hello world" (http://eval.in/14886)
<charliesome> >> "hello" %( world)
<eval-in> charliesome => /tmp/execpad-aad85ca173eb/source-aad85ca173eb:2:in `<main>': undefined local variable or method `world' for main:Object (NameError) (http://eval.in/14887)
<charliesome> discuss
<whitequark> haha I just wrote "def def" in real-world code
<whitequark> charliesome: that's simple, lemme wield my lexer
mrfelix has quit [Client Quit]
tonni has quit [Ping timeout: 240 seconds]
<whitequark> actually
<whitequark> that's because '%' at expr_beg has different meaning than at expr_end
<whitequark> but " is the same
<charliesome> whitequark: oh yeah, i get it, it's just funny
tonni has joined #ruby-lang
<whitequark> yea
<whitequark> also this trick:
<whitequark> >> hello %( world)
<eval-in> whitequark => /tmp/execpad-13285c943a99/source-13285c943a99:2:in `<main>': undefined method `hello' for main:Object (NoMethodError) (http://eval.in/14888)
<whitequark> >> hello = 1; hello %( world)
<eval-in> whitequark => /tmp/execpad-d1fae7e8dc76/source-d1fae7e8dc76:2:in `<main>': undefined local variable or method `world' for main:Object (NameError) (http://eval.in/14889)
jonahR has joined #ruby-lang
<whitequark> the lexer snoops the state of the parser
<whitequark> > def def(def_t, name, args, body, end_t, comments)
<whitequark> is that bad?
<charliesome> whitequark: are you doing some sort of compiler that needs to send based on node type?
<whitequark> charliesome: hmm?
krohrbaugh has quit [Quit: Leaving.]
<whitequark> charliesome: I've no idea what you just asked about
idkazuma has quit [Remote host closed the connection]
<charliesome> nvmd
<charliesome> whats that for
MehLaptop has quit [Remote host closed the connection]
<whitequark> what exactly? the parser gem?
<whitequark> ah, I got it!
<whitequark> it's a part of the parser gem. I dispatch parse.y rules to a separate builder class
<whitequark> I don't have to call it `def` but why not
<charliesome> i'd put handle_ before the name
<charliesome> or on_
<charliesome> or some prefix
<whitequark> @builder.build_def?
<charliesome> sure
<whitequark> ExecutorFactoryFactory.generateExecutorFactoryForExecutionee(executionee).generateExecutorForContext(executionContext).executeWithThrownExceptions();
* whitequark has called it @builder.define_method
ivanoats has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
<whitequark> hrm
<whitequark> 18>> def a(*@c); end
<eval-in> whitequark => /tmp/execpad-af749c982c87/source-af749c982c87:2: syntax error, unexpected tIVAR, expecting ')' ... (http://eval.in/14894)
cupakromer has left #ruby-lang [#ruby-lang]
megha has joined #ruby-lang
baba has quit [Ping timeout: 245 seconds]
jumpei has quit [Remote host closed the connection]
ghanima has joined #ruby-lang
<ghanima> hello all was wondering if anyone has any experience with the shell class.. I am trying to find a document that explains how to execute or spawn a unix process
<ghanima> does anyone have any exposure to this
<r0bgleeson> ghanima: pid = fork { do_stuff }; Process.wait pid
<r0bgleeson> check the Kernel docs
<ghanima> r0bgleeson: Both of those methods are defined in the Kernel class than I take it
<r0bgleeson> fork is, Process.wait is its own thing
mistym has joined #ruby-lang
<r0bgleeson> if you want to spawn a program after you fork its exec("ls") or whatever it may be.
<r0bgleeson> you can also use system(…), and the backticks.
steez_ has left #ruby-lang [#ruby-lang]
<ghanima> r0bgleeson: Do all of these methods allow for you to record the exit status and stdout, & stderr
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<r0bgleeson> ghanima: you want IO.popen if you want to capture stderr/stdout but yes you can check exit status through $?(a Process::Status object), and I think wait2 even returns one to you. better check the docs for more info.
<r0bgleeson> also look into open3 for the stderr/stdout stuff
Gaelan has joined #ruby-lang
havenn_ has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
r0bgleeson has quit [Read error: Connection reset by peer]
r0bglees0n has joined #ruby-lang
MehLaptop has joined #ruby-lang
chendo has joined #ruby-lang
headius has quit [Quit: headius]
<whitequark> grrrr, ruby's coverage disregards eval with specified file
quazimodo has quit [Ping timeout: 255 seconds]
<whitequark> TracePoint seems to cover it...
krohrbaugh has quit [Quit: Leaving.]
crynix has quit [Remote host closed the connection]
dankest has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
dhruvasagar has joined #ruby-lang
towski has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
chrismar035 has joined #ruby-lang
chrismar035 has quit [Client Quit]
* whitequark is writing a SimpleCov plugin for covering racc grammars
<whitequark> probably should do the same for ragel...
<whitequark> oh well.
soknee has joined #ruby-lang
soknee has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 276 seconds]
soknee has joined #ruby-lang
soknee has quit [Client Quit]
bzalasky has quit [Remote host closed the connection]
chendo has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #ruby-lang
iamjarvo has left #ruby-lang [#ruby-lang]
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
srbaker has quit [Quit: Computer has gone to sleep.]
agile has quit [Ping timeout: 252 seconds]
bzalasky has joined #ruby-lang
sailias has joined #ruby-lang
r0bby has joined #ruby-lang
Gaelan has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 256 seconds]
lupine has quit [Excess Flood]
io_syl_ has quit [Read error: Operation timed out]
Nisstyre-laptop has quit [Quit: Leaving]
lupine has joined #ruby-lang
rally has joined #ruby-lang
rally has left #ruby-lang [#ruby-lang]
dingus_khan has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
xxaM has joined #ruby-lang
crynix has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
Rakko has joined #ruby-lang
idkazuma has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
Averna has joined #ruby-lang
dingus_khan has quit [Ping timeout: 246 seconds]
towski has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
andr0x has joined #ruby-lang
jumpei has joined #ruby-lang
v4vandetta has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby-lang
anonymuse has joined #ruby-lang
v4vandetta has quit [Ping timeout: 245 seconds]
r0bby has quit [Ping timeout: 256 seconds]
bzalasky has quit [Remote host closed the connection]
RickHull1 has left #ruby-lang [#ruby-lang]
jxie_ has joined #ruby-lang
scottschecter has joined #ruby-lang
scottschecter has quit [Client Quit]
jxie has quit [Ping timeout: 240 seconds]
MehLaptop has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
Gaelan has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
jumpei has joined #ruby-lang
sailias has quit [Quit: Leaving.]
chessguy has quit [Remote host closed the connection]
soypirate has quit [Quit: Leaving]
efy has quit [Quit: leaving]
bzalasky has joined #ruby-lang
chessguy has joined #ruby-lang
andr0x has quit [Quit: WeeChat 0.4.0]
dhruvasagar has quit [Read error: Connection reset by peer]
<TheNotary> I have a steadily growing project on my hands.. I recently created a class that is basically just an array plus 1 method. Then I started refactoring that one method and found that it was easier to look at if I created a class called HtmlTemplate... therein resides about a significant amount of the logic for the method I refactored. https://gist.github.com/anonymous/5316509
<TheNotary> I'm trying to justify not splitting off the HtmlTemplate class (the 'lil baby' class within the larger class) into it's own file because I get the feeling that too many files is uglier to look at.
dhruvasagar has joined #ruby-lang
towski has quit [Remote host closed the connection]
<TheNotary> So since the lil baby class is not used by any other code, And the class contains logic relevant to it's parent class. Is it generally a good idea to not give the lil baby class it's on .rb file?
<TheNotary> Or should I think about doing something with folders to keep all the files tidy?
<lianj> up to you. i dont like many files
<TheNotary> k, I think I'm the same way then.
bushido has quit [Ping timeout: 240 seconds]
<TheNotary> how many classes have you had in the same file at once, btw lianj?
rippa has joined #ruby-lang
<TheNotary> I'm somewhat just getting into being more object oriented so I'm not used to having anything other than static classes
bixu has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
ghanima has quit [Quit: Leaving.]
jumpei has joined #ruby-lang
bixu has left #ruby-lang [#ruby-lang]
<whitequark> TheNotary: I find that just placing each class in its own file significantly reduces the time you need to think about placing classes in files
<whitequark> so just do that
<charliesome> it means other devs can navigate your code more easily too
r0bby has joined #ruby-lang
towski has joined #ruby-lang
towski has quit [Remote host closed the connection]
towski has joined #ruby-lang
towski has quit [Remote host closed the connection]
r0bby_ has joined #ruby-lang
<TheNotary> hmm, that's what I've been doing up until now. Did you see what I meant with my HtmlTemplate class? It's exteremly intimate to the to_html operation that instantiates the class. It's almost like the parent class is the singleton to the baby class.. if that makes sense
Gaelan has quit [Remote host closed the connection]
towski has joined #ruby-lang
towski has quit [Remote host closed the connection]
<TheNotary> I was hoping there's be a snappy aconym that told me what to do like SOLID or DRY but I don't see anything out there
lewis1711 has joined #ruby-lang
r0bby has quit [Ping timeout: 256 seconds]
Gaelan has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
<bnagy> TheNotary: DSCC
<bnagy> spayy acronym for Don't Subclass Core Classes
<lianj> whitequark: i hate having to open 20 files to follow code paths
<bnagy> *snappy
<lewis1711> why do almost all unit testing frameworks involve subclassing, and then writing a method for every single test?
<TheNotary> bnagy, is doing class MyClass < Array; a bad habit? I might be missing something
<bnagy> yes
jumpei has quit [Remote host closed the connection]
<bnagy> either just use an Array, or use a DelegateClass imho, ( and the latter I have done exactly once )
<bnagy> nowait twice ;)
<bnagy> if your tag collection is just an array, then I don't see why you don't make it an ivar in your bigger class and just have a def turn_into_html tag_array
<TheNotary> oh, I didn't realize that.
<bnagy> but even if you want it as its own class, if you're adding a ton of stuff to it, then DelegateClass is cleaner
jumpei has joined #ruby-lang
<TheNotary> there's a recursive aspect to the to_html
<bnagy> oh, yeah don't do that either :D
<TheNotary> There's a tree of nodes, and each node contains child nodes (in collections)
<bnagy> not your fault, but ruby is suck for deep recursion
<bnagy> iny stack
<bnagy> *tiny dammit
io_syl has joined #ruby-lang
<TheNotary> hmm... I might have invested a lot of time is a bad algo, lol
<TheNotary> like days
<TheNotary> and days
<bnagy> I would look into converting your algorithm to use explicit recursion, like an explicit stack variable or something
<bnagy> it's not usually too hard to convert
jumpei has quit [Remote host closed the connection]
mbull9 has quit [Remote host closed the connection]
<TTilus> bnagy: do you mean theres legitimate recursions where ruby is dying with stackleveltoodeep
<bnagy> yep
Nisstyre-laptop has joined #ruby-lang
<TheNotary> how many recursive calls before i'm in trouble, btw?
* lewis1711 thought ruby 2.0 had TCO now :(
jumpei has joined #ruby-lang
<TheNotary> or is it a constant slowdown performance hit per recursive call that is the issue?
krohrbaugh has joined #ruby-lang
<bnagy> nah speed should be fine, it's just if you blow up the interpreter
<TTilus> bnagy: url or did not happen ;)
<bnagy> I have no idea about 2.0 though
<lewis1711> if I see one more clunky unit testing framework described as "elegant" I will... get mildly annoyed
<bnagy> TTilus: eh? It's a fairly well known issue with MRI
<bnagy> I had some trivial nested grammar parser that blew up, but most any deep nesting would kill it
* TTilus has been living in jruby for too long i guess
<TheNotary> let me see if I can hit the wall with a massive unit test against my work
<bnagy> yeah, it's specific to that runtime, I guess I should have said more clearly :P
<bnagy> TheNotary: just manually create a patholgical html test, you'll hit it soon enough :)
<Rakko> is there an equivalent to --without with bundle update?
<bnagy> (on mri, on 1.9)
krohrbaugh has quit [Client Quit]
<whitequark> lianj: ruby has TCO for a very long time
jumpei has quit [Remote host closed the connection]
<TheNotary> @2000 tags
<whitequark> please note that if your algorithm can benefit from TCO, you're doing it wrong (make it a loop instead)
<lewis1711> whitequark: what!?
<lewis1711> explain yourself
<TheNotary> ughh.. it's all complicated though cause it's object oriented
<whitequark> and if it cannot and still blows the stack, well, you're doing it wrong again :) nesting ~4k method calls isn't going to be debuggable
agile has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
<whitequark> lewis1711: what exactly?
<bnagy> TheNotary: it's only object oriented because you made it that way for no good reason
<TheNotary> it looks really pretty right now though
<TheNotary> ;)
<lewis1711> whitequark: "please note that if your algorithm can benefit from TCO, you're doing it wrong (make it a loop instead)"
<bnagy> if you made your 'turn this into html' just operate on an array you could just use an external stack and a loop
<whitequark> lewis1711: TCO is an optimization mainly useful to functional languages where loop-like constructs are impossible to write or frowned upon
<lewis1711> is this ruby specific advice because of its tco issues?
torrieri has joined #ruby-lang
<bnagy> not really
<whitequark> ruby-specific indeed
<whitequark> well, not exactly ruby-specific, but I'm not aware of other non-functional languages with TCO anyway
<whitequark> (LLVM can do it in some cases but it's hardly relevant or used in the wild in, again, non-functional contexts)
<lewis1711> ruby lets you solve things in a functional way with blocks etc
<lewis1711> and the functional way is almost always nicer
<whitequark> sigh
<whitequark> TCO is a way to turn recursion to iteration. why did you write it recursively in the first place? all Ruby primitives favor an iterative approach.
<lewis1711> many problems are naturally recurisve. anyway in the absence of TCO by default I suppose I agree with you
<whitequark> lewis1711: you do not understand this, sorry.
<whitequark> TCO is not applicable to recursion in general; it can only be done to the recursion which is directly equivalent to iteration
ghanima has joined #ruby-lang
<whitequark> most naturally recursive algorithms (fib, graph search, whatever) will not benefit from TCO.
<lewis1711> ok fair point. but if a problem can be written recursively or iteratatively, why would you favour a loop?
<whitequark> because loops are idiomatic for Ruby?
<whitequark> #each is also a loop, mind you.
tallship has quit [Ping timeout: 252 seconds]
<lewis1711> "idiomatic" is a cop out
<whitequark> it isn't. look at any code in any popular libraries or frameworks.
jumpei has joined #ruby-lang
<whitequark> I bet you won't find even a single case of iteration-via-recursion, because it's *not convenient* in Ruby
<lewis1711> it's not convenient because of the lack of TCO-by default. otherwise I would see no difference
<whitequark> you do not understand how TCO works, sorry
jumpei has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
<lewis1711> that assumption is incorrect
dhruvasagar has joined #ruby-lang
<lewis1711> perhaps you could illustrate your point with a small example
<TheNotary> from what I read before, TCO just makes it so when you call a function, the performance penalty is mitigated on the call.
<TheNotary> or is that something else?
<whitequark> TheNotary: basically, TCO replaces a call to the currently executing function to a jump to its entry point
<whitequark> (you also need to update the arguments & clear local variables, of course)
<whitequark> in e.g. Scheme it makes a lot of sense, because the central data structure, list, is naturally recursive, and it is quite convenient to traverse it with a recursive function
<whitequark> ("shape your code after the structure of your data")
<whitequark> so, in order to avoid exhausting stack space--it's not really about call performance, which isn't much different--TCO eliminates "useless" frames
Wardrop[home] has left #ruby-lang [#ruby-lang]
<whitequark> where by "useless" I mean "frames which are going to 1. call a function 2. return the value which the function will return".
<whitequark> (this is equivalent to the definition of "a call in the tail position")
krohrbaugh has joined #ruby-lang
<whitequark> the result is that you turn a certain kind of recursion into a loop
mistym has quit [Remote host closed the connection]
<TheNotary> oh, so if my recursion call is in the middle of the function, I don't get any benafit from TCO?
<whitequark> yea
<TheNotary> crap
<TheNotary> and I thought I was finally done with this code too
<whitequark> also, if your language is purely functional, or just cannot rebind variable names, you can't do usual loops
<whitequark> because you can't do an equivalent of "i = i + 1"
<whitequark> TCO is an artifact of functional languages
<whitequark> lewis1711: do you know *why* is it disabled by default?
mjio has quit []
<TheNotary> Is there any easy adjustment that allows me to avoid the stack trace too deep problem here? https://gist.github.com/anonymous/5316770
<whitequark> no
JoeHazzers has joined #ruby-lang
<TheNotary> do you think it's worth the re-write though?
<whitequark> but why do you nest over, I think, at least a thousand levels of tags?
<TheNotary> it was just a test case to see if I was vulnerable to stack-level-too-deep scenarios
<whitequark> rescue SystemStackError;
<charliesome> also use String#<< not String#+
<whitequark> ie it's not a DoS.
<TheNotary> k, thx
<whitequark> charliesome: StringBuilderFactory
<charliesome> abstract singleton
<charliesome> >convenient
jumpei has joined #ruby-lang
brianpWins has joined #ruby-lang
xcombelle has joined #ruby-lang
<whitequark> also com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
wallerdev has quit [Quit: wallerdev]
<lewis1711> whitequark: jruby
torrieri has quit [Quit: Leaving...]
jg_ has joined #ruby-lang
idkazuma has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
<lewis1711> you should have mentioned the linked list thing much earlier - I couldn't understand what you were saying before
io_syl has quit [Ping timeout: 252 seconds]
* whitequark sighs
<lewis1711> don't be so juvenile
krohrbaugh has quit [Quit: Leaving.]
io_syl has joined #ruby-lang
jxie_ has quit [Ping timeout: 276 seconds]
jxie has joined #ruby-lang
anonymuse has quit [Quit: Leaving...]
mbj has joined #ruby-lang
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
Gaelan has joined #ruby-lang
torrieri has joined #ruby-lang
crynix has quit [Remote host closed the connection]
fosky has joined #ruby-lang
Gaelan has quit [Ping timeout: 264 seconds]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
Gaelan has joined #ruby-lang
towski has joined #ruby-lang
krohrbaugh has joined #ruby-lang
Gaelan has quit [Ping timeout: 255 seconds]
pygmael has joined #ruby-lang
headius has joined #ruby-lang
nyuszika7h has quit [Excess Flood]
woollyams has joined #ruby-lang
z3r00ld has joined #ruby-lang
nyuszika7h_ has joined #ruby-lang
pygmael has quit [Quit: pygmael]
pygmael has joined #ruby-lang
headius has quit [Quit: headius]
nXqd has joined #ruby-lang
swav has quit [Remote host closed the connection]
krohrbaugh has quit [Quit: Leaving.]
dankest has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
crynix has joined #ruby-lang
saimaz has joined #ruby-lang
Rakko has quit [Quit: Bye]
spectra has quit [Ping timeout: 252 seconds]
kain has quit [Quit: exit]
benlovell has joined #ruby-lang
spectra has joined #ruby-lang
quazimodo has joined #ruby-lang
tsipanov has joined #ruby-lang
mbj has quit [Quit: leaving]
tylersmith has quit [Quit: tylersmith]
mossplix has joined #ruby-lang
idkazuma has joined #ruby-lang
tsipanov has quit [Remote host closed the connection]
tsipanov has joined #ruby-lang
mitchty has quit [Ping timeout: 264 seconds]
mitchty has joined #ruby-lang
swav has joined #ruby-lang
bushido has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
swav has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
beiter has joined #ruby-lang
dhruvasagar has joined #ruby-lang
JohnBat26 has joined #ruby-lang
solars has joined #ruby-lang
gregmoreno has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby-lang
swav has joined #ruby-lang
agarie has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
xcombelle has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
gregmoreno has joined #ruby-lang
z3r00ld1 has joined #ruby-lang
krohrbaugh has joined #ruby-lang
alessio_rocco has joined #ruby-lang
bushido has quit [Ping timeout: 276 seconds]
z3r00ld has quit [Ping timeout: 276 seconds]
krohrbaugh has quit [Ping timeout: 256 seconds]
towski has quit [Remote host closed the connection]
dr_bob has joined #ruby-lang
<whitequark> charliesome: wanna cool trick?
<whitequark> >> :"!@"
<eval-in> whitequark => :"!@" (http://eval.in/14920)
<whitequark> >> :!@
<eval-in> whitequark => :! (http://eval.in/14921)
<whitequark> >> def !@; end
<eval-in> whitequark => nil (http://eval.in/14922)
dankest has quit [Quit: Leaving...]
fjfish has joined #ruby-lang
francisfish has quit [Ping timeout: 246 seconds]
lsegal has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
tbuehlmann has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
maxmanders has quit [Client Quit]
havenn_ has quit [Remote host closed the connection]
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
Gaelan has joined #ruby-lang
apeiros has joined #ruby-lang
dhruvasagar has joined #ruby-lang
maxmanders has joined #ruby-lang
Gaelan has quit [Ping timeout: 248 seconds]
judofyr has joined #ruby-lang
Asher has quit [Ping timeout: 258 seconds]
Andromed_ has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 245 seconds]
alessio_rocco has joined #ruby-lang
Asher has joined #ruby-lang
chendo has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
tsipanov has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
hackeron has quit [Ping timeout: 246 seconds]
hackeron has joined #ruby-lang
pbjorklund has quit [Ping timeout: 245 seconds]
gnufied has joined #ruby-lang
Asher1 has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
Asher has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
quazimodo has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
krohrbaugh has joined #ruby-lang
quazimodo has joined #ruby-lang
chendo has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 264 seconds]
chendo has joined #ruby-lang
guns has joined #ruby-lang
Averna has quit [Quit: Leaving.]
Pupeno_w has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
bogn has joined #ruby-lang
Andromed_ has quit [Remote host closed the connection]
GarethAdams has joined #ruby-lang
GarethAdams has joined #ruby-lang
Andromed_ has joined #ruby-lang
pbjorklund has joined #ruby-lang
fjfish has quit [Remote host closed the connection]
mbj has joined #ruby-lang
francisfish has joined #ruby-lang
chendo has quit [Read error: Connection reset by peer]
Andromed_ has quit [Client Quit]
Andromed_ has joined #ruby-lang
crynix has quit [Remote host closed the connection]
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
francisfish has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Remote host closed the connection]
chendo has joined #ruby-lang
security has joined #ruby-lang
megha has quit [Ping timeout: 248 seconds]
adambeynon has joined #ruby-lang
Gaelan has joined #ruby-lang
gix has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby-lang
Andromed_ has quit []
Andromeda has joined #ruby-lang
Gaelan has quit [Ping timeout: 255 seconds]
havenwood has quit [Ping timeout: 256 seconds]
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
security has quit [Ping timeout: 246 seconds]
lewis1711 has left #ruby-lang [#ruby-lang]
Gaelan has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Gaelan has quit [Ping timeout: 245 seconds]
gnufied has joined #ruby-lang
chendo has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
maxmanders has joined #ruby-lang
Andromeda has quit [Remote host closed the connection]
security has joined #ruby-lang
Andromeda has joined #ruby-lang
krohrbaugh has joined #ruby-lang
mixandgo has joined #ruby-lang
Andromeda has quit [Ping timeout: 248 seconds]
krohrbaugh has quit [Ping timeout: 276 seconds]
beiter has quit [Quit: beiter]
tsipanov has joined #ruby-lang
guns has quit [Ping timeout: 256 seconds]
My_Hearing has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
Mon_Ouie has quit [Ping timeout: 255 seconds]
sepp2k has joined #ruby-lang
beiter has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
gregmoreno has quit [Ping timeout: 256 seconds]
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
gregmoreno has joined #ruby-lang
<bogn> Hi all, this is my first appearance here, so please excuse if I'm not adhering to channel habits
<bogn> does anybody know if it's possible to access the "regular" class from a singleton class block
<bogn> one like this: class << self; self; end; end
<bogn> I need access to a class attribute
GarethAdams has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 240 seconds]
security is now known as megha
retro|cz has quit [Ping timeout: 240 seconds]
alessio_rocco has joined #ruby-lang
havenwood has quit [Ping timeout: 256 seconds]
GarethAdams has quit [Ping timeout: 246 seconds]
<badeball> bogn: with a singleton class block, do you really mean a static method?
<bogn> I actually need access to a ActiveSupport (rails) class_attribute
<bogn> like this: class << self; puts self.my_class_attribute; self; end;
<judofyr> bogn: no, there's no way to access the real object behind a singleton class
dhruvasagar has quit [Ping timeout: 264 seconds]
<judofyr> or, get access to it from inside the singleton class
<bogn> see this https://gist.github.com/bogn/5318133 for a wider perspective
<judofyr> can't you just use the `instance`-variable?
dhruvasagar has joined #ruby-lang
<bogn> I'd like to avoid defining the approval workflow per instance I just want to decide which one to use
<bogn> dhruvasagar that's a nice coincidence
<bogn> I forked your mm-versionable gem just recently
<bogn> it's a nice gem
<bogn> I'll send you some pull requests with added features as soon as I have time for that
<judofyr> bogn: sorry, I have no idea what's the problem here :)
ghanima has quit [Quit: Leaving.]
<bogn> the problem is that approval isn't accessible inside the singleton class part
<judofyr> bogn: instance.approval ?
<judofyr> or wait
<judofyr> wat
<judofyr> approval is an lvar
<judofyr> oh right
<judofyr> sorry
ledestin has quit [Quit: ledestin]
<judofyr> that's exactly the problem
<judofyr> because singleton classes don't keep the lvars
<judofyr> bogn: can't you do: class << instance; self; end.workflow do …
io_syl has quit [Quit: Computer has gone to sleep.]
<bogn> I think I tried that, I'll see
blacktulip has joined #ruby-lang
<tsion> Or instance.singleton_class.workflow do ... in ruby 1.9
<judofyr> ah, right, I always forget about that
<bogn> it's not throwing but workflow_spec which is an addition of the workflow gem isn't defined on instance either, I'll have to look into that
yoz has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
yoz is now known as Guest67271
tadassce has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<bogn> no it's not adding the functionality to the instance
<bogn> dhruvasagar have you seen my messages above
<bogn> ?
<dhruvasagar> bogn: I did
<dhruvasagar> bogn: at least the one's about mm-versionable
<dhruvasagar> bogn: not much besides that
<bogn> yes I meant thrse
<dhruvasagar> bogn: :)
<bogn> these
<bogn> ok, I'll stop bugging you
<dhruvasagar> bogn: :)
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
krohrbaugh has joined #ruby-lang
<bogn> can anybody tell me if there might be some possibility to get at class level information from the singleton class
<bogn> for example can I add the lvars to the singleton_class manually?
kain has joined #ruby-lang
<darix> bogn: i have a more general question ... why do you need that? what problem are you trying to solve with that?
dc5ala has joined #ruby-lang
<bogn> two different workflows depending on the role
<bogn> admin workflow and regular workflow basically
krohrbaugh has quit [Read error: Operation timed out]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<Asher> anyone worked at all with redefining #hash?
<Asher> my method doesn't seem to be getting called, can't figure out why
tadassce has left #ruby-lang ["Leaving..."]
<tsion> Asher: #hash is called for the keys of the hash, not the values
dc5ala has quit [Quit: Ex-Chat]
<Asher> oh whoops
beiter has quit [Quit: beiter]
<Asher> good call, thanks
<bogn> I updated my gist a bit: https://gist.github.com/bogn/5318133
<Asher> hmm shows why my test code didn't work (obvious) but the actual code i was working with is using the key..
<Asher> oh i see why
<Asher> thanks tsion
nyuszika7h_ is now known as nyuszika7h
rippa has quit [Ping timeout: 240 seconds]
siwica1 has quit [Quit: Leaving.]
tsipanov has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
zttr has joined #ruby-lang
tsipanov has joined #ruby-lang
havenwood has joined #ruby-lang
alessio_rocco has quit [Ping timeout: 246 seconds]
<zttr> Hej
<zttr> I have recently installed ruby on my server(ubuntu)
<zttr> I wonder how can I run my script without having ssh opened
sepp2k has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 245 seconds]
flujan has quit [Quit: flujan]
xcombelle has joined #ruby-lang
mossplix has quit [Ping timeout: 256 seconds]
benlovell has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 276 seconds]
Gaelan has joined #ruby-lang
<injekt> zttr: what?
dhruvasagar has joined #ruby-lang
<injekt> zttr: ssh foo@bar.com 'ruby something.rb'
<judofyr> zttr: you want to keep it running after you disconnect from ssh?
t_ has quit [Ping timeout: 256 seconds]
<judofyr> zttr: screen or tmux is probably the simplest solution
<injekt> ah didn't think of that
<zttr> hmm ok
<zttr> is screen aviable via apt?
t_ has joined #ruby-lang
<judofyr> zttr: yes
<injekt> ambiguous question is ambiguous
<injekt> zttr: apt-get install tmux
<injekt> because tmux > screen :D
<judofyr> zttr: yeah, try tmux instead :)
<zttr> Ok Will try it thank you
mossplix has joined #ruby-lang
setmeaway has joined #ruby-lang
<judofyr> zttr: then do: `tmux`, run your Ruby script inside there. then `Ctrl-b d` will detach the terminal
<judofyr> zttr: the script will still be running
<judofyr> zttr: then later you can do `tmux attach` to get back the terminal
<injekt> then `tmux a` to reattach it
<injekt> psh
<zttr> can i redirect the stdout to a file?
<injekt> yes
setmeaway2 has quit [Read error: Connection reset by peer]
Gaelan has quit [Ping timeout: 276 seconds]
GarethAdams has quit [Read error: Connection reset by peer]
<darix> zttr: or just do
<darix> ruby /path/to/yourscript > /path/to/log 2>&1 & ; disown
<darix> then then just log out
<darix> if you want to have it restarted automatically when it crashes ... look into runit
<injekt> or if you want to do it in ruby, $stdout.reopen('somefile.txt', 'a')
<darix> injekt: and what about stderr?:p
<injekt> darix: he only asked about stdout
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
Guest67271 has quit [Ping timeout: 248 seconds]
krohrbaugh has joined #ruby-lang
tsion has quit [Quit: Leaving]
siwica has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
krohrbaugh has quit [Ping timeout: 240 seconds]
retro|cz has joined #ruby-lang
siwica has quit [Quit: Leaving.]
sush24 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
nignaztic has quit [Ping timeout: 245 seconds]
anonymuse has joined #ruby-lang
tsipanov has quit [Remote host closed the connection]
gix has joined #ruby-lang
<judofyr> darix: I often find it simpler to just use tmux/screen :)
sepp2k has joined #ruby-lang
mossplix has quit [Quit: mossplix]
zttr has quit [Quit: Page closed]
<injekt> :|
jakko has joined #ruby-lang
jakko is now known as Guest33448
gnufied has quit [Quit: Leaving.]
chrismar035 has joined #ruby-lang
Guest33448 has quit [Client Quit]
havenwood has joined #ruby-lang
siwica has joined #ruby-lang
havenwood has quit [Ping timeout: 256 seconds]
sepp2k has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
vlad_starkov has joined #ruby-lang
siwica has quit [Quit: Leaving.]
charliesome_ has joined #ruby-lang
sepp2k has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
benlovell has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
benlovell has quit [Client Quit]
wudofyr_ has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
soknee has joined #ruby-lang
r0bby_ has quit [Ping timeout: 276 seconds]
benlovell has joined #ruby-lang
alessio_rocco has joined #ruby-lang
Gaelan has joined #ruby-lang
dustint has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Gaelan has quit [Ping timeout: 260 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 246 seconds]
mossplix has joined #ruby-lang
chrismar035 has quit [Quit: chrismar035]
Pupeno_w has quit [Ping timeout: 264 seconds]
Pupeno_w_ has joined #ruby-lang
Pupeno_w_ has quit [Client Quit]
charliesome_ has quit [Quit: Textual IRC Client: www.textualapp.com]
jxie has quit [Read error: Connection reset by peer]
sush24 has quit [Quit: This computer has gone to sleep]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
xxaM has quit [Quit: ZzzZzZz]
mistym has quit [Remote host closed the connection]
eljojo has joined #ruby-lang
havenwood has joined #ruby-lang
sush24 has joined #ruby-lang
sailias has joined #ruby-lang
eljojo has left #ruby-lang [#ruby-lang]
havenwood has quit [Ping timeout: 248 seconds]
carloslopes has joined #ruby-lang
wmoxam has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
postmodern has quit [Quit: Leaving]
kurko_ has joined #ruby-lang
kurko_ has quit [Max SendQ exceeded]
fernandoaleman has joined #ruby-lang
kurko_ has joined #ruby-lang
fernandoaleman has left #ruby-lang [#ruby-lang]
<zzak> is there much difference?
<zzak> ive used both and they seem like the same thing, someone even had tmux using ^A
<zzak> tmux just sounds cooler i guess
Gaelan has joined #ruby-lang
breakingthings has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<judofyr> zzak: I'm using tmux with ^A
srbaker has joined #ruby-lang
<truls> i use tmux with screen, so nicer to use something else
<truls> screen on remote computer, tmux locally
<judofyr> just don't use screen inside tmux
<judofyr> that's confusing
<truls> now to wrap it in a vm...
<antbody> I had a confusing workflow, then I doubled it
<judofyr> especially when both use ^A
<truls> if i'm not confused, can i use it?
<truls> that's why you don't use ^A for both...
<judofyr> I was trying to get the bash ^A to go to the beginning of the line
Gaelan has quit [Ping timeout: 240 seconds]
<truls> best feature of tmux is having a nice statusbar
<truls> not sure if you can set up screen to do that or not
vlad_starkov has joined #ruby-lang
<antbody> Tmux with powerline for the win :p
voker57 has quit [Remote host closed the connection]
z3r00ld1 has quit [Read error: Connection reset by peer]
z3r00ld has joined #ruby-lang
siwica has joined #ruby-lang
fosky has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
melter has quit [Read error: Connection reset by peer]
Glass_saga has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
justinram has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<zzak> i use hardstatus alwayslastline; and hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r} (%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g
<zzak> }]'
<zzak> dont ask me what that means, but it makes a decent looking status bar
mytrile has quit [Remote host closed the connection]
justinram has quit [Remote host closed the connection]
skade has joined #ruby-lang
noop has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
skade has quit [Ping timeout: 255 seconds]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
MartynKeigher has quit [Excess Flood]
yfeldblum has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
MartynKeigher has joined #ruby-lang
Gaelan has joined #ruby-lang
mossplix has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
havenwood has quit [Ping timeout: 260 seconds]
Gaelan has quit [Ping timeout: 255 seconds]
skade has joined #ruby-lang
francisfish has joined #ruby-lang
gregmoreno has quit [Read error: No route to host]
gregmoreno has joined #ruby-lang
soypirate has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
|Vargas| has quit [Quit: ...]
tbuehlmann has quit [Remote host closed the connection]
chrismar035 has joined #ruby-lang
jxie has joined #ruby-lang
mytrile has joined #ruby-lang
andr0x has joined #ruby-lang
yfeldblum has joined #ruby-lang
nertzy2 has joined #ruby-lang
krohrbaugh has joined #ruby-lang
nertzy has quit [Ping timeout: 248 seconds]
Weems has quit [Ping timeout: 264 seconds]
gnufied has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
gix has quit [Quit: Client exiting]
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
<retro|cz> What does Q means in Qtrue and Qfalse or Qnil?
gix has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
<zzak> its the ruby version
andr0x has quit [Quit: WeeChat 0.4.0]
<zzak> retro|cz: see README.EXT, they are constants for ruby's true, false and nil
<retro|cz> zzak, I know what are they. But why they are prefixed with Q?
<retro|cz> not with Rb for example
xcombelle has quit [Ping timeout: 256 seconds]
siwica has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby-lang
gnufied has joined #ruby-lang
<zzak> retro|cz: take a look at ruby.h around line 390 to 421
<zzak> RUBY_Qfalse = 0x00
<retro|cz> zzak, yup I see that and I understand.
<retro|cz> But still wonder why Q was used to prefix.
xyzodiac has joined #ruby-lang
<retro|cz> I'm just curious.
gregmoreno has quit [Remote host closed the connection]
<zzak> you think it should be RUBY_Rbnil?
crynix has joined #ruby-lang
<zzak> im not sure of the original intent
<retro|cz> zzak, no I'm just curious why Q was choosed.
havenwood has quit [Ping timeout: 256 seconds]
siwica has joined #ruby-lang
<zzak> maybe short for equation
<retro|cz> zzak, probably
enebo has joined #ruby-lang
<retro|cz> zzak, but R should be used also :)
<zzak> like RARRAY, etc?
apeiros has quit [Remote host closed the connection]
<retro|cz> zzak, those are structs, maybe that's reason
<zzak> yep
<zzak> good guesses, but who really knows lol
<retro|cz> zzak, exactly :)
flujan has joined #ruby-lang
mossplix has joined #ruby-lang
<flujan> hello guys, I wrote a small multithread tcpserver using ruby 2.0. This servers, initializaze a class, connects to the database using active_record and execute the class.
<flujan> I am looking for a tool to check memory leaks… See that memprof is good, but last commit occur 2 years ago.
<flujan> so, what do you recommend?
gnufied has quit [Quit: Leaving.]
saimaz has quit [Remote host closed the connection]
<TheNotary> flujan, are you on github, and are you noticing waky memory consumption?
francisfish has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
francisfish has joined #ruby-lang
outoftime has joined #ruby-lang
krohrbaugh has joined #ruby-lang
Andromeda has joined #ruby-lang
chendo has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
dankest has joined #ruby-lang
jbsan has quit [Quit: jbsan]
zzak has quit [Quit: leaving]
zzak has joined #ruby-lang
zzak has quit [Client Quit]
dankest has quit [Client Quit]
zzak has joined #ruby-lang
zzak has quit [Client Quit]
zzak has joined #ruby-lang
Kuukunen- has quit [Ping timeout: 255 seconds]
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
Kuukunen has joined #ruby-lang
jbsan has joined #ruby-lang
nXqd has quit [Ping timeout: 245 seconds]
krohrbaugh has quit [Ping timeout: 245 seconds]
cmaxw has joined #ruby-lang
benlovell has quit [Quit: Computer has gone to sleep.]
skade has quit [Quit: Computer has gone to sleep.]
nXqd has joined #ruby-lang
myappleguy has joined #ruby-lang
soypirate has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Andromeda has quit [Remote host closed the connection]
Andromeda has joined #ruby-lang
dankest has joined #ruby-lang
chendo has quit [Quit: Computer has gone to sleep.]
jbsan has quit [Quit: jbsan]
io_syl has joined #ruby-lang
Andromeda has quit [Ping timeout: 246 seconds]
tylersmith has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
georgedrummond has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
nXqd has quit [Ping timeout: 245 seconds]
chendo has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby-lang
fjfish has joined #ruby-lang
francisfish has quit [Ping timeout: 248 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
bright_day has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
xyzodiac has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
krohrbaugh has joined #ruby-lang
pygmael has quit [Quit: pygmael]
alessio_rocco has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
fjfish has quit [Remote host closed the connection]
towski has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
cmaxw has quit [Quit: cmaxw]
gix has quit [Ping timeout: 256 seconds]
sush24 has joined #ruby-lang
carloslopes has quit [Ping timeout: 258 seconds]
towski has quit [Remote host closed the connection]
mbull9 has joined #ruby-lang
chendo has quit [Quit: Computer has gone to sleep.]
gix has joined #ruby-lang
cmaxw has joined #ruby-lang
jbsan has joined #ruby-lang
gregmoreno has joined #ruby-lang
georgedrummond has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
flujan has quit [Quit: flujan]
carloslopes has joined #ruby-lang
georgedrummond has joined #ruby-lang
S3kx has quit [Quit: Leaving]
tenderlove has joined #ruby-lang
jwollert has joined #ruby-lang
khaase_ has joined #ruby-lang
bright_day has quit [Remote host closed the connection]
z3r00ld has quit [Quit: Leaving.]
jxweng has joined #ruby-lang
Andromeda has joined #ruby-lang
georgedrummond has quit [Remote host closed the connection]
khaase_ has quit [Remote host closed the connection]
jwollert has quit [Remote host closed the connection]
bogn has quit [Quit: Leaving.]
jbsan has quit [Quit: jbsan]
jwollert has joined #ruby-lang
khaase_ has joined #ruby-lang
swav has quit [Remote host closed the connection]
mytrile has quit [Remote host closed the connection]
tomzx_mac has joined #ruby-lang
stef_204 has joined #ruby-lang
jxweng has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
mytrile has joined #ruby-lang
towski has joined #ruby-lang
thone has joined #ruby-lang
thone_ has quit [Ping timeout: 245 seconds]
megha has quit [Ping timeout: 248 seconds]
security has joined #ruby-lang
duper has quit [Quit: Lost terminal]
Asher1 has joined #ruby-lang
mwjcomputing has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Asher has quit [Ping timeout: 276 seconds]
pdswan has joined #ruby-lang
cmaxw has quit [Quit: cmaxw]
carloslopes has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
pygmael has joined #ruby-lang
brianpWins has joined #ruby-lang
mwjcomputing has quit [Read error: Connection reset by peer]
siwica has quit [Quit: Leaving.]
Weems has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
carloslopes has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
retro|cz has quit [Ping timeout: 260 seconds]
towski has quit [Remote host closed the connection]
sush24_ has joined #ruby-lang
carloslopes has joined #ruby-lang
sush24 has quit [Ping timeout: 260 seconds]
__butch__ has joined #ruby-lang
security is now known as megha
mwjcomputing has joined #ruby-lang
kgrz has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
crynix has quit [Remote host closed the connection]
chimkan_ has quit [Read error: Connection reset by peer]
chimkan has joined #ruby-lang
mrsolo has joined #ruby-lang
stef_204 has quit [Quit: quitting]
mytrile has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
noop has joined #ruby-lang
skade has joined #ruby-lang
jbsan has joined #ruby-lang
rippa has joined #ruby-lang
xcombelle has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Remote host closed the connection]
chrismar035_ has joined #ruby-lang
towski has joined #ruby-lang
thinkdevcode has joined #ruby-lang
chrismar035 has quit [Ping timeout: 256 seconds]
chrismar035_ is now known as chrismar035
carloslopes has joined #ruby-lang
<TheNotary> late last night, someone recommended against sublcassing core classes (I subclassed array so I didn't need to define [], []=, <<, +=, and... to_s I think and so that I would be able to include an extra recursive function. It's a fancy collection class). Can anyone link/mention some pitfalls of subclassing the way that I did? I'm having trouble finding any leads on it.
<injekt> TheNotary: I dont see anything wrong with that
<TheNotary> k, that what I was starting to think. He must have thought I could have gotten away with just a plain array
<TheNotary> thx
<injekt> TheNotary: you could just extend the object with methods you've implemented
<TheNotary> interesting. Is that mostly a style choice? It might be kind of weird on my part, but I really like doing tc = TagCollection.new on the single line. It reminds me of the old days with .NET and their meticulous type-specific collections
<TheNotary> I think it would be cool for objects that I need to extend with multiple mixins
<injekt> TheNotary: sure, I dont see anything wrong with sub-classing Ruby's core classes, as long as you know what you're doing (re overwriting existing methods etc)
noop has quit [Remote host closed the connection]
forrest has joined #ruby-lang
sush24_ has quit [Quit: Leaving]
sush24 has joined #ruby-lang
<TheNotary> good stuff. I've been refactoring someone else's gem which I use in production (and I think many rails ppl use in production) for a while and I'm hoping to get everything maximum-awesome
breakingthings has quit []
breakingthings has joined #ruby-lang
mossplix has quit [Quit: mossplix]
crynix has joined #ruby-lang
kgrz has joined #ruby-lang
<TheNotary> I'm also procrastinating adding an 'autocomplete' feature to Aptana Studio IDE where it auto-complete's stuff in gems you've required. Foreign code like that is really the only time autocomplete is worth anything... but man their code is ugly to sift through.
<TheNotary> in the code of interest they've got random custom classes that I have to sift through while debugging. I might be close though
benanne has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Guedes has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
Luwe has joined #ruby-lang
maxmanders has joined #ruby-lang
pygmael has quit [Quit: pygmael]
pygmael has joined #ruby-lang
maxmanders has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
pygmael has quit [Quit: pygmael]
intellitech has quit [Quit: intellitech]
myappleguy has quit [Quit: Leaving.]
jerrytgarcia has joined #ruby-lang
hakunin_ has joined #ruby-lang
xcombelle has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
hakunin has quit [Ping timeout: 256 seconds]
krohrbaugh has quit [Quit: Leaving.]
maxmanders has quit [Quit: Computer has gone to sleep.]
babinho has joined #ruby-lang
maxmanders has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
r0bby_ has joined #ruby-lang
stringly_typed has joined #ruby-lang
snafoo_ has joined #ruby-lang
snafoo has quit [Ping timeout: 256 seconds]
pbjorklund has quit [Ping timeout: 245 seconds]
mbull9 has quit [Remote host closed the connection]
pbjorklund has joined #ruby-lang
headius has joined #ruby-lang
jerrytgarcia has quit [Read error: Connection reset by peer]
jerrytgarcia has joined #ruby-lang
narya has quit [Ping timeout: 246 seconds]
narya has joined #ruby-lang
chrismar035 has quit [Quit: chrismar035]
krohrbaugh has joined #ruby-lang
torrieri has joined #ruby-lang
chrismar035 has joined #ruby-lang
georgedrummond has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
stringly_typed has quit [Ping timeout: 248 seconds]
GarethAdams has quit [Read error: Connection reset by peer]
MaddinXx_ has quit [Remote host closed the connection]
pbjorklund has quit [Read error: Operation timed out]
pbjorklund has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 264 seconds]
<whitequark> mbj: hi
<mbj> whitequark: hi
pbjorklund has quit [Read error: Operation timed out]
dankest has quit [Quit: Leaving...]
dankest has joined #ruby-lang
myappleguy has joined #ruby-lang
pbjorklund has joined #ruby-lang
marr has joined #ruby-lang
nXqd has joined #ruby-lang
<whitequark> mbj: got any time?
pbjorklund has quit [Ping timeout: 256 seconds]
<mbj> whitequark: yeah
<mbj> whitequark: a littlebit this evening
<whitequark> mbj: let's work on parser?
<mbj> whitequark: I have to read through your commits to get in sync
<whitequark> sure, was about to ask
sepp2k has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
nazty has joined #ruby-lang
georgedrummond has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
apeiros is now known as ape[tab]
ape[tab] is now known as apeiros
krohrbaugh has joined #ruby-lang
dingus_khan has joined #ruby-lang
<mbj> whitequark: I like the introduction of a s(pair)
<mbj> for hashes
<mbj> Was about to propose this
<mbj> whitequark: The testing dsl is very very nice, as it allows to test the nested stuff also!
<mbj> Someting I did not spotted before ;)
<mbj> Whent over to fast
<mbj> whitequark: I think I can add some edge cases to the test. Stuff I had pain with in to_source
<mbj> *the parser test
<mbj> whitequark: I dont think all of these edge cases are valid in the context of your parser, as the RBX ast not as clean
idkazuma has joined #ruby-lang
<whitequark> mbj: sure
<whitequark> we'll also need to cover all diagnostics
<mbj> whitequark: I think we should reuse the tests for to_source
krohrbaugh has quit [Quit: Leaving.]
<whitequark> mbj: not sure. could you show me an example of a test you'd want to reuse?
<mbj> whitequark: all but diagnostics
<whitequark> parser's test is quite specific in that 1) they test source maps 2) it's not rational (if possible) to reproduce the original source from the AST
<whitequark> *tests
RitterJack has joined #ruby-lang
<mbj> whitequark: All the time you have an assert_parsers, the to_source test would "override" assert_parses to test: parse(source) == parse(generate(parse(source)))
<mbj> whitequark: More like an integration test
<whitequark> mbj: I guess to_source will run these tests anyway?
<mbj> The anchor while porting to_source to your ast
<whitequark> btw
<whitequark> how about renaming parser's "to_source" to "unparser"? :) "ast", "parser", "unparser".
<mbj> I think some of my tests in to_source cover cases your test currently dont and vice versa. If I get another test suite for free, why dont use it?
<mbj> Expecting the parser tests will be better than the to_source tests soon.
<whitequark> mbj: I'd really want the test suite to be uniform. ruby_parser imports some of the ParseTree tests which work like you say, and they're a PITA to work with
<mbj> whitequark: Once I see pain I'll avoid it
<mbj> whitequark: re nameing, I dont like "unparser" and "to_source", why not "generator" ?
<mbj> whitequark: I inherhited "to_source" as name
<whitequark> mbj: it's pretty simple actually, you have tests for one gem spread across two. so you have to do extra work all the time: while integrating them, while investigating failures, while modifying tests if they're buggy, etc
<whitequark> mbj: generator is taken, and it doesn't generally refer to producing ruby code from ASTs
<mbj> whitequark: source_generator ?
sepp2k has joined #ruby-lang
<mbj> whitequark: CS-termin
<whitequark> I did not make that up :)
<whitequark> yeah
<mbj> s/termin/term/
<mbj> solid
myappleguy has quit [Quit: Leaving.]
wmoxam has quit [Ping timeout: 245 seconds]
<mbj> whitequark: If I'd reuse the parser tests I'd NOT copy files around
<mbj> Just find the location of test_parser.rb load it, subclass override assert_parses and have a new safety belt for free
<whitequark> yeah exactly what zenspider did
<whitequark> well, I guess as unparser depends on parser (but not vice versa) it could be fine
<whitequark> btw, I guess you've seen the parse.y coverage? https://coveralls.io/builds/13844/source?filename=lib%2Fparser%2Fruby18.y
<whitequark> I think I know how we can apply mutation testing to the .y files
<mbj> whitequark: yeah
jxpx777 has joined #ruby-lang
<mbj> whitequark: I also thought this once I saw that file ;)
<mbj> It is relatively easy to identify the "hand written" ruby
<mbj> We could create a parser specific "matcher" (the term I use for the objects returning mutation subjects)
<whitequark> yea
<whitequark> technically you could also mutate the rules but it's damn hard to produce a valid grammar this way
<whitequark> also racc is quite slow anyway
<whitequark> so I'm not sure if that will yield any results
sailias has quit [Read error: Operation timed out]
<mbj> whitequark: It think the mutations on hand written rules will be the most effective subjects
RitterJack has quit [Ping timeout: 245 seconds]
<whitequark> mbj: only if you can produce a grammar which compiles afterwards
<whitequark> vast majority of mutations will lead to S/R or R/R conflicts
<mbj> s/hand written rules/hand written callbacks/ ;)
<mbj> sorry for term fuckup
<whitequark> actions
<whitequark> yeah
srbaker has quit [Quit: Computer has gone to sleep.]
<mbj> actions, noted ;)
melter has joined #ruby-lang
srbaker has joined #ruby-lang
woollyams has joined #ruby-lang
Andromeda has quit [Remote host closed the connection]
swav has joined #ruby-lang
Andromeda has joined #ruby-lang
<mbj> whitequark: __DATA__ is missing from spec
<whitequark> mbj: __END__ ?
<mbj> whitequark: __DATA__ is differend from end
<injekt> DATA
<injekt> not __DATA__
<injekt> too much perl
<mbj> injekt: sorry
<whitequark> mbj: __END__ is not represented in AST
<mbj> injekt: Butt it is written as __DATA__ in the source ?
<mbj> __END__ is about control flow, just like __BEGIN__
<injekt> mbj: no
<whitequark> mbj: there is no __BEGIN__
<injekt> too much perl again? :D
<whitequark> there are BEGIN and END
<mbj> omg
<mbj> yeah
<mbj> you are corrct
<mbj> sorry
<injekt> actually BEGIN is perl too
<mbj> blood shugar
Andromeda has quit [Ping timeout: 245 seconds]
<mbj> injekt: I revoke all of my last 10 lines
<injekt> mbj: :D
nXqd has quit [Ping timeout: 264 seconds]
<mbj> whitequark: why __END__ is not into the ast?
<whitequark> mbj: it's not really syntax of the language
<whitequark> rather, it is a way to signal something to the program loader
<mbj> whitequark: So the program loader should read the entire file and scan for __END__ before?
<whitequark> it's not even handled by parser rules in parse.y.
<whitequark> mbj: lexer does that
wmoxam has joined #ruby-lang
<mbj> whitequark: okay
<whitequark> though now it does not export that knowledge, but it should actually
zastern has joined #ruby-lang
wmoxam has quit [Client Quit]
zastern has left #ruby-lang [#ruby-lang]
<mbj> whitequark: I'll go to sports now, there are too branches for this evening. Eighter I'm totally done and fall to bed like a stone, or I'm ultra awake and stay up till 04:00, as my commercial activities are done for today I can "finally" work on the parser.
<mbj> s/too/two/
crynix has quit [Remote host closed the connection]
<whitequark> mbj: ok sounds good!
<whitequark> too... branches?
crynix has joined #ruby-lang
<mbj> whitequark: s/too/two/
<whitequark> ah
<mbj> whitequark: branches like in programming ;)
idkazuma has quit [Remote host closed the connection]
<whitequark> yeah
mbj has left #ruby-lang [#ruby-lang]
zygen_ has left #ruby-lang [#ruby-lang]
outoftime has quit [Quit: Leaving]
idkazuma has joined #ruby-lang
mixandgo has quit [Quit: mixandgo]
georgedrummond has joined #ruby-lang
Andromeda has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Remote host closed the connection]
headius has quit [Quit: headius]
MartynKeigher has quit [Excess Flood]
georgedrummond has quit [Ping timeout: 248 seconds]
r0bby_ has quit [Ping timeout: 255 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zavier has quit [Quit: WeeChat 0.3.8]
zavier has joined #ruby-lang
MartynKeigher has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby-lang
jerrytgarcia has quit [Read error: Connection reset by peer]
<whitequark> grrr, I need ruby 1.8
jxpx777 has quit [Read error: Connection reset by peer]
thinkdevcode has quit [Read error: Connection reset by peer]
mixandgo has joined #ruby-lang
mixandgo has quit [Client Quit]
<whitequark> in unrelated news s(:array, s(:hash, s(:pair, s(:int, 1), s(:int, 2)))))
thinkdevcode has joined #ruby-lang
nazty has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
nazty has joined #ruby-lang
intellitech has joined #ruby-lang
<judofyr> whitequark: [{1 => 2}] ?
<whitequark> judofyr: [ 1 => 2 ]
<judofyr> wat
<judofyr> magic
judofyr has quit [Remote host closed the connection]
rue has quit [Remote host closed the connection]
skade has joined #ruby-lang
rue has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
chessguy has joined #ruby-lang
yfeldblum has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 248 seconds]
maxmanders has quit [Ping timeout: 256 seconds]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
Oloryn_lt2 has joined #ruby-lang
<mistym> Speaking of magic, I only just now stumbled on the fact that this is valid 1.8 syntax (but not 1.9): {1,2}
sandbags has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
myappleguy has joined #ruby-lang
Oloryn_lt2 has quit [Ping timeout: 258 seconds]
Luwe has quit [Quit: leaving]
mbull9 has joined #ruby-lang
<symm-> I get this running irb on windows: "DL is deprecated, please use Fiddle"
krohrbaugh has joined #ruby-lang
<symm-> googling it reveals that I shouldn't be using 2.0.0 and should downgrade to 1.9.3
<symm-> not sure why 2.0.0 is so prominent on the ruby installer page then...
maxmanders has quit [Quit: Computer has gone to sleep.]
breakingthings has quit []
anonymuse has quit [Quit: Leaving...]
forrest has quit [Quit: Leaving]
krohrbaugh has quit [Client Quit]
thinkdevcode has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
<drbrain> symm-: o_O
<drbrain> what page told you to use 1.9.3?
<whitequark> mistym: also:
<whitequark> 18>> { 1,2,3 }
<eval-in> whitequark => /tmp/execpad-30c6ff0844a1/source-30c6ff0844a1:2: odd number list for Hash (http://eval.in/14996)
jg_ has quit [Ping timeout: 276 seconds]
<mistym> whitequark: Yeah, I noticed that too.
<mistym> An odd "feature"
krohrbaugh has joined #ruby-lang
soknee has quit [Quit: Leaving.]
nXqd has quit [Ping timeout: 245 seconds]
sixty4k has joined #ruby-lang
mbj has joined #ruby-lang
mbj has quit [Client Quit]
<whitequark> mistym: perl
<whitequark> in perl, => = ,
mwjcomputing has quit [Ping timeout: 264 seconds]
<mistym> whitequark: Aha
Gaelan has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Gaelan has quit [Read error: Connection reset by peer]
Gaelan_ has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
nXqd has joined #ruby-lang
sv has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
Gaelan_ has quit [Ping timeout: 248 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<whitequark> >> def 1.foo; end
<eval-in> whitequark => /tmp/execpad-d33238da681f/source-d33238da681f:2: syntax error, unexpected tINTEGER ... (http://eval.in/15001)
<whitequark> >> def (1).foo; end
<eval-in> whitequark => /tmp/execpad-958278ecc32c/source-958278ecc32c:2: can't define singleton method for literals ... (http://eval.in/15002)
<whitequark> >> def ("foo").foo; end
<eval-in> whitequark => /tmp/execpad-0b7463476990/source-0b7463476990:2: can't define singleton method for literals ... (http://eval.in/15003)
<whitequark> >> def ("foo#{bar}").foo; end
<eval-in> whitequark => /tmp/execpad-a51d003bc228/source-a51d003bc228:2: can't define singleton method for literals ... (http://eval.in/15004)
<whitequark> >> def (1..2).foo; end
<eval-in> whitequark => nil (http://eval.in/15005)
<whitequark> ...
<whitequark> >> def ([]).foo; end
<eval-in> whitequark => /tmp/execpad-2fd34ce538e6/source-2fd34ce538e6:2: can't define singleton method for literals ... (http://eval.in/15006)
<whitequark> so... range literals aren't literals anymore? *confused*
<drbrain> maybe it's a bug with NODE_ZARRAY
<whitequark> >> def ([1,2]).foo; end
<eval-in> whitequark => /tmp/execpad-b542e7302adc/source-b542e7302adc:2: can't define singleton method for literals ... (http://eval.in/15007)
<drbrain> huh
<whitequark> this is a weird feature actually
<whitequark> I mean this is fine:
<whitequark> >> def (1 + 2).foo; end
<eval-in> whitequark => /tmp/execpad-2d48b4333254/source-2d48b4333254:2:in `<main>': can't define singleton (TypeError) (http://eval.in/15008)
<whitequark> >> def (//).foo; end
<eval-in> whitequark => /tmp/execpad-89ba6661f109/source-89ba6661f109:2: can't define singleton method for literals ... (http://eval.in/15009)
Gaelan has joined #ruby-lang
zastern has joined #ruby-lang
nXqd has quit [Ping timeout: 252 seconds]
Gaelan has quit [Ping timeout: 256 seconds]
mistym has joined #ruby-lang
xxaM has joined #ruby-lang
stardiviner has quit [Ping timeout: 240 seconds]
Guedes has quit [Remote host closed the connection]
headius has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
sixty4k has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xyzodiac has joined #ruby-lang
headius has quit [Quit: headius]
siwica has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
stardiviner has joined #ruby-lang
chrismar035 has quit [Quit: chrismar035]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
yfeldblum has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
agarie has quit [Remote host closed the connection]
dingus_khan has quit [Ping timeout: 252 seconds]
erikh has joined #ruby-lang
<erikh> ya'll need to make sure drbrain gets a ruby hero award this year. that is all.
erikh has left #ruby-lang ["WeeChat 0.4.0"]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
brianpWins_ has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
georgedrummond has joined #ruby-lang
thisirs has joined #ruby-lang
lupine_85 has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
siwica has left #ruby-lang [#ruby-lang]
myappleguy has quit [Quit: Leaving.]
sv is now known as discopig
kain_ has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
gregmoreno has quit [Ping timeout: 240 seconds]