Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
lordofthedance [lordofthedance!~daddycool@wnpgmb0911w-ad03-151-226.dynamic.mtsallstream.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
vesan__ [vesan__!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
foca_ [foca_!~foca@li25-211.members.linode.com] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
lele|w [lele|w!~Lele@2a01:2d8:0:cafe:218:f3ff:fece:a48] has joined #ruby-lang
Stereokitsune [Stereokitsune!~mayoi@nessa.yuuzukiyo.net] has joined #ruby-lang
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
DefV [DefV!~Jan@node-hahmcop4no4a1ruk1w.ipv6.as30961.net] has joined #ruby-lang
Stereoki1sune [Stereoki1sune!~mayoi@nessa.yuuzukiyo.net] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
DefV [DefV!~Jan@node-hahmcop4no4a1ruk1w.ipv6.as30961.net] has joined #ruby-lang
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:1:225:bcff:fedc:e1fe] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
looopy_ [looopy_!~looopy@pool-141-156-50-197.washdc.btas.verizon.net] has joined #ruby-lang
looopy__ [looopy__!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
jjmgbt [jjmgbt!~chatzilla@c-71-61-59-172.hsd1.pa.comcast.net] has joined #ruby-lang
DRCALKIN [DRCALKIN!~DROOL_AND@cpe-66-69-208-144.austin.res.rr.com] has joined #ruby-lang
<jjmgbt> If someone can help, please do :) I'm trying to have a variable be executed as a block to be passed to a method, from which it will call a local variable. No idea what syntax to use. http://pastie.org/3240547
<jjmgbt> (that code doesn't work -- was just trying stuff and figured that was the best example to share)
<rue> #method is an existing method name, you probably want something else
<rue> Other than that, it won't work because a block closes over its own scope, not the method in which it's run
<jjmgbt> ah
<jjmgbt> Ok, thank you
<rue> And, furthermore, the interpolation isn't even in the method
<rue> The short answer would be that you shouldn't be doing this, ever. Local vars are that. Pass them into the block if needed
<rue> The longer answer is that there *is* a way, but see above.
<jjmgbt> Fair enough. Just learning and playing.
<jjmgbt> Although, curiosity makes me want to know *how* it could be done
alindeman_ [alindeman_!~adml@freenode/senior-staff-emeritus/alindeman] has joined #ruby-lang
drdr [drdr!d059b08f@gateway/web/freenode/ip.208.89.176.143] has joined #ruby-lang
codelol [codelol!u3386@gateway/web/irccloud.com/x-bcaxainkadjgtwuy] has joined #ruby-lang
<vereteran> are there any gems able to parse video headers to give me duration and resolution?
<flowerpot> you want ffmpeg
<flowerpot> It's unrelated to ruby though
<flowerpot> get ffmpeg and use ffprobe to get that information.
<vereteran> flowerpot, i don't want ffmpeg. i'm getting only 200 kb via http and i want to identify content and data above
<drdr> verrteran you could write your own
<drdr> its not like video specs are drenched in mystery and locked away in castles
<flowerpot> I see
<vereteran> drdr, i need at least 3 formats: flv, f4v, x264. thats a lot of time
<flowerpot> vereteran, are you sure you can't just grab the first 200 kb and sick ffprobe on it?
* drbrain votes for not reinventing the wheel and using ffmpeg
<flowerpot> dunno if it works with truncated files, b ut you might as well try first
<vereteran> flowerpot, ffmpeg is a really big dependency and i'm not sure i'll be able to install it on my budget vds
<vereteran> flowerpot, it'll work with truncated file
<flowerpot> I see, you want to avoid the extra baggage
<Spooner> https://github.com/kingpong/ruby-ffprobe not do what you need?
<vereteran> flowerpot, yup
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<vereteran> Spooner, seems to be exactly what i need. thank you
WillMarshall [WillMarshall!~willmarsh@121-73-153-79.cable.telstraclear.net] has joined #ruby-lang
<vereteran> vereteran, wait. it is still using ffprobe :(
<vereteran> @ Spooner
<Spooner> It is, yes. I just thought it might be a more useful API than accessing the command line yourself.
<vereteran> Spooner, that thing is too old (current ffmpeg is 0.9, while from what i see ruby-ffprobe is working with 0.7 or less)
<Spooner> Fair enough; I just googled.
zenspider [zenspider!~user@envy.zenspider.com] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<Spooner> I use Ruby-ogg for sound info. Might be a useful reference if you really need to roll your own header-reader for video.
<flowerpot> btw is ffmpeg really that bloated? takes up 1,806 KB on my system
<flowerpot> i know size is relative, but that seems pretty thin to me
<vereteran> flowerpot, ffmpeg itself is just a wrapper around whole bunch of libraries. see compilation flags that it shows
<flowerpot> Oh
<flowerpot> I didn't realize that.
<vereteran> on my box: --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disabl
<vereteran> e-static
<vereteran> and all of those have their own deps
<rue> There's a *reason* it does that
<vereteran> rue, of course there is
<vereteran> i don't say thats bad
<erikh> I think what rue is trying to express is that it only loads the code it needs
<erikh> but maybe I'm speculating
tomzx [tomzx!~tomzx@dsl-136-35.aei.ca] has joined #ruby-lang
<zenspider> hoe 2.13.0 released
<zenspider> erikh: thanks for the heads up
<rue> Yep, dynamic linking. But the thing is, whatever subset you're using… I'm not sure how much you can reduce that
<erikh> depends on how you do the plugin system, I'd imagine
<erikh> zenspider: anytime
antinitro_ [antinitro_!~adam@cpc1-stap4-0-0-cust418.12-2.cable.virginmedia.com] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-191-60.lsanca.fios.verizon.net] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-136-35.aei.ca] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
StevenRingo [StevenRingo!~nevets@ppp121-44-25-1.lns20.syd6.internode.on.net] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl12-6-6.dsl.telepac.pt] has quit [#ruby-lang]
H4y4shi [H4y4shi!~H4y4shi@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has quit [#ruby-lang]
voker57 [voker57!~voker57@128-70-90-45.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-136-35.aei.ca] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
pankajdoharey [pankajdoharey!~pankajdoh@49.213.34.157] has joined #ruby-lang
<pankajdoharey> #io
WillMarshall [WillMarshall!~willmarsh@121-73-153-79.cable.telstraclear.net] has joined #ruby-lang
<theoros> how about those floating point numbers
<rue> Terrible season
<theoros> :)
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-37-251.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
outoftime [outoftime!~mat@ool-ad03cbeb.dyn.optonline.net] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby-lang
<Banistergalaxy> Spooner did you build texplay yet
<Spooner> Banistergalaxy: Nope. I tried all sorts but it just couldn't seem to find the static + headers. At least that is what I assumed.
<Banistergalaxy> Noob
* Spooner shrugs.
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<Banistergalaxy> ;(
<Banistergalaxy> Jk
gregmoreno [gregmoreno!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<Spooner> It is OK. I really don't have a clue what I was doing :)
mrneighborly [mrneighborly!~mrneighbo@154.25.119.70.cfl.res.rr.com] has joined #ruby-lang
banister`gone [banister`gone!~baniseter@122.63.245.44] has joined #ruby-lang
<shevy> hmm question
<shevy> say I want to register an action, that is to be done in perhaps 10 days
<shevy> ah well, my thought is unfinished... I'll try at a later time again
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
* retro|cz is away: Byl jsem tady. Příjdu zas. Polib mi prdel, Fantomas!
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
jxie [jxie!~jxie@218.64.31.165] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby-lang
MistyM [MistyM!~MistyM@50.72.70.192] has joined #ruby-lang
yango [yango!~yango@85.48.193.157] has joined #ruby-lang
pankajdoharey [pankajdoharey!~pankajdoh@49.213.34.157] has quit ["Leaving"]
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
* imperator decides that custom data types in C need to be put down a hole and set on fire
StevenRingo [StevenRingo!~nevets@ppp121-44-25-1.lns20.syd6.internode.on.net] has joined #ruby-lang
comboy [comboy!~quassel@tesuji.pl] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<Asher> why?
<rue> void* should be enough for everybody.
<imperator> they're usually pointless and makes it difficult to track down what they actually represent
<imperator> especially when you're trying to use ffi :)
<vereteran> imperator, did you try ctags?
gnufied [gnufied!~gnufied@122.172.224.153] has joined #ruby-lang
<imperator> huh?
<vereteran> imperator, i'm using vim + ctags and got no issues with user data types
<Asher> that's an FFI problem not a C problem :P
<Asher> custom types are just groupings of simple types
<imperator> it's a human problem
<vereteran> oh, i don't know whats ffi. somewhy i thought its and editor lol XD
<Asher> a human problem?
<imperator> what does gid_t give me over just declaring unsigned int?
<imperator> not a helluva lot
<imperator> but it does force me to look up wtf gid_t is
<vereteran> wikipedoa says ffi is Fatal familial insomnia
<vereteran> 0o
<imperator> Foreign Function Interface
<vereteran> found it
<vereteran> yeah
<imperator> bingo
WillMarshall [WillMarshall!~willmarsh@121-73-153-79.cable.telstraclear.net] has joined #ruby-lang
<rue> imperator: The point is it doesn't tell you. Of course it's a bit awkward if you have to chase it down, but doesn't the typedef support cover that?
<Asher> aren't basically all of the _______t types uints?
<rue> The _t stands for type, pretty much, so not always.
<Asher> no i got that
<Asher> but most of the ones that posix uses
<Asher> are all for positive int units
<rue> Mm, most should
<imperator> rue, typedef support?
<rue> Hm, I'm thinking rbx.
<rue> There are a couple libs for parsing headers, though
<bnagy> are any of them good? I did it all manually, last ffi thing
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<lianj> good for bootstrap
<lianj> i like manually aswell, can often can ignore lots of stuff. but sucks if upstream headers change and you have to find the changes by hand then. happend to me with last ffmpeg update :/
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
rhizmoe [rhizmoe!~eric@slider.synthesizer.org] has joined #ruby-lang
<epitron> is there a good ruby library for making a streaming HTTP proxy?
<rhizmoe> what does Hash#compare_by_identity do, or what's it for?
<epitron> rhizmoe: identity is like the ID number of an object, as opposed to the content
<epitron> so two strings could be equal, but have different id
<rhizmoe> that doesn't sound like what's in the docs
<epitron> haah
<epitron> well, i don't actually know that method ^_^
<epitron> i'm just guessing
<epitron> sorry
<epitron> ah yes, that is accurate
<epitron> except it applies to the keys
<imperator> holy cow getlastlogx is slow with ffi, i must be doing something horribly wrong here
<epitron> so instead of comparing the keys with ==, it compares using object id's
<rhizmoe> ok. thanks, i think.
<epitron> doesn't make sense?
<Asher> epitron - what do you want from a streaming HTTP proxy?
<epitron> Asher: fun times :D
<epitron> mostly low latency though
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.46] has joined #ruby-lang
<epitron> proxies that download the entire request are noticably slow
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
<epitron> also, you can't stream mp3's
<epitron> or videos
<Asher> meaning a proxy that sits in the middle and relays everything?
<epitron> most things ^_^
<epitron> yeah, this will be on the local machine
<Asher> interesting...
<Asher> i don't know of any library targeted toward that sort of thing… i imagine it will require a lot of packet reading and processing
<bnagy> EM must have a thing for it
<epitron> well, eventmachine is the .. yeah :)
<epitron> i think i tried before with em-http-client though, and there was some problem
<epitron> s/client/request/
<bnagy> maybe go one layer down and see if there's a streaming TCP proxy
<epitron> hmm
<epitron> well, my ultimate goal is to modify the requests
<epitron> but i could use that as a foundation
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<Asher> if you want to modify the requests you have to be at a packet level, no?
<epitron> i can send back any request i want :)
<epitron> s/request/response/
<epitron> it's a proxy, right?
<bnagy> did you already look at Burp?
<bnagy> not in ruby, but kind of the gold standard for that kind of thing
<epitron> oh yeah, burp!
<bnagy> I think someone wrote Buby, but it might be terrible
havenn [havenn!~skipper@pool-108-0-191-60.lsanca.fios.verizon.net] has joined #ruby-lang
<epitron> this is probably pretty heavyweight
<epitron> java + jruby alone is a lot of code
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@121-73-153-79.cable.telstraclear.net] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-jcpvvatjrkxjdqxl] has joined #ruby-lang
soahccc [soahccc!chaos@d2-1.debian-02.ppps.hosts.project-production.de] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-hopptoctpucqgcpt] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-gpzzlwtbrytfitzk] has joined #ruby-lang
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-grnaelbawrbxsots] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-socujmkunorudgnl] has joined #ruby-lang
newbold [newbold!u5179@gateway/web/irccloud.com/x-zdbpetkriiiwekoa] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
dross [dross!~dross@unaffiliated/dross] has joined #ruby-lang
dross [dross!~dross@unaffiliated/dross] has quit [#ruby-lang]
vladalive [vladalive!~vladalive@176.52.59.4] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-mznofavdhpluxhyc] has joined #ruby-lang
Rich_Morin [Rich_Morin!~rdm@cfcl.com] has quit [#ruby-lang]
jwollert [jwollert!~jwollert@rkh.im] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-veibsqpupuzyznyy] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
Gekz_ [Gekz_!~gekz@unaffiliated/gekz] has joined #ruby-lang
<postmodern> ruby 1.8 question, is there an equivalent to GC.stat?
<postmodern> im guessing no
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
<rue> postmodern: Don't believe so, on MRI
<postmodern> rue, thought so
ryanf [ryanf!~ryanf@235.sub-174-253-242.myvzw.com] has joined #ruby-lang
<rue> Ha, building docs for 1.8.7 brought CPU temp to nearly 100
mtkd [mtkd!znc@209-20-90-74.slicehost.net] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@128-70-125-206.broadband.corbina.ru] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
<raggi> rue: lol :)
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@121-73-153-79.cable.telstraclear.net] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has quit [#ruby-lang]
bousquet [bousquet!~bousquet@mobile-166-205-136-158.mycingular.net] has joined #ruby-lang
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<josh9> i have my pet project on a server at home. i want to automate the setup of similar server if my home server dies. is chef a good way to do that?
<bousquet> josh9: yes, chef is great once you get everything configured to build off the recipes. takes a bit more time to package than just one-off server setup
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
ddfreyne [ddfreyne!~denisdefr@stoneship.org] has joined #ruby-lang
<josh9> bousquet: do u use chef-solo or the client-server option?
thone [thone!~thone@g226051085.adsl.alicedsl.de] has joined #ruby-lang
<josh9> also, what is the cheapest option to host it in the cloud?
TvL2386 [TvL2386!~tom@2a00:1388:0:3:224:beff:feaf:8eb2] has joined #ruby-lang
<josh9> (i don't care if it's virtualized or not
<bousquet> josh9: chef solo. running on amazon aws. not sure if there's cheaper.
<josh9> another question, isn't it faster to clone a vm? (comparing to using a ruby script that need to install everything)
<bousquet> probably
<josh9> so what's the excitement about chef?
<bousquet> depending on io and the tooling provided by the hosting provider. compiling things like ruby from source can take some time
<bousquet> josh9: mostly the ability to manage the configuration in a versioned and automated way.
<josh9> bousquet: got it. thanks
<bousquet> for years i had a list of commands I would run to build it up but chef has allowed that to get more sophisticated and have more best practices building upon recipes more people manage than myself
<burgestrand> josh9: also check out Sprinkle or Puppet
<josh9> nice
<burgestrand> Personally I prefer Sprinkle. It requires no bootstrapping and the scripts are easily readable even if you haven’t seen a recipe before.
voker57 [voker57!~voker57@128-70-51-144.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
Pip [Pip!~Pip@188.134.46.174] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
ryanf [ryanf!~ryanf@230.sub-174-253-229.myvzw.com] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
gidogeek_ [gidogeek_!~gidogeek@2002:5f82:ec27:0:9c62:7af6:e652:371a] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-188.lsanca.fios.verizon.net] has joined #ruby-lang
charper [charper!u1691@gateway/web/irccloud.com/x-brxwipxxntozngqk] has joined #ruby-lang
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
flak [flak!~splitta@85.158.54.234] has joined #ruby-lang
Pip_ [Pip_!~Pip@188.134.46.174] has joined #ruby-lang
Pip_ [Pip_!~Pip@unaffiliated/pip] has joined #ruby-lang
gix- [gix-!~gix@e180027180.adsl.alicedsl.de] has joined #ruby-lang
foca [foca!~foca@li25-211.members.linode.com] has joined #ruby-lang
dreinull- [dreinull-!dreieins@217.18.70.225] has joined #ruby-lang
jordan`` [jordan``!~gromit@2001:660:3302:2826:225:90ff:fe20:d9a8] has joined #ruby-lang
codelol_ [codelol_!u3386@gateway/web/irccloud.com/x-mblvvhrnjvlqwfqd] has joined #ruby-lang
Tick-Tock [Tick-Tock!~Tick-Tock@2607:f358:1:fed5:22:0:b683:4295] has joined #ruby-lang
masterkorp [masterkorp!~masterkor@static.34.107.46.78.clients.your-server.de] has joined #ruby-lang
ozzloy [ozzloy!~ozzloy@unaffiliated/ozzloy] has joined #ruby-lang
dhoss [dhoss!~dhoss@bruticus.dhoss.net] has joined #ruby-lang
basicxman [basicxman!~basicxman@178.79.149.144] has joined #ruby-lang
basicxman [basicxman!~basicxman@unaffiliated/secrece] has joined #ruby-lang
segy [segy!~segfault@pdpc/supporter/active/segy] has joined #ruby-lang
yeltzooo [yeltzooo!~yeltzooo@ec2-50-18-131-205.us-west-1.compute.amazonaws.com] has joined #ruby-lang
bnagy [bnagy!~ben@27.54.42.187] has joined #ruby-lang
freedrull [freedrull!~freedrull@freedrull.xen.prgmr.com] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
prsimp [prsimp!~prs@manifestland.com] has joined #ruby-lang
coderrr [coderrr!~steve@li335-154.members.linode.com] has joined #ruby-lang
valeri_ufo [valeri_ufo!~valeri_uf@deadlink.in] has joined #ruby-lang
FiXato [FiXato!~FiXato@fixato.net] has joined #ruby-lang
kinabalu [kinabalu!~kinabalu@li164-71.members.linode.com] has joined #ruby-lang
LanceHaig [LanceHaig!44cb33e14a@vm10.hosting.betterhosted.com] has joined #ruby-lang
pablo [pablo!~pabloh@186.22.82.39] has joined #ruby-lang
mytrile [mytrile!~mytrile@94.26.28.135] has joined #ruby-lang
josh9 [josh9!~oren@cpe-76-172-9-207.socal.res.rr.com] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-188.lsanca.fios.verizon.net] has joined #ruby-lang
mksm [mksm!~ramorim@li168-21.members.linode.com] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
flebel [flebel!~flebel@dsl-69-171-137-41.acanac.net] has joined #ruby-lang
knu [knu!chuck@v055125.ppp.asahi-net.or.jp] has joined #ruby-lang
flebel [flebel!~flebel@unaffiliated/flebel] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
ged [ged!~ged@deveiate.org] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
Cope [Cope!~atalanta@91.194.75.218] has joined #ruby-lang
<Cope> hi.... i am getting a very puzzling error
<Cope> I am trying to run:
<Cope> input = gets.chomp
Asher1 [Asher1!~asher@c-24-126-149-16.hsd1.ga.comcast.net] has joined #ruby-lang
<Cope> pretty trivial
<Cope> but i get:
<Cope> No such file or directory - -e (Errno::ENOENT)
<Cope> whenever i try to call gets
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
levifig_ [levifig_!u1908@gateway/web/irccloud.com/x-mrhxnlibdzcsjcfj] has joined #ruby-lang
Pip [Pip!~Pip@188.134.46.174] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
cyri_ [cyri_!~cyri_@149.93.119.80.rev.sfr.net] has joined #ruby-lang
levifig_ [levifig_!u1908@gateway/web/irccloud.com/x-jajylrbpsejcgqlf] has joined #ruby-lang
<bnagy> that's not working code, so it's probably going to be hard to debug
voker57_ [voker57_!~voker57@128-70-118-94.broadband.corbina.ru] has joined #ruby-lang
<rippa> Cope: try $stdin.gets
<Cope> thanks rippa
<Cope> works :)
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
<matled> Cope: gets will be called on $< by default. $< is a special file which reads from files specified on the command line, or stdin if none is supplied. it seems you passed a "-e" to your script as argument and ruby tries to open it as a file for $<.
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
<Cope> ahh
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.59.4] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@123.201.117.198] has joined #ruby-lang
<rue> ARGF, usually.
<rue> Or more commonly
ioga_wrk [ioga_wrk!~ioga@92.255.125.251] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.47] has joined #ruby-lang
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-99-41.lnse4.ken.bigpond.net.au] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
shevy [shevy!~shevy@178-190-75-144.adsl.highway.telekom.at] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
flooose [flooose!~chris@mnch-4d0436ba.pool.mediaWays.net] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@dhcp-189083.eduroam.chalmers.se] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
valcker [valcker!~valcker@228-7-190-109.dsl.ovh.fr] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
Roujo [Roujo!~Roujo@modemcable186.146-70-69.static.videotron.ca] has joined #ruby-lang
StevenRingo [StevenRingo!~nevets@ppp121-44-25-1.lns20.syd6.internode.on.net] has joined #ruby-lang
Roujo [Roujo!~Roujo@modemcable186.146-70-69.static.videotron.ca] has joined #ruby-lang
krz [krz!~foobar@2002:3a45:c93c:0:999c:2b17:4264:ad4e] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
dave_miles [dave_miles!~davemiles@gatek.thls.bbc.co.uk] has joined #ruby-lang
Jade [Jade!~jade@unaffiliated/jade] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
futurechimp [futurechimp!~futurechi@109.239.86.106] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
valcker_ [valcker_!~valcker@78.250.115.211] has joined #ruby-lang
workmad3 [workmad3!~workmad3@vpn174.its.manchester.ac.uk] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
xjonc [xjonc!~xjonc@afft121.neoplus.adsl.tpnet.pl] has joined #ruby-lang
tvl [tvl!~tvl@arrakis.uio.no] has joined #ruby-lang
<Asher> wtf does delete_if return the original hash not the deleted elements
<Muz> Because it's consistant with every other method that deletes or changes an object?
<Muz> You get returned the resulting object, not the items you removed.
<Asher> it's not consistentent with Hash#delete
thebastl [thebastl!bastl@ve621924175.ihrserver.de] has quit ["Leaving"]
<Muz> I'd argue that Hash#delete has the confusing behaviour if anything
<Asher> you'd argue that method chaining is more important than determining what was deleted?
<Muz> But that said, it's not too confusing, as it provides a quick and deterministic method for seeing if something actually was deleted.
<Muz> Gven the context and intention of use for a method; yes.
<Muz> *intended
<Asher> the only way to know what delete_if deletes is to trakc it manually during the loop
<Asher> whereas i don't see the benefit of returning the hash
<Asher> the benefit of returning the deleted elements seems clear
<Asher> it seems like there should then be a delete_if! that would return the hash
<Asher> but there's no since delete always changes the hash
<Asher> *not
<Asher> it encourages nasty little blocks of unnecessary if => store, return true else => return false in blocks
<Asher> which of course can't say "return"
<Asher> which makes it more ambiguous to read too
<matti> Hi Asher :)
<Asher> matti :D how goes
<matti> Asher: Could be better ;]
<Asher> aw that sucks :)
<matti> :>
<matti> You?
<molgrew> don't you already know what delete_if deletes, because you provided the block?
<rippa> blocks can say "next: though
<rippa> *"
<Asher> i've been doing pretty well - getting things together to launch contentinterfaces.com
<Asher> molgrew - only if you manually track what the block will return
<molgrew> why does one need to track what the block returns? delete_if does that and acts accordingly
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<Asher> delete_if does not return what the block deletes
<Asher> if you want to know what was deleted you have to track it yourself
<molgrew> I see now, you want more than just "everything that makes block return true" as answer
<Asher> i want to know what the block determined it was deleting
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby-lang
valcker__ [valcker__!~valcker@78.250.115.211] has joined #ruby-lang
gix [gix!~gix@e180005210.adsl.alicedsl.de] has joined #ruby-lang
valcker__ [valcker__!~valcker@78.250.115.211] has joined #ruby-lang
<rue> This is the third inquiry of the same nature in the last week
<rue> There's clearly demand for a change to either #reject! or #delete_if
<erikh> reject! is kind of useless because you can't chain it
<shevy> but you can chain your mom!
<erikh> if it yielded the modified object jquery-style, it'd be a lot more useful
<injekt> :)
bl00dsho_ [bl00dsho_!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<rue> erikh: It does, doesn't it?
<rue> Well, it may return nil but other than that.
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<andrewvos> Anyone know a simple way to run a piece of code for a certain amount of time. #timeout raises an exception when my code executes longer than expected.
<andrewvos> I kind of want something like timeout but without the raised error.
<rue> There's a gem called begin-rescue-end
<andrewvos> rue: I hate you
<erikh> nil doesn't chain well
|Vargas| [|Vargas|!~luke@host130-149-dynamic.51-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
<manveru> meh
ioga_wrk [ioga_wrk!~ioga@92.255.125.251] has joined #ruby-lang
<manveru> bikeshedding ftl :P
<manveru> >> x = {a: 1, b: 2, c: 3, d: 4}; y = x.delete_if.with_object({}){|(k,v),o| o[k] = v if v % 2 == 0 }; [x, y]
<manveru> => [{:a=>1, :c=>3}, {:b=>2, :d=>4}]
<manveru> >> x = {a: 1, b: 2, c: 3, d: 4}; y = x.partition{|k,v| v % 2 == 0 }.map{|y| Hash[y] }
<manveru> => [{:b=>2, :d=>4}, {:a=>1, :c=>3}]
<shevy> what is going on
<shevy> the array positions were exchanged with one another?
molgrew_ [molgrew_!~bozo20@85.182.139.18] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
<rue> Magic!
<andrewvos> Ahhh the rue approval.
<andrewvos> My children will be proud
jasim [jasim!~jasim@122.172.247.109] has joined #ruby-lang
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
<michael_mbp> hmm
<michael_mbp> hi manveru
<michael_mbp> is there anyway I can do a conditional .send()
<andrewvos> .send if you_want_to
<michael_mbp> let's say I'm calling a method on a string "bad".send(:foo)
<michael_mbp> andrewvos: but I only want it to send the message if something is true
<michael_mbp> else just do "bad"
<andrewvos> .send(:foo) if you_want_to
<michael_mbp> *baz"
<andrewvos> if you_want_to "bad".send(:foo); else; "bad".send(:baz); end
<michael_mbp> or if some_condition ? obj.send(:foo) : obj
<michael_mbp> ignore the if in ^^
<andrewvos> michael_mbp: You just need an if statement dude
<michael_mbp> this works to some_condition ? obj.send(:foo) : obj
<michael_mbp> *too
<michael_mbp> I only want to call :foo on the object if the condition is true.
<michael_mbp> else I want to return the object
<rue> OK
<injekt> condition ? object.send(:foo) : object
<injekt> michael_mbp: you've already written that, what are you asking?
<michael_mbp> was wondering if it could be even more compact
<injekt> lol
<michael_mbp> guess not :)
<andrewvos> michael_mbp: Don't be one of those "I want to do it in one line" ruby guys. They're dicks.
<andrewvos> :)
<michael_mbp> very true
<andrewvos> (smiley added to not sound like a twat)
<michael_mbp> and hell crypting
<injekt> too late
<michael_mbp> *cryptic
<injekt> zing!
<michael_mbp> haha
<michael_mbp> nah, I really understand what he means
<injekt> good :)
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<manveru> >> class Object; def send?(*args) yield ? send(*args) : self; end; end; "foo".send?(:squeeze){ true }
<manveru> => "fo"
<injekt> yuck
<shevy> andrewvos: I want to do it in one line
<injekt> then you need inject, ternarys, and a regex
<manveru> lol
<shevy> are you creating new languages in one line now?!
jMCg [jMCg!~hiro@static.117.115.40.188.clients.your-server.de] has joined #ruby-lang
jMCg [jMCg!~hiro@apache/committer/igalic] has joined #ruby-lang
<bnagy> condition && str || str.send(:meth)
<bnagy> sry s/||/or maybe
<bnagy> barfy anyway
<erikh> I'd think send? would be a respond_to? check then a call
<michael_mbp> you might hate me for that :p
<michael_mbp> lol shevy
ovnimancer [ovnimancer!~anton@212.59.96.38] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
<injekt> michael_mbp: that's all it was for?
<michael_mbp> yeah simple fix
<injekt> 'fix'?
<injekt> it looks like a refactor
<michael_mbp> That is a refactor, all three commits is a fix
<injekt> ah
<erikh> injekt: hi
<erikh> also I LOVE YOU
<injekt> erikh: hey
<injekt> I LOVE YOU ALSO
<bnagy> ... when minaswan goes TOO FAR
<injekt> What did I do?
<michael_mbp> injekt: https://github.com/schacon/showoff/pull/162/files << that fixes it for 1.9 while retaining 1.8.x compatibility
<erikh> injekt: oh nothing, just being friendly
<erikh> I've had a lot of caffeine
<injekt> erikh: <3
<injekt> michael_mbp: force_encoding on a constant string which no ambiguous characters? Am I missing something? (it's quite possible)
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<michael_mbp> it used to spit "ArgumentError - invalid byte sequence in UTF-8" before in 1.9
<michael_mbp> now it works.
<ddfreyne> maybe put # encoding: utf-8 at the top of your source files?
<ddfreyne> or whatever your encoding is
<michael_mbp> showoff isn't mine :)
<injekt> hey you're patching it :)
<michael_mbp> if schacon/silva think the patch is worth it they'll accept.
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<bnagy> imvho a patch that gives zero insight into the actual bug seems weird
<bnagy> I guess the '+' operator on differently encoded strings made process_markdown blow up?
<michael_mbp> that's nice
publicvoid__ [publicvoid__!~publicvoi@p5DC1555F.dip.t-dialin.net] has joined #ruby-lang
<michael_mbp> It's not the + operator; it's still being added to section
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<bnagy> I never use + on strings, so I dunno what encoding it picks
<michael_mbp> I'm forcing the encoding on the string before it's added.
<bnagy> yeah we see that, but why does it fix 'the bug'? :)
<michael_mbp> but yea ddfreyne is correct, the author could run magic_encoding and his app would be fine for 1.9+ as is
<michael_mbp> didn't you read my first comment in the pull?
<bnagy> just the code
<bnagy> there are comments?
<shevy> nothing ever works
<michael_mbp> that does...
<michael_mbp> it's not the most active or important gem in the world so…anyways off to work on the presentation.
<michael_mbp> thanks all!
<erikh> enjoy
<michael_mbp> thanks will do
<injekt> who's idea was it to put so little hours in the day?
<shevy> the sun
<epitron> i blame asteroids
<epitron> momentum stealing bastards
<Asher> republicans
<Asher> collaborating with windows users
<epitron> democrats collaborating with the jew run media
jbsan [jbsan!~jbsan@host86-147-222-73.range86-147.btcentralplus.com] has joined #ruby-lang
<Asher> those are republicans :P
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
mytrile_ [mytrile_!~mytrile@94.26.28.135] has joined #ruby-lang
<epitron> what
<Asher> the jew run liberal media is actually run by catholic republicans
<epitron> uh
<epitron> no kidding
<Asher> :P
<epitron> i take it you've never watched bill o'reilly
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby-lang]
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<shevy> democrats, republicans, same difference
awake1162 [awake1162!~s@cpe-76-171-199-3.socal.res.rr.com] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.242.23.131] has joined #ruby-lang
SkramX [SkramX!~SkramX@pool-173-73-134-143.washdc.east.verizon.net] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-136-35.aei.ca] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
<andrewvos> Think this might be a bit off topic
<andrewvos> shevy: hahaha
<andrewvos> shevy: "the sun"
melter [melter!~Melter@2001:4930:116:0:21c:c0ff:feef:eaf5] has joined #ruby-lang
<shevy> when it comes to planets I know it all
<shevy> I single-handedly counted them all on my own
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
Pip [Pip!~Pip@188.134.46.174] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby-lang
<erikh> reek and roodi are so awesome
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
<rue> Roodi Vooller
<shevy> that's a soccer guy!
<rue> Sucker
<Spooner> Are 'universal-darwin' gems pre-compiled (like a lot of Windows gems) or do they still need a compiler, but are OSX-specific?
* retro|cz is back (gone 11:04:47)
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<diegoviola> any beginners guide? a friend is asking
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<diegoviola> Ruby the hard way?
<diegoviola> uhm
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<diegoviola> i just send him that
<andrewvos> KOANS
<erikh> auto-away is really annoying
<erikh> retro|cz: ^ can you turn that off?
<retro|cz> erikh, sorry
<tobiasvl> why is that annoying?
<erikh> it's spam
<retro|cz> erikh, but it is not autoaway
<tobiasvl> my irssi goes away when i detach, is that annoying?
<erikh> does it send a /me everytime you do it?
<injekt> when it tells everyone else, yes
<erikh> nobody cares if you're away
<tobiasvl> haha. no. of course it doesn't
<tobiasvl> if retro|cz does that then i get it
* manveru doesn't even see those messages
<retro|cz> erikh, it is off
<manveru> oh, way up there
<retro|cz> anyway
<erikh> thanks
rippa [rippa!~rippa@93-181-232-162.adsl.yaroslavl.ru] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
<imperator> good morning
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
spleeze [spleeze!~Spleeze@173-15-131-114-BusName-Philadelphia.hfc.comcastbusiness.net] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.48] has joined #ruby-lang
Sailias [Sailias!~jonathan@206-248-172-164.dsl.teksavvy.com] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
<shevy> yeah I dont see joining or leaving messages either, I always felt it was useless info to me
<shevy> I dont even have time stamps :)
<tobiasvl> whaaat
<imperator> wasn't a join message, that was me typing :)
<injekt> imperator: you missed the conversation..
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
<imperator> oic
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-213-184.ssp.dialog.net.pl] has joined #ruby-lang
* rue has joined the conversation
<rue> Yep, you did
* rue has left the conversation
<imperator> rue, there's no leaving the conversation
<imperator> once you're in, you stay in
<shevy> not in the holy lands of the reindeer
<shevy> people there only end conversations
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
crudson [crudson!~doug@static-72-94-51-106.phlapa.fios.verizon.net] has joined #ruby-lang
jredville [jredville!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
rolfb [rolfb!~rolfb@77.94.232.40] has joined #ruby-lang
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby-lang
ioga_wrk [ioga_wrk!~ioga@92.255.125.251] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby-lang
mrneighborly [mrneighborly!~mrneighbo@154.25.119.70.cfl.res.rr.com] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
Filuren [Filuren!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<imperator> well, this is odd
<imperator> declared attach_function :open_c, :open, [:string, :int], :int
<imperator> but it's returning true/false
<chris2> anyone experienced in lalr grammars?
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<shevy> only in lol grammar!!!
<imperator> chris2, i'll bet some folks in #jruby or #rubinius are
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<headius> imperator: that is weird
<headius> on MRI?
<imperator> headius, yeah, on ubuntu
<headius> if it doesn't do the same on JRuby I would bet it's not tagging the fixnum right or something
<imperator> wonder if the aliasing is confusing it
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
* imperator needs pread for something, in case anyone wonders why i'm declaring it in the first place
<imperator> actually, i could just use fileno now that i think about it...
<chris2> imperator: why would ruby implementors know anything about lalr? :P
<imperator> chris2, they strike me as the sorts of people who have experience with it :)
<imperator> just a hunch, mind you
<chris2> not that the ruby grammar is anything :P
RickHull [RickHull!~rhull@209.119.14.25] has joined #ruby-lang
MistyM [MistyM!~mistym@50.museumforhumanrights.com] has joined #ruby-lang
<imperator> headius, hm, maybe i was mistaken
<imperator> PEBKAC
RickHull [RickHull!~rhull@pdpc/supporter/active/rickhull] has joined #ruby-lang
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
<shevy> crazy crazy people
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
solars [solars!~solars@mk089144206051.a1.net] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
* rue has joined the conversation
<rue> imperator: Too
* rue has left the conversation
<molgrew_> how many conversations can you hold at one time?
<imperator> apparently he's single threaded
<molgrew_> a conversation spam attack comes to mind
<shevy> hmm is there a difference between
<shevy> foo.is_a? Array and foo.class == Array ?
<andrewvos> rue: Liking how that emphasizes your sarcastic
<shevy> I managed to surprise myself when I found the latter in ancient code I once wrote
<andrewvos> responses
* rue goes MT
<rue> shevy: YeOK this is bs, there iettesr
<shevy> what
* rue MUUUTEEEEX
<shevy> oh
<rue> shevy: Yes, there is.
<shevy> conflicting threads
<shevy> let's kill the zombie that now is rue
<rue> Exercise: what is the difference?
<shevy> anyone has a shotgun?
<andrewvos> Two in the head
<imperator> double tap
<shevy> rue: I dont see one!
<rue> Squint?
<shevy> there is more than one way to do it
<imperator> shevy, try this
<imperator> class Foo < Array; end
<imperator> foo = Foo.new; p foo.class
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<imperator> so, the class of foo is Foo, not array
<imperator> but, foo.is_a?(Array) is true
<shevy> hmmmm
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@109.53.189.57] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
<andrewvos> Git submodules. Do we love them or hate them ruby-lang?
<heftig> andrewvos: what's the alternative?
<andrewvos> One repo
<andrewvos> heftig: ^
<heftig> you mean copying external libraries into the project repo?
<andrewvos> heftig: Sorry. I mean projects owned by our team.
<injekt> andrewvos: i like them
<heftig> ehh, i'd go with the one repo
<andrewvos> heftig: Why?
<injekt> each of these projects are git repos?
tris [tris!tristan@2001:1868:a00a::4] has joined #ruby-lang
<andrewvos> I need to know because I'm moving our team to git and don't want to make it painful for the devs...
<rue> There's git-slave, I think
<heftig> hmm
<andrewvos> injekt: They are svn repos now actually.
<rue> Er, as an alternative
<injekt> andrewvos: eek
corundum [corundum!~rbot@drbrain-2-pt.tunnel.tserv8.dal1.ipv6.he.net] has joined #ruby-lang
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
<heftig> those submodules would be independent, with their own tests and all?
<andrewvos> injekt: Indeed.
hexo [hexo!hexo@hackerspace.base48.tk] has joined #ruby-lang
<injekt> andrewvos: if each project is its own repo and you want them as sub repos in a larger repo, i think you've answered the question
<andrewvos> rue: Are you recommending that?
<rue> If they can't exist separately (gems, dylibs, etc.) yet are needed by multiple projects, maybe then submodules
<rue> andrewvos: Dunno, it gets thrown around
thorncp [thorncp!thorncp@2600:3c01::f03c:91ff:fe93:d182] has joined #ruby-lang
<rue> I'd primarily evaluate whether the functionality makes any sense
<andrewvos> rue: Well, they're actually php applications
<andrewvos> rue: I just don't want the devs to have to mess about with multiple repos
<rue> They'll need to anyway
vesan_ [vesan_!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
<rue> Unless you merge everything into one
<andrewvos> rue: I mean, they're doing that now. And we end up doing an svn commit with the same message in multiple places.
<rue> Why?
<andrewvos> Which is fucking painful
<andrewvos> rue: Well because when changing code in different projects it's all realy part of the same commit.
<andrewvos> rue: Which screams "these should be in one project"
Tick-Tock [Tick-Tock!~Tick-Tock@2607:f358:1:fed5:22:0:b683:4295] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310A89.dip0.t-ipconnect.de] has joined #ruby-lang
<andrewvos> Possibly
<rue> Sure, but that's not the same thing as submodules
<rue> A submodule is a reference to an external repo at a certain commit
<andrewvos> Ok so it's harder with git then?
spinagon [spinagon!~rippa@87-253-25-211.pppoe.yaroslavl.ru] has joined #ruby-lang
<rue> Harder to continue with the suckage? Could be :)
<rue> If they're one project, merge them. If they're standalone, decouple them better
ksinkar [ksinkar!~ksinkar@115.240.93.138] has joined #ruby-lang
rippa [rippa!~rippa@93-181-222-153.adsl.yaroslavl.ru] has joined #ruby-lang
<andrewvos> rue: Agreed.
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
rippa [rippa!~rippa@93-181-222-153.adsl.yaroslavl.ru] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-69-203-115-155.nyc.res.rr.com] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
rippa [rippa!~rippa@93-181-222-153.adsl.yaroslavl.ru] has joined #ruby-lang
cconstantine_ [cconstantine_!~cconstant@173.247.200.5] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
pbjorklund [pbjorklund!~textual@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
kinabalu [kinabalu!~kinabalu@unaffiliated/kinabalu] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
ivanoats [ivanoats!~ivanoats@pdpc/supporter/active/ivanoats] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
Sailias [Sailias!~jonathan@206-248-172-164.dsl.teksavvy.com] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DEBE.dip0.t-ipconnect.de] has joined #ruby-lang
LanceHaig [LanceHaig!44cb33e14a@foresight/member/lhaig] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl12-6-6.dsl.telepac.pt] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
charlietanksley [charlietanksley!cwt@gateway/shell/blinkenshell.org/x-nhydmtjxzlydxjna] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl12-6-6.dsl.telepac.pt] has quit [#ruby-lang]
jaisoares [jaisoares!~jsoares@bl12-6-6.dsl.telepac.pt] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
zwevans [zwevans!~zwevans@99-127-40-79.lightspeed.rlghnc.sbcglobal.net] has joined #ruby-lang
<rue> Unanimity <3
<imperator> we tried a git submodule for a while, gave up on it
<imperator> ended up just creating our own fork
<rue> Gitslave doesn't seem terrible, I guess. If you want to go that way
<rue> Certainly >> submodules
pigdude [pigdude!~tallen@li61-243.members.linode.com] has quit [#ruby-lang]
<yxhuvud> to me it feels as if git nails the single-project VC use case. however, big projects with multiple subprojects seems mostly like an open problem still
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl12-6-6.dsl.telepac.pt] has joined #ruby-lang
<rue> I think it's more a problem of *having* big projects with multiple subprojects
<imperator> yep
drbrain [drbrain!~drbrain@drbrain-1-pt.tunnel.tserv14.sea1.ipv6.he.net] has joined #ruby-lang
<rue> I'm open to being convinced otherwise on this count
<yxhuvud> sure. but I don't see how it can be avoided.
kain [kain!~kain@151.64.210.200] has joined #ruby-lang
<rue> What establishes a subproject relationship?
<yxhuvud> most obvious case is when you have third party code that you want to integrate
<yxhuvud> sometimes it is possible to do it through a library, but that is not always sufficient
<rue> It should be quite rare that it isn't
<yxhuvud> not so ime. especially not if you have to alter stuff in the corresponding code.
<rue> Alter the library?
whatasunnyday [whatasunnyday!~sunny@c-24-130-81-47.hsd1.ca.comcast.net] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby-lang
<yxhuvud> or alter the precompiled entrances to it. It gets a lot less nice and fuzzy when projects grow out of a single environment. Take the app we do at work for example. we have big chunks of code in c, java, python, ruby, bash etc. You *really* want to modularize stuff at that point
<imperator> meh, just convert all that other crap to ruby!
* imperator ducks
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
<rue> Wouldn't modularization be better with well-defined APIs?
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
<yxhuvud> well defined api's are nice, but that doesn't really help the problem with having to have umbrella modules
gidogeek_ [gidogeek_!~gidogeek@wirelab.isp.be.nl] has joined #ruby-lang
<imperator> hm, anyone know how to do the equivalent of cc -D_POSIX_PTHREAD_SEMANTICS with FFI ?
<crankharder> I want to write a class method that when called will define instance methods on the same class, how do I do that?
<apeiros_> crankharder: see class_eval and define_method
<rue> imperator: That being a compile-time definition, you need to figure out if it just affects the functions called, or otherwise splices code
<imperator> rue, it uses different function declarations as far as i can tell
<imperator> not sure how it's handled internally
<imperator> oh, hah, just realized my C code doesn't even build it properly with gcc, only solaris cc
<imperator> well, funk
boodle [boodle!~boodle@174.46.129.34] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<crankharder> apeiros_: ty
<rue> imperator: clang?
<rue> imperator: It sounds like you'd have to build the lib with the flag defined
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
<H4y4shi> Hey guys anywone want to look over my code? I would appreciate any critiscisms. http://www.ruby-forum.com/attachment/6929/program.rb
fayimora [fayimora!~fayimora@109.175.187.141] has joined #ruby-lang
<bougyman> two spaces
<bougyman> no tabs
dfr|mac [dfr|mac!dfr|work@nat/google/x-oeojbwaqprsrtdus] has joined #ruby-lang
<bougyman> if you wanted to ruby it up, you'd add classes for the creatures.
<H4y4shi> Each creature have a class?
<bougyman> class Frog < Creature; def initialize; @hp = 10;end; end
<bougyman> that type stuff.
<bougyman> instead of all the assignment
<erikh> anyone know what the require file for StringScanner is?
<erikh> I'm having a derp moment
<Phrogz> erikh: strscan iirc
<erikh> Phrogz: thanks!
<apeiros_> erikh: echo "require 'strscan'" > path/to/stringscanner.rb
<erikh> ugh
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
<erikh> I want it to work on machines other than my own
<apeiros_> hehe, ok
<apeiros_> somebody (not me) should make a commit, changing strscan to stringscanner, adding strscan.rb which emits a deprecation warning and requires stringscanner
<apeiros_> same for optparse
<yxhuvud> string_scanner ktnx
optikalmouse [optikalmouse!~user@bas1-toronto42-1279599710.dsl.bell.ca] has joined #ruby-lang
Skif [Skif!~Skif@72.1.92.57] has joined #ruby-lang
<optikalmouse> emacs ruby dev stuff, where can I finds it? ;p
<apeiros_> yxhuvud: u rails traitor u!!! to the torches!
<H4y4shi> huh.... I just found out how to use def...
* apeiros_ gets his pitchfork
<H4y4shi> so awesome!
<Phrogz> optikalmouse: The Internets?
<apeiros_> H4y4shi: achievement unlocked!
* Phrogz does use emacs, or he might be more helpful.
<H4y4shi> fuck yeah!
<apeiros_> 5000 nobsi-points! new high-score!
<apeiros_> :)
<yxhuvud> sorry but I just can't get behind c-isms like just concatenating words to form library names
<apeiros_> yxhuvud: hm?
<H4y4shi> I never knew how to go back in my programs to earlier parts but now with def I can woot
<yxhuvud> though the real c-ism might be the original name.
<apeiros_> that's not about the naming of the library. it's about the mapping of the name to the file.
<apeiros_> personally I'd prefer StringScanner.rb
<apeiros_> I see no gain in silly case-mappings
<optikalmouse> or um, which IDEs do ppl use for ruby dev?
<apeiros_> optikalmouse: needle, magnet & steady hand
<Phrogz> optikalmouse: I use Sublime Text 2 (not an IDE so much as an amazing text editor)
<erikh> I use vim. others use emacs, textmate, sublime text 2
<rippa> vim is kind of popular
<rippa> there's also that thing
<rippa> ruby mine or something
<erikh> jetbrains.com
<rippa> that's also not free
<yxhuvud> apeiros_: hmm
<optikalmouse> which ones are the free/open source ones? vim, emacs anything else?
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
<erikh> I just gave you a list
<optikalmouse> erikh: I'm not asking about price, I'm asking about opensource?
<erikh> vim, emacs, sublime text 2
<optikalmouse> oh ok
<optikalmouse> thx
* jaimef looks for a way to compare to large json structures for diffs
<erikh> there's a differ in active_support
<erikh> I wrote my own, and found out about it later.
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<andrewvos> erikh: Is yours any good?
<andrewvos> Reason I ask is I need a json differ for a task coming up.
<jaimef> active-support has json differ? it's not jumping out at me
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<andrewvos> Sublime TExt 2 isn't free
<erikh> jaimef: it has a data structure diffing utility
RickHull1 [RickHull1!~rhull@209.119.14.25] has joined #ruby-lang
<apeiros_> hey erikh: in perl they use the term "scalar" for single datapoints, what does it use again for collections?
<erikh> list
<erikh> all data structures derive from a list (somehow)
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<apeiros_> thanks
<erikh> hash tables are in unstored form just even-length lists
<erikh> this can be a little confusing at first but it's super-powerful
<apeiros_> erikh: I remember :)
<erikh> ah ok
<apeiros_> I just forgot the term. I haven't used perl in ages :-S
<injekt> :)
<imperator> perl, what's that?
<apeiros_> well, I mean, of course I remember the term 'list'. I forgot that the distinction used in perl was scalar/list :)
<erikh> imperator: heh
<erikh> apeiros_: note there's no "list()" function like there is with scalar()
<injekt> imperator: the thing which has cpan? you know, which > *
<erikh> surrounding with parens usually coerces list form, but there are other situations where you need to use @
<erikh> or @{}
<erikh> ... which mostly involve references
<injekt> deference that biznitch
<injekt> dereference*
<erikh> yeah, CPAN is pretty much win
<injekt> aye
<injekt> used some mojo stuff this last week
<erikh> oh yeah, kraih is really kicking ass
<erikh> been watching his commits on github
<injekt> yeah
<imperator> erikh, though i had to crack up when some of them started counting -modules- once rubygems distros started catching up
<injekt> I love the dom stuff
<erikh> imperator: oh yeah -- well, they're taking a lot of (unnecessary and cargo culted) heat lately, so the information police feel the need to step up
<RickHull1> we've been reported to the cyberpolice?
RickHull [RickHull!~rhull@pdpc/supporter/active/rickhull] has joined #ruby-lang
<injekt> unfortunately no other language has anything NEAR as sexy as nokogiri for dom stuff
<imperator> RickHull, you've been reported to the phone cops
<RickHull> they've backtraced it!
<erikh> I like XML::LibXML, but I like DOM APIs too
<erikh> I'm a bit crusty that way
<injekt> not sure if I used that one, I went through so many which I felt did weird things
<erikh> oh yeah -- some of the xml parsers are shit
<injekt> but used the mojo dom stuff, and it was really nice
<erikh> such is the nature of CPAN
<injekt> yeah
<injekt> aye
<apeiros_> erikh: sry, was afk (wife returned) - I was mostly looking for terms
<erikh> there's a guy on magnet who benched them all
<erikh> even experimental iksemel modules
<injekt> all of them?
<erikh> he used a dump of wikipedia
<injekt> dang
<erikh> basically, if you can deal with the API, XML::Parser is the winrar for most cases
<injekt> ah I think I may have struggled with that API tbh
<injekt> can't remember now, totally settled with Mojo::DOM
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang
SkramX [SkramX!~SkramX@128.164.117.253] has joined #ruby-lang
<erikh> reimplimenting sprintf is a bitch with arbitrary formats
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby-lang
pigdude [pigdude!~tallen@li61-243.members.linode.com] has joined #ruby-lang
<pigdude> why is this small script unreliable? it doesn't move files when it should, and i never see the "hg revert" message: http://paste.pocoo.org/show/540193/
<erikh> exec replaces the process with the new one
<pigdude> oh shite
<erikh> it doesn't do anything to tty controls
<pigdude> so if i want to exec string ...
<erikh> system(string)
<pigdude> oh ok
<pigdude> that's nicer than `#{s}`
<erikh> that'll still render the output
<pigdude> thanks erikh
jjore [jjore!~jjore@c-24-18-236-106.hsd1.wa.comcast.net] has quit ["ERC Version 5.2 (IRC client for Emacs)"]
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<erikh> `#{s}` or %x[#{s}] will only capture stdout unless you redirect it in the shell
<erikh> yep
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<erikh> if you really want to capture it all, well...
<pigdude> erikh, no, this works great
<erikh> ok cool
<MistyM> Open3 and friends are useful for more advanced stuff.
<erikh> Open* is horribly unportable
<erikh> ... unfortunately it's a pretty hard problem
<yxhuvud> There are portable solutions as long as you don't have to interact with the process
<erikh> portable to windows and jruby? that always yield output in a deterministic order?
<erikh> I'd like to hear about them
<MistyM> Unixisms don't port to Windows - film at 11.
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<imperator> erikh, how is open3 unportable?
<yxhuvud> erikh: I was thinking of systemu (from ara t howard). Dunno if it works on java, but it was very convenient on windows
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
crudson [crudson!~doug@static-72-94-51-106.phlapa.fios.verizon.net] has quit [#ruby-lang]
<imperator> gem install win32-open3 on 1.8, open3 should *just work* on 1.9
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby-lang
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<yxhuvud> imperator: it may be fixed now popen3 blocked the last time I had to work on windows. (which was several years ago, granted.
<yxhuvud> *but
<erikh> imperator: mashing stderr and stdout together yields a few issues
<erikh> because stderr has different semantics on unix than it does on windows (autoflush vs. proper buffering as I understand it)
<erikh> so basically depending on how you code it you might get stderr at one point but on a unix system another point
<erikh> ah no, it was line buffering
dejongge [dejongge!~jonke@pD9E0DEBE.dip0.t-ipconnect.de] has joined #ruby-lang
<imperator> hm, never experienced any problems with that
<erikh> I've had a ton of problems with it in gem-testers
<imperator> of course, system calls are the devil and should be avoided anyway ;)
<erikh> maybe my code is just fail
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
<erikh> I've tried select loops, rb_thread_select hackery, etc
<imperator> hm
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<h4y4shi> Hey could someone explain a beginner question for me. The question is. What does the following line of code do? attr_reader, :name, :attack, :hp
<h4y4shi> What does this line of code do?
<h4y4shi> the next line of code. def initialize(name, attack, hp)
<h4y4shi> next line. @name = name
<h4y4shi> next line. @attack = attack
<h4y4shi> next line. @hp = hp
<h4y4shi> next line. end
<h4y4shi> So I just want to know why is the def initialize so common?
rpowell [rpowell!~rpowell@CPE-121-218-99-41.lnse4.ken.bigpond.net.au] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
<MistyM> h4y4shi: def initialize is the code which will be executed when an instance of that class is created via Foo.new
<lsegal> known in OOP as a "constructor" method
<MistyM> attr_reader (along with its friends attr_writer and attr_accessor) makes it possible to access the instance variables of an object from outside objects.
<MistyM> attr_reader creates a method to read the named instance variable; attr_writer creates a method to write the named instance variable; and attr_accessor does both.
<h4y4shi> Okay thank you. I was wondering the difference between those three.
<MistyM> So, put it all together - your class there defines three instance variables (@name, @attack, @hp) and creates reader methods for them; then defines its constructor so that, when you create a new object in that class, it assigns values to those three instance variables.
<apeiros_> h4y4shi: also for future reference, use pastie.org for multi-line pastes (or gist.github.com)
<h4y4shi> Okay I will do that.
<h4y4shi> so is def initialize special in some way?
<apeiros_> slightly. Class#new will call it
<apeiros_> e.g. class Foo; end; Foo.new # <-- will call Foo#initialize
<apeiros_> you use it to initialize a newly created object (hence its name)
<h4y4shi> so if I were to call it def apple would it do the same thing if everything else was the same?
<Mon_Ouie> No, because Class#new calls #initialize not #apple
flooose [flooose!~chris@178-27-1-76-dynip.superkabel.de] has joined #ruby-lang
<MistyM> If you called it def apple it wouldn't be called when you generate a new object from that class with Class.new
<Mon_Ouie> But that's not really a property of the initialize method. The only special thing with it is it is private by default
<h4y4shi> oh okay I get it thank you!
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
<yxhuvud> initialize is private by default? heh. always count on Mon_Ouie to teach you something
<MistyM> If you called it def apple - `mackintosh = Class.new` then you could run `mackintosh.apple` on an object you create. But it won't be run automatically.
<h4y4shi> Thank you MistyM that makes sense.
<h4y4shi> =D
<MistyM> :D
jbsan [jbsan!~jbsan@host86-147-222-73.range86-147.btcentralplus.com] has joined #ruby-lang
gix [gix!~gix@e180005210.adsl.alicedsl.de] has joined #ruby-lang
<h4y4shi> What made you all want to learn Ruby?
<qpingu> Syntax for me
<qpingu> Loose and expressive
kookwekker [kookwekker!kookwekker@2a02:2308::216:3eff:feb8:af22] has joined #ruby-lang
<MistyM> That's a big part of it for sure.
<MistyM> For me, Why's Poignant Guide to Ruby. I wanted to learn to program but had a lot of trouble finding the right introduction that "clicked" with me.
<h4y4shi> I started because of RPG maker XP but lol I never understood it.
<h4y4shi> So now years later I decided to try to figure it out because I heard some buzz about it on the internet
<MistyM> Hm. Regexp question.
<MistyM> So I've got strings which may contain some notes in square brackets, e.g. "foo [note] bar [note2]". I'm matching multiple captures to extract those portions.
<MistyM> ...I think I just rubber duck debugged myself. One minute.
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
* RubberDebugger is listening
<MistyM> ;o
fayimora_ [fayimora_!~fayimora@2a01:388:201:3721:95db:a28:8e8b:3228] has joined #ruby-lang
<optikalmouse> so what do ppl use for unit-testing?
<optikalmouse> and is there a way to have both 1.9 and 1.8 installed? *kicks Ubuntu*
<RubberDebugger> RVM or alternatively rb-env are commonly used to manage multiple ruby versions
<RickHull> on debian based distros, there is usually a ruby1.9 package
<MistyM> Dang. I feel so close. "foo [note] bar [note2]".match /(\[[a-zA-Z ]+\])+/ #=> "[note]" (but not "[note2]" as well)
jorgenpt [jorgenpt!~jorgenpt@arachnophobia.daxnet.org] has joined #ruby-lang
jredville [jredville!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
<MistyM> ...oh, probably because I didn't include numerals in my regexp. Duhhh.
jredvill_ [jredvill_!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
<optikalmouse> RickHull: yeah I have ruby1.9 and ruby1.8 packages installed but my gem path is all messed up
<RickHull> optikalmouse: similar issues were part of the original impetus for RVM and later rb-env
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
ilyam_ [ilyam_!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-106-237.dsl.scarlet.be] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
cldwalker_ [cldwalker_!~cldwalker@c-65-96-165-236.hsd1.ma.comcast.net] has joined #ruby-lang
cwd1 [cwd1!~cwd1@cpe-76-176-105-158.san.res.rr.com] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
<uniqanomaly> I like to imagine alternative universe where one of ruby implementations has speed and mem usage within 50% of C compiled code
<RickHull> have you looked at Mirah?
<RickHull> it's not ruby, but the lineage should be apparent
<uniqanomaly> yeah I mean with stdlib and all gemz
<imperator> jruby?
<injekt> jruby is not near the speed of mirah
<Defusal> I can't remember who it was in here that had contributed a fair amount to slim
<injekt> Defusal: judofyr maybe?
<Defusal> If that person happens to be around, please let me know
<Defusal> Hmm, could be.. It's been a while since I spoke to them
<Defusal> I finally got a chance to use slim for a new project, but the "logic-less" mode is breaking my helper methods in sinatra :(
<Defusal> I'd love to know why that is, as one of the big improvements over haml is slims "logic-less" functionality
<injekt> what is "logic-less" functionality?
<injekt> (non slim user)
<optikalmouse> are there packages of rb-env or RVM? like full releases or am I expected to just grab the latest copy from their github repo?
<Defusal> injekt, its quite simple, take a quick look, http://slim-lang.com/logic-less.html
<injekt> optikalmouse: rbenv has a homebrew package, or you can download the source
<RickHull> optikalmouse: i doubt there is anything worthwhile from debian or ubuntu
<optikalmouse> there's no stable releases?
* imperator hasn't looked at mirah in a long time
<injekt> optikalmouse: sure there is
<injekt> Defusal: neat, thanks
<MistyM> optikalmouse: rvm has a builtin autoupdate. You can do it by point release, or latest commit in the repo.
<Defusal> Yeah, I've been dying to get a chance to use it... only to now find I can't, heh :P
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
<optikalmouse> yeeeeeah totally not going to install either of them...is there a way to make sure that gems I install will work with ruby 1.8?
<MistyM> 1.8 :(
<MistyM> optikalmouse: What's bugging you about them?
<injekt> optikalmouse: no
<injekt> optikalmouse: 1.9 is the latest version, so most gems will be targetted to that
<MistyM> 1.9 is a major language revision, so there are incompatibilities.
arooni-mobile [arooni-mobile!~arooni-mo@72.169.215.13] has joined #ruby-lang
<MistyM> optikalmouse: If you don't like the idea of installing things into your system without apt-get, rvm's installer is pretty "friendly" that way. It lives in .rvm in your home directory and adds one line to your .(bash|zsh)_profile. If you don't like it you can wipe it very easily without touching the rest of your system.
<injekt> is he on ubuntu then?
<RickHull> y
<RickHull> the best way I've found to deal with ruby on a debian based system is to manage all of ruby outside of apt
<injekt> on any system*
<optikalmouse> oh ok, so it's like every other programming language then, I'm used to that then ;p
<qpingu> Not on Windows though
<qpingu> You're stuck with one Ruby installation
<injekt> lies
<RickHull> well, windows doesn't have a standard repo or package system
<injekt> there's an rvm type equiv for windows
<heftig> RickHull: windows installer?
<RickHull> do you mean installer.exe or .msi or portable exe? ;)
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
<RickHull> there are ways to install software on windows, no doubt
<qpingu> Same could be said about the plethora of unix package formats
<injekt> no there is an official installer
<heftig> RickHull: nowadays, all sane installers build on windows installer
<RickHull> does that include the nullsoft thingie?
<erikh> no
<heftig> nope
<RickHull> i don't see that much anymore
setmeaway [setmeaway!~setmeaway@118.45.149.58] has joined #ruby-lang
<erikh> yay netsplit
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-gdppticvrmnqalxu] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-ulhyrsrvprierpaz] has joined #ruby-lang
levifig[o] [levifig[o]!u1908@gateway/web/irccloud.com/x-akeraezrlcdsfknv] has joined #ruby-lang
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-wbyjvlxndlpttnfq] has joined #ruby-lang
cldwalker_ [cldwalker_!u2984@gateway/web/irccloud.com/x-butsgokcdecxvxnz] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
codelol [codelol!u3386@gateway/web/irccloud.com/x-musyqfrdjnnpbxdh] has joined #ruby-lang
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-xfsfmbhpkwugdxch] has joined #ruby-lang
RickHull [RickHull!~rhull@pdpc/supporter/active/rickhull] has quit [#ruby-lang]
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-cjrehdmdbdwitija] has joined #ruby-lang
crassvs [crassvs!u4275@gateway/web/irccloud.com/x-jvuagqtbxfpxvenn] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-swjzxdrnveenowba] has joined #ruby-lang
newbold [newbold!u5179@gateway/web/irccloud.com/x-dkcjpneasgaqjdls] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-99-41.lnse4.ken.bigpond.net.au] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-ptyobqjbueriqhex] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
<andrewvos> Not much going on here
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
<optikalmouse> is there a way to do keyword args in ruby?
<injekt> optikalmouse: no, pass a hash
<drbrain> you can fake them with hashes
<andrewvos> optikalmouse: What?
<injekt> boom
* injekt wins
<andrewvos> oh right
<andrewvos> Well played injekt.
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
<optikalmouse> also, what's the standard way of using functions; Set.new [1,2] or Set.new([1,2])? the docs are using diff conventions -_-'
<injekt> optikalmouse: your choice
<andrewvos> optikalmouse: I like to omit brackets
<injekt> the parenthesis are optional
<andrewvos> Some may call me a heathen
<optikalmouse> ok, brackets all the freaking time then.
<injekt> andrewvos: actually I think it's more common
<andrewvos> optikalmouse: NO
<andrewvos> optikalmouse: Brackets don't *do anything*
<optikalmouse> andrewvos: so?
<optikalmouse> :D
<andrewvos> :/
<injekt> I personally use them in most places
<andrewvos> Well, I tend to use brackets if I have more than two/three parameters. But, if I have more than two or three parameters then my code is shit anyway.
<injekt> heh
<injekt> anyone alive who uses slop?
<shevy> injekt it's on my todo list next time I have to use OptionParser!
<injekt> :)
<andrewvos> injekt: Just use ARGV
<andrewvos> injekt: Seriously
<andrewvos> It's not so fucking hard
<andrewvos> All those other tools give you is a false sense of security
<andrewvos> Then when you want to do something cool, they fuck you
<injekt> what does using ARGV have to do with option parsing?
<injekt> and I disagree
<injekt> 'do something cool', slop hasn't yet stopped me from doing what I want
<shevy> ARGV is annoying, I remember when I started ruby I even had methods that directly used ARGV inside
<andrewvos> Yeah I tend to exaggerate
<andrewvos> It's just an array though. It's not that hard.
<injekt> sure, but to allow different option formats you need to parse each item
<injekt> ARGV is fine if you're building something yourself for a single intended use
<injekt> if you want to support a broad format, and remove a ton of code you'll no doubt be repeating, option parsers are nice
<jorgenpt> Man, I was totally switching to this window to get some suggestions for option parsing to use in place of args4j
<jorgenpt> Totally trying out slop for it.
<shevy> I think it even has more documentation than OptionParser
<injekt> not sure about that, but the API is tiny compared to optparse, it's less than half the LOC
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-99-41.lnse4.ken.bigpond.net.au] has joined #ruby-lang
brianpWins_ [brianpWins_!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-99-41.lnse4.ken.bigpond.net.au] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-136-201.aei.ca] has joined #ruby-lang