<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
<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
<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
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>
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]
<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?
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]
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: 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]