verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rakko has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Client Quit]
<hagabaka>
I have a project that opens the same class twice and has documentation in both places, and rdoc only shows the documentation from one. Is there a way to fix this?
<hagabaka>
oh, never mind that
<erikh>
check out what Singleton does
bradsmith has joined #ruby-lang
JasonA has joined #ruby-lang
bradsmith has quit [Ping timeout: 245 seconds]
jacktrick has quit [Quit: Leaving]
marr has quit [Ping timeout: 240 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
<hagabaka>
I'm using \ before line breaks in the documentation, and rdoc strips those and joins the lines in the output :/
<hagabaka>
or maybe the syntax highlighter it uses
joshuawscott has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Max SendQ exceeded]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Client Quit]
joshuawscott has quit [Quit: Leaving.]
JasonA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joshuawscott has joined #ruby-lang
tkuchiki has joined #ruby-lang
Rakko has quit [Quit: leaving]
ssb123 has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
spuk has joined #ruby-lang
_jpb__ has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
_jpb__ has quit [Ping timeout: 240 seconds]
Nisstyre has quit [Quit: Leaving]
io_syl has joined #ruby-lang
bradsmith has joined #ruby-lang
malev has joined #ruby-lang
bradsmith has quit [Ping timeout: 256 seconds]
iliketurtles has joined #ruby-lang
Domon has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
_jpb__ has joined #ruby-lang
Austin__ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spuk has quit [Read error: Connection reset by peer]
tylergillies_ has joined #ruby-lang
pr0ton has joined #ruby-lang
_jpb__ has quit [Ping timeout: 240 seconds]
toretore has quit [Quit: Leaving]
dhruvasagar has joined #ruby-lang
iliketurtles has quit [Ping timeout: 264 seconds]
Domon has joined #ruby-lang
iliketurtles has joined #ruby-lang
<xuser>
rubygems.org should have better stats :)
<erikh>
patches welcomd
Austin__ has quit [Quit: Leaving.]
charliesome has joined #ruby-lang
<xuser>
looks like it runs on rails :/
siberia has quit [Quit: siberia]
Nisstyre-laptop is now known as Nisstyre
bradsmith has joined #ruby-lang
cads has joined #ruby-lang
spuk has joined #ruby-lang
_helloworld_ has quit [Remote host closed the connection]
scottschulthess has quit [Quit: scottschulthess]
Fraibert has joined #ruby-lang
bradsmith has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
vbatts has joined #ruby-lang
<gnufied>
Qt is pretty good. except it looks shite on osx
<yorickpeterse>
I don't care for OS X
<yorickpeterse>
anything but either Wx or Cocoa looks like shite on OS X anyway
<gnufied>
Wx as well doesn't look good
<gnufied>
they use native underneath yes, but Wx and native OSX conventions vary
<Nilium>
Wx is mostly dead.
<gnufied>
and mostly dead, yes
<Nilium>
From a development standpoint, I mean.
barttenbrinke has joined #ruby-lang
<Nilium>
People still use it, of course.
mdedetrich has joined #ruby-lang
<Nilium>
Also, Qt adherents don't believe me when I tell them that Qt apps on OS X have a weird uncanny valley effect going on.
<yorickpeterse>
I personally don't care much for Qt vs Gtk+ vs X, I just want something that works
<yorickpeterse>
Sadly most of them don't unless you like writing piles of horrendous C++
<yorickpeterse>
And Ruby's GTK/Qt bindings only work on MRI and generally do a lot of crazy macro-ception
<Nilium>
I just use Cocoa. I'd probably use GTK if I had the option, but I don't.
<yorickpeterse>
If you're targeting OS X then GTK makes no sense
<Nilium>
Indeed, what with its dependency on having an X server.
<Nilium>
There is a Cocoa port -- or maybe Carbon, can't remember -- but it's dead in the water.
<yorickpeterse>
GTK in general looks the best on Linux (at least to me), but the docs are absolute shit
<Nilium>
I occasionally toy with the idea of rebooting the effort, but it seems like a waste of time given that I've lost any hope of cross platform GUIs working outside of a browser window.
<yorickpeterse>
It's just some unreadable bunch of API docs. If they had a banner at the top saying "lol fuck you" it would at least make sense
<Nilium>
They do, but it's in the comments.
<Nilium>
It's also got ASCII art of two turtles fucking.
<yorickpeterse>
With the former I still have no fucking clue what this is all about
<yorickpeterse>
the latter at least gives me a small introduction
<yorickpeterse>
grrrr gtk
<Nilium>
Looking at the list of containers, I feel sad that I actually know what they all mean. It's actually very reminiscent of Android's layout containers.. maybe Android got it from GTK.
Domon has quit [Remote host closed the connection]
<Nilium>
Actually, I take that back: GtkBox is weirdly out of place.
<Nilium>
Box sounds like what Fixed is, but then it's not, so maybe it's an AspectFrame with an aspect of 1?
<yorickpeterse>
There are a lot of these weird widgets in Gtk of which the name makes little sense
<Nilium>
Looking at the docs for it, it seems to be like Fixed but only in size. And maybe not actually fixed.
<yorickpeterse>
"GtkX...but it actually does Y!"
ruby-lang168 has joined #ruby-lang
hahuang61 has joined #ruby-lang
<yorickpeterse>
I still hate them for not documenting their closure system properly
<yorickpeterse>
I had to resort digging through the actual source code to see how it was used
<yorickpeterse>
(in other projects)
<Nilium>
Yeah, looks like GtkBox gets to decide if it wants width or height fixed, but not both.
<Nilium>
In other words, horizontal/vertical packing/stacking.
<Nilium>
Meaning it's a thing meant to be used as a childthing for other bigthings.
robbyoconnor has joined #ruby-lang
<Nilium>
API seems alright from the layout containers so far, anyway.
ruby-lang168 has quit [Client Quit]
r0bby_ has quit [Read error: No route to host]
whaworth has joined #ruby-lang
<Nilium>
GtkPaned is made of stupid.
<yorickpeterse>
It gets really confusing once you go a bit more low-level
atmosx has quit [Quit: And so the story goes…]
hahuang61 has quit [Ping timeout: 248 seconds]
<Nilium>
Probably. I've no experience with it, so I'm only basing this on the tiny bit of documentation I'm looking at.
<waynehaworth_rub>
If I run File.rename on it's own, outside of the loop it works fine
<canton7>
have a look at the ouput of Dir.foreach(Dir.getwd).to_a
<waynehaworth_rub>
ahhh
<waynehaworth_rub>
String
<canton7>
no?
<canton7>
[".", "..", <other files and folders>]
<canton7>
hence my last suggestion to make sure you're only trying to rename files
<waynehaworth_rub>
ah yes, I could see how bad things could happen
<canton7>
which is why File was complaining that it couldn't rename '.' to '.'
<waynehaworth_rub>
maybe I should test for a file extention
<yorickpeterse>
File.rename(..., ...) if File.file?(...)
<canton7>
waynehaworth_rub, there are much more reliable way to see if something is a file or directory - File.file?(...) and File.directory?(...)
<canton7>
directories can have extensions of them too, you know :) and files don't have to have an extension
<canton7>
s/of'on
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hahuang61 has joined #ruby-lang
<waynehaworth_rub>
ok cool, I will have a play, don't tell me anything, I want to figure it out from the Docs
<canton7>
we're already told you. two different ways, too ;)
<waynehaworth_rub>
yea but I don't understand any of it!
<canton7>
argh typing fail. we've
<waynehaworth_rub>
I have been using Ruby for about 1 hour so far, so gimmi a break :)
<canton7>
heh righto :)
<realDAB>
waynehaworth_rub: welcome to ruby!
<waynehaworth_rub>
Thanks :)
<waynehaworth_rub>
basically someone at work will be dropping loads of excel reports unto a dropbox folder. The reporting software will be spitting these out with terrible filenames
<waynehaworth_rub>
I would like to have some kind of background process pick these up and change the name automatically
<waynehaworth_rub>
so, baby steps to start with.
dhruvasagar has quit [Ping timeout: 248 seconds]
hahuang61 has quit [Ping timeout: 245 seconds]
mucker has joined #ruby-lang
<waynehaworth_rub>
actually, I can probably run a Hazel script to do the monitoring.
gja has joined #ruby-lang
cored has joined #ruby-lang
ledestin has quit [Quit: ledestin]
G________ has joined #ruby-lang
G________ has quit [Client Quit]
breakingthings has joined #ruby-lang
_whitelogger has joined #ruby-lang
jinie has joined #ruby-lang
anonymuse has joined #ruby-lang
khaase_ has joined #ruby-lang
thepumpkin has quit [Remote host closed the connection]
wmoxam has joined #ruby-lang
pipework has quit [Remote host closed the connection]
sebroeder has quit [Quit: sebroeder]
sebroeder has joined #ruby-lang
bradsmith has joined #ruby-lang
scmx has quit [Ping timeout: 240 seconds]
realDAB has quit [Quit: realDAB]
siberia has joined #ruby-lang
rshetty has joined #ruby-lang
_jpb__ has joined #ruby-lang
bradsmith has quit [Ping timeout: 264 seconds]
kurko_ has joined #ruby-lang
_jpb__ has quit [Ping timeout: 276 seconds]
tkuchiki_ has quit [Remote host closed the connection]
malev has quit [Remote host closed the connection]
<yorickpeterse>
whitequark: HEY CHECK THIS OUT
sascha_d has joined #ruby-lang
<yorickpeterse>
>> if nil; false; elese; 'haha wtf'; end
<apeiros>
yorickpeterse: so why did it not raise a syntax error?
<apeiros>
ah
<apeiros>
because it never enters the if
w00x has joined #ruby-lang
<gnufied>
yep.
<gnufied>
btw, I had a ran() somewhere in expression that I was using with "str%x" % 434
<gnufied>
rand()
realDAB has quit [Client Quit]
<gnufied>
and hence different values. :-)
bgant has joined #ruby-lang
<judofyr>
gnufied: I know how to fix that: def rand(*); srand(1); super end
<gnufied>
good plan. But I was suppose to be generating unique mac addresses
siberia has quit [Quit: siberia]
bradsmith has joined #ruby-lang
thepumpkin has joined #ruby-lang
nevill has joined #ruby-lang
<gnufied>
judofyr: btw, I am still going on with SAT solver, bit slowly. but I have a branch on bundler, where I have extracted resolver algorithm and made it replacable
realDAB has joined #ruby-lang
<judofyr>
gnufied: cool, how did you solve the "prefer newer versions"?
<judofyr>
gnufied: also, using MiniSAT?
<gnufied>
for now.
GarethAdams has quit [Ping timeout: 264 seconds]
<gnufied>
finding newer versions falls under pseudo boolean optimization problem.
<judofyr>
I've been trying to figure out what that's called
rippa has joined #ruby-lang
<gnufied>
there is a paper I have. I can forward you, if you want
<judofyr>
gnufied: appreciated. judofyr@gmail.com
nevill has quit [Remote host closed the connection]
nevill has joined #ruby-lang
<gnufied>
Another update, whitequark's >100 dependecy triggers individual gemspec download because at some point bundler-api guys decided if you have >100 you are better off downloading them individually
bradsmith has quit [Ping timeout: 245 seconds]
<judofyr>
…
<judofyr>
does it still matter?
<gnufied>
we had lots of performance problems with bundler-api
relix has joined #ruby-lang
<gnufied>
probably not. but I did not probe further. :-)
GarethAdams has joined #ruby-lang
chimkan has quit [Ping timeout: 245 seconds]
chimkan_ has joined #ruby-lang
realDAB has quit [Quit: realDAB]
dhruvasagar has joined #ruby-lang
<yorickpeterse>
apeiros: yah
<yorickpeterse>
typical monday derps
flip_digits has joined #ruby-lang
Austin__ has joined #ruby-lang
pipework has joined #ruby-lang
tmi has quit [Quit: tmi]
ssb123 has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
benlovell has quit [Ping timeout: 256 seconds]
yatish27 has quit [Remote host closed the connection]
tomzx_mac_ has quit [Ping timeout: 245 seconds]
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
benlovell has joined #ruby-lang
yatish27 has joined #ruby-lang
pskosinski has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
Austin__ has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby-lang
dhruvasagar has joined #ruby-lang
killthe|wknd is now known as killtheliterate
sush24_ has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
JasonA has joined #ruby-lang
thmzlt has joined #ruby-lang
nathanstitt has joined #ruby-lang
_helloworld_ has joined #ruby-lang
_helloworld_ has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
jbwiv_ has quit [Remote host closed the connection]
LauraE has quit [Remote host closed the connection]
bradsmith has joined #ruby-lang
io_syl has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
realDAB has joined #ruby-lang
ssb123 has joined #ruby-lang
haowei has joined #ruby-lang
haowei has quit [Client Quit]
nevill has quit [Quit: nevill]
thmzlt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chimkan has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
chimkan_ has quit [Ping timeout: 245 seconds]
pipework is now known as grumpwork
JasonA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thmzlt has joined #ruby-lang
hashkey_ is now known as hashkey
soahccc has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
rickruby has joined #ruby-lang
<chris2>
bougyman: ever used unicorn with runit/runsv?
Austin__ has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
Austin__ has left #ruby-lang [#ruby-lang]
ssb123 has quit [Remote host closed the connection]
shinnya has joined #ruby-lang
<judofyr>
oh no, what is happening to me. I'm making a two-way data binding framework for JS.
rickruby has quit [Ping timeout: 264 seconds]
<bougyman>
chris2: doing so now, yes.
<bougyman>
one sec, run script otw
<chris2>
do you use this cargo-culted script or have something sane? :)
skade has quit [Quit: Computer has gone to sleep.]
ssb123 has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
_jpb_ has joined #ruby-lang
jonahR has joined #ruby-lang
_jpb_ has quit [Quit: leaving]
_jpb_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
rickruby has quit [Remote host closed the connection]
efrainolivares has quit [Quit: efrainolivares]
krohrbaugh has quit [Quit: Leaving.]
ssb123 has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
_jpb__ has quit [Quit: Lost terminal]
<yorickpeterse>
$HOME sweet $HOME
iliketurtles has joined #ruby-lang
pskosinski has quit [Quit: Til rivido Idisti!]
arBmind has quit [Quit: Leaving.]
<lianj>
~\o_
<tubbo>
~ sweet ~
<joevandyk>
is it normal for 64-bit ruby apps to take up almost 2x memory?
<tubbo>
i'm gonna stay right $PWD
efrainolivares has joined #ruby-lang
<yorickpeterse>
joevandyk: 2x, no
<yorickpeterse>
tubbo: you mean you're sitting inside a directory?
<yorickpeterse>
that must be uncomfortable
<joevandyk>
yorickpeterse: i'm seeing significantly more being used, haven't measured exactly though.
<joevandyk>
thinking of running 32 bit ruby on a 64 bit OS instead
<joevandyk>
that just a matter of setting the CFLAGS?
<joevandyk>
when building ruby?
<yorickpeterse>
That's like saying you'd rather use a 100 year old card because of some weird problem you're not even sure is related to the actual architecture
<tubbo>
yorickpeterse: o/` sittin on the dir of the bay o/`
<yorickpeterse>
* car
<yorickpeterse>
There are exactly zero reasons why you want to run 32bit today unless you're restricted to <512MB of RAM
<yorickpeterse>
even then it doesn't even make that much sense anymore
rmyers has joined #ruby-lang
<yorickpeterse>
haha that reminds me of this wonderful fix a co-worker at my previous job once made
<yorickpeterse>
He was running 32bit windows and had some issues with floating points. Instead of fixing his setup he just casted the value to a string
<yorickpeterse>
"LOL FIXED IT BRA"
<yorickpeterse>
interesting enough it would be casted back to a float later on anyway
<yorickpeterse>
(PHP)
krohrbaugh has joined #ruby-lang
joshuawscott has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
joshuawscott has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby-lang
skinny_much has joined #ruby-lang
nickgal has joined #ruby-lang
banisterfiend has joined #ruby-lang
duphus has joined #ruby-lang
milesforrest is now known as milesforrest|afk
rickruby has quit [Ping timeout: 240 seconds]
patrikf has joined #ruby-lang
<apeiros>
so yes, if you have tons of small objects which fit into VALUE itself, your memory usage might nearly double
<apeiros>
yorickpeterse, joevandyk: VALUE on 64bit systems is 8byte compared to 32bit ruby's 4byte
<joevandyk>
yorickpeterse: i'm running rails apps on ec2. i'm memory constrained usually. i don't want to have to have 50% more instances if i don't need to
jinie has quit [Ping timeout: 246 seconds]
_whitelogger_ has joined #ruby-lang
efrainolivares has quit [Quit: efrainolivares]
maxmanders has joined #ruby-lang
_whitelogger_ has joined #ruby-lang
<yorickpeterse>
We ran 32bit too for a while and we've yet to see an increase in memory now that we run 64bit (thank god)
<yorickpeterse>
but what apeiros said is interesting
duphus has quit [Quit: Leaving.]
thmzlt has joined #ruby-lang
brixen has joined #ruby-lang
cored has quit [Ping timeout: 256 seconds]
<spike|spiegel>
well, 64bit also on the other hand should speed up the interpreter
cored has joined #ruby-lang
cored has joined #ruby-lang
dereckrx has joined #ruby-lang
<yorickpeterse>
joevandyk: what instance are you running on, micro or small?
efrainolivares has joined #ruby-lang
dereckrx has left #ruby-lang [#ruby-lang]
jonahR has quit [Quit: jonahR]
mistym has joined #ruby-lang
retro|cz has quit [Ping timeout: 276 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<hagabaka>
I'm using the bindata gem which "registers" classes you define if their superclasses are registered. I'm trying to dynamically define classes, and when I use module_eval with a string, bindata finds the classes correctly, but when I use a block, it doesn't. How can I use a block without detectable difference?
<daturkel>
beginner question: i have a module that only needs to be extended to *some* instantiations of a class. should i give the class's initialize function a parameter to trigger extending it, or is it best to do extension outside of the class?
<crankharder>
daturkel: can't you just subclass it and give the module to the subclass?
<daturkel>
that's very possible, i've never done any subclass/class inheritance before
scottschulthess has joined #ruby-lang
<crankharder>
class MyModdedClass < ParentClass ; include MahModule ; end
scottschulthess has quit [Client Quit]
<zenspider>
he said SOME
<daturkel>
do i then call MyModdedClass.new when using that?
<crankharder>
yea, but he also said the trigger could be determined at instantiation
<crankharder>
in which case he can pick which of the two to use
<zenspider>
well, subclassing is certainly a better option (in which case it could be argued no module is needed at all)
<daturkel>
yeah, whether you need the module or not is known as soon as i'm making the object
<zenspider>
extending instances blows the method caches
<crankharder>
yea, also that
<daturkel>
yeah i could probably cut out the module this way
<daturkel>
cool, thanks guys. i'll give this a shot
<zenspider>
in the case of that gist, yeah. no module needed
<daturkel>
so i take it the real use of modules comes when you might want to include/extend several different classes with it?
<daturkel>
*the real powerful use at least
nathanstitt has joined #ruby-lang
jsullivandigs has joined #ruby-lang
<zenspider>
eh... there are too many uses for/of modules
realDAB has joined #ruby-lang
<daturkel>
i've also been using them to compartmentalize a set of related methods (which are defined `def ModuleName.method_name`, not `def method_name`) but i'm not sure if that's considered good usage
<crankharder>
I primarily use them to make my code harder to follow
<crankharder>
job security homie
<daturkel>
hehe
<zenspider>
daturkel: do def self.method_name instead. you'll thank me later
havenwood has quit [Remote host closed the connection]
<daturkel>
does a subclass get initialized as its parent class and then again via its own initialize method?
<zenspider>
depends on if initialize is defined and if/where it calls super
<zenspider>
and ... you mean instance, not subclass
<zenspider>
which get initialized also... but I don't think it is what you meant
<daturkel>
I want SubClass.new to do both SuperClass' initialize function as well as its own one
<x0f>
than you should call super in the subclass initialize-method with the appropriate parameters for initializing an instance of the parent class
<daturkel>
ok that makes sense
benanne has quit [Quit: kbai]
kstuart has quit [Read error: Operation timed out]
<daturkel>
x0f: is that not the case is the subclass doesn't have an initialize function?
iliketurtles has joined #ruby-lang
<daturkel>
seems like if subclass doesn't have initialize, then SubClass.new just passes its arguments to SuperClass.new
Taranis has joined #ruby-lang
<x0f>
daturkel, oh, is missunderstood you then, i presumed you have attributes on your subclass instance which need to be initialized. yes, if no initialize-method is present is passes all arguments to super of the parent-class initialize-method
<x0f>
eh... it just passes it to the parent class initialize-method.. kind sleepy here.
priodev has quit [Ping timeout: 240 seconds]
<daturkel>
gotcha, i understand. just wanted to make sure i understood both cases.
priodev has joined #ruby-lang
nickgal has quit [Quit: nickgal]
<x0f>
daturkel, i recommend using a r
<daturkel>
?
<x0f>
..repl for testing this, or even better, write a small test-file for testing your expectations.
<daturkel>
i've never written testfiles before, is there a decent resource for me to see how to best do this?
Nisstyre has joined #ruby-lang
efrainolivares has quit [Quit: efrainolivares]
efrainolivares has joined #ruby-lang
<x0f>
daturkel, well, there are many testing frameworks out there, ruby itself should "ship" with test-unit. it's solid, but not fancy.