apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
Rious has joined #ruby
xaq has quit [Remote host closed the connection]
undersc0re97 has joined #ruby
undersc0re97 has quit [Client Quit]
tomzx has left #ruby [#ruby]
mahmoudi_ has quit [Ping timeout: 250 seconds]
benlangfeld has joined #ruby
cdepue has joined #ruby
<benlangfeld> Evening gents. I'm struggling to find any info on how to match a string against a regex in a Ruby C extension. I want to do the equivalent of this in C: "foo".match(/^f(\w*)/
<benlangfeld> Can anyone help?
<offby1> not me :-(
stephenjudkins has quit [Quit: stephenjudkins]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<theRoUS> has anyone ever tried to document code with *both* rdoc *and* yard?
tomzx has joined #ruby
<davidcelis> why
<davidcelis> why would you do such a thing
<fowl> benlangfeld, do show-source String#match
cdepue_ has quit [Ping timeout: 264 seconds]
dnyy has quit [Remote host closed the connection]
saschagehlich has quit [Quit: saschagehlich]
neiZ has quit [Quit: Lost terminal]
<benlangfeld> fowl: That helps only if I create the regex in Ruby code. I want to create it in C.
tomzx has quit [Client Quit]
<benlangfeld> It's not performing the match that's difficult, I can just use rb_funcall. Creating the regex is more difficult, because it's not a C language primative
Ontolog has joined #ruby
<fowl> just copy that
<fowl> get_pat()
<fowl> etc
<benlangfeld> fowl: I'm sorry, I don't think you're following what I'm saying.
<benlangfeld> The regex doesn't come from calling Ruby code. I have to create it in C.
cherrypeel has quit [Ping timeout: 252 seconds]
<offby1> benlangfeld: isn't there some generic way, from C, to create a new Ruby object, then invoke methods on it?
benson has quit [Quit: Leaving]
<benlangfeld> I'm really not sure I can do that here.
<benlangfeld> Aha. rb_reg_initialize_m might be what I was looking for
<offby1> I've never done any C stuff in Ruby, but I'd be surprised if there weren't a way to do that
adamkittelson has joined #ruby
cdepue has quit [Remote host closed the connection]
<benlangfeld> I really struggle with imperative languages
chson has joined #ruby
jimeh has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 248 seconds]
davidcelis has quit [Ping timeout: 248 seconds]
tatsuya_o has quit [Read error: Connection reset by peer]
<theRoUS> davidcelis: because some people like yard and some like rdoc
tatsuya_o has joined #ruby
<theRoUS> whoops, he's gone
<benlangfeld> theRoUS: You're suggesting inconsistent doc formats in one codebase? Madness.
<theRoUS> plus, they each have pros and cons. primarily cons.
<theRoUS> yay madness
<benlangfeld> Inconsistent anything is a bad idea, but doc formats are an obvious one.
<offby1> A foolish hobgoblin is ... uh ...
beneggett has joined #ruby
Markvilla has joined #ruby
<theRoUS> well, if either one (or a third one) recognised the other's syntax -- or if there were a doc system that didn't have their drawbacks, i'd be happy to switch
erichmenge has quit [Quit: erichmenge]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
etehtsea has quit []
dbe has quit [Remote host closed the connection]
<theRoUS> all right, let's consider me chastened. :-) if you set up a gem working tree with jeweler, is there any way to conveniently change the options without having to manually edit things?
wunz has quit [Ping timeout: 250 seconds]
emmanuelux has joined #ruby
<theRoUS> i imagine that 'rdoc vs yard' is a lower-energy form of 'vi vs emacs', but is there an emerging canon?
wunz has joined #ruby
<benlangfeld> theRoUS: YARD
zomb1e has joined #ruby
<theRoUS> mmph. which points to my last question. when i set up my gem wd, i told jeweler to support rdoc, but if i want to switch to yard, is there a way short of finding out what jeweler *would* have done (Rakefile, etc.) and manually making those changes?
kevinbond has quit [Ping timeout: 240 seconds]
<theRoUS> benlangfeld: thanks for your patience and help, btw.
Targen has quit [Ping timeout: 245 seconds]
<benlangfeld> theRoUS: I would suggest not using jeweler, putting yard in your gemspec, and adding a rake task for yard.
<benlangfeld> theRoUS: I have quite a strong hatred for Jeweler and Hoe ;)
<theRoUS> benlangfeld: i already did use jeweler, worse luck.
<benlangfeld> theRoUS: It's not too late. You can escape it within minutes ;)
<theRoUS> benlangfeld: /me is largely ears
lockweel has quit [Ping timeout: 255 seconds]
Peregrinu5 has joined #ruby
<benlangfeld> theRoUS: Just create a gemspec, and remove all of the jeweler junk from your Rakefile
justsee has joined #ruby
andrewhl has quit [Remote host closed the connection]
quotemstr has joined #ruby
tiripamwe has quit [Ping timeout: 245 seconds]
cherrypeel has joined #ruby
<quotemstr> Does ruby have a good repl?
<quotemstr> Just running "ruby" by itself produces something very Perl-like.
ephemerian has quit [Quit: Leaving.]
<benlangfeld> Yes, there's irb which is built-in (stands for Interactive Ruby), or Pry
Jaxel has joined #ruby
<quotemstr> Ah, cool. Thanks.
<Jaxel> okay so
<Jaxel> i think i figured out my ocra problem a bit
<Jaxel> this line: @of << [OP_CREATE_FILE, Ocra.dospath(tgt), str.size, str].pack("VZ*VA*"), the file descriptor there is 'OP_CREATE_FILE', which is defined as '2' in the module
<Jaxel> i looked up bad file descriptor errors and somebody said that it happens if the numeric value is invalid
Markvilla has quit [Ping timeout: 264 seconds]
g_rotbart has quit [Read error: Connection reset by peer]
Peregrinu5 has quit [Ping timeout: 250 seconds]
trend has quit [Quit: trend]
quotemstr has left #ruby [#ruby]
zomb1e has quit [Quit: I'm tired. Real tired.]
g_rotbart has joined #ruby
jsilver has quit [Remote host closed the connection]
Lachryma has quit [Read error: Operation timed out]
btanaka has quit [Remote host closed the connection]
mdpatrick has joined #ruby
<Jaxel> I feel like this should be a problem with either my system backup grabbing the file as soon as it's created or me not running as admin, but it's neither
ZachBeta has joined #ruby
mahmoudimus has joined #ruby
jameshyde has quit [Quit: Page closed]
freeayu has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<Jaxel> oh what
<Jaxel> what
<Jaxel> awwww damn installing 1.3.0.rc1 worked
<Ontolog> [1,2,3][3,0] == [] while [1,2,3][4,0] == nil, I don't get it
<benlangfeld> Ontolog: What don't you get?
<Ontolog> benlangfeld: [1,2,3][3] == nil and [1,2,3][4] == nil, which makes sense
<Ontolog> benlangfeld: so why this inconsistency with [start,end] ?
<benlangfeld> Oh, good question. 'fraid I don't know the answer
kenperkins has quit [Ping timeout: 264 seconds]
LBRapid has quit [Quit: Computer has gone to sleep.]
piotr has quit [Ping timeout: 245 seconds]
yoklov has quit [Quit: computer sleeping]
subbyyy has joined #ruby
stephenjudkins has joined #ruby
yoklov has joined #ruby
bigoldrock has quit [Quit: Leaving.]
hynkle has quit [Quit: Computer has gone to sleep.]
daniellutz_ has quit [Quit: daniellutz_]
dnyy has joined #ruby
bradhe has quit [Remote host closed the connection]
syamajala has quit [Remote host closed the connection]
kevinbond has joined #ruby
Aaton is now known as Aaton_off
mahmoudi_ has joined #ruby
daniel_hinojosa has quit [Ping timeout: 245 seconds]
mahmoudimus has quit [Ping timeout: 246 seconds]
ukd1 has joined #ruby
Lachryma has joined #ruby
healpay has joined #ruby
stewart_ has quit [Quit: Leaving.]
<ukd1> hi guys i'm having some issues with a hash and map - could someone have a look? https://gist.github.com/3080256 I'm expecting the constant to not be modified, but it is being changed
Ontolog has quit [Remote host closed the connection]
Markvilla has joined #ruby
<seanstickle> Constants aren't constant
hynkle has joined #ruby
<ukd1> seanstickle, yep - but still why is it being modified if I'm cloning it?
<seanstickle> Shallow copy
daniel_hinojosa has joined #ruby
<ukd1> seanstickle, is there a smarter way of doing this?
justsee has quit [Quit: Leaving...]
<seanstickle> Deep copy.
freeayu has quit [Ping timeout: 240 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<ukd1> seanstickle, and that's the best way of modifying an array and getting the output?
tiripamwe has joined #ruby
zodiac1111 has joined #ruby
tiripamwe has quit [Read error: Connection reset by peer]
mohits has joined #ruby
tiripamwe has joined #ruby
<fowl> b = browsers.map { |browser| b = browser.clone; b[:enabled] = ... }
<seanstickle> Or just YAMLize and then de-YAMLize
<seanstickle> Which is how we do deep copies when we really need them
<seanstickle> Or JSONize and de-JSONize
<seanstickle> As you prefer
<benlangfeld> Or use ruby's Marshall, which might be faster
shadoi has quit [Quit: Leaving.]
<fowl> don't you want to make BROWSERS into a hash like { 'ie8' => true, .. anyways, it seems saner
shadoi has joined #ruby
<Jaxel> man happy wheels has been dying lately
<fowl> or define the behavior of a browser in a class
Peregrinu5 has joined #ruby
<seanstickle> True
<seanstickle> bar = Marshal.load(Marshal.dump(foo))
stewart_ has joined #ruby
<seanstickle> Works right nice
<fowl> seanstickle, is there a deep copy method in ruby? i write one every time i need it ._.
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
<seanstickle> fowl: I pretty much just wrote it
mrsolo has quit [Quit: Leaving]
thecreators has quit [Ping timeout: 265 seconds]
dinkytoy has joined #ruby
banisterfiend has quit [Remote host closed the connection]
Synthead has joined #ruby
shadoi has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
ringotwo has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
banisterfiend has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
nateberkopec has joined #ruby
<offby1> fowl: I use Marshall.load(Marshall.dump(whatever))
mahmoudimus has joined #ruby
benlangfeld has quit [Quit: Leaving.]
freeayu has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
Spooner has quit []
g_rotbart has quit [Remote host closed the connection]
dinkytoy has quit []
<theRoUS> bleh. how on earth do i specify inline italic, bold, or monospace (or combinations thereof) in yard?
dross_ has joined #ruby
qko_ has joined #ruby
nazty has joined #ruby
kenperkins has joined #ruby
dinkytoy has joined #ruby
dross has quit [Read error: Connection reset by peer]
mdszy has quit [Read error: Connection reset by peer]
qko has quit [Read error: Connection reset by peer]
mdszy has joined #ruby
SegFaultAX|work2 has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
dinkytoy has quit [Client Quit]
dinkytoy has joined #ruby
kenichi has quit [Remote host closed the connection]
mpereira has joined #ruby
trend has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
adeponte has joined #ruby
nateberkopec has quit [Ping timeout: 244 seconds]
perryh_away is now known as perryh
davidpk has joined #ruby
nari has joined #ruby
jeff_sebring has quit [Quit: Leaving]
bbttxu has quit [Quit: bbttxu]
ttilley_off is now known as ttilley
iamjarvo has joined #ruby
<iamjarvo> is there a way to make get_multiples more object oriented. say if i wanted to check for 2 also
voodoofish430 has quit [Quit: Leaving.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
freeayu__ has joined #ruby
capsule_toy has joined #ruby
dinkytoy has quit []
davidcelis has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
freeayu has quit [Ping timeout: 245 seconds]
monkegji_ has quit [Remote host closed the connection]
Targen has joined #ruby
davidcelis has joined #ruby
bradhe has joined #ruby
nazty has quit [Ping timeout: 250 seconds]
Markvilla has quit [Ping timeout: 264 seconds]
jds has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
jds has joined #ruby
cherrypeel has quit [Quit: Leaving]
yonggu_ has joined #ruby
jrhorn424 has joined #ruby
greyEAX has joined #ruby
yonggu has quit [Ping timeout: 264 seconds]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
Hanmac1 has joined #ruby
pu22l3r has joined #ruby
itnomad has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
JustinCampbell has quit [Remote host closed the connection]
Goles has joined #ruby
Synthead has quit [Ping timeout: 240 seconds]
apok has quit [Ping timeout: 245 seconds]
ukd1 has quit [Quit: Lost terminal]
uris has joined #ruby
perryh is now known as perry
L-----D has joined #ruby
brianpWins has quit [Quit: brianpWins]
davidcelis_ has joined #ruby
itnomad has joined #ruby
monkegjinni has joined #ruby
ben_alman has quit [Excess Flood]
<theRoUS> rdoc supports *bold* _italic_ and +monospace+ -- how does yard signal those face changes?
davidcelis has quit [Ping timeout: 244 seconds]
Markvilla has joined #ruby
davidcelis_ has quit [Read error: Connection reset by peer]
davidcelis_ has joined #ruby
<offby1> eww, using "next" inside a "map" makes my brain hurt
Markvilla has quit [Ping timeout: 255 seconds]
k_89 has quit [Ping timeout: 255 seconds]
greyEAX has quit [Read error: Connection reset by peer]
Araxia has quit [Quit: Araxia]
patient has quit [Quit: leaving]
ben_alman has joined #ruby
kvirani has joined #ruby
Synthead has joined #ruby
<offby1> iamjarvo: you don't want get_multiples to be more object oriented. Rather, you want it to be more functional. Like this: def get_multiples; (1..@upper_bound).find_all{|i| (i % 3 == 0) || (i % 5 == 0) }; end
jarred has quit [Quit: jarred]
* offby1 has spoken
sepp2k1 has quit [Read error: Connection reset by peer]
andrewhl has quit [Remote host closed the connection]
dev_ryan70 has joined #ruby
Synthead has quit [Read error: Operation timed out]
vitor-br has joined #ruby
ackz has joined #ruby
noganex has quit [Ping timeout: 244 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
bglusman has joined #ruby
weasels has joined #ruby
weasels has quit [Remote host closed the connection]
dev_ryan70 has quit [Remote host closed the connection]
<epochwolf> I'm working on a fork of https://github.com/jlapier/epubbery and I've noticed that the Gemfile lists rubyzip as a dependency but it's not in the gemspec. It is not possible to use this gem without this library installed, should the gemspec contain that file?
dev_ryan70 has joined #ruby
noganex has joined #ruby
<iamjarvo> offby1: why would i want it more functional though? isn't that limiting? I was thinking i could just pass in the args as an array and iterate over them, so then i can get multiples of any number
<iamjarvo> offby1: i guess i can leave off the next since i am calling compact
greasegum has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<offby1> iamjarvo: you want it more function because I'm an anti-OO, pro-functional bigot :)
<offby1> seriously though, mine's a lot simpler than yours.
ZachBeta has joined #ruby
tama has quit [Ping timeout: 255 seconds]
Peregrinu5 has quit [Ping timeout: 248 seconds]
rippa has joined #ruby
<iamjarvo> offby1: haha i see
savage- has quit [Read error: Connection reset by peer]
greyEAX has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
jgrevich has quit [Quit: jgrevich]
ZachBeta has quit [Client Quit]
k_89 has joined #ruby
<greasegum> offby1:: you nick appeals to me
<greasegum> *your
roadze has joined #ruby
roadze has quit [Remote host closed the connection]
<offby1> do you wish to sign up for my newsletter?
<offby1> It might get delivered to your next-door neighbor by accident.
<shevy> I wanted to sign up
<shevy> but I was off by one on the email list and never recieved any notifications :(
Peregrinu5 has joined #ruby
<offby1> a known risk
<shevy> the worst thing is to be off by one during sex however
freeayu has joined #ruby
<offby1> Oh, I'm sorry, honey; I thought that was you!
<greasegum> only if your newsletter is about reggaeton, otherwise they probably won't be into it.
<shevy> yeah offby1
<offby1> it had an article about DubyaStep. The previous president's favorite dance music
apeiros_ has joined #ruby
<shevy> monkey style?
freeayu__ has quit [Ping timeout: 240 seconds]
<greasegum> which makes me wonder, what's all this controversy about obamacore? It's got good bass.
nazty has joined #ruby
nai has joined #ruby
graft has quit [Ping timeout: 264 seconds]
greyEAX has quit [Quit: Leaving]
emmanuelux has quit [Ping timeout: 264 seconds]
<greasegum> do an article.
gtuckerkellogg has joined #ruby
pradeepto has quit [Remote host closed the connection]
<offby1> :-)
Chryson has joined #ruby
Peregrinu5 has quit [Ping timeout: 256 seconds]
graft has joined #ruby
monkegjinni has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 255 seconds]
jrhorn424 has quit [Quit: jrhorn424]
krz has quit [Quit: krz]
strife25 has quit [Quit: Computer has gone to sleep.]
<greasegum> ah comedies
adeponte has quit [Remote host closed the connection]
blankverse has joined #ruby
k_89 has quit [Ping timeout: 240 seconds]
<blankverse> i am using sinatra/r18n plugin , how do i store the t variable in javascript?
krz has joined #ruby
Zolrath has quit [Ping timeout: 252 seconds]
<tiripamwe> iamjarvo: you could try this: http://pastie.org/4229297
lkba has quit [Ping timeout: 265 seconds]
<iamjarvo> tiripamwe: thanks. i was about to implement what i told offby1, i think yours is similar
sailias has quit [Quit: Leaving.]
oscardelben has joined #ruby
Neurotiquette has joined #ruby
mdpatrick has quit [Ping timeout: 245 seconds]
blankverse has quit [Quit: Page closed]
aroman has joined #ruby
dev_ryan70 has quit [Remote host closed the connection]
Neurotiquette is now known as mdpatrick
Guest50966 has joined #ruby
nwest_ has joined #ruby
Guest40367 has quit [Ping timeout: 246 seconds]
Ontolog has joined #ruby
alindeman has quit [Read error: Connection reset by peer]
kvirani_ has joined #ruby
cdepue has joined #ruby
kvirani has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
oyster has joined #ruby
oyster has left #ruby [#ruby]
lkba has joined #ruby
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
alindeman has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
jsilver has joined #ruby
stefanp_ has joined #ruby
RainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
Ethan has quit [Ping timeout: 248 seconds]
<iamjarvo> does select return the value if its not blank? why does it do this http://pastie.org/4229381
mdpatrick has quit [Ping timeout: 246 seconds]
<iamjarvo> i think this answers it will return actual collection items being iterated over
stefanp has quit [Ping timeout: 265 seconds]
<epochwolf> iamjarvo: [] is truthy
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
<epochwolf> iamjarvo: in ruby, everything except false and nil are considered truthy
Ontolog has quit [Remote host closed the connection]
<iamjarvo> epochwolf: thank you
adeponte has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
Z_Mass has joined #ruby
ringotwo has joined #ruby
zodiac1111 has quit [Remote host closed the connection]
alindeman has quit [Ping timeout: 240 seconds]
jrajav has joined #ruby
pu22l3r has joined #ruby
locriani has quit [Remote host closed the connection]
bricker88 has quit [Quit: Leaving.]
Markvilla has joined #ruby
airbrush has joined #ruby
ringotwo has quit [Ping timeout: 244 seconds]
mohits has quit [Ping timeout: 265 seconds]
hrs_ has joined #ruby
hrs_ has quit [Client Quit]
<Tasser> iamjarvo, [[],[]].reject(&:empty?)
<epochwolf> Tasser: that's a bad idea, not everything responds to empty?
Tearan has quit [Ping timeout: 244 seconds]
Tearan has joined #ruby
Markvilla_ has joined #ruby
Markvilla_ has quit [Client Quit]
Markvilla has quit [Read error: Connection reset by peer]
mikeycgto has quit [Ping timeout: 244 seconds]
adeponte has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
mdpatrick has joined #ruby
wallerdev has joined #ruby
andrewhl has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
hemanth has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby
<Tasser> epochwolf, works for arrays
dhruvasagar has joined #ruby
sailias has joined #ruby
hemanth has joined #ruby
savage- has joined #ruby
chienpo has left #ruby [#ruby]
dbe has joined #ruby
verto is now known as verto|off
dbe has quit [Remote host closed the connection]
airbrush has left #ruby [#ruby]
pedm has joined #ruby
greasegum has quit [Ping timeout: 255 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
thecreators has joined #ruby
freeayu has quit [Ping timeout: 265 seconds]
mdpatrick has quit [Quit: mdpatrick]
dhruvasagar has joined #ruby
mockra has joined #ruby
mjb2k has joined #ruby
locriani has joined #ruby
savage- has quit [Read error: Connection reset by peer]
savage-_ has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
larissa has quit [Quit: gone]
nwest_ has quit [Quit: Computer has gone to sleep.]
mdszy has quit [Quit: nini]
ananthakumaran has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
jsilver has quit [Remote host closed the connection]
LUEshi2 has quit [Quit: Lost terminal]
apok has joined #ruby
igotnolegs has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
freeayu has joined #ruby
L-----D has quit [Ping timeout: 252 seconds]
_theriffer_ has quit [Quit: Leaving.]
capsule_toy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sailias has quit [Quit: Leaving.]
dnyy has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 264 seconds]
savage-_ has quit [Remote host closed the connection]
philips- has quit [Excess Flood]
davidpk has quit [Quit: Computer has gone to sleep.]
philips_ has joined #ruby
minijupe has joined #ruby
cdepue has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
Azure is now known as __END__
mjb2k has quit [Quit: Leaving.]
__END__ is now known as Azure
apok has quit [Quit: apok]
<nazty> anyone around
<darkf> nope
<nazty> ok good i need advice
<nazty> i just started working with ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
<nazty> im using Weechat and ruby as the scripting language
Lachryma has quit [Ping timeout: 248 seconds]
<darkf> nazty: and?
rambda has quit [Remote host closed the connection]
skryking has joined #ruby
savage- has joined #ruby
wpaulson has joined #ruby
<jrajav> I do agree that he needs advice
jsilver has joined #ruby
jsilver has quit [Remote host closed the connection]
jsilver has joined #ruby
jsilver has quit [Remote host closed the connection]
jrajav has quit [Quit: The best darkness is strange and surprising]
oscardelben has quit [Quit: oscardelben]
g_rotbart has joined #ruby
tiripamwe has joined #ruby
sailias has joined #ruby
rohit has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
Vert has quit [Remote host closed the connection]
nilg has joined #ruby
havenn has joined #ruby
adeponte has joined #ruby
aroman has quit [Quit: aroman]
aroman has joined #ruby
mockra has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
noyb has joined #ruby
Lachryma has joined #ruby
ryanf has quit [Read error: Operation timed out]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
tonini has joined #ruby
brianpWins has joined #ruby
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
k_89 has joined #ruby
havenn has quit [Remote host closed the connection]
wpaulson has joined #ruby
dnyy has joined #ruby
itnomad has quit [Quit: Leaving]
adeponte has quit [Remote host closed the connection]
LUEshi has quit [Quit: leaving]
manizzle has quit [Read error: No route to host]
sailias has quit [Ping timeout: 264 seconds]
zachbrowne has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
uris has quit [Quit: leaving]
davidcelis_ has quit [Quit: K-Lined.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
yoklov has quit [Quit: bye!]
tiripamwe has quit [Ping timeout: 264 seconds]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
minijupe has quit [Quit: minijupe]
StretchedALot has joined #ruby
<StretchedALot> hi I have a question about ruby
<StretchedALot> I am designing a diarrhea diagnostic wand that will be connected via USB to a computer
<StretchedALot> the wand will analyze the rectum with sensors
<StretchedALot> and detect the different microbes present
Shrink has quit [Ping timeout: 255 seconds]
fantazo has joined #ruby
<StretchedALot> I will be contracting a programmer to write the software
<StretchedALot> to interpret the results
<StretchedALot> would ruby be suitable?
bosphorus has quit [Remote host closed the connection]
Ontolog has joined #ruby
<shadoi> hee
<StretchedALot> well?
<StretchedALot> this is how the product will work
mockra has joined #ruby
<StretchedALot> patient comes into the doctor's office with diarrhea or some other intestinal distress
<StretchedALot> the doctor will tell the patient to bend over
<StretchedALot> and gingerly doc will insert the wand into the patient's rectum
<StretchedALot> the sensors on the wand analyze the microbes present
<StretchedALot> and will transmit the data to a pc
<StretchedALot> over in his office
<StretchedALot> it will diagnose disorders on that system and elminate the need for stool samples or labwork
<StretchedALot> anybody here know if ruby is a good language to use for such a program?
<StretchedALot> god damn it shadoi
<StretchedALot> what do you think?
<StretchedALot> I will suck your dick and drink your cum if you give me some good input!
zachbrowne has quit [Remote host closed the connection]
beneggett has quit [Ping timeout: 250 seconds]
<davidcelis> .....
<StretchedALot> davidcelis what in the fuck is your problem?
<StretchedALot> I asked a simple question
<StretchedALot> and I get a chilly reception in this god damn piece of shit channel
beneggett has joined #ruby
<davidcelis> not my fault people are inactive
<davidcelis> i'm building a fucking bookshelf chill the fuck out
<StretchedALot> there are 627 people here
mahmoudimus has joined #ruby
<StretchedALot> they can't all be inactive
<StretchedALot> well people will pay
<StretchedALot> :D
<StretchedALot> for their insolence
<banisterfiend> StretchedALot: i like your program it's a good program
<StretchedALot> so could ruby be used for such an application?
<StretchedALot> how much would it cost?
<StretchedALot> I would be willing to suck cock and drink cum to get a discount
mahmoudimus has quit [Client Quit]
d3vic3 has quit [Read error: Operation timed out]
<banisterfiend> StretchedALot: if you're any good at that, you might make more money sticking to that career
wargasm has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
<StretchedALot> nah I just do it for pleasure
<StretchedALot> i like having hot cum splashed into my face
<banisterfiend> StretchedALot: you dont find it humiliating?
<banisterfiend> StretchedALot: i would be concerned about your self-esteem if you do that too regularly
<StretchedALot> oh it turns me on
<StretchedALot> but that is not all i like to have done
<StretchedALot> generally I have the guy I am sucking finger my asshole
<StretchedALot> and press my prostate until I cum
mpereira has quit [Ping timeout: 245 seconds]
<StretchedALot> :D
<banisterfiend> StretchedALot: what if he doesnt want to
<StretchedALot> hot stuff
d3vic3 has joined #ruby
L-----D has joined #ruby
<StretchedALot> ah I don't just go with guys that only want that
<StretchedALot> don't worry
<StretchedALot> the suckoff for the programmer was for a discount
<StretchedALot> :D
mahmoudimus has joined #ruby
<StretchedALot> who here hates niggers?
<StretchedALot> I fucking hate niggers!
<Gavilan> StretchedALot: What do you have against people who were born in Nigeria?
nmyerson has joined #ruby
mahmoudimus has quit [Client Quit]
<darkf> Gavilan: I don't think that's what he's talking about
savage- has quit [Remote host closed the connection]
<StretchedALot> nigerians send me all that spam
<StretchedALot> it is annoying
<StretchedALot> gavilan de donde eres guey?
Shrink has joined #ruby
shamik has joined #ruby
RainbowDashh has joined #ruby
rohit has quit [Read error: Connection reset by peer]
beneggett has quit [Ping timeout: 245 seconds]
T_Rex_ has joined #ruby
nmyerson has left #ruby [#ruby]
<shamik> I'm a ruby newbie. Need some help re: dictionaries. Looking over some code, I see the same dictionary defined in two different ways dict = { :key1 => 25, :key2 => 50 } and elsewhere dict = { key1: 25, key2: 50 }. Whats the difference between these two syntaxes ?
StretchedALot has left #ruby ["Leaving"]
td123 has joined #ruby
_theriffer_ has joined #ruby
anothervenue has quit [Quit: WeeChat 0.3.7]
aroman has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
<banisterfiend> shamik: they do the same thing, it's just the second one is using 1.9 hash syntax
T_Rex_ has quit [Quit: T_Rex_]
mockra has quit [Remote host closed the connection]
aroman has joined #ruby
<shamik> tx banisterfiend. Which one is "better" (more current?)
<banisterfiend> shamik: the first one is probably used more
RainbowDashh is now known as rainbowDashh
mahmoudimus has joined #ruby
<banisterfiend> shamik: the second one is used sometimes by some people who dont care about 1.8 compatibility
<banisterfiend> rainbowDashh: are you a brony?
<darkf> obviously
<darkf> rainbowDashh: I love your name/mane :3
<rainbowDashh> I keep wondering why I join random channels. (including this one)
<rainbowDashh> would be useful if I manage to screw up with some ruby thing
<darkf> rainbowDashh: why? I'm just complimenting you on your taste in ponies. :(
<rainbowDashh> yeah, leave it in PM so it wouldn't be too spammy. I don't really know the rules in here.
<banisterfiend> rainbowDashh: you're not a ruby programmer?
mahmoudimus has quit [Client Quit]
<shamik> tx
L-----D has quit [Quit: Leaving]
g_rotbart has quit [Write error: Connection reset by peer]
g_rotbart has joined #ruby
anothervenue has joined #ruby
StretchedALot has joined #ruby
<StretchedALot> lol
anothervenue has quit [Client Quit]
tiripamwe has joined #ruby
ABK has joined #ruby
nai has quit [Remote host closed the connection]
darkf has quit [Ping timeout: 240 seconds]
savage- has joined #ruby
dhruvasagar has joined #ruby
anothervenue has joined #ruby
blazes816 has quit [Quit: Leaving]
Morkel has joined #ruby
jarred_ has joined #ruby
beilabs has quit [Ping timeout: 252 seconds]
Chryson has quit [Quit: Leaving]
yxhuvud has joined #ruby
dv_ has joined #ruby
Eldariof-ru has joined #ruby
a_a_g has joined #ruby
Zolrath has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
fantazo has quit [Remote host closed the connection]
beneggett has quit [Ping timeout: 250 seconds]
vectorshelve has joined #ruby
lolmaus has joined #ruby
<vectorshelve> hemanth: hai dude
beneggett has joined #ruby
beilabs has joined #ruby
tagrudev has joined #ruby
g_rotbart has quit [Remote host closed the connection]
g_rotbart has joined #ruby
a_a_g1 has joined #ruby
a_a_g has quit [Ping timeout: 246 seconds]
bigkevmcd has joined #ruby
jordan__ has joined #ruby
libertyprime has quit [Quit: Lost terminal]
williamcotton_ has joined #ruby
<jordan__> How can I download the source of a webpage with ruby?
kevinbond has quit [Quit: kevinbond]
a_a_g1 has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jordan__ has left #ruby [#ruby]
<Paradox> File.open("blarg.html", "w") { |copy| copy << HTTParty.get "url-here" }
<Paradox> replace httparty with open-uri if you like
libertyprime has joined #ruby
davidpk has joined #ruby
tiripamwe has quit [Quit: Leaving]
zommi has joined #ruby
tiripamwe has joined #ruby
daniel_hinojosa has quit [Ping timeout: 248 seconds]
perry is now known as perryh_away
luckyruby has joined #ruby
andrewhl has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 264 seconds]
kjellski has joined #ruby
JohnBat26 has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
mahmoudimus has joined #ruby
savage- has quit [Remote host closed the connection]
rushed has joined #ruby
StretchedALot has quit [K-Lined]
mahmoudimus has quit [Client Quit]
Z_Mass has quit [Quit: Leaving]
yankov has joined #ruby
yankov has left #ruby [#ruby]
banisterfiend has joined #ruby
savage- has joined #ruby
Gavilan has left #ruby [#ruby]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend` has joined #ruby
Rochefort has joined #ruby
atmosx has joined #ruby
luckyruby has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
manizzle has joined #ruby
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
foofoobar has joined #ruby
banghouse has quit [Read error: Operation timed out]
kiela_ is now known as kiela
flak has joined #ruby
flak is now known as Guest347
iamlacroix has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
noyb has quit [Ping timeout: 248 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
tdubellz is now known as thomas
Shrink has quit [Ping timeout: 264 seconds]
zerdliu has joined #ruby
zerdliu has left #ruby [#ruby]
jesly has joined #ruby
brianpWins has joined #ruby
Tearan has quit [Ping timeout: 252 seconds]
BeLucid_ has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
ij has quit [Read error: Connection reset by peer]
Tearan has joined #ruby
_theriffer_ has quit [Quit: Leaving.]
jesly has quit [Client Quit]
adamkittelson has quit [Remote host closed the connection]
_justin has joined #ruby
Tricks has quit [Remote host closed the connection]
subbyyy has quit [Quit: Leaving.]
_justin has quit [Client Quit]
rainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
artm has joined #ruby
yonggu has quit [Quit: yonggu]
pedm has quit [Quit: pedm]
_justin has joined #ruby
_justin has left #ruby [#ruby]
_justin has joined #ruby
Azure has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
_justin has left #ruby [#ruby]
g_rotbart has quit [Remote host closed the connection]
Tearan has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
ttilley is now known as ttilley_off
jesly__ has joined #ruby
Shrink has joined #ruby
jesly__ has quit [Client Quit]
Guest347 is now known as rippa
ryanf has quit [Quit: leaving]
elwristo has joined #ruby
djdb has joined #ruby
<jds> Hi
<jds> I'm doing some timezone stuff with ActiveSupport. I'm starting with a string (eg "2012-07-09 17:23:44 +0100"), and would like to know its timezone. Time.parse correctly figures out the timezone, but the return value is converted to UTC, so Time.parse(foo).zone isn't helpful
savage- has quit [Remote host closed the connection]
benlangfeld has joined #ruby
benlangfeld has quit [Changing host]
benlangfeld has joined #ruby
krz has quit [Quit: krz]
<jds> Oh, huh. DateTime.parse doesn't convert to the local timezone
Azure has quit [Ping timeout: 245 seconds]
benlangfeld1 has joined #ruby
benlangfeld1 has left #ruby [#ruby]
benlangfeld has quit [Ping timeout: 244 seconds]
Shrink has quit [Ping timeout: 264 seconds]
imami|afk is now known as banseljaj
dekroning has joined #ruby
hoelzro|away is now known as hoelzro
afd__ has joined #ruby
qos has joined #ruby
aroman has quit [Read error: Connection reset by peer]
wobr has joined #ruby
aroman has joined #ruby
elhu has joined #ruby
nazty has quit [Ping timeout: 245 seconds]
Hanmac1 is now known as Hanmac
williamcotton_ has quit [Quit: williamcotton_]
ssspiff has joined #ruby
sspiff has quit [Ping timeout: 264 seconds]
cezar has joined #ruby
abstrusenick has joined #ruby
Ontolog has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 264 seconds]
cezar has quit [Client Quit]
mucker has joined #ruby
icyfenix has left #ruby [#ruby]
igotnolegs has quit [Quit: Computer has gone to sleep.]
abra has quit [Ping timeout: 252 seconds]
abra has joined #ruby
jarred_ has quit [Quit: jarred_]
foofoobar has quit [Quit: Changing server]
n1x has joined #ruby
foofoobar has joined #ruby
Shrink has joined #ruby
foofoobar has quit [Client Quit]
n1x has left #ruby [#ruby]
Mon_Ouie has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
elwristo has quit [Quit: elwristo]
TPFC-SYSTEM has joined #ruby
fixl has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
piotr has joined #ruby
bosphorus has joined #ruby
mathie has joined #ruby
jimeh has joined #ruby
rcsheets has quit []
qos has quit [Quit: Leaving...]
graft has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
graft has joined #ruby
qos has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
abstrusenick has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Spooner has joined #ruby
abstrusenick has joined #ruby
blacktulip has joined #ruby
_bart has joined #ruby
<_bart> Hi all, why isn't this a valid multi dimensional hash: http://pastie.org/4230432 ?
<_bart> I expected it to be valid ruby
ephemerian has joined #ruby
shamik has left #ruby [#ruby]
<bnagy> what's the error?
tiripamwe has quit [Ping timeout: 245 seconds]
<_bart> bnagy: in irb, syntax error, unexpected ',', expecting tASSOC
<bnagy> ohhh duh
<bnagy> the outer hash doesn't have two elements
<bnagy> sorry stared at it for a few secs like an idiot
schickung has joined #ruby
<bnagy> change the outers to [] maybe
<_bart> bnagy: huh?
<bnagy> you appear to want an array of hashes
<_bart> bnagy: undefined local variable or method `patterns' for main:Object (NameError)
<bnagy> but you tried to declare a hash of hashes
<bnagy> but your outer hash is not in k=>v format
<_bart> bnagy: true, so I can use symbols to define the set of patterns
<bnagy> which is what the error is trying to say
<_bart> bnagy: ah that's true, hmm
aroman has quit [Read error: Connection reset by peer]
<bnagy> patterns[:previous_page] = { change to patterns[:previous_page] = [
<_bart> bnagy: :previous_page is not allowed for an array, it's a symbol
aroman has joined #ruby
<bnagy> all you're changing is the value you're assigning to patterns[:previous_page]
<bnagy> I don't know what patterns is, but it's not relevant to this error
Tearan has joined #ruby
<bnagy> I'm saying the construct { {}, {}, {} } is a syntax error, [ {}, {}, {} ] is not
<_bart> bnagy: okay cool, that's one step closer
roolo has joined #ruby
<_bart> bnagy: isn't there a way to write that more efficient?
jsilver has joined #ruby
Azure has joined #ruby
Azure has quit [Changing host]
Azure has joined #ruby
<bnagy> dunno
<bnagy> you could do the definitions all inline
<bnagy> but I don't know how you derive the keys or values etc, so I can't really comment on refactoring from that snippet :/
<_bart> bnagy: I tried that using patterns[:previous_page] = ... and patterns[:next_page] =...
<_bart> bnagy: this is all static information
greasegum has joined #ruby
baphled has joined #ruby
<bnagy> patterns={ previous_page: { blah: 3 }, next_page: { bloo: false } }
Kwpolska has joined #ruby
Kwpolska has quit [Changing host]
Kwpolska has joined #ruby
mucker has quit [Ping timeout: 265 seconds]
robotmay has joined #ruby
Azure has quit [Excess Flood]
baphled has quit [Client Quit]
baphled has joined #ruby
<_bart> bnagy: okay
<_bart> thanks for your help
Azure has joined #ruby
thisirs has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
Azure has quit [Ping timeout: 244 seconds]
tiripamwe has joined #ruby
kiwnix has joined #ruby
<hemanth> banisterfiend`, wtf is this -> http://pastie.org/4230010 !
<hemanth> vectorshelve, ^
tatsuya_o has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
pk1001100011 has joined #ruby
<vectorshelve> hemanth: he pesters a lot.. forget it.. ppl here are used to it :)
stephenjudkins has joined #ruby
<vectorshelve> hemanth: he has been banned from #ruby-lang already banisterfiend`
y2k has joined #ruby
<banisterfiend`> hemanth: it's called trolling
<hemanth> banisterfiend`, lol /me was a master troll, when I was young
<hemanth> banisterfiend`, troll and let troll
<banisterfiend`> hemanth: yeah, we should combine our efforts and troll vectorshelve in a more serious and brutal way in the future
<banisterfiend`> hemanth: only when we think he's about to lift the phone to call the cops should we relent
<vectorshelve> banisterfiend`: shut up man
<banisterfiend`> vectorshelve: we're going to get you!!
<hemanth> yes we are! banisterfiend` :)
Azure has joined #ruby
<shevy> hmmm now how can I tell unxz to extract to a specific location...
thone has quit [Ping timeout: 244 seconds]
davidw has joined #ruby
workmad3 has joined #ruby
davidw is now known as Guest44932
<shevy> pffft. screw unxz... "tar" has -C, going to use that
<bnagy> shevy: maybe use --stdout > /new/path/here
rushed has left #ruby [#ruby]
iamlacroix has quit [Remote host closed the connection]
<shevy> oh
reuf has joined #ruby
mengu has joined #ruby
<vectorshelve> hemanth: u joined up with him ? :-/
a_a_g has quit [Quit: Leaving.]
<hemanth> :D
<vectorshelve> hemanth: ok I get it :-X
nazty has joined #ruby
nazty has quit [Read error: Operation timed out]
monkegjinni has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
baphled has quit [Read error: Connection reset by peer]
baphled_ has joined #ruby
banseljaj is now known as imami|afk
apeiros_ has joined #ruby
baphled_ has quit [Read error: Connection reset by peer]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<tonini> any grit gem user around?
MikeWorth has joined #ruby
pdelgallego has joined #ruby
baphled has joined #ruby
sspiff has joined #ruby
Berglund has joined #ruby
flype has joined #ruby
<MikeWorth> Hi, I'm after a way to have a queue that persists to disk, such that if the machine dies it can be brought back up and re3populate the queue as it was when it died. Appending lines to a file and reading lines seems easy, but deleting the first line each time after it has been processed looks more problematic. Performance is something of an issue, so I guess something like `tail -n +2 file>file` is probably not going to be a very goo
<MikeWorth> d solution?
ssspiff has quit [Ping timeout: 264 seconds]
Guest44932 is now known as davidw
<hoelzro> MikeWorth: mmap'd file, maybe?
davidw has quit [Changing host]
davidw has joined #ruby
<hoelzro> Berkeley DB queue?
Berglund has quit [Client Quit]
lkba has quit [Quit: Bye]
wallerdev has quit [Quit: wallerdev]
baphled has quit [Read error: Connection reset by peer]
Rochefort has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
k_89 has quit [Quit: Leaving]
tiripamwe has quit [Ping timeout: 245 seconds]
neku has joined #ruby
tonini has quit [Remote host closed the connection]
<bnagy> beanstalkd
<bnagy> or amqp or redis
<bnagy> but I like beanstalkd a lot, personally
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
vitor-br has quit [Quit: Saindo]
ssspiff has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 264 seconds]
tatsuya_o has joined #ruby
pygospa has quit [Read error: Operation timed out]
davidpk has quit [Quit: Computer has gone to sleep.]
baphled has joined #ruby
pygospa has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
<banisterfiend`> bnagy: i keep lol-ing at this http://i.imgur.com/DseeU.jpg
baphled has quit [Read error: Connection reset by peer]
dinkytoy has joined #ruby
sj26 has joined #ruby
baphled has joined #ruby
fermion has joined #ruby
ramblex has joined #ruby
yeggeps_ has joined #ruby
ZachBeta has joined #ruby
l2trace99 has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
k_89 has joined #ruby
AlbireoX is now known as AlbireoX`Away
AlbireoX` has quit [Remote host closed the connection]
yeggeps has quit [Ping timeout: 264 seconds]
yeggeps_ has quit [Client Quit]
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
davidw has quit [Ping timeout: 264 seconds]
matti has joined #ruby
aroman has quit [Quit: aroman]
pdelgallego has quit [Quit: pdelgallego]
wpaulson has joined #ruby
<shevy> only brave men dare click on this
lukeholder has joined #ruby
<lukeholder> anyone recommend a good way to host a rails app on a cpanel install?
<lukeholder> like using mod_rails (passenger) or something?
piotr_ has joined #ruby
piotr has quit [Ping timeout: 264 seconds]
neku is now known as neku|away
ssspiff has quit [Ping timeout: 264 seconds]
sspiff has joined #ruby
dinkytoy has quit []
ramblex has quit [Quit: ramblex]
arkiver has joined #ruby
wpaulson_ has joined #ruby
<bnagy> lukeholder: try #rubyonrails maybe
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
wpaulson has quit [Ping timeout: 252 seconds]
wpaulson_ is now known as wpaulson
Foxandxss has joined #ruby
d3vic3 has quit [Quit: leaving]
dhruvasagar has quit [Quit: Lost terminal]
dhruvasagar has joined #ruby
d3vic3 has joined #ruby
stefanp has quit [Ping timeout: 265 seconds]
nari has quit [Ping timeout: 245 seconds]
saschagehlich has joined #ruby
yeggeps has joined #ruby
bier has quit [Ping timeout: 248 seconds]
bier|tp has quit [Ping timeout: 240 seconds]
mdstunthamster has joined #ruby
capsule_toy has joined #ruby
<shevy> what is the limit for the amount of instance variables for a class?
<banisterfiend`> shevy: none?
<shevy> I have one big class here that has around... 40 instance variables
<shevy> it somehow worries me :(
<shevy> ok banisterfiend`
<banisterfiend`> hehe
neku|away is now known as neku
<lukeholder> 256 instance veriables
<lukeholder> you can quote me on that
v0n has quit [Read error: No route to host]
<lukeholder> especially the misspelling
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Foxandxss has joined #ruby
<fowl> lukeholder, in hundreds of years the name lukeholder will be remembered for this gem "256 instance veriables", nobody will know wtf you were talking about though
a_a_g has joined #ruby
jjang has joined #ruby
<lukeholder> fowl did you try making more than that?
gtuckerkellogg has joined #ruby
<lukeholder> don't do it.
bier|tp has joined #ruby
<lukeholder> you have no idea what will happen and it is not good.
bier has joined #ruby
<shevy> once code becomes too large, I find it hard to keep it simpler
<banisterfiend`> shevy: then break it up into more classes
<shevy> yeah hmm
Zolrath has quit [Quit: Computer has gone to sleep.]
<banisterfiend`> shevy: in other words: learn object oriented programming :P
<fowl> lukeholder, f.instance_variables.size => 475
<fowl> nothing bad happened
<lukeholder> haha
qos has quit [Remote host closed the connection]
<shevy> it often feels as if complexity is just shuffled about or hidden somewhere elese
<lukeholder> thats why naming is important
<lukeholder> and hard
bashdy has joined #ruby
<shevy> I got naming covered
<shevy> _ = ''
<shevy> __ = ''
ramblex has joined #ruby
<shevy> ___ = _+__
<lukeholder> ………..ok?
nazty has joined #ruby
wlievens has joined #ruby
Shrink has quit [Ping timeout: 244 seconds]
<shevy> def __?; puts "hi"; end
<shevy> well alright I dont do that
<shevy> I don't like __ in method names much
<lukeholder> _ or __?
<gogiel> ada
<gogiel> ops, sorry
jjang has quit [Ping timeout: 244 seconds]
<gtuckerkellogg> hi all
<lukeholder> hi Gadgetoid
<lukeholder> hi gtuckerkellogg
bigkevmcd has quit [Read error: Operation timed out]
<Gadgetoid> Ahoy lukeholder
<lukeholder> sorry Gadgetoid you were a typo
<gtuckerkellogg> i'm looking for a good yasnippet collection to use for Rakefiles.
<lukeholder> but hi
<workmad3> shevy: my naming is better, var2 = var1 + var50
nazty has quit [Ping timeout: 255 seconds]
<Gadgetoid> lukeholder: I did wonder! But, what the hey… hello *everybody*!
<wlievens> I reboot my Apache and now a Rails app doesn't work anymore. I get this error: /usr/bin/ruby: No such file or directory -- $(optflags) $(debugflags) $(warnflags) (LoadError)
<fowl> wlievens, #RAILS, #RUBYONRAILS
<wlievens> fowl: not sure, it's a ruby environment thing, not rails support
<wlievens> something fowled up (heh) my ruby installation
A124 has joined #ruby
<wlievens> strange... /usr/bin/ruby: No such file or directory <---- but it's there!
<wlievens> ruby 1.9.3p194 (2012-04-20) [x86_64-linux]
greasegum has quit [Quit: Leaving]
greasegum has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
niklasb has joined #ruby
etehtsea has joined #ruby
shavus has joined #ruby
bigkevmcd has joined #ruby
<wlievens> shevy: hello again :-) things are spooky again... my ruby install was working fine until I just now restarted apache httpd
tk___ has joined #ruby
<shevy> how can I remove my own gems from rubygems.org ?
Shrink has joined #ruby
<shevy> or at least release it into the wild... I want to maintain only active gems
<shevy> wlievens: this can happen when some other error disguises it
<banisterfiend`> shevy: gem yank
<shevy> for instance, I have such errors when I removed some .so file, then I get bogus error reports sometimes
<shevy> wlievens: but that was just one example, there can be many more
<shevy> thanks banisterfiend` !
<workmad3> shevy: I'd probably personally push a version that changes the description to say 'unmaintained, please contact me if you wish to take over maintenance'
stephenjudkins has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
lukeholder has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
charnel has joined #ruby
oposomme has joined #ruby
<banisterfiend`> shevy: gem install gemcutter
<wlievens> shevy: so some file is missing but due to the obscurity of the error, it doesn't list which
<wlievens> what mystifies me is that it was working fine (I run redmine on that server, it's a RoR app) until I restarted ruby
<wlievens> erm
<wlievens> restarted apache httpd, and then passenger came with that error
<wlievens> the other element is that that server was rebooted early this morning
<shevy> banisterfiend`: ok
guillaum has joined #ruby
oposomme has quit [Read error: No route to host]
<shevy> wlievens: well, it can be one error cause. there may be others, hard to tell
<wlievens> Indeed. Problem is I don't even know where to start looking.
<shevy> I am supposed to learn redmine for a job but I dont wanna
<wlievens> redmine is great once it works
<shevy> hehehe
<shevy> that company wants to extend redmine for their own infrastructure
<wlievens> yeah I do some of that for our needs here
<wlievens> minor plugins or tweaks
<wlievens> Redmine sits nicely halfway between Trac and JIRA in terms of features/complexity
<shevy> cool
<shevy> I dont know JIRA. I used trac for a while though
<shevy> I did not like the issue reporting in trac much. github's issue tracker on the other hand i really love
<wlievens> it's basically Trac plus project hierarchy and proper user management
<workmad3> wlievens: and a lot of extremely complex configuration and integration options
<wlievens> workmad3: extremely complex?
JustinCampbell has joined #ruby
<wlievens> heeeyyyy this is ODD
<wlievens> (sorry) shevy: when I run gem install passenger, I get the same " No such file or directory" error
<shevy> and normal ruby scripts work?
<shevy> with that path as shebang
<wlievens> let me try that
pygospa has quit [Read error: Operation timed out]
<wlievens> nope, same error
<wlievens> with some additional characters that break my putty line
twinturbo has joined #ruby
<wlievens> http://pastebin.com/5zjc30u5 <-- to prove the file exists
<shevy> hmmmm
<shevy> stat /usr/bin/ruby
<shevy> works too?
<shevy> and what about
<shevy> ldd /usr/bin/ruby
<shevy> oh peculiar
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> "/usr/bin/ruby: No such file or directory -- ?]; (LoadError)"
<shevy> as if it is trying to load some bogus file
<workmad3> that's what I was thinking
<shevy> wlievens: are you using an IDE?
<shevy> or an editor to invoke that?
<workmad3> actually, that looks like there's a non-printable character after ruby in /usr/bin/ruby
<wlievens> no, all is command line
pygospa has joined #ruby
<wlievens> workmad3: yes that is a nonprintable character, as sometimes my cursor doesn't jump to the next line
<shevy> ok... so the ruby binary seems to be 100% there
<wlievens> you know, the stuff a terminal does when you get nonprintable chars
alindeman has joined #ruby
<workmad3> wlievens: because that's the error I get when I do 'ruby file_that_doesn't_exist'
<wlievens> it's there, it's not a symlink, it's built yesterday, from source, while I was chatting with you :)
<shevy> yeah
<wlievens> workmad3: very interesting
<wlievens> ah
<wlievens> when I just write "ruby"
yeggeps has quit [Quit: yeggeps]
<wlievens> I get this: http://pastebin.com/WArtAVW8
<shevy> ruby: No such file or directory -- ?
<shevy> what
Rochefort has joined #ruby
<shevy> where from does the argument come?
<shevy> you only typed "ruby" ...
<shevy> wlievens: when I type "ruby", I get a newline, and it waits for input instead
<workmad3> wlievens: check $RUBY_OPTS on your shell?
<wlievens> yes, I did too yesterday
<shevy> however when I do: "ruby foo"
<shevy> I get:
<shevy> ruby: No such file or directory -- foo (LoadError)
<wlievens> the error is also not always the same
<wlievens> now I get
<wlievens> (LoadError)h file or directory -- è-ë
<shevy> so something seems to be auto-appended to your ruby-invocation
<workmad3> ^^
<wlievens> $RUBY_OPTS is not set
<shevy> magic :)
<JonnieCache> start a blank shell with sh
<workmad3> wlievens: is /usr/bin/ruby a wrapper script?
<workmad3> wlievens: that's doing something wrong? :)
<wlievens> workmad3: it is not, vim confirms it's full of binary stuff
<workmad3> hmm... try a blank shell as JonnieCache suggested then
<wlievens> did that, I get this:
<wlievens> that's normal behaviour?
sailias has joined #ruby
<workmad3> nope
<JonnieCache> not really, the ruby interpreter generally waits for input
tuxaddicted has joined #ruby
<JonnieCache> but its a lot more normal looking than the last paste
<wlievens> more attemtps: http://pastebin.com/r1j7v40U
<wlievens> I get different nonprintable crap every time
<JonnieCache> maybe your keyboard is on the blink
<JonnieCache> heh
<wlievens> it's indeed as if the command line passes along nonsense characters as argument
<wlievens> "ruby foo" yields nonsense as well
yeggeps has joined #ruby
<JonnieCache> well if you never get that on the blank shell then it suggests the shell is involved somehow
<JonnieCache> are you using a fancy zsh distro or something?
<wlievens> the only specific thing about my build is that I set the prefix (as instructed by shevy yesterday) on ./configure
thone has joined #ruby
<wlievens> no it's /bin/bash
<wlievens> CentOS
<wlievens> I get the same shit on the blank sh
<wlievens> it's just not always the same
<JonnieCache> that is really weird
<wlievens> uhuh
<JonnieCache> is it only ruby thats acting odd?
MikeWorth has left #ruby ["Leaving"]
<wlievens> to date yes
<wlievens> I run various other things on that machine (apache, tomcat, some java apps, subversion, samba) and all work well
<wlievens> the only "oddity" is that it crashed yesterday and had to be rebooted
yeggeps has quit [Client Quit]
<JonnieCache> i meant more in terms of the shell. most of those things are services
<wlievens> BUT the rails app and ruby worked well for 4 hours this morning
pdelgallego has joined #ruby
<wlievens> yes, I know, I just wanted to point out it's pretty isolated
<wlievens> the shell shows nothing odd
<wlievens> I'll try the ruby in my build dir
<wlievens> same there
pdelgallego has quit [Read error: Connection reset by peer]
<wlievens> hmm
pdelgallego has joined #ruby
<wlievens> I could try rebuilding it entirely
<wlievens> after ./configure --prefix=/usr should I run make configure?
<wlievens> I'm a bit rusy
pk1001100011 has quit [Remote host closed the connection]
<shevy> that is one odd error description you have here
<wlievens> I mean /usr/bin ofc
<wlievens> hmm
<shevy> I dont think it has anything to do with the compilation step
<shevy> I mean you can try but I am quite sure you will get the same
<wlievens> shevy: what is the exact --prefix=XXX value for XXX ?
<shevy> "./configure --prefix=/usr/","make","make install"
<wlievens> trailing slash?
<shevy> I think you can omit it
<wlievens> no "make configure" ?
<shevy> but as said, I think there is some other error you have here. it is totally odd that you get random characters auto-appended
<shevy> no, I dont think make understands "configure" as argument
<wlievens> ok
<wlievens> it is indeed, and I accept that it is more likely that the shell is borked
<wlievens> but I just want to eliminate this
<shevy> hmm
<shevy> can you try to do "ruby foo" a few times
<shevy> perhaps you see a pattern?
akem has quit [Ping timeout: 252 seconds]
<shevy> also if you are on linux, start "xev"
baphled has quit [Quit: leaving]
<wlievens> I see no difference in the kind of nonsense chars. Also, putty renders them however putty wants I think
<wlievens> what is xev?
<shevy> putty?
<wlievens> I'm remotely connected to this machine through an ssh terminal
<shevy> ohhhhhh
<wlievens> my client is win7
<shevy> perhaps this is the culprit
<wlievens> this is the "production" server (internal use)
<wlievens> well I've never noticed anything like this so I wouldn't know what
<shevy> I can assure you that on my windows laptop, "ruby foo" via cmd.exe will report the same error as on linux
<shevy> perhaps some gem did something funky
lockweel has joined #ruby
<wlievens> ruby worked fine yesterday so it certainly did at some point
<shevy> I think something like RVM tries to change environment variables
vitoravelino is now known as vitoravelino`afk
charnel has quit [Read error: Connection reset by peer]
<wlievens> I don't have rvm installed
<wlievens> heh
<wlievens> it works fine after the recompile
<wlievens> the ruby executable...
<wlievens> and now also redmine
<hoelzro> speaking of rvm/rbenv, ruby-build failed to build ruby 1.8.7 for me last night =(
<fowl> that means its time to move on
<fowl> 1.8.7 was cool back in 1993
<shevy> odd wlievens
<shevy> but allt he better then
<wlievens> shevy: yes I'm happy it's fixed but not happy that I have no idea what caused it
<wlievens> oh I should've kept a copy to make a binary comparison
<hoelzro> fowl: I want to be able to verify that code I write works on 1.8, though
<wlievens> of the faulty executable - if that was to blame
<shevy> pfft wlievens problem is gone! we only remember magic funky super characters
<shevy> the kobold in your machine
<wlievens> more likely it was some .so file that was wiped due to whatever - hopefully not something that would happen again
<shevy> hoelzro: I too! is why I dont want to use -> operator
<wlievens> thanks for your help in any case people
pk1001100011 has joined #ruby
<shevy> yeah man
<shevy> we are here to pat you on the back
<shevy> WHILE YOU MAKE YOUR WAY THROUGH THE JUNGLE, ENEMY GUNFIRE AT POINT BLANK!
<fowl> why hoelzro , that's like saying fuck the car i prefer my horse
pdelgallego has quit [Quit: pdelgallego]
<fowl> kill the horse, it will feed your family for months
<fowl> good meat
<wlievens> thanks for your help in any case people
<shevy> if I wouldn't be a pacifist by nature, I would have had to be the commander in charge in the army. because I can't be arsed to go first into combat zones, I could only send others into it... :P
<wlievens> oops
<shevy> teach a man how to fish
<shevy> and he will take your horse
bigkevmcd has joined #ruby
etehtsea has quit []
<shevy> horse a fish how to man
<shevy> and you'll have plenty of fish for the rest of your life
neku is now known as neku|away
saschagehlich has quit [Quit: saschagehlich]
neku|away is now known as neku
<wlievens> fish a man a horse and he'll tell stories about the feat
<JonnieCache> dont support 1.8
<JonnieCache> just like you dont support ie6
<JonnieCache> for the good of humankind
<JonnieCache> not that ruby 1.8 is as bad as ie6 but you get the idea
<workmad3> maybe more like ie7? :)
<banisterfiend`> ruby 1.8.7 is actually pretty sweet
<banisterfiend`> procs can even take block arguments :)
etehtsea has joined #ruby
etehtsea has quit [Excess Flood]
<JonnieCache> i want to be able to use the new hash syntax indiscriminately without having to worry about people not being able to run it though
<shevy> hmm
<hoelzro> fowl: I thought there was still a substational amount of code that only runs on 1.8?
<hoelzro> I may be ill informed
<fowl> hoelzro, those holdouts will upgrade or die, such is the way of life
<shevy> the new hash syntax can be nice indeed
<hoelzro> I know that 1.8 was recently discontinued or something
etehtsea has joined #ruby
etehtsea has quit [Excess Flood]
<workmad3> 1.8 just had its final release
bigkevmcd has quit [Ping timeout: 244 seconds]
<JonnieCache> rails is removing support for it soon, that will kill it for the most part
<fowl> at this point, if they havent got compatibility with 1.9 i would consider it dead
justinmcp has joined #ruby
<workmad3> and yes, rails 4 is 1.9+ only
<JonnieCache> although people who get excited about new versions of rails are all using 1.9 id imagine
<hoelzro> so the community concensus is only support 1.9?
<workmad3> not that they're at any sort of release stage for rails 4 yet :)
<workmad3> hoelzro: pretty much... and one of these days, I'm sure even codepad will upgrade :)
<JonnieCache> unless you have a compelling reason to support 1.8, like a client is set on it, then go 1.9 all the way
etehtsea has joined #ruby
etehtsea has quit [Excess Flood]
<hoelzro> and anyone on an OS that doesn't package 1.9 is screwed, or has to build a custom Ruby if they want to use my stuff?
<hoelzro> I'm not far along with Ruby yet (just playing), but I'm learning it to add it to my resume, so I'd like to get this stuff down
<JonnieCache> well obviously its up to you. but i think anything that pressures to community to move on is good. its not like 1.9 is riddled with flaws
<banisterfiend`> hoelzro: what other langs do u know already?
<workmad3> hoelzro: pretty much, although I'm not aware of any major (or even minor) packaging systems that don't have some form of 1.9 bundled
<JonnieCache> but yeah i guess if you want your open source code to be run by as many people as possible then youd want to support 1.8
<hoelzro> banisterfiend`: I do most of my work in Perl, but I know a handful
bashdy has quit [Quit: bashdy]
<workmad3> hoelzro: and there are binary builds available for most platforms, along with tools like rvm and ruby-build that make installing your own ruby from source pretty trivial
<workmad3> hoelzro: so lets say it isn't difficult to get 1.9 installed ;)
etehtsea has joined #ruby
<hoelzro> workmad3: I have rvm installed, and I think it's a great idea, but what about non-tech folk that want to install my stuff?
<workmad3> hoelzro: how many non-tech folk do you anticipate installing gems?
pdelgallego has joined #ruby
<hoelzro> let's say I write a neat application for OS X or something using RubyCocoa; do I have to then distribute 1.9 with my application?
<JonnieCache> rubycocoa is 1.9 only
<workmad3> haha
<hoelzro> oh, really?
<hoelzro> interesting...
<JonnieCache> macruby is its own interpreter which is totally separate
<banisterfiend`> hoelzro: if you write it using macruby, yo uwont even need the ruby runtime
<workmad3> hoelzro: but basically, yes... if you would need to either release into an env where you know the versions, or package it up with the correct versions
<workmad3> hoelzro: same as with any other packaged app
etehtsea has quit [Client Quit]
<workmad3> hoelzro: or you'd need to give instructions as to how to install the requirements
<JonnieCache> hmm apparently rubycocoa isnt 1.9 only, its macruby, the replacement project for rubycocoa which is 1.9
etehtsea has joined #ruby
<JonnieCache> but i think macruby produces statically linked binaries with its own interpreter anyway
<hoelzro> I see
<JonnieCache> macruby is so cool. i need to write a music player app for it so i can make boatloads of money and never have any free time ever again
<workmad3> hoelzro: that sort of thing is very application-dependent though, and very target-user dependent too
<JonnieCache> s/for/in
`brendan has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
shavus has quit [Remote host closed the connection]
wangr has joined #ruby
ssspiff has joined #ruby
sspiff has quit [Ping timeout: 255 seconds]
<gtuckerkellogg> any good snippet collections for Rakefiles ? (preferably yasnippet)
lxsameer has quit [Quit: Leaving]
Progster has joined #ruby
charnel has joined #ruby
cantonic_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
TheFuzzball has joined #ruby
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
wvms has quit [Quit: wvms]
thone has quit [Read error: Connection reset by peer]
TheFuzzball has quit [Remote host closed the connection]
mdszy has joined #ruby
wvms has joined #ruby
wvms has quit [Remote host closed the connection]
A124 has quit [Quit: Leaving.]
minijupe has joined #ruby
krusty_ar has joined #ruby
TheFuzzball has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
hynkle has joined #ruby
Natch has quit [Remote host closed the connection]
nari has joined #ruby
strife25 has joined #ruby
krusty_ar has quit [Remote host closed the connection]
krusty_ar has joined #ruby
lkba has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
ZachBeta has joined #ruby
ssspiff has quit [Ping timeout: 264 seconds]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
vitoravelino`afk is now known as vitoravelino
Rochefort has quit [Read error: Connection reset by peer]
Rochefort has joined #ruby
justinmcp has quit [Remote host closed the connection]
geekbri has joined #ruby
d3vic3 has quit [Ping timeout: 246 seconds]
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has joined #ruby
d3vic3 has joined #ruby
Axsuul has quit [Ping timeout: 248 seconds]
AndChat| has joined #ruby
lkba has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
sepp2k has joined #ruby
vectorshelve has quit [Quit: Page closed]
carloslopes has joined #ruby
dv310p3r has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
charnel has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
lorandi has joined #ruby
<regedarek> How in ruby compare Time.now == Time.now ??
fantazo has joined #ruby
saschagehlich has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
reuf has quit [Read error: Operation timed out]
GeekOnCoffee has quit [Read error: Connection reset by peer]
GeekOnCoffee has joined #ruby
bigkevmcd has joined #ruby
k_89 has quit [Ping timeout: 240 seconds]
<JonnieCache> regedarek: what do you mean?
samuel02 has joined #ruby
<shevy> gtuckerkellogg: dont think so
arkiver has quit [Ping timeout: 244 seconds]
djdb has quit [Ping timeout: 244 seconds]
<Xethron> Is it better to use a case statement than a if else statement?
<JonnieCache> depends
<Xethron> or does it just look nicer?
neku is now known as neku|away
<JonnieCache> it can be shorter and clearer as well
<JonnieCache> ruby's case is very powerful so you can do some very clean code with it
wvms has joined #ruby
djdb has joined #ruby
samuel02 has quit [Remote host closed the connection]
<any-key> or abuse it
<any-key> ...I've seen some shit :(
<JonnieCache> yeah well thats ruby
spanx has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
<Spaceghostc2c> JonnieCache: It's pretty alright for sure, but if you can, refactor to something a bit better.
ananthakumaran has joined #ruby
<Spaceghostc2c> Xethron: A case statement evaluates the passed in expression only once. if will evaluate it every logical branch.
d3vic3 has quit [Ping timeout: 248 seconds]
<Xethron> Spaceghostc2c: So, its more effective...
<Xethron> meh...
<JonnieCache> i just like the fact that you can put things like regular expressions into it
* Xethron redesignes
<Spaceghostc2c> Depends on your needs.
wargasm has joined #ruby
<JonnieCache> put it into a loop over the lines of a file and you can write a great parser
<Spaceghostc2c> JonnieCache: You can do them in if statements too.
<JonnieCache> or at least a neat one anyway
d3vic3 has joined #ruby
v0n has joined #ruby
iamlacroix has joined #ruby
chson has quit [Remote host closed the connection]
g0bl1n has joined #ruby
nari has quit [Ping timeout: 240 seconds]
<any-key> I have some downtime at work...what's a neat Ruby trick I should look into?
ktilcu has joined #ruby
greasegum has quit [Ping timeout: 252 seconds]
<any-key> hmmm interesting
djdb has quit [Remote host closed the connection]
<any-key> I haven't touched some of that stuff in a while
<any-key> perhaps I should practice my JS skillz or read W3C specs
<JonnieCache> theres that new meteor.js thing thats what all the kids are into
<any-key> man I can't keep up with all these hip JS libs :(
<any-key> is there a good thing on JS design practices I should look into?
<any-key> I read Javascript The Good Parts but it doesn't go into design patterns really
<Xethron> Spaceghostc2c: Well, I'm checking for IRC server codes... So, like, if its 311, I know its a whois ident response...
<JonnieCache> i agree with the never ending parade of hip JS libs
<JonnieCache> but meteor is extremely impressive
mathie has quit [Quit: Sleeping...]
tzvi has joined #ruby
<any-key> I'll take a look at it
<Spaceghostc2c> Xethron: Case then.
<JonnieCache> any-key: http://www.meteor.com/screencast
<JonnieCache> its nothing THAT revolutionary, its just wrapped in a very nice framework
mnaser has joined #ruby
<Xethron> I also use the if else for regexp to parse the different types or responses. Join, message, quit, part, rename, etc
mathie has joined #ruby
<any-key> sweet
minijupe has quit [Quit: minijupe]
<Xethron> is the second also better as a case statement? using regexp's....
Tricks has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
<JonnieCache> Xethron: id probably reach for a case statement in that situation
iamlacroix has quit [Remote host closed the connection]
fbernier has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
<JonnieCache> if you have a lot of response types you could maintain a hash mapping response types (regexes or whatever) to functions
fbernier has left #ruby [#ruby]
<JonnieCache> then loop over that hash.
<JonnieCache> although someone will probably point out why that sucks really badly
tzvi|work has quit [Ping timeout: 264 seconds]
<afd__> hi! I'm a ruby newbie. How do I make a "dynamic" regular expression? one that has a part taken from a string variable...
<JonnieCache> basically you are building a finite state machine. you need a way of expressing that which is A fast and B maintainable
<any-key> just use double quotes and string interpolation to build it and use Regexp.new
Doc_X has quit [Quit: Leaving.]
MikeWorth has joined #ruby
<afd__> any-key: ok, thanks
<banisterfiend`> afd__: or just: /#{my_string}/
<any-key> YOU CAN DO THAT?!?!
<JonnieCache> lol
<banisterfiend`> any-key: Yeah.
<fowl> best response ever
<MikeWorth> Is there a way to use a file as a circular buffer?
<any-key> I figured out you can do interpolation with backticks the other day, it was super useful
lockweel has quit [Remote host closed the connection]
<any-key> afd__: do what banisterfiend` said
<JonnieCache> yeah you might want to be careful with that
<JonnieCache> interpolations in backticks
Lachryma has quit [Read error: Operation timed out]
<any-key> it's just for my own little automation scripts
<any-key> namely this: https://github.com/eric-wood/radio
<JonnieCache> it is the number one way to get owned, that type of thing
<JonnieCache> and noone will have any sympathy for you hehe
GeekOnCoffee has quit [Ping timeout: 250 seconds]
<any-key> lol if you use backticks in a web app I'll punch you in the face
wvms has quit [Quit: wvms]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<JonnieCache> any-key: some people for you to punch: https://jhalderm.com/pub/papers/dcvoting-fc12.pdf
<afd__> what do they do?
<fowl> yes well you'd need be sane about you do with input thats not specific to interpolation
wangr has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
Doc_X has joined #ruby
<any-key> afd__: what do what do? Backticks?
<afd__> any-key: yes
<fowl> print"Enter a fun command!"; `#{STDIN.gets.chomp}`
<any-key> you can do `yes | rm -rf /` and it'll run it in a shell and return the results
<any-key> kind of like system() but it actually returns stdout
tzvi|work has joined #ruby
wangr has joined #ruby
<any-key> whereas system() just returns the status
<afd__> aha
asobrasil has joined #ruby
bigkevmcd has quit [Ping timeout: 248 seconds]
<any-key> always make sure to pipe the yes command to rm -rf * since debian tries to tell you not to do it
verto|off is now known as verto
<JonnieCache> any-key: this is the important line from that link:
<JonnieCache> run(“gpg”, “–trust-model always -o \”#{File.expand_path(dst.path)}\” -e -r \”#{@recipient}\” \”#{File.expand_path(src.path)}\”")
<JonnieCache> lol
pazustep has joined #ruby
<JonnieCache> this is in a trail run for the washington DC elections
tzvi has quit [Ping timeout: 264 seconds]
<JonnieCache> EPIC fail
<any-key> hah wow
kevinbond has joined #ruby
LBRapid has joined #ruby
artm has quit [Read error: Connection reset by peer]
<JonnieCache> its actually worse than the disapora thing in the history of high profile rails devs not knowing anything about security
dekronin1 has joined #ruby
<any-key> it's a shame, there's not a ton to it
<any-key> a few good practices and you don't have to think about it too much
<JonnieCache> web app secuirty?
<any-key> yes
artm has joined #ruby
krusty_ar_ has joined #ruby
<any-key> whitelisting, etc
<JonnieCache> in the general case i agree. with elections, not so much
<any-key> ah yeah
bigkevmcd has joined #ruby
krusty_ar has quit [Ping timeout: 252 seconds]
sonkei has quit [Ping timeout: 246 seconds]
bigkevmcd has quit [Client Quit]
bigkevmcd has joined #ruby
dekroning has quit [Ping timeout: 248 seconds]
tuxaddicted has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
pazustep has left #ruby [#ruby]
liluo has joined #ruby
dinkytoy has joined #ruby
dekronin1 has quit [Ping timeout: 265 seconds]
mnaser has quit [Ping timeout: 250 seconds]
jsime has joined #ruby
bbttxu has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
ktilcu has left #ruby [#ruby]
lolmaus has quit []
oscardelben has joined #ruby
krusty_ar has joined #ruby
wvms has joined #ruby
reuf has joined #ruby
krusty_ar_ has quit [Ping timeout: 246 seconds]
bluenemo has quit [Ping timeout: 252 seconds]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
PaciFisT has joined #ruby
Lachryma has joined #ruby
carlyle has joined #ruby
kvirani_ has quit [Remote host closed the connection]
ttilley_off is now known as ttilley
mjb2k has joined #ruby
fearoffish has joined #ruby
mvangala has joined #ruby
uris has joined #ruby
mjb2k has quit [Read error: Connection reset by peer]
kiwnix has quit [Remote host closed the connection]
arkiver has joined #ruby
internet_user has joined #ruby
shevy has joined #ruby
hunglin has joined #ruby
joshman_ has joined #ruby
Lachryma has quit [Ping timeout: 265 seconds]
bosphorus_ has joined #ruby
cakehero has joined #ruby
bosphorus has quit [Ping timeout: 264 seconds]
minijupe has joined #ruby
bluenemo has joined #ruby
ken_barber has joined #ruby
mpereira has joined #ruby
wvms has quit [Quit: wvms]
msch has quit [Excess Flood]
cantonic has quit [Quit: cantonic]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
kenperkins has quit [Quit: Computer has gone to sleep.]
Synthead has joined #ruby
linoj has joined #ruby
sailias has joined #ruby
<lectrick> Anybody know whatever happened to the JPEG2000 format?
<shevy> it perished when skynet rose to power
robacarp__ is now known as robacarp
chson has joined #ruby
chomp has joined #ruby
troessner has joined #ruby
Farhan has joined #ruby
Spooner has quit [Ping timeout: 264 seconds]
<Farhan> I installed ruby with 'yum install ruby', and was expecting to have it install the 'gem' tool, but I don't seem to be able to find it.
<Farhan> where is it?
randomautomator has joined #ruby
<any-key> usually there's some kind of package named rubygems
<troessner> Farhan, just use rvm or rbench
<any-key> rvm is a great way of doing it
<Farhan> ahh, okay
* Farhan tries
<any-key> you'll want the development headers and whatnot
tuxaddicted has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
wobr has quit [Ping timeout: 250 seconds]
<shevy> Farhan: that is because distributions like to cripple software
<Farhan> "gem install rails" seems to have hanged
<shevy> on a default configure/make/make install installation, using the latest ruby 1.9.x, gem will reside in bin/ subdirectory of the --prefix target used
<Farhan> i installed via the CentOS packages
<hoelzro> which means Farhan is probably on 1.8
<any-key> heh yeah
<shevy> ok, gem is not bundled with 1.8 so that is ok
<Farhan> 1.8.7
<any-key> install 1.9 plz
nateberkopec has joined #ruby
<Farhan> yah, might be a good idea - via source
<shevy> rubygems source is here: http://rubyforge.org/projects/rubygems/
<shevy> you should be able to install it just fine
<any-key> please don't install 1.8
<Farhan> i installed rubygems via the packages just now - but rails's install seems to be slow
<any-key> use rvm
<Farhan> or rather, isn't happening
<shevy> rails installs a lot of gems
<shevy> and they even use bundler, so it is double slow
<any-key> if you're starting a new rails project, pleaaaassseee use the latest version of everything
<any-key> do this: install rvm, tell it to install ruby1.9.3
<any-key> then install the latest version of rails
andrewhl has joined #ruby
davidw has joined #ruby
davidw is now known as Guest28366
rekenerd has joined #ruby
mathie has quit [Quit: Sleeping...]
ZachBeta has joined #ruby
thecreators has quit [Quit: thecreators]
Aszurom has joined #ruby
<Aszurom> good morning #Ruby
<lectrick> If PNG had a flexible compression layer, I wonder how much smaller a PNG that used 7zip instead of deflate would be
mpereira has quit [Ping timeout: 248 seconds]
mathie has joined #ruby
<lectrick> looks like it would be 33% smaller or so at minimum
<JonnieCache> lectrick: it does have a flexible compression layer
<JonnieCache> 7zip is just a slower implementation of the zip algo
<JonnieCache> it doesnt do anything special
<lectrick> Does it. I looked at the spec at least on wikipedia and it said it was just "deflate"
sonkei has joined #ruby
<JonnieCache> lectrick: see http://optipng.sourceforge.net/
<lectrick> JonnieCache: Are you sure? 7zip compresses bit by bit at the bitstream, I don't think it's byte oriented like the others are
<JonnieCache> 7zip is just deflate with a very big window and some other tweaks iirc
<JonnieCache> thats why its compatible with other zip programs
ABK has quit [Ping timeout: 265 seconds]
<JonnieCache> oh no im confused - it has its own 7zip format doesnt it
<JonnieCache> im talking about its ability to output smaller .zip archives than other zip programs
<lectrick> JonnieCache: 7zip uses LZMA and LZMA2 which are not used in any other format
blischalk has joined #ruby
<JonnieCache> but i think the .7zip files are just .zip files that have had the algorithm tweaked past the point of backwards compatibility
capsule_toy has quit []
<lectrick> I don't think it's that simple
cdepue has joined #ruby
<canton7> the 7zip program is capable of generated archives in various formats, including zip
<lectrick> yes but that doesn't mean the opposite is true, that just means it supports it
<canton7> however, the 7zip format is different to zip
<lectrick> anyway png uses zlib only I believe, so you can't use something like a new algorithm like 7zip inside a png file unfortunately, at least at this time
<Kwpolska> much, much different. and the extension is .7z.
<JonnieCache> yeah i was getting confused
<lectrick> zlib = zip (well essentially)
carloslopes1 has joined #ruby
<JonnieCache> "When compressing ZIP or gzip files, 7-Zip uses its own DEFLATE encoder, which is often able to achieve higher compression levels, but at lower speed, than the more common DEFLATE implementation of zlib."
<JonnieCache> thats what i was talking about
thecreators has joined #ruby
carloslopes1 has quit [Client Quit]
<JonnieCache> optipng etc do the same thing as that for png files
carloslopes1 has joined #ruby
<JonnieCache> by having bigger dictionary windows or whatever theyre called
<fowl> lectrick, you could amend chunkypng to save/read from 7z but dont expect to be able to open that png in anything else
<_bart> how do I get the similarity of 2 strings? With 1 being "completely the same" and 0 being "completely different"
<lectrick> fowl: yeah i know. you're better off just 7zipping a BMP
<JonnieCache> _bart: it depends on what you mean by similarity
<any-key> there's no one size fits all solution to that problem
_pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
<JonnieCache> Levenshtein distance is usually a pretty damn good answer though
EzeQL has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
carloslopes has quit [Ping timeout: 248 seconds]
oscardelben has quit [Quit: oscardelben]
<lectrick> JonnieCache/ _bart : I just found this yesterday btw, it's the damerau levenshtein distance in Ruby https://gist.github.com/182759
rekenerd has joined #ruby
<lectrick> i.e., the "edit distance between 2 strings"
<lectrick> so _bart the best you will do is calculate how far apart 2 strings are by how many edits (insertions, deletions, swaps) it would take to change 1 to the other
<JonnieCache> the damerau version is when you can transpose chars as well right?
<lectrick> _bart: There's a way to search in O(N) time for strings that are 1 LD away from a given string but it's very sophisticated and involves something called a levenshtein state machine I believe
<lectrick> JonnieCache: yep
<Synthead> how can I tell if a hash only includes a certain index?
carloslopes has joined #ruby
<_bart> but how do I change that from a 0..1 value? what are the maximum amount of edits?
<_bart> 0 is indeed 0
<lectrick> _bart: LOL there are no "maximum amount of edits". Let's compare the string "a" with the string "b"*10000000 .... lol
mpereira has joined #ruby
rekenerd has quit [Client Quit]
iamjarvo has quit [Quit: Leaving.]
tk___ has quit [Quit: ばいばい]
<lectrick> _bart: You probably want the inverse of it but then 0 edits will get you an overflow
carloslopes1 has quit [Ping timeout: 245 seconds]
<JonnieCache> you could work out some celing from the largest word in the dataset or something like that
<lectrick> but that is nondeterministic
<_bart> lectrick: okay and what if I just want the similarity "in place", so no insertions/deletions/swaps, just the amount of same characters compared to the whole string?
<JonnieCache> oh agreed thats a fudge
<canton7> if the stringly are completely different, surely the max distance is something like max(a.length, b.length) ?
<canton7> s/stringly/strings
<lectrick> _bart: that's called... hold on... the SHANNON ENTROPY
Jay_Levitt has joined #ruby
<lectrick> Either that or the kolmogorov complexity which is not actually computable
<JonnieCache> i was wondering when the K word was gonna come up
<lectrick> (can you tell I've been neck deep in this shit for a couple weeks now while trying to create a flexible "strong password evaluator" on the side lol)
T_Rex_ has joined #ruby
virunga has joined #ruby
<_bart> no let's say I have aabb and bbbb
<_bart> the similarity is 0.5
<_bart> aaaa and aaaa is 1.0
<_bart> bbbb and aaaa is 0.0
wpaulson has quit [Ping timeout: 250 seconds]
<JonnieCache> thats just... comparing them
oscardelben has joined #ruby
<_bart> aaab aaaa is 0.75
<lectrick> _bart: I still think you want the inverse of the edit distance
<canton7> sounds like the 1 - (levenshtein dist over max(a.length, b.length))
<lectrick> in your first example that's 2 changes which is 1/2 which is 0.5 which is what you want
<_bart> no because aaab aaax is also 0.75
mpereira has quit [Ping timeout: 240 seconds]
<_bart> so how do I do that?
<lectrick> what canton7 said, probably
<canton7> I've told you two times now
<canton7> (well, told you a fudge that will probably work well enough)
<JonnieCache> he wants only substitutions
dinkytoy has quit []
<lectrick> you want something that approaches 1.0 as they get more similar
<JonnieCache> in which case, just compare the letters man!
<JonnieCache> one by one. doesnt get any easier
<lectrick> lol i don't think that's that useful but ok :)
<JonnieCache> me neither
mpereira has joined #ruby
ckrailo has joined #ruby
bglusman has quit [Remote host closed the connection]
<JonnieCache> _bart: the reason that isnt a good idea is, lets say im comparing aabb with aacc
<JonnieCache> that is 0.5
wpaulson has joined #ruby
<JonnieCache> then i add an x to the start of the second string so were comparing aabb with xaacc
<JonnieCache> now its still 0.5
<JonnieCache> which is weird
oooPaul has joined #ruby
oscardelben has quit [Client Quit]
<JonnieCache> ok thats not the best example... but you get the idea.
<_bart> JonnieCache: okay I get the idea, but is there a ready to use method which gives better results?
<_bart> JonnieCache: I'm a bit in a rush, I don't have all this day to come up with that method.
wvms has joined #ruby
<_bart> sure someone must have written this before
<JonnieCache> lectrick gave this link to a ruby implementation of damerau-levenshtein https://gist.github.com/182759
<JonnieCache> but that doesnt give a result as a decimal
<lectrick> you can do the inverse of it
<JonnieCache> you could fudge it with something like what canton7 posted:
<JonnieCache> 1 - (levenshtein dist over max(a.length, b.length))
mengu has quit [Quit: Konversation terminated!]
andrewhl has quit [Remote host closed the connection]
JohnBat26 has quit [Read error: Operation timed out]
<lectrick> 1.0 / (1.0 + damerau-levenshtein distance). So a distance of 0 returns 1.0, a distance of 1 returns 0.5, 2 0.25, etc. etc.
<lectrick> That will get you what you want _bart , I think
<lectrick> 1.0 is identical, the closer you get to 0 the more apart they are
<JonnieCache> that sounds good
<lectrick> :)
wvms has quit [Ping timeout: 255 seconds]
wlievens has quit []
<lectrick> JonnieCache: / _bart FYI I got that link to that code from the damerau - levenshtein wikipedia page
D4T has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lectrick> I tested it and it seems to work
<virunga> _bart: you've to just implement this recursive function V(i,j) = max[ V(i-1, j-1) + s(S1(i), S2(j)) ; V(i-1, j) + s(S1(i), _) ; V(i, j-1) + s(_ , S2(j)) ]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<virunga> where V is the similarity and s is the weight of a allignment
shtirlic has joined #ruby
<virunga> the score...
sdwrage has joined #ruby
<apeiros_> _bart: also take a look at the jaro-winkler function
<apeiros_> useful if you compare small strings like people's names.
<Sou|cutter> whoa, I actually found a for loop in some legacy code. Wild!
bigkevmcd has quit [Ping timeout: 250 seconds]
Spooner has joined #ruby
Z_Mass has joined #ruby
mpereira has quit [Read error: Connection reset by peer]
<_bart> okay got it guys!
<_bart> two more things:
baroquebobcat has joined #ruby
biesiad has joined #ruby
<_bart> a) how do I know that my Mechanize post got redirected and ended up on a different url? (maybe headers?)
<radu> you can use a sigmoid function instead of that 1/(1-x) for smoother values. The previous function has goes to 0 for both of the damerau/levenstein beeing much bigger than the other
arkiver has quit [Quit: Leaving]
<radu> something like 1/(1+exp(-x)) where x = damerau-levenstein
<_bart> b) when I have "http://www.something.com/blabla?q=boeboe" and I want to extract "/blabla?q=boeboe", how do I do that?
reuf has quit [Quit: Leaving]
<radu> for a) look at the return code - redirects are 301 and 302
<JonnieCache> uri = URI.new("http://www.something.com/blabla?q=boeboe"); uri.path
<radu> also the Location header will be set
kenperkins has joined #ruby
<radu> I think you also need to explicitly tell Mechanize to follow redirects
<Farhan> err, when I try to compile ruby, I get the error that I need -fPIC
biesiad-g has joined #ruby
virunga has quit [Quit: Sto andando via]
<JonnieCache> actually .path only returns the path (surpirsingly) so you will need to get the query aswell and add that back in yourself
yekta has joined #ruby
mpereira has joined #ruby
ramblex has quit [Quit: ramblex]
biesiad has quit [Ping timeout: 250 seconds]
ramblex has joined #ruby
biesiad-g has quit [Remote host closed the connection]
biesiad-g has joined #ruby
blischalk has quit [Quit: blischalk]
freeayu has quit [Quit: 离开]
snapcase has quit [Quit: leaving]
<Farhan> I am getting this error when compiling ruby: /usr/bin/ld: dln.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC dln.o: could not read symbols: Bad value
<Farhan> I found some google hits for this error, but I don't understand them
biesiad-g has quit [Ping timeout: 240 seconds]
thecreators has quit [Quit: thecreators]
rainbowDashh has joined #ruby
<lectrick> Farhan: It sounds like you are far off the beaten paths
<lectrick> Farhan: Just use rvm to bulid your rubies and let someone else do the work
jsime has quit [Read error: Connection reset by peer]
ben_alman has quit [Excess Flood]
Guest50966 is now known as Yugo
Yugo has quit [Changing host]
Yugo has joined #ruby
thisirs has quit [Remote host closed the connection]
jsime has joined #ruby
<lectrick> Farhan: https://rvm.io// or https://github.com/sstephenson/rbenv/ depending on taste
kevinbond has quit [Read error: Connection reset by peer]
kevinbond has joined #ruby
<Synthead> is there a way I can make OptionParser require two arguments for an option?
mpereira has quit [Ping timeout: 246 seconds]
<Tasser> Synthead, not very unix-like
<Tasser> Synthead, tell us your usecase
graspee has quit [Quit: leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
froy has joined #ruby
a_a_g has joined #ruby
andrewhl has joined #ruby
danielvdotcom has joined #ruby
n1x has joined #ruby
shavus has joined #ruby
ben_alman has joined #ruby
<Synthead> Tasser: ./backup --setup block_device name
<lectrick> change it to backup --device block_device --name name and fail if both are not provided?
<radu> use -s for the action, then have several parameters passed
<Synthead> lectrick: yeah that's kinda what I'm thinking
<lectrick> a key like --setup is too generic, the entire set of command parameters is the "setup
<lectrick> "
cantonic has joined #ruby
<lectrick> also accept -d instead of --device and -n instead of --name :)
heftig has quit [Ping timeout: 272 seconds]
<Synthead> lectrick: yeah, I'm doing that already :) said --setup for legibility
mohits has quit [Ping timeout: 264 seconds]
<banisterfiend`> lol
<Tasser> Synthead, trollop! :-)
robbyoconnor has joined #ruby
<_bart> radu: I can't get the location header?
benson has joined #ruby
yekta has quit [Quit: yekta]
<Synthead> Tasser: I'm putting multiple flags in now. Gonna say in the description that the other flags are required when using it and test for it too
mahmoudimus has joined #ruby
abra has quit [Remote host closed the connection]
Ethan has joined #ruby
abra has joined #ruby
mahmoudimus has quit [Client Quit]
<Tasser> FU nokogiri... segfaulting like a win95
<Synthead> Tasser: what's the best way to make OptionParser display the usage text when no commands are passed?
hynkle has joined #ruby
S1kx has quit [Quit: Leaving]
kenichi has joined #ruby
<radu> _bart : but is it a redirect ?
<Tasser> Synthead, is there no fallthrough?
bowlowni has quit [Read error: Connection reset by peer]
carloslopes has quit [Quit: Leaving.]
nachtwandler has joined #ruby
bowlowni has joined #ruby
milkpost has joined #ruby
snapcase has joined #ruby
n1x has quit [Ping timeout: 244 seconds]
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
hoelzro is now known as hoelzro|away
robotmay has quit [Remote host closed the connection]
blazes816 has joined #ruby
alejo has joined #ruby
hynkle has quit [Client Quit]
arturaz has quit [Ping timeout: 264 seconds]
<_bart> radu: my firebug/inspector says it's a 302, but my mechanize status code says it's just 200 OK
heftig has joined #ruby
Eldariof-ru has quit [Ping timeout: 252 seconds]
Beoran has quit [Read error: Connection reset by peer]
hukl has joined #ruby
Rochefort has quit [Remote host closed the connection]
Beoran has joined #ruby
<radu> _bart: do you tell mechanize to follow the redirects ?
etehtsea has quit []
<radu> _bart: 'cause if you do, you'll only see the last page
cjs226 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 252 seconds]
milkpost has quit [Remote host closed the connection]
hynkle has joined #ruby
<_bart> radu: how do I set that stuff?
kvirani has joined #ruby
<radu> _bart: sorry , haven't used Mechanize in years
tds has joined #ruby
artOfWar_ has joined #ruby
greasegum has joined #ruby
twinturbo has quit [Quit: twinturbo]
brianpWins has quit [Quit: brianpWins]
tuxaddicted has quit [Quit: leaving]
savage- has joined #ruby
vitoravelino is now known as vitoravelino`afk
artOfWar has quit [Ping timeout: 252 seconds]
<_bart> radu: I don't mind I get the HTML of the last page, the problem is I want to corresponding location!
bradhe has quit [Remote host closed the connection]
tewecske has joined #ruby
dinkytoy has joined #ruby
bglusman has joined #ruby
bglusman has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
bglusman has joined #ruby
<_bart> How do I get the last request header in Mechanize?
artOfWar has joined #ruby
mnaser has joined #ruby
dkissell_ has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
khakimov has joined #ruby
schickung_ has joined #ruby
dinkytoy has quit []
yekta has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
artOfWar_ has quit [Ping timeout: 245 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Guest28366 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
Farhan has quit [Ping timeout: 264 seconds]
havenn has joined #ruby
dkissell has quit [Ping timeout: 245 seconds]
dkissell_ is now known as dkissell
_pdelgallego has joined #ruby
<radu> take a look at Mechanize:History
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
TPFC-SYSTEM has joined #ruby
a_a_g has left #ruby [#ruby]
schickung has quit [Ping timeout: 264 seconds]
schickung_ is now known as schickung
punkrawkR has quit [Ping timeout: 244 seconds]
Farhan has joined #ruby
Farhan has left #ruby [#ruby]
Farhan has joined #ruby
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
TorpedoSkyline has joined #ruby
mdstunthamster has quit [Quit: Linkinus - http://linkinus.com]
shadoi has quit [Quit: Leaving.]
chienpo has joined #ruby
Criztian has joined #ruby
<Farhan> how do I install rvm on CentoS?
hukl has quit [Quit: Linkinus - http://linkinus.com]
<radu> yum?
<Farhan> nevermind, found the command
<Farhan> no, i noticed that ruby and yum don't play well together
<Farhan> seems like CentOS has its own method for instaling stuff
<Farhan> strange, i thought it would be more standardized
<Farhan> but, i haven't been able to get ruby/rails installed at all on CentOS
<Farhan> so, im just doing it manually
<radu> bad idea
<Farhan> eek, even the scripts im finding online aren't working
<JonnieCache> how much do the speakers at tech conferences get paid?
<Farhan> radu: Google is giving me multiple answers, people here said get Ruby 1.9 and CentOS is 1.8
<Farhan> so, im at a loss
<JonnieCache> because from where im standing it looks like those things must absolutely print money
<Farhan> radu: what do you recommend?
<radu> centos should use yum as its packaging mechanism
<radu> if you don't find the ruby you want in the centos repos, perhaps you can find out some rpm repos that would have that ruby version
<radu> alternatively, you could get a srpm from redhat and compile that
<radu> since they are practically the same
jsime has quit [Read error: Connection reset by peer]
<radu> but people said install rvm on centos
<radu> and with rvn you can get whatever ruby version you want
<Farhan> radu: what you're saying is exactly the opposite of what i was told earlier
<Farhan> in this room
<radu> you asked me what I recommend.
<radu> not everybody agrees :P
jsime has joined #ruby
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
<JonnieCache> yeah radu is in the minority
<radu> are you stuck on using CentOS ?
<JonnieCache> most people will tell you not to use your distro's packagae manager to install ruby
niix has joined #ruby
<Farhan> yes, unfortunately
<radu> how about you go the rvm route first ?
neku|away is now known as neku
apok has joined #ruby
<_bart> How do I set Mechanize (ruby) to stop following redirects?
beneggett has joined #ruby
<radu> curl -L https://get.rvm.io | bash -s stable
liluo has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
<radu> redirect_ok(false)
<radu> _bart: ^^
<_bart> :D
<Farhan> either way works, frankly I don't care
<_bart> Yes it worked
<_bart> radu: man I was being a bit blind, sorry
bradhe has joined #ruby
<radu> np.
punkrawkR has joined #ruby
Araxia has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
jimeh has quit [Read error: Operation timed out]
sailias has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
guillaum has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
adeponte has joined #ruby
tcopp has joined #ruby
anothervenue has quit [Ping timeout: 244 seconds]
T_Rex_ has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
Ontolog has quit [Remote host closed the connection]
T_Rex_ has joined #ruby
apeiros_ has joined #ruby
Ontolog has joined #ruby
`brendan has quit [Ping timeout: 252 seconds]
Axsuul has joined #ruby
anothervenue has joined #ruby
arturas has joined #ruby
mnaser has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
bluenemo has quit [Read error: Connection reset by peer]
fridim_ has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
pdelgallego has quit [Read error: Connection reset by peer]
theRoUS_ has joined #ruby
pdelgallego has joined #ruby
sterNiX has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
Drewch has joined #ruby
hynkle has joined #ruby
Targen has joined #ruby
deception has joined #ruby
iamjarvo has quit [Quit: Leaving.]
roolo has quit [Quit: Linkinus - http://linkinus.com]
mathie has quit [Quit: Sleeping...]
rainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
ephemerian has quit [Quit: Leaving.]
cantonic has quit [Quit: cantonic]
fridim_ has quit [Ping timeout: 264 seconds]
niix has quit [Ping timeout: 245 seconds]
`brendan has joined #ruby
ksergio has joined #ruby
havenn has quit [Remote host closed the connection]
<Aszurom> is there ever much good reason to not use attr_accessor when defining a class?
<Aszurom> it's a combo of having read and write flags on the attribute, right?
<blazes816> if you don't want the property accessible?
<blazes816> basically, yes
<blazes816> it creates the supporting methods
<apeiros_> aszurom: it defines two methods
axl_ has quit [Read error: Connection reset by peer]
<blazes816> :foo, which returns the value, and :foo=, which sets it
<apeiros_> blazes816: that's confusing. use # to denote instance methods
<Aszurom> yeah, so isn't it basically useless if you don't have both present?
axl_ has joined #ruby
<apeiros_> :foo is a symbol
a_a_g has joined #ruby
<apeiros_> aszurom: both what present?
carloslopes has quit [Quit: Leaving.]
<blazes816> apeiros_, okay
<Aszurom> if I can't set it, why would I read it - and why would I read it if I can't put a value in it
c0rn_ has joined #ruby
carloslopes has joined #ruby
Drewch has quit [Ping timeout: 264 seconds]
hynkle has quit [Quit: Computer has gone to sleep.]
<apeiros_> aszurom: immutable classes will never provide setters
<apeiros_> aszurom: e.g. you could implement an RGB class which has only readers
shadoi has joined #ruby
apok_ has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
<apeiros_> only providing a setter however is probably very rare. at least I don't remember any sane use-case.
<Aszurom> like, the value of the property is set within the function and thus you never define it externally?
<apeiros_> o0
pdelgallego has joined #ruby
<Aszurom> My terminology will be lacking since I'm just starting on this lang
<apeiros_> I'm not sure what you intend to say by that. but an immutable class will set the instance variables in its initialize.
k_89 has joined #ruby
ringotwo has joined #ruby
<apeiros_> example: class RGB; attr_reader :red, :green, :blue; def initialize(red, green, blue); @red, @green, @blue = red, green, blue; end; end
<Aszurom> let's say I have a class person, with attr_accessor :birthday
<apeiros_> color = RGB.new(0,255,128); color.red # => 0
Ethan has quit [Read error: Operation timed out]
Drewch has joined #ruby
<Aszurom> can I have in the class a definition like this...
<apeiros_> @red is an instance variable
<apeiros_> attr_reader :red defines a method that will return the value of @red
<apeiros_> (and the method is named 'red')
apok has quit [Ping timeout: 244 seconds]
apok_ is now known as apok
<Aszurom> age = currentdate * :birthday
<Aszurom> and thus person.age will return the calculated value?
<apeiros_> yes
<Aszurom> so in that scenario, age would be a reader but not a writer
<apeiros_> you could provide a custom writer for age. we actually do that for estimated birth dates
bricker88 has joined #ruby
<Aszurom> I'm trying to pick up Ruby as a cross-platform scripting lang. I spend equal time on OSX and Windows, and while Powershell is nifty, it's platform dependent
<Aszurom> so? here I am
zommi has quit [Remote host closed the connection]
thecreators has joined #ruby
<fowl> aszurom, welcome to the wonderful world of rubies, where all your dreams could come true! (no guarantees)
<Aszurom> * safety not guaranteed
elhu has quit [Quit: Computer has gone to sleep.]
hynkle has joined #ruby
twock has joined #ruby
ZachBeta_ has joined #ruby
_bart has quit [Ping timeout: 245 seconds]
shtirlic has quit [Remote host closed the connection]
apok has quit [Remote host closed the connection]
ZachBeta has quit [Ping timeout: 250 seconds]
apok has joined #ruby
<Aszurom> so let's say I have a class Dog, which has :name :age and I defined a method called bark
<Aszurom> when I want to create dog objects, I'm going to probably have more than one, so that would imply an array or a hash
<Aszurom> if there was a single dog I could say
<Aszurom> rover = Dog.new
<Aszurom> but rover = Array.new
<Aszurom> well, dogs = Array.new, really
<Aszurom> so do you address each element of the array individually by saying
<apeiros_> use [] instead of Array.new
<Aszurom> dogs[0] = Dog.new
<apeiros_> better style
KL-7 has joined #ruby
<Aszurom> like every time I create a dog, do I have to call dog[n] = Dog.new ?
tatsuya_o has quit [Remote host closed the connection]
<Aszurom> or can I say that all objects in the array dogs are objects of Dog class?
jlwestsr has joined #ruby
flype has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
<apeiros_> the latter: no
pdelgallego has joined #ruby
<apeiros_> but you can make it easier than dogs[n], you can use dogs << Dog.new
<apeiros_> or dogs.push(Dog.new) (same thing)
<Aszurom> so, dogs[] = Dog.new ain't it
<Aszurom> ok
<blazes816> that's a PHPism
<blazes816> it may be further back, but I know it's common in PHP.
jonathanwallace has quit [Remote host closed the connection]
Morkel has quit [Remote host closed the connection]
Morkel has joined #ruby
_pdelgallego_ has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
noganex has quit [Quit: Eagles may fly, but a weasel will never be sucked into a jet engine.]
_pdelgallego_ has quit [Read error: Connection reset by peer]
_pdelgallego_ has joined #ruby
axl_ has joined #ruby
neku has quit [Quit: Linkinus - http://linkinus.com]
<Aszurom> so if I have 4 items in the array dogs, and I want to add a new dog, how much can I define at once?
a_a_g has quit [Quit: Leaving.]
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
<apeiros_> what do you mean, how much?
hynkle has quit [Quit: Computer has gone to sleep.]
<apeiros_> are you asking for whether the array has a size limit?
<Aszurom> dogs << Dog.new :name = rover, :age = 5
_pdelgallego_ has quit [Read error: Connection reset by peer]
<Aszurom> something like that?
<Aszurom> can I push values into the object at creation time?
<apeiros_> that should work, yes
<apeiros_> it may be that you need some parens to deal with precedence
<Aszurom> that's why I like Ruby, it usually ends up actually doing what I think it could
fridim_ has joined #ruby
dinkytoy has joined #ruby
<apeiros_> you can nest expressions as deeply as you like
hynkle has joined #ruby
<apeiros_> the only thing you have to take care of is precedence.
iamjarvo has joined #ruby
mathie has joined #ruby
dinkytoy has quit [Client Quit]
rainbowDashh has joined #ruby
noganex has joined #ruby
liluo has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
<Aszurom> kennel[] << Dog.new(:name => "fido", :age => "2", :gender => "Male")
<Aszurom> that's not working for some reason
<Aszurom> undefined local variable or method `kennel' for main:Object (NameError)
mucker has joined #ruby
yekta has quit [Quit: yekta]
<Aszurom> probably something really obvious
<Tasser> aszurom, why the [] after the variable name?
<Tasser> and btw, ruby tells if it doesn't know the variable 'kennel'
<Aszurom> I started without it? put it in there while trying to figure out what the syntax issue was
<apeiros_> aszurom: it's not kennel[] <<, it's just kennel <<
<apeiros_> assuming kennel is an array
eywu has joined #ruby
<apeiros_> aszurom: note that [] is already a method in ruby. as is <<. they just have a fancier syntax than the normal methods
davidpk has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
octarine has joined #ruby
kevinbond has quit [Read error: Connection reset by peer]
kevinbond has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
chrismcg is now known as zz_chrismcg
pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
greasegum has quit [Ping timeout: 244 seconds]
A124 has joined #ruby
_pdelgallego has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
pdelgallego has quit [Client Quit]
fantazo has quit [Remote host closed the connection]
theRoUS_ has quit [Quit: Leaving]
g0bl1n has quit [Ping timeout: 240 seconds]
EzeQL has quit [Ping timeout: 248 seconds]
mathie has quit [Quit: Sleeping...]
_pdelgallego has quit [Read error: Connection reset by peer]
avalarion has left #ruby [#ruby]
burgestrand has joined #ruby
sailias has joined #ruby
<denstark> Hello! Is using a constant the only way to use it as a default value in a function? eg: HI="hello" def say_hi(msg = HI) puts msg end
<denstark> I've tried using a normal variable but to no avail
jslvk has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<jslvk> !8ball asdfgasghahsghg?
mathie has joined #ruby
niklasb has joined #ruby
<blazes816> denstark, you can do def say_hi(msg="hello"); puts msg; end
voodoofish430 has joined #ruby
<denstark> blazes816: sure, I know that, but I'd like "hello" to be a variable (or loaded in from a config file) but not have to be passed all the time
<blazes816> denstark, the default value is decided at EXECUTION time, unlike most languages. so you could do: def say_time(time=Time.now); puts time; end
fridim_ has quit [Ping timeout: 264 seconds]
Aaton_off is now known as Aaton
* denstark looks
banghouse has joined #ruby
<denstark> mdszy: I see, making it a class and then making it an instance variable, that'd work
<Aszurom> is there a decent way to do a comment block?
<mdszy> denstark: Yup
<denstark> mdszy: thanks, I think I'll do that
<mdszy> denstark: It's all because lowercase variables have local scope, and methods have their own scope. A local variable defined outside of a method is outside that method's scope
<denstark> right, that's what i figured
* mdszy nods
<mdszy> Glad to help!
<denstark> didn't know what "the right way" to get around it, so to say, was
<denstark> thanks :)
<mdszy> no problem!
b26 has joined #ruby
r0bby has joined #ruby
<blazes816> aszurom, not really. https://gist.github.com/3084993
kidoz has joined #ruby
`brendan has quit [Ping timeout: 252 seconds]
<blazes816> aszurom, it's called a "here doc" if you're not familiar with the syntax
b26 is now known as `brendan
robbyoconnor has quit [Ping timeout: 240 seconds]
conor_ireland has joined #ruby
mpereira has joined #ruby
oooPaul has quit [Ping timeout: 244 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
ledao has joined #ruby
r0bby has quit [Ping timeout: 264 seconds]
jonathanwallace has joined #ruby
krusty_ar has joined #ruby
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
brahmadpk has joined #ruby
<troessner> blazes816, sure there is a comment block in ruby
<troessner> aszurom, =begin ....your comment... =end
Ontolog has quit [Read error: No route to host]
<Aszurom> thanks!
Ontolog has joined #ruby
<apeiros_> it's mostly frowned upon, though
ericcoleman has joined #ruby
<troessner> blazes816, the heredoc you are referring to has nothing to do with a comment
<Aszurom> I'll remember to frown a little every time I use it
<apeiros_> use your editors block-comment functionality to comment multiple lines with #
<troessner> apeiros_, yes, but still *everything* is better than to use a heredoc
<troessner> :-)
<blazes816> troessner, it doesn't, other than it keeps code from executing
<blazes816> like a comment
<troessner> blazes816, yes, but it isn't a comment
<blazes816> I wasn't aware of =begin/=end
<blazes816> yes, I know that
<apeiros_> troessner: sure
schickung has quit [Read error: Connection timed out]
Targen has quit [Ping timeout: 245 seconds]
Targen_ has joined #ruby
r0bby has joined #ruby
ramblex_ has joined #ruby
ramblex_ has quit [Client Quit]
deception has left #ruby [#ruby]
schickung has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
troessner has quit [Quit: Leaving]
anothervenue has quit [Quit: WeeChat 0.3.8]
ramblex has quit [Ping timeout: 265 seconds]
dinkytoy has joined #ruby
anothervenue has joined #ruby
a_a_g has joined #ruby
<fowl> heredoc to keep code from executing, never heard that one before
DrShoggoth has joined #ruby
<apeiros_> technically it is executed
<fowl> yeah we'll just create potentially large strings and never use them
<fowl> thats what the gc is for anyways
jslvk has quit [Quit: Page closed]
mathie has quit [Quit: Sleeping...]
Farhan1 has joined #ruby
Farhan has quit [Read error: Connection reset by peer]
jarred has joined #ruby
rcsheets has joined #ruby
bigkevmcd has joined #ruby
reuf has joined #ruby
Farhan1 has quit [Ping timeout: 264 seconds]
xaq has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
rcsheets has quit []
Ontolog has quit [Remote host closed the connection]
SQLStud has joined #ruby
Ontolog has joined #ruby
btanaka has joined #ruby
blazes816 has quit [Quit: Leaving]
Ontolog has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
oooPaul has joined #ruby
Criztian has quit [Remote host closed the connection]
Ontolog has joined #ruby
Eldariof-ru has joined #ruby
twinturbo has joined #ruby
buser3 has joined #ruby
mathie has joined #ruby
kevinbond_ has joined #ruby
kevinbond has quit [Read error: Connection reset by peer]
kevinbond_ is now known as kevinbond
dotdotdotPaul has joined #ruby
kvirani has joined #ruby
kevinbond has quit [Client Quit]
schickung has quit [Read error: Connection timed out]
A124 has quit [Quit: Leaving.]
oooPaul has quit [Ping timeout: 264 seconds]
stephenjudkins has joined #ruby
ryan0x2 has joined #ruby
ZachBeta_ has quit [Quit: Computer has gone to sleep.]
baphled has joined #ruby
mahmoudimus has joined #ruby
schickung has joined #ruby
baphled has quit [Client Quit]
mrsolo has quit [Quit: This computer has gone to sleep]
baphled has joined #ruby
kevinbond has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
mrsolo has joined #ruby
nachtwandler_ has joined #ruby
cheese1756 has quit [Ping timeout: 245 seconds]
baphled has quit [Client Quit]
chrxn__ has joined #ruby
chrxn__ is now known as chrxn
baphled has joined #ruby
nachtwandler has quit [Ping timeout: 248 seconds]
sterNiX has joined #ruby
<Aszurom> so another thing I encountered is that if I'm assigning values to properties during declaration of an object, the class requires an initializer be defined
buser3 has quit [Remote host closed the connection]
r0bby has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ruby
r0bby has joined #ruby
wallerdev has joined #ruby
grekkos_ has joined #ruby
k_89 has quit [Ping timeout: 265 seconds]
grekkos has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
<apeiros_> aszurom: s/declaration/instantiation/
<apeiros_> s/properties/instance variables/
DrShoggoth has quit [Quit: Leaving]
theRoUS_ has joined #ruby
Leffs has joined #ruby
cheese1756 has joined #ruby
<Leffs> Does anyone here has ever handlered with Ruby @ Sketchup?
Leffs has quit [Client Quit]
blacktulip has quit [Remote host closed the connection]
schickung has quit [Quit: schickung]
DrShoggoth has joined #ruby
blazes816 has joined #ruby
twinturbo has quit [Quit: twinturbo]
pradeepto has joined #ruby
nachtwandler_ has quit [Quit: leaving]
robotmay has joined #ruby
fayimora has joined #ruby
r0bby has quit [Ping timeout: 264 seconds]
cheese1756 has quit [Ping timeout: 245 seconds]
Jay_Levitt has joined #ruby
atmosx has joined #ruby
<atmosx> hello!
sterNiX has quit [Ping timeout: 246 seconds]
nyuszika7h has quit [Ping timeout: 264 seconds]
hynkle has joined #ruby
rekenerd has joined #ruby
abra has quit [Remote host closed the connection]
arkiver has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
nachtwandler has joined #ruby
apok_ has joined #ruby
jgarvey has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
arkiver has quit [Max SendQ exceeded]
emmanuelux has quit [Ping timeout: 246 seconds]
arkiver has joined #ruby
<Aszurom> is there a way in IRB to interrogate a class to see what all of its methods and properties are?
arkiver has quit [Max SendQ exceeded]
arkiver has joined #ruby
<tds> yes
dankest has joined #ruby
<tds> class.methods
<tds> class.instance_variables
apok has quit [Ping timeout: 246 seconds]
apok_ is now known as apok
maletor has joined #ruby
<tds> it differs though depending on what you need… #methods will return class methods
<tds> #instance_methods will return instance methods
<Spooner> aszurom : using pry, instead of irb, makes interrogation even easier.
kevinbond has quit [Quit: kevinbond]
d3c has joined #ruby
kevinbond has joined #ruby
kevinbond has quit [Client Quit]
<tds> pry seems cool
cheekymonk3y has joined #ruby
cheese1756 has joined #ruby
cj3kim has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<cheekymonk3y> is rubygems not compatible with ruby1.9.1? or is the mint linux repo a little out of date?
Deele has joined #ruby
<robacarp> cheekymonk3y: $5 says the repo is out of date.
<robacarp> I'd install it from source.
dinkytoy has quit []
<Hanmac> aszurom ruby does not have someting like properties ... only methods that access instance variables
<Hanmac> cheekymonk3y: look for a ruby1.9.1-full package
<cheekymonk3y> okay thanks
Zolrath has joined #ruby
binaryplease has joined #ruby
thecreators has quit [Quit: thecreators]
lichtkind has joined #ruby
<lichtkind> do you know which version of unicode ruby supports?
<Hanmac> lichtkind depends on want ruby version you have
<lichtkind> 1.93
jaylevitt has joined #ruby
Jay_Levitt has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: Computer has gone to sleep.]
cheese1756 has quit [Ping timeout: 245 seconds]
<Hanmac> lichtkind: Encoding.name_list.select {|s| s.include?("UTF") } returns this: => ["UTF-8", "UTF-16BE", "UTF-16LE", "UTF-32BE", "UTF-32LE", "UTF-7", "UTF8-MAC", "UTF-8-MAC", "UTF-8-HFS", "UTF-16", "UTF-32", "UTF8-DoCoMo", "UTF8-KDDI", "UTF8-SoftBank"]
j3r0m3 has joined #ruby
j3r0m3 has quit [Client Quit]
reuf has quit [Ping timeout: 244 seconds]
artOfWar has quit [Ping timeout: 244 seconds]
<lichtkind> thanks but thats not what i asked for
cheese1756 has joined #ruby
<lichtkind> is it unicode version 5 or 6 or 6.1?
<lichtkind> what you listed are encodings of unicode , what i mean is version of the standard (collection of symbols)
<apeiros_> lichtkind: how can/should a language be aware of that?
<apeiros_> that's a font issue, no?
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<cheekymonk3y> is the command "gem install xxx" meant to hang for a long long time?
<lichtkind> apeiros_: no its something the implementors of the interpreter/vm have to worry about
<apeiros_> cheekymonk3y: no. but older version did.
<apeiros_> lichtkind: why?
cj3kim has quit [Quit: This computer has gone to sleep]
<lichtkind> because its built in there
k_89 has joined #ruby
<apeiros_> lichtkind: what about the mechanics of unicode changes?
<cheekymonk3y> apeiros: it'll eventually complete right?
<apeiros_> if it's only more symbols added, then it does not matter at all to the vm
<lichtkind> it defines what unicode symbols are actually known
cheese1756 has quit [Ping timeout: 245 seconds]
<apeiros_> cheekymonk3y: depends. one reason for it to hang is if it doesn't get a network connection (e.g. if you're behind a proxy). it will not complete then but abort.
ben_alman has quit [Excess Flood]
<lichtkind> sure if you do an regex the interpreter has to know these or it wil not match
<apeiros_> lichtkind: again, how should that matter to the language?
<apeiros_> lichtkind: um, no
<lichtkind> i case you want to precess japanes character or bali or...
<cheekymonk3y> apeiros: my internet seems okay, I can install stuff with sudo apt-get install.....does that mean there are no proxy problems?
workmad3 has quit [Ping timeout: 244 seconds]
<apeiros_> lichtkind: I think you're mistaken
blacktulip has joined #ruby
joshwines has quit [Read error: Connection reset by peer]
<apeiros_> whether \u0xXXXX was defined when ruby was compiled doesn't matter to ruby
<lichtkind> maybe i could not express myself clearly
<apeiros_> it's just a code point to it.
<denstark> Hrm, anyone know offhand what shell things are executed in with backticks (``)?
<denstark> or if that is changable?
<apeiros_> s/\u0xXXXX/\uXXXX/
dinkytoy has joined #ruby
<lichtkind> apeiros_: so far you would be right but unicode is more than a list of codepoints
<Synthead> can OptionParser parse whole words? like "this" in ./script this --that ?
<apeiros_> lichtkind: afaik, the character groups have also been defined for quite a while. anyway, as far as grouping/classification goes - just replace the relevant files before compiling.
hynkle has joined #ruby
<apeiros_> as long as there's no change in the actual mechanics, the *language* will have absolutely *nothing* to do with the unicode version.
<apeiros_> all it needs are the most recent definitions.
<lichtkind> yes so ruby uses definition of the system and not an own?
<apeiros_> lichtkind: rubys source code is open. just go and look.
r0bby has joined #ruby
<lichtkind> apeiros_: yes but i thought there is a place for infos like that
<lichtkind> is ther a rubydelta for 2.9?
balrog-k2n has joined #ruby
<apeiros_> lichtkind: yes. and you got the information for where to look.
<apeiros_> 2.9 what?
adamkittelson has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
zemanel has joined #ruby
Criztian has joined #ruby
ben_alman has joined #ruby
Z_Mass has quit [Quit: Leaving]
ericcoleman has quit [Quit: Lost terminal]
rainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
Dreamer3 has joined #ruby
jarred_ has joined #ruby
havenn has joined #ruby
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jarred has quit [Ping timeout: 245 seconds]
jarred_ is now known as jarred
maletor has quit [Ping timeout: 264 seconds]
kidoz has quit [Quit: Ухожу я от вас]
stephenjudkins has quit [Quit: stephenjudkins]
manizzle has quit [Quit: Leaving]
manizzle has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
fermion has quit [Quit: P]
KL-7 has quit [Quit: This computer has gone to sleep]
arturas has quit [Remote host closed the connection]
_bart has joined #ruby
<_bart> Hi all!
itnomad has joined #ruby
artOfWar has joined #ruby
cheese1756 has joined #ruby
<lichtkind> i meant 1.9
kirun has joined #ruby
<_bart> So I have an abstract challenge
reuf has joined #ruby
<Synthead> is there a ruby method to raise an exception if I'm overwriting the contents of a hash's index?
<_bart> I'm trying to write a intelligent scraper. What would be a smart algorithm to search for the menu items of a random page's HTML?
<mdszy> Synthead: you could test for hash[:key].nil? and if it's not, then you're overwriting
workmad3 has joined #ruby
andrewhl has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
<Synthead> mdszy: yeah I'm doing a test now. no way to do it in a single method? guess I'll have to roll my own
<mdszy> Synthead: Not that I know of.
<mdszy> Synthead: However, if you do `Hash.new "nothing!"`, and you try to access a non-existent key, it'll return "nothing!"
theRoUS_ has quit [Read error: Operation timed out]
<mdszy> So maybe that could somehow be put to use for your purposes?
KL-7 has joined #ruby
<Synthead> mdszy: oh that's really interesting
KL-7 has quit [Client Quit]
kenichi has quit [Remote host closed the connection]
rainbowDashh has joined #ruby
hydrozen has joined #ruby
zastaph has joined #ruby
pting has joined #ruby
TheShadowFog has quit [Read error: Connection reset by peer]
<Synthead> if I do method(variable), how can I make 'method' modify 'variable'? (to my understanding, it doesn't ever modify 'variable' by default
<Hanmac> lichtkind what do you mean with rubydelta?
berkes has joined #ruby
<workmad3> Synthead: it depends what you mean by 'modify'
<mdszy> Synthead: You can't. However, I'll have an example for you in a moment of something you can do that's similar to that
<workmad3> Synthead: the method gets passed the same reference that the variable currently contains, and you can make changes to that object
cheese1756 has quit [Ping timeout: 245 seconds]
<_bart> How do I turn a parsed website with Nokogiri into HTML structure only? For example, turn <html><body><div id="content">Boo <a href="#">something</a></div></body></html> to <html><body><div id="content"><a href="#"></a></div></body></html>
<havenn> _bart: I'd suggest fetching your 'random page with OpenURI, parse HTML and find your 'menu items' with Nokogiri.
<workmad3> Synthead: however, you can't change the reference stored in the variable
binaryplease has quit [Quit: WeeChat 0.3.8]
<_bart> havenn: yes, I understand that part, the hard part is finding the menu items with Nokogiri. it should be smart enough to find them!
twinturbo has joined #ruby
ryanf has joined #ruby
bglusman has quit [Remote host closed the connection]
<workmad3> _bart: nokogiri is smart enough to find them, if you're smart enough to give it the right query :P
<havenn> _bart: What is a 'menu item'?
adamkittelson has joined #ruby
arkiver has quit [Quit: Leaving]
<mdszy> erm, nevermind, Synthead. Apparently what I thought would work doesn't.
sdwrage has quit [Quit: geekli.st/programmer]
apok has quit [Remote host closed the connection]
xiphiasx_ has quit [Quit: leaving]
apok has joined #ruby
iamjarvo has quit [Quit: Leaving.]
carlyle has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<workmad3> Synthead: this hopefully sheds some light: https://gist.github.com/3085841
<_bart> havenn, workmad3: do you know of examples of such a complex query? I know I can get the value/attributes of anything, but now it should "look" for certain patterns
<workmad3> _bart: I don't even know what you're actually looking for, and in fairness for complex queries with nokogiri, I'd recommend xpath and I suck at xpath
cheese1756 has joined #ruby
<_bart> workmad3: Okay let's say I scrape ebay (just an example!), then I want to detect the articles and their specs
akem has quit [Ping timeout: 264 seconds]
`brendan has quit [Read error: Connection reset by peer]
<_bart> to get that working for just ebay is easy, with either css or xpath, I know. but I want the same code/queries to work for amazon!
<_bart> (for example)
`brendan has joined #ruby
<workmad3> _bart: not gonna happen
<_bart> workmad3: monkeys could do it
<workmad3> _bart: different sites have different structure, even if they seem to have similar patterns
<workmad3> _bart: and monkeys/humans are much better at that sort of semantic pattern matching than we can get computers to do :P
Eldariof-ru has quit []
cheese1756 has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby
yxhuvud has quit [Ping timeout: 244 seconds]
robozahn has joined #ruby
xiphiasx_ has joined #ruby
xiphiasx_ has quit [Changing host]
xiphiasx_ has joined #ruby
dinkytoy has quit []
schwap has joined #ruby
manizzle has quit [Read error: No route to host]
<blazes816> _bart, short of some intense machine-learning you're not gonna get much. Not that that wouldn't be a fun project.
<workmad3> _bart: it all depends on how accurate you want the results though... and if they have roughly the same information, but just different locations in the structure you can pull out the abstract pattern into a method or another object and just plug-in the exact queries... but if you want to construct xpath queries that pull out meaning, or if you want to have a set of queries that work across the board without needing to be
<Hanmac> _bart ... its possible to get an element by id with xpath ... (maybe the different sites has all "menu" as id for an element)
maletor has quit [Ping timeout: 245 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<_bart> Yes it's hard, but it's also fun like blazes816 stated.
<_bart> I've already managed to create a ruby script that locates the "search form" on almost any website
maletor has joined #ruby
carlyle has quit [Remote host closed the connection]
wmoxam has joined #ruby
ryan0x2 has quit [Remote host closed the connection]
<bricker88> what do I google to find the docs for this syntax: %w{} %r{} etc. ?
carlyle has joined #ruby
<_bart> it loops through all forms, and then checks for logical terms like "search" but also input names like query etc.
A124 has joined #ruby
rainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
manizzle has joined #ruby
cheese1756 has joined #ruby
wangr has quit [Ping timeout: 265 seconds]
cheekymonk3y has quit [Ping timeout: 244 seconds]
maletor has quit [Ping timeout: 244 seconds]
mpereira has quit [Ping timeout: 245 seconds]
itnomad has quit [Quit: Leaving]
Z_Mass has joined #ruby
cheese1756 has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
notVert has joined #ruby
axl_ has left #ruby [#ruby]
mpereira has joined #ruby
cdepue_ has joined #ruby
enroxorz has quit [Quit: Leaving]
fayimora has quit [Ping timeout: 265 seconds]
a_a_g has quit [Quit: Leaving.]
cdepue has quit [Ping timeout: 245 seconds]
d3c has quit [Quit: Sleep]
timonv has quit [Remote host closed the connection]
nachtwandler has quit [Quit: leaving]
cheekymonk3y has joined #ruby
fayimora has joined #ruby
cdepue has joined #ruby
r0bby has quit [Ping timeout: 244 seconds]
nyuszika7h has joined #ruby
rainbowDashh has joined #ruby
fayimora has quit [Client Quit]
nyuszika7h has quit [Client Quit]
niklasb has joined #ruby
ryan0x2 has joined #ruby
<shevy> bricker88: not sure. %w() works too
rainbowDashh has quit [Remote host closed the connection]
<shevy> it is syntactic sugar I think
mrsolo has joined #ruby
<shevy> where the opening and closing character has to be the same
<shevy> %w% cat dog horse %
jsilver has quit [Remote host closed the connection]
notVert has quit [Ping timeout: 252 seconds]
cheese1756 has joined #ruby
nyuszika7h has joined #ruby
cdepue_ has quit [Ping timeout: 264 seconds]
`brendan has quit [Ping timeout: 248 seconds]
zizzyx has joined #ruby
beneggett has joined #ruby
<zizzyx> i'm having trouble with the rails omniauth plugin, every single time i try to authorize my app with Facebook, it returns the "Session does not match current stored session" error
<zizzyx> how do i discard this session? if i go to facebook account management, remove the app authorization, and then go through the steps to reauthorize, the callback result is the same
<zizzyx> so i'm wondering how to clear any session information omniauth is storing and start from scratch
<Hanmac> zizzyx look at #rubyonrails
cheese1756 has quit [Ping timeout: 245 seconds]
AlbireoX`Away is now known as AlbireoX
khakimov has joined #ruby
AlbireoX` has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
sepp2k1 has joined #ruby
chriskk has quit [Quit: chriskk]
sepp2k has quit [Ping timeout: 264 seconds]
aroman has joined #ruby
sdwrage has joined #ruby
jsime has quit [Read error: Connection reset by peer]
Goles has joined #ruby
Tomasso has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
csmrfx has joined #ruby
<csmrfx> 8)
<havenn> _bart: I don't think I understand what you're looking for, so this might not help at all <.<, but you can make a generic scraper that looks for 'something' across multiple sites like so: https://gist.github.com/3086118
<_bart> havenn: thanks, why do you use page.search('link') instead of page.css('a') ?
nilg has quit [Read error: Connection reset by peer]
chriskk has joined #ruby
hydrozen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jlwestsr has quit [Read error: Operation timed out]
<_bart> havenn: also, I appreciate your help but this is exactly how far I got. Now the code needs to get more intelligent and select all <a> when it's inside div#menu or div#navigation or div.menu or div.navigation or ul.menu or navbar etc!
jsilver has joined #ruby
<havenn> _bart: ahh
cheekymonk3y has quit [Ping timeout: 255 seconds]
<havenn> _bart: Would be a much simpler task if people used semantic HTML <nav>
stephenjudkins has joined #ruby
<_bart> havenn: true! but websites are a mess! but still it's an interesting challenge!
<_bart> havenn: already wrote a method that checks wether a url is a internal/external one
<Hanmac> hm <nav> could be okay if there is a standard for that ...
<_bart> and that sort of stuff
vitoravelino`afk is now known as vitoravelino
cheekymonk3y has joined #ruby
tatsuya_o has joined #ruby
krusty_ar_ has joined #ruby
krusty_ar has quit [Ping timeout: 264 seconds]
jgrevich has quit [Read error: No route to host]
cj3kim has joined #ruby
T_Rex__ has joined #ruby
jgrevich has joined #ruby
jgrevich has quit [Client Quit]
T_Rex_ has quit [Read error: Connection reset by peer]
T_Rex__ is now known as T_Rex_
reuf has quit [Ping timeout: 264 seconds]
zz_chrismcg is now known as chrismcg
joch_n has joined #ruby
samu has joined #ruby
stephenjudkins_ has joined #ruby
cheekymonk3y has left #ruby ["Leaving"]
<samu> Hi. can I ask phusion-passenger related questions here?
chrismcg is now known as zz_chrismcg
sdwrage has quit [Quit: geekli.st/programmer]
<shevy> not many will know phusion
<shevy> you can always give it a try but dont be disappointed if none can help
<samu> okay, sure. I'll try.
<samu> so, I'm trying to have two versions of ruby and passenger on my system. for 1.8 and 1.9
LBRapid has quit [Quit: Farewell.]
s0ber_ has joined #ruby
<havenn> samu: you running standalone daemon or nginx/apache module?
<samu> I'm installing passenger using gem, but for some unknown reason I haven't got the PassengerWatchdog binary...
<samu> havenn: nginx.
internet_user has quit [Remote host closed the connection]
<samu> the only thing is that I haven't got that passenger watchdog.
cheese1756 has joined #ruby
<samu> I installed entire passenger from freebsd ports system, for 1.8
s0ber has quit [Read error: Operation timed out]
<samu> it worked, I have it now
stephenjudkins has quit [Ping timeout: 244 seconds]
stephenjudkins_ is now known as stephenjudkins
<samu> but for some reason it doesn't work for 1.9
beneggett has joined #ruby
s0ber_ is now known as s0ber
<samu> and I have no idea where to get that watchdog for 1.9 from.
Aszurom has quit [Quit: Leaving]
axl_ has joined #ruby
atmosx_ has joined #ruby
berkes has quit [Quit: Ex-Chat]
<samu> I'm not sure, but I think that this watchdog is for nginx only.
A124 has left #ruby [#ruby]
<samu> however, passenger-install-nginx-modules does that for 1.8, not for 1.9 (and I need the 1.9 version)
cbuxton1 has joined #ruby
uris has quit [Read error: Connection reset by peer]
<havenn> samu: I wonder if PassengerLoggingAgent didn't get installed with the 'gem install passenger'
atmosx has quit [Remote host closed the connection]
<samu> Not 'logging aggent'
<havenn> mmm
<samu> it's missing this: /usr/local/lib/ruby/gems/1.9/gems/passenger-3.0.13/agents/PassengerWatchdog
KL-7 has joined #ruby
<samu> I do however have that file for 1.8 (installed from ports)
<samu> when I installed using 'gem install passenger', it also didn't make that file.
<shevy> that makes sense
<shevy> the prefix would be wrong if it would modify in /usr/local right?
alester has joined #ruby
<samu> I don't understand
cbuxton has quit [Ping timeout: 265 seconds]
ksergio has quit [Ping timeout: 250 seconds]
<shevy> where is the ruby binary on your system, the path to it?
jlwestsr has joined #ruby
<samu> /usr/local/bin/ruby19 and /usr/local/bin/ruby18
<shevy> aha ok
<shevy> and where is "ruby" ?
<samu> also in /usr/local/bin...
<csmrfx> type: 'which ruby'
<shevy> ok so everything has the same prefix
<rking> shevy: In our minds and hearts.
<samu> hah.
<samu> got it.
<samu> okay, here's what I did.
geekbri has quit [Remote host closed the connection]
zizzyx has quit [Ping timeout: 265 seconds]
<shevy> rking: lol
hynkle has quit [Quit: Computer has gone to sleep.]
saschagehlich has quit [Quit: saschagehlich]
<samu> setenv RUBY_VER 1.9; setenv RUBY /usr/local/bin/ruby19
<samu> passenger-install-nginx-module
maletor has quit [Ping timeout: 244 seconds]
<samu> I allowed him to compile nginx in some other, shitty directory (which I removed after that)
<samu> but, which is more important - it used ruby 1.9 and build the watchdog binary for me
<samu> in ruby 1.9 lib directory.
cdepue_ has joined #ruby
<shevy> what is setenv ... is that a tcsh shell command?
<samu> yup, same as export in bash.
<shevy> I see
billiamii has joined #ruby
<samu> and in fact, it seems to be working.
<samu> ;-)
<shevy> I am a bit stumped. possibly you have two paths /usr/local/lib/ruby/gems/ one for 1.9 and one for 1.8 I think
<samu> yes, exactly.
cheese1756 has quit [Ping timeout: 245 seconds]
<samu> I have /usr/local/lib/ruby/gems/1.9 and /usr/local/lib/ruby/gems/1.8
KL-7 has quit [Quit: This computer has gone to sleep]
<shevy> every time you install a gem, a copy is kept in cache/ subdirectory there. like foo-1.0.gem
lorandi has quit [Quit: Leaving]
<shevy> then you can install via "gem install foo" or "gem install foo-1.0.gem"
sailias has quit [Ping timeout: 248 seconds]
grekkos_ has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<shevy> so it should be easy to have the same gems installed on both versions
vlad_starkov has quit [Remote host closed the connection]
wpaulson has joined #ruby
<samu> yup. now it works.
tekillaa has joined #ruby
<samu> I had one problem with `gem` binary, but I think that it was a freebsd ports issue.
<samu> it was a symlink to.. itself.
<samu> ;D
<samu> but I have `gem18` and `gem19`, which works fine.
Z_Mass has quit [Quit: Leaving]
atmosx_ is now known as atmosx
cdepue has quit [Ping timeout: 264 seconds]
<shevy> hmmm
<shevy> interesting that freebsd keeps versioned binary names
linoj has quit [Ping timeout: 265 seconds]
<samu> it does make a symlink, however
<samu> so if you install just one version of ruby, you will have /usr/local/bin/ruby
<atmosx> aloha
<samu> the same with python.
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<samu> but I find this good - it is easy for me to have many versions of ruby, or python installed at the same time
aroman has quit [Quit: aroman]
<samu> globally, not locally, like using rvm.
<atmosx> samu: gentoo has slots
<shevy> yeah like debian
<shevy> I fell for the gobolinux scheme. for versioning I use the directory name, then keep the symlink to point at the version in use
crankycoder has quit [Remote host closed the connection]
<shevy> I forgot how slots work
<shevy> they use symlinks too right?
oscardelben has joined #ruby
<shevy> or was this eselect... rking help me out, you are a gentooler
<havenn> I do love me some RVM (rvm.io) and rbenv (github.com/sstephenson/rbenv/), but I've been meaning to look at rbfu (https://github.com/hmans/rbfu)
<shevy> oh? fu?
<shevy> what a name
<mdszy> I used to use RVM, now I use rbenv, rbenv is SO much nicer.
<mdszy> I always had this weird issue with RVM where I had to always run `rvm reload` before any binary gems ran. Not just after installing them, but on every shell startup.
Morkel has quit [Quit: Morkel]
<atmosx> shevy: I'm not sure if slots are using symlinks
<shevy> atmosx: yeah that could be... I remember years ago I wondered how they made it work without symlinks... still haven't found out
<atmosx> I never bothered, just knew that I could have 2 versions of something
<atmosx> ruby1.9 on gentoo is a mess though
grekkos has joined #ruby
<atmosx> I installed it manually to avoid the hassles
maletor has quit [Ping timeout: 244 seconds]
grekkos is now known as Guest67397
<Hanmac> different system ruby versions on ubuntu are no problem
<atmosx> well, I use rvm now
<atmosx> like most of ruby-ist I think
tekillaa has quit [Ping timeout: 245 seconds]
<shevy> Hanmac: but they use symlinks or?
beneggett has quit [Ping timeout: 264 seconds]
wpaulson_ has joined #ruby
aroman has joined #ruby
<Hanmac> shevy yeah, an symlink chain, but it works
<shevy> yeah, symlinks are the most common solution. now I need to find out how slots work...
wpaulson_ has quit [Client Quit]
<atmosx> octopress blog is awesome http://octopress.org/docs/
thone has joined #ruby
maletor has joined #ruby
<atmosx> shevy: you need different versions of ruby?
<shevy> atmosx: nah, my ruby versions reside in /Programs/Ruby/VERSION_HERE
imami|afk is now known as banseljaj
* Hanmac only need one version ... the newest release
<shevy> :)
<shevy> ok wmoxam
<wmoxam> that's what Ubuntu uses
<shevy> yeah I think those are the /etc/alternatives symlink pointers
<wmoxam> yeah
<Hanmac> update-alternatives is cool
<shevy> "It was rewritten primarily to remove the dependence on perl" hehehe
<shevy> poor old perl
wpaulson has quit [Ping timeout: 264 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<shevy> this is kinda interesting
<shevy> alternatives uses a tag-like scheme or? like ... editor is a symlink to the main editor to use
<shevy> a bit like a system configuration, is it not?
<shevy> editor -> vim
<shevy> what I dont understand though - why dont they just use ENV VARS? like $EDITOR
`brendan has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
davidw has quit [Ping timeout: 248 seconds]
cheese1756 has joined #ruby
<shadoi> shevy: they do
<shadoi> shevy: it's to control the situation where you have multiple editors with the same binary name
<shevy> aha
<shadoi> any software
<shadoi> not just editors
trend has quit [Quit: trend]
atmosx has quit [Quit: leaving]
<shevy> I see, makes sense
<blazes816> they aren't really different. using a symlink like /bin/editor is basically just persisting that data to, well, a symlink instead of wherever env vars are stored.
<shadoi> EDITOR=vim
<shadoi> you want vim-tiny?
<shadoi> vim-ruby?
<shadoi> vim-nox?
<shadoi> etc.
Spooner has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
<shadoi> It's just about convenience
<blazes816> yeah, that's what I'm saying
<blazes816> i'm just saying their not fundamentally different. since the original question was why not use env vars.
stephenjudkins has quit [Quit: stephenjudkins]
<matled> well, the alternatives are also used for things like editor, x-www-browser, x-terminal-emulator, ... to provide a configurable default used if nothing is specified
atmosx has joined #ruby
<shadoi> Yeah, it's so things can reference an abstract name
<matled> but it's far from perfect
<matled> trying to consistently change the pdf viewer, browser and the like for all applications that may spawn it seems almost impossible
atmosx has quit [Client Quit]
baphled has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
<shadoi> yeah, since it's debian-specific, it relies on packagers patching apps to use it. Which is very non-ideal.
<shadoi> linux! yay!
cheese1756 has quit [Read error: Connection reset by peer]
<wmoxam> shadoi: Year of the Desktop!!!!!!
etrnl has joined #ruby
atmosx has joined #ruby
hydrozen has joined #ruby
<shevy> lol
tommyvyo has joined #ruby
<Hanmac> shadoi wesnoth use update-alternatives
<shevy> someone is making fun of desktop linux!
<etrnl> just reinstalled my server with ubuntu (natty) and used the ruby1.9.1 package and ruby1.8 packages, doing so get gems to default to 1.8.7 instead of 1.9, how can I change which version rubygems uses?
jaylevitt has quit [Ping timeout: 264 seconds]
<shadoi> etrnl: uninstall all of the above and use rvm.
<wmoxam> shevy: <insert> obligatory Frozen Penguin reference as an example of Linux gaming
<etrnl> oi?
ZachBeta has joined #ruby
<etrnl> k
<dankest> etrnl: unfortunately, shadoi is giving the best advice
<Hanmac> etrnl or use update-alternatives --config ruby
maletor has quit [Ping timeout: 244 seconds]
<etrnl> Used that, ruby is setup for ruby1.9.1 but "gem env" is still showing that it wants 1.8.7
asobrasil has left #ruby [#ruby]
joshman_ has quit [Ping timeout: 245 seconds]
adamkittelson has quit [Remote host closed the connection]
<Hanmac> update-alternatives --config gem
<shadoi> etrnl: trust me, save yourself hours of frustration and remove all that horse-shit.
wvms has joined #ruby
<wmoxam> er, s/forzen penguin/tuxracer
<_bart> Hi when I do uri = URI.parse("http://google.co.uk/go/?href=http://test.com") uri.path I get only /go/, but I want /go/?href=…, how do I also get the get variables in the path?
<dankest> etrnl: shadoi +1
<Hanmac> shadoi i think the problem could be solved when he used an newer ubuntu
<shadoi> ubuntu 12.04 is the only one worth even trying to use.
<shadoi> even it still has a rubygems package for 1.8
<shadoi> so … yeah, I still recommend blowing it away.
maletor has joined #ruby
jarray52 has joined #ruby
* Hanmac has 12.10 and it has ruby package linked to ruby1.9.1
<shadoi> I look forward to wycats new static build showing up in linux soon.
<_bart> full_path = uri.path + "?" + uri.query
<shadoi> Hanmac: yeah but for the 1.9.3 package it doesn't depend on the rubygems package.
cjlicata has joined #ruby
<shadoi> So it doesn't freak out if you use the gem command to install gems.
<blazes816> _bart: full_path = "#{uri.path}?#{uri.query}"
<Hanmac> shadoi because the rubygems package is not needed anymore
<blazes816> just a preference
<shadoi> Hanmac: exactly, previously you have to hack the gem binary to re-enable "gem install <name>"
bosphorus_ has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
<Hanmac> shadoi that was old 1.8 days ... dont life in history ...
<Hanmac> if you want something to freak out look at the rubygems-integration package
<shadoi> Yeah, then people try to install certain ruby libs via APT also.. and it pulls it back in.. and you're down the rabbit-hole again.
Maniacal has joined #ruby
<kapowaz> does anybody here know anybody who works at github ?
atmosx has quit [Ping timeout: 276 seconds]
<shadoi> kapowaz: vaguely, why?
carlyle_ has joined #ruby
<kapowaz> I'd like to have a discreet chat with somebody who works there (ideally developer, rather than, say, office manager)
<bricker88> How is this possible? https://gist.github.com/3086396 Basically I'm looking for elements where the :meta_value has a youtube URL but the content doesn't reference it. The numbers don't add up and I feel like I'm doing some ruby incorrectly. I've checked all the regular expressions on rubular and they seem to be okay.
<shadoi> kapowaz: if you're in SF, go to their drinkup
carlyle has quit [Ping timeout: 264 seconds]
samu has left #ruby [#ruby]
<kapowaz> I'm in London. Missed their last one, alas.
theRoUS has quit [Ping timeout: 260 seconds]
<shadoi> kapowaz: plenty of their devs are active on twitter, it's probably your best shot.
<kapowaz> not really so discreet there :)
mahmoudimus has joined #ruby
cjlicata has quit [Ping timeout: 264 seconds]
<kapowaz> the problem with twitter is it's difficult to have a dialogue with somebody who doesn't follow you without giving away the reason you want to talk to them for all to see…
<shadoi> bricker88: it's hard to say without knowing what data you're doing that with.
awarner has joined #ruby
beneggett has joined #ruby
<Synthead> is there a way I can make OptionParser separate the "usage" output with newlines?
<shadoi> Synthead: separator
<Synthead> shadoi: nice :)
hydrozen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Synthead> shadoi: thanks!
<csmrfx> twitter is for publicity
cj3kim has quit [Quit: This computer has gone to sleep]
<Synthead> shadoi: can I make one option dependent of another without using a bunch of tests?
chomp has quit [Quit: Leaving]
<lichtkind> Hanmac: a doc that tells me differences between versions like perldelta
stewart_ has quit [Quit: Leaving.]
tatsuya_o has quit [Remote host closed the connection]
j3ll3 has joined #ruby
iamjarvo has quit [Quit: Leaving.]
<shadoi> Synthead: not really.
zizzyx has joined #ruby
mathie is now known as rubaidh-hubot
rubaidh-hubot is now known as mathie
cjs226 has quit []
stewart_ has joined #ruby
khakimov has joined #ruby
alup has quit [Ping timeout: 272 seconds]
mpereira has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 264 seconds]
jwg2s has joined #ruby
Gavilan has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
banseljaj is now known as imami|afk
Z_Mass has joined #ruby
tcopp has left #ruby [#ruby]
<jwg2s> Hi all, I've got a hash that'd like to cycle through and I'm trying to figure out how to best do it efficiently. https://gist.github.com/3086464 I'm trying to cycle through the fixed_width_assignment variable and print out the keys into the target_fields array so my code is more dry
sailias has joined #ruby
j3ll3 has quit [Quit: leaving]
<jwg2s> This is a concept I've been trying to figure out and would help me dramatically in all aspects of my code :)
jimeh has joined #ruby
<xclite> target_fields = fixed_width_assignments.keys
<xclite> ?
twinturbo has quit [Quit: twinturbo]
bbttxu has quit [Quit: bbttxu]
<xclite> if you need strings, map it
<jwg2s> xclite: if i wanted to add :loaded_at and :sequence how would i do that?
<jwg2s> yeah i think it is just the keys
<xclite> what does the desired structure look like
<shadoi> jwg2s: fixed_with_assignments[:loaded_at] = "something"
<jwg2s> one sec
<xclite> [:loaded_at, :sequence, key1, key2, key3... keyn]
fgwaegeawgfwa has joined #ruby
tzvi|work has quit [Read error: Connection reset by peer]
<jwg2s> desired.rb in that gist
<jwg2s> :key1 would be :client_id for example
Spooner has joined #ruby
<jwg2s> first version was a bunch of copy pasting these keys and want to dry that up
<xclite> target_fields = [:loaded_at, :sequence]
balki_ has joined #ruby
alanp has joined #ruby
noganex has quit [Read error: Operation timed out]
<shadoi> jwg2s: is loaded_at another Hash or just a symbol?
<xclite> i dunno there's probably a more rubyist way to do that all at once
kevinbond has joined #ruby
<xclite> but i'd just add a mapped array to [:loaded_at, :sequence] and move on
chson has quit [Remote host closed the connection]
PaciFisT has quit [Quit: Leaving.]
<shadoi> fixed_width_assignments.merge(virtual_fields)
<jwg2s> fixed_width_assignments.keys.merge(virtual_fields.keys)
<jwg2s> would that work to just get the keys?
<shadoi> No reason for the target_fields array that I can see.
<jwg2s> it's used later in other code
<shadoi> You don't want the actual values?
<jwg2s> no just the keys
awarner has quit [Remote host closed the connection]
<erichmenge> Hi everyone. Wondering if there is a concise way to check to see if a hash with keys that are numeric keys are in order. Ex: :'0', :'1', :'2'.
jonathanwallace has quit [Read error: Operation timed out]
<jwg2s> so :client_id, :file_title, etc
alanp_ has quit [Ping timeout: 252 seconds]
balki has quit [Ping timeout: 252 seconds]
<shadoi> erichmenge: assuming you don't want to sort?
<erichmenge> *numeric strings
<erichmenge> shadoi: Right, don't actually want to change the hash.
<erichmenge> I should say numeric symbols, sorry.
adamkittelson has joined #ruby
minijupe has quit [Quit: minijupe]
alester has quit [Quit: alester]
<shadoi> erichmenge: if you know the start and end points it's fairly easy to do by comparing it against a range
<shadoi> otherwise I'd have to ponder. :)
<erichmenge> shadoi: Don't know the start and end points :/
<shadoi> probably easiest to iterate with a counter from 0
<erichmenge> I was hoping someone could do it with a cute little one liner :)
<shadoi> and compare the key
Goles has quit [Ping timeout: 246 seconds]
rainbowDashh has joined #ruby
<erichmenge> shadoi: That's what I was thinking. Was hoping I was missing a better way. Guess I'll stick with the easy way ;)
<erichmenge> Thanks.
lewis1711 has joined #ruby
<shadoi> erichmenge: 0.upto(hsh.keys.length) { |n| hsh.keys.all? {|k| n == k}}
<erichmenge> nice
<erichmenge> That looks good, thanks.
<lewis1711> File.open("foo.txt").each do |line| ... end #how do I check to see if line has a trailing whitespace? I have tried line[0] == ' ', line[0] == 32, line[0] == '\s', no dice
<shadoi> jwg2s: target_fields = fixed_width_assignments.keys + virtual_fields
<lewis1711> leading whitespace I should maybe say. which ever one starts at the beginning
<shadoi> jwg2s: if you don't want the values
<shadoi> lewis1711: line =~ /.*\s+/
reuf has joined #ruby
<apeiros_> shadoi: wtf?
<apeiros_> 0.upto(hsh.keys.length) { |n| hsh.keys.all? {|k| n == k}} <-- ?!?
wvms has quit [Read error: Connection reset by peer]
<shadoi> apeiros_: I'm sure there's a nicer way
<lewis1711> shadoi: thanks will give that a shot
<apeiros_> assuming hsh is a hash, and hsh.size > 1, this is never true…
thone has quit [Ping timeout: 244 seconds]
dv310p3r has quit [Ping timeout: 248 seconds]
<apeiros_> for the simple reason that a hash will only contain a key once…
<lichtkind> apeiros_: thank you i maybe find it
<shadoi> apeiros_: he's setting the keys to numbers, just wants to know if they're in sequence
bbttxu has joined #ruby
TheShadowFog has joined #ruby
wvms has joined #ruby
<shadoi> WHY he's setting the keys to numbers, instead of using an array, I don't. :)
zizzyx has left #ruby [#ruby]
<shadoi> know*
<apeiros_> shadoi: you mean he wants to know whether for hsh.keys the former one is always smaller than the latter one when iterating?
<shadoi> yeah
<apeiros_> I don't think your code tests that…
<apeiros_> hsh.keys.each_cons(2).all? { |k1,k2| k1 < k2 }
<shadoi> yeah
stephenjudkins has quit [Quit: stephenjudkins]
<shadoi> much better.
<apeiros_> lichtkind: cool!
<shadoi> erichmenge: ^^
yoklov has joined #ruby
<erichmenge> Ahhh
sdwrage has joined #ruby
adamkittelson has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<erichmenge> Yes thanks, I realized that the other example wouldn't work unless it started at 0, but I had a different idea. I like the example apeiros_ gives.
carloslopes has quit [Quit: Leaving.]
<lewis1711> ok is line not even a string or something?
<lewis1711> in enumerating over a file
<shadoi> lewis1711: pry is your friend
<erichmenge> #each_cons is exactly what I was looking for
<erichmenge> why I didn't think to google "consecutive" I don't know.
<lewis1711> i don't want my repl infected with autism
blacktulip has quit [Remote host closed the connection]
<shadoi> lewis1711: yes you do. :)
KensoDev has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
MatthewGA_ has joined #ruby
carlyle_ has quit [Ping timeout: 245 seconds]
balrog-k2n has left #ruby [#ruby]
niklasb has joined #ruby
MatthewGA has quit [Ping timeout: 240 seconds]
superjoe has left #ruby ["Leaving"]
noganex has joined #ruby
SpitfireWP has quit [Disconnected by services]
<apeiros_> erichmenge: if your hash is really large, .each_key instead of keys.
crankycoder has joined #ruby
<shevy> I hate hate hate all the GNU tools to compile things
<erichmenge> apeiros_: Got it, thanks!
MatthewGA_ has quit [Ping timeout: 248 seconds]
rainbowDashh has quit [Disconnected by services]
<shevy> 'pkg-config --modversion glib-2.0' returned 2.20.4, but GLIB (2.33.3)
RainbowD_ has joined #ruby
T_Rex_ has quit [Read error: Connection reset by peer]
RainbowD_ is now known as rainbowDashh
cakehero has joined #ruby
cbuxton1 has quit [Quit: Leaving.]
cdepue_ has quit [Remote host closed the connection]
kjellski has quit [Quit: This computer has gone to sleep]
SQLStud has quit [Quit: Leaving]
lewis1711 has left #ruby [#ruby]
crankycoder has quit [Ping timeout: 252 seconds]
niklasb has quit [Ping timeout: 264 seconds]
<jarray52> Is there a tool to find a missing end statement in a Ruby file?
sits has joined #ruby
<eam> if it's missing there's nothing to be found?
<eam> it's gone!
thone has joined #ruby
wvms has quit [Ping timeout: 246 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<jarray52> eam: Perhaps a tool to find a statement without an end?
<radu> like a wheel ?
<blazes816> lmao
<davidcelis> jarray52: Can't really do it; the missing end always ends up being at the end of the file. ruby doesn't care about indentation
billiamii has quit []
<eam> jarray52: ruby does that already, no?
<davidcelis> jarray52: you have to visually parse through the file, unfortunately
jonathanwallace has joined #ruby
<eam> it tells you an end is missing -- there's no way to know which statement it's missing from
<radu> how about the syntax checker ?
<eam> radu: yes, the syntax checker notes an end is missing
Tricks has quit [Quit: No Ping reply in 180 seconds.]
<jarray52> radu: Which syntax checker? The ruby checker?
<eam> consider: def foo .... def bar ... end #EOF
Tricks has joined #ruby
<eam> is foo() or bar() missing the end?
<eam> you can't know
<csmrfx> jarray52: there is
<csmrfx> the interpreter
<shadoi> jarray52: a good editor, try sublime-text2, or any of the more traditional ones with syntax highlighting and ctypes enabled.
<tds> what happens if you define a method within a method in ruby
<csmrfx> I know what jarray52 means tho
<eam> csmrfx: yeah the problem is that won't actually do it
<csmrfx> you want to keep the files small
<shadoi> tds: you define a method.
<tds> visible outside of its containing element?
<tds> method
d3vic3 has quit [Ping timeout: 252 seconds]
<shadoi> tds: depends where you define it, but yes.
<csmrfx> jarray52: what I often resort to is comment everything, then start uncommenting gradually
<jarray52> How about this? Is there a text editor that highlights pairs. Given a statement, it finds the corresponding end in the code as written.
<csmrfx> jarray52: if I cant find the missing end
<shadoi> jarray52: yes, pretty much all of them with language detection.
<jarray52> csmrfx: That's what I did. It took almost an hour.
<radu> eam: I agree, there isn't.
<csmrfx> jarray52: you can not know where the missing end unless you know the purpose == meaning -- and computers suck with meaning
<eam> again, no editor can find "the corresponding end"
<eam> if the syntax isn't valid
<shadoi> eam: it vim shows it for me.
<shadoi> *shrug*
<eam> shadoi: no, it doesn't
<eam> it shows *a* end
<csmrfx> jarray52: so, you learned to keep code modular, small bits that are perhaps in separate files
<shadoi> yeah, it does. it changes the coloring.
<eam> not necessarily the one you wish to end a particular block
<eam> shadoi: no, it certainly does not
<csmrfx> It does not show you the *missing* end.
<shadoi> eam: autoindent and syntax highlighting make it extremely easy to see.
d3vic3 has joined #ruby
<csmrfx> easier perhaps
<csmrfx> I use vim too
<radu> shadoi : the question is about correctness.
<eam> shadoi: yes indenting can help *you* figure out what you've written
Synthead has quit [Quit: p33 ba115]
<eam> but no computer can tell you which block a given "end" should attach to if the syntax isn't valid
<shadoi> eam: shows you a dangling/missing end as well.
rekenerd has quit [Quit: Leaving]
thone has quit [Quit: leaving]
<eam> shadoi: only if you happen to have done certain other things right (such as indent)
<eam> it's a heuristic
thone has joined #ruby
<shadoi> I read the question as "Is there an editor that will show me if I'm missing an end"
<shadoi> and clearly it's not a hard thing to see in any decent editor.
<eam> his complaint was that "missing an end" (which ruby tells you) isn't enough
<eam> and he wants to find where it should go
<eam> which is not possible, in general
<csmrfx> ok, I give you 3k loc file with a missing end and some syntax error somewhere. Is it "not a hard thing to see"?
stephenjudkins_ has joined #ruby
<csmrfx> I'm sorry, it can be extremely hard, or, at least take a quarter hour or two, which sucks
<eam> if it's that hard for a human your code isn't written very well
zastaph has quit []
<eam> the issue is merely that a computer can't determine intent
<jarray52> vim can find matching parenthesis. Why can't a text editor with a ruby interpreter built in find corresponding end statements?
<eam> jarray52: no it can't
<shadoi> csmrfx: last time I saw a ruby file with more than 1000 lines of code in it, I puked. And then promptly refactored it. ;)
<eam> jarray52: if you have mismatched parens then vim can't find matches
<eam> because the fact that a paren is missing means the one it tries to match may be incorrect
<jarray52> eam: I can add end statements at the end of my code.
<csmrfx> jarray52: *matching* parenthesis. It cannot be sure where the *missing* pair should be, if it even can tell if a pair is missing.
<eam> jarray52: sure you can
<radu> jarray52 - that doesn't make it correct
<csmrfx> What word is from this sentence, vim?
wmoxam has quit [Ping timeout: 264 seconds]
<jarray52> I guess that's true
<eam> jarray52: here's a trivial example: def foo; puts "hello"; puts "world" #EOF
<csmrfx> Ruby, please tell me which I omitted from this sentence?
<eam> does the missing end go after the first, or second puts?
lichtkind has quit [Quit: ChatZilla 0.9.88.2 [Firefox 13.0.1/20120615112143]]
stephenjudkins has quit [Ping timeout: 265 seconds]
stephenjudkins_ is now known as stephenjudkins
<eam> only the author knows if foo() should print "hello" or "hello\nworld"
<csmrfx> I kinda have the inverse of that problem
<csmrfx> I'd like to make a prolog in ruby
<radu> you know where the end goes, but you don't know what to do ?
<csmrfx> but a prolog that uses the english language word order
jonathanwallace has quit [Remote host closed the connection]
niklasb has joined #ruby
<csmrfx> but since nor ruby nor prolog know english, do I need to teach em first *boggle*
<csmrfx> then I could say "find a yellow bird that sings in D minor"
<csmrfx> luckily there are only limited number of nouns and verbs in this dsl
ackz has quit [Quit: Leaving...]
cbuxton has joined #ruby
<csmrfx> I'm sure I will finish this before 2016
* csmrfx goes to find a copy of "Reasoned Schemer" that has a prolog interpreter in 25 loc
niklasb has quit [Ping timeout: 264 seconds]
schickung has joined #ruby
dankest has quit [Quit: Leaving...]
banghouse2 has joined #ruby
kvirani has quit [Remote host closed the connection]
mpereira has joined #ruby
kvirani has joined #ruby
banghouse has quit [Ping timeout: 252 seconds]
ianbrandt has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
seanstickle has joined #ruby
kvirani has quit [Ping timeout: 244 seconds]
hunglin has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
pk1001100011 has quit [Ping timeout: 265 seconds]
DrShoggoth has quit [Quit: Leaving]
Gm4n has quit [Ping timeout: 248 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Gm4n has joined #ruby
tomb has quit [Quit: Computer has gone to sleep.]
joch_n has quit [Quit: Linkinus - http://linkinus.com]
williamcotton has quit [Ping timeout: 265 seconds]
digitalcakestudi has joined #ruby
autojack has joined #ruby
williamcotton has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
cherrypeel has joined #ruby
<autojack> is there a way to have rubygems create a symlink in /usr/bin to something in my gem directory when I install the gem?
JustinCampbell has joined #ruby
<autojack> google is failing me. or I am failing at google.
JustinCampbell has quit [Read error: Connection reset by peer]
ngoldman has joined #ruby
JustinCampbell has joined #ruby
Ontolog_ has joined #ruby
kylemcgill has joined #ruby
niklasb has joined #ruby
Criztian has quit [Remote host closed the connection]
Ontolog has quit [Ping timeout: 245 seconds]
beneggett has quit [Ping timeout: 244 seconds]
Ontolog_ has quit [Ping timeout: 246 seconds]
bradhe has quit [Remote host closed the connection]
dinkytoy has joined #ruby
g_rotbart has joined #ruby
<shadoi> autojack: it puts a stub in /usr/bin by default (if the build prefix is /usr)
sits has left #ruby [#ruby]
pk1001100011 has joined #ruby
Deele has quit [Ping timeout: 252 seconds]
beneggett has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
dkissell_ has joined #ruby
<Azure> How would I run a ruby script via cron with a ruby that is installed locally via rvm?
gtuckerkellogg has joined #ruby
<seanstickle> System cron, or user cron?
<autojack> shadoi: thanks, let me look at that.
<Azure> I did try bash -l -c 'ruby command' with the output being redirected to mail, and this is what I got in response:
<Azure> /home/azure/bots/config/update_list.rb:29: warning: don't put space before argument parentheses
<Azure> /home/azure/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.3/lib/json/ext/parser.so: [BUG] Segmentation fault
<Azure> ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]
<Azure> seanstickle, user cron
<autojack> I don't have a prefix set I don't think.
ben_alman has quit [Excess Flood]
thone_ has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<apeiros_> Azure: check rvm's docs for wrapper scripts
robotmay has quit [Remote host closed the connection]
dkissell has quit [Ping timeout: 250 seconds]
dkissell_ is now known as dkissell
<apeiros_> you can let rvm create a wrapper
<apeiros_> that basically does for any shell what loading the rvmrc does for your login shell.
stephenjudkins has joined #ruby
shadoi has quit [Quit: Leaving.]
khakimov has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Client Quit]
nari has joined #ruby
jarjar_prime has joined #ruby
stephenjudkins has joined #ruby
ben_alman has joined #ruby
apeiros_ has quit [Remote host closed the connection]
bbttxu has quit [Quit: bbttxu]
bradhe has joined #ruby
theRoUS has joined #ruby
jgarvey has quit [Quit: Leaving]
kirun has quit [Quit: Client exiting]
itnomad has joined #ruby
rainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
zigidias has quit [Ping timeout: 252 seconds]
williamcotton has quit [Quit: williamcotton]
krusty_ar_ has quit [Read error: Connection reset by peer]
williamcotton has joined #ruby
williamcotton has quit [Client Quit]
autojack has left #ruby [#ruby]
schickung has quit [Quit: schickung]
axl_ has quit [Quit: axl_]
<jsilver> hi, my name is Richard Dawkward
Z_Mass has quit [Ping timeout: 265 seconds]
zigidias has joined #ruby
andrewhl has quit [Remote host closed the connection]
piotr_ has quit [Ping timeout: 264 seconds]
dv_ has quit [Read error: Operation timed out]
[Neurotic] has joined #ruby
williamcotton has joined #ruby
<tds> jsilver: ?
<jsilver> it's a troll, i am trolling
dotdotdotPaul has quit [Quit: Ciao for now!]
<jsilver> i am going ahead and doing what's called trolling
<jsilver> sorry cat typed all that
bbttxu has joined #ruby
ZachBeta has quit [Read error: Connection reset by peer]
Tomasso has quit [Ping timeout: 248 seconds]
<shevy> lol
k_89 has quit [Ping timeout: 265 seconds]
mengu has joined #ruby
ZachBeta has joined #ruby
mpereira has quit [Ping timeout: 255 seconds]
tewecske has quit [Quit: Leaving.]
jimeh has quit [Ping timeout: 264 seconds]
shavus has quit []
alejo_ has joined #ruby
alejo has quit [Ping timeout: 245 seconds]
hardeep has joined #ruby
<hardeep> is anyone familiar with REXML? I'm running into an issue where the structure is always inconsistent when using the .write method
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<hardeep> for example <someNode name="" id="" /> sometimes renders as <someNode id="" name="" />
brianpWins has quit [Quit: brianpWins]
<seanstickle> People still use rexml?
akem has joined #ruby
jjang has joined #ruby
Tomasso has joined #ruby
<hardeep> haha yes, yes they do
mathie has quit [Quit: Sleeping...]
dinkytoy has quit []
<offby1> Hey! I use rexml!
<offby1> What should I be using -- nokogiri?
<seanstickle> Yes.
<seanstickle> Or HAML to write XML.
<seanstickle> Or Nokogiri to write XML, if you like
randomautomator has quit [Remote host closed the connection]
<seanstickle> But REXML? Yuck.
thone_ has quit [Quit: leaving]
ken_barber1 has joined #ruby
thone has quit [Quit: Lost terminal]
alexinabox has joined #ruby
baroquebobcat has quit [Read error: Operation timed out]
Tomasso has quit [Ping timeout: 240 seconds]
niklasb has quit [Read error: Operation timed out]
<hardeep> if anyone is interested in an answer http://stackoverflow.com/questions/574724/rexml-preserve-attributes-order may be of some use
Caius has quit [Ping timeout: 252 seconds]
yoklov has quit [Quit: computer sleeping]
ken_barber1 has quit [Remote host closed the connection]
ken_barber has quit [Ping timeout: 252 seconds]
mockillo has quit [Ping timeout: 252 seconds]
mockillo has joined #ruby
<stephenjudkins> hardeep : if something depends on that it is a broken XML parser
strife25 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
<shevy> best moment in my computer-life was when I gave up on XML
radu is now known as Osum
<hardeep> stephenjudkins I have a specific use case of serializing specific objects to xml and compairing them as hashes
Caius has joined #ruby
<stephenjudkins> hardeep: if you are depending on the specific ordering of attributes in an XML element, you are not using XML
<Azure> hm, apeiros_ disappeared.
thone has joined #ruby
<Azure> Anyway, fwiw I do not have shell access, and I'm not sure if creating a wrapper would help.
<Azure> er
<Azure> root access, not shell access.
alexinabox has quit [Quit: alexinabox]
<stephenjudkins> the XML specification says that an XML element should be equivalent regardless of attribute order
<hardeep> have a better solution to check if a xml file has changed?
<stephenjudkins> what problem are you trying to solve?