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/
_whitelogger [_whitelogger!~whitelogg@kaunan.whitequark.org] has joined #ruby
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
moeSeth [moeSeth!u1029@gateway/web/irccloud.com/x-avlslpuquropllzp] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-fjvcoulsaoamhqwe] has joined #ruby
srid [srid!u3297@unaffiliated/srid] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-fjvcoulsaoamhqwe] has joined #ruby
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
kaichanvong [kaichanvong!u2773@gateway/web/irccloud.com/x-ejxkicaxmaabrbys] has joined #ruby
dotemacs [dotemacs!u801@gateway/web/irccloud.com/x-nryueolcjoelncox] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
sjang [sjang!~Adium@209.119.253.66] has joined #ruby
rexamophone [rexamophone!u4239@gateway/web/irccloud.com/x-ahrdlsgzftulkgdv] has joined #ruby
dkannan [dkannan!u480@gateway/web/irccloud.com/x-lsjrnduhyqhgurqk] has joined #ruby
cooper [cooper!~chatzilla@unaffiliated/furryfishy] has joined #ruby
Adkron [Adkron!~amos@66.236.120.154] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-fslxabgdprkkoazh] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-hhmbyqbydtrcayzk] has joined #ruby
srid [srid!u3297@unaffiliated/srid] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-hhmbyqbydtrcayzk] has joined #ruby
dennda [dennda!~dennda@ubuntu/member/dennda] has joined #ruby
_obiJuan [_obiJuan!~ysiad1@167-6.nyc.dsl.access.net] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-iwmumwhsutkpaqmh] has joined #ruby
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby
jingoro_ [jingoro_!6c006bba@gateway/web/freenode/ip.108.0.107.186] has joined #ruby
jingoro_ [jingoro_!6c006bba@gateway/web/freenode/ip.108.0.107.186] has joined #ruby
pvh [pvh!u717@gateway/web/irccloud.com/x-gzbqoqlqqbqgwnse] has joined #ruby
pvh [pvh!u717@gateway/web/irccloud.com/x-gzbqoqlqqbqgwnse] has joined #ruby
Ferdev [Ferdev!~fer@35.Red-79-154-198.dynamicIP.rima-tde.net] has joined #ruby
Ferdev [Ferdev!~fer@35.Red-79-154-198.dynamicIP.rima-tde.net] has joined #ruby
_whitelogger [_whitelogger!~whitelogg@kaunan.whitequark.org] has joined #ruby
sycr [sycr!~sycr@206.223.165.253] has joined #ruby
xpot-mobile [xpot-mobile!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
h4mz1d [h4mz1d!~hamfz@DHCP-212-246.wireless-resnet.ua.edu] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has joined #ruby
_whitelogger has joined #ruby
Axsuul has joined #ruby
n3m has joined #ruby
Axsuul has joined #ruby
Axsuul has joined #ruby
Boohbah has joined #ruby
Boohbah has joined #ruby
Axsuul has joined #ruby
patricksroberts has joined #ruby
Axsuul has joined #ruby
hubub has joined #ruby
Axsuul has joined #ruby
Axsuul has joined #ruby
Axsuul has joined #ruby
Axsuul has joined #ruby
MetaCosm has joined #ruby
wroathe has joined #ruby
hubub_ has joined #ruby
zastaph has joined #ruby
fermion has joined #ruby
hubub has joined #ruby
DefV has joined #ruby
hubub_ has joined #ruby
wroathe has joined #ruby
skrewler_ has joined #ruby
_obiJuan has joined #ruby
xyzodiac has joined #ruby
<xyzodiac> join cyanogen
<xyzodiac> sorry ignore that
kreantos has joined #ruby
<samuelkadolph> Too late, my eyes have captured the photons emmitted from my screen and my brain has processed them as text and I've read it and now it's in my memory.
Sliker has joined #ruby
Axsuul has joined #ruby
ePirat has joined #ruby
denysonique__ has joined #ruby
Axsuul has joined #ruby
blooberr has joined #ruby
Guest76298 has joined #ruby
matthias3 has joined #ruby
Seisatsu has joined #ruby
Axsuul has joined #ruby
Axsuul has joined #ruby
hubub_ has joined #ruby
nyrb has joined #ruby
banisterfiend has joined #ruby
bradly has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
Skaag_ has joined #ruby
dotemacs has joined #ruby
ikaros has joined #ruby
ker3x has joined #ruby
<ker3x> frrrrrrriiiiiiiiiiiiendly greetings #ruby \o/
newbold has joined #ruby
dkannan has joined #ruby
<ker3x> i have some new awesome question :)
kapowaz has joined #ruby
<burgestrand> ker3x: \o/
<ker3x> burgestrand: \o/
<burgestrand> \o\
<ker3x> \o/ ^o^ /o_ /o\
<ker3x> (woops)
<burgestrand> must stretch your legs in cartwheel!
<ker3x> :)
<burgestrand> ;)
<blueadept> in ruby does === equal == ?
<ker3x> So so ... i have this finely crafted line of ruby : object["clone"] = proc { |receiver, context| receiver.clone }
<burgestrand> no
<blueadept> k
<burgestrand> blueadept: in ruby, both === and == are method calls
pen has joined #ruby
<ker3x> you ask if === = == ?
<burgestrand> blueadept: often, === is an operator that means "matching" while == usually means "equal"
<rippa> === is used in case
<burgestrand> indeed
<rippa> it's not for direct use
<burgestrand> not indeed
<burgestrand> klass === descendant
jacktrick has joined #ruby
<rippa> descendant.is_a? klass
pkondzior has joined #ruby
jamiejackson has joined #ruby
<ker3x> if === and == are both method, then === equal == is true if your definition of "equal" is flexible enough.
<ker3x> (sorry)
robert__ has joined #ruby
<burgestrand> I use it in one of my libraries where all library objects can be directly translated to strings
<burgestrand> x == y would compare the objects themselves, while x === y would cast them to strings and then compare then; this way even two different objects (even if from different classes) could be considered equal :d
<robert__> shevy: haii. :D
<tommylom1ykins> hmm
<tommylom1ykins> Is there no support for ruby in netbeans 7.1
<tommylom1ykins> ?
dcarper has joined #ruby
pvh has joined #ruby
phantomfake has joined #ruby
BrianE has joined #ruby
<shevy> hi robert__
robert__ has joined #ruby
<robert_> how goes it? :D
flak has joined #ruby
spanx has joined #ruby
denysonique__ has joined #ruby
patricksroberts has joined #ruby
jbpros has joined #ruby
flagg0204 has joined #ruby
skrewler has joined #ruby
stephans has joined #ruby
techhelp has joined #ruby
kaichanvong has joined #ruby
tehgeekmeister has joined #ruby
florentg2 has joined #ruby
codespectator has joined #ruby
srid has joined #ruby
srid has joined #ruby
srid has joined #ruby
florentg2 has quit [#ruby]
odinswan1 has joined #ruby
odinswand has joined #ruby
tvw has joined #ruby
MetaCosm has joined #ruby
enroxorz has joined #ruby
<shevy> robert_ hmm it goes it goes ... I am trying to "clone" a browsergame, in ruby
perturbedpanda has joined #ruby
Azure has joined #ruby
BrianE has joined #ruby
Nisstyre has joined #ruby
iocor has joined #ruby
crdueck has quit [#ruby]
<shevy> it's a bit boring kinda
jacktrick has joined #ruby
jbpros has joined #ruby
c0rn has joined #ruby
dnyy has joined #ruby
hooper_ has joined #ruby
mythmon has joined #ruby
rootapex has joined #ruby
jordanstephens has joined #ruby
<Boohbah> hey shevy
<Boohbah> shevy: /join ##computationallinguistics
ChampS666 has joined #ruby
wereHamster has joined #ruby
moshee has joined #ruby
dinduks has joined #ruby
<robert_> shevy: I see. I'm working on a CSV parser for a project at work. trying slowly to replace our mountain of php. x.x
<shevy> yay!
<robert_> indeed. :D
denysonique__ has joined #ruby
<robert_> it's boring as well.
<apeiros_> robert_: why don't you just use the stdlib csv lib?
<robert_> note that "csv parser" for me doesn't exactly mean writing a from-scratch parser.
<apeiros_> well, with the csv lib, there's no parsing left to do…
<robert_> yeah
<robert_> I know
<apeiros_> then you confuse me…
<robert_> I guess my terms are confusing
<robert_> a CSV parser to me, is an app that uses a CSV library to parse CSV files.
_0biJuan has joined #ruby
<robert_> I make a distinction between a CSV parser and a CSV library
visof has joined #ruby
<robert_> I guess that's confusing.. sorry.
<shevy> how is it that after some time I find my old design to be lacking
<apeiros_> hm, actually I think that's reasonable
* apeiros_ wonders what better terms would be
looopy has joined #ruby
Indian has joined #ruby
<robert_> it would be stupid to write a CSV library from scratch.
<robert_> especially with 1.9's CSV library
<apeiros_> robert_: hm, not that difficult. though, most people forget to attribute for its subtleties.
* apeiros_ has been stupid enough to do it for a couple of times…
<robert_> heh :p
<robert_> yeah I wrote one too in C++
<shevy> !!!
<robert_> but then it broke and such
<shevy> C++
<shevy> PHP
<shevy> you are in hell man!
<robert_> lol
<robert_> I actually enjoy writing compiled code.
<robert_> I just don't like php's "Oh, what you thought was an int is actually a string!"
Squarepy has joined #ruby
<robert_> shevy: I'm actually a systems developer at heart.
<shevy> ok
<shevy> then you deserve your place down there
<shevy> :>
<robert_> but I find that C++ is too slow and cumbersome for things like parsing c++ and such. :p
<robert_> shevy: I actually find that I enjoy writing low-level code like operating systems and such. :p
<robert_> but nobody has much use for us these days
<robert_> :/
luckyruby has joined #ruby
<shevy> well
<shevy> I'd enjoy it too, if I wouldn't have to think about boring details
zulax has joined #ruby
<shevy> or even worse
<robert_> hah, I don't mind the billions of little details that go into planning it. :p
<shevy> maximizing for speed
<shevy> I am way too impatient for that
<robert_> optimization is fun.
<shevy> hehe
<robert_> aha- I'm also impatient, but mostly it just turns into determination :p
JamieD has joined #ruby
odinswand has joined #ruby
odinswan1 has joined #ruby
Seisatsu has joined #ruby
tris2k has joined #ruby
<shevy> hmm
csprite has joined #ruby
<shevy> screw this, I will rewrite 5 years old code rather than continue try and fix it
<shevy> I no longer understand what is going on :(
<apeiros_> shevy: when you rewrite it, write it in small testable parts
<shevy> yeah
<shevy> the old class has 4560 lines (including empty lines) :)
<shevy> hmm more than 1/3 is comments though... almost one half
<shevy> and of the remaining 50% ... half of that is output to the user
<shevy> but still it is chaotic
Squarepy_ has joined #ruby
Illiux has joined #ruby
<shevy> robert_ do you use linux by the way?
<shevy> I am looking for a tester eventually ... :P
ceej has joined #ruby
cloke has joined #ruby
looopy has joined #ruby
<cloke> is there a way to use curly quotes in a ruby string?
odinswand has joined #ruby
<oooPaul> Curly quotes?
<burgestrand> sure, just write them
tommyvyo has joined #ruby
<robert_> shevy: arch. :p
<cloke> hmm… when I add them I get unexpected $end
<shevy> cloke: what are you doing exactly?
<robert_> shevy: ArchLinux, that is. ;p
<robert_> :p *
<shevy> robert_ hehe ... like manveru
<robert_> heh :p
<burgestrand> cloke: inside a ruby string, not as its’ delimiers
<burgestrand> delimiters*
<cloke> thanks, turns out only my seed file was being interpreted as ASCII
Seisatsu has joined #ruby
<eka> hi all.. noob here. is there anything to substract a date? like mydatetime - <3days> (could be years, months, days,seconds) and get a datetime as result?
<eka> in python I do mydatetime - timedelta(days=3)
Squarepy_ has joined #ruby
geekbri has joined #ruby
munx has joined #ruby
<any-key> 3.days.ago
<any-key> eg: Date.today - 3.days
<eka> any-key: 3.days doesn't work
<any-key> require 'datetime'
<any-key> oops require 'date'
<eka> any-key: neither
<eka> any-key: did you try that?
<any-key> shit, I was messing with that in the rails console
axl_ has joined #ruby
<tommylom1ykins> slightly more ugly, but you can do integer subtraction on dates
randym has joined #ruby
<tommylom1ykins> Time.now - 1 * 60 * 60 * 24 ===> a time representing yesterday
pac1 has joined #ruby
<eka> tommylom1ykins: yes ... also you can use to_i
nej has joined #ruby
<eka> but thought there was a simpler way
<eka> any-key: that's good but it works only with days. :P
fayimora has joined #ruby
<any-key> you can subtract two datetimes
<eka> any-key: But I want to be able to say... now - 24hs
macmartine has joined #ruby
<eka> any-key: I would have to do all the math for creating the other DateTime... so the subtraction loose its sense
<eka> any-key: that's a rails context
vraa has joined #ruby
beemon has joined #ruby
<apeiros_> eka: because datetime - 24*86400 is so difficult?
<methodfree> just put everything to seconds
<methodfree> subtract
<methodfree> then go back
<methodfree> or minutes.
<eka> apeiros_: is not difficult but then I have to convert it back
<apeiros_> you have to convert *what* back?
<apeiros_> the result will be a datetime…
<eka> I was just wondering if there was a better way like in python
<eka> mmm
<eka> ok
denom has joined #ruby
<apeiros_> you should consider reading docs occasionally…
<linduxed> i've noticed that rails generates some .scss files in my stylesheet dirs
<shadoi> eka: use Chronic if you want the easy way out.
<eka> apeiros_: but the subtraction is in days... isn't it?
<linduxed> now i've got only one problem with this
<apeiros_> eka: docs. really. Time#- is seconds, Date/DateTime#- is days
<linduxed> i _really_ prefer sass over scss
<apeiros_> linduxed: #rubyonrails
<linduxed> is there some way to have it generate that instead?
<methodfree> sass > *
<apeiros_> linduxed: and you can change the behaviour
<linduxed> apeiros_: oh
<linduxed> trye
<linduxed> *true
<denom> Hey I'm having a problem with some invalid utf-8 and the string encode function,
<linduxed> apeiros_: ok then
<eka> apeiros_: using ri not helping a lot.. but I appreciate your concern
trebaum has joined #ruby
<apeiros_> I always forget it, but something like config.sass.preferred_style = :sass. google can help.
<denom> If I use Iconv.conv it strips the charaters out, but the built in encode function does not
<shadoi> eka: require 'chronic'; Chronic.parse('24 hours ago')
<apeiros_> eka: errr, srsly?
<apeiros_> eka, how's this not helpful? "Difference---Returns a new time that represents the difference between two times, or subtracts the given number of seconds in numeric from time."
<eka> apeiros_: didn't found that, thanks for pointing out
QKO has joined #ruby
er1c_ has joined #ruby
<apeiros_> eka: at what the heck did you look then?
<apeiros_> that's what ri gives you for Time#-
<eka> apeiros_: I was looking at DateTime...
<eka> apeiros_: remember that I said that I'm noob at ruby ;)
<apeiros_> hm, that one looks like broken docs, granted
<apeiros_> I'm pretty sure DateTime#- wasn't always like that…
n8ji has joined #ruby
jgrevich has joined #ruby
<shadoi> denom: you probably need to use force_encoding
Targen has joined #ruby
JamieD_ has joined #ruby
asobrasil has quit [#ruby]
<eka> apeiros_: mydatetime - (seconds) does the trick.. thanks!
JamieD_ has joined #ruby
nari has joined #ruby
<denom> shadoi, the encoding is set correctly, there is garbage bytes (non utf-8) in the file however
<denom> using Iconv to convert from utf-8 to utf-8 with a "replace" option for bad bytes seems to work
<denom> using the built in string.encode with the various replace options does not work
<denom> (by work I mean it strips the characters out)
<denom> when I require 'iconv' I get a deprecation warning
<denom> So there must be a way to strip these characters in ruby using non-deprecated libraries?
<apeiros_> eka: really odd, the documentation on ruby-doc.org on Date#- is correct, the source for it is the same as ri…
tomzx has joined #ruby
<shadoi> denom: doesn't look like it, may be bugs in the replace implementation...
jamw has joined #ruby
Squarepy_ has joined #ruby
Squarepy_ has joined #ruby
stringoO has joined #ruby
<shevy> bugs bugs bugs
<shevy> they are EVERYWHERE
lewix has joined #ruby
<apeiros_> get a spray
<apeiros_> or an exterminator :)
pu22l3r has joined #ruby
<denom> the only way to completely eliminate bugs is to eliminate the code
<shevy> denom yeah that is true but also sad :(
<shevy> Imagine if we'd have software that could not have any bugs
<shevy> being creative is nice
<shevy> fixing bugs sucks
<denom> Be creative at writing non-code :) It feels good to eliminate big chunks of useless code
<denom> someday, I finish up a day at work and close my empty file...
<shevy> hmm
<shevy> one day I should try to find out what needs to be done to have documentation == code
<denom> shevy, isn't that the essential dichotomy? representation and abstraction ?
c0rn has joined #ruby
bbttxu has joined #ruby
<Squarepy> shevy, why not use literate programming ;)
<shevy> denom well I feel I only need abstraction when things became complex anyway :)
<shevy> Squarepy it doesn't seem to extend far enough
ikaros has joined #ruby
<shevy> or it just doesn't seem to go off
<shevy> or perhaps it was never done right
rramsden has joined #ruby
<shevy> but the non literate programming dominates everything
<Squarepy> I encountered a book on 3d rendering that used literate programming throughout
<shevy> hmm
<shevy> how did that go? you have a sample?
<Squarepy> essentially they use informative placeholders 'text' that are progressively filled in with code
<Squarepy> like dijkstra in his 1976 book
baroquebobcat has joined #ruby
<Squarepy> I could send the file I think
<shevy> hmm hmm hmm
<Squarepy> yeah, forget about it ;)
<shevy> hehe
<shevy> tried to find a polite way to say that!
colint_ has joined #ruby
<Squarepy> k
king313 has joined #ruby
king313 has joined #ruby
philcrissman_ has joined #ruby
jcromartie has joined #ruby
stephenjudkins has joined #ruby
BigFatFatty has joined #ruby
daglees has joined #ruby
daglees has joined #ruby
savage- has joined #ruby
nyrb has joined #ruby
yfeldblum has joined #ruby
dandrinkard has joined #ruby