ljarvis changed the topic of #ruby-lang to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p547: http://ruby-lang.org || Paste code on http://gist.github.com
mikecmpbll has quit [Ping timeout: 264 seconds]
vintik has quit [Remote host closed the connection]
Technodrome has quit [Quit: Technodrome]
symm- has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
jkprg has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jarto has joined #ruby-lang
tkuchiki has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
jsullivandigs has quit [Remote host closed the connection]
rubynewbie has quit []
jarto has quit [Client Quit]
jkprg has quit [Ping timeout: 245 seconds]
hgl__ has joined #ruby-lang
vincent has joined #ruby-lang
vincent is now known as Guest40788
hgl__ has quit [Remote host closed the connection]
hgl__ has joined #ruby-lang
weems|mac has joined #ruby-lang
ap4y has quit [Ping timeout: 245 seconds]
jsullivandigs has joined #ruby-lang
ruby-lang367 has joined #ruby-lang
<ruby-lang367> Hi, is there a shorter way to read from stdin then gets?
<ruby-lang367> I'm doing a code golf thing XD
<toretore> i'm sure you could use some hideous perlism
<toretore> do a ruby -h
<toretore> and look at the options
Guest40788 has quit [Ping timeout: 264 seconds]
mykoweb has quit [Remote host closed the connection]
bartoindahouse has joined #ruby-lang
mykoweb has joined #ruby-lang
godd2 has joined #ruby-lang
Technodrome has joined #ruby-lang
<eam> if by horrible you mean awesome
monees has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 250 seconds]
mykoweb has quit [Ping timeout: 240 seconds]
ap4y has joined #ruby-lang
bartoindahouse has joined #ruby-lang
mykoweb has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
bartoindahouse has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
tkuchiki has quit [Remote host closed the connection]
monees has quit [Ping timeout: 245 seconds]
mykoweb has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 256 seconds]
strmpnk has joined #ruby-lang
vintik has joined #ruby-lang
mistym has quit [Remote host closed the connection]
vincent has joined #ruby-lang
vincent is now known as Guest58559
bruno- has joined #ruby-lang
D9 has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 260 seconds]
mistym has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
Guest58559 has quit [Ping timeout: 245 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
tkuchiki has joined #ruby-lang
saarinen has quit [Quit: saarinen]
sarkyniin has quit [Quit: Quitte]
zzak__ has quit [Ping timeout: 240 seconds]
EvilJStoker has quit [Ping timeout: 240 seconds]
zzak__ has joined #ruby-lang
ruby-lang367 has quit [Quit: Page closed]
EvilJStoker has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby-lang
mistym has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby-lang
jgpawletko has joined #ruby-lang
bartoindahouse has joined #ruby-lang
homeless_ has joined #ruby-lang
<homeless_> can someone explain what does .insect do
<homeless_> I mean inspect
mykoweb has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
symm- has joined #ruby-lang
<godd2> From the docs: Returns a string containing a human-readable representation of an object.
bartoindahouse has quit [Ping timeout: 245 seconds]
<godd2> a couple of differences from to_s is that inspect will by default show instance variables and their contents, and another is that to_s is called implicitly when interpolating strings like "#{some_object}"
jchao_ has joined #ruby-lang
<jchao_> Hi all, can someone explain what “<<“ does?
davispuh has quit [Read error: Connection reset by peer]
<godd2> jchao_ for an array?
<jchao_> yeah for an array
<jchao_> is it to push to the array?
<godd2> yes, it will append the specified object to the specified array
jkprg has joined #ruby-lang
<jchao_> ah ok great. Thanks godd2
<godd2> be careful, if you append an array to an array, it will insert the whole array into the other. so like [1,2] << [3] will become [1,2,[3]]
<jchao_> I see
<homeless_> <godd2> still i get same output if i used [1,2,3].to_s and [1,2,3].inspect
<homeless_> >> "[1,2,3]"
<Mon_Robot> homeless_: => "[1,2,3]" (https://eval.in:443/170769)
<godd2> homeless_ that's because those methods have been specially written for the array class
jchao_ has quit [Quit: jchao_]
<godd2> if you make a new class, my description would hold
<godd2> >> class Dog; end; Dog.new.inspect
<Mon_Robot> godd2: => "#<Dog:0x41425b58>" (https://eval.in:443/170770)
jkprg has quit [Ping timeout: 250 seconds]
<homeless_> I am still unclear about inspect
<homeless_> i got the defination
<homeless_> inspect method, which returns a string with a literal representation of the object it’s called on:
wallerdev has quit [Quit: wallerdev]
<homeless_> what is this literal representation
<zenspider> homeless_: what's up?
<homeless_> just learning rails zenspider
<homeless_> and got stuck with .inspect
<godd2> well, "#<Dog:0x41425b58>" is the literal representation of the new Dog object I made.
<homeless_> so # is the literal representation of dog class you made
<godd2> the term 'literal representation' is not a special one
<godd2> they're just trying to say that it spits out a string showing what the object is
<zenspider> I wouldn't call that a literal representation, since you can't use it to create one
<zenspider> inspect == programmer's output. to_s == regular output.
<zenspider> that's all
<homeless_> class Dog; end; Dog.new.inspect outputs "#" --> i got this one
<homeless_> but why [1,2,3].inspect output is "[1,2,3]"
<zenspider> because that's how it is implemented
<homeless_> shouldn't it something like <00##>
<godd2> the inspect method on an Array has been rewritten so it doesn't do that
<zenspider> homeless_: it could... but it isn't.
<zenspider> same reason why "woot".inspect outputs something stringy like
<zenspider> because it is more helpful to see the content, than the object_id
<zenspider> Object#inspect is generic. There are specializations under Object that are better suited
<zenspider> override inspect in class Dog to make it more useful to you
<zenspider> this isn't an inconsistency. #inspect is meant for programmer eyeballs.
<homeless_> oo finally getting sense of it
xybre has quit [Ping timeout: 260 seconds]
<homeless_> big thanks to zenspider and godd2
<zenspider> frankly, I prefer smalltalk in this regard. their custom is for their inspect to output smalltalk code this would literally eval back into the same thing.
<zenspider> we fucked up. it should have been "Dog.new(...)" or whatever to recreate that dog
<homeless_> hmm..
dknox-lunch has quit [Quit: Textual IRC Client: www.textualapp.com]
brianpWins has joined #ruby-lang
diegoviola has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
<godd2> that's what an inspect method for array might look like if it wasn't overridden
<godd2> copy it into irb to give it a whirl
Cakey has joined #ruby-lang
vintik has quit [Remote host closed the connection]
vincent has joined #ruby-lang
vincent is now known as Guest22257
vintik has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
hgl__ has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby-lang
Guest22257 has quit [Ping timeout: 245 seconds]
Technodrome has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
homeless__ has joined #ruby-lang
toastynerd has joined #ruby-lang
homeless_ has quit [Ping timeout: 246 seconds]
homeless__ has quit [Ping timeout: 246 seconds]
yfeldblu_ has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
bartoindahouse has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
bruno- has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 255 seconds]
toretore has quit [Quit: This computer has gone to sleep]
cleopatra has joined #ruby-lang
bruno- has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
Cakey has joined #ruby-lang
bartoindahouse has joined #ruby-lang
momomomomo has quit [Client Quit]
rcvalle has quit [Quit: rcvalle]
Miphix has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 256 seconds]
deg- has quit [Ping timeout: 272 seconds]
spuk has quit [Ping timeout: 240 seconds]
xcesariox has joined #ruby-lang
Cakey has quit [Remote host closed the connection]
ap4y has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
cleopatra has left #ruby-lang ["Saliendo"]
spuk has joined #ruby-lang
mykoweb has quit [Ping timeout: 245 seconds]
kalehv has joined #ruby-lang
monees has joined #ruby-lang
Cakey has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
mykoweb has joined #ruby-lang
imperator has joined #ruby-lang
yfeldblum has joined #ruby-lang
<imperator> greetings programs
tylersmith has joined #ruby-lang
brianpWins has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
jkprg has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
<zenspider> hey imperator
jkprg has quit [Ping timeout: 250 seconds]
gix has quit [Ping timeout: 265 seconds]
Technodrome has joined #ruby-lang
bartoindahouse has joined #ruby-lang
gix has joined #ruby-lang
woollyams has quit [Ping timeout: 272 seconds]
kalehv has quit [Remote host closed the connection]
kalehv has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 255 seconds]
vintik has quit [Ping timeout: 240 seconds]
kalehv has quit [Ping timeout: 245 seconds]
|jemc| has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby-lang
vincent has joined #ruby-lang
vincent is now known as Guest90680
drbrain has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby-lang
monees has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
woollyams has joined #ruby-lang
sMecKs has joined #ruby-lang
<sMecKs> Anyone here have some time to answer a simple ruby questions? thanks!
charliesome has joined #ruby-lang
<zenspider> sMecKs: just ask your question. don't ask to ask.
zenojis has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby-lang
bruno- is now known as Guest5408
Guest5408 has quit [Ping timeout: 264 seconds]
karamazov has quit [Remote host closed the connection]
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
CaptainJet has quit []
djbkd has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
<zenspider> or don't.
bartoindahouse has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
bartoindahouse has quit [Ping timeout: 272 seconds]
heftig has quit [Quit: Quitting]
spuk_ has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
conquerio has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 264 seconds]
jkprg has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
Cakey has joined #ruby-lang
havenwood has joined #ruby-lang
conquerio has quit []
Technodrome has quit [Quit: Technodrome]
jxie has joined #ruby-lang
Cakey has quit [Ping timeout: 272 seconds]
drbrain has quit [Ping timeout: 255 seconds]
drbrain has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
_ht has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
Cakey has joined #ruby-lang
cschneid has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 245 seconds]
cschneid has joined #ruby-lang
Technodrome has joined #ruby-lang
bruno-_ has joined #ruby-lang
bruno-_ has quit [Ping timeout: 256 seconds]
tectonic has joined #ruby-lang
apeiros has joined #ruby-lang
pabloh has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kyb3r_ has joined #ruby-lang
spuk has quit [Ping timeout: 256 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
dangerousdave has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
jkprg has quit [Quit: jkprg]
diegoviola has quit [Quit: WeeChat 0.4.3]
apeiros has quit [Ping timeout: 245 seconds]
bartoindahouse has joined #ruby-lang
wallerdev has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 264 seconds]
Guest90680 has quit []
jonathanmarvens has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
imperator has quit [Quit: Valete!]
vincent has joined #ruby-lang
vincent is now known as Guest10387
relix has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
charliesome has joined #ruby-lang
havenwood has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby-lang
brianpWins has joined #ruby-lang
bruno- has quit [Ping timeout: 250 seconds]
AKASkip has joined #ruby-lang
musl has quit [Read error: Connection reset by peer]
mykoweb has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
musl has joined #ruby-lang
kyb3r_ has quit [Ping timeout: 255 seconds]
kwd has joined #ruby-lang
kyb3r_ has joined #ruby-lang
mykoweb has quit [Ping timeout: 256 seconds]
AKASkip has quit [Ping timeout: 240 seconds]
tylersmith has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
tylersmith has joined #ruby-lang
dc5ala has joined #ruby-lang
kwd has quit [Quit: Leaving.]
tbuehlmann has joined #ruby-lang
tylersmith has quit [Ping timeout: 245 seconds]
bartoindahouse has joined #ruby-lang
tectonic has quit []
toastynerd has quit [Ping timeout: 255 seconds]
bartoindahouse has quit [Ping timeout: 264 seconds]
solars has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
zenojis has joined #ruby-lang
scmx has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
scmx has quit [Ping timeout: 250 seconds]
Bwild has quit [Remote host closed the connection]
scmx has joined #ruby-lang
havenwood has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
Guest10387 has quit []
AKASkip has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
pabloh has quit [Quit: Saliendo]
scmx has quit [Ping timeout: 245 seconds]
Bwild has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
joonty has quit [Ping timeout: 250 seconds]
|jemc| has quit [Ping timeout: 255 seconds]
Technodrome has quit [Quit: Technodrome]
arBmind has quit [Quit: Leaving.]
havenwood has joined #ruby-lang
tkuchiki_ has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
joonty has joined #ruby-lang
D9 has quit [Ping timeout: 255 seconds]
dalzony has joined #ruby-lang
tkuchiki has joined #ruby-lang
arBmind has joined #ruby-lang
mikecmpbll has joined #ruby-lang
bartoindahouse has joined #ruby-lang
sMecKs has quit [Read error: Connection reset by peer]
gouthamvel has joined #ruby-lang
gouthamvel has quit [Client Quit]
ironhide_604 has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 240 seconds]
elia has joined #ruby-lang
dalzony has quit [Quit: Leaving.]
bruno- has joined #ruby-lang
dalzony has joined #ruby-lang
elia has quit [Client Quit]
woollyams has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
bruno- has quit [Ping timeout: 245 seconds]
postmodern has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
<yorickpeterse> morning
alexju has joined #ruby-lang
alexju has quit [Remote host closed the connection]
dalzony has quit [Quit: Leaving.]
postmodern has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 250 seconds]
DivineEntity has quit [Ping timeout: 240 seconds]
postmodern has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
DivineEntity has joined #ruby-lang
jkprg has joined #ruby-lang
alexju has joined #ruby-lang
alexju has quit [Read error: No route to host]
alexju has joined #ruby-lang
yie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
benlovell has joined #ruby-lang
benlovell has quit [Client Quit]
benlovell has joined #ruby-lang
Missphoenix has joined #ruby-lang
Miphix has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby-lang
Xzyx987X_ has quit [Read error: Connection reset by peer]
Xzyx987X_ has joined #ruby-lang
Blaguvest has joined #ruby-lang
sol has joined #ruby-lang
Missphoenix has quit [Quit: Leaving]
sol is now known as Guest72315
toastynerd has joined #ruby-lang
Miphix has joined #ruby-lang
jacky has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 255 seconds]
dalzony has joined #ruby-lang
bartoindahouse has joined #ruby-lang
toastynerd has quit [Ping timeout: 250 seconds]
jackyalcine has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 245 seconds]
Forgetful_Lion has quit [Ping timeout: 272 seconds]
<ljarvis> morning
Forgetful_Lion has joined #ruby-lang
Cakey has quit [Ping timeout: 245 seconds]
woollyams has joined #ruby-lang
jxie has quit [Ping timeout: 240 seconds]
dalzony has quit [Quit: Leaving.]
jxie has joined #ruby-lang
jaimef has quit [Excess Flood]
kek has joined #ruby-lang
dalzony has joined #ruby-lang
dalzony has left #ruby-lang [#ruby-lang]
jaimef has joined #ruby-lang
mehlah has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
zenojis has quit [Ping timeout: 240 seconds]
alexju has quit [Ping timeout: 250 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
alexju_ has joined #ruby-lang
jxie has quit [Ping timeout: 272 seconds]
jxie_ has joined #ruby-lang
kwd has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
imperator has joined #ruby-lang
jonathanmarvens has quit []
t_ has quit [Ping timeout: 250 seconds]
t_ has joined #ruby-lang
toastynerd has joined #ruby-lang
kwd_ has joined #ruby-lang
kwd has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
kwd has joined #ruby-lang
kwd_ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby-lang
bartoindahouse has joined #ruby-lang
toastynerd has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 264 seconds]
bartoindahouse has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby-lang
Atttwww has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby-lang
wmp has joined #ruby-lang
wmp has left #ruby-lang ["Konversation terminated!"]
imperator has quit [Quit: Valete!]
bin7me has joined #ruby-lang
Fushi has joined #ruby-lang
godd2 has quit [Ping timeout: 264 seconds]
zenojis has joined #ruby-lang
Eising has joined #ruby-lang
<Eising> hey there. I have a webapp that's been running on an old debian server using unstable ruby 1.9.2 with sinatra, and apache+passenger. I upgraded it yesterday, and it broke when it went to 1.9.3, since everything is now interpreted as US-ASCII instead of utf-8. Has anyone seen this?
toastynerd has joined #ruby-lang
thrownaway has quit []
postmodern has quit [Quit: Leaving]
toastynerd has quit [Ping timeout: 256 seconds]
cornerma1 has joined #ruby-lang
<yorickpeterse> Eising: what specific errors are you getting?
<yorickpeterse> UTF8 being changed to US-ASCII makes no sense since Ruby actually switched to UTF8 as a default (since 2.0 only if I remember correctly)
tkuchiki_ has joined #ruby-lang
<Eising> yorickpeterse: I set the default encoding in the main app, and then it fixed it. But it happened whenever for example ERB would parse something that had a UTF-8 character. For example:
<Eising> Encoding::InvalidByteSequenceError - "\xC3" on US-ASCII:
<yorickpeterse> That error on its own isn't very helpful sadly
<yorickpeterse> Out of curiosity, have you tried Ruby 2.1?
<yorickpeterse> Also what is the default encoding set to?
cornerman has quit [Ping timeout: 272 seconds]
<yorickpeterse> It sounds like you're trying to parse something that contains UTF8 data but is actually encoded as ASCII (e.g. incorrect file encodings)
<Eising> I don't think that ruby1.9.3 defaults to UTF-8
<Eising> I have to go for ruby2.0 for that
<Eising> but I'd love to do that
tkuchiki has quit [Ping timeout: 240 seconds]
<yorickpeterse> String encodings are UTF8 by default on 1.9.3
tkuchiki_ has quit [Ping timeout: 240 seconds]
<Eising> yorickpeterse: can I confirm that?
<yorickpeterse> Eising: ruby -e 'p "".encoding'
<yorickpeterse> Gives back #<Encoding:UTF-8> for me on 1.9.3
<yorickpeterse> (p448)
<Eising> #<Encoding:US-ASCII>
<Eising> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<Eising> so not at that patch level
<yorickpeterse> Hm, that might've been changed on patch level but that would be odd
<dangerousdave> My code is working perfectly, could I get a final code review please? https://gist.github.com/deathwishdave/f1e4151eb1915bc641e6
benlovell has quit [Ping timeout: 260 seconds]
<yorickpeterse> dangerousdave: use lowercase file names
<yorickpeterse> dangerousdave: don't overwrite `send` as it may conflict with Object#send
<yorickpeterse> I'd go with something like #send_email instead
<apeiros> Eising: processing an ERB file sounds like Encoding.default_external being wrong
<dangerousdave> yorickpeterse, thanks!
yfeldblum has joined #ruby-lang
jkprg has quit [Quit: jkprg]
<yorickpeterse> apeiros: that was set to UTF8 for me too on 1.9.3-p448
<Eising> apeiros: it was
<yorickpeterse> but it's worth checking
<apeiros> yorickpeterse: that's not a ruby default setting
<Eising> but the strange thing was that it worked before...
<apeiros> yorickpeterse: it depends on env/system/whatever
<Eising> so something changed the encoding during system upgrade
<apeiros> (might have changed to be a language default with 2.0, not sure)
kyb3r_ has quit [Read error: Connection reset by peer]
<apeiros> on osx, I always have all defaulting to utf-8 without me doing anything, but on our *nix boxen, I had to set it
<Eising> there was other weird breakage in my code
<Eising> for example I could not do a require 'lib/file.rb'
<Eising> I had to do require './lib/file.rb'
<apeiros> are you sure you were on 1.9.2 before and not 1.8.x?
<apeiros> "." was removed from the $LOAD_PATH, as it's bad to require relative to your *working* directory
<Eising> pretty certain
<apeiros> but iirc that happened from 1.8 to 1.9, not from 1.9.2 to 1.9.3. I might be wrong on that, though.
<Eising> but not 100%. I have at least convinced myself I was on 1.9.2
ldnunes has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
<apeiros> anyway, you should definitively fix your code. require './…' is bad.
<Eising> but the code was made two years ago, and I've only done small improvements since then.
<Eising> but the absolute paths makes it hard to move the code around
<apeiros> I didn't say you should use absolute paths
<apeiros> not sure which would be worse :)
<Eising> so what do you recommendthen?
<apeiros> proper requires use $LOAD_PATH
<dangerousdave> apeiros, "anyway, you should definitively fix your code. require './…' is bad." was that for me?
<yorickpeterse> apeiros: hmm
<apeiros> dangerousdave: that was @ Eising
mehlah has quit [Quit: Leaving...]
<dangerousdave> ok
<apeiros> dangerousdave: but if you use such requires, you should feel addressed too :-p
<dangerousdave> apeiros, what do i do instead?
<apeiros> you put your stuff into a dir called 'lib'. if your code is a gem, the rest is handled by rubygems. if not, it depends on where you use it.
<apeiros> if it's a rails-app, rails adds lib to $LOAD_PATH too. sinatra probably also.
<apeiros> if it's something custom made, have your executable add the lib dir to $LOAD_PATH. preferably expanding the path before adding it.
<dangerousdave> apeiros, its a sinatra class, thanks
mehlah has joined #ruby-lang
benlovell has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
banister has joined #ruby-lang
tkuchiki has joined #ruby-lang
alexju_ has quit [Read error: Connection reset by peer]
alexju has joined #ruby-lang
bruno- has quit [Ping timeout: 240 seconds]
spuk has joined #ruby-lang
bruno- has joined #ruby-lang
Sgeo has quit [Read error: Connection reset by peer]
spuk has quit [Ping timeout: 240 seconds]
spastorino has joined #ruby-lang
toastynerd has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
bartoindahouse has joined #ruby-lang
toastynerd has quit [Ping timeout: 250 seconds]
bin7me has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
bartoindahouse has quit [Ping timeout: 240 seconds]
karamazov has joined #ruby-lang
<matti> Lookin'
deg- has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
yfeldblum has joined #ruby-lang
skade has joined #ruby-lang
<yorickpeterse> matti: Daishi Dance in general has good stuff
<yorickpeterse> matti: it's just a shame the Youtube comments are generally really annoying
nathanstitt has quit [Read error: Connection reset by peer]
<yorickpeterse> damn hippies be watching these videos
<matti> I never read YT comments ;]
<yorickpeterse> There once was this one comment something like "This music just makes me want to go outside and exercise but my muscles have to regenerate from last week's workout" or something like that
<yorickpeterse> I basically flipped all tables in the office after reading that
yfeldblum has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
banister has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has joined #ruby-lang
nathanstitt has quit [Client Quit]
nathanstitt has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
<matti> LOL
alexju has quit [Remote host closed the connection]
malconis has joined #ruby-lang
Blaguvest has quit [Remote host closed the connection]
xcesariox has joined #ruby-lang
weems|mac has joined #ruby-lang
jgpawletko has joined #ruby-lang
<yorickpeterse> hnnnnggg rm'd some stuff that I actually needed
<yorickpeterse> and it's not yet tracked by Git
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
weems|mac has quit [Client Quit]
jkprg has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
DEac-_ has joined #ruby-lang
toastynerd has joined #ruby-lang
bartoindahouse has joined #ruby-lang
toastynerd has quit [Ping timeout: 255 seconds]
bartoind_ has joined #ruby-lang
bartoindahouse has quit [Read error: Connection reset by peer]
toretore has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 250 seconds]
sarkyniin has joined #ruby-lang
centrx has joined #ruby-lang
davispuh has joined #ruby-lang
yfeldblum has joined #ruby-lang
bruno- has joined #ruby-lang
jxie_ has quit [Ping timeout: 240 seconds]
jxie has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
shinnya has joined #ruby-lang
JohnFord has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
karamazov has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
chouhoulis has joined #ruby-lang
bruno- has quit [Quit: Lost terminal]
escues has joined #ruby-lang
nathanstitt has quit [Quit: Laters]
Technodrome has joined #ruby-lang
jgpawletko has quit [Ping timeout: 260 seconds]
aub has joined #ruby-lang
ledestin_ has joined #ruby-lang
Sirupsen has joined #ruby-lang
tylersmith has joined #ruby-lang
ledestin has quit [Ping timeout: 250 seconds]
ledestin_ is now known as ledestin
loincloth has joined #ruby-lang
davidae_ has quit [Remote host closed the connection]
badeball has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
masscrx has left #ruby-lang [#ruby-lang]
toastynerd has quit [Ping timeout: 250 seconds]
badeball has joined #ruby-lang
cmhobbs has joined #ruby-lang
bffff_ has joined #ruby-lang
dwknoxy has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> wot m8
Sirupsen has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
x0f has quit [Ping timeout: 250 seconds]
x0f has joined #ruby-lang
marr has quit [Read error: Connection reset by peer]
kwd has quit [Quit: Leaving.]
Guest72315 has quit [Ping timeout: 256 seconds]
jlovick has joined #ruby-lang
bronky has joined #ruby-lang
jgpawletko has joined #ruby-lang
AKASkip has quit [Ping timeout: 240 seconds]
badeball has quit [Remote host closed the connection]
Tn6o has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgpawletko has quit [Ping timeout: 240 seconds]
jgpawletko has joined #ruby-lang
toastynerd has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has quit [Ping timeout: 250 seconds]
bronky has left #ruby-lang [#ruby-lang]
bronky has joined #ruby-lang
amigo99 has joined #ruby-lang
jgpawletko_ has joined #ruby-lang
Miphix has quit [Quit: Leaving]
jgpawletko has quit [Ping timeout: 264 seconds]
jgpawletko_ is now known as jgpawletko
sharpmachine has joined #ruby-lang
bantic has joined #ruby-lang
Tn6o has quit []
tylersmith has quit [Remote host closed the connection]
<darix> rdoc getting stuck when generating docs for a gem is no fun
tylersmith has joined #ruby-lang
tylersmith has quit [Ping timeout: 240 seconds]
bartoind_ has quit []
<yorickpeterse> darix: gem install --no-ri --no-rdoc all the things
mykoweb has joined #ruby-lang
shinnya has quit [Ping timeout: 255 seconds]
drbrain has quit [Ping timeout: 255 seconds]
rippa has joined #ruby-lang
drbrain has joined #ruby-lang
<darix> yorickpeterse: yes
havenwood has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
ayonkhan has joined #ruby-lang
|jemc| has joined #ruby-lang
scmx has joined #ruby-lang
sarkyniin has quit [Ping timeout: 250 seconds]
aub has quit [Quit: aub]
toastynerd has joined #ruby-lang
nottheoilrig has quit [Remote host closed the connection]
nottheoilrig has joined #ruby-lang
ayonkhan has quit [Quit: Lingo - http://www.lingoirc.com]
loinclot_ has joined #ruby-lang
isale-eko has joined #ruby-lang
ayonkhan has joined #ruby-lang
loincloth has quit [Ping timeout: 272 seconds]
ayonkhan has quit [Client Quit]
scmx has quit [Ping timeout: 245 seconds]
kek has quit [Remote host closed the connection]
ayonkhan has joined #ruby-lang
kek has joined #ruby-lang
scmx has joined #ruby-lang
yfeldblum has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
ayonkhan has quit [Client Quit]
ayonkhan has joined #ruby-lang
aub has joined #ruby-lang
kek has quit [Ping timeout: 255 seconds]
ayonkhan has quit [Client Quit]
ssam2 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
katlogic has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
karamazov has joined #ruby-lang
nofxx has joined #ruby-lang
wallerdev has joined #ruby-lang
cornerma1 has quit [Ping timeout: 260 seconds]
jxie has quit [Ping timeout: 260 seconds]
katlogic has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
jxie has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
fullybak_ has joined #ruby-lang
fullybak_ is now known as fullybaked
apeiros has quit [Remote host closed the connection]
ledestin_ has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 245 seconds]
mistym has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
ledestin has quit [Ping timeout: 272 seconds]
ledestin_ is now known as ledestin
scmx has quit [Ping timeout: 260 seconds]
javilm has quit [Ping timeout: 255 seconds]
scmx has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
jxie has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
danijoo has joined #ruby-lang
charliesome has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
ayonkhan has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.3]
havenwood has joined #ruby-lang
mikecmpbll has joined #ruby-lang
ayonkhan has quit [Client Quit]
fullybaked has quit [Ping timeout: 250 seconds]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mello has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
gpg_ has joined #ruby-lang
<mello> hi, quick question iv seen this alot, @something ||= [] what does that mean? why use the ||=
fullybaked has joined #ruby-lang
fullybaked has quit [Client Quit]
fullybaked has joined #ruby-lang
<eam> mello: it's shorthand for: if @something.nil? @something = []
<eam> it won't set it to [] if @something is already defined/true
<mello> eam: I see, thank you
ayonkhan has joined #ruby-lang
tylersmith has joined #ruby-lang
ayonkhan has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkyniin has joined #ruby-lang
arooni-mobile has joined #ruby-lang
mello_ has joined #ruby-lang
mello has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby-lang
mello_ is now known as mello
wallerdev has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 260 seconds]
fullybaked has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecnalyr has quit [Ping timeout: 264 seconds]
<nottheoilrig> i want all of the items in an array except if an item matches and expression i want to skip the next two items
<nottheoilrig> how would you do this in ruby?
<centrx> nottheoilrig, There is of course the basic way of a little counter in some kind of loop
karamazov has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
charliesome has joined #ruby-lang
saarinen has joined #ruby-lang
mello has quit [Quit: Lost terminal]
JohnFord has joined #ruby-lang
ssam2 has quit [Remote host closed the connection]
<nottheoilrig> centrx: hmm
<nottheoilrig> so actually i have an array of strings and i want a single string
<nottheoilrig> items in the array are 1 of 4 types
<nottheoilrig> i have an expression for whether an item is type 2 or type 4
<nottheoilrig> if an item is type 2 the next two items are type 3
<nottheoilrig> i want to drop all type 3 items
aub has quit [Quit: aub]
<nottheoilrig> if an item is type 1 then the next item is type 2 or type 4
<centrx> Why is there no other way to identify type 3 items?
<nottheoilrig> the only difference between type 3 and type 1 is context
<nottheoilrig> i cant tell from an item alone if its type 3 or type 1
vitkovsky has joined #ruby-lang
<nottheoilrig> i also want to do a different String.replace on type 1, 2, and 4 items
<nottheoilrig> and i know if its type 4 then the next item is type 1
Sirupsen has joined #ruby-lang
Sirupsen has quit [Client Quit]
<nottheoilrig> oops
<nottheoilrig> on second thought i need to check if thats true...
<nottheoilrig> hmm
Sirupsen has joined #ruby-lang
digs has joined #ruby-lang
jsullivandigs has quit [Read error: Connection reset by peer]
digs is now known as Guest88437
<nottheoilrig> okay its true
<centrx> nottheoilrig, How about something like:
<centrx> array.slice_before { |e| e.is_a?(TypeTwo) }.map { |chunk| chunk.first(3).last(2) }
<centrx> or actually chunk[1,2]
<nottheoilrig> ill try that
<nottheoilrig> an example is
<nottheoilrig> in [1, 2, 3, 3, 1]
<nottheoilrig> out "1'2'1'"
<nottheoilrig> as in "one prime two prime one prime"
<centrx> Okay, the code above will find the 3's, which you can then subtract from the array
<centrx> So more directly you could do
<nottheoilrig> yeah i see i want .map { |chunk| chunk[0] }
<nottheoilrig> i think
<centrx> that would only get you the twos
loinclot_ has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
<nottheoilrig> hmm right
dc5ala has quit [Quit: Ex-Chat]
isale-eko has quit [Ping timeout: 240 seconds]
<centrx> but really design your data structure better
gpg_ has quit [Quit: Page closed]
skade has joined #ruby-lang
<nottheoilrig> im working with the String.split output
<nottheoilrig> type 2, 3, and 4 are capturing groups in the pattern
<nottheoilrig> type 1 is everything in between
<centrx> nottheoilrig, Can you use named groups?
cantonic has joined #ruby-lang
<nottheoilrig> id be happy to but i think i tried and couldnt get at them from the String.split output?
cantonic has quit [Client Quit]
<nottheoilrig> let me try again
zoo-zed has joined #ruby-lang
<nottheoilrig> hmm why am i getting a compile error
<nottheoilrig> pattern = /(?<foo>a|b)/
wallerdev has quit [Ping timeout: 250 seconds]
<nottheoilrig> undefined (?...) sequence: /(?<foo>a|b)/
<nottheoilrig> maybe my ruby version?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> it's (?: )
<centrx> with the colon
<centrx> or that's uncaptured groups rather
Squarepy has joined #ruby-lang
charliesome has joined #ruby-lang
<nottheoilrig> right im trying a named group as you suggested
charliesome has quit [Client Quit]
vitkovsky has quit [Remote host closed the connection]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
isale-eko has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang65 has joined #ruby-lang
isale-eko has quit [Client Quit]
<nottheoilrig> okay working now
<nottheoilrig> 'ab'.split­ /(?<foo>a|b)/
loinclot_ has joined #ruby-lang
<nottheoilrig> ["", "a", "", "b"]
<nottheoilrig> unless im missing something the group name foo disappears
wallerdev has joined #ruby-lang
sweo has joined #ruby-lang
JEG2 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
zoo-zed has quit [Quit: Leaving.]
<centrx> why not just split on type two
mykoweb has quit [Ping timeout: 240 seconds]
loincloth has quit [Ping timeout: 250 seconds]
zoo-zed has joined #ruby-lang
<nottheoilrig> hmm the output would then be more predictable
<centrx> Or use a character-by-character state machine that does exactly what you want
<nottheoilrig> but then id need to split the parts in between by the type 4 pattern in a second step
<nottheoilrig> what would that look like?
<nottheoilrig> (the state machine solution)
<centrx> basic idea is use string.each_char
<centrx> if you see a type two, you enter a state for capturing type 3's
<centrx> once you capture two type 3's after a type 2, exit the type-3-capture-state
<centrx> You can represent the state with a simple variable, or use a counter/index since you need to count anyway
<centrx> You can do the same thing with the array two
<centrx> *too
karamazov has joined #ruby-lang
<nottheoilrig> yeah this sounds like it might work
<nottheoilrig> so the state variable is outside the block you pass to each_char or whatever
charliesome has joined #ruby-lang
tlewin has joined #ruby-lang
<nottheoilrig> but you update it from inside the block?
<centrx> nottheoilrig, Yes, it has to be set before the block as false or nil or something
<nottheoilrig> gotcha
<centrx> Then it will persist across iterations
<centrx> and it may need the reasonable initialized value anyway
<nottheoilrig> i like the slice_before solution
<centrx> Yes, that will work too
<nottheoilrig> if i had an array of each chunk that started with type 2 that would work
<centrx> Do you plan on making these strings/processing of them more complex in the future?
<nottheoilrig> the problem is that the type 2 pattern could also match a type 1 or type 3
ecnalyr has joined #ruby-lang
<nottheoilrig> nope no more complex in future
<centrx> ok yeah slice_before is good
<centrx> nottheoilrig> the problem is that the type 2 pattern could also match a type 1 or type 3
zoo-zed has quit [Quit: Leaving.]
<centrx> That sounds like a problem with the specification
<nottheoilrig> i need to say if it matches type 2 ignore the next 3 items
<nottheoilrig> dont test them for the beginning of the next chunk
x0f has quit [Ping timeout: 260 seconds]
<centrx> I see
<centrx> Yes, then you would need the counter anyway
<nottheoilrig> hmm
adphillips has joined #ruby-lang
adphillips has quit [Client Quit]
tlewin has quit [Quit: Changing server]
<centrx> It's the way it is, that's how you process unstructured streams of data
<centrx> It should be a quick implementation, just not a one-line Ruby nicety
<nottheoilrig> heres some more context about what im trying to do
x0f has joined #ruby-lang
<centrx> nottheoilrig, Regular expressions seem like the way to do it since it's a string
<centrx> nottheoilrig, Regular expressions comes with the state machine built-in
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #ruby-lang
elia has quit [Client Quit]
<nottheoilrig> yeah i hacked it up pretty quick with pythons regexobject.split
<nottheoilrig> but unfortunately i have a lot less experience with ruby
yfeldblum has joined #ruby-lang
badeball has joined #ruby-lang
<seanhagen> is it possible to tell rbenv to execute a gem-installed executable without trying to reference or pull in a projects bundled gems?
ecnalyr has quit [Remote host closed the connection]
<seanhagen> i think it's causing some issues when trying to run librarian-puppet inside of a Rails 4 project
havenwood has joined #ruby-lang
loinclot_ has quit [Remote host closed the connection]
pixelhandler has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
faces has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
face has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Remote host closed the connection]
mehlah has quit [Quit: Leaving...]
postmodern has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
stef1a has joined #ruby-lang
<stef1a> i'm having trouble finding a way to DRY up this code. it has the same block passed into four different statements: https://gist.github.com/smlance/e4d24b817ee6977ceed7 .
apeiros has joined #ruby-lang
jgpawletko_ has joined #ruby-lang
jgpawletko has quit [Ping timeout: 255 seconds]
jgpawletko_ is now known as jgpawletko
banister has joined #ruby-lang
apeiros has quit [Ping timeout: 255 seconds]
toretore has quit [Ping timeout: 245 seconds]
__butch__ has joined #ruby-lang
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
<centrx> stef1a, You may be able to pass the block as a Proc
yfeldblum has joined #ruby-lang
mykoweb has quit [Ping timeout: 240 seconds]
toretore has joined #ruby-lang
vintik has joined #ruby-lang
<yorickpeterse> argh, getting Racc test suite going is a royal pita
<yorickpeterse> none of the bloody hoe/rake tasks work either
<havenwood> stef1a: commented on your gist
<stef1a> havenwood: thanks so much!
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby-lang
sweo has quit [Remote host closed the connection]
sweo has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arooni-mobile has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
dangerousdave has quit [Ping timeout: 250 seconds]
jaimef has quit [Excess Flood]
loincloth has joined #ruby-lang
havenwood has joined #ruby-lang
benlovell has joined #ruby-lang
dangerousdave has joined #ruby-lang
jaimef has joined #ruby-lang
fullybaked has joined #ruby-lang
touzin has joined #ruby-lang
dangerousdave has quit [Ping timeout: 255 seconds]
wallerdev has quit [Quit: wallerdev]
brianpWins has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
hahuang65 has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
hahuang65 has joined #ruby-lang
Fushi has quit [Quit: Connection closed for inactivity]
karamazov has joined #ruby-lang
AKASkip has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jam__ has joined #ruby-lang
djbkd has joined #ruby-lang
Jam___ has joined #ruby-lang
scmx has quit [Ping timeout: 264 seconds]
JohnFord has joined #ruby-lang
jkprg has quit [Quit: jkprg]
relix has joined #ruby-lang
vintik has quit [Remote host closed the connection]
<nottheoilrig> how would you loop over all integers less than an expression whos value might change between iterations?
godd2 has joined #ruby-lang
<centrx> nottheoilrig, You can do that with a regular while loop
tbuehlmann has quit [Remote host closed the connection]
lele has quit [Ping timeout: 256 seconds]
vintik has joined #ruby-lang
jlovick has quit [Ping timeout: 240 seconds]
jlovick has joined #ruby-lang
amystephen has joined #ruby-lang
beawesomeinstead has quit [Quit: Connection closed for inactivity]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Remote host closed the connection]
touzin has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
yfeldblum has joined #ruby-lang
sepp2k has joined #ruby-lang
<nottheoilrig> how do you remove items from an array by index?
rcvalle has joined #ruby-lang
<godd2> arr.delete_at(index)
Johz has joined #ruby-lang
lele has joined #ruby-lang
<nottheoilrig> thanks
<nottheoilrig> what about removing elements in a range?
<nottheoilrig> ill try delete_at 4..5
<Mon_Ouie> You can use arr[range] = []
<nottheoilrig> nope
<nottheoilrig> okay thanks Mon_Ouie
<nottheoilrig> what is the preferred way to get the length of the array?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<nottheoilrig> .lenth i assume?
benlovell has quit [Ping timeout: 256 seconds]
<Mon_Ouie> Probably .size considering everyone mistypes length
<nottheoilrig> heh
brianpWins has quit [Quit: brianpWins]
wallerdev has joined #ruby-lang
mehlah has joined #ruby-lang
mehlah has quit [Client Quit]
Sirupsen has joined #ruby-lang
sweo has quit []
stef1a has left #ruby-lang [#ruby-lang]
marr has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
danijoo_ has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
fullybaked has quit []
havenwood has joined #ruby-lang
shinnya has joined #ruby-lang
arBmind1 has joined #ruby-lang
mehlah has joined #ruby-lang
mistym has joined #ruby-lang
|jemc| has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sirupsen has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
MartynKeigher has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
<MartynKeigher> hey all... im working on some code and I know im so close... but its just not working! Here is the code: http://pastebin.com/JF8n1rE1 can someone tell me what bit is wrong, and point me in the right direction!?? Thanks.
<MartynKeigher> you should be able to see what im doing here, but im passing a variable INTO a sql query, - and fyi, if i do this the 'non variable way' it works fine. im just trying to save my self from making lots of ruby files, for all my queries.
Atttwww has joined #ruby-lang
mehlah_ has joined #ruby-lang
mehlah has quit [Read error: Connection reset by peer]
<centrx> MartynKeigher, What doesn't work?
jgpawletko has quit [Quit: jgpawletko]
<apeiros> MartynKeigher: do NOT. EVER. user string interpolation to add variables to queries.
<apeiros> that's one of the main reason for security leaks.
<MartynKeigher> im trying to get the values of the query to show on my dashboard
<apeiros> every sane SQL database provides bind variables for that. that is, placeholders in your query + an array with the values.
<MartynKeigher> thats what im trying to apeiros .... i think im close. but not quite got it to show the values
<MartynKeigher> first time at using variables
havenn has joined #ruby-lang
<MartynKeigher> do u have any recommendations for me?
<godd2> SELECT computerid FROM Computers ? shouldn't you be asking for fields on a table?
brianpWins has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
mistym has quit [Remote host closed the connection]
_ht has quit [Remote host closed the connection]
Technodrome has quit [Quit: Technodrome]
yfeldblum has joined #ruby-lang
<MartynKeigher> ya.. computerid is the column. computers is the table
<MartynKeigher> lower in the my ruby job.. its counts the rows of the result.
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
<MartynKeigher> i know i can do object.each but for what ever reason... its not playing nicely, so im letting ruby count, and not sql
cklee has joined #ruby-lang
kyb3r_ has joined #ruby-lang
djbkd has joined #ruby-lang
cleopatra has joined #ruby-lang
sirene has joined #ruby-lang
pixelhandler has quit [Quit: pixelhandler]
karamazov has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pixelhandler has joined #ruby-lang
mistym has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby-lang
pixelhandler has quit [Client Quit]
yfeldblum has joined #ruby-lang
amigo99 has left #ruby-lang ["Leaving"]
djbkd has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
djbkd has joined #ruby-lang
ironhide_604 has joined #ruby-lang
centrx has quit [Quit: Mead error: Connection reset by beer]
Johz has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
MartynKeigher has quit [Remote host closed the connection]
Technodrome has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
Olipro has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
karamazov has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
Sgeo has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Olipro has joined #ruby-lang
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
xybre has joined #ruby-lang
D9 has joined #ruby-lang
cmhobbs has quit [Remote host closed the connection]
Xney has quit []
elia has joined #ruby-lang
djbkd has joined #ruby-lang
escues has quit [Quit: escues]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
Xney has joined #ruby-lang
pixelhandler has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
jlovick has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
nofxx_ has joined #ruby-lang
nofxx_ has joined #ruby-lang
tylersmith has quit [Ping timeout: 245 seconds]
nofxx has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby-lang
spuk has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spuk has quit [Client Quit]
kyb3r_ has joined #ruby-lang
_djbkd has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 255 seconds]
devgiant has joined #ruby-lang
bantic has quit [Quit: bantic]
banister has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.3]
kyb3r_ has quit [Read error: Connection reset by peer]
karamazov has quit [Remote host closed the connection]
karamazov has joined #ruby-lang
devgiant has quit [Quit: Leaving]
kyb3r_ has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
spuk_ has quit [Ping timeout: 272 seconds]
dangerousdave has quit [Ping timeout: 255 seconds]
AKASkip has quit [Ping timeout: 264 seconds]
elia has joined #ruby-lang
elia has quit [Client Quit]
elia has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
JEG2 has quit [Quit: Connection closed for inactivity]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mon_Ouie has quit [Ping timeout: 264 seconds]
hackeron has quit [Ping timeout: 245 seconds]
dik_dak has joined #ruby-lang
mehlah_ is now known as mehlah
yfeldblum has joined #ruby-lang
lsegal has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
hackeron has joined #ruby-lang
|jemc| has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
diegoviola has joined #ruby-lang
dik_dak has quit [Ping timeout: 255 seconds]
karamazov has quit []
ecnalyr has joined #ruby-lang
ecnalyr has quit [Ping timeout: 264 seconds]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
weems|mac has joined #ruby-lang
dik_dak has joined #ruby-lang
dik_dak has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang