Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
xiaotian [xiaotian!~guoxiaoti@4.30.138.134] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46.64.51.175] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has quit [#ruby]
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
ejholmes_ [ejholmes_!~ericholme@adsl-71-135-243-54.dsl.pltn13.pacbell.net] has joined #ruby
ezyang [ezyang!~ezyang@DR-WILY.MIT.EDU] has joined #ruby
nobitanobi [nobitanobi!~novito@173-164-143-45-SFBA.hfc.comcastbusiness.net] has joined #ruby
<nobitanobi> how do I check if an object has a particular method/attribute? To avoid getting undefined method `X' for
<ezyang> Hey folks, suppose I have an expression Foo::Bar, and I want to write a new version which takes x = "Foo" and refers to $x::Bar (but not spelled that way)
Blazento [Blazento!~john@cpe-74-64-49-223.nyc.res.rr.com] has joined #ruby
<wallerdev> nobitanobi: you can use Object#responds_to?
<wallerdev> ezyang: you can use Object.const_get
<wallerdev> for example Object.const_get(x)::Bar
ericmuyser [ericmuyser!~ericmuyse@96.53.68.138] has joined #ruby
pac1 [pac1!~pac1@pool-96-233-75-235.bstnma.fios.verizon.net] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:c91e:92c3:5e38:66d] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@c-24-99-112-216.hsd1.ga.comcast.net] has joined #ruby
andrewhl [andrewhl!~andrew@24.246.14.26] has joined #ruby
Illiux [Illiux!~nol@mc-wireless-pittnet-150-212-11-30.wireless.pitt.edu] has joined #ruby
evantravers [evantravers!~textual@h52.152.191.173.dynamic.ip.windstream.net] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
nathaniel_e [nathaniel_e!~nathaniel@199-83-220-28.PUBLIC.monkeybrains.net] has joined #ruby
<nathaniel_e> anybody have any answers??
<banistergalaxy> nathaniel_e: ask yoru question
markt_ [markt_!~chatzilla@210.10.112.34] has joined #ruby
<nathaniel_e> if i am in an irb session and open a statement that needs closing
<nathaniel_e> is there a way to simply cancel the statement ?
<nathaniel_e> withouth having to exit the session
nvez [nvez!~textual@76.65.62.36] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
yakko [yakko!~quassel@186.214.145.214] has joined #ruby
<tubgoat_> hash = { "foo" => "bar", "bar" => "baz" }
<tubgoat_> hash2 = { "baz" => "foo", hash }
<banistergalaxy> nathaniel_e: ^D
<tubgoat_> how do i do what i'm trying to do?
taipres [taipres!~taipres@2001:5c0:1400:a::251] has joined #ruby
<tubgoat_> (if that makes sense)
<banistergalaxy> nathaniel_e: or in ^C, or you could use http://pry.github.com instead which has lots of support for that kind of thing :PPPP
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<nathaniel_e> i am using pry
<nathaniel_e> figured it would be the same thing on both
<banistergalaxy> nathaniel_e: it's not the same thing :)
<banistergalaxy> nathaniel_e: in pry, you can type ! on a line by itself to end the expression
<banistergalaxy> nathaniel_e: or ^D
<banistergalaxy> nathaniel_e: but why didnt u read the wiki for pry?
<banistergalaxy> nathaniel_e: it explains all this stuff
<nathaniel_e> ^D seems to be equivalent to running exit
daglees [daglees!~belvedere@178.238.185.26] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
<banistergalaxy> nathaniel_e: no, INSIDE AN expresssion ^D clears the input buffer
<nathaniel_e> ! works though
<nathaniel_e> ohhh
<banistergalaxy> outside an expression it exits
<nathaniel_e> thank you so much banistergalaxy - this helps a lot
<nathaniel_e> i'll be sure to rtfm next time :P
<banistergalaxy> nathaniel_e: read this https://github.com/pry/pry/wiki/User-Input
<banistergalaxy> we dont mention ^D there yet tho :/ but we do mention !
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<nathaniel_e> ahh
<nathaniel_e> 'clearing the input buffer' seems to be a much better way to describe what i was looking for
<nathaniel_e> just had trouble putting my thoughts into english
<banistergalaxy> nathaniel_e: rather than clearing input buffer u can just fix it inside an editor
<banistergalaxy> nathaniel_e: by typing 'edit'
<banistergalaxy> nathaniel_e: or amend the broken line by using amend-line
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
<nathaniel_e> the amend line is pretty awesome!
nvez [nvez!~textual@bas1-montreal54-1279344164.dsl.bell.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
jgreene [jgreene!~jgreene@c-71-202-22-12.hsd1.ca.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
Mekkis [Mekkis!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
OKTOKT [OKTOKT!~Evan@68.145.186.169] has joined #ruby
banistergalaxy [banistergalaxy!~baniseter@118.82.185.158] has joined #ruby
thams [thams!~Adium@c-67-169-49-1.hsd1.ca.comcast.net] has joined #ruby
kuzushi [kuzushi!~kuzushi@ip72-201-117-166.ph.ph.cox.net] has joined #ruby
samsonjs_ [samsonjs_!~samsonjs@S01060026f31b8198.gv.shawcable.net] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
<thams> What is this syntax, the "->" in particular? service.forecastFor ->{puts "Do stuff"}, ->{puts "handling errors"}
<banistergalaxy> thams: lambda
<thams> Ah, that's it? A ruby 1.9 thing?
zomgbie [zomgbie!~jesus@85-127-216-157.dynamic.xdsl-line.inode.at] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@ool-4571cba8.dyn.optonline.net] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@pdpc/supporter/active/mikeycgto] has joined #ruby
sbanwart [sbanwart!~sbanwart@99.177.126.136] has joined #ruby
byronb [byronb!~byronb@c-24-18-227-118.hsd1.wa.comcast.net] has joined #ruby
<banistergalaxy> thams: yeah
<thams> banistergalaxy: thanks
<banistergalaxy> thams: it has diff syntax for passing params tho
<thams> thx.
<banistergalaxy> thomasfedb: it's ->(x, y) { puts [x, y] } not -> { |x, y| puts [x, y] }
enherit [enherit!~enherit@66-214-13-183.dhcp.lnbh.ca.charter.com] has joined #ruby
<banistergalaxy> that gets me a lot
<thams> oh, that would goof me up too.
ezyang [ezyang!~ezyang@DR-WILY.MIT.EDU] has quit [#ruby]
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
tobyo [tobyo!~tobyo@cpe-24-165-22-166.san.res.rr.com] has joined #ruby
<regedarek> hi guys
Seuss [Seuss!~seuss@unaffiliated/seuss] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has joined #ruby
sbanwart [sbanwart!~sbanwart@99.177.126.136] has joined #ruby
<regedarek> anybody could help me with some simple tests for ruby gem :)?
wookiehangover [wookiehangover!~wookiehan@c-67-161-138-118.hsd1.co.comcast.net] has joined #ruby
<nobitanobi> I need to pass a parameter to a function that is something like this: :zip_code => current_user.zip_code
<nobitanobi> What;s the best way of passing nil in case current_user.zip_code doesn't exist?
<nobitanobi> So avoid trying to get zip_code if doesn't exist, and pass nil if that happens
<Ryan_28> :zip_code => (current_user.zip_code ? current_user.zip_code : nil)
<Ryan_28> Something like that could work probably nobitanobi
<ged> nobitanobi: Return nil from #zip_code if it doesn't exist.
<nobitanobi> awesome
<Ryan_28> Or if zip_code if a function you control you can just return nil from there.
<ged> Unless it's raising an exception now, it's likely returning nil already.
txa-ea [txa-ea!~txa-ea@S010600259c30d289.gv.shawcable.net] has joined #ruby
<nobitanobi> it's raising no method error
<regedarek> https://gist.github.com/1756398 i would like to test connection via faraday, hot to handle with this?
<ged> Ah, you want: current_user.respond_to?(:zip_code) ? current_user.zip_code : nil
<Ryan_28> nobitanobi: What ged said
<nobitanobi> that's right
<nobitanobi> thanks
<nobitanobi> guys
<Ryan_28> no worries
nari [nari!~nari@2001:268:306:1:f2de:f1ff:fe55:2de0] has joined #ruby
porco [porco!~porco@123.114.49.229] has joined #ruby
toastedmilk [toastedmilk!~toastedmi@74-45-193-53.dr01.lmrs.ia.frontiernet.net] has joined #ruby
chimkan [chimkan!~chimkan@206.248.173.91] has joined #ruby
<toastedmilk> I'm having trouble understanding how ruby handles arrays. With an array of four elements: 'a', 'b', 'c', and 'd', how does both array[2,2] and array[2,20] give me the 2nd and 3rd(3rd and 4th) elements?
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<toastedmilk> If array[2,2] is giving me the 2nd and 3rd element, i would imagine array[2,20] would give me the 2nd and 20th(1st element, or 'b'), however array[2,20] is giving me 'c' and 'd'
<savage-> toastedmilk: the second argument to Array#[] is just the # of elements to return
<savage-> so array[2,2] is saying starting at element 2, give me 2 elements
ericmuyser [ericmuyser!~ericmuyse@S0106bcaec5c36658.vf.shawcable.net] has joined #ruby
<savage-> and array[2,20] is saying starting at element 2, give me 20
<savage-> and of course it can only give what the array contains, so you get back the last two in your example.
<toastedmilk> ah, so it cuts out 20 because there aren't 20 to give
<toastedmilk> here i thought it was extending the array to 20 elements(or giving a repeat of 'a', 'b', 'c', 'd')
h4mz1d [h4mz1d!~hamfz@DHCP-215-081.wireless-resnet.ua.edu] has joined #ruby
superguenter [superguenter!~Adium@205.233.39.2] has quit [#ruby]
chimkan [chimkan!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby
superguenter [superguenter!~Adium@205.233.39.2] has joined #ruby
Wizecoder [Wizecoder!~aengus@adsl-76-254-47-88.dsl.pltn13.sbcglobal.net] has joined #ruby
Rishi- [Rishi-!~Rishi@ool-18e40d77.dyn.optonline.net] has joined #ruby
Michael [Michael!~Michael@c-24-143-98-123.customer.broadstripe.net] has joined #ruby
samsonjs [samsonjs!~samsonjs@184.66.154.246] has joined #ruby
<Guest19336> I have a string with 20 lines, containing 20 integers. I want to split this string up into 20 arrays, containg 20 integers each. I tried doing rows = grid.split('\n') but that didn't work
<Guest19336> any advice?
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<methoddk> what do you guys think is a great platform for a fairly large web app? It would be doing a lot of calculations and managing a customer database, inventory, etc.
sythe [sythe!~quassel@70.49.107.79] has joined #ruby
<sythe> HELP ME!!!!!!!
* sythe sighs.
namidark [namidark!~namidark@c-98-230-1-143.hsd1.fl.comcast.net] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<Ryan_28> sythe: What?
<sythe> I really need someone who knows Ruby to help me out, right now...
<Ryan_28> sythe: The best thing to do is ask something, and if someone can help you they'll respond.
<sythe> True.
_|christian|_ [_|christian|_!~christian@190.235.106.74] has joined #ruby
<toastedmilk> sythe you mean 1.
<sythe> 1?
davidcelis [davidcelis!~david@76.115.58.79] has joined #ruby
<toastedmilk> sythe nevermind, bool joke
<sythe> Hah.
<sythe> I get it.
<toastedmilk> :)
<toastedmilk> except, not so translatable into ruby, it actually has 'True' as a bool expression
<sythe> Seriously, though...I just need someone who knows Ruby to help out with my FOSS game's Redmine/Chiliproject installation
<sythe> There's some stuff that non-Ruby-ers (like me) just can't do
<sythe> Mostly stuff like porting plugins to newer versions of Redmine
<sythe> Customizing Redmine/Chili, making plugins...etc.
<toastedmilk> sythe well, what specifically is your issue? we'd need code to look at or an example to reference to provide assistance
<Ryan_28> I wish I could help sythe, but I'm fairly new to the Ruby world myself.
<sythe> Well, ATM, I'm trying to integrate Git and Chiliproject (Chili = 100% Ruby)
<sythe> I haven't had much luck in their IRC
<toastedmilk> sythe: and your trouble lies where?
<sythe> Not sure, exactly...probably Git...
<toastedmilk> sythe: okay, but you can see how I have no way to help with that, right?
<toastedmilk> sythe: we'd need something to look at or reference.
<sythe> Very true.
<sythe> Hm...
<toastedmilk> Hell, if you can hone-in on your problem, you might even find where to look for your fix.
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<sythe> Exactly.
<sythe> The annoying/frustrating thing is that I seem to have done everything right.
dkastner [dkastner!~dkastner@69.89.102.253] has joined #ruby
BSaboia [BSaboia!~brunosabo@186.213.18.207] has joined #ruby
BSaboia__ [BSaboia__!~brunosabo@186.213.18.207] has joined #ruby
yakko [yakko!~quassel@186.214.145.214] has joined #ruby
<toastedmilk> sythe: so are you having trouble connecting to git, or where does the error lie?
SeanLazer [SeanLazer!~seanrober@d24-141-167-21.home.cgocable.net] has joined #ruby
Ownatik [Ownatik!~yoyoyoy@8-118.tr.cgocable.ca] has joined #ruby
ckrailo [ckrailo!~ckrailo@utdpat242007.utdallas.edu] has joined #ruby
<sythe> Well...I just get a 404 error..and the repository seems to be working
<sythe> How does Ruby deal with permissions?
<toastedmilk> sythe: in what context? - I'd imagine that'd be up to the host, eh? You'd store whatever 'permissions' you'd need to access in variable form.
<sythe> Hm
Gekz [Gekz!~gekz@115-64-60-202.static.tpgi.com.au] has joined #ruby
Gekz [Gekz!~gekz@unaffiliated/gekz] has joined #ruby
<toastedmilk> Eh, the fix is written in that thread.
<toastedmilk> it's an SVN issue.
<toastedmilk> sythe: also see this if that fix isn't working for you haknick.tumblr.com/post/2380507902/redmine-svn-subversion-certificate-issue-ubuntu
<sythe> Except...I'm using Git.
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-rmwjepzasbpewpyx] has joined #ruby
<toastedmilk> sythe: so you're using Git to have Chiliproject connect to Git?
<sythe> Actually
<sythe> I'm using a plugin!
<sythe> Which is Ruby!
<sythe> So...yeah.
<toastedmilk> sythe: So you're using a ruby plugin to connect Chiliproject with Git, correct?
<sythe> Yep
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<sythe> Actually, nope...Git and Chili should connect together w/o the plugin
<sythe> The plugin just implements post-receive hooks to push changes from a Github repo to Chili's repository
<toastedmilk> sythe: that was supposed to read "is this"
<sythe> Nope, not that.
<sythe> You're being very helpful, toastedmilk
<sythe> I appreciate it
<toastedmilk> sythe: heh, haven't come up with any answers but I'm lookin' - you're more than welcome i guess xD
<sythe> The people in #git are really...jerks.
BSaboia [BSaboia!~brunosabo@186.213.18.207] has joined #ruby
<toastedmilk> sythe: they're just uptight hipsters of another form
<toastedmilk> sythe: instead of music it's programming - way of the world, i guess
<toastedmilk> sythe: any error reporting you can provide via a paste to see the issue?
<sythe> Well...
<toastedmilk> sythe: also, I'm posting this to be sure: http://pastebin.com/1iBKRxXM - installation of redmine plugin - some pretty specific stuff here
<sythe> Yeah, true.
<toastedmilk> And you do have Git 1.5 or above available from command line, right?
<sythe> Yep, I believe so
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<toastedmilk> sythe: well look those over(and reinstall redmine if you have to), let me know.
marknyc [marknyc!~Grom@207-237-59-125.c3-0.elm-ubr1.qens-elm.ny.cable.rcn.com] has joined #ruby
freakz [freakz!~freakz@177.27.246.89] has joined #ruby
gentz_ [gentz_!ilab@ancient.webfoundation.net] has joined #ruby
<toastedmilk> sythe: you may also be interested in reading: http://www.redmine.org/projects/redmine/wiki/Plugins
<sythe> Thanks, toastedmilk
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
Rishi- [Rishi-!~Rishi@ool-18e40d77.dyn.optonline.net] has joined #ruby
freakz [freakz!~freakz@177.27.246.89] has quit ["WeeChat 0.3.6"]
award85 [award85!~itsame@69.181.38.133] has joined #ruby
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
nerdy [nerdy!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
byronb [byronb!~byronb@63-226-218-173.tukw.qwest.net] has joined #ruby
seivan [seivan!~seivan@bb115-66-151-111.singnet.com.sg] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
kf8a [kf8a!~kf8a@dslfw4.mei.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
sythe [sythe!~quassel@facade/leader] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
kenperkins [kenperkins!~textual@131.107.32.25] has joined #ruby
savage-_ [savage-_!~savage_@istep.static.monkeybrains.net] has joined #ruby
banistergalaxy [banistergalaxy!~baniseter@118.82.185.158] has joined #ruby
seivan [seivan!~seivan@bb115-66-151-111.singnet.com.sg] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
lewis1711 [lewis1711!~lewis@121-79-208-160.dsl.sta.inspire.net.nz] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
radic [radic!~radic@dslb-094-216-254-154.pools.arcor-ip.net] has joined #ruby
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
<ozzloy> never mind, i fixed it without having to deal with encoding stuff
<ozzloy> woops
<shevy> ozzloy getting confused about the channels eh ;)
<ozzloy> yeah, i tried asking why there are several before
<ozzloy> and surveying the people in each channel about what they used each channel for
<shevy> I think historic reasons
<ozzloy> but i got some smartasses ruining it
<shevy> #ruby-lang is the official one though
<ozzloy> this one has 1.5 times as many nicks
<ozzloy> and there's a lot of overlap
<ozzloy> people in both
<shevy> yeah more people in here
<shevy> but then again, some who are on #ruby-lang are not here, and vice versa
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
<ozzloy> yep
<sythe> I came here to talk about polished red gemstones!
<ozzloy> which makes it almost-but-not-quite possible to just use this room
<sythe> What is this?!
<sythe> XD
<shevy> in general, #ruby has a higher frequency, #ruby-lang often has the better quality (but not always, after all they tend to idle more too)
<shevy> sythe, hey
<shevy> aluminiumoxide
<lewis1711> the important thing is, that unlike #python, you can say "lol" here
<shevy> conundrum comes in two version - sapphire & ruby
<shevy> sythe, see? we folks learn the classical minerals in #ruby too!
<shevy> lewis1711, yeah and you must register on freenode to join #python I think
<shevy> but python has one cool thing going for it
<shevy> you can join it and ask "ssSzszs sshs szss?" and get a meaningful reply
<shevy> try that here!
<lewis1711> I don't get it
<lewis1711> wait is that a snake noise?
<shevy> haha
<sythe> Yep/
<shevy> yeah
<wallerdev> tubgoat_: you probably want Hash#merge
<wallerdev> my bad
<shevy> this joke never gets old for me
<wallerdev> buffered haha
<lewis1711> lol. for shame!
<sythe> For all you 3D modellers: pina.dae
<lewis1711> oh yeah, the reason I'm here - is there anyway to write code that generates code in ruby?
<lewis1711> I want to generate a case statement
<shevy> lewis1711 well ... you can write files in ruby, so you can write bla.rb scripts too
ejholmes_ [ejholmes_!~ericholme@adsl-71-135-243-54.dsl.pltn13.pacbell.net] has quit [#ruby]
<shevy> yeah you can automatically generate your case statement
<shevy> just use a specific .rb file for it
<shevy> I could recommend... case.rb as its name :P
<lewis1711> I guess that's one way of doing it
<wallerdev> why would you automatically generate a case statement when you could just use a hash
<shevy> wallerdev how do you use aliases in a hash like:
<shevy> when 'foobar','foo','fo','f'
<wallerdev> you'd have 4 hash keys pointing to the same thing haha
<shevy> hehe
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
<lewis1711> wallerdev: this is for keycodes and corresponding actions. for a hash I'd need to set a default "no key is pressed therefore do nothing" lambda, ->{}, and call that continuously in a while loop
<lewis1711> I guess that might not slow things down..
<shevy> what I'd love to have would be a smarter case statement. something like "fetch all first entries of a case/when structure"
<shevy> wah!
<shevy> the -> !
<shevy> run!!!
<wallerdev> itd probably be faster than evading a case statement
<wallerdev> lol
<wallerdev> evaling*
<lewis1711> guess I should try it, I just get the feeling it'll lock up the machine
<lewis1711> but i'll give it a shot
<shevy> I think that won't be too slow
<shevy> but I wanna see the finished version and test :)
<shevy> especially when you use ->
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<shevy> I am collecting these things
<wallerdev> you're collecting stabby blocks?
SegFaultAX [SegFaultAX!~SegFaultA@c-98-248-241-85.hsd1.ca.comcast.net] has joined #ruby
<wallerdev> banistergalaxy: i was playing super mario galaxy 2 today
<banistergalaxy> wallerdev: ok, my nick is after samsung galaxy s2 :)
<wallerdev> I'm ruby and what is this?
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
<wallerdev> id rather play super mario galaxy than samsung galaxy
nobitanobi [nobitanobi!~novito@c-98-248-35-121.hsd1.ca.comcast.net] has joined #ruby
<shevy> wallerdev haha yeah. or rather all sorts of ruby-esqe 1.9 thingies
<banistergalaxy> wallerdev: implementing C switch statement in ruby for the lulz
<shevy> but ever since petercooper did his testing framework with "->{}" I am mightly impressed about "->{}" while still hating it
<wallerdev> banistergalaxy: yeah thats what it looks like haha
<banistergalaxy> wallerdev: it has fall-through (of course) and default cases
sayakb [sayakb!sayakb@bnc.kollide.net] has joined #ruby
sayakb [sayakb!sayakb@kde/sayakb] has joined #ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
<banistergalaxy> but 0 of the performance characterstics hehe
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
Kichael [Kichael!~Kichael@70-36-49-167.dyn.novuscom.net] has joined #ruby
chimkan [chimkan!~chimkan@184.175.39.28] has joined #ruby
MrGando [MrGando!~MrGando@pc-137-179-83-200.cm.vtr.net] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
speerfissure [speerfissure!~speer@68-184-98-44.dhcp.dgls.ga.charter.com] has joined #ruby
Asher [Asher!~asher@98.158.127.150] has joined #ruby
i0n [i0n!~i0n@unaffiliated/evilsushi] has joined #ruby
nobitanobi1 [nobitanobi1!~novito@c-98-248-35-121.hsd1.ca.comcast.net] has joined #ruby
danishkhan [danishkhan!~danishkha@c-71-198-248-234.hsd1.ca.comcast.net] has joined #ruby
vdvluc [vdvluc!~vdvluc@lwm29c8.xs4all.nl] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
CodeZombie [CodeZombie!~CodeZombi@65.19.245.153] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
wereHamster [wereHamster!~tomc@unaffiliated/werehamster] has joined #ruby
flashuni [flashuni!~textual@adsl-70-136-253-158.dsl.scrm01.sbcglobal.net] has joined #ruby
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
phantomfake [phantomfake!~ivsi@pool-71-190-229-236.nycmny.fios.verizon.net] has joined #ruby
radic [radic!~radic@dslb-094-216-236-172.pools.arcor-ip.net] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
Transformer [Transformer!~Transform@ool-4a59e397.dyn.optonline.net] has joined #ruby
freezey [freezey!~anthony@ool-ae2c8068.dyn.optonline.net] has joined #ruby
Dreamer3 [Dreamer3!~Dreamer3@74-134-33-91.dhcp.insightbb.com] has joined #ruby
<freezey> hey not sure if i am doing this right but.. http://pastie.org/private/e27minb50lctf4lf8eauyw … i can push multiple -p options but for some reason every time i try to push multiple -g parse': invalid argument:
jayeffess [jayeffess!~jfs@c-65-96-213-90.hsd1.ma.comcast.net] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
lewis1711 [lewis1711!~lewis@121-79-208-160.dsl.sta.inspire.net.nz] has quit ["Leaving."]
Slina [Slina!~skylar@pool-173-79-236-7.washdc.fios.verizon.net] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
ckrailo [ckrailo!~ckrailo@pool-71-97-77-8.dfw.dsl-w.verizon.net] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-nktehbtxsljvnoti] has joined #ruby
panthrodeb [panthrodeb!~panthrode@200.58.70.5] has joined #ruby
droptone [droptone!droptone@KimJongIllLooksAtThings.com] has joined #ruby
mikeric [mikeric!~mike@24.84.47.18] has joined #ruby
tesmar [tesmar!~tesmar@cpe-024-163-059-067.nc.res.rr.com] has joined #ruby
gh [gh!~gh@unaffiliated/gh] has joined #ruby
ascarter [ascarter!~ascarter@209.180.212.112] has joined #ruby
<shadoi> Trying to understand delegation…. if you delegate something to a module method, wouldn't it be equivalent to just including that module?
<shadoi> Or is it a way to cherry-pick behaviors without including a whole module?
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
danishkhan [danishkhan!~danishkha@c-71-198-248-234.hsd1.ca.comcast.net] has joined #ruby
nobitanobi [nobitanobi!~novito@c-98-248-35-121.hsd1.ca.comcast.net] has joined #ruby
<shadoi> I guess it lets you rename things to be more implementation specific…. *shrug*
<banistergalaxy> shadoi: u typically delegate to objects, not modules
<Boohbah> alias is the way to rename things
<banistergalaxy> shadoi: no the purpose of delegation is more flexibility
<banistergalaxy> as you can swap in and swap out the delegatee object at runtime
stringoO [stringoO!~JLstring@bas1-toronto42-1279599960.dsl.bell.ca] has joined #ruby
<shadoi> banistergalaxy: ah so having default behaviors that a delegate can override more cleanly.
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
<banistergalaxy> not sure what u mean
<shadoi> I guess that's nicer than using super() and modifying the result.
<shadoi> I do that for composition where I need to override the superclass method
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
<Slina> Hi. I'm trying to use Thin with my Rails app, but when I run `thin start`, I get an exception. http://pastebin.com/4YL8Nda3
<shadoi> maybe I'm still missing the point.
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<shadoi> oh.. duh, I get it.
<shadoi> Choosing at runtime which functionality to provide for an object's methods.
<freezey> yeah i don't get my part
<shadoi> freezey: you need to wrap all that in a block
<freezey> shadoi: ?
<shadoi> OptionParser.new do |opts|
<freezey> shadoi: i have a bunch more code surrounding that and it all works.. my thing is when i pass multiple -p classname that works fine.. but when i do multiple -g security it fails
<freezey> shadoi: maybe i should show you the whole thing 1 sec
Slina [Slina!~skylar@pool-173-79-236-7.washdc.fios.verizon.net] has quit [#ruby]
csherin [csherin!~csherin@61.17.32.84] has joined #ruby
<Rishi-> rails newbiw here, Am I better off creating a custom store for my small ecommerce solution. I intend to sell wordpress themes and some tshirts and prints.
VoiDeT [VoiDeT!~voidet@bigfis8.lnk.telstra.net] has joined #ruby
<VoiDeT> in an each loop, what would be the way to continue the loop and ignore the rest of the block
<shadoi> freezey: it's probably the format argument "=PARAMETER=VALUE" vs "=SECURITY-GROUP", not sure though
<freezey> shadoi: yeah i am unsure also
<freezey> shadoi: any ideas?
<shadoi> freezey: what's the error output?
<shadoi> freezey: btw, you know there are other rubygems out there for doing this stuff with EC2 right?
<freezey> yeah i am just used to fog
gokul [gokul!~gokulnath@115.111.177.122] has joined #ruby
<shadoi> right, but I mean CLI utilities that do exactly this stuff
<freezey> yeah and i have the utility wrapped into this
<freezey> thats the error
<freezey> its the first group i push to it
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-cwgihsboophgvamg] has joined #ruby
<freezey> but when i revert to my old code.. i can push just 1 security group no more than that
<shadoi> freezey: you want the last one to win or what?
<freezey> shadoi: i would like for it to accept each one i push.. -g security1 -g security2 -g security3
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
<shadoi> you probably need to be appending them to an array then
pp01bit [pp01bit!~pp01bitDo@111.92.240.242] has joined #ruby
<freezey> example maybe?
<shadoi> also, in your code you're splitting it like it was a =PARAM=VALUE pair, but it's not.
<shadoi> you just want something like: options_hash[:security_groups] << val
<freezey> so i have append that to my original line of opts.on("-g", "=SECURITY-GROUP", "Use SECURITY-GROUP (default default)") {|val| security_group= val}?
<shadoi> that sets it to each consecutive one you specify, but doesn't keep them all.
<freezey> yeah
<freezey> so to keep them all?
<freezey> i am new to ruby so i am still figuring this out
<shadoi> so make security_groups = [] (an array)
<freezey> first ruby script is this
<shadoi> and do: security_groups << val
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-jalefiegygokosje] has joined #ruby
<freezey> right
<freezey> haha
<shadoi> freezey: ^^
<freezey> ahhh
<shadoi> You can also make -g an Array type, and allow comma-separate groups, etc.
<shadoi> separated*
<shadoi> opts.on("--list x,y,z", Array, …
<freezey> yeah thats what i was trying to do earlier
kp666 [kp666!~kp666@115.111.177.122] has joined #ruby
<freezey> was make them comma separate groups
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
<newbold_cloud> so does OS X not have cron at all?
<newbold_cloud> er
<newbold_cloud> sorry, wrong channel
<freezey> shadoi: yeah this is with 2.7.x
m0nki3 [m0nki3!~c0wCr@gateway/tor-sasl/m4tastati] has joined #ruby
<freezey> i am running foreman as an ENC which only works with 2.6.4
<shadoi> ah.
<shadoi> that's lame. :)
<shadoi> make him update foreman.
<shadoi> freezey: it's pretty likely that modifying that stuff to work with 2.6.4 would be as easy, or maybe easier than doing this all yourself. ;)
<freezey> hahaha yeah probably
<shadoi> anyway, good luck
<freezey> thanks man
pencilcheck [pencilcheck!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
<banistergalaxy> can someone give me a regex that matches all strings except ones that begin with '-' ?
danishkhan [danishkhan!~danishkha@c-71-198-248-234.hsd1.ca.comcast.net] has joined #ruby
cableray [cableray!~cableray@wl-dhcp159-213.Mines.EDU] has joined #ruby
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has quit [#ruby]
cmdlrn [cmdlrn!~puppy@125-239-187-192.jetstream.xtra.co.nz] has joined #ruby
<kp666> @banistergalaxy /\A[^-]/
amerine [amerine!~mturner@216.228.171.197] has joined #ruby
<methoddk> regex makes my head hurt
<banistergalaxy> kp666: thanks, but it has to be a string of alphabet characters, i dont want it to match numbers too lke "0" it should not match
<banistergalaxy> sorr i didnt make that clear
sjang [sjang!~Adium@209.119.253.66] has quit [#ruby]
sjang [sjang!~Adium@209.119.253.66] has joined #ruby
<sjang> Try this: /(^[^\-].*$|^$)/
<sjang> Well… never mind.
cobragoat [cobragoat!~cobragoat@50.0.128.82] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby
<kp666> @banistergalaxy u mean something like this /^[a-zA-Z_]*$/ ??
decentrality [decentrality!~decentral@static-50-53-4-236.bvtn.or.frontiernet.net] has joined #ruby
snip_it [snip_it!~snip_it@c-98-245-121-66.hsd1.co.comcast.net] has joined #ruby
<kp666> @banistergalaxy try this : /^[^-][^0-9][a-z]*$/
<kp666> or ^[^-][^0-9][a-zA-Z]*$
<banistergalaxy> kp666: thanks
nobitanobi [nobitanobi!~novito@c-98-248-35-121.hsd1.ca.comcast.net] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
<GSpotAssassin> newbold_cloud: OS X has cron, but Apple came up with its own init.d type process that also assumes all cron responsibilities
<GSpotAssassin> newbold_cloud: But the cron daemon is still there
jsonperl [jsonperl!~Adium@c-67-175-4-137.hsd1.il.comcast.net] has joined #ruby
<banistergalaxy> kp666: why does this return nil? /^[^-][^0-9][a-z]/ =~ "a"
<GSpotAssassin> banistergalaxy: you're not making those first characters optional
<GSpotAssassin> [stuff][stuff] means "match something"
<GSpotAssassin> like [^-] means "match a character that is not a hyphen" and then you don't specify a count of +, * or {i,j} after it so it assumes you are looking for exactly 1 character that is not a hyphen
<banistergalaxy> GSpotAssassin: I want to be able to match only words that dont start with '-' (i dont awnt to match numbers either, so -4 or 4 is a no match, but "hello" is a match and "-h" is a no match"
<banistergalaxy> )
<jsonperl> can anyone shed any light on this:
<jsonperl> [BUG] Stack consistency error (sp: 52, bp: 53)
<jsonperl> what does [BUG] indicate… like a known bug in ruby or something?
<banistergalaxy> jsonperl: segfault
<banistergalaxy> jsonperl: usually
<banistergalaxy> jsonperl: or just a core error in Ruby itself, it's either a bug in ruby core, or a bug in a C extension that is doing crzy shit
<jsonperl> well
<jsonperl> ...
<GSpotAssassin> banistergalaxy: so just do /^[^-].*$/, the only catch being that it will only match strings of at least 1 character
<jsonperl> it's my c extension
<jsonperl> that is doing crazy shit
<GSpotAssassin> banistergalaxy: I didn't include numbers there hold on
<jsonperl> it's really crap debug info though… any thoughts on how to go about debugging?
<banistergalaxy> jsonperl: use gdb
<GSpotAssassin> banistergalaxy: /^[^-][^0-9]*$/ I think
<banistergalaxy> GSpotAssassin: that sitll matches "0"
<banistergalaxy> ;)
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
<jsonperl> any idea what sp and bp represent?
<jsonperl> sp: 52, bp: 53
<banistergalaxy> jsonperl: stack pointer, base pointer
<GSpotAssassin> banistergalaxy: /^[^-0][^0-9]*$/ I think
<GSpotAssassin> lol
<GSpotAssassin> oh you may have to escape the hyphen, not sure
<banistergalaxy> GSpotAssassin: hehe, but i dont want it to match ANY nubers :P
<GSpotAssassin> banistergalaxy: /^[^\-0][^0-9]*$/ I think
<GSpotAssassin> banistergalaxy: /^[^\-0-9][^0-9]*$/ I think
<banistergalaxy> GSpotAssassin: but that still matches "2" right
<methoddk> i don't understand how it means NOT a hyphen
<GSpotAssassin> how about that
<banistergalaxy> GSpotAssassin: haha finally, i think that works! :P thanks
<GSpotAssassin> methoddk: [^ starts a "not in this set" matcher
<GSpotAssassin> banistergalaxy: it's still not perfect... but what in programming is. it should get you there tho. YW
<methoddk> so basically not a - not a number, anything else
<GSpotAssassin> [^\-0-9] means match any single character that is not a hyphen and not a digit
<GSpotAssassin> you can specify a range of characters so 0-9 is the set of digits
<methoddk> whats the /^
methoddk [methoddk!method@gateway/shell/xzibition.com/x-fpjdyahwppleckrq] has quit [#ruby]
methoddk [methoddk!method@gateway/shell/xzibition.com/x-fpjdyahwppleckrq] has joined #ruby
methoddk [methoddk!method@gateway/shell/xzibition.com/x-fpjdyahwppleckrq] has quit [#ruby]
methoddk [methoddk!method@gateway/shell/xzibition.com/x-fpjdyahwppleckrq] has joined #ruby
<GSpotAssassin> there is no /^
<methoddk> in the beginning
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<GSpotAssassin> there is only a [^ in the beginning. there's a backslash which escapes the hyphen so the regex parser won't try to interpret it as some kind of set of characters, it treats it like a "real" hyphen. It may not even be necessary
<GSpotAssassin> along the same lines, since a period in regex means "match any character", if you want to *actually* match a period you need to escape it with \.
<GSpotAssassin> escaping with backslash in almost all programming languages means "treat the character following the backslash as a literal thing"
<GSpotAssassin> like, don't try to parse it
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<GSpotAssassin> i gotta go to bed, have fun with regex... try this http://rubular.com/
savage- [savage-!~savage_@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
jsonperl [jsonperl!~Adium@c-67-175-4-137.hsd1.il.comcast.net] has quit [#ruby]
<methoddk> cool, thanks
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
<kp666> @banistergalaxy sorry was away...i just tried the expression in rubular and experimented :)
<GSpotAssassin> kp666: i picked up the slack. yay crowdsourced learning
<kp666> :)
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
Animawish [Animawish!~Adium@71-38-230-112.slkc.qwest.net] has joined #ruby
<Animawish> if I've got an array of arrays, barray = [["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]], how do I get, for instance, 1
<Animawish> barray[0[0]] doesn't seem to work
<rippa> barray[0][0]
<rippa> though you'll get "1"
<rippa> not 1
<Animawish> thanks :)
Nollo [Nollo!5545ce75@gateway/web/freenode/ip.85.69.206.117] has joined #ruby
daed [daed!~daed@daed.org] has joined #ruby
michaelh [michaelh!~Michael@c-98-213-112-209.hsd1.il.comcast.net] has joined #ruby
r126l [r126l!~ruwin126@120.142.67.254] has joined #ruby
bbrandon [bbrandon!~brandon@174.97.242.15] has joined #ruby
cook1es_ [cook1es_!~chatzilla@c83-248-93-185.bredband.comhem.se] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
koala_man [koala_man!vidar@vidarholen.net] has joined #ruby
koala_man [koala_man!vidar@unaffiliated/koala-man/x-2491903] has joined #ruby
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@ool-4571cba8.dyn.optonline.net] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@pdpc/supporter/active/mikeycgto] has joined #ruby
runa [runa!~asd@190.210.67.161] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
lenochka [lenochka!~elena@unaffiliated/lenochka] has joined #ruby
Karmaon [Karmaon!~john@gateway/tor-sasl/karmaon] has joined #ruby
<lenochka> hey, could someone explain how can I install tiny tds on windows?
<lenochka> i mean the gem
ezotrank [ezotrank!~ezotrank@218-70-52-95.baltnet.ru] has joined #ruby
hemanth [hemanth!~hemanth@121.244.159.130] has joined #ruby
<lenochka> when i try to connect to db it says connection is closed
<hemanth> i'm a gnu guy, some project here is demanding to port few libs to window$ platform, when installing few gems i'm getting an error 'ffi' native gem requires install build tools, even after getting the build tools, it's the same; what am i missing?
dwon [dwon!~dwon@75.119.251.37] has joined #ruby
mafolz [mafolz!~mafolz@134.96.50.207] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
c0rn [c0rn!~c0rn@173-228-119-218.dsl.dynamic.sonic.net] has joined #ruby
yxhuvud [yxhuvud!mongo@h-49-193.a212.priv.bahnhof.se] has joined #ruby
kp666 [kp666!~kp666@115.111.177.122] has joined #ruby
TheTFEF [TheTFEF!JS@unaffiliated/thetfef] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
raincole_ [raincole_!~raincole@220-134-147-126.HINET-IP.hinet.net] has joined #ruby
flippingbits [flippingbits!~anonymous@ip-81-210-178-39.unitymediagroup.de] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
lenochka [lenochka!~elena@unaffiliated/lenochka] has quit [#ruby]
clockwize [clockwize!~clockwize@239.137.125.91.dyn.plus.net] has joined #ruby
<shevy> hemanth hard to say
<shevy> I suppose it is trying to compile some C program?
<shevy> also you should say which gems
<hemanth> shevy, gem install watir
rweng [rweng!~robin@brln-4dbc782c.pool.mediaWays.net] has joined #ruby
enherit [enherit!~enherit@66-214-13-183.dhcp.lnbh.ca.charter.com] has joined #ruby
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
Dreamer3__ [Dreamer3__!~Dreamer3@74-134-33-91.dhcp.insightbb.com] has joined #ruby
GoBin [GoBin!~GoBin@193.175.11.148] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
moshee [moshee!~moshee@50.135.229.127] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
<shevy> aha no idea
<shevy> win32/api.c:2:21: fatal error: windows.h: No such file or directory
<shevy> but it seems to want to compile something
<shevy> I am on Linux
thone_ [thone_!~thone@g226051222.adsl.alicedsl.de] has joined #ruby
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
P4P4jUL137 [P4P4jUL137!~P4P4jUL13@c-24-23-183-131.hsd1.ca.comcast.net] has joined #ruby
clockwize [clockwize!~clockwize@239.137.125.91.dyn.plus.net] has joined #ruby
zomgbie [zomgbie!~jesus@213.162.68.15] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
trend [trend!~trend@76.91.169.147] has joined #ruby
nobitanobi [nobitanobi!~novito@c-98-248-35-121.hsd1.ca.comcast.net] has quit [#ruby]
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
ph^ [ph^!~ph^@79.135.7.162] has joined #ruby
bier [bier!~bier@p5085FEFB.dip.t-dialin.net] has joined #ruby
bertho_y [bertho_y!~bertho_y@163.5.130.14] has joined #ruby
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
ph^_ [ph^_!~ph^@79.135.7.162] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
stdcall [stdcall!~scriper@181.208.73.94.ip.orionnet.ru] has joined #ruby
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
Sliker [Sliker!~ponies@31.185.185.7] has joined #ruby
ph^ [ph^!~ph^@79.135.7.171] has joined #ruby
banistergalaxy [banistergalaxy!~baniseter@115.189.56.182] has joined #ruby
nd__ [nd__!~nd@mnhm-4d00e4fe.pool.mediaWays.net] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-xbqstogkugnktpjs] has joined #ruby
flippingbits [flippingbits!~anonymous@port-212-202-126-63.static.qsc.de] has joined #ruby
raincole_ [raincole_!~raincole@220.134.147.126] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
pstuteville [pstuteville!~pstutevil@c-24-23-183-131.hsd1.ca.comcast.net] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
cggaurav [cggaurav!~Adium@203.196.165.98] has joined #ruby
pstutevi1le [pstutevi1le!~pstutevil@c-24-23-183-131.hsd1.ca.comcast.net] has joined #ruby
batlock666 [batlock666!~batlock66@bvderbau.ugent.be] has joined #ruby
seivan [seivan!~seivan@cm58.eta90.maxonline.com.sg] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
cyri_ [cyri_!~cyri_@152.107.70.86.rev.sfr.net] has joined #ruby
raincole_ [raincole_!~raincole@220-134-147-126.HINET-IP.hinet.net] has joined #ruby
pstutevi1le [pstutevi1le!~pstutevil@c-24-23-183-131.hsd1.ca.comcast.net] has joined #ruby
twqla [twqla!~tweequla@ksdfw05.rightcompetence.com] has joined #ruby
stoffus [stoffus!~stoffus@2001:9b0:1:dead:b9af:4e48:57f2:5fb8] has joined #ruby
dkannan [dkannan!u480@gateway/web/irccloud.com/x-skdzmgywtbgmllok] has joined #ruby
burgestrand [burgestrand!~burgestra@dhcp-187030.eduroam.chalmers.se] has joined #ruby
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-hpeasmuschvccfik] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-diltnxecvhgcsbuu] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
blooberr [blooberr!u5163@gateway/web/irccloud.com/x-mbwqoeriyslrznwx] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-nveinnmxpvwdxvdd] has joined #ruby
<elliot98> what's the way to check a IO buffer to see if there is any data waiting to be read?
<elliot98> basically, need to read at 5 byte increments, and need to see if there are 5 bytes waiting to be read.
Narcissus [Narcissus!~Narcissus@144.124.16.20] has joined #ruby
rexamophone [rexamophone!u4239@gateway/web/irccloud.com/x-ofulppvhgipmslel] has joined #ruby
spanx [spanx!u1351@gateway/web/irccloud.com/x-xyunyupfuzpqltdt] has joined #ruby
si14 [si14!u2619@gateway/web/irccloud.com/x-ovepkrlrakfifwnz] has joined #ruby
david_w [david_w!~david_w@webgw0.mh.bbc.co.uk] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-iwzwctbonhxjtxpp] has joined #ruby
patricksroberts [patricksroberts!u3278@gateway/web/irccloud.com/x-xcekrzmylxksdrui] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
moeSeth [moeSeth!u1029@gateway/web/irccloud.com/x-equxnmorgxaghhsa] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-cuebtgdjqwtmuflf] has joined #ruby
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-olftmsgbagdrsmvw] has joined #ruby
pstuteville [pstuteville!~pstutevil@c-24-23-183-131.hsd1.ca.comcast.net] has joined #ruby
rexamophone [rexamophone!u4239@gateway/web/irccloud.com/x-cyebkhhpwtzwaepl] has joined #ruby
blooberr [blooberr!u5163@gateway/web/irccloud.com/x-tsqtalzaqdngqwwx] has joined #ruby
sei [sei!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
snearch [snearch!~snearch@e178056049.adsl.alicedsl.de] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
dotemacs [dotemacs!u801@gateway/web/irccloud.com/x-wzbnswfzcocpphtu] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
patricksroberts [patricksroberts!u3278@gateway/web/irccloud.com/x-wixbzawzaebbgzqq] has joined #ruby
FND [FND!~FND@p579A8906.dip.t-dialin.net] has joined #ruby
si14 [si14!u2619@gateway/web/irccloud.com/x-cifdlyrzlgpilfyr] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-ekjtzdrmmnpowdpq] has joined #ruby
tilde` [tilde`!~tilde@94.101.55.3] has joined #ruby
eka [eka!~eka@181.28.169.86] has joined #ruby
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-mofawnkmsmvstnaw] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
notbrent [notbrent!u5121@gateway/web/irccloud.com/x-lfmmoqfrebxhjhnw] has joined #ruby
arnihermann [arnihermann!u1395@gateway/web/irccloud.com/x-hhsqjmedcpusiyyk] has joined #ruby
tvw [tvw!~tv@e176001222.adsl.alicedsl.de] has joined #ruby
<hemanth> trying to toggle b/w ruby versions within the ruby script, any suggestions? RVM is not working as expected within the script
david_w [david_w!~david_w@gatej.thls.bbc.co.uk] has joined #ruby
manizzle [manizzle!~manizzle@pcp046799pcs.pcv.reshall.calpoly.edu] has joined #ruby
<banistergalaxy> hemanth: *inside* the script? u mean u want the script itself, while it is running, to change between different ruby versions lol?
tvo [tvo!~tvo@wlan-145-94-188-255.wlan.tudelft.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<hemanth> banistergalaxy, funny, but true :D
<banistergalaxy> hemanth: not actually possible to do this
<banistergalaxy> unless you're shelling out
<banistergalaxy> to run different stuff
<banistergalaxy> which doesnt really count
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby
<hemanth> as in forking a new process you mean?
<banistergalaxy> hemanth: yeah, that kind of thing
bluenemo [bluenemo!~bluenemo@g230187036.adsl.alicedsl.de] has joined #ruby
bluenemo [bluenemo!~bluenemo@unaffiliated/bluenemo] has joined #ruby
<hemanth> if there was 'rvm' gem to do this, it would have been fun
<banistergalaxy> hemanth: but you cant actually change the currently running ruby process to switch b/w diffeent versions
zommi_ [zommi_!quassel@nat/ibm/x-gqkydchmioksyzuk] has joined #ruby
<hemanth> banistergalaxy, say for the first time at least?
<hemanth> for example : if firefox version is < 10 use ruby 1.8 if not ruby 1.9
wobr [wobr!~william.o@87-194-166-48.bethere.co.uk] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatej.mh.bbc.co.uk] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
Brandonn [Brandonn!~brandon@cpe-174-097-242-015.nc.res.rr.com] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
djdb [djdb!~digitalbo@linux.minsk.tutby.com] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
<hemanth> burgestrand, RVM is not a function, selecting rubies with 'rvm use ...' will not work. it says on exec or system or ``
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
ChampS666 [ChampS666!~ChampS@p54B4DABD.dip.t-dialin.net] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
jbw_ [jbw_!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
seivan [seivan!~seivan@cm58.eta90.maxonline.com.sg] has joined #ruby
hemanth [hemanth!~hemanth@121.244.159.130] has joined #ruby
<paissad> is uploading ftp files synchronous or asynchronous ?
zommi [zommi!quassel@nat/ibm/x-fbrhreswplzpvkys] has joined #ruby
baniseterfiend` [baniseterfiend`!~baniseter@118.82.185.158] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
shevy [shevy!~shevy@91-113-90-64.adsl.highway.telekom.at] has joined #ruby
david_w__ [david_w__!~david_w@gatek.thls.bbc.co.uk] has joined #ruby
david_w [david_w!~david_w@gatej.thls.bbc.co.uk] has joined #ruby
<baniseterfiend`> burgestrand: you ever seen this show? http://i.imgur.com/di1rm.jpg
FND [FND!~FND@p579A8906.dip.t-dialin.net] has quit [#ruby]
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
workmad3 [workmad3!~workmad3@vpn187.its.manchester.ac.uk] has joined #ruby
eldariof [eldariof!~CLD@95.84.7.85] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby
seivan [seivan!~seivan@cm58.eta90.maxonline.com.sg] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<elliot98> I've got a deamon that periodically scans a port to see if any data is on the port, what is the way to check if data is available for reading without actually reading the data from the port?
<banisterfiend> elliot98: wtf is a deamon
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby
faber [faber!~faber@adsl-ull-4-193.50-151.net24.it] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
<elliot98> banisterfiend: daemon...gotta get that spellchecker in order
<elliot98> so what's the way to see how much data is waiting at the port, if only there is data, then pull it
jlebrech [jlebrech!~textual@host86-135-203-241.range86-135.btcentralplus.com] has joined #ruby
tk__ [tk__!~tk@p083005.doubleroute.jp] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<banisterfiend> elliot98: believe in yourself i guess
<banisterfiend> if u do that u can achieve anything
kp666 [kp666!~kp666@115.111.177.122] has joined #ruby
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
Emmanuel_Chanel [Emmanuel_Chanel!star2@L057107.ppp.dion.ne.jp] has joined #ruby
FND [FND!~FND@p579A8906.dip.t-dialin.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
Faris [Faris!~amnay@41.249.131.220] has joined #ruby
DefV [DefV!~Jan@node-hahmcop4no4a1ruk1w.ipv6.as30961.net] has joined #ruby
lenochka [lenochka!~elena@unaffiliated/lenochka] has joined #ruby
<lenochka> does anyone have any experience with tiny_tds here?
azbarcea__ [azbarcea__!~quassel@79.114.122.162] has joined #ruby
MrGando [MrGando!~MrGando@pc-137-179-83-200.cm.vtr.net] has joined #ruby
lenochka [lenochka!~elena@unaffiliated/lenochka] has quit [#ruby]
geofridh [geofridh!~geofridh@gateway/tor-sasl/geofridh] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<shevy> only with tiny_penises
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
ZachBeta [ZachBeta!~ZachBeta@ip68-224-204-228.ri.ri.cox.net] has joined #ruby
runeb [runeb!~runeb@77.40.155.28] has joined #ruby
lterje [lterje!~lterje@cm-84.215.149.163.getinternet.no] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<bloony> hows does ruby compare with python on performance?
<JonnieCache> omg ive just found out about chmod +X
<JonnieCache> the capital X sets the execute bit only on directories and not files. hallelujah!
<JonnieCache> another situation in which i can get rid of the ugly old find command
<wobr> elliot98: I believe you want IO.select
<JonnieCache> bloony: neither of them are super fast, python is faster than ruby in many situations
<JonnieCache> (with the standard interpreters)
<bloony> right.. is there alternative interpreters that are faster?
<JonnieCache> jruby is very fast, its built on the java jvm. its not compatbile with everything though. same applies to rubinius
<bloony> looking for a fast scripting language to extend c++ code.. I've used python for a bit, but doing a course on ruby atm and I like it
<JonnieCache> there are other python interpreters too but i dont know about them
<bloony> yeah know of stackless python
<JonnieCache> ruby is not especially slow if youre sensible about using it. if youre still using C++ to do the heavy lifting you shouldnt notice it assuming you dont introduce any blatant bottlenecks
<bloony> I might try to find a oo extension for lua..
<JonnieCache> just make sure you're using the latest ruby (1.9.3) some systems still come with 1.8.7 and that's a lot slower
ReTFEF [ReTFEF!JS@unaffiliated/thetfef] has joined #ruby
<bloony> yeah okay
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<JonnieCache> a big thing about jruby and rubinius in terms of performance over the stock interpreter is they dont have a global interpreter lock so you can do proper threading
<JonnieCache> if thats your thing
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
nari [nari!~nari@p929507.totrnt01.ap.so-net.ne.jp] has joined #ruby
acidrain [acidrain!~acidrain@HSI-KBW-095-208-109-019.hsi5.kabel-badenwuerttemberg.de] has joined #ruby
<shevy> bloony I guess lua may be better than both. python is a little bit faster than ruby usually although the difference on 1.9.x to python is not that big
lorandi [lorandi!lorandi@nat/ibm/x-yupbaoltgyymhutg] has joined #ruby
Minimalist [Minimalist!~minimalis@41.142.229.108] has joined #ruby
<Mon_Ouie> Rubinius has a GIL
<banisterfiend> Mon_Ouie: just making sure, what did u set my output object to?
FND [FND!~FND@p579A8906.dip.t-dialin.net] has quit [#ruby]
<Mon_Ouie> proc { puts "=> nothing to inspect" }
<Mon_Ouie> I forgot it was impossible to see the result of puts ;)
<banisterfiend> oh hehe
<banisterfiend> Mon_Ouie: that's fixed now on the server i think. By the way, are you familiar with eventmachine?
<Mon_Ouie> Nope
iMBA [iMBA!~mitesh@123.252.224.53] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
babinho [babinho!~babinho@babinho.net] has joined #ruby
danslo [danslo!~daniel@s529cc10b.adsl.wanadoo.nl] has joined #ruby
twelvechairs [twelvechairs!12chairs@c122-106-226-169.belrs3.nsw.optusnet.com.au] has joined #ruby
Sliker [Sliker!~ponies@31.185.185.7] has joined #ruby
<banisterfiend> Mon_Ouie: you still doing much ruby programming these days? or you concentrating primarily on larme?
john_____ [john_____!53e65f51@gateway/web/freenode/ip.83.230.95.81] has joined #ruby
<shevy> what is larme
<shevy> l'armes
<shevy> is that like gendarmes
<shevy> baguette
<shevy> gendarmes de baguette
<JonnieCache> mange tout shevy, mange tout my son
<shevy> M
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
<JonnieCache> Je ne se pas
<Mon_Ouie> banisterfiend: I don't do much programming at all right now
<banisterfiend> shevy: teardrop
<banisterfiend> Mon_Ouie: exams coming up?
<banisterfiend> Mon_Ouie: or youve just lost interest?
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
<Mon_Ouie> Kind of, no time for large projects
<banisterfiend> Mon_Ouie: is it very cold now in belgium? my brother said it's -15 in holland
<JonnieCache> there'd have to be some seriously crazy weather for it not to be also cold in belgium then :)
<Mon_Ouie> Between -10 and -5 here
danibx [danibx!~danibx@200.175.180.88.static.gvt.net.br] has joined #ruby
Rishi [Rishi!~Rishi@ool-18e40d77.dyn.optonline.net] has joined #ruby
<danslo> banisterfiend: sick cold in NL yo
<banisterfiend> danslo: ya, are you going iceskating on the canals? ;)
<danslo> no. :P
<banisterfiend> danslo: i bet it's hard for u to ride your weird little 1920s-throwback bicycles around at the moment too ;)
<danslo> so... what vim color scheme is everyone using for ruby /majornoob
<danslo> banisterfiend: hahaha, I only use public transit
<banisterfiend> dutch taste in bicycles is the lulz
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby
<danslo> :(
<danslo> dont make fun of my people
<banisterfiend> i had a great time in NL when i visited a couple of years ago, i got nothing against it -- albert heijn 4 life
<danslo> lol
<shevy> Mon_Ouie same here in vienna, though we are more at the range of -10 (-9 it is right now, but thankfully we finally have snow, and with snow it does not feel as cold)
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
jaywastaken_ [jaywastaken_!~jaywastak@207-181-243-225.c3-0.lem-ubr1.chi-lem.il.cable.rcn.com] has joined #ruby
<JonnieCache> danslo: a lot of people use the railscasts textmate theme, it has been ported to vim id imagine
<JonnieCache> thats the closest thing you'll get to a rubyist colour scheme
pu22l3r [pu22l3r!~pu22l3r@157.166.167.129] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
<danslo> JonnieCache: thanks, I'll give that a look
<JonnieCache> its only because its used oin the railscasts though, theres nothing ruby specific about it
<JonnieCache> it is very easy on the eye
<banisterfiend> JonnieCache: got a screenshot of it?
vdvluc [vdvluc!~vdvluc@83.160.100.215] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
crankycoder [crankycoder!~crankycod@66.207.208.98] has joined #ruby
nvez [nvez!~textual@bas1-montreal54-1279344164.dsl.bell.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
<JonnieCache> banisterfiend: well its in all the railscasts, and you can see it in the source listings in the transcripts of the railscasts eg http://railscasts.com/episodes/316-private-pub?view=asciicast
<banisterfiend> JonnieCache: here's my one http://cl.ly/3Q2p3f46352C3v2S3J2J
<banisterfiend> emacs charcoal-black
<JonnieCache> i dont think the html syntax highlighting lib applies it exactly correctly like textmate does though, maybe watch the video
Faris1 [Faris1!~amnay@41.249.131.220] has joined #ruby
<JonnieCache> heres mine just for the sake of it http://i.imgur.com/pBNvY.png
Faris2 [Faris2!~amnay@41.249.131.220] has joined #ruby
<JonnieCache> its the default ST2 theme and the ubuntu mono font
vdvluc [vdvluc!~vdvluc@lwm29c8.xs4all.nl] has joined #ruby
<JonnieCache> kind of garish colours but actually very pleasing to use
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
<banisterfiend> JonnieCache: nice, what editor is that?
<JonnieCache> sublime text 2
<JonnieCache> sublimetext.com/dev
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
<JonnieCache> look at the dates on that changelog. its only one dev doing it, i cant imagine he does a lot of sleeping
MaskRay_ [MaskRay_!~ray@unaffiliated/maskray] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
<MaskRay_> hi guys, how can i define customized word separators in the `irb' REPL?
<Mon_Ouie> That depends on your Readline settings (assuming you're using Readline), not on IRB
<MaskRay_> i want to make `[]-.' and some other characters to separate words, then `C-w' won't erase too much characters
<Mon_Ouie> You can set Readline.basic_word_break_characters
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
bjensen_ [bjensen_!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
<MaskRay_> is there some init file which would get loaded automatically?
<JonnieCache> ~/.irbrc
<MaskRay_> like inputrc
<Mon_Ouie> ~/.irbrc is Ruby code run at start up, ~/.inputrc is taken in account too
<banisterfiend> anyone here use music unlimited?
<banisterfiend> Mon_Ouie: oh can u link that wonderful streaming music site again, i linked it months ago
<banisterfiend> it was kind of ethereal stuff, i think it was french
<banisterfiend> you linked it months ago*
<banisterfiend> Mon_Ouie: mercy bohcoo
<banisterfiend> :)
tesmar [tesmar!~tesmar@cpe-024-163-059-067.nc.res.rr.com] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
<JonnieCache> france has some good radio stations. i enjoy FIP - http://players.tv-radio.com/radiofrance/playerfip.php
<JonnieCache> it gets rebroadcast here in brighton, it has a cult following
david_w [david_w!~david_w_s@gatej.mh.bbc.co.uk] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
<elliot98> wobr: what is way just to poll the port to see if there is any data waiting?
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
<banisterfiend> JonnieCache: wow brighton? i think i visited there a few years ago, it's that old 'seaside resort' town turned ghost town, with lots of sad empty hotels and penny arcades...
<MaskRay_> Readline.basic_word_break_characters += '.' doesn't work
<banisterfiend> JonnieCache: or am i mixing it up with something else?
<JonnieCache> nope. it is a seaside town but its not a ghost town. its like the san francisco of the uk
<JonnieCache> there are lots of towns on the coast like that though
<banisterfiend> JonnieCache: ah, but it used to be very popular but once air travel to europe became cheap didnt it lose a significant amount of business and there's a number of dilapidated hotels?
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
<banisterfiend> JonnieCache: this it?
<JonnieCache> that description fits a great number of uk seaside towns (there was a massive boom in seaside holidays after ww2 which were then destroyed by consumer air travel yes) but thats definitely not brighton
<banisterfiend> JonnieCache: maybe im confusing it for new brighton
Sliker [Sliker!~ponies@31.185.185.7] has joined #ruby
<JonnieCache> maybe. you wouldnt have to go far from here to find places like that
<banisterfiend> ah ok
<twelvechairs> Bognor!
<JonnieCache> but brighton has 2 universities, europe's biggest gay pride event, loads of clubs and stuff, its the opposite of a ghost town
<JonnieCache> lol yeah could well be bognor
<banisterfiend> JonnieCache: ah cool, def. confused it then :) the city i visited was nothing like that
<twelvechairs> JonnieCache: hey - well I don't see Brighton with a 'regis' after its name :)
<twelvechairs> (that said - bognor is pretty appaling)
<JonnieCache> the queen used to come here for medical reasons, not for recreation, i guess thats why we dont get "regis"
<JonnieCache> bognor, hastings, worthing, none of them are great
<JonnieCache> we have our own ludicrous 18th century miniture taj mahal. you cant beat that. https://secure.wikimedia.org/wikipedia/en/wiki/Brighton_Pavillion
cyri_ [cyri_!~cyri_@152.107.70.86.rev.sfr.net] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<twelvechairs> JonnieCache: There are some other nice English seaside towns still. Though probably not as big as brighton
<twelvechairs> I really liked Whitstable in kent
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<JonnieCache> brighton isnt really that nice unless you like partying or being an upper middle class failed hippie. i need to get out of here at some point, partying is only good for so long
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<JonnieCache> i need to get out of this whole country really
nari [nari!~nari@2001:268:306:1:e81c:8aff:fe5c:ec6d] has joined #ruby
<twelvechairs> JonnieCache: Where will you go? London?
<JonnieCache> nah i couldnt live in london. maybe bristol?
<twelvechairs> Yeah. I just escaped London back to Australia a few months ago...
<JonnieCache> but i want to go to europe really
bluebie [bluebie!~bluebie@110-174-153-210.static.tpgi.com.au] has joined #ruby
ChampS666 [ChampS666!~ChampS@wlan1-40.zw.fh-zwickau.de] has joined #ruby
<twelvechairs> JonnieCache: Anywhere particular in Europe? Its a big place...
MrGando [MrGando!~MrGando@pc-137-179-83-200.cm.vtr.net] has joined #ruby
<JonnieCache> berlin maybe.
nkbuff [nkbuff!~nkbuff@92.249.104.223] has joined #ruby
<twelvechairs> Yeah. Berlin is nice - not a place with much good employment though
<JonnieCache> thats true of everywhere
<JonnieCache> berlin has a startup scene at least
<JonnieCache> hopefully i can start to make my own money over the next year
<JonnieCache> i used to speak ok french and german so if i can relearn them i will have plenty of choice among places
<twelvechairs> yeah - good luck. Berlin at least is good for cheap rent....
<JonnieCache> ffs my android has decided not to mount itself any more
<JonnieCache> handy
davidpk [davidpk!~r00t@5e091684.bb.sky.com] has joined #ruby
bier [bier!~bier@p5085FEFB.dip.t-dialin.net] has joined #ruby
<banisterfiend> JonnieCache: yeah mine does that too now, it's annoying
MrGando [MrGando!~MrGando@pc-137-179-83-200.cm.vtr.net] has joined #ruby
batlock666 [batlock666!~batlock66@bvderbau.ugent.be] has joined #ruby
nvez [nvez!~textual@bas1-montreal54-1279344164.dsl.bell.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
JonnieCache [JonnieCache!~jonnie@87.252.60.35] has joined #ruby
nemesit [nemesit!~nemesit@fbivpn.informatik.uni-hamburg.de] has joined #ruby
bluenemo [bluenemo!~bluenemo@g230187036.adsl.alicedsl.de] has joined #ruby
bluenemo [bluenemo!~bluenemo@unaffiliated/bluenemo] has joined #ruby
cjs226 [cjs226!~cjs226@99-61-65-242.lightspeed.austtx.sbcglobal.net] has joined #ruby
bwlang [bwlang!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
raincole_ [raincole_!~raincole@140.112.239.113] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-5d84e1ce.pool.mediaWays.net] has joined #ruby
TheDeadSerious [TheDeadSerious!u2116@gateway/web/irccloud.com/x-djjibuuedikgeuqv] has joined #ruby
kf8a [kf8a!~kf8a@72.37.242.11] has joined #ruby
cggaurav1 [cggaurav1!~Adium@203.196.165.98] has joined #ruby
cggaurav2 [cggaurav2!~Adium@203.196.165.98] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
<danslo> So assume I have used rails generate to create a model and subsequently migrations for it... now it turns out I made a couple of modifications to those models (some relation issues)... is it possible to create migrations based off of my current files?
<danslo> Im not sure if that makes any sense
speggey [speggey!~speggey@host-143-121.eduroam.bth.se] has joined #ruby
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
ryannielson [ryannielson!~ryanniels@blk-11-127-105.eastlink.ca] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
jtrudeau [jtrudeau!~jeff@75-150-71-83-NewEngland.hfc.comcastbusiness.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
jose2 [jose2!~jose@213-205-89-58.net.novis.pt] has joined #ruby
<banisterfiend> danslo: ask in a rails chan :)
<danslo> oh crap
<danslo> my bad :)
Ownatik [Ownatik!~yoyoyoy@QUBCPQ06-3096786953.sdsl.bell.ca] has joined #ruby
<shevy> Berlin is a big, ugly town.
<shevy> Other towns like Hamburg, N
<MChizhov> hello again, helo plz with error WARNING: Can't mass-assign protected attributes http://pastie.org/3334479
dyer [dyer!~dyer@c-174-49-86-106.hsd1.ga.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
jose2 [jose2!~jose@213-205-89-58.net.novis.pt] has quit ["WeeChat 0.3.6"]
josemota [josemota!~jose@213-205-89-58.net.novis.pt] has joined #ruby
dexcs [dexcs!~dexcs@109.193.252.135] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
bjensen_ [bjensen_!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
codespectator [codespectator!~codespect@91.85.178.82] has joined #ruby
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
theRoUS [theRoUS!KenCoar@nat/redhat/x-sjycdfjggsjiibva] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
acidrain [acidrain!~acidrain@109.104.36.109] has joined #ruby
bjensen [bjensen!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
geekbri [geekbri!~geekbri@208.252.10.190] has joined #ruby
mkscrg [mkscrg!~mkscrg@pool-108-41-134-165.nycmny.fios.verizon.net] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
mocker [mocker!~mocker@72.165.148.230] has joined #ruby
bjensen_ [bjensen_!~brianj@87-104-178-171-dynamic-customer.profibernet.dk] has joined #ruby
<MChizhov> how can i change model's column name?
<MChizhov> i make this
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
drknus [drknus!~user@blk-222-141-162.eastlink.ca] has joined #ruby
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
<MChizhov> but it changes only in DB
<mocker> What's the most common way people document definitions, similar to docstring in python?
runa [runa!~asd@190.210.67.161] has quit [#ruby]
<Mon_Ouie> Put a comment just before the definition of the method
twock [twock!~twock@rrcs-24-227-222-61.sw.biz.rr.com] has joined #ruby
<mocker> Mon_Ouie: Nobody uses rdoc or yard?
<codespectator> what is the best way to take a string and covert it to a permalink?
<codespectator> Is there a simple regexp that will replace all spaces and remove all punctuation?
amacgregor_osx [amacgregor_osx!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has quit [#ruby]
eka [eka!~eka@181.28.169.86] has joined #ruby
tmiller [tmiller!~tmiller@fw.luckie.net] has joined #ruby
<MChizhov> how can i change model's column name?
<Tasser> MChizhov, #rubyonrails
<Tasser> MChizhov, basically: migration
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
<MChizhov> it changes only in db
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
<Mon_Ouie> mocker: RDoc and YARD use the comment before the definition of the method
<mocker> Mon_Ouie: Ahh, gotcha.
<mocker> Thanks, I'll try it.
<mocker> Is there a format for variables passed in and return values that is standard?
<mocker> (trying to learn the right way to document) :)
<Mon_Ouie> YARD uses some tags to describe those
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
<banisterfiend> Mon_Ouie: do you think you'll ever get back into programming with the same fervor again? or have you redirected your energies into writing cryptic french poesie now instead? :P
AndroUser [AndroUser!~androirc@175.198.167.16] has joined #ruby
herval [herval!~Adium@187.114.204.85] has joined #ruby
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
carlyle [carlyle!~carlyle@rrcs-24-199-146-218.midsouth.biz.rr.com] has joined #ruby
azbarcea [azbarcea!~quassel@95.76.68.223] has joined #ruby
yoklov [yoklov!~yoklov@137.99.241.137] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
<shevy> lol
<shevy> CAN I RUB YOUR BAGUETTE
<Afal> what the fudge did I just walk into?
<shevy> Afal, we are trying to save Mon_Ouie
<shevy> he no longer wants to program :(
<shevy> he is fatigued
<shevy> like, dead, you know
<shevy> zombie coding
<shevy> you sit and stare at the screen but nothing useful comes out
<shevy> a bit like hacking perl
dmn001_ [dmn001_!~dmn001@128.103.255.149.in-addr.arpa] has joined #ruby
rippa [rippa!~rippa@87-253-30-45.pppoe.yaroslavl.ru] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatej.mh.bbc.co.uk] has joined #ruby
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby
<banisterfiend> shevy: marcus heller, did u like my answer on ruby-forum
v0n [v0n!~v4n@2607:fad8:4:0:21e:8cff:fe4d:2f7d] has joined #ruby
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
cdepue [cdepue!~cdepue@186.8.213.16] has joined #ruby
EddieS [EddieS!~ed@212.59.167.161] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
coucher [coucher!~carlos@rrcs-50-74-224-130.nyc.biz.rr.com] has joined #ruby
bwlang [bwlang!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
philipp [philipp!~acidrain@HSI-KBW-095-208-109-019.hsi5.kabel-badenwuerttemberg.de] has joined #ruby
bertho_y [bertho_y!~bertho_y@163.5.130.14] has joined #ruby
PatrixCR [PatrixCR!~pcr@114.79.18.83] has joined #ruby
<vandemar> I don't understand why this is matching: ret = /(\S+) (\S+) (?!\1?\2)(\S+)/.match('foo bar foobar')
DarthGandalf [DarthGandalf!~Vetinari@znc/developer/DarthGandalf] has joined #ruby
<vandemar> 'foo bar bar' doesn't match
<vandemar> but I want both of them to not match
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
PatrixCR [PatrixCR!~pcr@114.79.18.83] has quit [#ruby]
AndroUser2 [AndroUser2!~androirc@175.198.167.16] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
bertho_y [bertho_y!~bertho_y@163.5.130.14] has joined #ruby
baudehlo [baudehlo!~Adium@bodger.sergeant.org] has joined #ruby
thams [thams!~Adium@67.169.49.1] has joined #ruby
csherin [csherin!~csherin@202.164.151.167] has joined #ruby
p0y [p0y!~p0y@112.210.84.83] has joined #ruby
cobragoat [cobragoat!~cobragoat@173-228-85-35.dsl.dynamic.sonic.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
thams [thams!~Adium@67.169.49.1] has quit [#ruby]
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
DrShoggoth [DrShoggoth!~prakwtf@68-188-73-250.static.stls.mo.charter.com] has joined #ruby
perturbedpanda [perturbedpanda!~perturbed@matthewabrown.com] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
btanaka [btanaka!~textual@173-228-34-51.dsl.dynamic.sonic.net] has joined #ruby
<Utkarsh> vandemar: missing '?' after \2 ?
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has joined #ruby
freezey [freezey!~anthony@63.74.178.107] has joined #ruby
brotspinne [brotspinne!~anonymous@217.147.244.5] has joined #ruby
<brotspinne> hello. is it possible to obtain the current value of a case statement comparision when I am in the "when" block?
tnk1 [tnk1!~tnk@ip72-195-134-180.ri.ri.cox.net] has joined #ruby
baudehlo [baudehlo!~Adium@bodger.sergeant.org] has quit [#ruby]
<ezotrank> Hay all. Maybe be some know solution to export cron task to google calendar?
<dr_bob> brotspinne: nein, ich denke nicht
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
<brotspinne> dr_bob: I thought there is a magic variable for this like $_. isn't it?
Creeture [Creeture!~ccosbygma@c-24-98-6-24.hsd1.ga.comcast.net] has joined #ruby
<dr_bob> brotspinne: this is Ruby and not Groovy. :-)
jwang [jwang!~jwang@c-69-181-115-143.hsd1.ca.comcast.net] has joined #ruby
vladyn [vladyn!~Adium@78.83.241.70] has joined #ruby
<dr_bob> brotspinne: what is it that you want to achieve?
<Creeture> Is there an alternative to FileUtils.touch that takes a { :mode } option? I guess File.open might be the easiest?
asobrasil [asobrasil!~asantioli@209.172.32.36] has joined #ruby
<brotspinne> dr_bob: ah got it. I workaround now with this solution: case value = 42; when; puts value; end
Helius [Helius!~Adium@109.112.208.51] has joined #ruby
<dr_bob> But there is no condition
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
<dr_bob> you could as well do puts 42, brotspinne
<dr_bob> or else, value = 42; case value...
<brotspinne> dr_bob: well that was only an example. 42 is indeed a dynamic value
<dr_bob> you do not need an assignment in the case header
<dr_bob> you can do it befoe
<dr_bob> before
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
davidpk [davidpk!~r00t@5e091684.bb.sky.com] has joined #ruby
<brotspinne> dr_bob: I want this http://pastie.org/3335053
<brotspinne> dr_bob: so this works but I thought there is a way that I dont need this "value" variable but you didn't told so
axl__ [axl__!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<dr_bob> Better do http://pastie.org/3335067
<brotspinne> dr_bob: what is the difference?
<dr_bob> Don't you see?
nakeee [nakeee!~nakee@tenar.cs.huji.ac.il] has joined #ruby
<nakeee> how do I set the gem home variable from inside a program?
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
bbttxu_ [bbttxu_!~adam@dynamic-129-120-52-255.dynamic.unt.edu] has joined #ruby
<brotspinne> dr_bob: no. I tried this: http://pastie.org/3335091 and "processing get_something..." is put only once
ryanlabouve [ryanlabouve!~ryanlabou@d-ip-129-15-84-102.cas.ou.edu] has joined #ruby
<dr_bob> brotspinne: why do you expect something else? there is no loop
<brotspinne> dr_bob: yes but what should be the difference in comparision to your code?
<dr_bob> The assignment in the case expression is totally superfluous. You do not win anything but pay with decreased readability. Assignment in conditionals only really make sense for loops, e.g. while (s=gets) ...
<brotspinne> dr_bob: ah okay it's all about the readability. next time tell me this first :D
<brotspinne> dr_bob: I thought there is a symanticially difference
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
<dr_bob> no, that's why I said you could do the other thing
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
lkba [lkba!~AndChat@bpd57.neoplus.adsl.tpnet.pl] has joined #ruby
Skaag [Skaag!~Skaag@67.133.201.106] has joined #ruby
minijupe [minijupe!~benlieb@adsl-98-94-163-21.ard.bellsouth.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
nyuszika7h [nyuszika7h!nyuszika7h@unaffiliated/nyuszika7h] has joined #ruby
alx- [alx-!~Alex@108.162.180.72] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
kerframil [kerframil!~kerframil@gentoo/user/kerframil] has joined #ruby
Skaag [Skaag!~Skaag@1-18-132-169.idt.net] has joined #ruby
AndroUser2 [AndroUser2!~androirc@175.198.167.16] has joined #ruby
yoklov [yoklov!~yoklov@67.221.70.210] has joined #ruby
prakriti [prakriti!~prakwtf@68-188-73-250.static.stls.mo.charter.com] has joined #ruby
jankly [jankly!~jankly@c-71-57-99-219.hsd1.in.comcast.net] has joined #ruby
Skaag_ [Skaag_!~Skaag@81.26.147.34] has joined #ruby
uris [uris!~rguerra@200.32.229.98] has joined #ruby
bwlang [bwlang!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
p0y [p0y!~p0y@112.210.84.83] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
cggaurav [cggaurav!~Adium@117.193.1.217] has joined #ruby
zakwilson [zakwilson!~quassel@d171005.adsl.hansenet.de] has joined #ruby
cjlicata [cjlicata!~carlyle@rrcs-24-199-146-218.midsouth.biz.rr.com] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-100-199.san.ru] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
dcarper [dcarper!~dcarper@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby
Nss [Nss!~mosca@2001:1418:16b:1:90bc:39ff:fea7:79be] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
soulcutter [soulcutter!~soulcutte@unaffiliated/soulcutter] has joined #ruby
elliot98 [elliot98!~elliot@77.127.83.98] has joined #ruby
mjording [mjording!~mjording@107.57.47.99] has joined #ruby
kenperkins [kenperkins!~textual@174-24-134-155.tukw.qwest.net] has joined #ruby
Skaag_ [Skaag_!~Skaag@1-18-132-169.idt.net] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
llaskin [llaskin!~Leo@c-24-128-198-93.hsd1.ma.comcast.net] has joined #ruby
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby
sythe [sythe!~quassel@70.49.107.79] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
snip_it [snip_it!~snip_it@sta-204-144-132-210.rockynet.com] has joined #ruby
tilde` [tilde`!~tilde@host237-193-dynamic.23-79-r.retail.telecomitalia.it] has joined #ruby
ikaros [ikaros!~ikaros@dslb-094-219-214-087.pools.arcor-ip.net] has joined #ruby
danishkhan [danishkhan!~danishkha@enginey-9.border1.sfo002.pnap.net] has joined #ruby
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
herval [herval!~Adium@186.215.248.58] has joined #ruby
alup_ [alup_!~alup@193.92.123.5] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
sythe [sythe!~quassel@facade/leader] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
samsonjs [samsonjs!~samsonjs@184.66.154.246] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-ksarghmnltcosdns] has joined #ruby
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
danslo1 [danslo1!~daniel@s529cc10b.adsl.wanadoo.nl] has joined #ruby
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby
cobragoat [cobragoat!~cobragoat@64-71-15-218.static.wiline.com] has joined #ruby
froy [froy!~troy@manuel.dublan.net] has joined #ruby
lorandi [lorandi!lorandi@nat/ibm/x-onfnhcwvvaqnpkrj] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@38.104.183.198] has joined #ruby
tvo [tvo!~tvo@a80-101-195-225.adsl.xs4all.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-109-127.san.ru] has joined #ruby
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
lorandi [lorandi!lorandi@nat/ibm/x-kbvpzphkxwuwlhne] has joined #ruby
savage- [savage-!~savage_@istep.static.monkeybrains.net] has joined #ruby
lorandi [lorandi!lorandi@nat/ibm/x-pwtwpyscnmqnvovy] has joined #ruby
p0y [p0y!~p0y@112.210.84.83] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@CPE602ad06de6b3-CM602ad06de6b0.cpe.net.cable.rogers.com] has joined #ruby
crankycoder [crankycoder!~crankycod@66.207.208.98] has joined #ruby
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
adeponte_ [adeponte_!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has quit [#ruby]
Jacktrick [Jacktrick!~Oz@089-101-225189.ntlworld.ie] has joined #ruby
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
philips [philips!~philips@shell.ifup.org] has joined #ruby
ghanima [ghanima!~ghanima@allen.nat.trb.com] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-61-129.albq.qwest.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
csherin [csherin!~csherin@202.164.151.167] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
badabim [badabim!~badabim@17.212.166.202] has joined #ruby
stephans_ [stephans_!~stephans@76-217-209-24.lightspeed.sntcca.sbcglobal.net] has joined #ruby
bwlang [bwlang!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
musl [musl!~mike@li44-23.members.linode.com] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:d873:d867:afa5:3db6] has joined #ruby
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby
codespectator [codespectator!~codespect@host-2-96-215-137.as13285.net] has joined #ruby
twqla [twqla!~tweequla@c-bf2fe655.02-221-6b73641.cust.bredbandsbolaget.se] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
rfloriano [rfloriano!~rafael@177.16.57.172] has joined #ruby
yoklov [yoklov!~yoklov@67.221.68.174] has joined #ruby
freezey [freezey!~anthony@63.74.178.107] has quit [#ruby]
maletor [maletor!~maletor@74.115.25.139] has joined #ruby
jgrevich [jgrevich!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
waxjar [waxjar!~waxjar@82-170-1-70.ip.telfort.nl] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
MrGando [MrGando!~MrGando@pc-137-179-83-200.cm.vtr.net] has joined #ruby
apok [apok!~apok@70-36-146-148.dsl.dynamic.sonic.net] has joined #ruby
elliot_ [elliot_!~elliot@77.127.83.98] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@99.23.160.120] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
jacktrick [jacktrick!~Tom.Diddl@089-101-225189.ntlworld.ie] has joined #ruby
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-qaugoxrjtjleksjg] has joined #ruby
daglees [daglees!~belvedere@91.186.252.236] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
<shevy> my pants are dangerous
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has joined #ruby
crescendo [crescendo!~eric@cpe-065-190-084-025.nc.res.rr.com] has joined #ruby
crescendo [crescendo!~eric@unaffiliated/crescendo] has joined #ruby
<Boohbah> shevy: mis pantalones esta en fuego
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby
<apeiros_> fuego!
DarthGandalf [DarthGandalf!~Vetinari@znc/developer/DarthGandalf] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
atmosx [atmosx!~textual@188.4.185.12.dsl.dyn.forthnet.gr] has joined #ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
<Tasser> how do I convert [[:foo, 13], [:bar, 42]] to {foo: 13, bar: 42} ? Somehow Hash#[] creates {[:foo, 13] => nil, [:bar, 42] => nil}
<Mon_Ouie> ary = [[:foo, 13], [:bar, 42]]; Hash[ary]
<Mon_Ouie> (Only works in 1.9)
<Mon_Ouie> I guess what you did is Hash[[k, v], [k, v]]
<Tasser> looks like I found a bug in jruby ;-)
<apeiros_> I doubt that something as often used as this is broken in jruby…
<apeiros_> I'd try with a hand-made array. maybe the inspect of the array is "lying"
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<Tasser> [24] pry(main)> ary = [[:foo, 13], [:bar, 42]]; Hash[ary]
<Tasser> => {[:foo, 13]=>nil, [:bar, 42]=>nil$
<apeiros_> try with ruby -e
* apeiros_ downloads jruby now
<apeiros_> I want to see that live :)
<apeiros_> wtf? 100KB/s?
* apeiros_ checks calendar
adamkittelson [adamkittelson!~adamkitte@50.0.132.2] has joined #ruby
<Tasser> ruby -e "ary = [[:foo, 13], [:bar, 42]]; puts Hash[ary]"
<apeiros_> no, not 1998…
<Tasser> {:foo=>13, :bar=>42}
<Tasser> huh.
<Tasser> wtf.
<Tasser> let's update pry
<apeiros_> pry bug then?
<apeiros_> ruby -ve '…' to ensure you have the right ruby…
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
<Tasser> yeah, I do
<Tasser> jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (OpenJDK 64-Bit Server VM 1.6.0_24) [linux-amd64-java]
<apeiros_> pry bug then
<apeiros_> but an odd one…
<apeiros_> I mean… wtf? :)
<Tasser> indeed
carlyle [carlyle!~carlyle@216.133.69.18] has joined #ruby
<apeiros_> holy moly, jruby's irb takes some time to boot…
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
<Tasser> it's jruby
<Tasser> actually, the java runtime.
<Tasser> but according to headius it's still damn fast
<Tasser> it scales ;-)
<apeiros_> I know the numbers
<apeiros_> and I know it's jvm is the "culprit" and that it pays off over time
<apeiros_> but still… actually feeling the time it takes to start up… wow :)
<Tasser> but the 'over time' effect somehow sucks
<apeiros_> wouldn't use that for scripting stuff
<Tasser> can't you just dump the memory image of a process and use that one...
<apeiros_> I mean things that take <1s to run
<Tasser> I talk to lucene, therefore the need for jruby
<apeiros_> pondered that too. with 1.9, why not dump the bytecode + image
<apeiros_> use that for kickstarted stuff…
<shevy> all the cool ideas here
<shevy> and they will all die
<shevy> :(
<apeiros_> ideas never die
<apeiros_> only people behind them
stkowski [stkowski!~stkowski@ns25.8x8.com] has joined #ruby
Evixion [Evixion!Evixion@tn-67-236-8-104.dhcp.embarqhsd.net] has joined #ruby
josephwilk [josephwilk!~josephwil@109.231.237.58] has joined #ruby
llaskin [llaskin!~Leo@c-24-128-198-93.hsd1.ma.comcast.net] has quit [#ruby]
<Tasser> apeiros_, if all people, who have the idea, die?
<Tasser> ehh s/,//
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:adde:872f:2810:db7d] has joined #ruby
<apeiros_> the idea still isn't dead.
<apeiros_> did 0 not exist before people came up with the concept?
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
<Tasser> touché
<apeiros_> but granted, for practical purposes, it pretty much is :)
<Tasser> hmm, implicit variables on the stack in ruby - (aka Dir.chdir) - evil?
<apeiros_> no opinion on that. but that's a great thing you mention it. fits very nicely with my newish concept of 'context' (for halsbe)
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby
<Tasser> see lisp (let () () )
cek [cek!~cek@crius.pantheon.fused.net] has joined #ruby
<apeiros_> icannothazlisp
<Tasser> generally, if I see a new language feature I'm like "ah, where did I see that? ahh, right. Lisp."
<cek> what's the pything equiwalent to [].each{|e| func(e)} ?
<cek> *python
<Tasser> cek, for elem in array: func(elem)
* apeiros_ checks channel
bluenemo [bluenemo!~bluenemo@g230187036.adsl.alicedsl.de] has joined #ruby
jergason [jergason!~jergason@208.97.56.66] has joined #ruby
<apeiros_> right, I'm in #ruby, not #python, phew.
bluenemo [bluenemo!~bluenemo@unaffiliated/bluenemo] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
<apeiros_> Tasser: I only did a quick readup, so I might miss a bit - but let doesn't seem to be the same as context. seems closer to argument lists in method defs.
<Tasser> what's the difference?
minijupe [minijupe!~benlieb@adsl-98-94-163-21.ard.bellsouth.net] has joined #ruby
cobragoat [cobragoat!~cobragoat@64-71-15-218.static.wiline.com] has joined #ruby
<ceej> anyone use jbuilder? when I do User.all then json.users @users, :first_name, :last_name, :auth_level it works, but doing User.where(auth_level: 7) i get unknown method :first_name
<ceej> wups wrong chan sry
<apeiros_> since I haven't worked out the concept yet, it's a bit mushy, but: context is more complex in that the current context is a union of concurrent contexts.
<apeiros_> e.g. the union of 'current working directory', 'language setting', 'currently processed request' etc.
nemesit [nemesit!~nemesit@p5DC0C925.dip.t-dialin.net] has joined #ruby
<apeiros_> the context is similar to `self` in that it is present everywhere and doesn't need to be passed
<Tasser> let overwrites the variable in every subcall - so it's kind of a union
<Tasser> yeah, that's a let ;-)
ryanlabouve [ryanlabouve!~ryanlabou@d-ip-129-15-84-102.cas.ou.edu] has joined #ruby
<apeiros_> not quite
<Tasser> or do you unify more than the first level of name => data ?
<apeiros_> as said, I haven't worked out the details. I'd imagine that a context is namespaced, so unification would work similarly to how in ruby you can have constants from multiple sources sharing a namespace
ryanlabouve [ryanlabouve!~ryanlabou@d-ip-129-15-84-102.cas.ou.edu] has joined #ruby
<apeiros_> Tasser: lisp has subroutines/functions, yes?
<Tasser> sure they do
<apeiros_> let works within a lexical boundary, correct?
<apeiros_> i.e., (let (…lets…) … affected …)
<Tasser> I think so
<apeiros_> would it affect a function invoked in that section?
<apeiros_> (I'd assume not)
gianlucadv [gianlucadv!~gianlucad@95.74.101.124] has joined #ruby
<Tasser> yep, it does
<Tasser> that's the fun part. you can do stuff like (let (stderr file) (function)) if that stupid function just prints to stderr
<apeiros_> ok, then it's closer than I thought
<apeiros_> depends a bit on how lisp works
<apeiros_> in order for function to access stderr, must function be defined within a () within which stderr was defined?
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
<apeiros_> e.g. as in ruby if you'd do: proc { stderr = File.open(path); func = proc { stderr.puts "blabla" }; func[] }
<Tasser> nope
<apeiros_> hm, one day I'll have to learn lisp.
<apeiros_> anyway, it's still not like context then. it seems to allow to "change stuff under the code's ass", which context won't. context still requires you to go over a contract.
dmn001_ [dmn001_!~dav3@vserver-z74f52vm3.autovps.net] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
yekta_ [yekta_!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
badabim_ [badabim_!~badabim@17.245.88.57] has joined #ruby
Reikoku [Reikoku!~Reikoku@gateway/tor-sasl/reikoku] has joined #ruby
tilde` [tilde`!~tilde@host237-193-dynamic.23-79-r.retail.telecomitalia.it] has joined #ruby
<Reikoku> Hi, I'm getting into Rails web dev, how much of the process do I need shell access for?
demet8 [demet8!~demet8@94.186.8.67.cfl.res.rr.com] has joined #ruby
<Reikoku> I have a working ruby/rails on my server and on my dev box, is there any way to develop on the dev box with shell access and publish to the server without shell?
adamjleonard [adamjleonard!~adamjleon@pool-68-238-168-85.tampfl.fios.verizon.net] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<ceej> undefined method `first_name' for {"first_name"=>"The", "last_name"=>"Superuser", "auth_level"=>5}:Hash is there an easy way to turn hashes into objects so they can be access like user.first_name instead of user['first_name']
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has joined #ruby
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has quit [#ruby]
<theRoUS> using mocha in 1.8.7, is there a way to stub an instance method so that when the class gets instantiated it'll use the stub?
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
<apeiros_> Reikoku: that'd depend on the setup of your server
<apeiros_> ceej: you can use openstruct
<Reikoku> apeiros_: In what way? It's a Linux server
<apeiros_> ceej: alternatively wrap it in an object which implements method_missing
wyhaines [wyhaines!~wyhaines@swiftcore.org] has joined #ruby
<JonnieCache> Reikoku: you'll need shell access unless your hosting is specifically set up for rails hosting already
emocakes [emocakes!~om@p57974C8F.dip.t-dialin.net] has joined #ruby
<Reikoku> JonnieCache: How would I know if it is?
<apeiros_> Reikoku: well, a) how your server is configured to get the data onto it, b) how your webserver is configured (rails in production mode usually loads once at server startup, so pushing new code on the server usually means webserver restart), c) …
<apeiros_> you can get your server all set up in a way that needs no login to update your code. I do it on mine by simply pushing the master branch of my repository. but as said - it needs prior work.
<Reikoku> apeiros_: I have ftp to get data on, plesk access to make databases and can do server restarts, I just appear to have screwed up ssh and short term have no ssh access
<ceej> apeiros_: ty that works… just need to make it recursive now :)
<Reikoku> I just need to deploy something soon and dont really have time to fix ssh any time soon
<apeiros_> Reikoku: do you have db migrations?
<apeiros_> those you'd have to replicate "by hand" with plesk. other than that: replace the code with the newer version and restart your server.
<JonnieCache> youre going to need ssh to set up all the ruby stuff. rails doesnt just work out of the box with apache, you have to install ruby and your apps dependencies
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby
<apeiros_> that's assuming that your app has already been running and you're talking about an update
<apeiros_> otherwise, what JonnieCache said applies.
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
mrgraeme [mrgraeme!~mrgraeme@cpc2-brig7-0-0-cust312.3-3.cable.virginmedia.com] has joined #ruby
<Reikoku> JonnieCache: rails and ruby are installed
<Reikoku> I can install gems
<Reikoku> My app has never run on the remote server
<Reikoku> And I do have data migration via sql dumps
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
tayy [tayy!~tayy@dhcp-129-234-217-129.un.esol.dur.ac.uk] has joined #ruby
runeb [runeb!~runeb@cm-84.215.181.150.getinternet.no] has joined #ruby
n8ji [n8ji!~n8ji@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
<Reikoku> JonnieCache: Other than installing ruby, what else would I need to do? I have a serial console but it's really restrictive
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
<JonnieCache> depends what youre doing. some gems have external dependencies like libxml2 or imagemagick
nobitanobi [nobitanobi!~novito@173-164-143-45-SFBA.hfc.comcastbusiness.net] has joined #ruby
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
<nobitanobi> Hi here. I'm doing this checking: if @consumer.respond_to?('street_1') - How can I also check if the street_1 is empty? Is there any function that does both checkings?
<apeiros_> nobitanobi: no
<apeiros_> nobitanobi: but do you really need to check for respond_to? sounds like bad design if you have to…
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
<apeiros_> nobitanobi: also, use symbols for thins like respond_to?, send etc.
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
<nobitanobi> ok apeiros_ thanks
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
glacius [glacius!~glac@remote.pba.edu] has joined #ruby
<glacius> yo
<glacius> whats the word fellas
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<Tasser> I've got Klass#foo and Klass#bar - now I'd like to alias foo to bar - how to do that without opening class context?
<glacius> who here has experiece with shoes
<apeiros_> Tasser: I don't think you can
<apeiros_> you could try Klass.singleton_class.alias_method
<apeiros_> might be private, though
<Tasser> I want to overwrite some method in FileUtils
<apeiros_> those are instance methods anyway
<apeiros_> with module_function
<rippa> >private
<rippa> #send
<Tasser> aww, javascript.... func = obj['foo']; obj['bar'] = func or something like that ;-)
<Tasser> basically, how to do that in ruby.
<apeiros_> well, I just told you
Azure [Azure!~azt@cinch/fan/azure] has joined #ruby
emocakes [emocakes!~om@p57974C8F.dip.t-dialin.net] has joined #ruby
<apeiros_> though the analogous way to that would actually go via .method + define_method
<rippa> why don't you want to open class?
<Tasser> ahh, right, define_method
<apeiros_> *instance_method
bwlang_ [bwlang_!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
stephans_ [stephans_!~stephans@209.66.114.6] has joined #ruby
ale` [ale`!~user@dynamic-adsl-84-221-179-209.clienti.tiscali.it] has joined #ruby
jbpros [jbpros!~jbpros@166-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
adamjleonar [adamjleonar!~adamjleon@pool-68-238-168-85.tampfl.fios.verizon.net] has joined #ruby
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
canton8 [canton8!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
<Tasser> {foo: [42,23]}.reduce({}) {|keep, key, value| value.each {|v| keep[v] = key}; keep } # looks like the hash doesn't splat - what am I doing wrong?
triptec [triptec!~frasse@217.68.38.160] has joined #ruby
pdtpatrick [pdtpatrick!~pdtpatric@12.249.4.226] has joined #ruby
<triptec> I get a segfault when doing a bundle install in http.rb
<apeiros_> you forgot ()
<triptec> mac
cek [cek!~cek@crius.pantheon.fused.net] has quit [#ruby]
<apeiros_> triptec: I got the same issue
<apeiros_> only on lion, though
<apeiros_> Tasser: .inject({}) { |keep, (key, value)|
<triptec> yeah..
<apeiros_> Tasser: also s/reduce/each_with_object/
<triptec> that blows
<apeiros_> triptec: indeed. it doesn't happen all the time, though, and only with 1.9.3
<apeiros_> for the moment I switched back to 1.9.2 on lion.
<triptec> ok
<Tasser> apeiros_, why so? ^^
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
<triptec> god bless rvm
<apeiros_> Tasser: `; keep` should be a hint…
luke-- [luke--!~luke--@dslb-088-077-116-089.pools.arcor-ip.net] has joined #ruby
<Tasser> {foo: [42,23]}.each_with_object({}) {|keep, (key, value)| value.each {|v| keep[v] = key}}
<Tasser> NoMethodError: undefined method `each' for nil:NilClass
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
<ged> triptec: That sometimes happens when you have two extensions that are linked against two different versions of libssl.
enroxorz [enroxorz!~enroxorz@65-117-22-130.dia.static.qwest.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
<ged> E.g., the 'pg' library's extension links against libpq, which is itself linked against libssl.
<triptec> ok
<triptec> is there anyway to check?
<apeiros_> Tasser: different order with each_with_object
bwlang_ [bwlang_!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
<Tasser> ARGH
<apeiros_> |(key, value), keep|
<ged> If your Ruby's 'openssl' library was compiled against a different version of openssl, when it loads (e.g., when you try to access an 'https' URL).
<ged> On OSX, compare the output of 'otool -L' on the two extensions.
RobbieAB [RobbieAB!~robert@91.191.147.232] has quit [#ruby]
<apeiros_> ged: but then a reinstallation of ruby should have fixed it, no?
<ged> It happens a lot with openssl installed via macports and (less often) homebrew.
<JonnieCache> omg github is down
bwlang [bwlang!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
<JonnieCache> GIT: NOT SO DISTRIBUTED ANY MORE
<ged> apeiros_: Only if it's linked against the /usr/local/lib version of libssl, and not the /usr/lib one.
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
dmn001_ [dmn001_!~dmn001@128.103.255.149.in-addr.arpa] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<apeiros_> JonnieCache: the nice thing about git is - your local repo still works
enroxorz-work [enroxorz-work!41751682@gateway/web/freenode/ip.65.117.22.130] has joined #ruby
snearch [snearch!~snearch@e178056049.adsl.alicedsl.de] has joined #ruby
<ged> Basically, both Ruby and all of the extensions you compile should be using the same libraries. However you make that happen.
Asher [Asher!~asher@98.158.127.150] has joined #ruby
chimkan [chimkan!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby
Seuss [Seuss!c18c2a8d@gateway/web/freenode/ip.193.140.42.141] has joined #ruby
<ged> And I don't know enough about how compilers/linkers work to know if it's something you can fix with (DY)LD_LIBRARY_PATH or not.
<JonnieCache> apeiros_: thats true. unfortunately i dont have mirrors of every github repo...
<triptec> installing and using 1.9.2 works, but I didn't do anything different
<apeiros_> JonnieCache: you don't!?!?
<triptec> i installed 1.9.3 20 min ago same way
tobym [tobym!~tobym@pool-173-56-80-136.nycmny.fios.verizon.net] has joined #ruby
<apeiros_> did nobody tell you to copy the internet on a daily basis?
<apeiros_> tsk…
<apeiros_> noobs
<ged> That's what zip drives are for, right?
<JonnieCache> i wonder how big it would be to mirror all of the repos on github
<apeiros_> probably not even *that* big, given that most is text
<ged> dd of=/dev/zip0 if=internets bs=8192...
retr0h [retr0h!~jdewey@pdpc/supporter/active/retr0h] has joined #ruby
sythe [sythe!~quassel@70.49.107.79] has joined #ruby
retr0h [retr0h!~jdewey@pdpc/supporter/active/retr0h] has quit [#ruby]
<JonnieCache> back up. phew.
bwlang [bwlang!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
snip_it [snip_it!~snip_it@sta-204-144-132-210.rockynet.com] has joined #ruby
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
Skaag [Skaag!~Skaag@67.133.201.106] has joined #ruby
bwlang [bwlang!~anonymous@c-75-69-239-104.hsd1.ma.comcast.net] has joined #ruby
vizzord [vizzord!~exn@195.49.206.202] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
Skaag [Skaag!~Skaag@1-18-132-169.idt.net] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
dkr [dkr!~dkr@67.132.255.16] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
<musl> ged: dd: writing `/dev/zip0': No space left on device
hukl [hukl!~hukl@91-65-135-174-dynip.superkabel.de] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
mrgraeme [mrgraeme!~mrgraeme@cpc2-brig7-0-0-cust312.3-3.cable.virginmedia.com] has joined #ruby
imsplitbit [imsplitbit!~imsplitbi@64.39.5.119] has joined #ruby
Jake232 [Jake232!~textual@5e04bafa.bb.sky.com] has joined #ruby
shadoi1 [shadoi1!~Adium@gw.sfo.cloudscaling.com] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@99.23.160.120] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
xec [xec!~xec@54.109-247-17.customer.lyse.net] has joined #ruby
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
nonotza [nonotza!~nonotza@50-57-234-249.static.cloud-ips.com] has joined #ruby
tsd_usa [tsd_usa!~daniel_d@NYUFGA-WLESSAUTHCLIENTS-02.NATPOOL.NYU.EDU] has joined #ruby
<tsd_usa> Hi
<tsd_usa> I have following code: File.open(ARGV[1],"w+"){|f|
<tsd_usa> puts origin_text.gsub(pattern, '[\0]')
<tsd_usa> }
Zolrath [Zolrath!~Zolrath@cpe-98-148-138-177.socal.res.rr.com] has joined #ruby
<tsd_usa> It runs perfect with ruby 1.8
senny [senny!~senny@84-72-61-96.dclient.hispeed.ch] has joined #ruby
<tsd_usa> but with 1.9 it gives me:in `gsub': invalid byte sequence in UTF-8 (ArgumentError)
<tsd_usa> Any help is appreciated!!
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
sieson [sieson!~sasan@173.227.31.82] has joined #ruby
sythe [sythe!~quassel@facade/leader] has joined #ruby
<apeiros_> tsd_usa: you read the file as utf-8, but its contents are not valid utf-8
<tsd_usa> apeiros_: why??? I simply open that file and write to it
<apeiros_> tsd_usa: you are aware that a single ? is sufficient, yes?
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has joined #ruby
<tsd_usa> ?
<apeiros_> because in ruby 1.9, strings have an encoding.
<apeiros_> if you don't give ruby the encoding of the file by a param to File.open, it'll use Encoding.default_external
<Faris> I wrote a ruby script that has 2 threads, which run perfectly in irb, but the script ends instantly without getting too far when run from command line with 'ruby' :(
xec [xec!~xec@54.109-247-17.customer.lyse.net] has quit [#ruby]
davidpk [davidpk!~r00t@5e091684.bb.sky.com] has joined #ruby
<apeiros_> Faris: you forgot to wait for the 2 threads to finish. see Thread#join
<burgestrand> Faris: ruby exits when it exits, even if threads have been created
<burgestrand> Faris: you can wait for them with Thread#join like apeiros_ said
<Faris> Okey :)
straind` [straind`!~stupidper@204.111.191.116] has joined #ruby
<apeiros_> tsd_usa: so your plan of action is to figure out what encoding the file actually uses, and tell ruby that, or treat it as binary.
<apeiros_> if you do the latter, you must treat the pattern as binary too (you can use the //n flag)
<burgestrand> ah, sweet, didn’t know about /n
<burgestrand> can’t see how I’ve missed that one
<apeiros_> you've been living in a cave, that's how!
<apeiros_> ;-)
<burgestrand> … then again to be fair it’s pretty much at the bottom of the re.rdoc :x
<apeiros_> I used it since 1.8
<apeiros_> thanks to the $KCODE abuse…
<burgestrand> hehe
<apeiros_> ($KCODE was a silly idea)
<burgestrand> I’m new enough to never having suffered many pains that’s existed in ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
<burgestrand> bundler, ruby 1.9, rails 3+, nokogiri; all out pretty much when I started doing ruby instead of all the other languages I knew but with ruby syntax
<burgestrand> \o/
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby
waxjar [waxjar!~waxjar@82-170-1-70.ip.telfort.nl] has joined #ruby
<sieson> I am parsing text that contains html entities as they are displayed in the browser (i.e ¾). Is it possible to encode these characters to the html entity code (i.e. ¾ = &frac34;)?
ElderFain [ElderFain!~ElderFain@c-98-207-237-171.hsd1.ca.comcast.net] has joined #ruby
<apeiros_> sieson: yes.
<ElderFain> I have a data structure that looks like this, https://gist.github.com/28731c28b897af3da02d and I'm trying to come up with an elegant way to say "if key2 exists, and key a or key b exists, use those values, otherwise use this pre-supplied value"
<ElderFain> the problem is there are so many potential states
<ElderFain> key2 could not even exist. it could exist and not have a or b, or it could exist and have a, but not b, or b but not b
<ElderFain> so i've got this big branching "has_key?" logic that feels silly
<apeiros_> ElderFain: use proper classes?
<sieson> apeiros_: I am using HTMLEntities but I am unable to convert the character. Any idea how I can encode these characters?
<ElderFain> apeiros_: ?
<apeiros_> sieson: I'd assume that htmlentities uses a hash at heart, extend it
<apeiros_> sieson: it's actually in it
dyer [dyer!~dyer@c-174-49-86-106.hsd1.ga.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<apeiros_> maybe you're having an encoding issue…
oooPaul [oooPaul!~paul@nat1.sp.collab.net] has joined #ruby
<Faris> But does 'join' let all threads run at the same time ?
<sieson> apeiros_: Yeah conversion from the encoded html code to the utf-8 character works perfectly fine its the other way round I was hoping it could handle.
tangledhelix [tangledhelix!~dan@99-59-107-84.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<ElderFain> apeiros_: I don't actually understand what you are driving at. i should map this dataset into a class?
<apeiros_> ElderFain: sry, too much stuff going on. I'll be back in a bit. poke me if you don't have an answer till then.
<JonnieCache> faris: when you join thread A onto thread B then A will wait until B finished to continue running
s0ber_ [s0ber_!~s0ber@114-36-231-66.dynamic.hinet.net] has joined #ruby
y3llow_ [y3llow_!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby
<Faris> what if I want all threads to run at once ?
<Faris> at the same time*
<JonnieCache> well if you allow the main thread to keep running after its run out of instructions the whole program will end
<JonnieCache> you can leave all your other worker threads to run at the same time but you have to stop your main thread from ending or its goodnight
<burgestrand> Faris: all threads will run at the same time, but if the main thread exits all of them just die
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby
<Faris> okey.
KL-7 [KL-7!~KL-7@178.120.123.199] has joined #ruby
y3llow [y3llow!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby
Willyum [Willyum!~willyum@ool-18ba4d58.dyn.optonline.net] has joined #ruby
Willyum [Willyum!~willyum@ool-18ba4d58.dyn.optonline.net] has quit [#ruby]
Willyum [Willyum!~willyum@ool-18ba4d58.dyn.optonline.net] has joined #ruby
y3llow [y3llow!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby
sieson [sieson!~sasan@173.227.31.82] has quit [#ruby]
<Faris> test
<oooPaul> passed.
bluenemo [bluenemo!~bluenemo@unaffiliated/bluenemo] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
Savvis [Savvis!~Savvis@68.140.79.239] has joined #ruby
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
techhelp [techhelp!~Dan@firebox.rsmart.com] has joined #ruby
yalue [yalue!98177b75@gateway/web/freenode/ip.152.23.123.117] has joined #ruby
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-ccnhylcofetsyfny] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
linopolus [linopolus!~linopolus@hektor.lnpls.de] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
jfelchner [jfelchner!~jfelchner@c-68-53-88-7.hsd1.tn.comcast.net] has joined #ruby
justfielding [justfielding!~justfield@d1400.dsl.pgtc.com] has joined #ruby
justfielding [justfielding!~justfield@d1400.dsl.pgtc.com] has quit [#ruby]
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
swarley [swarley!~swarley@ip68-10-212-39.hr.hr.cox.net] has joined #ruby
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<swarley> I'm working with curses now and I'm wondering if there is a way to have Curses.getch be non blocking
Taos [Taos!~jakob@host-92-20-113-107.as13285.net] has quit [#ruby]
kenperkins [kenperkins!~textual@174-24-172-224.tukw.qwest.net] has joined #ruby
DrShoggoth [DrShoggoth!~prakwtf@68-188-73-250.static.stls.mo.charter.com] has joined #ruby
ushioet [ushioet!~ushioet@ppp-105-168.32-151.iol.it] has joined #ruby
<deryl> speedwise is a case statement as fast as a multi-if that only looks for 1 or 2 items, (provided you order the sequence in order of likelihood of hitting) or shoudl i just forget about the if all together?
TheNumb [TheNumb!~TheNumb@twojastara.ichuj.net] has joined #ruby
<deryl> if 1match elsif 2ndmatch else dothis end vs. a case of all possibe matches ordered with 1matcha nd 2match as first two entries
<deryl> tracking phonecall event state, name event_name changes frequently, with pattern. on specific ones we want to do this. i was figuring a case would be the better way so we can set the case matches to each event_name
<Faris> How do I get two infinite-loop threads to run at the same time please ? :D
<Faris> I can't find any example for that :(
<burgestrand> deryl: case uses === to match items
<burgestrand> deryl: as for your question I have no answer
Manhose [Manhose!~Manhose@dial-b1-238-132.telepac.pt] has joined #ruby
<deryl> ok.
MrGeneral [MrGeneral!~MrGeneral@ipv6.miguelsp.net] has joined #ruby
<MrGeneral> Unable to activate acts-as-taggable-on-2.2.2, because rails-2.3.14 conflicts with rails (~> 3.0) <- what should I do?
<burgestrand> deryl: but since case always uses ===, but for if you can decide your own comparison, I’d go with if having the ability to be faster
<deryl> right but which is faster? case or the if?
<burgestrand> Faris: they will run concurrently in CRuby; what’s the contents of your two loops?
<burgestrand> deryl: no idea, bench it :p
<deryl> hah, got ya
<Faris> they won't in regular ruby ?
<burgestrand> Faris: regular ruby is cruby :)
<Faris> oh :)
ushioet [ushioet!~ushioet@ppp-105-168.32-151.iol.it] has joined #ruby
<Faris> okey so let's say one prints out As and the other Bs
<Faris> how do I do that ?
<Faris> in an infinite loop that is :)
ushioet [ushioet!~ushioet@ppp-105-168.32-151.iol.it] has quit [#ruby]
danslo [danslo!~daniel@s529cc10b.adsl.wanadoo.nl] has joined #ruby
notjohn [notjohn!~john@WS1-DSL-208-102-253-169.fuse.net] has joined #ruby
<Faris> burgestrand: thanx :)
<burgestrand> (actually that last line could just as well be a.join, but I thought my line made it clearer you should wait for both)
carbncl [carbncl!~carbncl@2a01:e35:2e18:e500:f4a7:6f52:627a:fdaa] has joined #ruby
TheNumb [TheNumb!~TheNumb@unaffiliated/thenumb] has joined #ruby
Asher [Asher!~asher@98.158.127.150] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
talbotlawrence [talbotlawrence!~talbotlaw@74.255.130.254] has joined #ruby
mythmon [mythmon!~mythmon@osuosl/staff/Mythmon] has joined #ruby
mythmon [mythmon!~mythmon@osuosl/staff/Mythmon] has joined #ruby
enherit [enherit!~enherit@70-36-236-228.dsl.static.sonic.net] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
regedarek [regedarek!regedarek@gateway/shell/bshellz.net/x-stuqexvsdpbtylkf] has joined #ruby
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
Sigma00 [Sigma00!~freenode@thankyouforhelpingushelpyouhelpusall.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
pstuteville [pstuteville!~pstutevil@adsl-99-14-72-203.dsl.pltn13.sbcglobal.net] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-188-100-254-093.pools.arcor-ip.net] has joined #ruby
dhodgkin [dhodgkin!~dhodgkin@cpe-76-178-249-57.maine.res.rr.com] has joined #ruby
lewix [lewix!~someone@unaffiliated/lewix] has joined #ruby
chimkan_ [chimkan_!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby
Jedi_SCT1 [Jedi_SCT1!~j@67.215.87.132] has joined #ruby
pstutevi1le [pstutevi1le!~pstutevil@173.255.172.145] has joined #ruby
notjohn [notjohn!~john@WS1-DSL-208-102-253-169.fuse.net] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
pstuteville [pstuteville!~pstutevil@173.255.172.145] has joined #ruby
lewix [lewix!~someone@unaffiliated/lewix] has joined #ruby
dcarper [dcarper!~dcarper@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
<lewix> time to revolutionize the web!
<lewix> haha (evil laughter)
<triptec> hi, I'm trying to add jquery_mobile css to my assets with //= require jquery_mobile in one of my css, but I guess it's wrong
<triptec> what should I do?
<oooPaul> I'm not an expert, but it so happens someone mentioned to me recently that jquery_mobile doesn't get along with regular jquery...
<oooPaul> Kind of an "either-or" situation. Are you using regular jquery? Maybe that's the conflict.
<nobitanobi> I'm storing true-false for a field in a database table. When outputing the fields of this table, I do a check to see if that field is there. The checking is done with this: <% if @client.state %> . The problem is that if the state is there, but its value is 'false', it won't go into the condition. How can I solve that?
RichGuk [RichGuk!~RichGuk@carina.27smiles.com] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
<heftig> nobitanobi: i assume a nonpresent field would be nil instead of false
Jake232 [Jake232!~textual@5e0e09ea.bb.sky.com] has joined #ruby
<heftig> so try if @client.state.nil?
<nobitanobi> ok
<nobitanobi> let's see
<heftig> er
<heftig> inverted, of course
<heftig> unless @client.state.nil?
<oooPaul> Are you using ActiveRecord?
<nobitanobi> yup
<nobitanobi> yes oooPaul
<oooPaul> Put a question mark on the end. if @client.state?
|e_e| [|e_e|!~|e_e|@ppp-105-168.32-151.iol.it] has joined #ruby
<nobitanobi> ok
<oooPaul> The direct method will return the value of the column. The question mark version of it will ensure that it's properly transformed into the Boolean.
<oooPaul> Problem is, not every database stores true/false the same, and none of them are really Ruby true/false.
<oooPaul> If that doesn't cut it, I'm betting the field isn't actually being "seen" as a Boolean.
h4mz1d [h4mz1d!~hamfz@130.160.181.34] has joined #ruby
<nobitanobi> oooPaul: that is not working
<nobitanobi> it's a tinyint
<nobitanobi> 0 or 1
<oooPaul> Hmm.
<oooPaul> Can you log/output the value of @client.state?
<oooPaul> Remember, in Ruby, 0 evaluates to "true".
<oooPaul> Oh, btw -- what database are you using?
<oooPaul> Postgres stores booleans differently from mysql, for example.
<nobitanobi> mysql
<nobitanobi> let me output that value
<oooPaul> Okay, so that *should* be giving you boolean results if all else is right...
<oooPaul> Yeah, in mysql tinyint(1) should result in a boolean. Hmm.
<nobitanobi> look
<nobitanobi> client.state returns me false
<nobitanobi> when in the database there is a zero
<oooPaul> That's good.
<nobitanobi> but isn't zero + true
<nobitanobi> zero=true in ruby?
<nobitanobi> >O
<oooPaul> 0 evaluates to true in Ruby. But ActiveRecord is smart enough at the database layer to know that tinyint(1) in MySQL is effectively a Boolean, so it translates 0 to Ruby-native "false" and 1 to Ruby-native "true" (and NULL to nil)
xjunior [xjunior!~xjunior@64.39.5.120] has joined #ruby
<nobitanobi> oh I see
<oooPaul> That tells me that your field is returning valid data. Sounds like some logic issue in your code that isn't obvious. :)
<nobitanobi> interesting stuff
<xjunior> looking for a rake channel
billy_ran_away [billy_ran_away!~billy_ran@pool-173-69-211-31.bltmmd.fios.verizon.net] has joined #ruby
<xjunior> is it here?
<oooPaul> In postgres, FWIW, booleans are stored as the characters T and F. :P
<billy_ran_away> Does anyone have a good blog post for doing sets of docs for rdoc?
<nobitanobi> it works fine if I do this: <% unless @consumer.gender.nil? %>
<oooPaul> Cool beans, then.
<billy_ran_away> I want to do an API doc set and a developer doc set...
<nobitanobi> I mean <% unless @client.state.nil? %>
<xjunior> I have a rake task that depends on 2 others, but in a situation where the first fails, it still run the second and if the second succeed, the command line returns 0
<billy_ran_away> So some methods I only want to appear in the developer doc set and others I would want to appear in both...
<nobitanobi> it doesn't work if I just do @client.nil?
<nobitanobi> @client.state.nil?
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<oooPaul> Hang on, need to do something else for a minute.
tsd_usa [tsd_usa!~daniel_d@NYUFGA-WLESSAUTHCLIENTS-03.NATPOOL.NYU.EDU] has joined #ruby
<nobitanobi> sure
<oooPaul> Okay, back.
<oooPaul> I see the issue.
<oooPaul> Oh, wait.
<oooPaul> Yes.
<oooPaul> You said the value of that field was 0, right? So it's not NULL.
<oooPaul> In mysql the Boolean field will have a value of NULL, 0 (false) or 1 (true).
bwlang [bwlang!~anonymous@c-98-216-112-96.hsd1.ma.comcast.net] has joined #ruby
<oooPaul> If the value is 0, then it's not NULL, so your logic "unless @client.state.nil?" should be correct and you'll do whatever with that false value.
<oooPaul> If it really is NULL, that should get skipped if it's NULL.
<oooPaul> I think. You're making my brain hurt, man. :)
speerfissure [speerfissure!~speer@68-184-98-44.dhcp.dgls.ga.charter.com] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-230-203.slkc.qwest.net] has joined #ruby
nari [nari!~nari@2001:268:306:1:e81c:8aff:fe5c:ec6d] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-150.cinci.res.rr.com] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
ctp [ctp!~ctp@dslc-082-083-142-187.pools.arcor-ip.net] has joined #ruby
<nobitanobi> oooPaul: sorry I was away
<nobitanobi> that nil? is working fine
<nobitanobi> if it exists it goes in
<oooPaul> Ah, cool.
<nobitanobi> the thing is
<nobitanobi> I want to select
<nobitanobi> some value depending on that in one lin
<oooPaul> Select in what context?
<nobitanobi> 1 if @client.state
<nobitanobi> in a html selector
<oooPaul> Ah.
<nobitanobi> it's cool, I just need to know the syntax
<nobitanobi> 1 if @client.state 0 otherwise
<nobitanobi> can't that be done in one line in ruby?
luisico [luisico!~luis@95.61.111.6] has joined #ruby
luisico [luisico!~luis@95.61.111.6] has quit ["Saliendo"]
|e_e| [|e_e|!~|e_e|@ppp-105-168.32-151.iol.it] has quit [#ruby]
<oooPaul> @client.state.nil? : 0 : 1
<oooPaul> Er, sorry
<oooPaul> @client.state.nil? ? 0 : 1
<nobitanobi> not nil
<nobitanobi> actually I have to check
<nobitanobi> if it's true or false
<nobitanobi> but yes, I got it
<oooPaul> Oh, hmm.
<nobitanobi> @consumer.state?
<nobitanobi> should do the trick
<oooPaul> I think I'm still missing the point of what you're doing, sorry. :)
<nobitanobi> hehe
<nobitanobi> let me clarify
sgaedu [sgaedu!~ar@masq61.gtn.ru] has joined #ruby
<nobitanobi> I have two states
<nobitanobi> 1 and 0
<nobitanobi> I also have a selector
<nobitanobi> active = 1
<nobitanobi> inactive = 0
<nobitanobi> when I get the result back from the databse, I want to select from an HTML selector
<oooPaul> I think the question is -- are you treating "nil" and "false" as the same thing.
<nobitanobi> not anymore
<nobitanobi> I was
<nobitanobi> now everything is wroking as expected
<nobitanobi> so thank you
<oooPaul> Or are you just differentiating between "nil" and "true/false".
<nobitanobi> :)
<oooPaul> AH, cool.
<oooPaul> Glad I could help in a strangely roundabout way. :)
dnjaramba [dnjaramba!~dnjaramba@41.72.206.142] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<nobitanobi> haha
<nobitanobi> you did
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby
luckyruby [luckyruby!~luckyruby@rrcs-24-129-162-10.se.biz.rr.com] has joined #ruby
c0rn [c0rn!~c0rn@64.125.69.200] has joined #ruby
asobrasil [asobrasil!~asantioli@209.172.32.36] has quit [#ruby]
turtleR [turtleR!turtleR@wireless-197-53.uchicago.edu] has joined #ruby
<turtleR> Hey - anyone there?
<turtleR> Does anyone do R programming here?
<oooPaul> Yo.
<turtleR> Hey Paul -
<turtleR> do you know how to code R ?
<oooPaul> If by R you mean "Ruby" and/or "Rails", then yes.
<oooPaul> Note there's also a #rails group if you're more Rails-focused.
<turtleR> lol - my bad .... I'm actually looking for someone that can program 'R'
<turtleR> as in the biology code :P
<oooPaul> Ah...
<oooPaul> Not me, then. :)
<turtleR> Lol - no worries
<turtleR> do you think one of the other chat windows here would have someone that does?
<oooPaul> Hmm, dunno.
<oooPaul> Any links from the R homepage, maybe?
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
KL7 [KL7!~KL-7@178.120.123.199] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
randym [randym!~randym@EM114-48-102-150.pool.e-mobile.ne.jp] has joined #ruby
Kambus [Kambus!~kambus@62-77-250-57.pool.invitel.hu] has joined #ruby
banisterfiend [banisterfiend!~baniseter@115.189.61.78] has joined #ruby
pu22l3r [pu22l3r!~pu22l3r@108-196-10-55.lightspeed.tukrga.sbcglobal.net] has joined #ruby
minijupe [minijupe!~benlieb@adsl-98-94-161-215.ard.bellsouth.net] has joined #ruby
fuffi [fuffi!~fuffi@93-33-3-255.ip42.fastwebnet.it] has joined #ruby
soulnafein [soulnafein!~david@2.30.39.189] has joined #ruby
yoklov [yoklov!~yoklov@24-177-5-183.dhcp.nwtn.ct.charter.com] has joined #ruby
ikaros [ikaros!~ikaros@dslb-094-219-214-087.pools.arcor-ip.net] has joined #ruby
<yoklov> hm, why is ``{ +: "plus" }'' a syntax error?
<Okasu> hello
artOfWar [artOfWar!~artofwar@nat/yahoo/x-ldlshfbahtqzzbsx] has joined #ruby
<yoklov> hi
fuffi_ [fuffi_!~fuffi@93-33-3-255.ip42.fastwebnet.it] has joined #ruby
<Okasu> http://ideone.com/IpWbZ why this happening? i just want to set first elemant of first array to bar
<Okasu> not every first element of every aray
<oooPaul> yoklov, are your first two quotes really backwards?
<yoklov> err
<yoklov> the stuff between `` and '' are the code
<oooPaul> Oh, that's just your quote.
<oooPaul> +: is ambiguous.
<oooPaul> If you really want a symbol key, try :+ => 'plus'
<canton7> Okasu, you're assigning the arrays by value... Try the block form of Array.new
<yoklov> hm, i figured, do you know what exactly what it thinks it is?
<yoklov> yeah, thats what i am using now
<oooPaul> Yeah. { :+ => "plus" } works
<oooPaul> I don't like the hash style. :P
<yoklov> the { foo: bar } style?
<oooPaul> Er, the "new" hash style
<oooPaul> Yeah.
<oooPaul> I prefer the rocketships.
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<oooPaul> Especially because then it's really obvious when the key is either a symbol, hash, or variable.
<Okasu> canton7: wha, i'm whant to set up every element of 5 arrays to nil
<yoklov> right, but the value in my hash is a lambda
<yoklov> so ``:+ => ->(a, b) { a + b }'' looks weird
<oooPaul> { :foo => "bar" } is obviously a symbol key, { foo => "bar" } is obviously a variable, and { "foo" => "bar" } is obviously a string key.
<yoklov> arrows everywhere :p
<canton7> Okasu, foo = Array.new(5){ [nil]*5 }
<oooPaul> Putting the lambda in there with the regular markup ISN'T weird? :)
<Okasu> canton7: oh, nice, thx a lot
<oooPaul> You could use the word "lambda" and remove the confusion.
<yoklov> right
<yoklov> i was just thinking that
<yoklov> the real problem is the lmabda syntax
<oooPaul> Without knowing your actual problem space... Would it make more sense to use a Proc?
<yoklov> isn't the only difference what return does?
<yoklov> this is a toy RPN calculator
shadoi [shadoi!~Adium@gw.sfo.cloudscaling.com] has joined #ruby
<oooPaul> Not sure, I don't play with lambdas all that much...
<oooPaul> But if that's the only difference, seems like it might be cleaner. :)
<yoklov> Ah, I learned to program in scheme, iirc the difference between proc and lambda is if you use "return" in a proc it returns from the function where you're calling it
kerframil [kerframil!~kerframil@cpc2-enfi16-2-0-cust659.hari.cable.virginmedia.com] has joined #ruby
<yoklov> which is basically never what i want (not that I really ever use return)
kerframil [kerframil!~kerframil@gentoo/user/kerframil] has joined #ruby
<oooPaul> I haven't done Scheme since '93, so... :)
hubub [hubub!~hubub@94-193-241-95.zone7.bethere.co.uk] has joined #ruby
<yoklov> haha you've been at it far longer than me then
<oooPaul> :D
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.53] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
cobragoat [cobragoat!~cobragoat@64-71-15-218.static.wiline.com] has joined #ruby
enherit [enherit!~enherit@70-36-236-228.dsl.static.sonic.net] has joined #ruby
minijupe [minijupe!~benlieb@24-178-149-251.dhcp.spbg.sc.charter.com] has joined #ruby
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
rook_flood [rook_flood!~textual@3.d3bed1.client.atlantech.net] has joined #ruby
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby
Nss [Nss!~mosca@2001:1418:16b:1:bcc5:b4ff:fe10:cd61] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
billy_ran_away [billy_ran_away!~billy_ran@pool-173-69-211-31.bltmmd.fios.verizon.net] has joined #ruby
xxtjaxx [xxtjaxx!~xxtjaxx@kde/developer/marschke] has joined #ruby
<hubub> evening all
<hubub> managed to fix all the ruby issues I was having so just wanted to thank anyone in here that gave me assistance before
<xxtjaxx> Hi! I have a problem with running a ruby app (haml) from the console it writes the the following to the console: http://paste.debian.net/155512/ when I try to run it as can be seen in the first line of the paste. Why is that? Do I have to do more magik than that to get it to run? I just what it to compile my haml to html.
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
nari [nari!~nari@p929507.totrnt01.ap.so-net.ne.jp] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
swarley [swarley!~swarley@ip68-10-212-39.hr.hr.cox.net] has joined #ruby
enherit [enherit!~enherit@70-36-236-228.dsl.static.sonic.net] has joined #ruby