<nat2610>
Spooner: >> { "a" => "b"}.to_json => "{\"a\":\"b\"}"
<nat2610>
how can I avoid the \ ?
<Spooner>
Yes.
<Spooner>
Those aren't "\" charactes.
reuf has quit [Quit: Leaving]
<nat2610>
they are when I print my data
<Spooner>
Those are \" characters (that is an actual " put inside a string delimited by ")
<scx>
Spooner: others methods will work as in old class?
<Spooner>
puts "\"hello\"" # prints => "hello"
<Spooner>
puts "hello" # prints => hello
<Spooner>
scx Yeah, you are just "monkey-patching" the class, not recreating it.
swarley_ has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
swarley has quit [Ping timeout: 244 seconds]
<scx>
Spooner: ok, thanks
<Spooner>
nat2610 : Getting what I'm talking about? Just the same as a string that is "frog\n" doesn't have an actual slash in it?
lggr has quit [Ping timeout: 244 seconds]
carlyle has joined #ruby
mrsolo has quit [Quit: Leaving]
<swarley_>
wat
lggr has joined #ruby
<Spooner>
Yes wat.
elico has joined #ruby
nat2610 has quit [Quit: Leaving.]
rabidpraxis has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
goyox86 has joined #ruby
phar0e has joined #ruby
<phar0e>
Hello Ms. Ruby ^_^
ledao has joined #ruby
mikepack has quit [Remote host closed the connection]
ledao has quit [Client Quit]
lggr has quit [Ping timeout: 240 seconds]
cbuxton has quit [Quit: Leaving.]
lggr has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chrishunt has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
<bassclef>
can anyone tak e alook at this and see what i'm doing wrong? https://gist.github.com/3824375 undefined method 'bytesize' for #hash i can't see it!
<bassclef>
that's what my json is based on the top example
slicslak has quit [Ping timeout: 260 seconds]
<Spooner>
bassclef : But where is the error line? Probably somewhere deep in someone else's code.
<Spooner>
Oops, I saw the error at the bottom. Sorry!
<bassclef>
np
alvaro_o has quit [Quit: Ex-Chat]
lggr has quit [Ping timeout: 246 seconds]
<Spooner>
Incidentally, you probably shouldnt' use @ivars rather than CONSTANTS, if you want values visible inside your methods.
<Spooner>
Or pass parameters.
<Spooner>
But sadly I haven't a clue about your actual problem :$
<bassclef>
hehe
<bassclef>
so @auth_token
<bassclef>
should just be auth_token you're saying?
<Spooner>
No, AUTH_TOKEN
<Spooner>
Or just use parameters. Using @ivars in the outer scope is a bit ack.
iamjarvo has joined #ruby
lggr has joined #ruby
jeff_sebring has quit [Quit: Leaving]
baroquebobcat has joined #ruby
<bassclef>
word thanks
<Spooner>
Anyway, realised that bytesize is a method on String, not Hash. You are passing aHhash when it wants a String (forgot to use #to_json ?).
<bassclef>
ahhh yes!
<bassclef>
thanks
<bassclef>
i did
<Spooner>
auth_token would be a local variable, so would not be visible inside the method.
<bassclef>
yep i figured that part out
<bassclef>
WOOT!
<bassclef>
thanks spooner that was it
<bassclef>
it worked
<bassclef>
:D
<Spooner>
@user and @pass could be constants or locals, of course.
sushigeek has joined #ruby
fuleo has joined #ruby
Targen has joined #ruby
jenrzzz has joined #ruby
<Spooner>
I would organise a bit to have your constants at the top, then methods, then actual code (that calls your methods). Bit messed up there.
<Spooner>
Also, if you put the server/user/password in a YAML file, you can happily paste the code without worrying about giving away trade secrets.
daniel_hinojosa has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 256 seconds]
<Spooner>
I should collect all the secret passwords and access keys that have been pasted in this channel by mistake ;)
<Spooner>
I could rule the world! The whole, wide world!
lggr has joined #ruby
<scx>
how to include ruby source file (load without executing)?
<scx>
is it possible?
<Spooner>
Loading code without executing it isn't possible (and is indistinguishable from not loading it at all ;D).
swarley_ is now known as swarles
jonathanwallace has joined #ruby
<Spooner>
Or you mean loading some definitions (e.g. classes and methods) in a file without running the direct code in the file? Not sure what you mean (or rather, what you "want to achieve").
<scx>
Spooner: i have "bloat-file.rb", there are a few classes and one command which create istance of one of these classes
<Spooner>
scx In that instance, you should have the command inside a "if $0 == __FILE__" condition in that file. Then if you run the file directly, the code will run, but not if you require the file in another file.
<scx>
Spooner: it isn't my file and i cant change it
<Spooner>
Well then, the file was written by a muppet ;)
BombStrike has joined #ruby
<Spooner>
And no, you can't work around that in any way I know. If the file wants to run code then it will run code.
asteve has joined #ruby
daniel_hinojosa has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
asteve has left #ruby [#ruby]
<Spooner>
A class definition is "just code" and isn't fundamentally different than direct code like: Frog.new.jump
lggr has quit [Ping timeout: 248 seconds]
hadees has quit [Quit: hadees]
baroquebobcat has quit [Quit: baroquebobcat]
LouisGB has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
brianpWins has quit [Ping timeout: 246 seconds]
nari_ has joined #ruby
<Spooner>
scx Actually, no, there are ways to work around it, but they are DREADFUL and should never be used by sane people (and are worse than just copying the file and deleting the stuff you don't want).
sent-hil has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
heftig has quit [Quit: leaving]
JonnieCache|work has quit [Ping timeout: 260 seconds]
davidcelis has joined #ruby
lazyPower has joined #ruby
<lazyPower>
Is there a preferred method to recreate the timestamp in rails when using X.minutes.from_now?
lggr has quit [Ping timeout: 246 seconds]
<lazyPower>
Specifically, i'm using delayed job, and its failing to run correctly on the stored config values i put in my yaml - its running immediately since its returning a string :|
_Mon_Ouie_ has joined #ruby
<Spooner>
lazyPower : #rails or #rubyonrails might be more likely to know that.
cakehero has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Ping timeout: 248 seconds]
cakehero has joined #ruby
duracrisis_ has quit [Read error: Connection reset by peer]
sent-hil has quit [Remote host closed the connection]
duracrisis_ has joined #ruby
nari_ has joined #ruby
dakine has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
tmttt has joined #ruby
<scx>
Spooner: what methods? i tried to create new ruby file using grep and sed :p
sent-hil has joined #ruby
<Spooner>
scx You could do it inside Ruby. eval File.read("frog.rb").gsub(/meh/,'')
<Spooner>
But as I said, it is terrible, terrible stuff.
lggr has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<Spooner>
Or #readlines and delete the last few lines.
ryanf has quit [Ping timeout: 260 seconds]
luckyruby has quit [Remote host closed the connection]
jgrevich_ has joined #ruby
<Spooner>
If the file is going to change, then your code might stop working because of formatting changes. If the file isn't going to change, just copy it and manually delete the "bad" lines.
<scx>
Spooner: second method will not work: there are methods before that horrible line
ttt has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
<Spooner>
scx #sub or #gsub are your friends then.
<scx>
thanks once again
apok_ has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
nari_ has quit [Ping timeout: 245 seconds]
luckyruby has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<scx>
Spooner: gsub work on lines, like sed or whole text?
apok has quit [Ping timeout: 245 seconds]
apok_ is now known as apok
piotr_ has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
<Spooner>
It works on the whole text in this case. You can use ^$ to link to beginning and end of lines.
<scx>
should i use /^foo bar .*/ or /^foo bar[^\n]*\n/ ?
<Spooner>
Don't worry about removing spaces and newlines. Ruby just ignores them anyway.
jrist-bbl is now known as jrist
skaczor has quit [Remote host closed the connection]
<Spooner>
.* will be to end of string (that is, file in our case).
<Spooner>
I don't know what exactly you are trying to match, so I can't tell you how to match it ;)
Trioke_ has quit [Read error: Connection reset by peer]
Trioke has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 240 seconds]
JonnieCache has quit [Ping timeout: 260 seconds]
colinbm has joined #ruby
<Spooner>
".* will be to end of string" - actually untrue, since you need //m for . to match newline. Always forget that.
ckrailo has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
geekmii has joined #ruby
nari_ has joined #ruby
savage- has quit [Remote host closed the connection]
lggr has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
sent-hil has quit [Ping timeout: 240 seconds]
rafacv has quit [Ping timeout: 256 seconds]
radic_ is now known as radic
colinbm has quit [Quit: colinbm]
Rad- has joined #ruby
joeycarmello has quit [Remote host closed the connection]
keyvan has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
bttf has quit [Quit: Lost terminal]
manizzle has quit [Ping timeout: 246 seconds]
lazyPower has quit [Quit: Peace, i'm out]
gmci has quit [Quit: Computer has gone to sleep.]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
lggr has joined #ruby
Spooner has quit []
gmci has joined #ruby
<thaostra>
I seem to have found a bug in Net::HTTP where there is ~25% CPU usage while downloading files, possibly due to it not waiting for the buffer to fill. CPU usage goes down to ~6% when I add sleep() in the innermost block. Does anyone know of a way around this? Snippet found here: https://gist.github.com/4e01da8091ab2525a446
Nisstyre-laptop has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
daniel_hinojosa has quit [Ping timeout: 260 seconds]
macmartine has joined #ruby
keyvan has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 245 seconds]
xyzodiac has joined #ruby
josh^ has joined #ruby
lggr has joined #ruby
Synthead has quit [Remote host closed the connection]
beneggett has joined #ruby
Synthead has joined #ruby
nat2610 has joined #ruby
shair has joined #ruby
geekmii has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
kenneth has quit [Quit: kswizz.com]
justinmcp has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
voodoofish430 has quit [Quit: Leaving.]
shair has quit []
dmiller has joined #ruby
noyb has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
iamjarvo has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
scx has quit [Ping timeout: 246 seconds]
cakehero has joined #ruby
[Neurotic] has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
scx has joined #ruby
xuser has joined #ruby
eddiezane has joined #ruby
verto is now known as verto|off
joofsh has quit [Remote host closed the connection]
joeycarmello has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
goyox86 has quit [Remote host closed the connection]
beneggett has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
P1RATEZ has joined #ruby
reset_ has joined #ruby
joeycarmello has quit [Ping timeout: 256 seconds]
xyzodiac has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
icole has joined #ruby
reset has quit [Ping timeout: 260 seconds]
_Mon_Ouie_ has quit [Ping timeout: 246 seconds]
reset_ has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
lggr has joined #ruby
_Mon_Ouie_ has joined #ruby
xyzodiac has quit [Client Quit]
ryanf has joined #ruby
jgrevich_ has joined #ruby
falieson has quit [Quit: falieson]
jgrevich has quit [Ping timeout: 248 seconds]
jgrevich_ is now known as jgrevich
ryanf has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 260 seconds]
bradleyprice has joined #ruby
Rad- has quit [Ping timeout: 256 seconds]
Rad- has joined #ruby
swarles has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
bradleyprice has quit [Remote host closed the connection]
aces23up has joined #ruby
justinmcp has joined #ruby
aces1up has quit [Ping timeout: 260 seconds]
Rad- has quit [Client Quit]
kroniksenvy has quit [Ping timeout: 240 seconds]
sailias has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
nignaztic has joined #ruby
n_blownapart has joined #ruby
RISCi_ATOM has joined #ruby
rippa has joined #ruby
ircbot1454003504 has joined #ruby
lggr has joined #ruby
ircbot1454003504 has quit [Remote host closed the connection]
nignaztic is now known as nemonic
nemonic is now known as nignaztic
<n_blownapart>
re = Regexp.escape("^abcdef") #=> "\\^abcdef" Hi I'm learning the double backslash here has something to do with #escape outputting double-quoted strings? what's the connection? thanks
luckyruby has quit [Remote host closed the connection]
ircbot99 has joined #ruby
joeycarmello has joined #ruby
apok has quit [Quit: apok]
rippa has quit [Ping timeout: 240 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
ckrailo has joined #ruby
luckyruby has joined #ruby
rippa has joined #ruby
ircbot99 has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
nat2610 has quit [Quit: Leaving.]
wpaulson has joined #ruby
ananthakumaran has joined #ruby
lggr has joined #ruby
FifthWall has joined #ruby
jarred has joined #ruby
joeycarmello has quit [Ping timeout: 244 seconds]
yoklov has joined #ruby
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
wpaulson_ has joined #ruby
gmci has quit [Ping timeout: 246 seconds]
sailias has quit [Client Quit]
gmci has joined #ruby
Seventoes has quit [Ping timeout: 240 seconds]
n_blownapart has quit [Remote host closed the connection]
<heftig>
n_blownapart: it's not a double backslash, that's just the representation as a string literal
<heftig>
\\\\ would be a double backslash
ryanf has joined #ruby
quazimodo has joined #ruby
justinmcp has quit [Remote host closed the connection]
wpaulson has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 246 seconds]
wpaulson_ is now known as wpaulson
mahmoudimus has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
bradleyprice has joined #ruby
yshh has quit [Remote host closed the connection]
yshh has joined #ruby
aantix has joined #ruby
lggr has joined #ruby
schronicles47 has joined #ruby
BMF has quit [Remote host closed the connection]
macmartine has joined #ruby
schronicles47 has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
allanm has quit [Read error: Connection reset by peer]
allanm has joined #ruby
Takehiro has joined #ruby
schronicles47 has joined #ruby
jarred has quit [Quit: jarred]
Guest53275 is now known as karstensrage
c0rn_ has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 260 seconds]
eddiezane has quit [Quit: eddiezane]
justinmcp has joined #ruby
Emmanuel_Chanel has joined #ruby
lggr has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
wwoodrum has quit [Quit: irc2go]
schronicles47 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
macmartine has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
nat2610 has joined #ruby
lggr has joined #ruby
<n_blownapart>
hi I thought p calls inspect, but inspect returns a double-quoted string and double backslashes. why? thanks: x = Regexp.new(Regexp.escape("Mr. Joe Smith")) [42] pry(main)> p x #=> /Mr\.\ Joe\ Smith/ --- [43] pry(main)> x.inspect => "/Mr\\. Joe\\ Smith/"
carlyle has quit [Remote host closed the connection]
jenrzzz has joined #ruby
CannedCorn has joined #ruby
burgestrand has quit [Ping timeout: 246 seconds]
<CannedCorn>
hey guys
<CannedCorn>
is anyone pretty familiar with test-unit?
<CannedCorn>
2.0 that is
<rking>
Anyone familiar with the IRC custom of just ask?
<rking>
∞.0 that is.
slicslak has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 244 seconds]
<rking>
CannedCorn: Giving you a hard time. What's up man?
beneggett has quit [Quit: Computer has gone to sleep.]
JonnieCache has joined #ruby
butblack has quit [Quit: butblack]
<CannedCorn>
rking sorry man, been fighting with it for a while
<CannedCorn>
so, i'm trying to get my rake testtasks to run with test::unit 2.x
lggr has joined #ruby
<CannedCorn>
so i made a little test file
<CannedCorn>
test.rb and when i run it, test unit 2.0 runs, beautiful
<CannedCorn>
but when i make a rakefile and run rake test, where test is a testtask, it uses the built in one
macmartine has joined #ruby
cirwin has quit [Ping timeout: 246 seconds]
<CannedCorn>
ah
<CannedCorn>
gem install rake!
<CannedCorn>
and requiring rake are essential
<CannedCorn>
what a pain
<CannedCorn>
i've been trying to figure that out for hours
uris has quit [Quit: Lost terminal]
beneggett has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
<n_blownapart>
hi anyone care to answer above question on regexp 's ? thanks ^^
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
JonnieCache|work has joined #ruby
mohits has joined #ruby
ttt has quit [Remote host closed the connection]
slicslak has quit [Ping timeout: 248 seconds]
schronicles47 has joined #ruby
<bnagy>
p is like puts blah.inspect
ttt has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<n_blownapart>
thanks Kathmandu .. bnagy still unclear about something if you have time.....
ebragaparah has quit [Ping timeout: 240 seconds]
CannedCorn has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
<n_blownapart>
Regexp.new(Regexp.escape("Mr. Joe Smith")) => "/Mr\\. Joe\\ Smith/" ..question is the connection between the double-quoted string and the double backslashes. why?
<n_blownapart>
bnagy: ^^
Xeoncross has quit [Quit: Ex-Chat]
<bnagy>
that's how backslashes are presented in strings
<n_blownapart>
bnagy: is it correct to say that the 1st backslash is escaping the second?
JonnieCache|work has quit [Ping timeout: 245 seconds]
fsck3r has joined #ruby
fsck3r has quit [Remote host closed the connection]
<bnagy>
well there's only one backslash there
<bnagy>
"\\".bytesize => 1
<n_blownapart>
bnagy: hold on, to pry for a look
macmartine has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
why does freenode suddenly switch my nickname?
Banistergalaxy has joined #ruby
lggr has joined #ruby
Elhu has joined #ruby
ryanlecompte has joined #ruby
jer1ko has joined #ruby
<jer1ko>
ello
Kruppe has quit [Ping timeout: 244 seconds]
sheldon has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
dakine has quit [Ping timeout: 240 seconds]
bpalmer has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Seventoes has joined #ruby
oldB has quit [Quit: oldB]
oldB has joined #ruby
<n_blownapart>
http://pastie.org/4900810 still trying to get why single quotes return different escape logic
RISCi_ATOM has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
sagax has joined #ruby
oldB has quit [Client Quit]
[Neurotic] has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
lggr has joined #ruby
mohits has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
rabidpraxis has joined #ruby
thaostra has quit [Quit: Leaving]
rabidpraxis has quit [Remote host closed the connection]
beneggett has joined #ruby
burgestrand has joined #ruby
<n_blownapart>
http://pastie.org/4900810 burgestrand would you mind explaining why single quotes return the double backslashes? thanks
icole has joined #ruby
quazimodo has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<burgestrand>
n_blownapart: single quotes only allows escaping very few things, single quotes for one: 'hello \'a boo'
<burgestrand>
n_blownapart: what you see is a string representation of the string, which is why you see two backslashes at first, but only one backslash when you print it
_Mon_Ouie_ is now known as Mon_Ouie
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<burgestrand>
n_blownapart: it’s the same difference when you evaluate nil, versus printing nil
lggr has joined #ruby
<n_blownapart>
thanks burgestrand I'm studying all of that
<burgestrand>
n_blownapart: in effect, 'foo\bar' only contains one backslash, while "foo\bar" contains whatever character the escape sequence \b stands for (possibly the bell character?)
<burgestrand>
n_blownapart: it’s more apparent for something else, like "foo\0bar" and 'foo\0bar'
oldB has joined #ruby
dmiller has quit [Remote host closed the connection]
<n_blownapart>
burgestrand: thank you I'm pretty tired.
<burgestrand>
me too.
<burgestrand>
being tired is bad for learning
tagrudev has joined #ruby
<n_blownapart>
burgestrand: yeah I'm just staring but will try everything in pry. thanks!
Taichou has joined #ruby
ananthakumaran has joined #ruby
duracrisis__ has joined #ruby
duracrisis__ has quit [Read error: Connection reset by peer]
duracrisis__ has joined #ruby
<n_blownapart>
burgestrand: so the rule (for now) would be just to use double quotes, unless I am trying to escape something esoteric like a bell character?
lggr has quit [Ping timeout: 246 seconds]
<burgestrand>
n_blownapart: if you want your string to become the same string you write all the time, use single quotes, what you see when you write the string is pretty much what you get
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
duracrisis_ has quit [Ping timeout: 240 seconds]
<burgestrand>
n_blownapart: if you want to use escape sequences, use double quotes
<burgestrand>
n_blownapart: some of my co-workers use double-quotes almost exclusively, I mix and match
<n_blownapart>
burgestrand: thanks very much that penetrated my thick skull. does one backslash in effect escape the other one? : i.e. \\
Playb3yond has quit [Quit: Playb3yond]
<burgestrand>
n_blownapart: try it
lggr has joined #ruby
<n_blownapart>
burgestrand: ok many thanks
bradleyprice has quit [Remote host closed the connection]
n_blownapart has quit [Remote host closed the connection]
c0rn_ has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
m3pow has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
c0rn_ has joined #ruby
m3pow has joined #ruby
lggr has joined #ruby
chendo_ has quit [Ping timeout: 240 seconds]
icole has quit [Remote host closed the connection]
AlbireoX`Laptop has quit [Remote host closed the connection]
P1RATEZ has quit [Remote host closed the connection]
chendo_ has joined #ruby
fantazo has quit [Remote host closed the connection]
cakehero has quit [Ping timeout: 256 seconds]
zigomir has joined #ruby
hakunin has quit [Remote host closed the connection]
monkegjinni has quit [Read error: No route to host]
monkegji_ has joined #ruby
oldB has quit [Quit: oldB]
Forevernade has quit [Ping timeout: 256 seconds]
jer1ko is now known as jer1ko_away
yoklov has quit [Quit: bye!]
oldB has joined #ruby
lggr has joined #ruby
oldB has quit [Client Quit]
mikepack has joined #ruby
jenrzzz has joined #ruby
timonv has joined #ruby
KindOne has quit [Ping timeout: 246 seconds]
awestroke has joined #ruby
nyuszika7h has quit [Ping timeout: 246 seconds]
_mak has joined #ruby
darkc0met has quit [Ping timeout: 264 seconds]
ebragaparah has joined #ruby
icole has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 244 seconds]
friskd has joined #ruby
zeknox has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
<zeknox>
what method can I use like string.match() that will match all instances of a regex found in the string, and not just the first?
Meon__ is now known as Meon
<bnagy>
#scan
noyb has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
elsifaka has joined #ruby
aantix has quit [Quit: aantix]
jgrevich has quit [Quit: jgrevich]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<zeknox>
bnagy: great, just what I needed!
jenrzzz has quit [Ping timeout: 252 seconds]
binary3D has joined #ruby
Meon_ has joined #ruby
ebragaparah has quit [Ping timeout: 240 seconds]
pigggie_ has quit [Quit: leaving]
apok has joined #ruby
Meon has quit [Ping timeout: 248 seconds]
<binary3D>
I'm getting "invalid byte sequence in UTF-8" when I scrape a longitude value that contains the 'degree' symbol. How should I get around this? http://pastie.org/4900982
saschagehlich has joined #ruby
mohits has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
m3pow has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
nat2610 has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
senny has joined #ruby
lggr has joined #ruby
<zeknox>
when i use the string.scan() method and place it into an array (array << string.scan(/regex/)) i get an array inside of an array. how can I avoid this?
djdb has joined #ruby
ebragaparah has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
Meon_ is now known as Meon
<bnagy>
you could use a1 + a2, or use flatten
m3pow has joined #ruby
Seventoes has left #ruby [#ruby]
lggr has quit [Ping timeout: 260 seconds]
Averna has quit [Quit: Leaving.]
charliesome has joined #ruby
mohits has joined #ruby
lggr has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
arturaz has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
ZubKonst has joined #ruby
replore_ has joined #ruby
lggr has joined #ruby
jprovazn_away is now known as jprovazn
robustus has joined #ruby
rakunHo has quit [Remote host closed the connection]
<burgestrand>
zeknox: Array#concat
answer_42 has joined #ruby
<burgestrand>
Same as Array#<< but with an array as an argument to append more than one thing.
ph^ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<zeknox>
burgestrand: so I need the "#" after the arrayname
BrianJ has quit [Quit: Computer has gone to sleep.]
<burgestrand>
zeknox: no, it’s a convention rubyists use to write out method names, for example Hash.[] vs Hash#[] — the dot or hash-pound tells you if it is a class method (dot) or an instance method (hash-pound).
<burgestrand>
zeknox: also, in ruby code, # declares the start of a comment.
monkegji_ has quit [Read error: No route to host]
sspiff has quit [Remote host closed the connection]
Morkel has joined #ruby
monkegjinni has joined #ruby
<zeknox>
still lost as to how to solve my issue, just want to use the string.scan() method and get the output into a standard array
tomaw_ is now known as tomaw
lggr has quit [Ping timeout: 260 seconds]
<aces23up>
I'm looking for a compression routing to archive a buncha files for dropping on a server then downloading later for decompression, is there any built in ruby libraries for this? I wanted to use rar, but can't seem to find any libraries for decompression for ruby.
`brendan has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
awestroke has quit [Remote host closed the connection]
atmosx has quit [Remote host closed the connection]
lggr has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
lupine_85 has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
nari has joined #ruby
bapa has joined #ruby
lggr has joined #ruby
josh^ has quit [Ping timeout: 256 seconds]
krawchyk has joined #ruby
jokar1 has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
josh^ has joined #ruby
carlyle has joined #ruby
jeffreybaird has joined #ruby
frogprince_mac has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 260 seconds]
TheFuzzball has quit [Ping timeout: 245 seconds]
drPoggs has quit [Quit: Goodbye]
drPoggs has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
xyzodiac has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
lupine_85 has quit [Ping timeout: 250 seconds]
lggr has joined #ruby
joofsh has joined #ruby
oldB has joined #ruby
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
`gregorg` is now known as gregorg
jonathanwallace has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Spooner has joined #ruby
mensvaga has joined #ruby
EPIK has joined #ruby
lggr has joined #ruby
daniel_- has quit [Ping timeout: 246 seconds]
jgwong has quit [Ping timeout: 246 seconds]
amaurea has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
rafacv has left #ruby [#ruby]
<amaurea>
Hi! I'm trying to compile ruby 1.9.3 on a system with openssl 0.9.8e. The compile fails when compiling ext/openssl due to conflicting declarations of HMAC_CTX_copy, etc from openssl_missing.h. I could edit openssl_missing.h to remove these declarations, but that's pretty hacky. Is there a better solution?
jonathanwallace has quit [Remote host closed the connection]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
bpalmer has left #ruby ["ERC Version 5.1.2 $Revision: 1.796.2.6 $ (IRC client for Emacs)"]
cburyta has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk has joined #ruby
lggr has joined #ruby
invisime has joined #ruby
justinmcp has quit [Remote host closed the connection]
d3vic3 has joined #ruby
keyvan has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby
_bart has joined #ruby
mucker has joined #ruby
bbttxu has quit [Quit: bbttxu]
lggr has quit [Ping timeout: 256 seconds]
_bart has quit [Client Quit]
dangerousdave has quit [Quit: Leaving...]
jonathanwallace has joined #ruby
dangerousdave has joined #ruby
piotr_ has quit [Read error: Connection reset by peer]
piotr_ has joined #ruby
oldB has quit [Quit: oldB]
JustinCampbell has joined #ruby
aquaranto has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
guns has joined #ruby
monkegjinni has quit [Ping timeout: 244 seconds]
danielsz has quit [Ping timeout: 248 seconds]
guns has quit [Quit: guns]
SeanTAllen has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Russell^^ has joined #ruby
Russell^^ has left #ruby [#ruby]
jonathanwallace has quit [Remote host closed the connection]
<clocKwize>
Spooner, yeah its part of activesupport I guess - Happy to depend on AS.
samphippen has quit [Client Quit]
bapa has quit [Read error: Connection reset by peer]
bapa has joined #ruby
<Hanmac>
shevy sha3 is chosen
samphippen has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<JonnieCache|work>
how can it be broken it only came out yesterday
Russell^^_ has joined #ruby
Russell^^_ has left #ruby [#ruby]
lggr has joined #ruby
<Spooner>
clocKwize : Ah yes, I tend to assume AS is just a part of Rails, when it is separate.
<JonnieCache|work>
oh *chosen*
* JonnieCache|work
has console blindness
<JonnieCache|work>
time to go outside
awarner has quit [Remote host closed the connection]
onibox has quit [Quit: leaving]
RJ3000_ has joined #ruby
Gal3rielol has joined #ruby
<Hanmac>
JonnieCache you read what you want to hear :D
sspiff has quit [Remote host closed the connection]
triptec_ has joined #ruby
<Xeago>
lol
triptec has quit [Read error: Connection reset by peer]
triptec_ is now known as triptec
<clocKwize>
Spooner, I'm working with rails anyway :)
joshman_ has joined #ruby
CarlB_the_great has joined #ruby
strk has left #ruby [#ruby]
lggr has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
tmttt has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
Agis__ has quit [Quit: Agis__]
jonathanwallace has joined #ruby
lggr has joined #ruby
elux has joined #ruby
framling has quit [Quit: Lost terminal]
framling has joined #ruby
internet_user has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
bbttxu has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
lolmaus has quit []
nyuszika7h has joined #ruby
philcrissman has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 255 seconds]
<amaurea>
I just installed ruby, and I am trying to install a gem now, using gem install sup. However, it fails, complaining that my C compiler doesn't work when running configure for xapian-core. However, if I run configure manually, it works fine. The gem output can be found here: http://folk.uio.no/sigurdkn/gem_sup_error.txt and config.log here: http://folk.uio.no/sigurdkn/gem_sup_log.txt. As you can see, it tries to pass an -R option to gcc, which I have not seen do
lggr has quit [Ping timeout: 256 seconds]
philcrissman has joined #ruby
xyzodiac has joined #ruby
lggr has joined #ruby
Ankhers has joined #ruby
ttt has quit [Remote host closed the connection]
deadalus has joined #ruby
<amaurea>
This is with gcc 4.7
t0rc has joined #ruby
t0rc has quit [Client Quit]
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby
mercwithamouth has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
tmttt has joined #ruby
_nitti has joined #ruby
lggr has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
chimkan has joined #ruby
iamjarvo has joined #ruby
jimeh2 has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
margle has quit [Quit: Computer has gone to sleep.]
keyvan has quit [Remote host closed the connection]
jerius has joined #ruby
chimkan has quit [Client Quit]
lggr has quit [Ping timeout: 252 seconds]
rmcafee has joined #ruby
v0n has quit [Ping timeout: 255 seconds]
apok has joined #ruby
sent-hil has joined #ruby
bbttxu has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has joined #ruby
JonnieCache|work has quit [Ping timeout: 245 seconds]
jimeh2 has joined #ruby
<shevy>
configure: error: C compiler cannot create executables
<shevy>
See `config.log' for more details.
lggr has joined #ruby
freeayu has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
<shevy>
missing --run aclocal-1.11'
<shevy>
something is fucked up
<shevy>
do you have aclocal installed
mercwithamouth has quit [Ping timeout: 252 seconds]
philcrissman has quit [Remote host closed the connection]
dmiller has joined #ruby
_nitti has quit [Remote host closed the connection]
philcrissman has joined #ruby
ttt has quit [Ping timeout: 240 seconds]
<bnagy>
well, that's your option for 64 bit on windows
lggr has joined #ruby
<bnagy>
and anyway 'hating JVM' is like hating thunder, or the colour green or something
margle has joined #ruby
_nitti has joined #ruby
indel has joined #ruby
<bperry>
I hate the jvm
margle has quit [Client Quit]
<bperry>
I hate java
* Hanmac
hates java in general, but eclipse is okay
<bperry>
I hate eclipse more than java!
<bperry>
#vim
<_7894>
Java sucks, but.. hey.. no reason to hate unless you have to work with it
<bperry>
I do have to work with it :(
<_7894>
That sucks
<blazes816>
I'd hate it
<bperry>
it is only 30% of my jobish though
caveat- has quit [Ping timeout: 248 seconds]
cakehero has quit [Ping timeout: 256 seconds]
hoelzro is now known as hoelzro|away
deadalus has quit [Ping timeout: 252 seconds]
chrishunt has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
skryking has left #ruby ["Konversation terminated!"]
hadees has quit [Quit: hadees]
lggr has quit [Ping timeout: 260 seconds]
niklasb has quit [Read error: Operation timed out]
<JonnieCache|work>
why would you hate the jvm
margle has joined #ruby
<bperry>
JonnieCache|work: is that sarcasm?
<bperry>
have you been under a rock the past few months where every month there is a java exploit that bypasses the sandbox
lggr has joined #ruby
m3pow_ has joined #ruby
caveat- has joined #ruby
roychri has joined #ruby
awestroke has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
triptec has quit [Ping timeout: 240 seconds]
chrisbolton has joined #ruby
triptec has joined #ruby
macmartine has joined #ruby
ndboost has quit [Remote host closed the connection]
m3pow has quit [Ping timeout: 252 seconds]
<roychri>
I have a class with namespace "Foo::Bar::Whatever" and I am trying to see if this class exists by doing Object.const_defined?("Foo::#{somevar}::Whatever") but I get an error "wrong constant name". I presume that a constant cannot have ::, that is why... But I do not know how else to find out if a class exists. any pointers?
samphippen has quit [Quit: Computer has gone to sleep.]
<Hanmac>
the joke is, when some sandbox is broken do the java developer make a better sandbox? no, they do yetanother sandbox around the first sandbox
m3pow_ has quit [Client Quit]
m3pow has joined #ruby
horofox has quit [Quit: horofox]
lggr has quit [Ping timeout: 240 seconds]
xyzodiac has joined #ruby
<Hanmac>
roychri: "Foo::Bar::Whatever".split("::").inject(Object) {|c,s| c && c.const_defined?(s)}
ndboost_ has joined #ruby
Trioke has joined #ruby
colinbm has quit [Quit: colinbm]
Monie has joined #ruby
timonv has quit [Remote host closed the connection]
mikepack has joined #ruby
<roychri>
Hanmac: I'll test this afte lunch! :) Thanks!
notVert has quit [Read error: Connection reset by peer]
aantix has joined #ruby
Jamone has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
AlbireoX has joined #ruby
ndboost_ has quit [Remote host closed the connection]
hukl has joined #ruby
apok has quit [Quit: apok]
monkegjinni has quit [Read error: No route to host]
SegFaultAX|work has joined #ruby
<Hanmac>
roychri: this is better: "Foo::Bar::Whatever".split("::").inject(Object) {|c,s| c && c.const_defined?(s) ? c.const_get(s) : false}
monkegjinni has joined #ruby
samphippen has joined #ruby
timmow_ has quit [Quit: is having a nap]
mmitchel_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
hadees has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
mmitchell has quit [Ping timeout: 245 seconds]
samflores has joined #ruby
lggr has joined #ruby
linoj has quit [Quit: linoj]
_nitti_ has joined #ruby
Kudos has quit [Ping timeout: 264 seconds]
nga4 has joined #ruby
carlyle has quit [Remote host closed the connection]
friskd has quit [Quit: friskd]
ryanlecompte has joined #ruby
zii has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
fboudrea has joined #ruby
oldB has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
tommyvyo_ has joined #ruby
oldB has quit [Client Quit]
lggr has quit [Ping timeout: 246 seconds]
oldB has joined #ruby
fboudrea has left #ruby [#ruby]
ndboost has joined #ruby
hollymann has joined #ruby
<roychri>
Hanmac: Your first suggestion does not seem to work. Maybe I am doing it wrong. Trying out second suggestino.
rasbonics_ has joined #ruby
lggr has joined #ruby
Takehiro has joined #ruby
rasbonics has quit [Ping timeout: 246 seconds]
rasbonics_ is now known as rasbonics
<roychri>
Hanmac: Will these works if the first part does not exists as a class by itself? "Foo::Bar::Whaveter" and "Foo" does not exists...
CarlB_the_great has quit [Remote host closed the connection]
Bidness has joined #ruby
Bidness has quit [Remote host closed the connection]
alvaro_o has joined #ruby
<roychri>
Hanmac: I am asking because what you propose works but some classes and not for others.
Bidness has joined #ruby
<Hanmac>
that confuses me ...
tmttt has quit [Ping timeout: 246 seconds]
vivianachan has joined #ruby
<vivianachan>
hello
Mon_Ouie has joined #ruby
<roychri>
Hanmac: I'll do more tests to make sure it's not me doing something wrong
rasbonics has quit [Read error: Connection reset by peer]
oldB has quit [Quit: oldB]
nyuszika7h has quit [Read error: Connection reset by peer]
jearvondharrie has quit [Ping timeout: 240 seconds]
CarlB_the_great has joined #ruby
<workmad3>
roychri: if Foo::Bar::Whatever exists, then Foo exists
<vivianachan>
someone could help me
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
nyuszika7h has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
codebeaker has joined #ruby
nyuszika7h has quit [Client Quit]
sent-hil has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
linoj has joined #ruby
jimeh2 has quit [Ping timeout: 244 seconds]
sent-hil has quit [Remote host closed the connection]
damien has joined #ruby
<roychri>
vivianachan: People here answers questions. Please specify why you need help. Check this guide for asking the right kind of questions: http://www.mikeash.com/getting_answers.html
nyuszika7h has joined #ruby
sent-hil has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
leehambley has quit [Ping timeout: 246 seconds]
monkegjinni has joined #ruby
schaerli has quit [Remote host closed the connection]
deadalus has joined #ruby
<vivianachan>
thanks
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
sent-hil_ has joined #ruby
ianbrandt has joined #ruby
ianbrandt has quit [Excess Flood]
ianbrandt has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
chimkan_ has quit [Quit: chimkan_]
chrishunt has joined #ruby
<Spooner>
vivianachan : Best to just ask your question, then anyone qualified to answer can answer. If you ask for help, none of us will step forward, because you could want any of 10,000 answers ;)
lggr has joined #ruby
samflores has quit [Ping timeout: 246 seconds]
_bart has joined #ruby
carlyle has joined #ruby
<JonnieCache|work>
bperry: fair point. from the point of view of developers the jvm is a great tool though
cantonic_ has joined #ruby
<JonnieCache|work>
bperry: but youre right, from the user and operations point of view, perhaps not so much
damien has quit [Client Quit]
<xclite>
Is anybody aware of a standard, maintained library for creating Ruby command-line apps? I need something that supports one level of subcommands
daslicious has joined #ruby
<Spooner>
xclite : slop (many others though).
<vivianachan>
my problem is non capisco bene l'inglese ma ci provo.
<vivianachan>
il mo problema è riuscire a collegare mysql2 con rails 3
<JonnieCache|work>
at the end of the day, dont run native code you dont trust. those jvm exploits are mostly a problem because the jvm is in browsers, which is just a Bad Idea(tm)
<vivianachan>
I do not understand English well but I try.
<vivianachan>
m the problem is being able to connect with rails 3 mysql2
<roychri>
Hanmac: Ok, I found out why my results were not as I expected. What you provided works great, thanks.
<xclite>
Spooner, thanks will check it out. I've looked at thor, commander, etc but didn't have quite what I needed
<Spooner>
xclite : cri also manages subcommands.
Bidness has quit [Remote host closed the connection]
<JonnieCache|work>
if there was a facility for running c sharp or whatever other bytecode language in the browser, its sandbox would be broken every month as well, because its such a tasty target
<Spooner>
vivianachan : Ask in #rails or #rubyonrails
<vivianachan>
ok
<Hanmac>
its #rubyonrails
<shevy>
vivianachan you can always use simple english :)
<shevy>
200 words is ok
<Hanmac>
#rails seems to be dead
<vivianachan>
thanks
<_7894>
4000
<xclite>
Spooner, looks promising, thanks a ton. I wrote my own stuff that parses the subcommands correctly, but I don't want to be reinventing a crappier wheel
<Spooner>
Hanmac : Ah, I never go there. I only point people ;)
<shevy>
you point them in the wrong direction so they fall into the abyss :(
<shevy>
admit it!
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
<xclite>
shevy, IT'S A TARP
<shevy>
a what?
<xclite>
too esoteric i guess
<xclite>
haha
<shevy>
is that like a turf...
<xclite>
or like a trap
<Hanmac>
i am in none of the channels eigher ... i only knew wich is the right one
<Spooner>
I am the road-sign that Dick Dastardly has spun around!
slainer6_ has quit [Remote host closed the connection]
allsystemsarego has joined #ruby
<shevy>
I only know Donald Duck
<xclite>
throwback haha
davidcelis has joined #ruby
<Spooner>
It was all just noise after Steamboat Willy!
Pip has left #ruby ["离开"]
carloslopes has joined #ruby
chimkan_ has joined #ruby
samflores has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
xyzodiac has joined #ruby
elsifaka has quit [Quit: Veloma e!]
jearvondharrie has joined #ruby
arturaz has quit [Ping timeout: 255 seconds]
DrShoggoth has joined #ruby
lggr has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
jearvondharrie has quit [Ping timeout: 260 seconds]
CarlB_the_great has joined #ruby
voodoofish430 has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
_Amen_Makveli_ has joined #ruby
nga4 has quit []
whitenoise has quit [Quit: This computer has gone to sleep]
_Amen_Makveli_ has quit [Client Quit]
lggr has quit [Ping timeout: 255 seconds]
_Amen_Makveli_ has joined #ruby
_Amen_Makveli_ has quit [Remote host closed the connection]
_Amen_Makaveli_ has joined #ruby
burgestrand has joined #ruby
friskd has joined #ruby
cakehero has joined #ruby
friskd has quit [Read error: Connection reset by peer]
codebeaker has quit [Quit: codebeaker]
lggr has joined #ruby
nat2610 has joined #ruby
jenrzzz has joined #ruby
SegFaultAX|work has quit [Ping timeout: 246 seconds]
Vainoharhainen has quit [Quit: Leaving...]
apok has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
margle has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: No route to host]
<nwertman>
Quick question guys… I'm trying to install the 'sqlite3' gem on my OS X 10.8 machine. Things seem to install fine, but "require 'sqlite3'" is unable to find sqlite
workmad3 has quit [Ping timeout: 255 seconds]
thatRD has joined #ruby
<Xeago>
using bundle?
<nwertman>
[1] pry(main)> require 'sqlite3'
<nwertman>
LoadError: no such file to load -- sqlite3
<matti>
Xeago: ;-)
<Xeago>
what is the ruby version?
dmiller has quit [Remote host closed the connection]
<nwertman>
Stock OS version: 1.8.7
<Xeago>
blurgh ML comes with old shit
<nwertman>
According to 'gem list' it shows up.
<Xeago>
didn't expect that
<Xeago>
require 'rubygems'
<nwertman>
Already required
mucker has quit [Quit: leaving]
philcrissman has quit [Remote host closed the connection]
mk03 has joined #ruby
<nwertman>
Okay, looks like it is some bundler magic that is causing issues.
<Xeago>
run bundle exec pry
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
samflores is now known as samflores|away
leehambley has joined #ruby
mk03 has quit [Remote host closed the connection]
internet_user has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 240 seconds]
internet_user has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
mmitchel_ has quit [Remote host closed the connection]
wpaulson has joined #ruby
mmitchell has joined #ruby
jblack has quit [Quit: Changing server]
jblack_ has joined #ruby
sent-hil has joined #ruby
bricker has joined #ruby
jblack_ is now known as jblack
sent-hil has quit [Remote host closed the connection]
lggr has joined #ruby
ffranz has quit [Quit: Leaving]
samflores|away is now known as samflores
ffranz has joined #ruby
Morkel has joined #ruby
cburyta_ has quit [Remote host closed the connection]
philcrissman has quit [Read error: Connection reset by peer]
whitenoise has joined #ruby
philcrissman has joined #ruby
<blazes816>
is there a way to ignore whitespace in a string you're matching with regex? I know /x ignores whitespace in the regex itself, but I want something like: "foo bar" =~ /foobar/ #=> 0
jearvondharrie has joined #ruby
<blazes816>
and I need to preserve this in my match as well
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
lggr has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
verto is now known as verto|off
jbw has joined #ruby
fredjean has quit [Ping timeout: 255 seconds]
awestroke has joined #ruby
verto|off is now known as verto
reset has joined #ruby
fredjean has joined #ruby
nitti has quit [Remote host closed the connection]
answer_42 has quit [Quit: WeeChat 0.3.9]
oldB has quit [Quit: oldB]
lggr has quit [Ping timeout: 256 seconds]
Takehiro has joined #ruby
Neomex has quit [Quit: Neomex]
imami|afk is now known as banseljaj
zemanel has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
falieson_ has joined #ruby
monkegjinni has joined #ruby
Tearan has quit [Ping timeout: 248 seconds]
the_jeebster has joined #ruby
lggr has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
<falieson_>
http://pastie.org/4904074 someone helped me last night, but I don't really understand it or how to implement it. It's the bottom portion of the pastie
slainer68 has joined #ruby
xiexie_11 has quit [Ping timeout: 255 seconds]
samflores is now known as samflores|away
slicslak has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
slicslak has joined #ruby
bluOxigen has joined #ruby
fortysixandtwo_ has joined #ruby
fortysixandtwo has quit [Ping timeout: 240 seconds]
<R3dy>
that's the verison I'm running, what version are you running?
oldB has quit [Quit: oldB]
fermion has joined #ruby
olrrai has joined #ruby
theRoUS has quit [Ping timeout: 256 seconds]
kirun_ has joined #ruby
jrajav has quit [Read error: Connection reset by peer]
<R3dy>
weird, on my sysetm it's N
<R3dy>
insetad of I
<R3dy>
lol oh well :)
kirun has quit [Ping timeout: 252 seconds]
schronicles47 has quit [Remote host closed the connection]
nitti has quit [Remote host closed the connection]
wallerdev has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
samflores has joined #ruby
schronicles47 has joined #ruby
Takehiro has joined #ruby
reset has joined #ruby
fortysixandtwo has quit [Read error: Connection reset by peer]
fortysixandtwo has joined #ruby
lggr has joined #ruby
nitti_ has joined #ruby
h4mz1d has joined #ruby
timonv has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
chrishunt has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
lupine_85 has joined #ruby
the_jeebster1 has joined #ruby
beit has quit [Quit: beit]
the_jeebster has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 245 seconds]
ndboost has quit [Remote host closed the connection]
arietis has joined #ruby
niklasb has joined #ruby
terrellt has joined #ruby
stephenjudkins has joined #ruby
cantonic has quit [Quit: cantonic]
Hanmac has joined #ruby
fermion has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
anandhegde has joined #ruby
<terrellt>
I'm using DBI with an ODBC connection, and using fetch_all. However, when I do that I get an array of objects that are the same. If I do fetch over and over again I get new objects. I think it comes down to if I do a fetch, store that DBI row object in another variable (I used clone, not sure if I have to), then modify a value in one of the variables it gets copied over to the other one - like they're both using the same pointer. Is there a way
thillux has joined #ruby
lupine_85 has quit [Ping timeout: 245 seconds]
<terrellt>
Note, row.to_h works just fine, but I wouldn't be able to use symbols at that point (right?)
fermion has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
thillux_ has quit [Ping timeout: 248 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
t0rc has joined #ruby
<terrellt>
It should be noted that the DBI Row class overrides .clone and .dup which seems to make it still be a reference.
<tos9>
pdtpatrick: Well, I didn't get any errors -- it just didn't appear to fix the behavior switching to gnu readline. Are you suggesting that I recompile ruby from scratch and try it again anyhow?
heftig has joined #ruby
elux has quit [Quit: Leaving...]
<pdtpatrick>
I'm saying use rvm if you're not already using it. As you can see, readline is quite easy to install using their guide
aoshel has quit [Quit: aoshel]
<terrellt>
Anyone have any experience with TinyTDS?
tommyvyo has quit [Quit: Computer has gone to sleep.]
aoshel has joined #ruby
luckyruby has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
oldB has quit [Quit: oldB]
<tos9>
pdtpatrick: Ah, no I wasn't, I just compiled it myself. But alright I'll try using rvm then.
<tos9>
Cool. I've certainly heard of it, but never tried it yet. I'll take a look. Thanks.
DrShoggoth has quit [Quit: Leaving]
recycle has quit [Remote host closed the connection]
kpshek has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
ataher is now known as rehat
JonnieCache|work has quit [Ping timeout: 245 seconds]
rehat is now known as rehatz
alvaro_o has quit [Read error: Connection reset by peer]
JustinCampbell has joined #ruby
<rehatz>
can you do a c++ version of a for loop in ruby?
<rehatz>
for(var;condition;increment)
alvaro_o has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
kpshek has joined #ruby
<blazes816>
rehatz: you can do for in
iamjarvo has joined #ruby
<blazes816>
for i in %w(a b c)
niklasb has quit [Ping timeout: 256 seconds]
<blazes816>
but it's almost always better to use #each, and if you need the index, #each_with_index
<rehatz>
I wanted to do a nested for loop type algorithm and go off the outer for loops var
nitti_ has quit [Remote host closed the connection]
lupine_85 has quit [Excess Flood]
<rehatz>
like find the largest pair some in a array of integers
<rehatz>
*sum
Chryson has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
joshman_ has quit [Ping timeout: 256 seconds]
thone_ has joined #ruby
dmiller has joined #ruby
diverdude has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<diverdude>
Hello, i am using rake v. 0.9.2.2, but i get errors when migrating app: NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. I read this can be avoided if i use rake 1.1.1 instead. How do i do that? thx
iamjarvo has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
thone has quit [Ping timeout: 256 seconds]
rmcafee has quit [Quit: rmcafee]
Takehiro has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
awestroke has quit [Remote host closed the connection]
sagax has quit [Quit: Ухожу я от вас]
<musl>
rehatz: Have a look at Array#permutation( n ) and Enumerable#inject
jenrzzz has quit [Ping timeout: 244 seconds]
lupine_85 has joined #ruby
<rehatz>
ok thanks
<diverdude>
zny1?
cardoni has quit [Quit: Leaving...]
<musl>
rehatz: It's not exactly clear what the input array looks like or I'd offer an example.
<rehatz>
musl: wow that's awesome lol
<rehatz>
nah that helps thanks
<musl>
Ruby /is/ awesome. :)
ffranz has quit [Quit: Leaving]
tommyvyo has quit [Quit: Computer has gone to sleep.]
wpaulson has joined #ruby
lupine_85 has quit [Excess Flood]
<rehatz>
:)
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
lupine_85 has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 246 seconds]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
ncr100 has quit [Ping timeout: 240 seconds]
recycle has joined #ruby
brianpWins has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jenrzzz has joined #ruby
lggr has joined #ruby
slicslak has quit [Ping timeout: 246 seconds]
the_jeebster1 has quit [Quit: Leaving.]
alanp has quit [Ping timeout: 256 seconds]
h4mz1d has quit [Ping timeout: 240 seconds]
alanp_ has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
niklasb has joined #ruby
hadees has quit [Quit: hadees]
haxrbyte has quit [Ping timeout: 256 seconds]
haxrbyte_ has joined #ruby
rakl has quit [Ping timeout: 244 seconds]
hadees has joined #ruby
bwlang has left #ruby [#ruby]
stephenjudkins has quit [Quit: stephenjudkins]
cearls has joined #ruby
lupine_85 has quit [Excess Flood]
lggr has quit [Ping timeout: 256 seconds]
fir_ed has quit [Quit: Leaving]
Agis__ has quit [Quit: Agis__]
cearls has quit [Remote host closed the connection]
rakl has joined #ruby
dangerousdave has quit [Ping timeout: 245 seconds]
nwertman has quit [Quit: nwertman]
jgarvey has quit [Quit: Leaving]
swarley has quit [Remote host closed the connection]
v0n has joined #ruby
joofsh has quit [Ping timeout: 246 seconds]
lupine_85 has joined #ruby
hadees has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
_Amen_Makaveli_ has quit [Remote host closed the connection]
SegFaultAX|work has joined #ruby
[Neurotic] has joined #ruby
slicslak has joined #ruby
mxweas has joined #ruby
statarb3 has quit [Quit: Leaving]
justinmcp has joined #ruby
recycle has quit [Remote host closed the connection]
Zai_ has quit [Quit: Zai_]
adamkittelson has joined #ruby
adamkittelson has quit [Remote host closed the connection]
lupine_85 has quit [Excess Flood]
fir_ed has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
lupine_85 has joined #ruby
h4mz1d has joined #ruby
baroquebobcat has joined #ruby
philcrissman has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 255 seconds]
dmiller has quit [Remote host closed the connection]
aoshel has quit [Quit: aoshel]
lggr has joined #ruby
eignerch_ has joined #ruby
mmitchell has quit [Remote host closed the connection]
berserkr has joined #ruby
eignerchris has quit [Ping timeout: 248 seconds]
kpshek has quit []
awarner has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
<rehatz>
maybe, I do like the shortness of the ruby statements
sent-hil has quit [Remote host closed the connection]
lupine_85 has joined #ruby
theRoUS has quit [Ping timeout: 252 seconds]
wargasm has quit [Ping timeout: 246 seconds]
awarner has joined #ruby
<rehatz>
if I define a method that take one argument and then an array as the second like def wee(first, *second) is there a way to get it to accept an array also
Russell^^ has quit [Quit: Russell^^]
<rehatz>
trying to get a the method to work with command arguments and I have ARGV[0] for the first argument but I don't know how to get it work with ARGV[1,ARGV.size-1]
lggr has quit [Ping timeout: 260 seconds]
v0n has quit [Ping timeout: 246 seconds]
S3kx has quit [Read error: Connection reset by peer]
<bperry>
if you pass an array as second, then it should be the zeroth element in the second variable