tylersmith has quit [Remote host closed the connection]
vwoo has quit [Ping timeout: 256 seconds]
RORgasm has joined #ruby
<nightfly>
maybe?
slainer68 has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
tommyvyo has joined #ruby
vwoo has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
nazty has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
brennanMKE has quit [Remote host closed the connection]
timkohrumel has quit [Remote host closed the connection]
Silent__ has joined #ruby
aedorn has quit [Quit: Leaving]
RORgasm has quit [Ping timeout: 248 seconds]
rickmasta has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
arya has quit [Ping timeout: 252 seconds]
PhatBaja has quit [Quit: Leaving.]
Hobogrammer_ has quit [Ping timeout: 260 seconds]
benlieb has quit [Read error: Connection reset by peer]
slyv has joined #ruby
Dummies_freelan1 has quit [Ping timeout: 248 seconds]
Dummies_freelanc has quit [Ping timeout: 276 seconds]
arya has joined #ruby
chrishough has quit [Quit: chrishough]
razi has joined #ruby
digitalcake has quit [Quit: Leaving.]
ianbrandt has quit [Quit: ianbrandt]
tommyvyo has quit [Quit:]
vlad_starkov has joined #ruby
myappleguy has joined #ruby
agjacome has quit [Ping timeout: 248 seconds]
djbkd has quit [Quit: Leaving]
Zeeraw has quit [Quit: Computer has gone to sleep.]
vwoo has quit [Ping timeout: 246 seconds]
bubblehead has quit [Read error: Connection reset by peer]
bubblehe_ has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
arubin has joined #ruby
agjacome has joined #ruby
vwoo has joined #ruby
gyre007 has joined #ruby
d3c has quit [Quit: Quit]
chrisja has quit [Quit: leaving]
<k-man>
using rack, is there a way i can allow the local network to use the site without authentication, but require a password for remote hosts to access it?
timkohrumel has joined #ruby
jkline has quit [Quit: jkline]
james_ has joined #ruby
james_ is now known as Guest95761
LaPetiteFromage has quit [Quit: LaPetiteFromage]
hogeo has joined #ruby
ivanoats has joined #ruby
devoldmx has joined #ruby
yshh has quit [Remote host closed the connection]
ntus1017 has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
ravster has joined #ruby
adkron has joined #ruby
Guedes has quit [Ping timeout: 255 seconds]
jfelchner has joined #ruby
blitz has quit [Quit: This computer has gone to sleep]
hogeo has quit [Read error: Connection reset by peer]
benweint has quit [Quit: Computer has gone to sleep.]
bigkm has quit [Quit: Computer has gone to sleep.]
hogeo has joined #ruby
subbyyy has quit [Ping timeout: 246 seconds]
Domon has joined #ruby
Nimsical has joined #ruby
bigkm has joined #ruby
mmlac-bv has quit [Quit: mmlac-bv]
slainer68 has joined #ruby
freerobby has quit [Quit: Leaving.]
browndawg has joined #ruby
vlad_starkov has joined #ruby
therod has joined #ruby
wargasm has joined #ruby
obs has quit [Quit: Konversation terminated!]
kiri has joined #ruby
kieppie has joined #ruby
<kieppie>
hi folks
<kieppie>
I'm pretty ignorant re Ruby/RoR. if I make a config change to something like configuration.yml, so I just need to restart apache, or is there some sort of ruby function (rake?) I need to do to commit the config change?
sandGorgon has quit [Read error: Connection reset by peer]
therod has quit [Client Quit]
timkohrumel has quit [Remote host closed the connection]
sandGorgon has joined #ruby
slainer68 has quit [Ping timeout: 246 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
harrymoreno has joined #ruby
dcope has quit [Ping timeout: 256 seconds]
chattmatt has quit [Quit: chattmatt]
rodrigo- has quit [Ping timeout: 252 seconds]
stillEPIK has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
<wallerdev>
kieppie: probably better question for #rubyonrails
jimg has joined #ruby
tyman has joined #ruby
tyman has joined #ruby
pcboy__ has quit [Read error: Operation timed out]
Alina-malina has quit [Read error: Connection reset by peer]
rickruby has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
jimg has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 248 seconds]
rickruby has joined #ruby
cha1tanya has joined #ruby
Nimsical has joined #ruby
jds_ has joined #ruby
advorak has joined #ruby
JohnBat26 has joined #ruby
Hanmac has joined #ruby
nomenkun has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
cha1tanya has quit [Ping timeout: 256 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
tonini has joined #ruby
browndawg has quit [Ping timeout: 256 seconds]
blaxter_ has quit [Read error: Operation timed out]
enaqxx has quit [Remote host closed the connection]
pootler_ has joined #ruby
danslo has joined #ruby
srji has joined #ruby
<advorak>
in Prawn, when using text("this is a test file",size: 32, width: 10, overflow: :shrink_to_fit) ... how can I determine the font size that this command ends up using?
_Andres_ has quit [Read error: Connection reset by peer]
paissad has quit [Ping timeout: 245 seconds]
thebastl has quit [Remote host closed the connection]
daniel_-_ has joined #ruby
paissad has joined #ruby
swex_ has joined #ruby
icole has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
thebastl has joined #ruby
swex has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
daniel_-_ has quit [Read error: Operation timed out]
beilabs has quit [Ping timeout: 252 seconds]
chandankumar has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
cha1tanya has joined #ruby
srji has quit [Quit: leaving]
ferdev has quit [Quit: ferdev]
bamdad has joined #ruby
adambeynon has joined #ruby
RORgasm has joined #ruby
marr has joined #ruby
_Andres has joined #ruby
camilasa_ has joined #ruby
ybart_ has joined #ruby
blaxter_ has joined #ruby
Guedes has joined #ruby
Guedes has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
srji has joined #ruby
cha1tanya has quit [Ping timeout: 241 seconds]
jimg has joined #ruby
dhruvasagar has joined #ruby
RORgasm has quit [Ping timeout: 276 seconds]
srji has quit [Client Quit]
DaniG2k has joined #ruby
arya has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
srji has joined #ruby
part__ has joined #ruby
arturaz has joined #ruby
<part__>
hi
slainer68 has joined #ruby
jimg has quit [Ping timeout: 256 seconds]
Nisstyre has joined #ruby
<part__>
How can I pass from integer to hex in little endian. I mean I have 8450 and I need ->\x02\x21
statarb3 has joined #ruby
statarb3 has joined #ruby
<part__>
I tried .to_s(16) but I don't get the correct format
Xeago has joined #ruby
beilabs has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
mengu has joined #ruby
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
zomgbie has quit [Ping timeout: 252 seconds]
Al__ has joined #ruby
telling_ is now known as telling
telling has quit [Changing host]
telling has joined #ruby
Coffers has joined #ruby
Xeago_ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<Elico>
I need some help with mongoDB driver. if anyone has experience and come to the rescue I will be happy.
Markvilla has joined #ruby
noname001 has joined #ruby
filipe has joined #ruby
mklappstuhl has joined #ruby
nomenkun has joined #ruby
lkba has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
niceguyjames has joined #ruby
Xeago_ has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
jimg has joined #ruby
goganchic has joined #ruby
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
jds_ has quit [Remote host closed the connection]
timmow has joined #ruby
thebastl has quit [Remote host closed the connection]
jds_ has joined #ruby
niklasb has joined #ruby
goganchic has quit []
whowantstolivefo has quit [Quit: who wants to live forever ?]
timmow has quit [Remote host closed the connection]
Nanuq has quit [Ping timeout: 245 seconds]
shadoi1 has joined #ruby
harrymoreno has quit [Quit: harrymoreno]
<buzzybron>
Elico : on linux?
<Elico>
buzzybron: yes
spider-mario has joined #ruby
<buzzybron>
good luck
<Elico>
why?
<buzzybron>
was just curious
<Elico>
ha thanks
<Elico>
it works
<buzzybron>
but where and how are you stucked?
<buzzybron>
cool
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
dmyers has joined #ruby
shadoi has quit [Ping timeout: 240 seconds]
bamdad has quit [Ping timeout: 255 seconds]
bamdadd has joined #ruby
<Elico>
I will describe the problem: I created a db and a Filter collection. when I insert a domain with level 51 the driver shows the object id for a find but it's not in the DB so I need to turn on a "safe" mode for the insert. I want to force safe on the db\collection\insert.
<joshu>
In the comment this line " log(measure: "db.write") do" shouldn't the "measure:" be quoted as well?
<platzhirsch>
How would you access a nested hash with an array containing the keys?
khushildep has joined #ruby
<Elico>
buzzybron: did you had the chance to understand my problem?
<platzhirsch>
I used accessors.each { |a| hash = hash[a.to_sym] } but this returns the array in the end
<alem0lars>
joshu: it's the key
thebastl has joined #ruby
<alem0lars>
joshu: take a look at the line #3
freerobby has joined #ruby
echevemaster has quit [Quit: Leaving]
<joshu>
alem0lars ok reason I asked is that sublime is giving me a syntax error: unexpected ":"
eka has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
<alem0lars>
joshu: it will check if data (the provided argument) contains a key named measure. if so, it will do the line #4
visualdensity has quit [Ping timeout: 255 seconds]
Domon has quit [Remote host closed the connection]
<alem0lars>
joshu: this is because when u launch sublime text, it would get the environment variables of the callee. The ruby version for the ruby command (/usr/bin/env ruby) is ruby < 1.9 which doesn't have the support for that style of ruby literal hashes
timmow has joined #ruby
cha1tanya has quit [Ping timeout: 252 seconds]
<joshu>
alem0lars oh didn't know this. And this is true despite setting the global ruby version to 2.0.0-p195 using rbenv?
<alem0lars>
joshu: starting from ruby 1.9 you get the new style syntax which is :mykey => value equals to mykey: value
mengu has quit [Quit: Leaving]
icole has joined #ruby
<platzhirsch>
ah inject is a nice way
mklappstuhl has quit [Remote host closed the connection]
<alem0lars>
joshu: I assume that u use rbenv from the terminal. if so, only children from the shell get the environment modified => you should launch sublime text from the shell, just after setting your ruby version using rbenv
freerobby has quit [Ping timeout: 252 seconds]
<joshu>
let me try that now alem0lars
filipe has quit [Ping timeout: 255 seconds]
<alem0lars>
joshu: ok
<nyuszika7h>
is there any difference between these code snippets? both appear to work in 2.0.0: http://pastie.org/8033817
slainer6_ has joined #ruby
punkrawkR has joined #ruby
<joshu>
alem0lars wow no more error. I wasn't aware of this at all! thanks alem0lars!
<alem0lars>
joshu: you are welcome :)
slainer6_ is now known as slainer68_
zomgbie has quit [Read error: Connection reset by peer]
<alem0lars>
nyuszika7h: i think they are equal. I normally use "then" to inline stuff
<nyuszika7h>
ah
icole has quit [Ping timeout: 252 seconds]
redgirl has quit [Quit: This computer has gone to sleep]
burlyscudd has joined #ruby
Zeeraw has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
<alem0lars>
nyuszika7h: for example the "when" can be used with the "then" to get rid of the second line
lyanchih has quit [Quit: lyanchih]
<alem0lars>
nyuszika7h: when "asd" then puts "qwe"
bamdadd has quit [Quit: bamdadd]
<nyuszika7h>
ah ok
goleldar has quit [Read error: Connection reset by peer]
BizarreCake has joined #ruby
GreatSUN has joined #ruby
<GreatSUN>
hi all
browndawg has joined #ruby
burlyscudd has quit [Ping timeout: 240 seconds]
chandankumar has quit [Quit: Leaving]
zomgbie has joined #ruby
filipe has joined #ruby
bamdad has joined #ruby
<GreatSUN>
I have a problem with IO streaming from popen...
<GreatSUN>
My Process requests input which I want to send automatically, but everytime the process requests the input and I am trying to work on the byte where it wants the input, ruby code is going to a waitstate and is no more working.
<GreatSUN>
For Linux all this is possible with PTY and expect or equal
<GreatSUN>
but I have to build some working solution for windows
<alem0lars>
GreatSUN: forget windows. there isn't an implementation of pty compatible with windows. forman devs had the same problem: http://github.com/ddollar/issues/41
shadoi1 has quit [Ping timeout: 240 seconds]
<alem0lars>
GreatSUN: as they say windows hasn't the pseudo terminals
Zeeraw has quit [Quit: Computer has gone to sleep.]
boblu has quit [Remote host closed the connection]
maz-dev has quit [Remote host closed the connection]
r2b2 has joined #ruby
Rix has joined #ruby
therealnoop has quit [Ping timeout: 248 seconds]
brennanMKE has joined #ruby
<GreatSUN>
ar: yes, but then you have to use cygwin
cha1tanya has joined #ruby
<GreatSUN>
alem0lars: I have kind of a pseudo terminal already
<GreatSUN>
the only problem I have is that it either reads line by line or gets stuck when there is an input request
advorak has quit [Quit: Leaving.]
choobie has quit [Ping timeout: 256 seconds]
r2b2 has left #ruby ["WeeChat 0.4.1"]
freerobby has quit [Ping timeout: 248 seconds]
<avril14th>
How does one pass *args from one parameter and yet modify them in between
<avril14th>
this is driving me nuts
advorak has joined #ruby
<avril14th>
like def fuunc1(*args) opts args.extract_options! end
<avril14th>
and then pass opts as an *args to some other func
gstamp has quit [Quit: Computer has gone to sleep.]
ybart_ has joined #ruby
Zeeraw has joined #ruby
brennanMKE has quit [Ping timeout: 256 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
jaalto has joined #ruby
Zeeraw has quit [Client Quit]
prime has quit [Read error: Connection reset by peer]
<jaalto>
Is there a "static syntax check" like "perl -cw file.pl" in ruby?
prime has joined #ruby
cha1tanya has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
tesuki has quit [Remote host closed the connection]
tesuki has joined #ruby
haxrbyte has quit [Remote host closed the connection]
<nyuszika7h>
hi, I've written a bot using TCPSocket, and I'd like to ask whether it's possible for "-eval 'hi'" to output "hi" instead of "No output." ("-eval puts 'hi'" works), and how? code: http://paste.debian.net/9637/
haxrbyte has joined #ruby
<nyuszika7h>
I'm already capturing stdout, but not sure how I could also capture the return value of eval if there is no other output, at least.
amedeiros has quit [Read error: Operation timed out]
rickruby has joined #ruby
Lemtzas_ is now known as Lemtzas
kofno has quit [Remote host closed the connection]
<joshu>
alem0lars ok do you execute your code from within sublime or do you use the terminal.app? Same question regarding GIT, do you do git operations within sublime or again defer those to the terminal?
thebastl has joined #ruby
cha1tanya has joined #ruby
rickruby has quit [Read error: Operation timed out]
amedeiros has joined #ruby
amedeiros has quit [Client Quit]
<alem0lars>
joshu: I personally don't use osx (but gentoo linux) :). I have installed the git plugin for sublime text, but i personally prefer to use git from the command line
<joshu>
alem0lars ok sorry I was assuming Mac..don't know why :P I'll stop bugging you with sublime questions now.
binaryplease has quit [Read error: Operation timed out]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JumpMast3r has quit [Ping timeout: 252 seconds]
cha1tanya has quit [Ping timeout: 252 seconds]
kofno has joined #ruby
HecAtic has quit [Quit: Àá¼ö]
Lemtzas has quit [Ping timeout: 255 seconds]
tvw has quit []
workmad3 has joined #ruby
jphpsf- has quit [Read error: Operation timed out]
jphpsf- has joined #ruby
<advorak>
in Prawn, when using text("this is a test file",size: 32, width: 10, overflow: :shrink_to_fit) ... how can I determine the font size that this command ends up using?
fermion has joined #ruby
RORgasm has joined #ruby
freerobby has joined #ruby
malkomalko has joined #ruby
Lemtzas has joined #ruby
byprdct has joined #ruby
camilasa_ has quit [Remote host closed the connection]
camilasa_ has joined #ruby
jds_ has quit [Remote host closed the connection]
RORgasm has quit [Read error: Operation timed out]
jimg has quit [Remote host closed the connection]
adambeynon has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
burlyscudd has joined #ruby
JumpMast3r has joined #ruby
cha1tanya has joined #ruby
<alem0lars>
joshu: no problem
tesuki has quit [Remote host closed the connection]
<alem0lars>
joshu: you're welcome :)
burlyscudd has quit [Ping timeout: 260 seconds]
BizarreCake has quit [Read error: Connection reset by peer]
cha1tanya has quit [Ping timeout: 246 seconds]
daniel_-_ has quit [Ping timeout: 248 seconds]
timmow has quit [Remote host closed the connection]
akemrir has joined #ruby
Nisstyre has quit [Quit: Leaving]
parus_ is now known as parus
Lemtzas_ has joined #ruby
jimg has joined #ruby
advorak has left #ruby [#ruby]
advorak has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
Lemtzas has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
ToApolytoXaos has joined #ruby
nari__ has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Quit: Leaving...]
alem0lars has quit [Quit: Leaving]
aqil has joined #ruby
kiela has joined #ruby
lyanchih has joined #ruby
lyanchih has quit [Client Quit]
yshh_ has quit [Remote host closed the connection]
camilasa_ has quit [Remote host closed the connection]
redgirl has joined #ruby
camilasa_ has joined #ruby
kiela has quit [Quit: leaving]
cha1tanya has joined #ruby
niceguyjames has joined #ruby
razi has joined #ruby
Kar- has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
camilasa_ has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
cha1tanya has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
anderson has quit [Read error: Connection reset by peer]
anderson has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
platzhirsch has joined #ruby
<platzhirsch>
What do you say? { key => value } or {key => value}
<ghr>
{ key: value }
<joonty>
agreed with ghr, but that's for symbol keys
<platzhirsch>
(not to speak that this is not the first time I get this site linked... *drop*)
<joonty>
the thing I'm trying to decide between is parens around method arguments
Guga_ has joined #ruby
<joonty>
def foo(arg1, arg2)
<joonty>
or def foo arg1, arg2
<platzhirsch>
joonty: I only would leave htem out, if it seems to be a readable phrase
<ghr>
parenthesis always!
<joonty>
platzhirsch: problem with that is consistency though
<ghr>
(for method definitions at least)
buzzybron has quit [Ping timeout: 246 seconds]
<platzhirsch>
Ruby coding is hard
camilasa_ has quit [Remote host closed the connection]
<joonty>
ghr: that's what i do currently, but I've seen quite of bit of no-paren code recently that looks really nice
akemrir has quit [Quit: WeeChat 0.4.1]
<ghr>
I only like it when you've got something like `obj.method :blah`
<ghr>
I prefer `obj.method(var)` over `obj.method var` usually
<joonty>
I used to do a lot of PHP, so I'm reacting against parens atm
<ghr>
Its both nice and problematic that it usually comes down to "good taste"
<joonty>
ghr: yeh, I go for the second :)
machuga|away is now known as machuga
Asher has quit [Read error: Connection reset by peer]
tesuki has joined #ruby
<tobiasvl>
parens for method definitions, but i usually leave them out for calls
<tobiasvl>
both for readability
arvindeep has joined #ruby
apod has joined #ruby
<Deele>
Ruby is such a beautiful tool... The Master says : "As you grow older, you will learn there are many ways to do the right thing." http://rubymonk.com
Asher has joined #ruby
timmow has joined #ruby
cha1tanya has joined #ruby
tesuki has quit [Remote host closed the connection]
tesuki has joined #ruby
bubblehead has joined #ruby
ybart_ is now known as ybart
gstamp has joined #ruby
ntus1017 has quit [Remote host closed the connection]
arya has joined #ruby
cha1tanya has quit [Ping timeout: 246 seconds]
camilasa_ has joined #ruby
tonini has joined #ruby
<nyuszika7h>
I tend to only leave out parenthesis with print/puts and such
<nyuszika7h>
and empty defs
<nyuszika7h>
s/empty/argless/
<nyuszika7h>
and any argless function calls too, of course
niklasb has quit [Ping timeout: 246 seconds]
chase-work has joined #ruby
timmow has quit [Ping timeout: 240 seconds]
lyanchih has joined #ruby
<ghr>
yeah, wouldn't do `def my_method()`
workmad3 has quit [Ping timeout: 256 seconds]
F1skr has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
hogeo has quit [Remote host closed the connection]
<joonty>
let's make a ruby-lisp language
Domon has joined #ruby
<joonty>
(def my_method()
<joonty>
(do something)
<joonty>
end)
davetherat has quit [Remote host closed the connection]
<blz37>
I have to use some crude method because I dont' know much ruby yet.
<blz37>
your comments are suggestions are welcome and coveted.
binaryplease has quit [Ping timeout: 276 seconds]
cha1tanya has joined #ruby
brbcoding has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
<nyuszika7h>
that moment when you realize your code has been failing because you were using `lines { |line| ... }` instead of `lines.each { |line| ... }`
<ghr>
Anyone know of any tutorials / gems for writing interactive CLI applications in Ruby? I want to print a list of items, move a highlight up and down them, hit enter and that item is printed on screen
subbyyy has joined #ruby
atno has quit [Read error: Connection reset by peer]
robustus has joined #ruby
<Zeeraw>
Highline
Domon has joined #ruby
<canton7>
if you're moving a highlight, you'll need something like curses
<canton7>
highline can only modify the last printed line
<Zeeraw>
Oh, I see
atno has joined #ruby
nhhagen has quit [Ping timeout: 245 seconds]
<ghr>
nice, thanks both
nhhagen has joined #ruby
<canton7>
blz37, instead of the until loop and the count variable, use `4.times do |count|`
cha1tanya has quit [Ping timeout: 276 seconds]
tonini has joined #ruby
zomgbie has joined #ruby
<canton7>
blz37, line 19: It's also nice to give a message to the exception you're raising: `raise "Details of what went wrong"`
guiocavalcanti has joined #ruby
jimg has quit [Remote host closed the connection]
<blz37>
canton7, looking.
<canton7>
blz37, also, gets.chomp.strip is redundent - just use gets.strip
<canton7>
also the .chr on line 25 isn't needed
Ortuna has joined #ruby
ldnunes has joined #ruby
jbpros has joined #ruby
subbyyy has quit [Ping timeout: 260 seconds]
<blz37>
canton7, for the exception, I can do "raise Interrupt" ?
<canton7>
line 27: the next isn't needed. line 25 again, you'd normally see string.upcase rather than string.upcase(), even though they're equivalent
tonini has quit [Ping timeout: 248 seconds]
<canton7>
blz37, in this particular case it doesn't matter, since you're rescuing the exception again on line 21 (which in itself is awkward..). You can `raise Interrupt` if you want. I was thinking more of `raise "The track was interrupted". You can then retrieve this message in e on line 21
<canton7>
In this particular case it doesn't matter, but in general it makes it a lot easier for the person who's trying to figure out what they did wrong
delay has joined #ruby
freerobby has joined #ruby
fwaokda has joined #ruby
razi has quit [Quit: Leaving.]
browndawg has joined #ruby
<blz37>
if I do string[0] == 'Y' I get false.
<blz37>
it looks like string[0] converts to ascii number.
<canton7>
string[0].upcase == 'Y' ?
devoldmx has quit [Read error: Connection reset by peer]
<canton7>
ah? ruby 1.8?
<apeiros>
blz37: you're using 1.8
<apeiros>
use string[0,1] == 'Y'
<canton7>
upgrade - 1.8 is ancient
<blz37>
ok.
<apeiros>
also that
devoldmx has joined #ruby
<blz37>
1.9.1, ok ?
hoofed has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
Domon has quit [Remote host closed the connection]
sayan has joined #ruby
<Zeeraw>
Isn't 1.9.1 the shittiest of all the 1.9 versions?
<hoelzro>
I would expect 1.9.0 to be shittier =)
cha1tanya has joined #ruby
ellipse has joined #ruby
<Zeeraw>
I had less issues with 1.9.0 than 1.9.1, either way, you probably should up to 1.9.3
<Zeeraw>
Then the step to 2.0 is pretty small
osvico has joined #ruby
<apeiros>
blz37: no, 1.9.3, better yet 2.0
<blz37>
ok.
<ghr>
canton7 curses looks like exactly what I was after. Thanks :)
<apeiros>
note though that some distros label 1.9.3 as 1.9.1 since it's the same "architecture"
<apeiros>
(or whatever you want to call it)
yashshah has quit [Read error: Operation timed out]
guiocavalcanti has quit [Ping timeout: 240 seconds]
Zeeraw has joined #ruby
Zeeraw has quit [Client Quit]
zomgbie has joined #ruby
ybart has joined #ruby
<gnagno>
can someone please give me some explanation on modules? in my ruby project I made a dir called lib/model which contains the class user in the path lib/methods I created the module Methods::UserMethods, I can't make User include Methods::UserMethods
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as Nuck
jalcine has joined #ruby
rdark has joined #ruby
<MrZYX>
gnagno: try to provide a minimal reproducible example as a gist
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RORgasm has joined #ruby
dr_bob has quit [Ping timeout: 276 seconds]
mark_locklear has joined #ruby
<alem0lars>
gnagno: it seems that you have problems with the loading paths. did u correctly required the modules?
<gnagno>
MrZYX, alem0lars I did like in the gist I pasted... except the fact that the code is in separate files
freerobby has joined #ruby
Guga_ has quit [Remote host closed the connection]
<MrZYX>
so you never required methods/user_methods, how should models/user know about it?
Guga_ has joined #ruby
<gnagno>
I have an initializer class that requires everhing
<gnagno>
*everything
<MrZYX>
then update the gist with that
<alem0lars>
gnagno, MrZYX: and with the stacktrace for the error?
RORgasm has quit [Ping timeout: 252 seconds]
<MrZYX>
^
whowantstolivefo has joined #ruby
<igel_>
%x seems to fork /bin/sh. I'd prefer /bin/bash. Any way to achieve that?
iamjarvo1 has joined #ruby
<gnagno>
I updated the gist
Spami has joined #ruby
nezumi has quit [Read error: Operation timed out]
malkomalko has quit [Remote host closed the connection]
Spami has quit [Changing host]
Spami has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
burlyscudd has joined #ruby
<alem0lars>
gnagno, MrZYX: please also include the stacktrace
<MrZYX>
gnagno: so this doesn't guarantee you that methods/user_methods is required before models/user
<MrZYX>
but instead relies on filesystem order
<MrZYX>
which can be arbitrary
<alem0lars>
gnagno, MrZYX: yeah. there is another problem: you didn't included the paths in your load path (there isn't $:.unshift...)
guiocavalcanti has joined #ruby
<alem0lars>
gnagno, MrZYX: and this usually isn't the preferred way to modularize ruby projects. instead you should create a file with the same name of the directory that has the responsibility to define the basic module and require its files
iamjarvo1 has quit [Quit: Leaving.]
verto has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Ping timeout: 248 seconds]
sayan has quit [Read error: Connection reset by peer]
daniel_-_ has joined #ruby
pen has joined #ruby
<gnagno>
alem0lars, can you please explain me better the last one?
cha1tanya has joined #ruby
geekbri has joined #ruby
<alem0lars>
gnagno: say you want to create some models. you want to write them down into the models folder. It conceptually represents the models module which contains all of the models. A common ruby pattern is to create a models.rb file which defines the Models module and requires the models (the files created inside the "models" folder). Now in your main.rb you just require the file models.rb. This is because now
<alem0lars>
it's models.rb that has the responsibility to correctly make the models available in your application
<alem0lars>
gnagno: but it's just a common pattern, the problem in your code is what MrZYX said and (probably) a missing $:.unshift inside your entry point
statarb3 has quit [Quit: Leaving]
<gnagno>
ok, I got the part about the "loader" for the folder what is unshift?
<MrZYX>
$. is an alias to $LOAD_PATH which is an array of paths in which ruby looks up files if you require
cha1tanya has quit [Ping timeout: 248 seconds]
<gnagno>
ok thanks
yalue has joined #ruby
<MrZYX>
say, you do $LOAD_PATH.unshift("/path/to/your/lib/folder"); you can then just do require 'models/user'
skasio has quit [Quit: leaving]
skasio has joined #ruby
<MrZYX>
eh, $: not $. of course, I have my reason to prefer the longer variant :P
<gnagno>
yes, can be confusing :9
<gnagno>
:)
yashshah has quit [Ping timeout: 260 seconds]
Hanmac has quit [Read error: Operation timed out]
<gnagno>
another question, say that my class receives a string that defines the module I want to include at runtime
<gnagno>
is it possible to make then include the module given a string? include only accepts a module name
karrboloaded has joined #ruby
<MrZYX>
yes, but you do this only upon initialization, not all the time during runtime?
r0bgleeson has quit [Quit: 12]
<MrZYX>
because the later could dramatically slow down your application
skasio has quit [Client Quit]
slainer68 has joined #ruby
r0bgleeson has joined #ruby
<gnagno>
sorry yes
<gnagno>
at initialization
<gnagno>
but include string fails
<MrZYX>
yup, you need to retrieve the constant first
skasio has joined #ruby
cantonic has quit [Quit: cantonic]
<MrZYX>
if you can pass that instead of the string that would be nice, if not, how does your string look like, does it need to support nesting?
<gnagno>
oh yes... I can simply pass the constant name?
skasio has quit [Client Quit]
<MrZYX>
since include is a private method you have to use send: Foo.send(:include, A)
skasio has joined #ruby
Uranio has quit [Remote host closed the connection]
cofin has joined #ruby
<gnagno>
or class << self do include A end to include only for the metaclass of this object
<MrZYX>
but then this sounds a lot like you actually want a base class with common behavior and some subclasses that override some methods for different implementations/backends
DaniG2k has quit [Quit: Leaving.]
slainer68_ has quit [Ping timeout: 256 seconds]
JohnE has joined #ruby
<gnagno>
no, I actually want to initialize objects giving them specific methods
<MrZYX>
still sounds like a job for subclasses
<gnagno>
something like User.new([SuperUser, CanDelete, CanDoSomething]) where the stuff in the array are modules
<alem0lars>
gnagno, MrZYX: yeah. i think you got problems in your classes design. But if you really have to do that, ruby also supports the prototypal inheritance
<gnagno>
uhm... just imagine I have plenty of modules, and I want people to be able to define them on the fly
<gnagno>
I would like to create an authentication system where you can define the stuff people can do in these modules and just pass the modules in the moment you istantiate it
<MrZYX>
gnagno: so you want to extend (method name hint), your new objects. As I said this is very very bad style because it voids rubys method caches and thus slows down your application a lot
<karrboloaded>
because I prefer mine, but I'm assuming there's some reason why it isn't preferred
jbpros has quit [Quit: jbpros]
<canton7>
karrboloaded, I pefer yours too. It's more common to see #inject than #reduce, and line 4 could use `unless` rather than `if !`, but those are minor points
ping_pong is now known as ping-pong
<karrboloaded>
can you explain what inject does? It hasn't actually been explained
<karrboloaded>
it could be they went with that because they haven't mentioned reduce. But it seems like the more obvious way to go
<karrboloaded>
and thank you
gstamp has quit [Quit: Computer has gone to sleep.]
<canton7>
karrboloaded, inject and reduce are aliases. And yeah, it looks like you know more than they'd taught at that point
<MrZYX>
karrboloaded: it's also more common to see inject/reduce with symbols rather than strings
carloslopes has joined #ruby
<MrZYX>
just another minor point
<karrboloaded>
canton7: thanks. so is my reduce just a shorthand for their inject(0)... ? what is the 0?
fixl has joined #ruby
shashank_ has joined #ruby
<karrboloaded>
MrZYX: thanks. ie :+ instead of '+', right?
<canton7>
karrboloaded, no, they're exact aliases. your reduce('+') is the same as inject('+')
<MrZYX>
karrboloaded: exactly
<karrboloaded>
canton7: so what is the 0?
freerobby has joined #ruby
subbyyy has joined #ruby
<alem0lars>
MrZYX: I would think different. Say you want to provide an authentication system and a default implementation. You also want that the users override the default behaviour. You need to define an authentication library with it's authentication API. Then in your application you use the defined API to define a default behaviour and let the user specify their own overrides (by defining their own classes that
<alem0lars>
use your authentication API)
<canton7>
karrboloaded, inject can also take a block. It has the form arr.inject{ |accumulator, array_element| <code that combines accumulator and array_element> }
<canton7>
e.g. arr.inject{ |s,e| s + e }
<MrZYX>
alem0lars: wrong highlight :P
<alem0lars>
MrZYX, gnagno: sry, I would include gnagno
<canton7>
in this form, you can specify the initial value for the accumulator as an argument
<canton7>
so, with arr.inject(1){ |s,e| s * e) }, the first time the block is called, the accumulator has value 1
Fire-Dragon-DoL has joined #ruby
<karrboloaded>
oh, I see. So it's 0 + { #the block }
<ar>
ar.inject? ;)
<gnagno>
alem0lars, so somehow you agree with my (strange) design?
malkomalko has joined #ruby
shashank_ has quit [Remote host closed the connection]
Lennier has joined #ruby
<canton7>
karrboloaded, the first time the block is called, yes. the second time it's <the result from the first call> + { #the block }
<alem0lars>
gnagno: no
tonini has joined #ruby
<gnagno>
alem0lars, :)
<karrboloaded>
canton7: cool. thanks. very helpful. I should probably start looking at the docs from here on :) is there something like python's help() in irb?
cofin has quit [Quit: cofin]
kobain has joined #ruby
Hanmac has joined #ruby
<MrZYX>
gnagno: I'm not sure how your client code looks like with your design, do you have respond_to?'s all over the place or rescue NoMethodError's or...?
<canton7>
karrboloaded, there's ri. it's a command-line tool rather than a ruby method
ravster has joined #ruby
<canton7>
karrboloaded, or there's an alternative to irb called pry (it's far superiour to irb) which has methods for documentation
joonty has quit [Quit: WeeChat 0.3.7]
<karrboloaded>
canton7: thanks again!
<canton7>
karrboloaded, or there's ruby-doc.org, which is good. google for e.g. 'ruby array' and hit the first link
<gnagno>
MrZYX, actually what I want to do in my module is surround the login method with the one defined in the module :)
joonty has joined #ruby
krisfremen has quit [Read error: Operation timed out]
jimg has joined #ruby
<gnagno>
I think if you see the whole code maybe it will be more clear, but now is simply a mess :)
adaoraul has joined #ruby
krawchyk has joined #ruby
sayan has joined #ruby
malkomalko has quit [Remote host closed the connection]
iamjarvo has joined #ruby
nhhagen has quit [Ping timeout: 276 seconds]
fwaokda has quit [Ping timeout: 260 seconds]
<alem0lars>
gnagno: I was talking more like: You provide mechanisms (e.g. like google does) and the users use that mechanisms to implement their login policies. In order to implement their policies they should use your mechanism (=> your authentication system data)
jimg has quit [Ping timeout: 260 seconds]
nhhagen has joined #ruby
gstamp has joined #ruby
logerror has joined #ruby
<MrZYX>
gnagno: you can still do this with subclasses and super. Other approaches might be to do a delegator or a middleware chain
logerror has left #ruby [#ruby]
<gnagno>
ok, I will try to modify it
demet8 has joined #ruby
<MrZYX>
the whole point is to not do this dynamically per object, but predefined so it doesn't void your method caches
dash__ has joined #ruby
ellipse has quit [Read error: Connection reset by peer]
ellipse has joined #ruby
thesheff17 has quit [Ping timeout: 276 seconds]
<gnagno>
ok... I will trow away all my design
iamjarvo has quit [Ping timeout: 252 seconds]
<gnagno>
but it was mostly an experiment, actually I am just doing it only for skilling myself with ruby
companion has quit [Read error: Operation timed out]
companion has joined #ruby
ravster has quit [Read error: Operation timed out]
zaebst has joined #ruby
sailias has joined #ruby
<MrZYX>
that' great :)
<MrZYX>
I totally hit the borders myself already, if you hit stuff like that you wish ruby would call a method to check for the "truthyness" of an object you know you should rethink if saving that two characters when calling your API is really worth it
jerius has joined #ruby
jintux has joined #ruby
<jintux>
hi
jintux has left #ruby [#ruby]
Matip has joined #ruby
prsn has joined #ruby
pipework has joined #ruby
<prsn>
hello! as part of some rails setup, i ran 'rake db:create', which told me I didn't have readline. At its suggestion, i ran 'gem install rb-readline', which seemed to work
<prsn>
however, running db:create again resulted in the same error
<prsn>
and readline features are not available in irb
<prsn>
is there something else i have to do?
Astralum has joined #ruby
<MrZYX>
make sure readline development headers are available and recompile your ruby
<prsn>
MrZYX: what is the purpose of the gem, then?
<MrZYX>
no idea
<prsn>
the error said to do one or the other
yashshah has joined #ruby
anonymuse has joined #ruby
Mattix has quit [Ping timeout: 260 seconds]
<prsn>
and I don't really know how to do the recompile one, or feel like waiting if there's a faster way
failshell has joined #ruby
toddWork_ has joined #ruby
spike|spiegel has quit [Ping timeout: 248 seconds]
chattmatt has joined #ruby
gmci has joined #ruby
gmci has quit [Client Quit]
emergion has joined #ruby
v0n has joined #ruby
breakingthings has joined #ruby
<alem0lars>
prsn: are u using rvm?
Ortuna has quit [Quit: Computer has gone to sleep.]
subbyyy has quit [Ping timeout: 248 seconds]
pitzips has joined #ruby
Dummies_freelanc has joined #ruby
Dummies_freelan1 has joined #ruby
persand has quit [Quit: persand]
tomzx_mac has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
spike|spiegel has joined #ruby
Dummies_freelan1 has quit [Client Quit]
tonini has joined #ruby
mmitchel_ has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
ravster has joined #ruby
karrboloaded has left #ruby [#ruby]
blaxter_ has quit [Read error: Operation timed out]
<gnagno>
is there a callback I can have in a module once it is included in a class?
grawity has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
guiocavalcanti has quit [Ping timeout: 276 seconds]
s2013 has joined #ruby
<grawity>
so I have something like `while buf.empty?; yield buf.shift; end` and I'm sure it could be written in a more canonical way but I can't figure out how
<canton7>
grawity, if that bit of code you pasted is the only bit of code which manipulates buf at that point, just do `buf.each{ |item| yield item }; buf = []`
charliesome_ has joined #ruby
emergion has joined #ruby
<grawity>
thanks, that should work
charliesome_ is now known as charliesome
fuzzyhorns has joined #ruby
<canton7>
Since that's so obvious, and it doesn't have quite the same behaviour (what if the code being yielded to modifies buf?), I assumed there must be extra requirements
<grawity>
nah, I just sometimes forget the obvious way
<canton7>
fair enough
browndawg has joined #ruby
failshell has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
ntus1017 has joined #ruby
choffstein has quit [Remote host closed the connection]
wolcanus has joined #ruby
dcope has joined #ruby
Lubinski has joined #ruby
cofin has joined #ruby
adambeynon has joined #ruby
filipe has quit [Ping timeout: 248 seconds]
wmoxam has joined #ruby
razi has joined #ruby
niftylettuce has quit [Quit: Connection closed for inactivity]
demet8 has quit [Quit: demet8]
gazarsgo has joined #ruby
randomnick has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
phutchins has joined #ruby
purpleidea has quit [Read error: Operation timed out]
pen has quit [Remote host closed the connection]
ellipse has quit [Quit: Bye]
filipe has joined #ruby
<phutchins>
Anyone had problems with Net::ssh.start hanging after looping a bunch of times? I can't seem to figure out why and it hangs indefinitely.
vlad_starkov has joined #ruby
<phutchins>
Is there any need to close connection when doing Net::ssh.start(node, username) do |ssh| then blah = ssh.exec! cmd
cougarten has quit [Ping timeout: 256 seconds]
k610 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
manutter has joined #ruby
purpleidea has joined #ruby
purpleidea has joined #ruby
purpleidea has quit [Changing host]
burlyscudd has quit [Quit: Leaving.]
JohnE has quit [Ping timeout: 255 seconds]
<nyuszika7h>
is there a better way than arr[:key] for getting symbol key values?
sambao21 has quit [Quit: Computer has gone to sleep.]
<nyuszika7h>
apeiros: looks nice
perun0 has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
<nyuszika7h>
other languages' style guides (JavaScript, Python) oppose against that kind of alignment, but I actually think it makes code more readable
<nyuszika7h>
of course, you shouldn't do this:
tesuki has quit [Ping timeout: 252 seconds]
perun0 has joined #ruby
<nyuszika7h>
a_very_long_variable_name = 'asdf'
<nyuszika7h>
i = 'asdf'
<nyuszika7h>
well, one more space
<apeiros>
nyuszika7h: curious - do they give a rationale why they oppose?
sambao21 has joined #ruby
<nyuszika7h>
I think Python's one doesn't, I'll check the JavaScript one if I can still find the link... I found it on Stack Overflow a *long* time ago
dhruvasagar has joined #ruby
<apeiros>
I think you shouldn't bend yourself back over to align - sometimes lengths are just too dissimilar to align, but in most cases I think it's easier on the eye
aqil has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<nyuszika7h>
well, that was easy, googled "JavaScript Garden" and found it
sayan has quit [Read error: Connection reset by peer]
<r0bgleeson>
apeiros: i don't think alignment like that is worth it
vlad_starkov has quit [Remote host closed the connection]
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
<apeiros>
r0bgleeson: then we disagree
<r0bgleeson>
the alignment i choose is whatever my editor decides is right
<r0bgleeson>
(which is emacs)
<r0bgleeson>
i dont like to waste time on things like that
_maes_ has joined #ruby
enebo has joined #ruby
<apeiros>
if you waste time on it, you're doing it wrong :-p
<nyuszika7h>
I think I've read about the alignment somewhere else on SO, it doesn't appear to be in that guide
pskosinski has joined #ruby
<r0bgleeson>
apeiros: people can get quite OCD about that stuff
digitalcake has joined #ruby
<apeiros>
sure. but that applies to everything.
AndChat| has joined #ruby
cougarten has joined #ruby
<apeiros>
also, "16:40 apeiros: I think you shouldn't bend yourself back over to align …"
lkba has quit [Ping timeout: 256 seconds]
k611 has joined #ruby
<yxhuvud>
my problem with it is that sooner or later you will get stupid whitespace commits when the choosen alignment doens't fit anymore
Astralum has quit [Quit: Leaving]
<yxhuvud>
or commits with lots and lots of changes for a small change.
<r0bgleeson>
someone write gofmt for ruby and this problem will be no more!
lyanchih has joined #ruby
<apeiros>
yxhuvud: agree, but I think a decent diff tool should be able to hide whitespace-only changes. afaik git diff can e.g.
hoofed has joined #ruby
adac has joined #ruby
gstamp has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
<adac>
the google places api delivers me the time as a number: ie: 1367142678 can anyone tell me how to transform this into a format like this: 2013-06-11 13:51:08.618028
<nyuszika7h>
is there a better way to do this? f(arr[:x], arr[:y], arr[:z])
<apeiros>
nyuszika7h: also, this is a hash, not an array :-p
RORgasm has joined #ruby
<yxhuvud>
adac: 1: Time.at(1367142678).strformat. RTFM for the format string parameters. 2: you will never get nanoseconds out of that string, since it is measured in whole seconds. (sure, you could fill with 0s, but..)
<nyuszika7h>
yes, hash
<nyuszika7h>
lol
ner0x has joined #ruby
<adac>
yxhuvud, I see. Well nanoseconds is not important in this case :)
<nyuszika7h>
should I use fail or raise here? `if host.nil? then ... 'no host specified' end`
<joshu>
I'm restricted to using ruby standard library only and one source file for my current project. I will be using net/http a fair amount and as I learn about making my requests as robust as possible I came across this gem
<ChristianS>
nyuszika7h: fail and raise are synonyms iirc, use whichever you like
<nyuszika7h>
oh, synonyms?
<nyuszika7h>
I see
wesside_ has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
<joshu>
now I cannot use the gem as is, but I guess I can copy the code and place it at the top of my source file. Is this ok? Also learning about modules would it make sense to put all that code in a module as a way of bundling that code in a namespace?
aganov has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
djbkd has joined #ruby
alex__c2022 has joined #ruby
futilegames has joined #ruby
flyingcork has joined #ruby
tbrock_ has quit [Quit: Computer has gone to sleep.]
<flyingcork>
hello, I've just installed RoR and I typed rails new myproject at a directory where I have write access in ssh...it says create a bunch of stuff but nothing appears
acrussell has joined #ruby
<MrZYX>
flyingcork: #rubyonrails
burlyscudd has quit [Quit: Leaving.]
interactionjaxsn has quit [Read error: Connection reset by peer]
interact_ has joined #ruby
acrussell has left #ruby [#ruby]
srji has quit [Quit: leaving]
Edder has quit [Quit: Cya..]
_ffio_ has joined #ruby
ffio_ has quit [Ping timeout: 252 seconds]
cofin has joined #ruby
jprovazn has quit [Quit: Leaving]
Nimsical has quit [Quit: Computer has gone to sleep.]
interact_ is now known as interactionjaxsn
tbrock_ has joined #ruby
Lennier has quit [Ping timeout: 256 seconds]
kiri has quit [Read error: Operation timed out]
Lennier has joined #ruby
kiri has joined #ruby
dmerrick has joined #ruby
burlyscudd has joined #ruby
b0oh has joined #ruby
b0oh has left #ruby [#ruby]
adkron has joined #ruby
carlyle has joined #ruby
lethjakman has joined #ruby
nari__ has quit [Read error: Connection reset by peer]
wsterling has quit [Read error: Connection reset by peer]
bigoldrock has quit [Ping timeout: 246 seconds]
wsterling has joined #ruby
<kleinerdrache>
hoelzro, thanks, works. but is there also a short for for 'if defined? myvar and myvar' ?
Rizzle has joined #ruby
chrishough has joined #ruby
<hoelzro>
kleinerdrache: would you mind posted the method in its entireity?
<hoelzro>
*posting
<hoelzro>
if we knew exactly what you'd like to accomplish, it would
<hoelzro>
make it easier to help!
danshultz has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
F1skr has quit [Quit: WeeChat 0.4.1]
moshee has joined #ruby
stkowski has quit [Quit: stkowski]
JumpMast3r has quit [Quit: JumpMast3r]
z has quit [Remote host closed the connection]
tjbiddle_ has joined #ruby
z has joined #ruby
geggam has joined #ruby
<kleinerdrache>
hoelzro, ok, i try 2 versions of templates for 'articles'. so i can now render with render @articles, {:short => true} or just render @article or if I don't set the local :short to true it should view the whole article, otherwise just the first x chars - it works now, using if defined? short and short
z is now known as Guest82045
<kleinerdrache>
just asking for a better understanding of ruby and rails
<hoelzro>
why not set :short => false in the other case?
<hoelzro>
(disclaimer: I have never worked with Rails)
wsterling has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
tjbiddle has quit [Ping timeout: 276 seconds]
tjbiddle_ is now known as tjbiddle
jinie is now known as jinie_
GreatSUN has quit [Ping timeout: 250 seconds]
bfitzh2o has quit [Ping timeout: 250 seconds]
Guest82045 has quit [Changing host]
Guest82045 has joined #ruby
Guest82045 is now known as z
moos3 has joined #ruby
<kleinerdrache>
hoelzro, just for not to forget if i use it elsewhere...
<hoelzro>
I see
rabidpraxis has joined #ruby
<hoelzro>
why not do short = false unless defined? short
schaerli has quit [Remote host closed the connection]
<hoelzro>
at the top
<kleinerdrache>
hoelzro, i just use it in that one test, so that should be enaugh for now. but you are right, that would be better readable
oddalot-linux has joined #ruby
ttt has joined #ruby
Nimsical has joined #ruby
<oddalot-linux>
i just learned about blocks last night.
freerobby has joined #ruby
<oddalot-linux>
they are a slightly weird concept
<kleinerdrache>
can i tell "link_to @article" just to print out the text if the user is allready at the @article page? like link_to @article unless article_url == request.env['REQUEST_URI']
a_a_g has quit [Quit: This computer has gone to sleep]
<hoelzro>
kleinerdrache: that might be a better question for #rubyonrails
<hoelzro>
oddalot-linux: aren't they great? ;)
<oddalot-linux>
well, i was having a hard time understanding what 'yield' did at first
<kleinerdrache>
hoelzro, ok, thanks, I thought i was there
<hoelzro>
np =)
<hoelzro>
oddalot-linux: just think of a block as a sort of coroutine
<oddalot-linux>
but now I get it, it's really just like calling a function..but the function is the block
classix has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
<hoelzro>
pretty much
<oddalot-linux>
so yield is an anonymous function, defined by the block
danshultz has quit [Read error: Connection reset by peer]
burlyscudd has quit [Quit: Leaving.]
schaerli has joined #ruby
<oddalot-linux>
begs the question though, why wouldn't you just use a regular function?
<canton7>
oddalot-linux, wel, yield *calls* the anonymous function, defined by the block
danshultz has joined #ruby
wolcanus has joined #ruby
classix has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
<oddalot-linux>
err...method...
eldariof has joined #ruby
<oddalot-linux>
yes...calls...or "executes" as I hear them say
<hoelzro>
you mean raises the question?
carloslopes has quit [Remote host closed the connection]
<canton7>
oddalot-linux, because saying "my_array.each{ |i| p i }" is an awful lot easier than saying "def my_method(i); p i; end; my_array.each(my_method)"
zaebst has left #ruby [#ruby]
* hoelzro
is a stickler about "begs the question"
<oddalot-linux>
well, yes, that's only because in that case they wrote the each method already
<kenichi_>
canton7: can you do that?
<canton7>
hmm? I'm missing your point.
<kenichi_>
wouldn't my_method have to return a proc?
<canton7>
kenichi_, not that exactly. Call is pseudo-ruby
<canton7>
s/is/it
<kenichi_>
heh
Heskie has quit []
moos3 has quit [Remote host closed the connection]
moos3 has joined #ruby
withnale- has quit [Read error: Operation timed out]
<oddalot-linux>
well, i just found out I got accepted to a coding school in San Fran...so I'm super excited.
browndawg has quit [Quit: Leaving.]
<oddalot-linux>
going to get to study ruby a lot now ;)
Trynemjoel has joined #ruby
mocfive has quit [Remote host closed the connection]
paissad has quit [Read error: Operation timed out]
kenichi_ is now known as kenichi
mafolz has quit [Ping timeout: 252 seconds]
<oddalot-linux>
don't know if 10 years of bad coding habits can be changed though :)
<canton7>
oddalot-linux, what exactly do you mean by "that's only because in that case they wrote the each method already"
<zomg>
oddalot-linux: I wrote PHP for longer than that. I'm still perfectly capable of writing reasonable code ;>
mocfive has joined #ruby
fermion has quit [Ping timeout: 255 seconds]
adaoraul_ has joined #ruby
<oddalot-linux>
zomg: haha, well i don't feel as bad about not knowing php then I guess ;)
<zomg>
hehe
x1337807x has joined #ruby
<zomg>
tbh it's not that bad when you know the ins and outs, but people generally like to talk shit about it =)
<oddalot-linux>
well...blocks make iterating easier, isn't that why they exist?
<oddalot-linux>
is there a preference between map and collect in the ruby world?
yxhuvud has quit [Ping timeout: 264 seconds]
chorkpop has quit [Quit: Leaving]
cofin has quit [Quit: cofin]
<canton7>
oddalot-linux, #map is preferred
<Dwarf>
Afternoon. I seem to have a little problem with rails. I have created a new project and I have created a new controller, but it's not loading the view associated with it
chorkpop has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
<part__>
kenichi: thank you :)
<kenichi>
part__: something like that :)
cofin has joined #ruby
freerobby has quit [Quit: Leaving.]
<MrZYX>
kenichi: ther's #chars
<part__>
maybe the problem is the format with \x
k610 has joined #ruby
<part__>
I need to get it in that way, I'm playing with pack but I don't get that :(
ArchBeOS has quit [Ping timeout: 256 seconds]
eurek_ has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
awwaiid_ has quit [Ping timeout: 245 seconds]
a_a_g has joined #ruby
awwaiid has joined #ruby
Apane has joined #ruby
Es0teric has joined #ruby
tesuki_ has quit [Ping timeout: 255 seconds]
ivanoats has joined #ruby
<advorak>
I'm trying to use prawn's grid function to customize the thickness of border for each side, but I am having trouble finding an option in the grid feature to help me do this .. https://gist.github.com/advorak/5758128
k611 has quit [Ping timeout: 260 seconds]
cowgarden has joined #ruby
<advorak>
I've figured out how to do it using tables, but I would love to do it with the grd...
chorkpop has joined #ruby
jlast_ has joined #ruby
jlast has quit [Read error: Connection reset by peer]
guiocavalcanti has quit [Ping timeout: 276 seconds]
mmlac-bv has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
pcarrier_ has quit [Quit: Computer has gone to sleep.]
MistuhKurtz has joined #ruby
yshh has quit [Remote host closed the connection]
<kleinerdrache>
Morrolan, thanks, thats great
<Morrolan>
kleinerdrache: :)
burlyscudd has quit [Ping timeout: 248 seconds]
<Morrolan>
If the two arrays do not have the same amount of items, those excess items will not be included in the final array, by the way. Not sure if that matters to you.
johnrlive has quit [Remote host closed the connection]
<Cork>
what would be the best way to handle structured files in ruby? (i've been looking at pack/unpack but it has poor support for dividers)
dhruvasagar has joined #ruby
dr_bob1 has quit [Quit: Leaving.]
<Morrolan>
Actually, whether those excess items will get stripped, or whether they'll be paired with 'nil' values, depends on which array you call .zip on, it seems. :)
mahmoudimus has joined #ruby
DrShoggoth has quit [Quit: Leaving]
eklarskov has quit [Quit: leaving]
milardovich has joined #ruby
vlad_starkov has joined #ruby
burlyscudd has joined #ruby
Gugster has joined #ruby
Guga_ has quit [Disconnected by services]
codesoda has joined #ruby
elaptics is now known as elaptics`away
hhtp has joined #ruby
jtharris has joined #ruby
hhtp has quit [Client Quit]
failshell has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
chipotle has joined #ruby
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
cofin has quit [Quit: cofin]
wesside_ has quit [Quit: Computer has gone to sleep.]
failshell has joined #ruby
rupee has joined #ruby
burlyscudd has quit [Ping timeout: 252 seconds]
marr has joined #ruby
hhtp has joined #ruby
sambao21 has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
griffindy has joined #ruby
axl_ has joined #ruby
sambao21 has quit [Client Quit]
cofin has joined #ruby
johnrlive has joined #ruby
asteve has joined #ruby
vigintas has quit [Quit: Leaving]
pootler_ has quit [Ping timeout: 240 seconds]
redgirl has quit [Ping timeout: 255 seconds]
dangerousdave has joined #ruby
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
m8 has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
demet8 has quit [Quit: demet8]
verto has joined #ruby
anonymuse has joined #ruby
toddWork_ has joined #ruby
sambao21 has joined #ruby
DestinyAwaits has quit [Quit: Leaving]
thesheff17 has quit [Ping timeout: 256 seconds]
delay has joined #ruby
pcarrier_ has joined #ruby
apeiros has joined #ruby
Al__ has quit [Quit: Al__]
buibex has joined #ruby
slainer6_ has quit [Remote host closed the connection]
k610 has joined #ruby
xargoon has quit [Ping timeout: 248 seconds]
c0rn has joined #ruby
emmanuelux has joined #ruby
dhruvasagar has joined #ruby
tjbiddle has quit [Ping timeout: 260 seconds]
DrShoggoth has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
pcarrier_ has quit [Client Quit]
jrajav has joined #ruby
zz_pinage404 is now known as pinage404
Al__ has joined #ruby
DanKnox_away is now known as DanKnox
tommyvyo has joined #ruby
xargoon has joined #ruby
razi has quit [Quit: Leaving.]
Spami has quit [Quit: This computer has gone to sleep]
ewag has joined #ruby
timmow has quit [Ping timeout: 240 seconds]
pcarrier_ has joined #ruby
m8 has joined #ruby
Zai00 has quit [Quit: Zai00]
sayan has quit [Ping timeout: 252 seconds]
chrishough has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
rads has joined #ruby
echevemaster has joined #ruby
chrishough has joined #ruby
<heftig>
Cork: structured how? dividers?
tylersmith has joined #ruby
<Cork>
this case i'm looking for having an array with one int and two strings; the string should be tab divided
apod has quit [Quit: apod]
adambeynon has quit [Quit: Computer has gone to sleep.]
<Cork>
or if you prefer tab should mark the end of the string
<Cork>
newline should be a new array
Xeago has joined #ruby
Coolhand_ has joined #ruby
<MrZYX>
how is the int and the string separated?
Xeago is now known as Guest27522
<Cork>
by size of the int
Guest27522 is now known as Xeago_
<Cork>
i'm been playing with something like pack('SMM')
<Cork>
but can't seam to find the correct combination
kidoz has joined #ruby
persand has joined #ruby
<heftig>
Cork: can't you use two null-terminated strings instead?
Coolhand has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
<Cork>
null would mark the end of the file wouldn't it?
persand has quit [Client Quit]
<heftig>
no, why?
SDr_ is now known as SDr
SDr has quit [Changing host]
SDr has joined #ruby
<Cork>
hmm, what does ruby use for EOL then?
Al__ has quit [Quit: Al__]
<MrZYX>
hm, do you have some example data?
<Cork>
uh sorry EOF
Coolhand has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Cork>
no, not generated data, just structure
<Cork>
uint_16|string<tab>|string\n
mikepack has quit [Remote host closed the connection]
devyn has quit [Read error: Connection reset by peer]
milardovich has quit [Quit: Leaving]
Coolhand_ has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
pothibo has quit [Quit: pothibo]
burlyscudd has joined #ruby
<Cork>
might just use join("\t") and pack('SM')
zodiak has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
<Cork>
seams like the simplest solution
<heftig>
maybe something like File.open("Foo") { |f| a = []; until f.eof?; a << (f.read(2).unpack("S<") + f.readline.split("\t")); end; a }
mikepack has joined #ruby
rsahae_ has joined #ruby
mark_locklear has joined #ruby
Xeago_ has left #ruby [#ruby]
<Cork>
hmm ya that would work too
cads has joined #ruby
<Cork>
heftig: thx, i'll try that
moted has joined #ruby
<heftig>
hmm, make f.readline.chomp.split("\t") to get rid of the \n
m8 has quit [Ping timeout: 276 seconds]
* Cork
nods
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
luckyruby has joined #ruby
devyn has joined #ruby
casheew_ has quit [Read error: Connection reset by peer]
casheew has joined #ruby
sailias has quit [Ping timeout: 255 seconds]
burlyscudd has quit [Ping timeout: 255 seconds]
casheew has quit [Read error: Connection reset by peer]
m8 has joined #ruby
burlyscudd has joined #ruby
carlyle has quit [Remote host closed the connection]
niceguyjames has joined #ruby
ryan_turner is now known as ryan_turner_
sailias has joined #ruby
burlyscudd has quit [Client Quit]
atmosx has joined #ruby
burlyscudd has joined #ruby
arietis has joined #ruby
casheew has joined #ruby
northelks_ has joined #ruby
<apeiros>
why that a << construct instead of map on an enumerator?
jdunck has joined #ruby
<apeiros>
@ Cork / heftig
<heftig>
apeiros: tried that before, but the setup is difficult
<heftig>
need to do a 2-byte read and then a readline
ttt has joined #ruby
rsty has joined #ruby
<rsty>
For some reason, my ruby-based web server won't show up in an HTML iframe. Any ideas?
agjacome has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
<rsty>
I didn't think HTML iframes were dependent upon anything but idk
norm has joined #ruby
<apeiros>
heftig: no need to read that :)
<Cork>
rsty: iframes makes little difference unless you actively check for it
norm has left #ruby [#ruby]
burlyscudd has quit [Ping timeout: 276 seconds]
<rsty>
what do you mean by actively check it?
devoldmx has quit [Ping timeout: 240 seconds]
<apeiros>
Cork: is it fine to read the whole file at once?
<apeiros>
or do you need to stream?
mikepack has quit [Remote host closed the connection]
breakingthings has quit [Ping timeout: 260 seconds]
jacobw has joined #ruby
<Cork>
apeiros: i need to generate a two dimensional array so ya, all at once is fine
codesoda has quit [Remote host closed the connection]
<Cork>
ok... i will have to try to parse that line :D
<Cork>
ah
<apeiros>
might need an `encoding: 'binary'` in File.read
breakingthings has joined #ruby
Guga_ has joined #ruby
<Cork>
that's neat
Gugster has quit [Ping timeout: 246 seconds]
<apeiros>
you could probably drop the (?:\n|\z) in the regex
ttt has quit [Ping timeout: 252 seconds]
LennyLinux has quit [Remote host closed the connection]
<apeiros>
oooh, that regex is actually broken
<apeiros>
. does not match \n by default
saarinen has joined #ruby
<apeiros>
and since you have binary data… ^([\x00-\xff]{2})
harrymoreno has joined #ruby
choobie has quit [Read error: Operation timed out]
<canton7>
(/.../m to make . match newline)
adambeynon has joined #ruby
<apeiros>
canton7: yes, then you need to change the (.*) part ;-)
<canton7>
yeah, I was just throwing it in there
Kabaka has quit [Quit: s/Kabaka//]
pootler_ has joined #ruby
Zespre has quit [Quit: leaving]
failshell has quit [Remote host closed the connection]
Kabaka has joined #ruby
Zespre has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
ryan_turner_ is now known as ryan_turner
forrest has joined #ruby
icole has joined #ruby
brian_petersen has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
<brian_petersen>
I am using parallel to get some multitaksing to scrape data from a website and I am trying to store the results in a sqlite3 database. This works fine but the program errors out saying that the database file is locked up (from an insert from another thread). How would solve this problem? I thought about adding the sql inserts into a que and executed in order, but I haven't found a way to do this in ruby yet.
daniel_-_ has joined #ruby
JumpMast3r has joined #ruby
<rsty>
Cork: Found it... There is a "allow_iframe" option in the Kibana config
Hanmac has quit [Ping timeout: 256 seconds]
mosheee has quit [Ping timeout: 276 seconds]
pootler_ has quit [Ping timeout: 252 seconds]
<apeiros>
brian_petersen: ri Queue
jtharris has joined #ruby
pootler_ has joined #ruby
cpruitt has joined #ruby
burlyscudd has joined #ruby
kwatz has joined #ruby
kwatz is now known as destructure
destructure has quit [Changing host]
destructure has joined #ruby
<Cork>
apeiros: went with .scan(/^(..)([^\t\n]*)(.*)$/).map {|int, str1, str2| [int.unpack("S<").first, str1, str2] }
mityaz has joined #ruby
vlad_starkov has joined #ruby
cofin has quit [Quit: cofin]
workmad3 has quit [Ping timeout: 255 seconds]
devoldmx has joined #ruby
sailias has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
<brian_petersen>
apeiros, perfect. thanks
sepp2k has joined #ruby
yshh has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
vlad_sta_ has joined #ruby
<apeiros>
Cork: that'll fail on integers which contain \n (since the (..) will not match that)
<Cork>
ouch, didn't think of that...
<apeiros>
/^(..)([^\t\n]*)([^\n]*)$/m
byprdct has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
browndawg has quit [Quit: Leaving.]
<apeiros>
or /^([\x00-\xff]{2})([^\t\n]*)(.*)$/
<Cork>
prefer that later
rads has quit [Quit: rads]
jbpros has joined #ruby
<apeiros>
oh, man, I should not be allowed to code while hungry
<apeiros>
forgot the //n the whole time
<apeiros>
--> /^([\x00-\xff]{2})([^\t\n]*)(.*)$/n
futilegames has quit [Quit: futilegames]
<apeiros>
there, I hope that's the last mistake :D
darkc0met has quit [Ping timeout: 245 seconds]
* apeiros
would like String#to_i to accept a symbol like :u_int8, :int32be
codesoda has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
yshh has quit [Ping timeout: 252 seconds]
futilegames has joined #ruby
cofin has joined #ruby
thesheff17 has joined #ruby
AlbireoX has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
schaerli has joined #ruby
m8 has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
scottmey has joined #ruby
phasma has joined #ruby
ntus1017 has quit [Remote host closed the connection]
boblu has joined #ruby
chipotle has quit [Quit: cya]
binaryplease has quit [Read error: Operation timed out]
wesside_ has joined #ruby
Aaaarg has quit [Quit: Aaaarg]
PhatBaja has joined #ruby
redgirl has joined #ruby
redgirl has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Remote host closed the connection]
Speed has joined #ruby
interactionjaxsn has joined #ruby
workmad3 has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
BrianJ has joined #ruby
x1337807x has joined #ruby
ddfreyne has quit [Excess Flood]
tommyvyo has quit [Quit:]
kapowaz has joined #ruby
ddfreyne has joined #ruby
sambao21 has joined #ruby
moted has quit [Ping timeout: 240 seconds]
PhatBaja has quit [Quit: Leaving.]
cha1tanya has quit [Ping timeout: 256 seconds]
dangerousdave has quit [Quit: Leaving...]
PhatBaja has joined #ruby
dankest has joined #ruby
alvaro_o has joined #ruby
interactionjaxsn has quit [Ping timeout: 255 seconds]
pskosinski has quit [Remote host closed the connection]
<BrianJ>
How would i go about not having the \ escaped in this string? "#{node[pkg]['home']}\bin"
terrellt has joined #ruby
<apeiros>
what?
guilleiguaran__ has joined #ruby
<workmad3>
BrianJ: \\
<canton7>
single-quote the string, or backslash the backslash
khushildep has quit [Ping timeout: 256 seconds]
<BrianJ>
when it gets evaluated the \ between #{node[pkg]['home']} and bin gets escaped
sailias has joined #ruby
<apeiros>
workmad3: that's escaped, not "not escaped"…
<canton7>
but if you're making paths, use File.join(node[pkg]['home'], 'bin')
<apeiros>
BrianJ: do you want "\b" == "\x08"?
freezey has joined #ruby
<BrianJ>
canton: thats my goal
<BrianJ>
I'll do that. thanks
<apeiros>
or do you want "\\b" == "\x5cb" (a single backslash followed by b)
<BrianJ>
(a single backslash followed by b)
tkuchiki has quit [Remote host closed the connection]
jasonkuhrt has joined #ruby
<apeiros>
then your initial question was wrong :-p
brian_petersen has quit [Remote host closed the connection]
<apeiros>
you want to escape the \, and workmad3's answer: "\\b"
devoldmx has quit [Read error: Connection reset by peer]
<BrianJ>
ah
browndawg has joined #ruby
<BrianJ>
my brain has stopped working -.-
devoldmx has joined #ruby
<BrianJ>
thanks
nomenkun has joined #ruby
bubblehead has quit [Read error: Connection reset by peer]
gstamp has quit [Quit: Computer has gone to sleep.]
bubblehead has joined #ruby
gstamp has joined #ruby
BarneyRubble has joined #ruby
interactionjaxsn has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<asteve>
is anywhere here familiar with god, rvm and bundler? I'm trying to get god to launch a rake task within the context of my rvm gemset
<apeiros>
asteve: you want to create a wrapper
jbpros has quit [Quit: jbpros]
<apeiros>
google rvm wrapper
sterNiX has quit [Ping timeout: 276 seconds]
<BrianJ>
hm File.join makes the \ a /
<BrianJ>
why must windows fuck everything up :(
jbpros has joined #ruby
<MrZYX>
doesn't ruby transparently handle that?
darkc0met has joined #ruby
phipes has joined #ruby
<apeiros>
the apis ruby use are fine with /
<apeiros>
only lower level win apis want \
<BrianJ>
ya i feel like thats going to cause issues
schaerli has joined #ruby
<BrianJ>
:/
<asteve>
apeiros: hmm, that's actually not the problem I have; my resque proceses are failing to start, I believe it's because they're not operating under the right gemset
<BrianJ>
<< not a windows person, so I'm making a guess
<asteve>
god starts, but god's start processes fail to start
kirun has joined #ruby
<apeiros>
asteve: that's pretty much the definition of that problem :-p
AlbireoX has joined #ruby
<asteve>
hmm
greenarrow has quit [Quit: Leaving]
stkowski has quit [Quit: stkowski]
greenarrow has joined #ruby
splittingred has quit [Read error: Operation timed out]
moted has joined #ruby
splittingred has joined #ruby
germanstudent has joined #ruby
rsty has left #ruby [#ruby]
m8 has joined #ruby
<asteve>
hmm, god is only installed in the bundle
harrymoreno has quit [Ping timeout: 248 seconds]
davetherat has quit [Read error: Connection reset by peer]
davetherat has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
buibex has quit [Remote host closed the connection]
kleinerdrache has quit [Quit: Ex-Chat]
BarnacleBob has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Dummies_freelanc has quit [Ping timeout: 256 seconds]
CaptainKnots has quit [Quit: bazinga!]
moted has quit [Quit: moted]
bionhart has quit [Remote host closed the connection]
BarneyRubble has quit [Quit: Leaving]
axl_ has quit [Quit: axl_]
moted has joined #ruby
yxhuvud2 is now known as yxhuvud
jkline has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
mljsimone is now known as mljsimone|away
apod has quit [Quit: apod]
a_a_g has joined #ruby
apeiros has quit [Remote host closed the connection]
benweint has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Quit: Computer has gone to sleep.]
Domon has joined #ruby
jamesaxl has joined #ruby
rsahae_ has quit [Quit: rsahae_]
benweint has joined #ruby
a_a_g has quit [Client Quit]
Spami has quit [Ping timeout: 240 seconds]
moted has quit [Ping timeout: 246 seconds]
jkline has quit [Ping timeout: 276 seconds]
ivanoats has quit [Remote host closed the connection]
arietis has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
jonathanwallace has joined #ruby
brennanMKE has joined #ruby
Domon has quit [Ping timeout: 248 seconds]
jastix has quit [Quit: Leaving]
brennanMKE has quit [Read error: No route to host]
atmosx has quit [Quit: And so the story goes…]
sandGorgon has joined #ruby
brennanMKE has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
zomgbie has quit [Ping timeout: 252 seconds]
cantonic has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jkline has joined #ruby
zeade has joined #ruby
<kx>
I'm having trouble with (thousands of concurrent) tcp connections. I'm having connection timeouts, so I have to reconnect quite often. Can I call initialize on my client object in order to make it re-initialize?
dankest has quit [Read error: Connection reset by peer]
m8 has quit [Quit: Sto andando via]
stkowski has joined #ruby
Dummies_freelanc has joined #ruby
saarinen has quit [Quit: saarinen]
jbpros_ has joined #ruby
Dan_ has joined #ruby
Dan_ is now known as Guest69827
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jbpros has quit [Ping timeout: 246 seconds]
jbpros_ is now known as jbpros
browndawg has quit [Quit: Leaving.]
saarinen has joined #ruby
postmodern has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
freezey has quit [Remote host closed the connection]
vitorave` has joined #ruby
theRoUS has quit [Read error: Operation timed out]
vitorave` is now known as vitoravelino_
axl_ has joined #ruby
staafl has quit [Ping timeout: 276 seconds]
tommyvyo has joined #ruby
guiocava_ has joined #ruby
txdv has joined #ruby
Dummies_freelanc has quit [Remote host closed the connection]
rsahae_ has joined #ruby
advorak has left #ruby [#ruby]
advorak has joined #ruby
Dummies_freelanc has joined #ruby
JohnE2 has joined #ruby
ttt has joined #ruby
guiocavalcanti has quit [Ping timeout: 252 seconds]
<advorak>
I'm trying to use prawn's grid function to customize the thickness of border for each side, but I am having trouble finding an option in the grid feature to help me do this .. https://gist.github.com/advorak/5758128
<advorak>
I've figured out how to do it using tables, but I would love to do it with the grd...
bionhart has joined #ruby
mmlac-bv has joined #ruby
bubblehead has quit [Read error: Connection reset by peer]
bubblehead has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
c0rn has joined #ruby
<anonymuse>
should i be installing ruby on a production machine with RVM, or by itself?
<wmoxam>
anonymuse: depends
ttt has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Remote host closed the connection]
<anonymuse>
i don't need to be changing version numbers
<anonymuse>
we'd spin up a new server if we needed a new V. of ruby
<wmoxam>
anonymuse: I think you've answered your question then ;)
tonini has joined #ruby
Zai00 has joined #ruby
<anonymuse>
i'm getting an error when installing compass, however
<anonymuse>
that looks familiar to what RVM's system doctor asks for
<anonymuse>
wmoxam: thank you
<anonymuse>
wmoxam: i think I may try and install those packages
devoldmx has joined #ruby
<wmoxam>
anonymuse: basically we use Chef to configure new server instances, so to speed things up we build some packages (as the Chef Ruby recipies generally try to compile recent version of Ruby)
tonini has quit [Client Quit]
ryan_turner is now known as ryan_turner_
ivanoats has joined #ruby
tonini has joined #ruby
<anonymuse>
wmoxam: we're just starting to use puppet, so i imagine we'll run into similar issues
viszu has joined #ruby
<anonymuse>
wmoxam: i haven't ever built an RPM before but I'm often looking for packages so it's something i should definitely tackle.
<wmoxam>
anonymuse: it's not too difficult
<wmoxam>
anonymuse: the syntax is a little weird at first though
burlyscudd has quit [Quit: Leaving.]
* wuest
is not a huge fan of rpm. Much prefers .deb, .pkg
zmike123 has quit [Quit: Выходжу]
benweint has quit [Client Quit]
<anonymuse>
wuest: which one of those is centos?
bakingbread has quit [Ping timeout: 240 seconds]
<wmoxam>
wuest: why?
<spider-mario>
I love how easy it is to create packages for Arch Linux
kidoz has quit [Read error: Operation timed out]
<wmoxam>
spider-mario: I don't find it much easier to be honest :p
Speed has left #ruby ["WeeChat 0.4.1"]
<spider-mario>
well, cp /usr/share/pacman/PKGBUILD.proto PKGBUILD, then fill in the blanks
* wmoxam
has written packages for RPM, OpenBSD ports, Arch, Homebrew & Macports
<spider-mario>
and makepkg now supports VCS URIs for sources
<wmoxam>
IMO OpenBSD's is the cleanest
<wmoxam>
maybe it's just that it's well documented
pootler_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
g0bl1n has quit [Ping timeout: 256 seconds]
machuga is now known as machuga|away
mansi has joined #ruby
vitoravelino_ has left #ruby ["Leaving..."]
hadees has joined #ruby
Dummies_freelanc has left #ruby [#ruby]
axl_ has quit [Quit: axl_]
stkowski has quit [Quit: stkowski]
tonini has quit [Quit: Lost terminal]
tonini has joined #ruby
vwoo has joined #ruby
kofno has quit [Remote host closed the connection]
wolcanus has quit [Remote host closed the connection]
GreatSUN_ is now known as GreatSUN
Rizzle has quit [Read error: Connection reset by peer]
<anonymuse>
wmoxam: it seems like i'd be better off using rbenv to install ruby
<wuest>
anonymuse: Sorry for injecting my opinion there. Obviously you are going to have to play with rpm on CentOS.
Guest69827 has quit [Read error: Connection reset by peer]
advorak has left #ruby [#ruby]
dankest has joined #ruby
<wuest>
wmoxam: It's an artifact of the build system/process. I've had a much easier time working with debian packages, and with Arch's packaging system 's all.
<wuest>
And yes, I love working with OpenBSD Ports/Packages.
g0bl1n has joined #ruby
c0rn has quit [Ping timeout: 248 seconds]
stkowski has joined #ruby
synthetix has joined #ruby
Rizzle has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
c0rn has joined #ruby
Hanmac has joined #ruby
tonini has quit [Quit: Lost terminal]
dankest has quit [Ping timeout: 248 seconds]
tonini has joined #ruby
tonini has quit [Client Quit]
dsauced has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
moted has joined #ruby
tonini has joined #ruby
machuga|away is now known as machuga
devoldmx has quit [Ping timeout: 246 seconds]
<Hanmac>
hy what is the best way to block Objects from an given class from coping and marshaling?
staafl has joined #ruby
<workmad3>
Hanmac: undefine the relevant methods, then freeze the class?
yalue has quit [Quit: Leaving]
<workmad3>
not sure if that's the best way... but it's a way :)
<Hanmac>
>> class A; undef_method :_dump; end
<eval-in>
Hanmac => undefined method `_dump' for class `A' (NameError) ... (https://eval.in/33396)
sambao21 has quit [Quit: Computer has gone to sleep.]
jamesaxl_ has joined #ruby
tonini has quit [Client Quit]
bakingbread has joined #ruby
tonini has joined #ruby
tommyvyo has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
x1337807x has joined #ruby
jamesaxl has quit [Ping timeout: 264 seconds]
k610 has quit [Quit: Leaving]
tonini has quit [Client Quit]
Jackneill has quit [Read error: Operation timed out]
tonini has joined #ruby
tesuki has joined #ruby
tonini has quit [Client Quit]
pedda has joined #ruby
tonini has joined #ruby
tonini has quit [Client Quit]
generalissimo has quit [Remote host closed the connection]
tonini has joined #ruby
sambao21 has joined #ruby
chattmatt has quit [Quit: chattmatt]
Meatant has joined #ruby
chrishough has quit [Quit: chrishough]
AndChat| has quit [Quit: Bye]
lkba has joined #ruby
Trynemjoel has joined #ruby
tesuki has quit [Remote host closed the connection]
generalissimo has joined #ruby
wolcanus has joined #ruby
carloslopes has quit [Remote host closed the connection]
tonini has quit [Client Quit]
dr_neek has joined #ruby
tonini has joined #ruby
stkowski_ has joined #ruby
Godd2 has joined #ruby
moted has quit [Quit: moted]
burlyscudd has joined #ruby
<jkline>
I am new using OptionsParser. I don't see a build in way to set a required argument. Am I missing something?
stkowski has quit [Ping timeout: 264 seconds]
Cyrus has joined #ruby
krawchyk has quit [Remote host closed the connection]
chrishough has joined #ruby
xardas has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
k610 has joined #ruby
kidoz has joined #ruby
kidoz has quit [Read error: Connection reset by peer]
ivanoats has quit [Ping timeout: 256 seconds]
dash__ has quit [Quit: Time to beer :)]
stkowski_ has quit [Ping timeout: 248 seconds]
saarinen has quit [Quit: saarinen]
codesoda has quit [Remote host closed the connection]
<jkline>
what I really want is two options that must either both be specified or neither specified
Alina-malina has quit [Ping timeout: 252 seconds]
g0bl1n has quit [Ping timeout: 240 seconds]
bionhart has quit [Remote host closed the connection]
Spami has quit [Quit: Leaving]
Alina-malina has joined #ruby
bionhart has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
apeiros has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
phipes has quit [Quit: phipes]
suyase has left #ruby [#ruby]
dr_neek has quit [Ping timeout: 264 seconds]
simao has left #ruby [#ruby]
xardas has quit [Ping timeout: 276 seconds]
phipes has joined #ruby
thebastl has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
Bry8Star{T2 has joined #ruby
jbpros has quit [Quit: jbpros]
horofox has quit [Quit: horofox]
joelteon has quit [Quit: bye]
stkowski has quit [Quit: stkowski]
joelteon has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
bean__ has quit [Quit: Computer has gone to sleep.]
ryan_turner_ is now known as ryan_turner
g0bl1n has quit [Ping timeout: 276 seconds]
g0bl1n has joined #ruby
tommyvyo has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Ping timeout: 276 seconds]
tommyvyo has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
chipotle has joined #ruby
baordog has quit [Remote host closed the connection]
alex__c2022 has quit [Quit: alex__c2022]
nomenkun has joined #ruby
arya has joined #ruby
emergion has joined #ruby
vwoo has quit [Ping timeout: 252 seconds]
generalissimo has quit [Remote host closed the connection]
scottmey has quit [Quit: scottmey]
agjacome has quit [Read error: Operation timed out]
enebo has joined #ruby
dr_neek has joined #ruby
vwoo has joined #ruby
bothra has quit [Ping timeout: 248 seconds]
nomenkun has quit [Ping timeout: 248 seconds]
forced_request has joined #ruby
agjacome has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
bothra has joined #ruby
g0bl1n has quit [Ping timeout: 276 seconds]
alsdjflkasdkfj has quit [Ping timeout: 276 seconds]
chipotle has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
chipotle has joined #ruby
zigomir has quit [Ping timeout: 248 seconds]
synthetix has joined #ruby
forced_request has quit [Remote host closed the connection]
g0bl1n has joined #ruby
postmodern has quit [Ping timeout: 241 seconds]
c0rn has quit [Ping timeout: 276 seconds]
niklasb has quit [Ping timeout: 248 seconds]
harrymoreno_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
cmarques has quit [Ping timeout: 255 seconds]
newUser1234 has quit [Remote host closed the connection]
harrymoreno has quit [Ping timeout: 276 seconds]
harrymoreno_ is now known as harrymoreno
vlad_starkov has quit [Remote host closed the connection]
c0rn has joined #ruby
Zai00 has quit [Quit: Zai00]
dmiller has quit [Remote host closed the connection]
Kar- has quit [Remote host closed the connection]
RonScagz has joined #ruby
LennyLinux has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
ttt has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Changing host]
chipotle_ has joined #ruby
aboudreault has quit [Read error: Operation timed out]
lsc has quit [Read error: Operation timed out]
kpwz has quit [Read error: Operation timed out]
aboudreault has joined #ruby
lsc has joined #ruby
jkline has quit [Quit: jkline]
cout has quit [Read error: Operation timed out]
chipotl__ has joined #ruby
rblackwe has quit [Read error: Operation timed out]
rblackwe has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
cout has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
kpwz has joined #ruby
chipotle has quit [Ping timeout: 276 seconds]
chipotle_ has quit [Ping timeout: 240 seconds]
ttt has quit [Ping timeout: 256 seconds]
Hobogrammer has joined #ruby
postmodern has joined #ruby
ryan_turner is now known as ryan_turner_
telling has quit [Ping timeout: 264 seconds]
Silent__ has quit [Ping timeout: 248 seconds]
johnrlive has joined #ruby
mikepack has quit [Remote host closed the connection]
johnrlive has quit [Remote host closed the connection]
johnrlive has joined #ruby
tommyvyo has quit [Ping timeout: 246 seconds]
jkline has joined #ruby
visualdensity has joined #ruby
tommyvyo has joined #ruby
soulisson has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
platzhirsch has joined #ruby
guiocava_ has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
gyre007 has quit [Remote host closed the connection]
dr_neek has quit [Quit: dr_neek]
<platzhirsch>
In a class I have defined an instance variable below class MyClass with @my_field = 5. Now, if I use @my_field in an instance method it says the value is nil, how come?
horofox_ has joined #ruby
chipotl__ has quit [Remote host closed the connection]
<r0bgleeson>
platzhirsch: because the instance variable belongs to an instance of Class
arya has quit [Ping timeout: 248 seconds]
chipotle has joined #ruby
<platzhirsch>
r0bgleeson: which is not the same then I guess, so do I have to put it into initialize?
<jacktrick>
I thought Betty bought a bit of butter but the bit of butter Betty bought was bitter so Betty bough a better bit of butter to make the bitter bit of butter better?
vwoo has joined #ruby
evelyette has joined #ruby
rfizzle has quit [Quit: Leaving]
predator117 has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 255 seconds]
havenwood has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
anonymuse has quit [Quit: Leaving...]
telling has joined #ruby
predator217 has quit [Ping timeout: 256 seconds]
alsdjflkasdkfj has joined #ruby
tylersmith has quit [Remote host closed the connection]
<axl_>
The ruby doc for `Dir` state that the '**' pattern when used in `Dir.glob` "Matches directories recursively.". However when i use it in my app, it seems to only match directories and not them recursively
<axl_>
is there a flaw in the doc? When I read 'match directories recursively' i expect them to match all directories in the subtree - but that doesn't seem to be the case with this
pskosinski has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
wsterling has quit [Remote host closed the connection]