sambao21 has quit [Quit: Computer has gone to sleep.]
tkuchiki has joined #ruby
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
ninegrid has joined #ruby
fomatin has joined #ruby
codezombie has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
Apocalypse has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
Asher has quit [Ping timeout: 260 seconds]
crazymykl has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nomenkun has joined #ruby
kofno has quit [Remote host closed the connection]
jinie_ has quit [Read error: Operation timed out]
tomzx_mac_ has quit [Ping timeout: 276 seconds]
tomzx_mac has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
nettoweb has quit [Quit: nettoweb]
havenwood has quit [Remote host closed the connection]
jinie_ has joined #ruby
havenwood has joined #ruby
hogeo has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
tomzx_mac has quit [Quit: return 0;]
Hobogrammer has joined #ruby
yshh has quit [Remote host closed the connection]
julweber_ has joined #ruby
nbouscal has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Silent__ has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
julweber has quit [Ping timeout: 248 seconds]
nettoweb has joined #ruby
scrollback has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
scrollback has joined #ruby
r4nd0m1 has quit []
julweber_ has quit [Remote host closed the connection]
ner0x has quit [Quit: Leaving]
sambao21 has joined #ruby
pkrnj has joined #ruby
ffio has quit [Ping timeout: 276 seconds]
marcgg has quit [Read error: No route to host]
marcgg has joined #ruby
LennyLinux has quit []
DonRichie has quit [Read error: Connection reset by peer]
ffio has joined #ruby
DonRichie has joined #ruby
defrag1 is now known as defrag
nettoweb has quit [Quit: nettoweb]
jimg has joined #ruby
nomenkun has joined #ruby
codepython777 has quit [Quit: Leaving.]
Nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby
nari has quit [Ping timeout: 256 seconds]
LnL7 has quit [Quit: LnL7]
jimg has quit [Ping timeout: 246 seconds]
codepython777 has joined #ruby
nomenkun has quit [Ping timeout: 260 seconds]
reset has quit [Ping timeout: 264 seconds]
emmanuel__ has joined #ruby
takezawa has quit [Remote host closed the connection]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
emmanuelux has quit [Ping timeout: 268 seconds]
Hanmac1 has joined #ruby
kofno has joined #ruby
Araxia has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
Hanmac has quit [Ping timeout: 268 seconds]
yshh has joined #ruby
yshh has quit [Remote host closed the connection]
__class__ has quit [Ping timeout: 246 seconds]
osvico has joined #ruby
bionoid has joined #ruby
kofno has quit [Remote host closed the connection]
justsee has quit [Quit: leaving]
kofno has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
sepp2k has quit [Quit: Leaving.]
reset has joined #ruby
bionoid has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby
takezawa has joined #ruby
bionoid has joined #ruby
justsee has joined #ruby
nomenkun has joined #ruby
Ortuna has joined #ruby
fomatin has joined #ruby
allanix has joined #ruby
cofin has joined #ruby
RORgasm_ has joined #ruby
nettoweb has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
emmanuel__ has quit [Remote host closed the connection]
ZuzzleBuzzer has quit [Quit: ZuzzleBuzzer]
alanjc has left #ruby ["Leaving..."]
Araxia has quit [Quit: Araxia]
Araxia has joined #ruby
ravster has joined #ruby
RORgasm_ has quit [Ping timeout: 268 seconds]
Domon has joined #ruby
yshh has joined #ruby
sevenseacat has joined #ruby
Spooner has quit [Quit: Leaving]
mahmoudimus has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
chrisramon has joined #ruby
kasper has quit [Remote host closed the connection]
chrisramon has quit [Client Quit]
nari has joined #ruby
RobW_ has joined #ruby
Domon has quit [Remote host closed the connection]
<RobW_>
How would I solve path = "this.jpg", File.join( File.dirname(path), File.basename(path)) == "./this.jpg"
<popl>
What do you mean by solve?
<RobW_>
Basically I want to get a dirname only if the path has one, not if it's just a file name. I can do it by comparison but I am guessing there's a nice clean Ruby way.
<RobW_>
Later on I'm combining a bunch of path pieces, and if I combine piece_1, File.dirname(path), basename I get something like "path/./this.jpg"
<RobW_>
^^ my actual problem
<popl>
What are you trying to accomplish?
mercwithamouth has quit [Read error: Operation timed out]
<RobW_>
File.split does the same. Guess I can check if "." and if so throw it out.
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
splittingred has joined #ruby
<havenwood>
RobW_: Why not just?: File.expand_path(path)
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
<brandonhilkert>
I'm using alias_method to add functionality to an existing instance method from an Include. However, I have to make sure the include comes after the method otherwise i get method undefined errors. Anyone have a better suggestion to decorate an existing instance method?
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
<RobW_>
havenwood: I'm not sure if that will help.
<havenwood>
RobW_: I'm prolly not understanding the conundrum
<RobW_>
The path that I'm constructing has pieces in it that may or may not exist
bigkm has joined #ruby
krisfremen has joined #ruby
krisfremen has joined #ruby
krisfremen has quit [Changing host]
bigkm has quit [Max SendQ exceeded]
<havenwood>
RobW_: Why construct the path that way is what I guess I'm not understanding? What do you have? Why can't you just expand the path?
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
<Pholey>
ok
<havenwood>
RobW_: ahh
<RobW_>
havenwood: Long story short, is there a Ruby way to get dirname if one exists, and return nil instead of . if the path doesn't have a dir?
<Pholey>
so to use a proxy i need to use Net::HTTP::Proxy
<RobW_>
Maybe that makes more sense.
<Pholey>
now how would i get rid of said proxy?
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
nomenkun has joined #ruby
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
_seanc_ has quit [Quit: _seanc_]
<RobW_>
havenwood: so I have path_1, path_2, path_a, and "path/file.jpg"
Davey has joined #ruby
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
<RobW_>
I'm using File.dirname to get "path" from path/file.jpg, and File.basename to get file.jpg.
<popl>
path can be '.'?
bigkm has joined #ruby
<RobW_>
Then I do a bunch of things and dynamically generate a new file name, like 550055-file.jpg
bigkm has quit [Max SendQ exceeded]
harrymoreno has joined #ruby
<RobW_>
Then I re-combine paths like File.join(path_1, path_2, {what I got from File.dirname}, {new file name})
<RobW_>
But if the original thing passed to File.dirname was "file.jpg", file dirname returns "."
<RobW_>
Which is correct, but when I join my path I get "path_1/path_2/./550055-file.jpg"
nomenkun has quit [Ping timeout: 248 seconds]
ttt has joined #ruby
<RobW_>
Which isn't the path that I want.
<popl>
RobW_: why such variance in the filename that is being passed to your method?
<RobW_>
havenwood: I'll give that a shot. I can get around it but I'm (very) new at Ruby and was wondering if there's a better way to do what I'm doing.
kofno has quit [Remote host closed the connection]
<havenwood>
popl: I haven't used Windows in a long stretch. Though I recently got the urge to checkout PowerShell but it turns out there is a open source clone called pash that runs in mono.
<havenwood>
the directory file separator always shocks me
<havenwood>
*\*
mary5030 has joined #ruby
<cout>
\\
kasper has quit [Ping timeout: 248 seconds]
harrymoreno has quit [Quit: harrymoreno]
<sayd>
im having trouble getting boxen working with a fresh mountain lion. here is my error when i run script/boxen in a cloned repo: http://pastebin.com/awywGcfF
sambao21 has quit [Quit: Computer has gone to sleep.]
Inside has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
Hanmac has joined #ruby
hamakn has joined #ruby
mary5030 has quit [Remote host closed the connection]
danslo has quit [Quit: danslo]
harrymoreno has joined #ruby
nari has joined #ruby
mary5030 has joined #ruby
braincra- has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
<havenwood>
sayd: The gem has C-extensions, so you need to have build tools.
mercwithamouth has quit [Read error: Operation timed out]
<havenwood>
sayd: The traditional route is to download Xcode and install Command Line Tools from preferences.
Davey has quit [Quit: Computer has gone to sleep.]
<havenwood>
sayd: Are you a Homebrew user? It is OS X, right?
bionoid has quit [Remote host closed the connection]
<popl>
cout: I despise code which hardcodes the file separator :)
<popl>
*in which the file separator is hardcoded.
<havenwood>
popl: seems pretty common
<havenwood>
popl: but yeah...
justsee has quit [Ping timeout: 268 seconds]
<popl>
havenwood: it's a bane
<cout>
pop1: it's fine, since you can always link against a C library that knows about /
<cout>
(even if the underlying OS uses a different file separator)
<havenwood>
popl: I'm sometimes somewhat bemused when people File.join but then have a '../..' in the string.
takezawa has quit [Remote host closed the connection]
<popl>
ok, while I am being pedantic, my nickname is popl not pop1 :)
yourmysin has quit [Read error: Connection reset by peer]
jalcine has quit [Excess Flood]
<cout>
1 and l look the same in this font :(
<popl>
then your font sucks
<popl>
:)
<cout>
stupid windows fonts
gnutz has joined #ruby
<popl>
havenwood: That would definitely suggest a certain code smell.
jalcine has joined #ruby
justsee has joined #ruby
takezawa has quit [Ping timeout: 252 seconds]
nomenkun has quit [Ping timeout: 248 seconds]
Inside has joined #ruby
KhalilC has joined #ruby
<popl>
cout: I don't see a negative to being pedantic when writing code.
Soliah has joined #ruby
kofno has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
freeayu__ has joined #ruby
Heero` has joined #ruby
<popl>
Although I would suggest that applying something like the idea "use this general thing that will resolve the correct thing depending on the platform" is not an example of pedantry.
<havenwood>
This is the type of arrant pedantry up with which I will not put.
<havenwood>
~ Churchill
mikepack has joined #ruby
mcarron has left #ruby [#ruby]
Matip has quit [Read error: Connection reset by peer]
lindenle has joined #ruby
Matip has joined #ruby
<popl>
Churchill was an awesome bastard.
Heero has quit [Ping timeout: 248 seconds]
djbkd has quit [Quit: Leaving]
<popl>
By bastard I mean "asshole" and not "of illegitimate birth".
<popl>
</pedant>
moos3 has joined #ruby
<havenwood>
well a metaphorical asshole, and the birth was only illegitimate in decree of fathering, not in its legitimacy prima facea
<havenwood>
but yeah, i'd like to have a dinner with em
gnutz has quit [Quit: gnutz]
<popl>
prima facie
<popl>
:P
<havenwood>
popl: whew, was worried that'd go uncorrected :O
fenicks has quit [Remote host closed the connection]
ZuzzleBuzzer has quit [Quit: ZuzzleBuzzer]
<popl>
gosh, that was a test. :P
<popl>
The thought occurred to me.
<popl>
(before I answered, I mean)
banister has quit [Remote host closed the connection]
<popl>
havenwood: Thanks for helping me ostracize myself. :P
radic_ has joined #ruby
<havenwood>
popl: De nada. :P
chxane has joined #ruby
paissad has quit [Quit: This computer has gone to sleep]
<havenwood>
I do feel like today should have celebration, 1.8 sunsetting and everything. I guess the notice was yesterday, but end of June 2013 has been the time in stone for ages.
<havenwood>
\o/
<bnagy>
oh crap it's july already
<havenwood>
bnagy: Helloo tomorrow!
justsee has quit [Ping timeout: 240 seconds]
mars__ has joined #ruby
Mars` has joined #ruby
radic__ has quit [Ping timeout: 264 seconds]
<popl>
havenwood: Find a Twinkie, put a candle in it.
<bnagy>
so. Two arrays of strings, same size, all the strings have the same encoding and they're all == but the Arrays are not ==
<bnagy>
thought?
<bnagy>
s
chxane has quit [Client Quit]
generalissimo has joined #ruby
<popl>
bnagy: xxd
<popl>
wait, what OS are you using bnagy?
<bnagy>
osx
jimg has joined #ruby
<bnagy>
tbh I was so sure it would be encoding that I'm a little freaked out :/
<RobW_>
Is the ternary not used in ruby often?
nomenkun has joined #ruby
<popl>
od then probably, bnagy
<bnagy>
RobW_: no
<RobW_>
bnagy: as in no, it is used often, or no no one uses it :)
<bnagy>
no the ternary is not used often in Ruby
<RobW_>
Thanks.
<bnagy>
||= etc are though
<popl>
bnagy: are the bytes the same?
<bnagy>
well all the strings are == and they're ascii-8bit
Nisstyre-laptop has joined #ruby
wmoxam has quit [Ping timeout: 276 seconds]
<popl>
how big are the strings? can you visually inspect them? :P
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<bnagy>
I guess I can check them bytewise. The strings are not big, but there are 180k per array
nomenkun has quit [Ping timeout: 252 seconds]
eka has quit [Quit: Computer has gone to sleep.]
Davai__ has quit [Ping timeout: 246 seconds]
havenwood has quit [Remote host closed the connection]
<RobW_>
Without the ternary how would a Rubyist do something like foo = bar['sod'].include? ? bar['sod'].method.method : 'default'
<popl>
or, since the arrays aren't equal you can iterate until you find out where it isn't equal
macmartine has quit [Quit: Computer has gone to sleep.]
dodosan has joined #ruby
browndawg has quit [Ping timeout: 246 seconds]
ananthakumaran1 has joined #ruby
jbpros has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
pierre1 has quit [Ping timeout: 248 seconds]
braoru has joined #ruby
KhalilC has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
aganov has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
fridim__ has quit [Ping timeout: 246 seconds]
ILoveYou has joined #ruby
viszu has quit [Quit: Leaving.]
RichardBaker has joined #ruby
RichardBaker has left #ruby [#ruby]
mengu has joined #ruby
crimezone20xx has quit [Quit: leaving]
jbpros has quit [Ping timeout: 248 seconds]
hadees has joined #ruby
mars__ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
sailias has joined #ruby
d4rkstalk3r has joined #ruby
monkegjinni has joined #ruby
mars__ has quit [Ping timeout: 246 seconds]
yacks has quit [Ping timeout: 252 seconds]
icecandy has joined #ruby
samuel02 has joined #ruby
monkegji_ has joined #ruby
browndawg has joined #ruby
RichardBaker has joined #ruby
zeromodulus has quit [Remote host closed the connection]
RichardBaker has quit [Client Quit]
zeromodulus has joined #ruby
bionoid has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 256 seconds]
blaxter_ has joined #ruby
postmodern has quit [Quit: Leaving]
rickruby has joined #ruby
RichardBaker has joined #ruby
samuel02 has quit [Remote host closed the connection]
RichardBaker has left #ruby [#ruby]
mneorr_ has joined #ruby
monkegji_ has quit [Ping timeout: 256 seconds]
RichardBaker has joined #ruby
mikepack has quit [Remote host closed the connection]
urthbound has quit [Ping timeout: 246 seconds]
RichardBaker has quit [Client Quit]
fomatin has quit [Quit: Computer has gone to sleep.]
zeromodulus has quit [Ping timeout: 246 seconds]
mneorr has quit [Ping timeout: 256 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
optimusprimem has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
generalissimo has joined #ruby
yacks has joined #ruby
wallerdev has quit [Quit: wallerdev]
jonathanwallace1 has quit [Quit: WeeChat 0.4.0]
optimusprimem has joined #ruby
r0bby is now known as robbyoconnor
jonathanwallace has joined #ruby
brianherman has quit [Read error: Connection reset by peer]
jalcine has quit [Excess Flood]
generalissimo has quit [Remote host closed the connection]
ayaz has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
mmozuras has joined #ruby
subbyyy has quit [Ping timeout: 268 seconds]
sailias has quit [Ping timeout: 256 seconds]
jbpros has joined #ruby
Nisstyre has quit [Read error: Connection reset by peer]
jalcine has joined #ruby
ffio has joined #ruby
Zolo has joined #ruby
anay has joined #ruby
patsToms has joined #ruby
Zolo has quit [Remote host closed the connection]
jbpros has quit [Ping timeout: 264 seconds]
jprovazn has joined #ruby
obs has joined #ruby
tjbiddle has joined #ruby
andikr has joined #ruby
lindenle has quit [Quit: This computer has gone to sleep]
tjbiddle has quit [Client Quit]
dagobah has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
hadees has quit [Quit: hadees]
freeayu has quit [Read error: Connection reset by peer]
samuel02 has joined #ruby
urthbound has joined #ruby
milardovich has quit [Quit: Leaving]
cha1tanya has joined #ruby
harrymoreno has quit [Ping timeout: 246 seconds]
dyu has joined #ruby
noop has joined #ruby
harrymoreno has joined #ruby
bigmac has quit [Ping timeout: 246 seconds]
gstamp has quit [Quit: Computer has gone to sleep.]
cha1tanya_ has joined #ruby
anay has quit [Remote host closed the connection]
anay has joined #ruby
senayar has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
anay has quit [Remote host closed the connection]
anay has joined #ruby
bigkevmcd has joined #ruby
andikr has quit [Remote host closed the connection]
Kar- has joined #ruby
bigkm has quit [Quit: Computer has gone to sleep.]
jds_ has joined #ruby
ntzrmtthihu777 has joined #ruby
senayar has quit [Remote host closed the connection]
<ntzrmtthihu777>
hallo. hope you folks can help a bit. I have jruby1.7.4 installed via rvm, and the redcar gem installed in that, but running the redcar binary stops at the following error: "There was an error loading plugins: declarations, textmate, tree_view_swt"
persand has joined #ruby
<ntzrmtthihu777>
I'm running Xubuntu 12.04.2, my system specs are: CPU~Dual core AMD Athlon II X2 240e (-MCP-) clocked at 800.000 Mhz Kernel~3.2.0-48-generic x86_64 Up~3:09 Mem~1018.1/2943.5MB HDD~500.1GB(33.6% used) Procs~167 Client~Irssi 0.8.15 inxi~1.8.4
_Andres has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
agjacome has quit [Quit: leaving]
paissad_ has joined #ruby
senayar has joined #ruby
<popl>
ntzrmtthihu777: can you paste the errors to the pastebin at the URL in the topic?
tonini has quit [Ping timeout: 248 seconds]
MrZYX|off is now known as MrZYX
becom33 has joined #ruby
becom33 has joined #ruby
<ntzrmtthihu777>
popl: not sure how to paste to that url, but I can pastebin to paste.ubuntu.com if you like
cads has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby
chupijay has joined #ruby
<popl>
ntzrmtthihu777: how would you paste to the ubuntu pastebin?
<becom33>
in this script http://pastebin.com/RvqehRb9 everything works fine . But I want add a feature to automate the process by adding a file with the command that I type in the console . so I don't have to write them over and over again
echevemaster has quit [Remote host closed the connection]
pipework has quit [Remote host closed the connection]
<ntzrmtthihu777>
popl: missed it, lol. I use pastebinit, and it atomatically pastes to paste.ubuntu.com; I'm sure it can be configured to paste elsewhere, but its not worth the effort I feel :P
<becom33>
anyone for me
zigomir has joined #ruby
relix has joined #ruby
<popl>
becom33: why are you sorting that array of two elements?
<popl>
you could literally swap the positions of those strings and not have to sort it
<becom33>
popl, no readon just
r0bgleeson has joined #ruby
osvico has quit [Ping timeout: 268 seconds]
Mon_Ouie has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
swordsmanz has joined #ruby
freeayu has joined #ruby
<popl>
ntzrmtthihu777: did you ask in #redcar?
<ntzrmtthihu777>
popl: was not aware it existed. on freenode?
jefflyne has joined #ruby
<popl>
yes. it's linked to from the official redcar site
<ntzrmtthihu777>
popl: well thank you anyways :P
<popl>
no good deed…
* ntzrmtthihu777
gives popl a cookie
<popl>
heh
Astral_ has joined #ruby
Mon_Ouie has joined #ruby
<popl>
ntzrmtthihu777: I hadn't heard of redcar before you came in here. I didn't just know that the IRC channel existed.
<ntzrmtthihu777>
popl: so you researched on my behalf?
<popl>
nevermind
ehaliewicz has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 268 seconds]
<ntzrmtthihu777>
popl: I really appreciate it, truely I do. its not often people are willing to help a complete stranger, which is why I love irc
arya_ has quit [Ping timeout: 246 seconds]
lewix has quit [Remote host closed the connection]
<becom33>
in this script http://pastebin.com/RvqehRb9 everything works fine . But I want add a feature to automate the process by adding a file with the command that I type in the console . so I don't have to write them over and over again
<bnagy>
becom33: for like the 50th time, don't just paste your crap every half an hour
<becom33>
bnagy, for the 50th time thanks for reminding me :)
persand has quit [Read error: Connection reset by peer]
<popl>
becom33: What do you hope to accomplish by annoying the regulars?
arya_ has joined #ruby
<popl>
becom33: You do realize they are the people who would end up helping you, right?
snowwolf has joined #ruby
RORgasm has joined #ruby
<davidcelis>
to be fair, that was only the second time he pasted his pastebin.
<popl>
oh, bnagy was exaggerating
<becom33>
popl, if bnagy wanted to help it would have done it when he saw the first massage
<davidcelis>
woah there
jds_ has quit [Remote host closed the connection]
<davidcelis>
i dont think anybody wants to help with a massage
<davidcelis>
that's a bit presumptuous, friend
<popl>
davidcelis: not so fast cowboy ;)
<davidcelis>
im going to bed ಠ_ಠ
<popl>
hehe
<popl>
is it a heart-shaped waterbed?
djbkd has quit [Ping timeout: 260 seconds]
<popl>
sorry, I'll stop :P
<becom33>
davidcelis, umm actually I have a history of repeating question . some people are annoyed by it . I only repeat the question if I didn't get a awnser .can't actually expect me to ask the question one time and get a awnser after 3 or 4 hrs after getting the log far off the screen
<popl>
becom33: Perhaps you could try actually asking a question.
threesome has joined #ruby
ybart has joined #ruby
leonidlm has joined #ruby
<becom33>
popl, oh maybe I was unclear with my question . I'm having a logical issue not a syntax issue .
denver has joined #ruby
<popl>
You didn't ask a question.
<becom33>
davidcelis, umm actually I have a history of repeating question . some people are annoyed by it . I only repeat the question if I didn't get a awnser .can't actually expect me to ask the question one time and get a awnser after 3 or 4 hrs after getting the log far off the screen . how can I do that ?
RORgasm has quit [Ping timeout: 268 seconds]
Effin has joined #ruby
<becom33>
popl, I though what I wrote before read it self as a question .
<popl>
No, it did not.
<popl>
Otherwise I would not suggest that you ask a question. :)
<becom33>
in this script http://pastebin.com/RvqehRb9 everything works fine . But I want add a feature to automate the process by adding a file with the command that I type in the console . so I don't have to write them over and over again . how I do that ?
<becom33>
how about now ?
<becom33>
for a example : appscript.rb autmatefilename
<waxjar>
cat file | ruby your_script.rb
nisa has quit [Remote host closed the connection]
sami_ is now known as sami
rickruby has quit [Remote host closed the connection]
chupijay has quit [Remote host closed the connection]
<becom33>
waxjar, that works . is there a way I can add to the script .
yacks has quit [Ping timeout: 276 seconds]
jinie_ is now known as jinie
<waxjar>
sure, you can read in the file and evaluate each line
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<becom33>
waxjar, well I can do file read . hmm using somthing like system() function would work ?
buzzybron has left #ruby [#ruby]
<waxjar>
just replace the readline part for lines from the file
steeve1 has quit [Ping timeout: 248 seconds]
blaxter_ is now known as blaxter
<becom33>
wait lemme try that
Hien has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
Hien has joined #ruby
zendeavor has joined #ruby
vlad_starkov has joined #ruby
yacks has joined #ruby
poseid has joined #ruby
haxrbyte_ has joined #ruby
Xeago has joined #ruby
charliesome has joined #ruby
JPascal has joined #ruby
teclator has joined #ruby
camilasan has joined #ruby
Hien has quit [Ping timeout: 260 seconds]
zeromodulus has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
danslo has joined #ruby
Hien has joined #ruby
rdark has joined #ruby
haxrbyte has joined #ruby
pranny has joined #ruby
ntzrmtthihu777 has quit [Ping timeout: 252 seconds]
jimg has quit [Remote host closed the connection]
ntzrmtthihu777 has joined #ruby
ntzrmtthihu777 has joined #ruby
ntzrmtthihu777 has quit [Changing host]
viszu has joined #ruby
haxrbyte_ has quit [Ping timeout: 248 seconds]
wari has joined #ruby
mklappstuhl has joined #ruby
gstamp has joined #ruby
hamed_r has joined #ruby
predator117 has joined #ruby
teclator has quit [Ping timeout: 268 seconds]
elaptics`away is now known as elaptics
zets has quit [Ping timeout: 240 seconds]
troessner has joined #ruby
<becom33>
waxjar, I tried it like this http://pastebin.com/Gpzjxpsw . I cant figure out why is it repeating file read twice
mengu has quit [Read error: Connection reset by peer]
zets has joined #ruby
mengu has joined #ruby
staafl has joined #ruby
monkegjinni has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
corehook has joined #ruby
vigintas has joined #ruby
marcgg has quit [Ping timeout: 276 seconds]
msuszczy has joined #ruby
Al__ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
DaniG2k has joined #ruby
nomenkun has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
teclator has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
predator117 has quit [Ping timeout: 246 seconds]
marcgg has joined #ruby
tootubular has quit [Quit: tootubular]
monkegjinni has quit [Remote host closed the connection]
gstamp has joined #ruby
marr has joined #ruby
noname001 has joined #ruby
CFUDev has joined #ruby
ElderFain has quit [Ping timeout: 260 seconds]
jimg has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
snowwolf has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
jbpros has joined #ruby
snowwolf has joined #ruby
mobile has joined #ruby
zai has joined #ruby
julweber has joined #ruby
DaniG2k has quit [Quit: Leaving.]
jimg_ has joined #ruby
mobile has quit [Client Quit]
Judge has joined #ruby
jimg has quit [Read error: Connection reset by peer]
<Judge>
Moin everyone
AlSquire has joined #ruby
dodosan has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
bionoid has joined #ruby
scrollback has quit [Remote host closed the connection]
predator117 has joined #ruby
scrollback has joined #ruby
jbpros has quit [Quit: jbpros]
ghr has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
harrymoreno has quit [Quit: harrymoreno]
lkba has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
timonv has quit [Remote host closed the connection]
ntus1017 has joined #ruby
Mon_Ouie has joined #ruby
predator117 has quit [Quit: Lost terminal]
jimg_ has quit [Remote host closed the connection]
timonv has joined #ruby
xpirator has joined #ruby
jbpros has joined #ruby
xpirator has left #ruby [#ruby]
<banzounet>
Hey guys, I use the twitter gem to get data from the twitter api, so the lib returns an array of object and one of these object return an error "Unexpected error while processing request: undefined method `bytesize'" any idea why? (http://pastebin.com/AGRWvvQM)
Dcore has joined #ruby
Dcore has quit [Read error: Connection reset by peer]
statarb3 has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
ffio_ has joined #ruby
ffio has quit [Ping timeout: 252 seconds]
<bnagy>
banzounet: you removed the info that might actually help
<bnagy>
like where the bad call came from
<bnagy>
somebody is trying to call bytesize, which is usually on Strings on a Tweet
gildo has joined #ruby
<banzounet>
bnagy: I just remove the list of method, shoud I add something to get more info from the error?
<bnagy>
well it would normally list a fault location
haxrbyte has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
tonini has joined #ruby
hron85 has joined #ruby
tvw has joined #ruby
neolax has quit [Read error: Connection reset by peer]
neolax has joined #ruby
anay_ has joined #ruby
vinnyOcean has quit [Quit: Computer has gone to sleep.]
axeman__ has joined #ruby
mercwithamouth has joined #ruby
wsterling has joined #ruby
<hron85>
Hi! I get a ton of following warning from an app what I using (puppet-dashboard). Even if I know what is the problem, I can't and wouldn't fix it. How can I suppress it? "NOTE: Gem::Specification#installation_path is deprecated, use base_dir. It will be removed on or after 2011-10-01."
lewis has quit [Remote host closed the connection]
jibi has joined #ruby
anay has quit [Ping timeout: 256 seconds]
axeman_ has quit [Read error: Operation timed out]
snowwolf has quit [Quit: Leaving.]
kofno has joined #ruby
joshwines has quit [Remote host closed the connection]
corehook has joined #ruby
Domon has quit [Remote host closed the connection]
b0oh has joined #ruby
razi has joined #ruby
sk87 has joined #ruby
neolax has quit [Read error: Connection reset by peer]
mupkoo has joined #ruby
neolax has joined #ruby
b0oh has left #ruby [#ruby]
Spami has quit [Quit: This computer has gone to sleep]
<MrZYX>
you're creating a one element array with the value 1..@count
robustus has joined #ruby
<r0bgleeson>
see the paste Lennier
<r0bgleeson>
something else is wrong
GeissT has quit [Ping timeout: 246 seconds]
<MrZYX>
r0bgleeson: he wrote [foo].each
<r0bgleeson>
if @count is 1, sure
<r0bgleeson>
but we dont know that
tacos1de has joined #ruby
<MrZYX>
r0bgleeson: [1..@count].each vs (1..@count).each
<r0bgleeson>
oh, wow, good catch
<MrZYX>
Lennier: got it? Here's the version you should actually use in this case: @count.times do puts @bonus; end
<Lennier>
thanks guys, i got it!
RORgasm has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
ryanhirsch has quit [Quit: Computer has gone to sleep.]
ntus1017 has quit [Remote host closed the connection]
jetblack has quit [Ping timeout: 246 seconds]
d4rkstalk3r has quit [Ping timeout: 252 seconds]
d4rkstalk3r has joined #ruby
anderson has joined #ruby
jimg has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 259 seconds]
vlad_starkov has quit [Remote host closed the connection]
hamed_r has joined #ruby
nettoweb has quit [Quit: nettoweb]
wmoxam has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
mercwithamouth has quit [Quit: Lost terminal]
ldnunes has joined #ruby
Giorgio has joined #ruby
ferdev has quit [Read error: Connection reset by peer]
r0bgleeson has quit [Quit: WeeChat 0.3.8]
hron85 has quit [Read error: Connection reset by peer]
r0bgleeson has joined #ruby
georgi_ has joined #ruby
georgi_ has quit [Client Quit]
elaptics`away is now known as elaptics
ferdev has joined #ruby
sayan has joined #ruby
Nuck is now known as nuckrophilia
demet8 has joined #ruby
coderhut has joined #ruby
gildo has quit [Ping timeout: 260 seconds]
yshh has quit [Remote host closed the connection]
hamed_r has quit [Changing host]
hamed_r has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ismlages has joined #ruby
hamed_r has quit [Quit: Leaving]
emergion has joined #ruby
hamed_r has joined #ruby
ybart has quit [Quit: ybart]
vinnyOcean has quit [Quit: Computer has gone to sleep.]
yashshah has quit [Ping timeout: 268 seconds]
hamed_r has quit [Remote host closed the connection]
niceguyjames has joined #ruby
cofin has joined #ruby
vinnyOcean has joined #ruby
Squarepy has quit [Remote host closed the connection]
kayloos has joined #ruby
wsterling has joined #ruby
BSaboia has joined #ruby
eka has joined #ruby
mikecmpbll has joined #ruby
brianherman has quit [Read error: Connection reset by peer]
airtonix has quit [Ping timeout: 260 seconds]
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
niceguyjames has quit [Quit: Computer has gone to sleep.]
jetblack has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rlb3 has joined #ruby
pyreal has joined #ruby
GeekOnCoffee has quit [Ping timeout: 245 seconds]
razi has quit [Quit: Leaving.]
axeman__ has quit [Remote host closed the connection]
TheHonkiesShotMe has joined #ruby
pothibo has joined #ruby
MadDog31 has joined #ruby
wesside has joined #ruby
axeman_ has joined #ruby
TheHonkiesShotMe is now known as ArchBeOS
julweber has quit [Remote host closed the connection]
hamed_r has joined #ruby
wmoxam has quit [Ping timeout: 252 seconds]
ybart has joined #ruby
LennyLinux has joined #ruby
hamed_r has quit [Client Quit]
vlad_starkov has joined #ruby
PSKOSINSKI has joined #ruby
devoldmx3 has joined #ruby
ntzrmtthihu777 has left #ruby ["For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
carloslopes has joined #ruby
ntzrmtthihu777 has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
coderhut has quit [Quit: Page closed]
sevenseacat has joined #ruby
<ntzrmtthihu777>
ahllo. I've finally got redcar to work when called from terminal, but my efforts at creating a working .desktop file for my menu have failed miserably. anyone have a working one and care to pastebin the contents?
camilasan has quit [Remote host closed the connection]
teclator has quit [Ping timeout: 252 seconds]
pipework has joined #ruby
camilasan has joined #ruby
subbyyy has joined #ruby
KhalilC has joined #ruby
chase-work has joined #ruby
vigintas_ has joined #ruby
axeman_ has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 268 seconds]
ybart has quit [Quit: ybart]
axeman_ has joined #ruby
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
himsin has quit [Quit: himsin]
browndawg has left #ruby [#ruby]
brianherman has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
asteve has joined #ruby
devoldmx3 has quit [Ping timeout: 260 seconds]
dillwithers has joined #ruby
ybart has joined #ruby
bubblehead has quit [Ping timeout: 276 seconds]
cofin has quit [Quit: cofin]
bubblehead has joined #ruby
crazymykl has joined #ruby
TheDick has joined #ruby
anay_ has quit [Remote host closed the connection]
neolax has quit [Read error: Connection reset by peer]
joast has quit [Quit: Leaving.]
sevenseacat has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
pranny1 has quit [Quit: Leaving.]
zaargy has joined #ruby
<zaargy>
hi. i am using %x[ do_long_running_command ] and i need to make it so that is both assigned to variable and puts at the same time.
anay has joined #ruby
<zaargy>
the output streams so i would liek to puts as the output is generated but also assign to a variable so i can return
<zaargy>
hints?
Hanmac2 has quit [Ping timeout: 256 seconds]
sevenseacat has joined #ruby
codepython777 has joined #ruby
neolax has joined #ruby
gstamp has joined #ruby
codepython7771 has joined #ruby
chxane has quit [Remote host closed the connection]
<hoelzro>
zaargy: if I understand correctly, you want to output to both be sent to Ruby as well as to standard output?
Xeago has joined #ruby
<zaargy>
yes
<hoelzro>
hmm
<zaargy>
basically tee to ruby and stdout :)
<hoelzro>
right
<hoelzro>
I've gotta go, but perhaps someone else can help!
wsterling has quit [Remote host closed the connection]
sk87 has joined #ruby
bigmac has quit [Ping timeout: 246 seconds]
TheDick_ has joined #ruby
b0oh has joined #ruby
codepython777 has quit [Ping timeout: 246 seconds]
<AtKaaZ>
I just didn't want to repeat the "I can move" part
nari has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
generali_ has joined #ruby
<MrZYX>
what you could do in the parent is def move "I can move" + move_by; end; protected def move_by ""; end; and in the childs just overwrite move_by
<nanothief>
The OO way would be to use the strategy pattern, reimplement Animal#move as @move_strategy.call. Then make a strategy class ICanMoveStrategy, which you can implement so you can customize the "by..." part
<nanothief>
although that is overkill for simple examples
<nanothief>
MrZYX's solution is better for simple cases
<rookie2030>
i have backtrack 5 r3 and i need to update my ruby what i need to do that
<MrZYX>
ask #backtrack
jlast has joined #ruby
browndawg has joined #ruby
<AtKaaZ>
interesting, but i was trying to pretend that i cannot touch the Animal class
<MrZYX>
well, then you could write a wrapper around Animal to do it :P
<AtKaaZ>
or the Bird class
<AtKaaZ>
and use the wrapper in my HUman and Penguin?
<MrZYX>
as base, yeah
philcrissman_ has quit [Remote host closed the connection]
<AtKaaZ>
let me try that xD
dillwithers is now known as queston
s00pcan_ has joined #ruby
mikepack has joined #ruby
queston has quit [Remote host closed the connection]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
freeayu__ has joined #ruby
enebo has joined #ruby
<AtKaaZ>
ah I can see how that would work, but their tests are too restrictive requiring Human to be Human < Animal and not have some other class inbetween
<MrZYX>
probably grabbing puppets parser for that, trying to get a hash from it and YAML.dump'ing that
<RobW_>
So in general if you want to temporarily manipulate a hash but leave the original hash alone it's best to create a new object and insert the original's values into it, then destroying the new hash when you're done.
<RobW_>
Does that sound right?
RichardBaker has joined #ruby
wmoxam has quit [Ping timeout: 240 seconds]
blaxter_ has joined #ruby
<axisys>
MrZYX: I have puppet installed on this box..
vdandre has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
kasper has quit [Remote host closed the connection]
<yekta>
Hello, looking to deploy a ruby env for dashing from (http://shopify.github.io/dashing/), I'm planning to use capistrano and just start at it - I thought I would first ask, are there any gems or other recommended ways to deploy ruby apps out there I can review/look at?
jerius_ has joined #ruby
RomainT has joined #ruby
ArchBeOS is now known as ArchManjaro
axl__ has joined #ruby
danslo has quit [Quit: danslo]
axl_ has quit [Ping timeout: 252 seconds]
axl__ is now known as axl_
workmad3 has joined #ruby
bklane has joined #ruby
wsterling has joined #ruby
reset has joined #ruby
eka has joined #ruby
jerius has quit [Ping timeout: 264 seconds]
<blitz>
so if you had an array like [1,2,3,4,5…] and you wanted to get [1,2] then [2,3] then [3,4] how would you go about it? I have a few ideas, but none of them seem very ruby like
Kricir has quit [Remote host closed the connection]
monban has joined #ruby
Kricir has joined #ruby
<Mon_Ouie>
each_slice(2)
<havenwood>
yekta: you might look at Mina or Vlad the Deployer
<blitz>
also, pretty sure that only gives 1,2 3,4 5,6 etc.
<blitz>
I'm looking more for a moving window with overlap
<Mon_Ouie>
What do you mean?
<Mon_Ouie>
Oh, I misread your arra
<Mon_Ouie>
It's each_cons(2) then
burlyscudd has quit [Quit: Leaving.]
<blitz>
ah yeah, that's definitely what I needed. thanks
bionoid has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
Astralum has joined #ruby
thecommongeek has quit [Quit: Leaving]
<yekta>
havenwood: thanks, I'll check it out
Dekade has joined #ruby
wsterling has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 264 seconds]
cmiller1 has quit [Quit: cmiller1]
serp` has quit [Quit: serp`]
shadowapex has joined #ruby
axeman_ has joined #ruby
niklasb has joined #ruby
nomenkun has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
laitances14 has quit [Ping timeout: 268 seconds]
vlad_starkov has joined #ruby
johnnyfuchs has joined #ruby
shadowapex has left #ruby [#ruby]
saarinen has quit [Quit: saarinen]
cmiller1 has joined #ruby
laitances14 has joined #ruby
ninegrid has quit [Ping timeout: 268 seconds]
ninegrid has joined #ruby
ArchManjaro is now known as ArchBeOS
jerius has joined #ruby
jonathanwallace has quit [Ping timeout: 256 seconds]
Guga_ has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
vdandre has quit [Quit: leaving]
jerius_ has quit [Ping timeout: 256 seconds]
razi has joined #ruby
viszu has quit [Remote host closed the connection]
ffranz1 is now known as ffranz
tvw has quit []
kobain has quit [Ping timeout: 252 seconds]
JZTech101 has joined #ruby
mahmoudimus has joined #ruby
bionoid has joined #ruby
ramblex has quit [Read error: Operation timed out]
rdFLeece has joined #ruby
cmiller1 has quit [Quit: cmiller1]
kreisys has joined #ruby
kobain has joined #ruby
relix has joined #ruby
lushious has joined #ruby
rdFLeece has quit [Remote host closed the connection]
reset has quit [Ping timeout: 246 seconds]
DrShoggoth has joined #ruby
Peej has quit [Ping timeout: 276 seconds]
chichou has quit [Remote host closed the connection]
kpshek has joined #ruby
poseid has joined #ruby
mist has quit [Changing host]
mist has joined #ruby
kasper has quit [Remote host closed the connection]
TheDick_ has joined #ruby
cmiller1 has joined #ruby
elaptics is now known as elaptics`away
gnutz has joined #ruby
havenn_ has joined #ruby
Dekade has quit [Read error: Connection reset by peer]
RichardBaker has quit [Quit: RichardBaker]
havenwood has quit [Ping timeout: 248 seconds]
obs has quit [Quit: Konversation terminated!]
Dekade has joined #ruby
TheDick has quit [Ping timeout: 246 seconds]
TheDick_ is now known as TheDick
kpshek has quit []
kreisys has quit [Quit: Computer has gone to sleep.]
bklane has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.1]
vigintas has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Davey has quit [Quit: Computer has gone to sleep.]
sumark has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
ezkl has joined #ruby
sumark has joined #ruby
kayloos has quit [Remote host closed the connection]
cmiller1 has quit [Quit: cmiller1]
blaxter_ has quit [Quit: foo]
pentameter has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Computer has gone to sleep.]
ArchBeOS has left #ruby [#ruby]
saarinen has joined #ruby
TheDick has quit [Ping timeout: 240 seconds]
nazty has joined #ruby
mark_locklear has quit [Ping timeout: 246 seconds]
zigomir_ has joined #ruby
epta has quit [Ping timeout: 260 seconds]
havenn_ has quit [Ping timeout: 256 seconds]
machuga|away is now known as machuga
ebobby has quit [Quit: Lost terminal]
kpshek has joined #ruby
ebobby has joined #ruby
bklane has joined #ruby
gnutz has quit [Remote host closed the connection]
zigomir has quit [Ping timeout: 252 seconds]
codezombie13 has joined #ruby
codezombie has quit [Read error: Connection reset by peer]
matthalliday has joined #ruby
havenwood has joined #ruby
codezombie has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
epta has joined #ruby
RobW_ has quit [Quit: RobW_]
matthalliday has quit [Client Quit]
RobW_ has joined #ruby
axeman_ has quit [Remote host closed the connection]
epta has quit [Client Quit]
epta has joined #ruby
nomenkun has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
cmiller1 has joined #ruby
codezombie13 has quit [Ping timeout: 252 seconds]
cmiller1 has quit [Client Quit]
JZTech101 has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
Voodoofish4301 has joined #ruby
jonathanwallace has joined #ruby
Voodoofish430 has quit [Ping timeout: 252 seconds]
gstamp has joined #ruby
arietis has joined #ruby
banghouse2 has joined #ruby
saarinen has quit [Quit: saarinen]
rsahae_ has quit [Quit: rsahae_]
lurch_ has joined #ruby
gildo has quit [Ping timeout: 246 seconds]
denver has quit [Remote host closed the connection]
maxmanders has joined #ruby
rsahae has joined #ruby
zommi has quit [Remote host closed the connection]
<lurch_>
hi, I have a directory /tmp/x containing 1 file 'a' and a symlink 'b' that points to 'a'. Can i copy the directory to /tmp/y with fileutils and keep symlinks? I tried FileUtils.cp_r 'x', 'y', :preserve => true and FileUtils.copy_entry 'x', 'y', :preserve => true, but i keep getting the error: 'fileutils.rb:1379:in `utime': No such file or directory - y/b (Errno::ENOENT)', and all I get in the directory /tmp/y is a broken symlink 'b' to a non-exist
<lurch_>
file 'a'
burlyscudd has joined #ruby
wsterling has joined #ruby
RichardBaker has joined #ruby
arietis has quit [Ping timeout: 252 seconds]
wolcanus has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
wolcanus has joined #ruby
razi has quit [Quit: Leaving.]
bklane has joined #ruby
arietis has joined #ruby
sepp2k1 has joined #ruby
wsterling has quit [Ping timeout: 248 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
danslo has joined #ruby
dallasm has joined #ruby
zmike123 has quit [Quit: ~]
maxmanders has quit [Quit: Computer has gone to sleep.]
dallasm has quit [Client Quit]
dmiller_ has joined #ruby
awsmsce has joined #ruby
chrisja has quit [Quit: leaving]
saarinen has joined #ruby
<awsmsce>
has anyone out there worked on a large scale video streaming app?
rippa has quit [Ping timeout: 248 seconds]
superscott[8] has joined #ruby
kasper has joined #ruby
dmiller_ has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
Guest71964 has joined #ruby
rippa has joined #ruby
<fryguy>
awsmsce: i have sort of, not ruby though, and it was a long time ago
Mars` has quit [Ping timeout: 256 seconds]
Mars___ has quit [Ping timeout: 246 seconds]
<awsmsce>
hmm
<awsmsce>
fry guy, okay. was it predating youtube?
<fryguy>
nah, it was like 07-08
aaronmcadam has joined #ruby
yekta has quit [Quit: yekta]
alx- has joined #ruby
<awsmsce>
what language was it?
JZTech101 has joined #ruby
<fryguy>
php
<fryguy>
was at lycos
rsahae has quit [Quit: rsahae]
Mars___ has joined #ruby
<awsmsce>
awesome. I used to work with vince russo
Mars` has joined #ruby
<awsmsce>
didn't realize they were into video streaming
zastern has quit [Ping timeout: 252 seconds]
<fryguy>
they aren't anymore, it was a labs project for doing synchronized movie playback for multiple users
x1337807x has joined #ruby
<awsmsce>
so did it ever make it to beta?
<fryguy>
it was a public product for a while
awsmsce has left #ruby [#ruby]
wmoxam has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
mbotros has joined #ruby
PhatBaja has quit [Quit: Leaving.]
maxmanders has joined #ruby
brennanMKE has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
takezawa has quit [Remote host closed the connection]
peterhel1berg has quit [Ping timeout: 252 seconds]
rupee has quit [Quit: Leaving]
peterhellberg has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
pentameter has joined #ruby
Guest71964 has quit [Read error: Connection timed out]
pentameter has quit [Client Quit]
pentameter has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
pentameter has quit [Client Quit]
pentameter has joined #ruby
d3c has quit [Quit: Quit]
timonv has joined #ruby
wolcanus has quit [Remote host closed the connection]
mbotros has quit [Read error: Operation timed out]
adamnbowen has joined #ruby
ewag has quit [Remote host closed the connection]
kpshek has joined #ruby
lewis has joined #ruby
poseid_ has joined #ruby
bklane has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
khushildep has quit [Ping timeout: 248 seconds]
popl has joined #ruby
kayloos has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
maxmanders has quit [Quit: Computer has gone to sleep.]
kpshek has quit [Client Quit]
yekta has joined #ruby
<adamnbowen>
for anyone familiar with Rails validators—how do you get a validates presence: true to run before validates_with? I'd like to simply require certain fields be present, and not bother with my custom validator if they are nil
colonolGron has joined #ruby
poseid_ has quit [Quit: poseid_]
kpshek has joined #ruby
saarinen has quit [Quit: saarinen]
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
Uranio has quit [Quit: while you reading this, a kitty dies]
snearch has joined #ruby
bklane has joined #ruby
zeromodulus has joined #ruby
zeromodulus has joined #ruby
bklane has quit [Remote host closed the connection]
zeromodulus has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
bklane has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
saarinen has joined #ruby
supergiantrobot_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arietis has quit [Quit: Computer has gone to sleep.]
fermion has quit [Quit: Computer has gone to sleep.]
nbouscal has joined #ruby
teclator has quit [Ping timeout: 246 seconds]
teclator has joined #ruby
forced_request has joined #ruby
yashshah has joined #ruby
axl_ has quit [Quit: axl_]
sayan has quit [Ping timeout: 246 seconds]
x1337807x has joined #ruby
bubblehead has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
Bry8Star{T2 has joined #ruby
Davey has joined #ruby
ntus1017 has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 256 seconds]
rhys_ has quit [Quit: Leaving]
jeffreylevesque has joined #ruby
Zai00 has joined #ruby
wsterling has joined #ruby
wolcanus has joined #ruby
wolcanus has quit [Read error: Connection reset by peer]
reset has joined #ruby
maxmanders has joined #ruby
kayloos has quit [Remote host closed the connection]
wolcanus has joined #ruby
axl_ has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
brbcoding has quit []
becom33 has quit [Quit: Leaving]
wsterling has quit [Ping timeout: 246 seconds]
yashshah has quit [Remote host closed the connection]
yashshah has joined #ruby
bionoid has quit [Remote host closed the connection]
PhatBaja has joined #ruby
kobain has quit [Ping timeout: 256 seconds]
kobain has joined #ruby
kobain has quit [Excess Flood]
bamdad has joined #ruby
d4rkstalk3r has quit [Ping timeout: 268 seconds]
fomatin has joined #ruby
kobain has joined #ruby
kobain has quit [Excess Flood]
mikemac has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
kobain has quit [Excess Flood]
wolcanus has quit [Ping timeout: 256 seconds]
_JamieD_ has quit [Quit: _JamieD_]
kobain has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
fuhgeddaboudit has quit [Ping timeout: 246 seconds]
DaltonUS has joined #ruby
pothibo has joined #ruby
cmarques has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
vigintas_ has joined #ruby
Davey has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
bionoid has joined #ruby
bklane has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 256 seconds]
ferr has quit [Read error: Connection reset by peer]
rsahae has joined #ruby
Zeeraw has joined #ruby
<RobW_>
OK, I'd like to generate a checksum for an image with digest::md5, and also open that image with minimagick without loading the file into memory twice.
brennanMKE has quit [Ping timeout: 240 seconds]
<RobW_>
Could someone point me to any classes/methods I should be looking at to do this?
Xeago has joined #ruby
<MrZYX>
MiniMagick is not a libmagick binding, it shells out to the CLI utils
kreisys has joined #ruby
vlad_starkov has joined #ruby
brennanMKE has joined #ruby
airtonix has joined #ruby
<RobW_>
MrZYX: Right. It has a couple methods like open and read though.
<RobW_>
It seems like it would be a good idea to load the image as a binary stream and then pass that to md5 and minimagick read.
<RobW_>
Is there a class I should be looking at to get a binary stream from an image file?
<RobW_>
(or could be looking at)
tatsuya_o has joined #ruby
adkron has quit [Ping timeout: 256 seconds]
<RobW_>
Ah, got it. Minimagick object has to_blob
* RobW_
thanks everyone here, it's been a long day of hacking.
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
harrymoreno has quit [Ping timeout: 252 seconds]
theRoUS has quit [Ping timeout: 246 seconds]
harrymoreno has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 276 seconds]
saarinen has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<dwirc>
Hmm... I think it's more like this: There are "A"'s, and "B"'s. For every unique combination of "A" and "B", I want there to be up to 1 C.
<jblack>
and possibly no C?
<dwirc>
exactly.
<jblack>
How about a third record that has_one A, B and C.
<dwirc>
Or, alternatively, there could be a C where the data is null.
kayloos has quit [Remote host closed the connection]
<dwirc>
jblack: not sure I follow that last one
Giorgio has quit [Remote host closed the connection]
georgi_ has quit [Read error: Connection reset by peer]
brennanM_ has joined #ruby
<jblack>
a table that is has_one A, has_one, B, has_one C. C may be nil.
<jblack>
then you can add a validate() that verifies the composite ids of a and b are unique.
badquanta has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
<MrZYX>
not just C has_one A, C has_one B, validate_uniqueness_of :A_id, scope: :B_id ?
pothibo has quit [Quit: pothibo]
brennanMKE has quit [Ping timeout: 240 seconds]
cr3 has quit [Quit: leaving]
danbeck has joined #ruby
iamjbecker has quit [Remote host closed the connection]
DaltonUS has quit [Quit: DaltonUS]
forrest has quit [Quit: Leaving]
aaronmcadam has quit [Quit: Leaving...]
<dwirc>
So, I'd need a fourth table then? Sorry, I'm still trying ot understand how the associations work. Trying to see how that might be set up in Classes
<dwirc>
Class A < ActiveRecord::Base, etc. etc.
breakingthings has quit [Quit: breakingthings]
Kricir has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 256 seconds]
demet8 has joined #ruby
reset has quit [Quit: Leaving...]
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<dwirc>
I guess where I'm getting hung up is... if I say has_one, won't that preclude multiple A's even when A and B are unique, just by the nature of using "hsa_one"?
bamdad has left #ruby [#ruby]
baordog has quit [Read error: Connection reset by peer]
DonRichie has quit [Quit: Verlassend]
wyhaines has joined #ruby
<pontiki_>
...
mmitchell has quit [Ping timeout: 276 seconds]
<pontiki_>
"multiple A's" ?
<pontiki_>
do you mean more than one per C?
fuzzyhorns has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
alvaro_o has joined #ruby
kirun has quit [Quit: Client exiting]
generalissimo has quit [Remote host closed the connection]
alvaro_o has quit [Read error: Connection reset by peer]
maloik_ has quit [Ping timeout: 248 seconds]
mbotros has quit [Ping timeout: 264 seconds]
atyz has joined #ruby
danslo has quit [Quit: danslo]
blackmesa has quit [Quit: WeeChat 0.4.1]
maloik has joined #ruby
JZTech101 has joined #ruby
mfletcher has joined #ruby
danslo has joined #ruby
<MrZYX>
dwirc: describe the actual situation, not a, b, c
rsahae has quit [Quit: rsahae]
Neomex has joined #ruby
Neomex has quit [Client Quit]
m8 has quit [Quit: Sto andando via]
splittingred has joined #ruby
zacts has joined #ruby
LnL7 has quit [Quit: LnL7]
danslo has quit [Read error: Operation timed out]
harrymoreno has quit [Quit: harrymoreno]
splittingred has quit [Client Quit]
rsahae_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
fuhgeddaboudit has joined #ruby
jds_ has quit [Ping timeout: 248 seconds]
airtonix_ is now known as airtonix
icecandy has quit [Remote host closed the connection]
brum has joined #ruby
icecandy has joined #ruby
mfletcher has quit [Quit: mfletcher]
wmoxam has joined #ruby
jds_ has joined #ruby
Binauralman has joined #ruby
cofin has quit [Quit: cofin]
cmiller1 has joined #ruby
mfletcher has joined #ruby
Neomex has joined #ruby
mklappstuhl has joined #ruby
huoxito has quit [Quit: Leaving]
brennanMKE has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
icecandy has quit [Ping timeout: 252 seconds]
mikemac has quit [Read error: Connection reset by peer]
crazymykl has joined #ruby
rsahae_ has quit [Quit: rsahae_]
rsahae has joined #ruby
rupee has joined #ruby
cads has quit [Read error: Connection reset by peer]
brennanM_ has quit [Ping timeout: 240 seconds]
snearch has quit [Quit: Verlassend]
JumpMast3r has quit [Quit: JumpMast3r]
colonolGron has quit [Quit: Lost terminal]
brennanMKE has quit [Ping timeout: 264 seconds]
harrymoreno has joined #ruby
pentameter has quit [Remote host closed the connection]
diegoviola has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
Al__ has joined #ruby
emergion has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
mfletcher has quit [Quit: mfletcher]
jibi has quit [Quit: .]
Spami has quit [Quit: This computer has gone to sleep]
atyz has quit [Read error: Connection reset by peer]
sarkis has joined #ruby
ldnunes has quit [Quit: Leaving]
<dwirc>
MrZYX: Sure thing. Sorry, got distracted by the phone. Here's the actual scenario:
kpshek has quit []
fuhgeddaboudit has quit [Read error: Operation timed out]
RORgasm_ has quit [Ping timeout: 268 seconds]
<dwirc>
There are "Groups", and "Patches" (a, and b). Then there is a table for "PatchStatus", which should have up to one entry for each combinatio of {Group, Patch}.
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
<dwirc>
The idea is to track software patches that have been applied by various groups.
<dwirc>
I do it now with a Perl program and a lot of SQL. It works great, but I'm trying to learn ruby / activerecord, so trying to take existing solutions and port them on my own time.
threesome has quit [Read error: Operation timed out]
Jefus has quit [Ping timeout: 256 seconds]
Jefus has joined #ruby
lurch_ has quit [Quit: lurch_]
Neomex has quit [Quit: Neomex]
<MrZYX>
so a Group has_many PatchStatus', a Patch has_many PatchStatus', a PatchStatus belongs_to a Group and belongs_to a Patch, a PatchStatus has at most one Patch for each Group: validates_uniqueness_of :patch_id, scope: :group_id or at most one Group for each Patch: validates_uniqueness_of :group_id, scope: :patch_id. Unless I've a complete mindfuck, which might be because it's late here already
fivethreeo has quit [Ping timeout: 246 seconds]
dmiller_ has joined #ruby
Al__ has quit [Quit: Al__]
fivethreeo has joined #ruby
Kar- has quit []
<pontiki_>
isn't that Group has many Patches through PatchStatus?
haxrbyte has quit [Remote host closed the connection]
cooldman224 has joined #ruby
<pontiki_>
and then Patch has many Groups through PatchStatus?
<MrZYX>
hm
<MrZYX>
right
<dwirc>
MrZYX: thanks! got it. so, so ensure each group had at most one entry for each patch, i would just use that first entry (validates_uniqueness_of :patch_id, scope: :group_id)?
<dwirc>
pontiki_: so through then... but using through, would I still use the validates_uniqueness_of on the PatchStatus one?
<MrZYX>
pontiki_: don't remember if that automagically sets up the uniqueness constraint though
<pontiki_>
i don't think it does
<pontiki_>
actually, i'm pretty sure it doesn't
<pontiki_>
that's an extra bit here
mary5030 has quit [Read error: Operation timed out]
<terrellt>
It doesn't, but you can set up the uniqueness constraint on PatchStatus.
<pontiki_>
that's where to do it
<terrellt>
Your errors might fall out funny.
dmiller_ has quit [Ping timeout: 248 seconds]
Jefus is now known as Jefus
kindjal has quit [Read error: Operation timed out]
<terrellt>
For instance, I don't know what happens if you do patch.groups << group, try to save, and there's already a PatchStatus for that combo.
<terrellt>
Would patch get errors for the PatchStatus object?
Guedes0 has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
<pontiki_>
interesting, yeah
emergion has quit [Quit: Computer has gone to sleep.]
queston has joined #ruby
<terrellt>
I would guess so, but this is the kind of thing tests are for.
twoism has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bitkiller has joined #ruby
danslo has joined #ruby
enebo has quit [Quit: enebo]
eka has quit [Ping timeout: 256 seconds]
<bitkiller>
anybody using ruby in embedded systems like raspberry pi?
axl_ has quit [Quit: axl_]
<terrellt>
bitkiller: There was a neat conference talk about the benefits of caching in Rails during RailsConf this year - he used a raspberry pi to show the speed benefits.
relix has joined #ruby
<popl>
also rails
<popl>
yeah
<popl>
:)
io_syl has quit [Read error: Connection reset by peer]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
wmoxam has quit [Ping timeout: 248 seconds]
queston has quit [Ping timeout: 276 seconds]
MrZYX is now known as MrZYX|off
vlad_starkov has joined #ruby
io_syl has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
rickruby has joined #ruby
nettoweb has quit [Quit: nettoweb]
milardovich has joined #ruby
ntus1017 has quit [Remote host closed the connection]
zigomir_ has quit [Ping timeout: 264 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
rsahae has quit [Quit: rsahae]
brum has quit [Remote host closed the connection]
jalcine- has joined #ruby
queston has joined #ruby
MadDog31 has quit [Quit: Leaving]
brasten has quit [Quit: brasten]
<bitkiller>
i was thinking about putting rubinius in a device