Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
amerine [amerine!~mturner@c-24-22-64-72.hsd1.or.comcast.net] has joined #ruby-lang
<postmodern> stupid question, what's a simple way to determine if a value is an instance of any Class?
<savage-> postmodern: obj.is_a?(Class)
<postmodern> savage-, instance like Foo.new
<savage-> foo.is_a?(Foo)
<savage-> or
<savage-> Foo === foo
<postmodern> savage-, basically im adding some logic to a Module.extended, to check when it's extended into an object
<postmodern> savage-, any object
<postmodern> best i can think of is: !(object.kind_of?(Class) || object.kind_of?(Module))
<shevy> hmm
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
<whitequark> postmodern: Class.kind_of? Module # => true
<whitequark> class A; end; A.kind_of? Module # => true
dhruvasagar [dhruvasagar!~dhruvasag@65.98.79.137] has joined #ruby-lang
<postmodern> whitequark, ah! because Module is an ancestor of Class
<postmodern> interesting
* troubleman is now playing: Troubleman - Last Beat 2011 (Intro Unknown): http://home.no/dwaynie/last_beat_2011_intro_unknown.mp3
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
lele [lele!~lele@fangorn.windmill.it] has joined #ruby-lang
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
towski [towski!~towski@host-70-45-23-142.onelinkpr.net] has joined #ruby-lang
AndChat| [AndChat|!~AndChat@222.153.223.46] has joined #ruby-lang
sh1nji [sh1nji!~sh1nji@c-69-181-222-6.hsd1.ca.comcast.net] has joined #ruby-lang
Nisstyre [Nisstyre!~yours@infocalypse-net.info] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
towski [towski!~towski@host-70-45-23-142.onelinkpr.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
janissary [janissary!~user@adsl-98-70-95-30.mco.bellsouth.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@70.28.245.99] has joined #ruby-lang
TheMoonMaster [TheMoonMaster!~TMM@reddit/operator/themoonmaster] has joined #ruby-lang
dhruvasagar [dhruvasagar!~dhruvasag@65.98.79.137] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has quit ["Leaving"]
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
m0wfo [m0wfo!~chris@89.38.202.39] has joined #ruby-lang
<ryanf> troubleman: do you ever listen to any music that isn't by you
aarkerio [aarkerio!~aarkerio@201.141.2.107] has joined #ruby-lang
<aarkerio> hi!! in limit ||= 10
<aarkerio> how do you read l "||=" ?
<aarkerio> must be equal?
<ryanf> limit ||= 10 is basically the same thing as "limit = limit || 10"
<ryanf> just like limit += 10 is limit = limit + 10
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
<robgleeson> limit || limit = 10 <- more like this.
<robgleeson> see the RI article :)
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby-lang
<ryanf> robgleeson: I know, I specifically don't get into that when people ask
<ryanf> because it doesn't matter and it messes up the analogy
<ryanf> that's why I said "basically"
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<hagabaka> what's the RI article?
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
tavon [tavon!~tavon@c-98-209-27-241.hsd1.mi.comcast.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
<shevy> yeah
<shevy> petercooper writes good articles
Kanolesi_ [Kanolesi_!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
aarkerio [aarkerio!~aarkerio@201.141.2.107] has quit ["Leaving"]
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
jefflembeck_ [jefflembeck_!~jeffreyle@c-24-18-224-239.hsd1.wa.comcast.net] has joined #ruby-lang
dRbiG [dRbiG!drbig@unhallowed.pl] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
Eising [Eising!~allan@0x52b41d06.static.bcbnet.dk] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has quit [#ruby-lang]
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
amh345 [amh345!~amh345@unaffiliated/amh345] has quit [#ruby-lang]
brianpWins_ [brianpWins_!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
d2biG [d2biG!drbig@unhallowed.pl] has joined #ruby-lang
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
basicxma1 [basicxma1!~basicxman@theroboticsuniverse.net] has joined #ruby-lang
singpoly1a [singpoly1a!~singpolym@69.171.154.34] has joined #ruby-lang
phlipper [phlipper!~phlipper@24.32.25.30] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.254.70] has joined #ruby-lang
hackeron_ [hackeron_!~hackeron@cpc11-seve19-2-0-cust423.13-3.cable.virginmedia.com] has joined #ruby-lang
Bwild [Bwild!~irc@netblock-75-79-22-130.dslextreme.com] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
nuclears_ [nuclears_!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.221] has joined #ruby-lang
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
mindgame [mindgame!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.37] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.254.70] has joined #ruby-lang
Randroid [Randroid!~gregory@static-72-91-82-26.tampfl.fios.verizon.net] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has joined #ruby-lang
lesyork [lesyork!~textual@87-194-105-117.bethere.co.uk] has joined #ruby-lang
<operant108> Given that I have a class defined with a module of the same name, say module YAML; class YAML.. so to refer to the class you must do YAML::YAML.parse() , what would be the best way to make the classes methods accessible simply by referencing the module. e.g. YAML.parse("foo") ?
<robgleeson> YAML.extend YAML
<robgleeson> YAML.extend YAML::YAML* - for the instance methods of YAML::YAML on YAML.
<robgleeson> god that's confusing :)
<robgleeson> oh, and it'd need to be a module as well.
<operant108> Hmm... so it would have to be module YAML; module YAML ?
<operant108> because i get wrong argment type Class (expected Module) when i do YAML.extend(YAML::YAML)
<robgleeson> something like that ^
<robgleeson> yeah, extend only works for other modules
<robgleeson> but i wrote an example with a class as well
<robgleeson> at the very bottom
<robgleeson> YAML::YAML.new *
<robgleeson> 18
<robgleeson> line 18
<robgleeson> https://gist.github.com/37c29e0b45dfa171371b - for your original Q, with a example at the bottom.
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<operant108> Hmm.. It works for a case whenever i need an instance of the class , but not for a case where the class only has class instance methods
<operant108> e.g. module YAML; class YAML; class << self; def methX.... so calling in full is YAML::YAML.methX
<robgleeson> refresh
<robgleeson> updated the gist
maek [maek!~Adium@ip68-227-57-23.lv.lv.cox.net] has joined #ruby-lang
<maek> so im messing with sinatra trying to use datamapper (im ruby noob) and I get this error https://gist.github.com/1516490 when trying require 'datamapper' I have the datamapper gem installed. any ideas? thanks
<andrewvos> bundle exec
<andrewvos> maek: ^
<maek> andrewvos: I dont have a Gemfile
<andrewvos> maek: require "data_mapper"?
<maek> or bundler installed
<operant108> @robgleeson: Awesome, thanks for your help.. ! Didn't know you could use class << self; end; in a module
<maek> andrewvos: bam, ty. I was just copying a tutorial
<maek> andrewvos: can you tell me how I could have found that out my self? is there some where in my gem dir I could have looked to notice it was data_mapper vs datamapper?
<andrewvos> maek: Pleasure
<andrewvos> maek: Not really. It's generally just the file in the lib directory in the datamapper gem.
<andrewvos> maek: To find the source for a gem google "github datamapper" for example.
<andrewvos> maek: Then look what file[s] is[are] in the lib/ directory
<robgleeson> operant108: p
<robgleeson> np
<maek> assuming the gems is on github. if I have it installed dont I have the source in my gem dir. so looki in lib for the foo.rb?
<andrewvos> maek: Yup
<andrewvos> Gotta run peace
<maek> andrewvos: thanks again :) appreciate it :)
<andrewvos> pleasure dude
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
RakkoAndroid [RakkoAndroid!602a1f84@gateway/web/freenode/ip.96.42.31.132] has joined #ruby-lang
<RakkoAndroid> I guess I'm not alone in chatting here on Android
yxhuvud [yxhuvud!mongo@h-85-57.a212.priv.bahnhof.se] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
ryanf [ryanf!~revfitz@adsl-67-122-211-128.dsl.snfc21.pacbell.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5d84e9d3.pool.mediaWays.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
TheMoonMaster [TheMoonMaster!~TMM@reddit/operator/themoonmaster] has joined #ruby-lang
tylergillies [tylergillies!u3033@gateway/web/irccloud.com/x-cvbrtpvsjwgzzpzv] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-txgatcxtonqatapw] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-miitoeszixiinjav] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-qscjmykhcyqplvze] has joined #ruby-lang
beawesomeinstead [beawesomeinstead!u1643@gateway/web/irccloud.com/x-ufvviklywwbpsyfg] has joined #ruby-lang
<josh9> is there Acceptance test framework (like capybara) but for ruby project that is not web based?
agib [agib!u781@gateway/web/irccloud.com/x-jywkuolbnlafkqsw] has joined #ruby-lang
rippa [rippa!~rippa@109-161-123-117.pppoe.yaroslavl.ru] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
<josh9> maek: looking into it. thanks!
<maek> josh9: have not used this. just something I saw on /r/ruby today and started to read, poke around
shevy [shevy!~shevy@178-190-66-47.adsl.highway.telekom.at] has joined #ruby-lang
bryanl [bryanl!u1690@gateway/web/irccloud.com/x-exyultofojyckquj] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-dymbtupxdfoaqonb] has joined #ruby-lang
<maek> wow
<maek> so good
<erikh> i know right
<maek> Great For Jazz Hands = beer out of nose
spinagon [spinagon!~rippa@109-161-123-117.pppoe.yaroslavl.ru] has joined #ruby-lang
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
pvh [pvh!u717@gateway/web/irccloud.com/x-skdangmgzqykxpmv] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
whoops [whoops!u549@gateway/web/irccloud.com/x-semtohuqaipkkjng] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-lypwytymtgqokicw] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
br1an [br1an!u440@gateway/web/irccloud.com/x-yqktbxecpgrevyzo] has joined #ruby-lang
<yxhuvud> erikh: the video on that site o_I
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.220.2] has joined #ruby-lang
ammar [ammar!~ammar@li269-36.members.linode.com] has joined #ruby-lang
m0wfo [m0wfo!~chris@89.38.202.39] has joined #ruby-lang
<josh9> ruby 1.9.3 - there is a constant called Date. but i can also require 'date'. what's going on here? what is this require 'date' is doing?
<whitequark> josh9: require 'date' adds more methods to it. like Date.parse
amerine [amerine!~mturner@c-24-22-64-72.hsd1.or.comcast.net] has joined #ruby-lang
<josh9> whitequark: ok. the require method itself, is it looking in my path for a file named 'date.rb' and if it finds one it adds it to memory?
<whitequark> josh9: yes
<josh9> whitequark: nice. might be interesting to watch htop while my ruby app is loading.
<whitequark> josh9: basically it just loads the CPU to 100%
<whitequark> because Ruby does not have a very fast parser
<josh9> also, i guess require looks for a gem with the same name.
<whitequark> nor the VM
<josh9> let's see for myself
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<josh9> whitequark: maybe my htop is not pulling quick enough. i didn't notice anything.
<whitequark> josh9: try loading rails :)
<josh9> whitequark: that's why i use sinatra
<josh9> whitequark: but if require add the gem or a file to memory, i would think that memory would spike, not cpu
<whitequark> josh9: ruby's memory usage grows maybe by a hundred kb, as date.rb is not a big library
<whitequark> this may be lesser than your OS/libc allocation threshold
<whitequark> or Ruby GC allocation threshold, etc.
<whitequark> again: loading Rails eats up both memory and CPU. I've explained why
Randroid [Randroid!~gregory@static-72-91-82-26.tampfl.fios.verizon.net] has joined #ruby-lang
<josh9> got it
<josh9> so v8 eats ruby farser for breakfast..
<josh9> actually i belive that node is using compilation and not interpretation
<whitequark> josh9: correct
<whitequark> it is a dynamic translator
<whitequark> v8 is one of the fastest VMs in the world. JVM is faster (well, I'd rather not compare them, but still), I think, but that's it
<josh9> whitequark: are there companies that develop in ruby and deploy to jruby?
<josh9> jruby is compiled as well, afak
<whitequark> josh9: correct as well
<whitequark> it compiles Ruby to JVM bytecode
<whitequark> (by the way, if you want to learn more about V8, check out this: http://wingolog.org/archives/2011/08/02/a-closer-look-at-crankshaft-v8s-optimizing-compiler)
<josh9> crazy stuff!
ammar [ammar!~ammar@li269-36.members.linode.com] has joined #ruby-lang
m0wfo [m0wfo!~chris@89.38.202.39] has joined #ruby-lang
<josh9> i remember ryan dhal saying that he tried to use ruby for his non-blocking stuff, but it was just too slow and he found himself rewriting stuff in c. eventually v8 and chrome came, and he switched to js.
_malte [_malte!~malte@ip-178-200-194-63.unitymediagroup.de] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@78.8.222.104] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@dsl-static-173.212-5-200.telecom.sk] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
whitequark [whitequark!~whitequar@2a00:ab00:1::4464:5550] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host49-14-dynamic.244-95-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
benanne [benanne!~rijdier@218.188-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<JosephRuby> ok I have oniguruma libary installed, installed gem oniguruma, 1.8.7-p352 :002 > require 'oniguruma' => true.. but
<JosephRuby> 1.8.7-p352 :004 > reg = ORegexp.new( '(?<before>.*)(a)(?<after>.*)' ) gives me uninitalized constant error for ORegexp.
<JosephRuby> er sorry nameerror: uninatilized constant for ORegexp
Pip [Pip!~Pip@host-193-146-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
canton7 [canton7!~canton7@95.150.107.113] has joined #ruby-lang
<apeiros_> JosephRuby: it's Oniguruma::ORegexp
<JosephRuby> apeiros: tyvm
<apeiros_> if you want just ORegexp, you must do `include Oniguruma` first.
<JosephRuby> all w/i single quotes?
<JosephRuby> I was trying include 'onigrurma' but .. meh I r newb
<apeiros_> no, I use `` to delimit code within irc messages. so without them.
<josh9> I would like to get your feedback on the initial design of my app. the goal is to email a user when an event he cares about change it's time. i have User class, Event Class and an Email module. any insights/suggestions would be appreciated - http://pastebin.com/TY0JVMT0 one question I have is modue vs class for the Email related functions.
<JosephRuby> ty again
<apeiros_> JosephRuby: require & load are about files. include/extend are about constants
<apeiros_> so the first two take a string argument, the latter two take a module (usually referenced by a constant)
<JosephRuby> apeiros: that makes a lot more sense ty apieros.
<josh9> apeiros_: require can be for loading a gem
<apeiros_> josh9: which is loading a file too.
<josh9> true
<apeiros_> it just performs a bit of additional magic by searching more directories and changing your $LOAD_PATH
<josh9> apeiros_: what if you have a gem and a file with the same name?
<apeiros_> josh9: gem name is irrelevant to require, even for gems
<apeiros_> the thing that matters is the name of the files in the gem
<apeiros_> and for all requires, first one found wins
<apeiros_> and ruby searches first from index 0 in $LOAD_PATH to the last index in $LOAD_PATH, after that, rubygems logic kicks in
<apeiros_> by what means rubygems logic searching is sorted, I don't know.
<apeiros_> s/logic searching/searching logic/
<apeiros_> should be more careful when editing phrases mid-writing :)
<josh9> so first it looks for files in your load path, and than it has more paths according to what gems are installd?
<apeiros_> correct
<apeiros_> it'll search every gem's lib dir (technically every dir that is listed as 'require_dir' in the gemspec)
<apeiros_> it may well be that it does not actually search the filesystem but has some kind of index. as said, the inner workings of rubygems I don't know. you'd have to ask drbrain or read the source.
<apeiros_> josh9: regarding your question, line 24 of your code, you can use any? instead of each, which will short-cut.
<josh9> apeiros_: never heard about any? let me try
<apeiros_> josh9: that is: @updated = @events.any?(&:updated?)
<apeiros_> or if you have to call .get_time first: @updated = @events.any? { |e| e.get_time; e.updated? }
<apeiros_> I think I'd not implement updated? in a way that depends on another method being called first…
<josh9> apeiros_: interesting usage of any?
<apeiros_> I'd probably rather go for a pattern like: def updated?(since=nil); …
<apeiros_> and have an @last_update_at. so: if since then @last_update > since else …fetch the time of the last update and compare with @last_update… end
gnufied [gnufied!~gnufied@122.167.91.153] has joined #ruby-lang
<apeiros_> that'd also make you not have to fetch_current_time (which seems expensive, given that you have to contact a website for it) for every single item. instead you fetch it once and pass that time to updated? on all calls.
gnufied1 [gnufied1!~gnufied@122.167.91.153] has joined #ruby-lang
<apeiros_> ah man, I think I'm not quite awake yet… fetch_current_time fetches the time the event was last updated, yes?
<apeiros_> if so, my statement needs a revision of course.
<josh9> yeah
<apeiros_> can the events of different users overlap?
<apeiros_> i.e. user X has some events that user Y has too?
<josh9> rare, but possible
<apeiros_> then I'd iterate over all events and get the modify time on them. in a second loop I'd run over all users and check for updated events. that means you have to update events only once.
<josh9> apeiros_: true
<josh9> what about the usage of module for the email?
<josh9> i searched for 'module_function' in eloquent ruby book and it's not mentioned so i thought it's not common practice.
<apeiros_> seems fine.
<apeiros_> you've used it correctly
<josh9> another option is to have a module and extend the user object with it.
<apeiros_> what'd be the point over adding the method to User directly?
<josh9> i am very interested in the DCI design pattern and i think this approach of extending a module to an object, is a way to implement it.
<apeiros_> I think chances are that you'll have to relocate the method, since it probably will depend on state later on (the user, the information being sent, …)
<josh9> apeiros_: yeah, the email's content depends on the state of the user and it's events.
m0wfo [m0wfo!~chris@89.38.202.39] has joined #ruby-lang
<josh9> where would i relocate it? to be a method of the user?
<josh9> why not seperate it to be it's own entity/class/module?
<josh9> so i'll keep the User class small.
<apeiros_> josh9: that's not really a question with a definite answer
<apeiros_> the point being is that in OO, you usually don't want e.g. length(array), but array.length
<apeiros_> i.e., one thing you'd have as an argument in non-OO, will become the receiver in OO.
<apeiros_> but yes, delivering an email is a complex thing, it could be wrapped in its own class. there's a million ways to do "it".
<josh9> but it makes the User class responsible to sending emails..
<apeiros_> if you put it into User, yes. It's your decision whether you want User to be responsible or something else.
<Mon_Ouie> I never understood why Python used length(array) or type(object), btw
<apeiros_> Mon_Ouie: taked on OO
<josh9> isn't it the same problem with many rails apps? you see models that are inheriting from activerecord. it makes the model really big.
<apeiros_> *tacked
<josh9> instead you can pass your db as an argument to the constructor of the model
<josh9> let it sit there as an instance variable,
<josh9> and it will be easy to replace the db or mock it in your tests.
<apeiros_> josh9: but that's already the case in AR
<apeiros_> the connection (aka "the DB") is in the connection attribute.
<josh9> so why do we need to inherit from AR?
<apeiros_> while I do think that one should strive for small classes and methods, I also do think that some things are just complex
<apeiros_> to allow your model to stay small, actually
<apeiros_> because it frees you from implementing the logic for every column
<apeiros_> for updating your model
<apeiros_> for finding records
<josh9> your code looks small, but the class in memory is big
<apeiros_> so a lot of generic and complex stuff resides in the ancestry instead of the model
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
<apeiros_> josh9: but that wasn't what you were arguing
<apeiros_> also, you're mistaken
<josh9> since it's all references?
<apeiros_> yes. methods are not copied over from ancestry.
<apeiros_> after all, all those questions boil down to some kind of optimization
<apeiros_> you optimize for memory, or for cpu usage, or bandwith usage, or maintainability, or readability, or stability, … you name it
<josh9> good point
<apeiros_> thanks to modern computing power, we tend more heavily towards maintainability and readability (using a language like ruby), with a good amount of stability (TDD/BDD)
grumbl [grumbl!~ralf@p54995B6C.dip.t-dialin.net] has joined #ruby-lang
grumbl [grumbl!~ralf@p54995B6C.dip.t-dialin.net] has quit [#ruby-lang]
AlHafoudh [AlHafoudh!~textual@chello085216204021.chello.sk] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@chello085216204021.chello.sk] has joined #ruby-lang
tcurdt [tcurdt!~tcurdt@p5B03CB6B.dip.t-dialin.net] has joined #ruby-lang
jxie_ [jxie_!~jxie@115.197.80.154] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
<diegoviola> Merry Christmas
<injekt> lol
<rue> Happy Yule!
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
mindgame [mindgame!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
<dr0id> Happy New Year
<erikh> he probably /amsg'd it to 30+ channels
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
<erikh> I doubt it has anything to do with the content
Randroid [Randroid!~gregory@static-72-91-82-26.tampfl.fios.verizon.net] has joined #ruby-lang
<diegoviola> erikh: me? yeah, they removed my ban
<diegoviola> sorry!
<lianj> hehe
toretore [toretore!~toretore@ti0006a380-0607.bb.online.no] has joined #ruby-lang
<erikh> heh, I didn't ban you; I doubt the ban was manual either way
<erikh> those ircops have tons of tricks up their sleeves typically
<diegoviola> np :D
<diegoviola> feliz navidad!
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.177.46] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.177.46] has quit [#ruby-lang]
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
jxie [jxie!~jxie@115.197.91.174] has joined #ruby-lang
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby-lang
<erikh> diegoviola: feliz navidad!
<erikh> hey folks, anyone mind telling me if the README is clear enough here? https://github.com/erikh/octopus
<canton7> some formatting would be nice, as a first-glance impression
<canton7> as in headers, etc
towski [towski!~towski@host-70-45-23-142.onelinkpr.net] has joined #ruby-lang
<shevy> hmm I am not fully awake yet, woke up like ten minutes ago, the README seems quite clear, except for the ' own "blank slate" copy' part, I had to reread that a few times and I am still not sure what a blank state is but otherwise it seems fine erikh
<tbuehlmann> chris2, danke, ebenso!
<rue> erikh: Needs more structure
<shevy> we gotta help the elves to take back the north pole
<rue> erikh: Also, socat might be easier to mention
<rue> shevy: The evil santa lives at the North Pole
<shevy> the pedobear one?
<chris2> 320MB of resident size. MB?!?!
<shevy> or the ex-bankster
<erikh> chris2: you're right, that's K
<erikh> it's still early
<chris2> ah! :D
<erikh> rue: I don't use socat personally but I'll provide an instruction. thanks.
<chris2> so, how is this besser than runit? :P
<erikh> shevy: it means that the lua interpreter is free and clear of external pollution
<erikh> chris2: it's not!
<chris2> s/besser/better/ geez
<tbuehlmann> hehe
<chris2> tbuehlmann: you confused me!
<tbuehlmann> sorry mate
<shevy> hehehe
<erikh> I think it's a little more expressive and flexible, but largely it's a way to get better at C for me
<shevy> denglish
<chris2> ah, ok
<erikh> I'll take care of the things you guys mentioned now; thanks for all the feedback.
<erikh> I can't get socat to build on my system, so that'll have to wait.
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
Marco [Marco!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
<tbuehlmann> erikh, I assume there will be a better short description, right?
|Vargas| [|Vargas|!~luke@host49-14-dynamic.244-95-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
<erikh> define better :)
<tbuehlmann> I admit I like "a thing", but well.. :>
<erikh> oh I see, yeah; I'll change that in a few here
<erikh> I didn't want to draw attention to it until I was ready to show something that works
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.91.153] has joined #ruby-lang
<shevy> hmm
<shevy> did matz not think about rubygems? or something ... I feel as if something like rubygems could all have been used 10 years ago already
<yorickpeterse> It probably wasn't worth the effort at the time
<erikh> well if you guys are feeling bonus helpful: https://github.com/erikh/octopus # updated
<erikh> thanks for all the help you've given me already
<yorickpeterse> Why would one use Octopus opposed to say, Runit?
<erikh> there's no reason yet
<yorickpeterse> (the readme looks fine btw)
<erikh> thanks
<erikh> fwiw, one of the things I really hate about being an ops guy is having to populate stupid init files everywhere and clean them up
<erikh> so, make the init system sufficiently dynamic that it can just fetch its configuration from a central repository and...
<yorickpeterse> Using something like Runit and puppet you can get pretty far :)
<erikh> I use chef and monit
<erikh> I know the limitations
<yorickpeterse> Ah
<erikh> when you have 100+ machines to manage they are significantly annoying :)
<shevy> hehe
<erikh> also, I think there are some monitoring capabilities here that aren't easily explored in other systems but I'm not really ready to discuss any features in that regard
<yfeldblum> sorry if you've answered this, but what's the differentiator to runit (apart from lua-only vs scripts in any language)?
<erikh> man am I being trolled?
<erikh> I'm not selling it. it's first and foremost a way for me to improve my C
<yfeldblum> cool
<yfeldblum> why a process monitor? that an area of interest of yours?
<erikh> yes
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
<robgleeson> I love IPC and that kinda stuff.
<robgleeson> a lot of fun :)
<erikh> yep
<yfeldblum> shevy, the explosion of per-language package managers seems recent
<erikh> ... not really
<erikh> jar, cpan, easy_install are a couple that come to mind immediately
<erikh> not to mention dinosaur formats like .shar
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
<yfeldblum> erikh, why chef over puppet?
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
<erikh> lots of reasons.
<erikh> this is like asking me why I like vim over emacs
saLOUt [saLOUt!~rriemann@pool-146-55-199-89.dbd-ipconnect.net] has joined #ruby-lang
<erikh> and I'll answer it the same, I've used both and I prefer chef
<yfeldblum> erikh, so, just the top 50 then?
<erikh> heh
<yfeldblum> speaking of package managers, i've actually had to write a sort-of package manager for chef :P
<erikh> neat!
<yfeldblum> erikh, back to your top 50?
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
<erikh> ha
<erikh> oh neat, so it's basically a cookbook management system?
<erikh> we have some custom tooling that does some similar stuff, but this is pretty cool
<yfeldblum> like bundler, strictly knife-side or solo-side
<erikh> very cool
<yfeldblum> you still have to `knife cookbook upload` manually
<yfeldblum> but yeah, wasn't strictly a fan of "just vendor everything"
<erikh> ah ok. we have some tools that speed up the cookbook upload process (by cheating), I wonder if we could make use of this at workt hough
<erikh> we have several dev environments that need to be managed independently, the branch management gets unbearable at times.
<yfeldblum> maybe, if you use branch-per-environment it can be easy to have a different Cheffile & Cheffile.lock checked into each branch, use the knife integration, and now `knife cookbook upload` will only ever see what's in your Cheffile.lock for that branch (you would still have to use the --environment argument each time though)
<erikh> right, we do our env management independent of branches
<erikh> hrm
<erikh> is this chef 0.10 only?
<erikh> (we're still on 0.9)
<yfeldblum> i think so; it needs to parse each cookbook's metadata.rb
<yfeldblum> i'm only testing against 0.10
<erikh> ah, it doesn't let chef do that?
<erikh> ah ok
<yfeldblum> no it uses the chef API to do that
<erikh> cool, yeah it probably works with 0.9 then
<erikh> our tools work similarly (part of the cheating is generating those files)
<yfeldblum> not sure, the API internals may or may not have changed; i haven't tested against 0.9 at all
<erikh> yeah, I guess what I'm saying is that our tools work with 0.10 and probably step into the exact same APIs
<erikh> of course nothing is certain until it's tested though.
<yfeldblum> it'll look for a metadata.json first, then a metadata.rb if there is no metadata.json
<erikh> right
<erikh> chef will generate that for you if you touch the right naughty bits
<erikh> let me see if I can find it
<yfeldblum> erikh, chef-0.10 does not need metadata.json files on disk, that's only 0.9
<erikh> ah, ok
<erikh> that's probably a significant difference then
<yfeldblum> erikh, nah, knife just generates a JSON in-memory when it uploads
<erikh> anyhow, I gotta go to the hospital (wife took a spill a few days ago, totally fubared her ankle) soon, so I need to cut this short
<yfeldblum> latez, hope she feels better
<erikh> later.
<yorickpeterse> Good luck
Jake232 [Jake232!~textual@5e025306.bb.sky.com] has joined #ruby-lang
<yorickpeterse> ha
<yorickpeterse> Oh bummer, wrong channel
TvL2386 [TvL2386!~tom@ip5452a95e.adsl-surfen.hetnet.nl] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.177.46] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.177.46] has quit [#ruby-lang]
<shevy> lol
densebits [densebits!~densebits@fedora/densebits] has joined #ruby-lang
jaska [jaska!jaska@f948.ip11.netikka.fi] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<yorickpeterse> I wish it would be possible for weechat to slightly dim non active windows, would certainly make it a bit easier to use
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
fayimora [fayimora!~fayimora@109.175.187.145] has joined #ruby-lang
<shevy> long live xchat!
<shevy> though it kinda died :(
<robgleeson> xchat is so 2001 ;)
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<densebits> What is the newest hipster irc client?
<shevy> robgleeson yeah... it feels quite like mIRC which I used a lot back then :)
<robgleeson> densebits: limechat
<densebits> For mac? o_O
<apeiros_> of course. you don't have a mac? then you're sooo 2001…
<apeiros_> ;-)
<yorickpeterse> Macs are 2010, Linux Mint is where it's at
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
<densebits> I prefer my Fedora/Red Hat.
<yorickpeterse> And CentOS is pretty sweet too
<densebits> You can keep it. :P
<yorickpeterse> haha
<Asher> macs are for computers you use
<Asher> linux is for computers you want to set up and use from other computers
<Asher> and windows isn't a computer :)
<yorickpeterse> Windows is a nuisance :)
<Asher> you can remove "computer" from any piece of supported hardware by installing windows
<apeiros_> macs are computers you want to work with, linux are computers which you want to work at, windows are computers you want to work against…
<densebits> I use Fedora for development and RHEL for production. :P
<yorickpeterse> Mixture of Mac OS, Ubuntu and Arch linux here
<shevy> Linux Mint is quite nice
<shevy> I am always surprised how somewhat small communities (like in linux mint) manage to perform better than i.e. Ubuntu as far as the user experience is concerned
<yorickpeterse> the more people you work with the more problems to deal with
<shevy> hehe
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<shevy> yeah but it's as if quality is diluted, I tried to install the latest ubuntu, it had a fancy installer... and it crashed twice at the same point. I reverted to knoppix which worked on that machine... but I wonder how hard it can be to install something in the year 2011 still
<densebits> Well I would say much of the "smaller" communities are perhaps more skilled or have more contributors per ratio than some of the larger projects which probably have a larger beginner/non contributor base.
DotMH [DotMH!~martin@nerdstar-adsl.demon.co.uk] has joined #ruby-lang
DotMH [DotMH!~martin@nerdstar-adsl.demon.co.uk] has quit [#ruby-lang]
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
Nisstyre [Nisstyre!~yours@infocalypse-net.info] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
kitallisii [kitallisii!~kitallis@122.172.248.47] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@dyn-160-39-33-144.dyn.columbia.edu] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
corsican [corsican!corsican@c-76-21-23-29.hsd1.ca.comcast.net] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
me345 [me345!~me345@adsl-71-131-129-120.dsl.sntc01.pacbell.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
thrcka [thrcka!~thrcka@dial-95-105-177-62-orange.orange.sk] has joined #ruby-lang
jw [jw!~j@cpc11-orpi3-2-0-cust53.2-3.cable.virginmedia.com] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
tenderlo_ [tenderlo_!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
thone_ [thone_!~thone@e177083047.adsl.alicedsl.de] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
TheMoonMaster [TheMoonMaster!~TMM@reddit/operator/themoonmaster] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<JosephRuby> Is there an easy way to populate a hash w/ 2 arrays (for example Matchdata.names & Matchdata.captures)?
<JosephRuby> using 1 array as keys and 2nd as values of course...
<rippa> JosephRuby: Hash[a1.zip(a2)]
probst [probst!~probst@131.80-202-169.nextgentel.com] has joined #ruby-lang
antonsk [antonsk!~Adium@94.179.206.244.pool.3g.utel.ua] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
UNIXgod [UNIXgod!~stu@funtoo/user/UNIXgod] has joined #ruby-lang
NinoScript_ [NinoScript_!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
antonsk [antonsk!~Adium@94.179.206.244.pool.3g.utel.ua] has joined #ruby-lang
probst [probst!~probst@131.80-202-169.nextgentel.com] has quit [#ruby-lang]
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl15-137-8.dsl.telepac.pt] has joined #ruby-lang
<JosephRuby> rippa: thanks
rippa [rippa!~rippa@109-161-123-117.pppoe.yaroslavl.ru] has joined #ruby-lang
jondot2 [jondot2!~jondot@77.126.251.1] has joined #ruby-lang
<jondot2> hi all, i would like to do fast and efficient scientific operations with ruby. i don't mind using native libraries with bindings (e.g. http://rb-gsl.rubyforge.org) is there any _current_ option to take that's recommended? (this will live at server side)
setmeaway [setmeaway!~setmeaway@119.201.52.190] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-191-210.lsanca.fios.verizon.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-191-210.lsanca.fios.verizon.net] has joined #ruby-lang
voker57 [voker57!~voker57@128.70.38.70] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
basicxman [basicxman!~basicxman@unaffiliated/secrece] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.220.2] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.221] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl15-137-8.dsl.telepac.pt] has joined #ruby-lang
beiter [beiter!~beiter@p4FE13564.dip.t-dialin.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
antonsk [antonsk!~Adium@94.179.206.244.pool.3g.utel.ua] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.40] has joined #ruby-lang
probst [probst!~probst@131.80-202-169.nextgentel.com] has joined #ruby-lang
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby-lang
<josh9> what do u name the folder with your domain objects? lib?
Manhose [Manhose!~Manhose@bl15-137-8.dsl.telepac.pt] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@bl15-137-8.dsl.telepac.pt] has joined #ruby-lang
<shevy> what is a domain object?
<burgestrand> josh9: yeah
<josh9> shevy: any object that is doing something, i guess
<shevy> hmm
<josh9> i have event object for example
<josh9> a user object
<shevy> so there are domain objects and lazy objects :D
<shevy> though I think the naming scheme is really much simpler... lib/ <--- most .rb files will reside there
<shevy> a few may reside in a bin/ directory
<burgestrand> josh9: depends though, I only put it in lib if it fits nowhere else
s0ber [s0ber!~s0ber@114-36-234-205.dynamic.hinet.net] has joined #ruby-lang
<josh9> burgestrand: where else would u locate them
y3llow [y3llow!~y3llow@114-36-234-205.dynamic.hinet.net] has joined #ruby-lang
<burgestrand> josh9: for rails apps I would place a model in the app/models directory foexample
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
<josh9> burgestrand: i use sinatra, btw
y3llow [y3llow!~y3llow@114-36-234-205.dynamic.hinet.net] has joined #ruby-lang
<burgestrand> josh9: what I’m saying is that I try to avoid to have one big melting pot for everything
<shevy> hehe
<josh9> burgestrand: so u put them in app/models and if it doesn't fit you put them in lib?
y3llow [y3llow!~y3llow@114-36-234-205.dynamic.hinet.net] has joined #ruby-lang
<josh9> burgestrand: do u also have classes in app/models that are not related to a db?
<burgestrand> josh9: yeah, but for sinatra I’d just put it in models/, views/, helpers/ lib/, vendor/
<burgestrand> josh9: yeah
<burgestrand> (most sinatra apps I make don’t grow enough to need directories for stuff though)
<josh9> burgestrand: but i use sinatra even for bigger projects, so i am trying to find a nice way to organize my code.
<josh9> when u use the model name for your folder, don't u assume it's an MVC pattern?
<burgestrand> josh9: for example modules for inclusion in other things I’d probably place in lib/
<josh9> burgestrand: interesting.
<burgestrand> josh9: either way it’s not proper MVC, but I only use the model name if I consider it to be a model
<josh9> ok. so my business objects are models
<burgestrand> josh9: a representation of business logic with attached behavior
<josh9> even if they never touch any db.
<burgestrand> yeah, that’s what I’d consider them to be at least
<josh9> cool. i'll stick to your definition for now.
sczizzo [sczizzo!~sczizzo@99-94-128-224.lightspeed.mmphtn.sbcglobal.net] has joined #ruby-lang
bradland [bradland!~bradland@c-69-247-235-233.hsd1.fl.comcast.net] has joined #ruby-lang
<josh9> why do i still see require File.expand_path('../helper', __FILE__) instead of require_relative ?
<samuelkadolph> require_relative is slower
<josh9> samuelkadolph: really? damn i always used it!
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
UNIXgod [UNIXgod!~stu@c-67-162-32-190.hsd1.il.comcast.net] has joined #ruby-lang
UNIXgod [UNIXgod!~stu@funtoo/user/UNIXgod] has joined #ruby-lang
Jake232 [Jake232!~textual@5e025306.bb.sky.com] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
<bradland> samuelkadolph: do you know if require_relative is still significantly slower in 1.9.3?
<bradland> i'm not even sure how to benchmark it without creating a directory full of thousands of files
<samuelkadolph> That's what I did lol
<josh9> samuelkadolph: what was the difference?
<samuelkadolph> I was planning on making a nice graph for it but I don't think I ever finished it
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<samuelkadolph> Hmm, actually the performance is fine
<samuelkadolph> require still has N^2 growth though.
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
<samuelkadolph> Right, that's why I don't like require_relative. It doesn't work in a gemfile
<shevy> hmm
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<Asher> why not?
<samuelkadolph> Err, I meant gemspec not gemfile
<Asher> why does a gemspec need it?
<samuelkadolph> requiring a file?
<Asher> how often are you requiring files in gemspecs?
<samuelkadolph> lib/foo/version.rb and .gemspec
<Asher> ah
<Asher> why wouldn't require_relative work there?
<samuelkadolph> I can't remember if I ever found out why but it just doesn't
<samuelkadolph> It can't find it and then bundler shows you a warning since it saw the error
<Asher> huh ok
<Asher> could be a bundler issue?
<samuelkadolph> Probably
<bradland> maybe not finding cwd correctly. i've run in to that in a number of projects.
<bradland> it gets updated somewhere in the code path, but then forgotten.
<bradland> ~/Code/bench$ time ./setup.rb ; real0m36.094s
<bradland> that's creating 100,000 ruby scripts with a simple `puts` statement inside
<bradland> not bad
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
<bradland> uh oh: -bash: /bin/rm: Argument list too long
apeiros [apeiros!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
<samuelkadolph> lol
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<shevy> my good old friend, rm
<zenspider> xargs is your friend
<bradland> pretty tight race
<bradland> zenspider: yeah, i ended up just rm -rf'ing the dir, but xargs would have done the trick
<bradland> that's under 1.9.3
<shevy> hmm that's not a big speed difference
<josh9> bradland: can you share the bench_relative.rb as well?
<josh9> and thanks for doing that!
<bradland> josh9: you bet, i'll throw all the files up in a repo
<bradland> except for the 10,000 ruby scripts :)
<bradland> there's a setup script that will create them though
<apeiros> if you require_relative, you're doing it wrong™
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<apeiros> (no matter whether you use require or require_relative to achieve it)
<zenspider> yup yup
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
<zenspider> bradland: can you also benchmark a regular require?
<bradland> zenspider: good idea
<zenspider> ie, proper use of pathing
vanhalt [vanhalt!~vanhalt@190.175.10.122] has joined #ruby-lang
<vanhalt> Hey ther folks... anybody notice why this returns "1"?...a = ("1" if false || "2" if true)
<apeiros> vanhalt: because of the order of execution
<apeiros> have fun figuring how it is actually interpreted
<apeiros> (hint, obviously not in the order/grouping you expect it to)
<matled> apeiros: what's wrong with require_relative?
<josh9> apeiros: what's the bottom line? stop using require_relative/
<josh9> ?
<vanhalt> apeiros: nice... that hint is better than nothing. thx
<apeiros> josh9: the bottom line is, use setup.rb or rubygems and don't bother with require_relative and consorts.
<josh9> apeiros: what do u mean by setup.rb? a file with many require 'bla.rb' ?
<vanhalt> apeiros: just swaped the booleans and now returns nil... yeah, I'll have fun x
<apeiros> josh9: setup.rb is used to install libraries/executables (mostly supplanted by rubygems nowadays)
<josh9> apeiros: sorry but i am confused. let's say i want to require foo.rb from users.rb. what exactly should i do?
<apeiros> josh9: you require 'foo'
<apeiros> and you put foo into your lib directory
<josh9> apeiros: so require '../..lib/foo.rb' (for example)
<apeiros> and you either install your library (as said, using either rubygems or setup.rb), which will make it available
<apeiros> josh9: no, require 'foo'
<apeiros> just like that
<josh9> ok. so first i need to add lib to the LOAD_PATH
<bradland> josh9: you use the include path
<bradland> ya that
<vanhalt> apeiros: ¡you rule man!
<vanhalt> apeiros: a = ("1" if false) || ("2" if true)
<josh9> modeldir = File.dirname(File.dirname(__FILE__)) + '/models'
<apeiros> josh9: no
<vanhalt> apeiros: thank you so much
<apeiros> josh9: and the "or" from the either above: when you're developing, you add the lib-dir to load-path using -I (that's a capital i, not a lowercase L)
<apeiros> vanhalt: I knew you'd figure it out, so not much to thank me ;-)
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
<apeiros> josh9: e.g. ruby -Ilib ./bin/yourscript.rb
<vanhalt> apeiros: woudn't figured it without the hint... =)
<bradland> need a suggestion for what to put in these scripts that i'm going to require
<bradland> should be light, but i don't want it throwing warnings
<josh9> apeiros: sorry but i have no idea what are you talking about. let's say i have modles folder. and inside i have user.rb. i also have test/models folder and inside i have test_user.rb. i run my test like this: ruby test/models/test_user.rb. do u want me to add -Imodels after the ruby ?
<apeiros> I really need to gist that, I gotta explain that far too often from scratch…
<apeiros> josh9: models? is that a rails project?
<josh9> apeiros: no.
<josh9> it's where i hold my bussiness objects
<apeiros> then you shouldn't have a models folder. bin, ext and lib
<josh9> plain old ruby objects.
<curtism> hello, i'm looking for a function that would do this: 5.mystery_function { 2 } #=> [2, 2, 2, 2, 2]
<josh9> ok. i'll rename it to lib. i thought models would be fine as well.
<josh9> i didn't want to use models since it's not MVC.
<bradland> josh9: the idea is to keep your LOAD_PATH as simple as possible
<apeiros> curtism: Array.new(5,2)
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<curtism> apeiros: can new take a block? it needs to be a block because it needs to be evaluated for each item
<josh9> bradland: sure. but i didn't understand what is the replacement to require_relative. is it something with -I?
<apeiros> curtism: notice that if you have something more complex (i.e. not 2), you may want the blockform instead, since it'll always be the *same* object (not an equivalent but new one)
<apeiros> curtism: heh, ^
kain [kain!~kain@151.64.211.61] has joined #ruby-lang
<josh9> bradland: and what's wrong with adding /lib to LOAD_PATH?
<curtism> apeiros: thanks
corundum [corundum!~rbot@drbrain-2-pt.tunnel.tserv8.dal1.ipv6.he.net] has joined #ruby-lang
<bradland> josh9: you can add it to the LOAD_PATH at run time, but passing it to the interpreter at execution is preferred
Tick-Tock [Tick-Tock!~Tick-Tock@2607:f358:1:fed5:22:0:b683:4295] has joined #ruby-lang
<bradland> apeiros can correct me if i'm wrong. i'm no expert at this stuff
<matled> apeiros: so what is wrong with using require_relative? it just seems the same to me if the code is installed as a gem.
<apeiros> it's correct
<apeiros> matled: you're assuming that you know where the code will be. and you're wrong. simple as that.
<apeiros> it'll work if you're your only user.
<josh9> apeiros: i think i start to understand. if my lib dir is changing, i can simply pass -I <new location> when i run my tests.
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
<apeiros> josh9: that's the basic idea, yes. but once you installed your lib, you shouldn't need to use -I anyway, since installing means it's put somewhere where it can be found.
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
<josh9> apeiros: do i need to 'install' my lib folder? it's my objects. not gems.
spectra [spectra!~spectra@debian/developer/spectra] has joined #ruby-lang
corn_man [corn_man!kvirc@unaffiliated/cornman] has joined #ruby-lang
<apeiros> josh9: no, you don't need to. it's your decision. but usually it's what you want to do. if you don't share your code, then of course, feel free to do however you please. my suggestion would be to still only modify $LOAD_PATH in the executable (and not in any of the lib files) and rely on plain require for the rest.
<matled> apeiros: I'd use require_relative in files residing in the lib/ directory. so the assumption is that the lib/ directory still contains all the original files. in which case does that not hold?
<josh9> apeiros: ok. i guess in my rakefile i can add -I. the only thig is to rememer to add -I when i run a single test file.
<apeiros> matled: when somebody patches one of the files e.g. and puts it on a higher spot in the load path. granted, that's a rare case.
SpitfireWP [SpitfireWP!~spitfire@wikipedia/spitfire] has joined #ruby-lang
<apeiros> matled: also when you refactor.
<josh9> apeiros: when u say install, what do u mean? turn into a gem?
urbanmonk [urbanmonk!~rom@bas1-toronto08-1279487823.dsl.bell.ca] has joined #ruby-lang
<apeiros> josh9: as said, the two classic ways are making it a gem and install that gem, or using setup.rb
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<josh9> apeiros: ok. i never heard about the setup.rb. googling now. thanks a lot
<apeiros> josh9: it's not used much anymore since most people simply use rubygems, especially now since it's part of ruby itself.
<josh9> apeiros: got it.
<matled> apeiros: ok, that are valid points. thanks
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<josh9> matled: no more require_relative, ah?
<josh9> matled: i'll give -I a try and start using require instead.
<josh9> i don't think many ruby devs knows about this technique.
<matled> josh9: I use this mostly in small scripts used only by me and got not around to create a gem from them. I'm not too sure what I'm going to use if I get to this next time. but it's good to know the arguments
Ttech [Ttech!ttech@botters/staff/ttech] has joined #ruby-lang
chris2 [chris2!~chris@vuxu.org] has joined #ruby-lang
<matled> I already had it in the back of my mind that someone said "don't use require_relative" but I could not find any arguments
<josh9> matled: it might be a good practice regardless if you'r going to create a gem or not. we'll see
<josh9> matled: i am not sure i got the refactoring argument. let's say someone move user.rb from /lib to /models. ruby -I /lib test_user.rb will break as well and i'll have to add /models to -I.
<apeiros> josh9: e.g. if you decide your library has grown to really a couple of libraries and different parts should be different gems actually.
<workmad3> josh9: I'd suggest it is probably a smell that you need to include the -I /lib or -I /models in the ruby command to run the test
<apeiros> josh9: that's how the refactoring argument was meant
<josh9> workmad3: can u elaborate?
<apeiros> the underlying argument however is always: knowing where something is is a connascence, and it's not your libs duty to have it.
<josh9> yeah
<workmad3> josh9: the test itself should (IMO) include the information as to where to require the thing it is testing from. Without that, you are moving information that is vital to the successful execution of the test to somewhere outside of the test
<bradland> Wow. So, two things: 1) 1.9.3 is MILES better when it comes to requiring anything, and 2) using the LOAD_PATH properly remains the fastest way to require stuff
<bradland> Github link forthcoming
<apeiros> bradland: that actually surprises me (plain require being faster than require_relative…)
<bradland> apeiros: i'm willing to bet these results don't hold as the project becomes more complex (much more in the LOAD_PATH)
<workmad3> apeiros: sounds like a potentially odd implementation... unless require_relative is doing something like adding dirname(__FILE__) to the load path, requiring the file and then removing it from the load path again
<apeiros> bradland: um, $LOAD_PATH should stay small actually (sadly, rubygems isn't designed that way… and I'm not sure I'd know of a better way)
<zenspider> vanhalt: ruby_parser will tell you exactly how it was parsed
<bradland> apeiros: "should" and "does" are usually different realities ;)
<dreinull> is there an Array matheod that combines any? and include?: %w{a b c d}.anyclude? ["a","x"]
<apeiros> bradland: well, "should" implying "if you do it correctly"
<apeiros> bradland: and granted, that directly leads us to "but does not" being usually the reality…
<workmad3> dreinull: what semantics do you want that to have?
<apeiros> dreinull: you mean ary_a.includes_any_of?(ary_b) (not an existing method, I mean the idea)
<dreinull> workmad3: yes
<apeiros> !(ary_a & ary_b).empty?
<zenspider> apeiros: why would you say that LOAD_PATH should stay small?
<dreinull> apeiros: too expensive for larger arrays
<zenspider> and also say that if you're using require_relative you're doing it wrong
<dreinull> workmad3: yes
<zenspider> dreinull: it isn't too expensive until you actually measure
<apeiros> zenspider: with setup.rb, load path never grew beyond those ~8 paths
<workmad3> dreinull: why are you just saying 'yes' to me? that doesn't answer the question I asked :P
<dreinull> zenspider: if the first value is true then I don't need to compare any further
<apeiros> zenspider: and you could handle isolation easily with it too
<dreinull> workmad3: yes, that mehtod would do :)
<workmad3> dreinull: I didn't suggest any method! :P
<dreinull> otherwise I'd just use any with an include? in the block
<bradland> With the disclaimer that I'm actually a manager, not a programmer :) I just like to dabble.
<zenspider> isolation is obviously my favorite, but I think LOAD_PATH should be as big as you need it.
<apeiros> zenspider: what you can't do however is keep a multitude of versions accessible from all scripts at the same time. but I think that's a flawed requirement that should be substituted with isolation.
<dreinull> workmad3: sorry, that was apeiros idea...
<zenspider> btw, rubygems doesn't inflate the LOAD_PATH beyond what's needed... other than 1.9.0's bullshit ... and to be fair, that wasn't rubygems, that was ruby
<workmad3> dreinull: however, I was going to suggest ary_a.any? {|i| ary_b.include?(i) }
<apeiros> zenspider: though using a different convention, one could actually keep load path small
<apeiros> and have as many versions of anything as you want
<zenspider> without flattening?
<dreinull> workmad3: yes, that's what I'd do too.
<apeiros> zenspider: doesn't rubygems add each gem you load to the load path?
<dreinull> workmad3: there are so many redundant methods in Ruby, could have missed the one I was looking for
<zenspider> dreinull: I totally agree. I also assert that it doesn't matter 99% of the time
<zenspider> fast enough == good enough
ryanf [ryanf!~revfitz@adsl-66-127-53-157.dsl.snfc21.pacbell.net] has joined #ruby-lang
<zenspider> apeiros: each you load, yes. based on actual usage
<dreinull> zenspider: you are totally right. I won't tell you the size of my array. You'd laugh at me.
<workmad3> dreinull: 6? :)
<zenspider> omg. my coffee is better than your coffee. so. fucking. perfect.
<apeiros> zenspider: so the more gems you have the bigger the load path. didn't happen with setup.rb
<apeiros> zenspider: also, how does rubygems find foo/bar from a gem when I require it? (I've never checked the implementation, but I assumed it'd search every gem, effectively doing what a load path with all gems in it would be…)
<dreinull> workmad3: stop poking at me :)
<dreinull> I was asking for educative purposes.
<zenspider> it does search every gem and then adds that gem's LOAD_PATHs to the LOAD_PATH
<workmad3> dreinull: :)
<dreinull> hope that excuses me.
<apeiros> dreinull: Array#& is O(n), your array.any? + include? is O(n^2)
<apeiros> dreinull: unless you have a very high chance of early hits, it'll be slower.
<zenspider> apeiros: that is, it tries a regular require first, rescues LoadError and THEN does a search
<apeiros> zenspider: so if I've 200 gems, it'll potentially search 200 paths…
<zenspider> yup
<Asher> necessarily not potentially
<Asher> well up to
<Asher> that's why potentially i guess
<bradland> zenspider & apeiros any chance you could look at those benchmarks i built? we're about to heat out for xmas eve :)
<apeiros> I'm sorry, but I'm not excited by that design. but again, not sure I could do better.
<zenspider> he's just implying worst case
<Asher> right
<Asher> sorry
<bradland> curious if i totally screwed them up haha
<zenspider> bradland: yeah... sec
<dreinull> apeiros: I was thinking of O(n^2) for & as well...
<apeiros> bradland: aah, missed the link, can you paste again /me lazy…
<apeiros> thx!
<zenspider> bradland: other than passing a width to bm so stuff lines up nicely, it looks sane
<zenspider> interesting difference between 1.9.2 and 1.9.3
<apeiros> zenspider: I just did have an idea that might work, but I have to think it through. I might have screwed up in my thoughts… if not, I'll tell drbrain & you. maybe rubygems can be retooled…
<zenspider> I wonder what 1.8 looks like
<bradland> I had to create separate bench_*.rb files for each benchmark because 'require' only works once
<bradland> wasn't crazy about tying it all together with a shell script
<apeiros> if that idea holds water, rubygems could be speed up quite a lot…
<bradland> i'll look at the width for bm too
<zenspider> apeiros: we just got a patch to make sure we only search through inactive gems, which should help... but yeah. totally open to making it work better... esp for 2.0
<bradland> i'll run it against 1.8 real quick
<zenspider> bradland: bm(20) should do ya
<zenspider> make that 32
<apeiros> zenspider: is sacrificing gemspec.require_dirs an option? (I'd say 99.9% use 'lib' anyway…)
uniqanomaly [uniqanomaly!~ua@78.8.222.104] has joined #ruby-lang
<zenspider> apeiros: I don't have any numbers on that
<bradland> oh now *this* is interesting
<bradland> have a look at 1.8.7
<zenspider> holy shit
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<zenspider> THAT is why I stick to 1.8!
<zenspider> or... something
<yorickpeterse> require_relative is 1.9 only :)
<yorickpeterse> Also, fix that alignment
<zenspider> yorickpeterse: I can't stand require_relative, so that's a bonus
<yorickpeterse> Never use it, but how so?
<zenspider> xmas party. gotta run
<yorickpeterse> have fun
<bradland> zenspider: anomaly
<bradland> enjoy
<bradland> 1.8 is better than those results though :)
<bradland> same for me, i'll update these benches later!
<yorickpeterse> Not if I can make it first!
jmontross [jmontross!~Adium@75-35-173-1.lightspeed.dllstx.sbcglobal.net] has joined #ruby-lang
InfiniteJest [InfiniteJest!~InfiniteJ@dynamic-adsl-78-12-96-142.clienti.tiscali.it] has joined #ruby-lang
<shevy> hmm
<shevy> they should shelf 1.9 and move to 2.0 directly
<yorickpeterse> Because that's good for backwards compatibility right?
<samuelkadolph> But then there will be a new feature you won't want to upgrade for!
<yorickpeterse> and that
<shevy> yorickpeterse, 1.8 is already dead and 1.9 never was backwards compatible either
<yorickpeterse> True, but directly moving to 2.0 now would be just as bad
<apeiros> zenspider: mind a pm?
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
mindgame [mindgame!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
infid [infid!~infid@rrcs-24-43-240-138.west.biz.rr.com] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@78.8.222.104] has joined #ruby-lang
Swimming_Bird [Swimming_Bird!~textual@cpe-68-173-86-46.nyc.res.rr.com] has joined #ruby-lang
josh9 [josh9!~oren@cpe-76-172-9-207.socal.res.rr.com] has joined #ruby-lang
<josh9> i just noticed that #ruby has 521 users and here there are only 326
<yorickpeterse> This is the gentlemen's club
<josh9> yorickpeterse: it's such waste
<josh9> of brain
<yorickpeterse> Only true Ruby connoisseurs are allowed
<yorickpeterse> I believe #ruby is the unofficial channel or something, not sure
<apeiros> just go to ruby-lang.org, then you know ;-)
<apeiros> (yes, #ruby is inofficial)
<samuelkadolph> inofficial? That's good Engrish
<apeiros> o0
<Jake232> All the cool guys hang out here ;)
<Jake232> apeiros: Still using that ProxyManager class you helped me right a couple of months ago, when I started learning Ruby
<josh9> not while you are still here (:
<Jake232> Works perfect ;)
<apeiros> samuelkadolph: afaik and as far as my quick research indicates, inofficial is a correct english word…
<samuelkadolph> Maybe back in 1913
<samuelkadolph> lol
<JosephRuby> apeiros: ty again for the oniguruma suggestion, works like a charm.
janissary [janissary!~user@adsl-98-70-95-30.mco.bellsouth.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<JosephRuby> anyone recommend a good text editor for someone that only codes in ruby and wants to swap from scite to something that favors space indentation?
<josh9> JosephRuby: vim
<JosephRuby> josh9: it easy to set up? for a linux noob?
<josh9> JosephRuby: yeah. u already have it in your linux box.
<josh9> and i am here to help. u can also ask in #vim
<JosephRuby> Don't have time to get into it now, but added it to my things to check out list :D
<josh9> JosephRuby: just type vim <file> and you'r %80 done
<yorickpeterse> Setting up Vim isn't too hard. Getting used to working with it is a pain
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<JosephRuby> ugh and its not on this box for some reason, using ubuntu..
<JosephRuby> which ver to apt-get normal vim er vim-gnome?
<josh9> JosephRuby: get the gnome
<JosephRuby> er tiny, gtk... etc
<JosephRuby> kk thnx
<josh9> i use gtk
<josh9> since i don't use gnome as my desktop environment.
<yorickpeterse> It's called gvim
<josh9> yorickpeterse: no
<josh9> gvim != vim-gtk
<yorickpeterse> That's the Gtk version of Vim
<yorickpeterse> Oh wait, missed the bit about vim-gtk specific
<yorickpeterse> nevermind me
* josh9 slap yorickpeterse with a fish
naz [naz!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
<imperator> it is not dead, sheesh
<josh9> the default output for minitest shows underscores instead of spaces (i use minitest/spec) - test_0003_is_assign_name_url_and_base_price_in_instance_variables(Product::product creation) [test/models/test_product.rb:24]: is it possible to output it with spaces to make it easier to read?
sgaedu [sgaedu!~ar@masq61.gtn.ru] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<shevy> josh9 keep in mind that some people who are here are not in #ruby
<shevy> basically this here is level 2 and #ruby is level 1
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<apeiros> this is my idea on how to improve load time with rubygems: http://pastie.org/3068916
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<apeiros> zenspider: ^
<heftig> or just use per-app bundles
<x0F> ^
<apeiros> heftig: that's what bundler et al do, not what rubygems does.
<apeiros> heftig: but yes, IMO nothing would speak against being able to just do `gem bundle`, and using the gemspec to include all files…
drbrain [drbrain!~drbrain@drbrain-1-pt.tunnel.tserv14.sea1.ipv6.he.net] has joined #ruby-lang
<apeiros> drbrain: this is my idea on how to improve load time with rubygems: http://pastie.org/3068916
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
<josh9> how to tell bundler to get rid of gems that are installed but not in the Gemfile?
<samuelkadolph> I don't think it can do that
<josh9> oh. ok