artOfWar has quit [Remote host closed the connection]
fridim_ has quit [Remote host closed the connection]
<blazes816>
machogeek: how are they delimited? if it's tabs, you can split each line on \t
<machogeek>
\t dose not import correctly
<machogeek>
let me rephrase my question
mklappstuhl has quit [Ping timeout: 246 seconds]
<machogeek>
Penny for your thoughts? I have a exercise I am working through, creating a import rake task around this data (http://pastie.org/private/hy9tkt6ozjfb2spohkzwg) It dose not parse correctly using '/t' and ruby 1.9.2 CSV's support. Is it best to use REGEX or is there something out there that will hold up to dirty data like this?
<Spooner>
machogeek: A regex sounds like the best solution. Since you have strings that aren't delimited (except by dates/number columns), you are going to struggle using anything else, I think.
zeromodulus has quit [Ping timeout: 246 seconds]
cardoni has quit [Quit: cardoni]
sguselnikov has joined #ruby
heftig has quit [Quit: leaving]
yshh has joined #ruby
lggr has joined #ruby
arietis has quit [Ping timeout: 252 seconds]
pac1 has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
slainer68 has quit [Ping timeout: 248 seconds]
<machogeek>
Spooner: I agree and thanks for the followup. Now i need to brush up on my regex :)
hemanth has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
glyytchy has joined #ruby
adeponte has quit [Remote host closed the connection]
hemanth has joined #ruby
swarley has joined #ruby
lggr has joined #ruby
davidcelis has joined #ruby
manizzle has joined #ruby
alvaro_o has joined #ruby
<Spooner>
vegardx : I'd be surprised if Ruby was advancing massively faster than its peers. 1.8.7 has been around for a 4 years (1.8 for double that) and 1.9.2-3 (where .3 is a tiny step forward) has been around for over 2 years, I think.
Takehiro has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
<vegardx>
Spooner: I'm more thinking about gems :)
voodoofish430 has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
<vegardx>
And that package mantainers lag behind and there are no good routines to let ruby handle itself
<vegardx>
Well, in wheezy things seem to get a lot better though
<swarley>
I'm writing a wrapper for Nokogiri to give it Hpricot style methods
<swarley>
who wants to guess the name
<Spooner>
Oh right. I can't see a good reason to manage gems via package managers when gem works fine within Ruby.
lggr has quit [Ping timeout: 246 seconds]
<Spooner>
swarley : Hokocot? Niancat?
<vegardx>
Spooner: I would agree with you, but then you suddently get conflicts because other packages require gems that are in the package manager, and etc.
<swarley>
Hprigiri
mahmoudimus has quit [Client Quit]
lggr has joined #ruby
tfrew has joined #ruby
<Spooner>
vegardx: In fairness I havent' tried to do anything with gems in PMs, so I don't know how much of a mess it is. I suspect the PM route is designed more in an attempt to idiot-proof it, so you can get a full instant rails package, for exsample, rather than needing to install ruby and then gems? Which I guess is marketed at people new to Ruby rather than people who use it already?
hoofman has joined #ruby
eignerchris has quit [Remote host closed the connection]
<vegardx>
Spooner: More or less, yes. Like, if you want redmine, it will fetch the gems you need to via, the package manager.
<Spooner>
Wheras Ruby people would use rvm et al along with Bundler to have an internal management of the same thing, which seems more complex to outsiders until they actually try the pre-packaged route? I really don't know though.
brianpWins has joined #ruby
<Spooner>
vegardx : Trying to mix the two systems sounds like a recipe for tears though :D
<vegardx>
I guess it stems from ruby not doing so well with the versions at first, but now has done great things with rvm and bundler. So they are just lagging behind and things will probably get a lot better the next year or so.
<vegardx>
Spooner: And hairloss. Lots and lots of hairloss!
starship has quit [Killed (leguin.freenode.net (Nickname regained by services))]
Guest74193 is now known as starship
mercwithamouth has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
Guest73184 has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<vegardx>
But now I understand more about how ruby wants thing done, and can take a decision about using the package manager at all.
adeponte has quit [Remote host closed the connection]
hemanth has joined #ruby
<vegardx>
so all in all, very good learnig experience
<Spooner>
vegardx : No, I have that too and I never use PMs to manage Ruby :D
<vegardx>
but frustrating
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<swarley>
this is more daunting than i expected
<Spooner>
Haven't you finished it yet? You've been at it for at least fifteen minutes, swarley!
<swarley>
:(
<Spooner>
Or are you still working on the name?
nari_ has joined #ruby
elico has quit [Quit: elico]
icole has joined #ruby
fg3 has joined #ruby
philcrissman has joined #ruby
<swarley>
I finished the name
<swarley>
Right now i'm working on the / method
<Spooner>
I think it needs another 'i' in it.
eignerchris has joined #ruby
advorak has quit [Quit: Leaving]
<Spooner>
Sorry, not helpful. I haven't used either library directly.
hadees has joined #ruby
v0n has joined #ruby
lggr has joined #ruby
mando has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
rTypo has quit [Quit: testing]
<fg3>
ll
<Spooner>
&&
<swarley>
well the hardest part is that xpaths can be weird
mando has joined #ruby
<swarley>
*/p/**/a[@class="class/name"]
<swarley>
so i need a way to parse that efficiently into levels
iamjarvo has joined #ruby
miso1337 has joined #ruby
<Spooner>
Just look at how hpricot does it?
lggr has quit [Ping timeout: 276 seconds]
hemanth has quit [Read error: Connection reset by peer]
<swarley>
essentially i need to get ["*", "p", "**", "a[@class=\"class/name"]"]
<swarley>
hpricot is all in c x_x
hemanth has joined #ruby
<swarley>
i suppose i can dig through there though
<Spooner>
There is a reason they are both in C, but I guess parsing queries isn't the hard bit.
<swarley>
Well, if i was handling the XML itself, I would be writing the wrapper in C
mikepack has joined #ruby
<swarley>
but since i am just wrapping functions, its pointless
<swarley>
I'd just be making ruby calls
<Spooner>
Yeah, of course.
lggr has joined #ruby
<Paradox>
LE
mercwithamouth has joined #ruby
axl_ has quit [Quit: axl_]
<swarley>
oh god
<swarley>
there are hundreds of goto statements
<Spooner>
No, we are talking about _why. He can do no evil ;)
miso1337 has quit [Ping timeout: 245 seconds]
<swarley>
case 32: goto st25;
<swarley>
case 62: goto tr18;
<swarley>
case 91: goto st26;
<Spooner>
Generated code? No human would write that crap.
<swarley>
Probably, there are also a lot of #line preprocessor directives
<swarley>
which indicates use of yacc/lex
<Spooner>
Makes sense.
<swarley>
but it does use a bunch of ruby statements..
miso1337 has joined #ruby
h4mz1d has joined #ruby
<swarley>
but its probably all within lex
mikepack has quit [Remote host closed the connection]
uris_ has joined #ruby
<Spooner>
Could have started machine-generated before it was hooked into Ruby.
<Spooner>
So, anyway, probably not the place for you to look ;)
lggr has quit [Ping timeout: 255 seconds]
<swarley>
Well, lex looks like PATTERN { CodeBlock }
<swarley>
so it could just be that
<Spooner>
It is a million years ago since I played with yacc, so don't remind me of the horror (I can't remember what I used it for even).
<Paradox>
any easy way to copy/paste on ruby, without using the clipboard gem or pbcopy
Synthead has joined #ruby
lggr has joined #ruby
<swarley>
ah, i was looking for that
<swarley>
@ Spooner
<swarley>
i went through like, 6 different methods
<Spooner>
swarley : Yeah, I can never remember it. It doesn't imply nil removal to me.
baroquebobcat has joined #ruby
<Spooner>
Paradox : Er no, the clipboard gem is...you know...for that.
<Paradox>
Spooner, thats what i was afraid of
<Paradox>
ah well
<Paradox>
guess i'll use the gem
<Paradox>
i like to minimize gem dependencies as much as possible
nitti has quit [Ping timeout: 260 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
indian has quit [Ping timeout: 246 seconds]
<Spooner>
There wouldn't be a gem if it was possible to do otherwise (well, the main advantage of the gem is that it manages several simple, but different methods on all OSes).
hemanth has quit [Read error: Connection reset by peer]
<xbayrockx>
anyone have a raspberry pi?
<profx_>
ppl @ work do
hemanth has joined #ruby
<swarley>
blah, i hate regex sometimes
seoaqua has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
JonnieCache has joined #ruby
Bosma has joined #ruby
radic has quit [Read error: Operation timed out]
Orcris has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
maletor has joined #ruby
medik- has quit [Quit: Leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<profx_>
i say that about the inlaws
skaczor has quit [Ping timeout: 244 seconds]
swarley has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
freezey has joined #ruby
swarley has joined #ruby
shammancer has joined #ruby
Banistergalaxy has joined #ruby
xaq has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
hemanth has quit [Read error: Connection reset by peer]
alvaro_o has quit [Quit: Ex-Chat]
hemanth has joined #ruby
xaq has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
xaq has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
radic has joined #ruby
xaq has joined #ruby
siameseguy has quit [Quit: siameseguy]
tjbiddle has joined #ruby
avandendorpe has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
krz has quit [Ping timeout: 260 seconds]
Bosma has quit [Quit: leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
phanousit has joined #ruby
xaq has quit [Remote host closed the connection]
phanousit has left #ruby [#ruby]
elico has joined #ruby
fir_ed has quit [Ping timeout: 245 seconds]
cakehero has joined #ruby
indian has joined #ruby
xaq has joined #ruby
voodoofish has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
adeponte has joined #ruby
Takehiro has joined #ruby
sent-hil has joined #ruby
mando has quit [Remote host closed the connection]
<profx_>
im just thinking of an example off the top of my head
<bnagy>
actually reduce would be better for that if you were banned from using max
<bnagy>
but let's not get into the weeds
<iamjarvo>
i guess each would be for straight iterating over the collection and not transforming it
xorgnak has quit [Remote host closed the connection]
lggr has joined #ruby
Takehiro has joined #ruby
xaq has joined #ruby
xorgnak has joined #ruby
maletor has joined #ruby
<profx_>
and if |element| is an array ?
jenrzzz has joined #ruby
sent-hil has quit [Remote host closed the connection]
rakl has joined #ruby
Quadlex has joined #ruby
icole has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
gabrielr_ has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
xorgnak has quit [Read error: No route to host]
lggr has joined #ruby
xorgnak has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
reset has joined #ruby
Takehiro has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
mando has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
cakehero has quit [Quit: Leaving...]
quest88 has joined #ruby
lggr has joined #ruby
ananthakumaran has joined #ruby
becom33 has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<bnagy>
sry, had to go out - if it's an array you do whatever you do to Arrays
fir_ed has joined #ruby
<Quadlex>
Hmm. Stuck on an architecture issue
lggr has joined #ruby
h4mz1d has joined #ruby
nyrb has joined #ruby
<Quadlex>
I've a class which holds data, and has a "datatype" variable. I need to provide that type to an external service
ForevernadeAFK has quit [Remote host closed the connection]
<Quadlex>
It's derived from the presence or otherwise of other values
<Quadlex>
Should I set it manually, set it automatically, or figure it out in a business layer?
xiphiasx_ has joined #ruby
<Quadlex>
Manually has the benefit of demonstrating intent
ananthakumaran has quit [Quit: Leaving.]
em0ral has joined #ruby
<Quadlex>
Bsuiness layer means I on;y have to worry about it when I fuck with the external service BUT anything else using the object needs to know which values create which type
mikepack has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 244 seconds]
freeayu has joined #ruby
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<bnagy>
why not just have the class be the type?
Tearan has quit [Quit: Sleepy Badger....]
em0ral has left #ruby [#ruby]
lledet has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
mahmoudimus has joined #ruby
eignerchris has quit [Remote host closed the connection]
<Quadlex>
bnagy: *{facepalm}* Or I could do things the logical way, sure.
<Quadlex>
TY
xorgnak has quit [Remote host closed the connection]
lggr has joined #ruby
icole has joined #ruby
mmitchell has joined #ruby
margle has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
davorb has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
icole has quit [Ping timeout: 260 seconds]
akem has joined #ruby
lggr has joined #ruby
mmitchell has quit [Ping timeout: 246 seconds]
akem has quit [Client Quit]
thedeadghost has joined #ruby
akem has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
Takehiro has joined #ruby
Elhu has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Leaving...]
chin-tastic has quit [Ping timeout: 245 seconds]
Elhu has quit [Client Quit]
ananthakumaran has joined #ruby
lggr has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
hemanth has left #ruby ["Leaving"]
drago757 has quit [Quit: drago757]
yxhuvud has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
hussein- has joined #ruby
hussein- has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
ericwood has quit [Ping timeout: 260 seconds]
cyt93cs has quit [Ping timeout: 245 seconds]
ericwood has joined #ruby
lggr has joined #ruby
davorb has quit [Quit: leaving]
bluOxigen has joined #ruby
dmiller_ has joined #ruby
drago757 has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
reset has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
cardoni has quit [Quit: cardoni]
lggr has joined #ruby
reset has quit [Client Quit]
Kruppe has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 252 seconds]
cyt93cs_ has joined #ruby
justinmcp has quit [Ping timeout: 245 seconds]
glyytchy has quit [Quit: glyytchy]
lggr has quit [Ping timeout: 252 seconds]
justinmcp has joined #ruby
lggr has joined #ruby
seanyo has quit [Ping timeout: 246 seconds]
justsee has quit [Quit: Leaving...]
cyt93cs_ has quit [Ping timeout: 265 seconds]
cyt93cs_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
ryanf has joined #ruby
glyytchy has joined #ruby
lggr has joined #ruby
rakunHo has joined #ruby
c0rn_ has quit []
fantazo has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 244 seconds]
Tearan has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
answer_42 has joined #ruby
Shamgar has quit [Read error: No route to host]
slainer68 has joined #ruby
lggr has joined #ruby
<xbayrockx>
anyone know of a cheap and miniature solar system that can povide power to a mini usb device?
ryanf has quit [Quit: broken pipes |||]
deeprogram has joined #ruby
samuel02 has joined #ruby
glyytchy has quit [Quit: glyytchy]
Shamgar has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
slainer68 has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby
elico has joined #ruby
emanu has joined #ruby
<reactormonk>
xbayrockx, nuclear reactor?
tonini has joined #ruby
lggr has joined #ruby
gabrielr_ has quit [Remote host closed the connection]
jerius has joined #ruby
roadt has quit [Ping timeout: 265 seconds]
djdb has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
drago757 has quit [Quit: drago757]
lggr has joined #ruby
RudyValencia has quit [Quit: Hacked By Chinese!]
ryanf has joined #ruby
Krists has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
Krists has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
fschuindt has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<fschuindt>
Guys, how I joint two arrays in one? Like [1, 2] + [3, 4] = [1, 2, 3, 4]
lggr has joined #ruby
<bnagy>
fschuindt: ... yes, that is correct
<fschuindt>
bnagy: oh, I have when its happens
irleif has joined #ruby
Takehiro has joined #ruby
<fschuindt>
bnagy: hahaha, thank you
<bnagy>
:P
<fschuindt>
bnagy: hate*
justinmcp has quit [Remote host closed the connection]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 248 seconds]
maesbn has joined #ruby
Banistergalaxy has quit [Quit: Bye]
Banistergalaxy has joined #ruby
lggr has joined #ruby
kyletcarey has quit [Ping timeout: 240 seconds]
Erfankam has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
justinmcp has joined #ruby
aganov has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
und3f has joined #ruby
lggr has joined #ruby
<shevy>
bnagy: sex*
cardoni has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
xaq has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
fixl has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
Banistergalaxy has joined #ruby
lggr has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 252 seconds]
senny has joined #ruby
zommi has joined #ruby
fatninja has joined #ruby
AndChat| has joined #ruby
xaq has joined #ruby
Tom2 has quit [Ping timeout: 265 seconds]
irleif has joined #ruby
AndChat- has joined #ruby
AndChat| has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 256 seconds]
Banistergalaxy has joined #ruby
davorb has joined #ruby
georgi has joined #ruby
Forevernade has joined #ruby
lggr has joined #ruby
nemesit|osx has joined #ruby
xaq has quit [Remote host closed the connection]
hemanth has joined #ruby
maletor has joined #ruby
jenrzzz has joined #ruby
AndChat- has quit [Ping timeout: 260 seconds]
a_a_g has quit [Quit: Leaving.]
nemesit has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
sakh has quit [Ping timeout: 255 seconds]
Morkel has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
kil0byte has quit [Remote host closed the connection]
workmad3 has joined #ruby
piotr_ has joined #ruby
JohnBat26 has joined #ruby
Vinz_` is now known as Vinz_
lggr has joined #ruby
paolooo has quit [Quit: Page closed]
miso1337_ has joined #ruby
sterNiX has quit [Excess Flood]
xorgnak has joined #ruby
Tom2 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
sterNiX has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
jprovazn_away is now known as jprovazn
Banistergalaxy has joined #ruby
lggr has joined #ruby
miso1337 has quit [Ping timeout: 246 seconds]
miso1337_ is now known as miso1337
timonv has quit [Remote host closed the connection]
mucker has joined #ruby
dhruvasagar has joined #ruby
fschuindt has quit [Remote host closed the connection]
mneorr has joined #ruby
bartj3 has joined #ruby
xorgnak has quit [Remote host closed the connection]
vectorshelve has joined #ruby
xorgnak has joined #ruby
joelio_ has quit [Read error: Connection reset by peer]
wedgeV has quit [Remote host closed the connection]
Erfankam has quit [Remote host closed the connection]
Erfankam has joined #ruby
sakh has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
anderse has joined #ruby
Vinz_ is now known as Vinz_`
siyusong has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 255 seconds]
hemanth has joined #ruby
lggr has joined #ruby
thone has joined #ruby
quest88 has quit [Quit: quest88]
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
jenrzzz has quit [Read error: Operation timed out]
dangerousdave has joined #ruby
thone_ has quit [Ping timeout: 248 seconds]
ryanf has quit [Quit: leaving]
lggr has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
dangerousdave has quit [Client Quit]
Romoku has joined #ruby
zigomir has joined #ruby
MACscr has left #ruby [#ruby]
JonnieCache has quit [Ping timeout: 255 seconds]
becom33 has quit [Ping timeout: 246 seconds]
xorgnak has quit [Remote host closed the connection]
becom33 has joined #ruby
<Romoku>
Hi guys, anyone have any tips to share about working with XML in ruby?
lggr has joined #ruby
xorgnak has joined #ruby
mucker has quit [Ping timeout: 260 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
hotovson_ has joined #ruby
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
hoelzro|away is now known as hoelzro
burgestrand1 has quit [Ping timeout: 240 seconds]
dangerousdave has joined #ruby
mfridh_ is now known as mfridh
lggr has quit [Ping timeout: 246 seconds]
anderse has quit [Quit: anderse]
glyytchy has joined #ruby
wallerdev has quit [Quit: wallerdev]
lggr has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
hemanth has joined #ruby
Takehiro has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
sspiff has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 246 seconds]
Takehiro has quit [Ping timeout: 246 seconds]
xorgnak has quit [Read error: Connection reset by peer]
lggr has joined #ruby
a_a_g has joined #ruby
justinmcp has quit [Remote host closed the connection]
emanu has quit [Quit: emanu]
xorgnak has joined #ruby
mahmoudimus has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
Tearan has quit [Quit: Sleepy Badger....]
Virunga has joined #ruby
eldariof has joined #ruby
lggr has joined #ruby
xorgnak has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
sspiff has joined #ruby
elsifaka has quit [Quit: Veloma e!]
lggr has joined #ruby
becom33 has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
becom33 has joined #ruby
xorgnak has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Elhu has joined #ruby
love_color_text has quit [Remote host closed the connection]
emanu has joined #ruby
artnez has quit [Quit: artnez]
lggr has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
xorgnak has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
icole has joined #ruby
xorgnak has joined #ruby
Virunga is now known as LennyLinux
emanu has quit [Client Quit]
xorgnak has quit [Remote host closed the connection]
berserkr has quit [Quit: Leaving.]
scottrb has joined #ruby
QKO has joined #ruby
Ivo has joined #ruby
QKO_ has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
clj_newb has joined #ruby
awestroke has joined #ruby
morf has joined #ruby
lggr has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
scottrb has quit [Quit: Leaving]
sspiff has quit [Remote host closed the connection]
zii has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
icole has quit [Remote host closed the connection]
elsifaka has joined #ruby
sterNiX has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
SmoothSage has quit [Read error: Connection reset by peer]
SmoothSage has joined #ruby
fir_ed has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 252 seconds]
Archisze has joined #ruby
Averna has quit [Quit: Leaving.]
GVRV has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
sspiff has joined #ruby
robotmay has joined #ruby
cezar has joined #ruby
sterNiX has joined #ruby
himsin has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
frederic has joined #ruby
lggr has joined #ruby
anbz has joined #ruby
hamed_r has joined #ruby
anbz has left #ruby [#ruby]
piotr_ has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
slainer68 has joined #ruby
ephemerian has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
piotr_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
monkegjinni has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
JonnieCache has joined #ruby
hemanth has joined #ruby
Vainoharhainen has joined #ruby
lggr has joined #ruby
zii has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
frederic has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
himsin has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
clj_newb has quit [Ping timeout: 252 seconds]
LouisGB has joined #ruby
frederic has joined #ruby
ABK has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
himsin has joined #ruby
timmow has joined #ruby
GeekOnCoffee has quit [Ping timeout: 244 seconds]
Erfankam1 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
tchebb has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
GeekOnCoffee has joined #ruby
<JonnieCache>
never seen this in a class definition before: `class GalleryPhoto < Sequel::Model(DB[:gallery_photos].order(:sort_order, :id))`
<JonnieCache>
whats that called and what does it do?
Erfankam has quit [Ping timeout: 246 seconds]
<hoelzro>
JonnieCache: it's just subclassing a class returned from a method call
irleif has joined #ruby
<JonnieCache>
hmmmm
<JonnieCache>
so class names are actually method calls?
<JonnieCache>
is the class name actually an implicit call to some constructor?
<hoelzro>
no
<hoelzro>
when you do class Something < SomethingElse
a_a_g has quit [Read error: Connection reset by peer]
<hoelzro>
it's just calling a method on the SomethingElse object to create the new class
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<hoelzro>
consider puts String in irb/pry
hemanth has joined #ruby
piotr_ has quit [Remote host closed the connection]
irleif has quit [Client Quit]
lggr has joined #ruby
Dreamer3 has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
sepp2k has joined #ruby
hbpoison has joined #ruby
<JonnieCache>
hmm i still dont really understand
<JonnieCache>
what method is being called?
anderse has joined #ruby
<JonnieCache>
< ?
clj_newb has joined #ruby
<hoelzro>
I can't remember
<hoelzro>
the < is just sugar
irleif has joined #ruby
roadt has joined #ruby
timonv has joined #ruby
* JonnieCache
looks for his copy of TRPL
lggr has quit [Ping timeout: 245 seconds]
Jork1 has joined #ruby
<hoelzro>
there's no reason you couldn't do the following:
<hoelzro>
c = MyClass ; class D < c ... end
<JonnieCache>
I understand that
Jork1 has quit [Client Quit]
sterNiX has quit [Ping timeout: 246 seconds]
<hoelzro>
which parameters? D and c?
<JonnieCache>
i want to know where those parameters are sent
lggr has joined #ruby
<hoelzro>
probably Class.new
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
<JonnieCache>
class A < B(c, d) i want to know where c and d end up
<hoelzro>
that's up to B
<JonnieCache>
theyre passed to some method on B, so which method?
<hoelzro>
B could just return an anonymous class that closes over the variables
<hoelzro>
B's a method, not a class in this case
<hoelzro>
it just *looks* like a class
<JonnieCache>
hmmmmmmmmm
<hoelzro>
because having a method name on the RHS of < looks funny
<JonnieCache>
curiouser and curiouser
<hoelzro>
consider class A < b(c, d)
Beoran_ has joined #ruby
<hoelzro>
the difference is in the naming, that's it
Jork1 has joined #ruby
<JonnieCache>
lol i just called pry's show-method on B and it just dumped the whole class
lggr has quit [Ping timeout: 255 seconds]
sterNiX has joined #ruby
_JamieD_ has joined #ruby
vlad_starkov has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
Beoran__ has quit [Ping timeout: 246 seconds]
frederic has quit [Remote host closed the connection]
_JamieD_ has quit [Client Quit]
deeprogram has left #ruby [#ruby]
_JamieD_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
lupine_85 has quit [Ping timeout: 268 seconds]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
colinbm has joined #ruby
a_a_g1 has joined #ruby
lggr has joined #ruby
good_afternoon has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
frederic has joined #ruby
a_a_g has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
Archisze has quit [Read error: Connection reset by peer]
bobbbo has joined #ruby
bobbbo has quit [Client Quit]
lggr has joined #ruby
tvw has joined #ruby
<shevy>
output.rb:52: warning: global variable `$use_colours' not initialized
<shevy>
how would I ask whether it is initialized or not?
<shevy>
the code is like this right now:
<shevy>
run_this if $use_colours
mtfk_ has joined #ruby
beachandbytes has joined #ruby
<mtfk_>
hi, how to create require switch using OptionParse?
<hoelzro>
shevy: defined?
<hoelzro>
or set it at the top
<hoelzro>
$use_colours = false
<shevy>
hoelzro hmm like: run_this if defined?($use_colours) ?
<hoelzro>
and override later if needed
<hoelzro>
shevy: that works, but I think explicitly initializing it to the default would be best
mklappstuhl has joined #ruby
<shevy>
yeah hmm
lggr has quit [Ping timeout: 255 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
glyytchy has quit [Quit: glyytchy]
jgrevich has quit [Quit: jgrevich]
Dreamer3 has joined #ruby
a_a_g1 has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
seoaqua has quit [Ping timeout: 244 seconds]
a_a_g has joined #ruby
justinmcp has joined #ruby
icole has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
lupine_85 has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
baphled has quit [Ping timeout: 246 seconds]
icole has quit [Ping timeout: 246 seconds]
manizzle has quit [Ping timeout: 265 seconds]
lggr has joined #ruby
cardoni has quit [Quit: cardoni]
seoaqua has joined #ruby
cardoni has joined #ruby
cascalheira has joined #ruby
hoelzro is now known as hoelzro|away
hemanth has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
a_a_g has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
CodeDroid__ has joined #ruby
brtdv has quit [Ping timeout: 260 seconds]
samphippen has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
mklappstuhl has quit [Ping timeout: 246 seconds]
cardoni has quit [Quit: cardoni]
brtdv has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
arielpts has quit [Ping timeout: 246 seconds]
seoaqua has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
seoaqua has joined #ruby
Erfankam1 has quit [Quit: Leaving.]
arielpts has joined #ruby
manizzle has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 272 seconds]
justinmcp has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
banseljaj has quit [Excess Flood]
banseljaj has joined #ruby
adeponte has quit [Remote host closed the connection]
elico has quit [Quit: elico]
banseljaj is now known as imami|afk
lggr has joined #ruby
brtdv has quit [Ping timeout: 260 seconds]
arturaz has joined #ruby
roadt has joined #ruby
irleif has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
tonini has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 255 seconds]
_cheney2 has joined #ruby
_cheney has quit [Ping timeout: 256 seconds]
elico has joined #ruby
pac1 has joined #ruby
chussenot has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
love_color_text has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
glupo has quit [Remote host closed the connection]
lkba has joined #ruby
lggr has joined #ruby
hoelzro|away is now known as hoelzro
hbpoison has quit [Ping timeout: 256 seconds]
love_color_text has quit [Ping timeout: 245 seconds]
brtdv has joined #ruby
seoaqua has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 260 seconds]
chussenot_ has joined #ruby
chussenot has quit [Ping timeout: 244 seconds]
chussenot_ is now known as chussenot
fantazo has quit [Remote host closed the connection]
lggr has joined #ruby
R0ute1 has joined #ruby
rakl has quit [Quit: sleeping]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
w4lt3r has joined #ruby
samphippen has joined #ruby
w4lt3r is now known as w4lk3r
hemanth has quit [Read error: Connection reset by peer]
PapaSierra has joined #ruby
_val_ has joined #ruby
good_morning has joined #ruby
hemanth has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
<_val_>
Hello everyone. I've a process running like git 24274 5.1 1.3 299876 140188 ? Sl 11:34 1:11 Rack: /var/www/myruby/ Now I want to remove myruby on some other partition due to lack on space on root partitiion '/'. What happens with the process. How would I savely move this directory to let's say /srv/data/myruby
<_val_>
I always could keep a symlink on /var/www/myruby which points to /srv/data/myruby but the process won't be aware I guess.
good_afternoon has quit [Ping timeout: 276 seconds]
lggr has joined #ruby
rakl has joined #ruby
<PapaSierra>
morning. i'm a ruby noob. i'm using capistrano to deploy. from a syntax, namespace and variable scope point of view i'm not sure if this will work: http://www.hastebin.com/mukayiwegu.rb notice the use of :deploy_to on line 19. it is declared on either line 3 or 8. please take a look and let me know what to do.
haxrbyte has joined #ruby
areil has joined #ruby
Man has joined #ruby
Man has left #ruby [#ruby]
haxrbyte_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
good_afternoon has joined #ruby
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<shevy>
most folks here don't know capistrano
hemanth has joined #ruby
Man has joined #ruby
<PapaSierra>
shevy sorry that was just a detail. my question is ruby related, not capistrano related
<Man>
hi all people
fermion has joined #ruby
lggr has joined #ruby
Man has left #ruby [#ruby]
<PapaSierra>
it's just a syntax/scoping/namespacing question
<shevy>
ok then
<shevy>
if your question is purely ruby related
<shevy>
then you have this:
<shevy>
task :my_task do; run "touch #{:deploy_to}/myfile"; end
<shevy>
right?
<PapaSierra>
i'm ok with the basics of ruby, i've read some tutes and practiced a little. but this hash and namespace is beyond me
reinaldob has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
<shevy>
I don't see a hash in this part of the code
<PapaSierra>
yeah that's what i *mean* but i'm not sure if the syntax is right
<PapaSierra>
sorry, not hash. symbol
<shevy>
ok
<JonnieCache>
PapaSierra: it looks fine to me
<PapaSierra>
my feeling is by the time i hit line 19 the variable will be inaccessible due to name spaces?
<shevy>
you call a method called task() and you pass one argument to it, named :my_task
good_morning has quit [Ping timeout: 276 seconds]
<JonnieCache>
PapaSierra: the key is, the stuff inside those `task` blocks isnt all run at once, those tasks functions are being stored and run later on
<shevy>
you also pass it a block
<shevy>
run "touch #{:deploy_to}/myfile"
<shevy>
this looks wrong to me
<shevy>
you try to use #{} on a symbol, which makes no sense at all
<shevy>
ah
<shevy>
it becomes a string :)
<shevy>
so it would be like:
<shevy>
run "touch deploy_to/myfile"
<PapaSierra>
eek
<JonnieCache>
its supposed to be a method call, PapaSierra you should remove the : in that case
<shevy>
not sure if that is what you want
<PapaSierra>
what i *want* is: "touch /var/www/staging/myfile"
<shevy>
if you remove the : ruby would believe it is a method or a variable, as it does not find a variable, it would try to run a method called deploy_to()
<shevy>
k sounds as if you want a variable
<JonnieCache>
thats what you want
<PapaSierra>
JonnieCache remove the : before :deploy_to?
<shevy>
but I dont see that variable anywhere
lggr has quit [Ping timeout: 245 seconds]
<shevy>
:foo is always a symbol, never a variable
<JonnieCache>
yes, on line 19
<JonnieCache>
with the : its a symbol, which is basically like a string
<JonnieCache>
you want it to be a method call
<PapaSierra>
yes, so i want the value set up in line 3 to be used in line 19
<JonnieCache>
exactly
<shevy>
PapaSierra ruby code is terse, but you always need to make sure that what you write down is what you really want to use :)
<JonnieCache>
the `set` method in capistrano creates a method with that name
<JonnieCache>
its a bit weird but thats how capistrano works
<shevy>
hehe
<shevy>
I would not have known :)
<shevy>
it all looks like magic to me here
lggr has joined #ruby
<JonnieCache>
PapaSierra: as you can see it sets different values for staging and production
<PapaSierra>
oh, so once again i've bitten off more than i can chew! classic me
<PapaSierra>
right
<JonnieCache>
no you havent its fine :)
<shevy>
why? this is specific to a project ... capistrano
<shevy>
without reading documentation, noone would know what set() does
<PapaSierra>
so when i "call" that function i should get a returned string like "/var/www/staging"
<shevy>
didn't JonnieCache say it creates a method for you
<shevy>
probably called deploy_to() and it would return that string?
<PapaSierra>
shevy that's my bad, being new to ruby i didn't know what syntax comes from ruby and what belongs to capistrano. apologies
<JonnieCache>
yes
<shevy>
then you could use that in line 19
Axsuul has quit [Ping timeout: 272 seconds]
<shevy>
PapaSierra nono it all uses ruby syntax anyway, I just mean that the capistrano guys wrote those methods
<PapaSierra>
so on line 19 i need touch #{deploy_to}/myfile
Axsuul has joined #ruby
<shevy>
you could write a capistrano replacement on your own too :)
<JonnieCache>
indeed
<PapaSierra>
perfect. i've learned a little more ruby today!
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<shevy>
what I dont understand is this:
hsbt is now known as hsbt_away
<shevy>
task :migrate do; end
x0F_ is now known as x0F
<shevy>
the do end seems not necessary
good_morning has joined #ruby
<JonnieCache>
shevy: probably correct, i think thats in a lot of example code thats out there
<shevy>
as it is empty anyway!
<shevy>
hehe seems so
<PapaSierra>
hmm, well that's copy/paste from a capistrano guide, so my guess is maybe you can add stuff in the middle?
<shevy>
I always try to use as little syntax as possible (unless it becomes not readable)
<shevy>
yeah probably they want to encourage you to add something there
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<PapaSierra>
yeah, following blogs is very often misleading. i try to stick as close to the official docs as possible
<shevy>
yup!
<PapaSierra>
thanks again, i'm quite excited about my new knowledge!
good_afternoon has quit [Ping timeout: 276 seconds]
lggr has joined #ruby
ForevernadeAFK has joined #ruby
Forevernade has quit [Ping timeout: 256 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 246 seconds]
rakl has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
GVRV has joined #ruby
good_afternoon has joined #ruby
Xeago_ has joined #ruby
good_morning has quit [Ping timeout: 276 seconds]
Xeago has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
atran has joined #ruby
<atran>
mercwithamouth has joined #ruby
hbpoison has joined #ruby
good_morning has joined #ruby
manizzle has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
atran has quit [Quit: Leaving]
areil has quit [Ping timeout: 246 seconds]
areil has joined #ruby
lggr has joined #ruby
atran has joined #ruby
good_afternoon has quit [Ping timeout: 276 seconds]
<shevy>
match AWKScriptCodeHl +\(\<awk\>\_.\{-}[=\\]\@<!\(\\$\)\@<!\)\@<=[=\\]\@<!'\_.\{-}[\\]\@<!'+
jenrzzz has joined #ruby
<shevy>
how can people like this
<hoelzro>
like what?
<hoelzro>
Vim syntax highlighting?
Guest22757 has joined #ruby
margle has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
acrocity_ has joined #ruby
justsee has quit [Ping timeout: 248 seconds]
acrocity_ is now known as acrocity
lggr has joined #ruby
bartj3 has quit []
acrocity- has quit [Ping timeout: 260 seconds]
roadt has joined #ruby
manizzle has joined #ruby
lggr has quit [K-Lined]
Xeago_ has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
love_color_text has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
Xeago has quit [Remote host closed the connection]
atran has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
pantomime_is_che has joined #ruby
Xeago has joined #ruby
R0ute1 has quit [Remote host closed the connection]
bartj3 has joined #ruby
pantomime_is_che has quit [Client Quit]
pantomime_cheap has joined #ruby
CodeDroid__ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 255 seconds]
pothibo has joined #ruby
workmad3 has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
irleif has quit [Quit: Computer has gone to sleep.]
Krists has joined #ruby
josh^ has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
d3vic3 has joined #ruby
niklasb has joined #ruby
replore_ has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
DZwijnenburg has joined #ruby
DZwijnenburg has quit [Client Quit]
chussenot has quit [Quit: chussenot]
DZwijnenburg has joined #ruby
<DZwijnenburg>
Hi
<kn330>
Good Evening folks!
manizzle has quit [Remote host closed the connection]
<PapaSierra>
JonnieCache you still there?
<PapaSierra>
everything is working great, but in capistrano i'm now trying to do $ cap deploy:cleanup and it says "Please specify the name of your application, set :application, 'foo'". does my application have a name?! wth?
bartj3 has quit []
sebastorama has joined #ruby
rumba has joined #ruby
kpshek has joined #ruby
jerius has joined #ruby
<Xeago>
PapaSierra: an application probably needs a name
<Xeago>
so it can be referred to later on
Takehiro has joined #ruby
<PapaSierra>
Xeago i've read some of the capistrano guide and i've never come across naming your application, so i'm not sure where/how to give it a name
<Xeago>
Please specify the name of your application, set :application, 'foo'
<Xeago>
by using set :application, 'name of applicatino'
<PapaSierra>
in my Capfile? ok, makes sense i guess. not sure why it's necessary though
bairui has quit [Read error: Connection reset by peer]
<JonnieCache>
PapaSierra: it wants you to choose a name
<JonnieCache>
its not asking you to type in some prexisting name
Banistergalaxy has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
<Xeago>
PapaSierra: products we have where I work have the following names: sunshine booter, morebutter, nopants
<Xeago>
add a comma after sunshine
<Xeago>
sometimes a product spinoff a marketing request originating from a funny joke
<Xeago>
and we name it that way
colinbm has quit [Quit: colinbm]
<Xeago>
it's useful to have a handle to use when referring to something
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
fermion has quit [Ping timeout: 240 seconds]
<JonnieCache>
Xeago: wtf
<JonnieCache>
are those test names?
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
Guest22757 has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
rakunHo has quit [Remote host closed the connection]
linoj has quit [Quit: linoj]
akem has quit [Max SendQ exceeded]
akem has joined #ruby
<mtfk_>
how to set require switch in OptionParser, is any dry way to do that or for each switch I need to check that manually?
mtfk_ is now known as mtfk
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
Takehiro has quit [Remote host closed the connection]
<Xeago>
JonnieCache: nope of products in production
<Xeago>
sunshine is our adserver
<Xeago>
booter kicks off bad videos
<Xeago>
morebutter highlights good videos
<JonnieCache>
ohh
<JonnieCache>
those arent really products
<Xeago>
nopants also kicks off bad videos but uses different algorithms/semantics to come to a conclusion
<Xeago>
they are
<Xeago>
:)
<JonnieCache>
products are for sale
<Xeago>
we sell it
<Xeago>
nopants usually takes a bit longer than booter
_Mon_Ouie_ has joined #ruby
Morkel has quit [Quit: Morkel]
<Xeago>
They are part of our suite
<JonnieCache>
who are you selling to? other devs?
<Xeago>
video marketing company's
<Xeago>
we also have a backing company, videofyme
<Xeago>
which uses all of these products
<JonnieCache>
fair enough. they are slightly unusual names though :)
Takehiro has joined #ruby
<Xeago>
as I said, most of our products are spinoffs of idea's afte rjokes
My_Hearing has quit [Read error: Connection reset by peer]
<Xeago>
mostly on friday afternoon after some lager
skaczor has joined #ruby
chussenot has joined #ruby
larissa has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
<Xeago>
what is the difference between a proc and a lambda?
<PapaSierra>
Xeago, JonnieCache sorry i had a meeting. if my project is called "Online Betting App", should i then edit my Capfile and add the line:
<PapaSierra>
set :application, "bettingapp"
<Xeago>
for example, there is no right way to name an app
<Xeago>
I am currently working on an app that is called sweetpony
<Xeago>
it doesn't do anything with pony's
<PapaSierra>
and that's the name of the entire project?
<Xeago>
it's our search platform
coin3d has joined #ruby
<Xeago>
while it is an 'entire project', it is not everything we do where I work
<JonnieCache>
PapaSierra: there are only two hard problems in computer science: cache invalidaiton, and naming things
<Xeago>
PapaSierra: why are you named PapaSierra?
<JonnieCache>
all toher problems can be reduced to special cases of the above two
<Xeago>
so I can refer to you uniquely
<JonnieCache>
*other
<Xeago>
JonnieCache: *correction vs correction*
<Xeago>
or vimstyle
<Xeago>
but vimstyle requires typing the misspelling which is dubious
<PapaSierra>
i'm still not seeing the logic. a Capfile is specific to a project (unless this is a misguided assumption on my part), so me doing $ cd bettingapp/; cap deploy:cleanup should be enough to uniquely identify the betting app without having to give it a name. what am i missing?
<Xeago>
you could make it dynamic
fg3 has joined #ruby
<PapaSierra>
oh, so one capfile could apply to multiple apps?
<Xeago>
it could
<PapaSierra>
ok
<Xeago>
then again
<Xeago>
that's how one could use capistrano
bbttxu has quit [Quit: bbttxu]
xkx_ is now known as xkx
<PapaSierra>
hmm after all that cap deploy:cleanup wants a password, and it doesn't make it clear password for what?
<Xeago>
it should've printed the command that requires it?
<Xeago>
no idea, because I don't deal with deploys atm
<PapaSierra>
it's pretty ambiguous about its intent
<PapaSierra>
i think i'll go back to manual clean ups
jeffreybaird has joined #ruby
<PapaSierra>
for instance this makes no sense: executing "ls -xt /u/apps/sleepout/releases"
sepp2k has quit [Ping timeout: 246 seconds]
<Xeago>
it prolly wants a listing of that
dhruvasagar has quit [Ping timeout: 265 seconds]
<PapaSierra>
but i've never seen anything like /u/apps/sleepout/releases before, so that's just not right
<Xeago>
look what cleanup does
<Xeago>
read the capfile
dhruvasagar has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<PapaSierra>
it's not in my capfile
<PapaSierra>
cleanup must be defined in some sourcecode somewhere
<JonnieCache>
its part of capistrano itself
<JonnieCache>
cleanup removes old versions
<PapaSierra>
right
<JonnieCache>
that youve deployed
<PapaSierra>
i understand that's what it is supposed to do
<fg3>
noob help needed - article: http://goo.gl/G05Jb section: Dynamic Attributes -- failing test: must return the attribute value if present in profile
<PapaSierra>
i just figured it would (should?) be as easy as $ cap deploy:cleanup, but it doesn't work that way
<PapaSierra>
shoot, i feel stupid now. it does work, i was just using a multi staged deploy, like testing, staging, production
<fg3>
Xeago, wondering why the test is failing - it's not supposed to be failing
<Xeago>
well I can't tell how it is failing
<Xeago>
if you don't supply all the information
<fg3>
Xeago, any help is appreciated
kyktommy has joined #ruby
<fg3>
Xeago, what other info do you need
<Xeago>
the actual value
<Xeago>
for example
<Xeago>
everything you have done
<Xeago>
checked yourself
<Xeago>
etc
<Xeago>
creditcard number + pin
<Xeago>
etc
<Xeago>
:)
<matti>
;]
<Xeago>
at which step are you?
fatninja has quit []
<Xeago>
did you implement method_missing?
<fg3>
Xeago, player.id is supposed to equal 1 -- I checked the fixture file and id = 1 there. -- tried printing debug from test file and does not show on screen
krz has joined #ruby
<fg3>
I finished the Dynamic attributes section of the article
fatninja has joined #ruby
<Xeago>
did you restart your test environment?
<Xeago>
to be sure it reloaded your files
ssspiff has joined #ruby
<fg3>
I erased and reloaded test data - ran tests 5 times
<DarkStar1>
Hello. I was here last week asking about how to migrate a ruby site. I was then told to abandon it later that day but I've now been told to try and get it back up as soon as possible.
<rbuck>
hoelzro: nope, the values remain unchanged as strings
GoGoGarrett has joined #ruby
tfrew has quit [Quit: Lost terminal]
<hoelzro>
rbuck: oh, you're trying to change the hash itself?
thisirs has joined #ruby
chussenot has quit [Quit: chussenot]
<hoelzro>
if that's the case, use each_pair and change the hash in place
<rbuck>
hoelzro: i dont mind if it changes the original hash or returns a new one, i just need to write a function that takes a symbol (:to_i in this case) and applies the conversion to the hash
<DarkStar1>
to begin with I am trying to find out which ruby version to use. (going through tutorial setups) and I now know it's a Rails: 3.0.10
chussenot has joined #ruby
<DarkStar1>
but I'm guessing that says nothing about the ruby version which I can't find anywhere
nari has joined #ruby
mmitchell has joined #ruby
<DarkStar1>
does anyone know how I might be able to decipher this?
d2dchat has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
Takehiro has joined #ruby
chimay has joined #ruby
kyktommy has quit [Quit: kyktommy]
frogprince_mac has joined #ruby
chrisramon has joined #ruby
<Xeago>
Darkstar1: I think 1.8.7 is the lowest for rails 3.0
Mon_Ouie has joined #ruby
<Xeago>
however, you might still want to use ruby 1.9.3
yshh has joined #ruby
<DarkStar1>
Xeago: Wont I worry about backwards compatibility?
<Xeago>
why would you?
<DarkStar1>
on 1.9.3
<DarkStar1>
just asking. I know squat about the whole framework. I'm told to just migrate the site
<DarkStar1>
that's it.
A124 has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
<Xeago>
you're having existing code?
monkegjinni has joined #ruby
Ivo has joined #ruby
sertaconay has joined #ruby
Takehiro has joined #ruby
Jork1 has joined #ruby
Appineer has joined #ruby
wedgeV has joined #ruby
iaj has quit [Ping timeout: 260 seconds]
seoaqua has quit [Read error: Connection reset by peer]
<DarkStar1>
Xeago: yeah. I have a Gemfile and a Gemfile.lock
<DarkStar1>
file(s)
Coolhand has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
<rbuck>
hoelzro: thanks
<DarkStar1>
Xeago: And some other source files. but I was given to understand that those two are very important
dpk has joined #ruby
<Xeago>
that is hardly enough informatino to determine the ruby version
<Xeago>
best you can do is check whether dependency's require a specific ruby
codefyre has joined #ruby
iaj has joined #ruby
wedgeV_ has joined #ruby
wedgeV has quit [Client Quit]
wedgeV_ has quit [Client Quit]
sterNiX has quit [Ping timeout: 255 seconds]
wedgeV has joined #ruby
beit_ has joined #ruby
wedgeV_ has joined #ruby
dmerrick has joined #ruby
wedgeV_ has quit [Client Quit]
sterNiX has joined #ruby
jrist-afk is now known as jrist
beit has quit [Ping timeout: 246 seconds]
<DarkStar1>
Xeago: how can I top that?
endzyme has joined #ruby
Konboi has quit [Remote host closed the connection]
<endzyme>
Anyone using Fog.io cloud provisioning API? If so has anyone done work with AutoScalers and tagging AWS machines via AutoScalers?
<DarkStar1>
In the gem file there're two references to git servers. 1 of them I can bypass by setting up a local git and placing the directories inside
jasond has joined #ruby
BeLucid has quit [Remote host closed the connection]
nitti has joined #ruby
nwertman has joined #ruby
good_afternoon has joined #ruby
sixteneighty has joined #ruby
bbttxu has quit [Quit: bbttxu]
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
good_morning has quit [Read error: Connection reset by peer]
asteve has joined #ruby
a_a_g has quit [Quit: Leaving.]
fg3 has left #ruby ["Leaving"]
zmo_ has joined #ruby
gmurphey has quit [Ping timeout: 252 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
Uranio has joined #ruby
ABK has quit [Ping timeout: 240 seconds]
<DarkStar1>
Xeago: I think it may have been a 1.91
theRoUS has joined #ruby
nari has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
matrixise has quit [Read error: Connection reset by peer]
samphippen has quit [Quit: Computer has gone to sleep.]
jcoglan has joined #ruby
<jcoglan>
hello
<jcoglan>
does anyone use the twitter gem? (version 4)
monkegjinni has quit [Ping timeout: 246 seconds]
scx has joined #ruby
replore has quit [Remote host closed the connection]
ffranz has joined #ruby
possibilities has joined #ruby
monkegjinni has joined #ruby
starship has quit [Killed (zelazny.freenode.net (Nickname regained by services))]
Guest73184 is now known as starship
gmurphey has joined #ruby
stopbit has joined #ruby
Guest66015 has joined #ruby
morf has quit [Quit: eof]
pantomime_cheap has quit [Quit: Leaving]
nitti has quit [Remote host closed the connection]
mvangala has joined #ruby
beit_ has quit [Quit: beit_]
codefyre has quit [Quit: Leaving]
samphippen has joined #ruby
iamjarvo has joined #ruby
Appineer has quit [Remote host closed the connection]
fermion has quit [Ping timeout: 246 seconds]
Appineer has joined #ruby
jrist is now known as jrist-afk
sterNiX has quit [Read error: Connection timed out]
dakine has quit [Remote host closed the connection]
sterNiX has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
Spooner has joined #ruby
joshman_ has joined #ruby
chin-tastic has joined #ruby
scx has quit [Remote host closed the connection]
Serial_Killer_C has joined #ruby
DrShoggoth has joined #ruby
IrishGringo has quit [Read error: Operation timed out]
beit has joined #ruby
beit has quit [Client Quit]
hiroyuki has joined #ruby
thisirs has quit [Remote host closed the connection]
robotmay has quit [Read error: Connection reset by peer]
chin-tastic has quit [Remote host closed the connection]
chin-tastic has joined #ruby
robotmay has joined #ruby
F1skr has joined #ruby
sterne has joined #ruby
ttt has quit [Remote host closed the connection]
chin-tas` has joined #ruby
SmoothSage has quit [Ping timeout: 246 seconds]
chin-tastic has quit [Ping timeout: 246 seconds]
miso1337 has quit [Read error: Connection reset by peer]
greasegum has joined #ruby
wallerdev has joined #ruby
miso1337 has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
ttt has joined #ruby
miso1337 has joined #ruby
ttt has quit [Remote host closed the connection]
morozovm has joined #ruby
miso1337_ has joined #ruby
Eplemosen has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ is now known as miso1337
chrisja has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
undersc0re97 has quit [Read error: Connection reset by peer]
undersc0re97 has joined #ruby
miso1337_ has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ is now known as miso1337
cardoni has joined #ruby
monkegjinni has quit [Ping timeout: 246 seconds]
freezey has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337 has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
chrisramon has quit [Ping timeout: 246 seconds]
ZubKonst_ has joined #ruby
jrist-afk is now known as jrist
centipedefarmer has joined #ruby
zigomir has quit [Read error: Operation timed out]
mikepack has joined #ruby
xclite has joined #ruby
mando has joined #ruby
Ankhers has joined #ruby
bigmcq77 has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ has joined #ruby
cviebrock has joined #ruby
ZubKonst has quit [Ping timeout: 246 seconds]
cviebrock has left #ruby [#ruby]
andynu has joined #ruby
irleif has joined #ruby
<shevy>
not me
<shevy>
then again I dont really use twitter myself, I only sometimes read what others twitter about
SmoothSage has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Appineer has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
miso1337_ has quit [Read error: Connection reset by peer]
nari has joined #ruby
beit has joined #ruby
miso1337 has joined #ruby
emanu has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
carlyle has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
cardoni has quit [Quit: cardoni]
quest88 has joined #ruby
morozovm has joined #ruby
jrgifford has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ has joined #ruby
dnstbr has joined #ruby
<Servidorv>
hey guys
<Servidorv>
good morning
<Servidorv>
can anyone help me understand a little problem i have with a each
<Servidorv>
im new to ruby
nitti has joined #ruby
<Servidorv>
and i've been strugleling with these since yesterday
<hoelzro>
servidorv: we can help =)
mneorr has quit [Remote host closed the connection]
<hoelzro>
what exactly is the issue you're having?
miso1337 has joined #ruby
<Servidorv>
here is the code https://gist.github.com/3895926 the problem is that it returns the complete posts hash and i only need it to return the likes hash that is inside the posts hash
miso1337_ has quit [Read error: Connection reset by peer]
<hoelzro>
the method returns the posts hash?
<Servidorv>
yeah
<Servidorv>
it returns the complete posts hash
<Xeago>
because the last statement ending is the end of posts.each
<hoelzro>
exactly
<hoelzro>
so add a line after line 21:
<Servidorv>
ok so can anyone please rewrite my code so i can understand how it should be written
<hoelzro>
containing likes
<hoelzro>
or whatever you mean to return
anderse has quit [Read error: Connection reset by peer]
anderse has joined #ruby
<Servidorv>
what do you mean after since likes is inside posts so if i want to manipulate likes i have to be inside the posts each right??
quest88 has quit [Quit: quest88]
<hoelzro>
well, what are you trying to return?
<Servidorv>
ok here is the thing
<Servidorv>
i have a hash with posts
<Servidorv>
i am saving that already
<Servidorv>
but now inside each post i have another hash that is likes
jrgifford has quit []
<Servidorv>
i need to get the likes
<Servidorv>
only
samphippen has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
<Servidorv>
so i can save them separetly from posts
miso1337 has joined #ruby
<Servidorv>
the reason is because i need to count the likes per each user, and do a ranking of user with the most likes
nateberkopec has joined #ruby
<hoelzro>
servidorv: so put the result in a variable outside of your each, and return that
<hoelzro>
ex:
<hoelzro>
total = 0 ; (1..10).each { |n| total += n } return total
miso1337 has quit [Read error: Connection reset by peer]
miso1337 has joined #ruby
cakehero has joined #ruby
<arietis>
what's easiest way to keep track of some counter?
<arietis>
on
<Servidorv>
oh so that way
mikepack has quit []
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
monkegji_ has joined #ruby
<Servidorv>
i will have all the likes in one var only
<awestroke>
arietis: or one could to (1..10).inject(:+)
monkegjinni has quit [Read error: No route to host]
mikepack has joined #ruby
nwertman has quit [Quit: nwertman]
possibilities has quit [Remote host closed the connection]
<arietis>
i'm generating integer with every new request and it's incremented by one
<arietis>
should i save it to sqlite db?
pantomime_cheap has joined #ruby
Archisze has joined #ruby
<Xeago>
arietis: no
<Servidorv>
hoelzro: sorry to ask but can you rewrite my code so i can fully understand what you mean
<Servidorv>
please
<Xeago>
redis would be more suited
<arietis>
this integer is some kind of id which is unique for every new request
<Xeago>
servidorv: each returns the initial array
<hoelzro>
servidorv: I'm not entirely sure what you're trying to do
<Spooner>
arietis That is a spec, not code question. If you need it you need it, but we can't tell you.
<Xeago>
arietis: the simple way would be a global
morozovm has quit [Read error: Connection reset by peer]
<arietis>
Xeago: but global can occasionally reset, no?
<Xeago>
if your app restarts
moshee has quit [Ping timeout: 260 seconds]
<Xeago>
I'd recommend redis
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<arietis>
kk, thanks
morozovm has joined #ruby
<Spooner>
Why use a second db, Xeago?
sterne has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
jessed has joined #ruby
<Spooner>
Well, I'm assuming all this data is coming from a db, arietis ?
<arietis>
Spooner: not yet
<arietis>
i'm prototyping architecture
<Spooner>
OK. So probably not worth install redis in addition to the source db just to store a single integer then ;)
<Xeago>
Spooner: not a second db :)
<arietis>
but i have no source db so far
<arietis>
i thought about sqlite
<Xeago>
does your architecture cross machines?
<Xeago>
if so, use redis
<Xeago>
else write it to a locked file
<Xeago>
good enough for a prototype
karstensrage has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 240 seconds]
lledet has joined #ruby
<Spooner>
If it is just a prototype, might as well just use a variable. Don't over-complicate it, xeago ;)
morozovm has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
xaq has joined #ruby
greasegum has quit [Ping timeout: 256 seconds]
tk__ has quit [Quit: ばいばい]
csaunders has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
F1skr has quit [Ping timeout: 244 seconds]
larissa has quit [Quit: Leaving]
Takehiro has joined #ruby
aganov has quit [Remote host closed the connection]
csaunders has joined #ruby
emanu has quit [Quit: emanu]
ttt has quit [Ping timeout: 240 seconds]
kenneth has quit [Quit: kenneth]
emanu has joined #ruby
w4lk3r has quit [Quit: Page closed]
Takehiro has quit [Ping timeout: 252 seconds]
panpainter has joined #ruby
emanu has quit [Client Quit]
carloslopes has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
bapa has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
hbpoison has joined #ruby
cardoni has joined #ruby
<JonnieCache>
Xeago: yagni = you aint gonna need it
Morkel has joined #ruby
timonv has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
Serial_Killer_C has joined #ruby
frogprince_mac has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
becom33 has quit [Quit: Leaving]
zodiak has joined #ruby
morozovm has joined #ruby
timonv has quit [Remote host closed the connection]
Synthead has joined #ruby
monkegji_ has quit [Ping timeout: 260 seconds]
chrishunt has quit [Ping timeout: 260 seconds]
baphled has quit [Read error: Operation timed out]
Guest76766 has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
hbpoison has quit [Ping timeout: 240 seconds]
<arietis>
Spooner: Xeago: so for curent state of project i need to store number only
khakimov has quit [Quit: Computer has gone to sleep.]
thedeadghost has quit [Ping timeout: 240 seconds]
pantomime_cheap has quit [Quit: Leaving]
artnez has joined #ruby
pantomime_cheap has joined #ruby
prettymuchbryce has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
rbuck has quit [Quit: Leaving.]
g0bl1n has joined #ruby
jgrevich has joined #ruby
yshh has joined #ruby
ryanlecompte has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
netstatic has joined #ruby
dr_bob has quit [Quit: Leaving.]
macmartine has joined #ruby
chussenot has joined #ruby
chrisramon has joined #ruby
hbpoison has joined #ruby
freeayu has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
iamjarvo has joined #ruby
jrajav has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
fir_ed has joined #ruby
LennyLinux has quit [Remote host closed the connection]
thedeadghost has joined #ruby
mercwithamouth has joined #ruby
greasegum has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 256 seconds]
otters has quit [Ping timeout: 272 seconds]
Rydefalk has quit [Read error: Connection reset by peer]
sebastorama has joined #ruby
Rydefalk has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
sebastorama has quit [Client Quit]
morozovm has joined #ruby
brianpWins has quit [Quit: brianpWins]
zmo_ has quit [Ping timeout: 255 seconds]
DZwijnenburg has quit [Ping timeout: 244 seconds]
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
colinbm has quit [Quit: colinbm]
sebastorama has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
morozovm has quit [Read error: Connection reset by peer]
pantomime_cheap has joined #ruby
morozovm has joined #ruby
<Servidorv>
hey guys
<Servidorv>
sorry but i have to tell you
<Servidorv>
I F MADE IT!!!!!!!!!!!!!!!!!!!
sambio has joined #ruby
<Servidorv>
i made it work
Bosma has quit [Quit: leaving]
<Servidorv>
and i understand why too
<Servidorv>
:)
ckrailo has quit [Quit: Computer has gone to sleep.]
<Servidorv>
thanks for all that helped me since yesterday
otters has joined #ruby
<Servidorv>
THANKS YOU ALL
netstatic has left #ruby [#ruby]
RubyRails has left #ruby [#ruby]
bigkevmcd has quit [Ping timeout: 246 seconds]
cbuxton has joined #ruby
starship is now known as kkh
kkh is now known as starship
elsifaka has quit [Quit: Veloma e!]
Krists has quit [Ping timeout: 246 seconds]
Bosma has joined #ruby
chussenot has quit [Quit: chussenot]
hadees has joined #ruby
perun_ has quit [Ping timeout: 260 seconds]
<shevy>
made what work
bigmcq77 has quit [Quit: Computer has gone to sleep.]
falkenbt has joined #ruby
francisfish has quit [Remote host closed the connection]
<falkenbt>
hi, I have a problem installing the gem redcarpet, maybe some of you guys can help me out, I'm new to this
<falkenbt>
the make fails with
headius has joined #ruby
<falkenbt>
gcc -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I. -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c rc_render.c In file included from rc_render.c:17:0: redcarpet.h:6:21: fatal error: ruby/st.h: No such file or directory
aantix has joined #ruby
<falkenbt>
the missing file (st.h) is located under /usr/lib/ruby/1.8/i686-linux/st.h
<falkenbt>
not sure why gcc is looking for it in ruby/st.h and how to change this
sn0wb1rd has quit [Quit: sn0wb1rd]
Mon_Ouie has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
chin-tas` has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
morozovm has joined #ruby
ryanf has joined #ruby
aruntomar has joined #ruby
<JonnieCache>
i wish i didnt suck so badly at sql :(
<RubyPanther>
falkenbt: 1.8.x quit being the "stable version" years ago. Years.
jessed has quit [Quit: jessed]
Bosma has quit [Quit: leaving]
pantomime_cheap has quit [Quit: Leaving]
Vinz_` is now known as Vinz_
ckrailo has joined #ruby
tjbiddle_ has joined #ruby
pantomime_cheap has joined #ruby
<RubyPanther>
it has been so long, I can't remember the compilation issues
Bosma has joined #ruby
chussenot has joined #ruby
aces1up has quit [Remote host closed the connection]
_cheney2 is now known as _cheney
aces1up has joined #ruby
chussenot has left #ruby [#ruby]
senny has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
recycle has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
maletor has joined #ruby
margle has joined #ruby
SegFaultAX|work has joined #ruby
clj_newb has joined #ruby
und3f has quit [Remote host closed the connection]
und3f has joined #ruby
CaptainKnots has quit [Quit: bazinga!]
kenneth has joined #ruby
<falkenbt>
RubyPanther: thanks, how about 1.9.1?
<DarkStar1>
Anyone here have experience with refinery cms
<RubyPanther>
falkenbt: if it is the same error, I would just add the dir it is really in to -I
adeponte has joined #ruby
<RubyPanther>
I don't remember the names of all the compilation options, I look back at prior examples every time even though I write a lot of ruby C :o
<RubyPanther>
but the one wit hthe -I that is hte one
<shevy>
you pull the data from the database into your -> ruby script
recycle has quit [Remote host closed the connection]
<shevy>
from there you can work and sort
bluenemo has quit [Remote host closed the connection]
<shevy>
once you sorted it, store it back into the database again
STyler has joined #ruby
sneakyness_wk has joined #ruby
<Servidorv>
i already have the data
<Servidorv>
im getting it from facebook
mrsolo has joined #ruby
<Servidorv>
so now i have an array with all the likes per posts and all the comments por post, but not just the number the actual username and faceid of each like and each comment per post
freezey has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
freezey_ is now known as freezey
Virunga has joined #ruby
alfism has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
sent-hil has quit [Remote host closed the connection]
pantomime_cheap has joined #ruby
<arietis>
am i using eql?() in order to compare strings?
<arietis>
why '?'
<Spooner>
arietis : It is a Ruby convention. Methods can have ? or ! at the end of them.
c0rn_ has joined #ruby
<matti>
Why not?
Neurotiquette has joined #ruby
<Spooner>
arietis : Methods that return booleans, have ?, methods which are "dangerous" (usually change in place or make a permanent change) have !
replore_ has quit [Remote host closed the connection]
Virunga is now known as LennyLinux
<Spooner>
arietis : Though just use... str1 == str2 like everyone else
<Neurotiquette>
I was iterating over a collection with each_with_index queried from a db (mongo) using mongoid and outputting the "i" for every record iterated and was surprised when "i" surpassed the number of records in the database. Any idea what the heck is going on or how I can figure it out?
<Spooner>
Neurotiquette : Is i a unique ID, not the simple index per se?
mrsolo has quit [Client Quit]
<Neurotiquette>
Spooner: Nah, it should have been a simple index
hbpoison has joined #ruby
<Neurotiquette>
Spooner: that's how each_with_index works so far as I can tell
* Spooner
nods.
<Xeago>
Neurotiquette: the each with index method on a collection provided by a gem might be overriden to use db keys as index
mrsolo has joined #ruby
slainer68 has quit [Remote host closed the connection]
<Neurotiquette>
Xeago: Ahh. That makes sense. Doubt that's the case this time around though. It was definitely linear, and mongo id's aren't pretty and incrementtal like that.
<Spooner>
Neurotiquette : Try each.with_index instead. as xeago says, it might be overriding each_with_index to mean each_with_row_id
apok has joined #ruby
greasegum has quit [Ping timeout: 240 seconds]
Vainoharhainen has quit [Quit: Leaving...]
<Neurotiquette>
oh. didn't know you can do that… that works, thanks
<Xeago>
Spooner: is that collection.each.withindex?
<arietis>
Spooner: i just wanna check if object is nil or string, i suppose i shouldn't compare at all in thic case and just check class type
<arietis>
this*
<Neurotiquette>
Mongoid::Criteria .. but it's iterable
<Spooner>
Yes, collection.each_with_index is old, but since we have #with_index, you can index everything now (e..g map.with_index)
tchebb has joined #ruby
<Spooner>
arietis : If you just need to check for nils, use str.nil?
tchebb has quit [Client Quit]
<Spooner>
Or just: if str
hbpoison has quit [Ping timeout: 256 seconds]
<arietis>
Spooner: kk, thanks
sertaconay has quit [Read error: Connection reset by peer]
margle has quit [Quit: Computer has gone to sleep.]
tchebb has joined #ruby
stkowski has joined #ruby
brianpWins has quit [Read error: Connection reset by peer]
sertaconay has joined #ruby
yshh has quit [Remote host closed the connection]
robotmay_ has joined #ruby
brianpWins has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
jimgg has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
jimgg has left #ruby [#ruby]
apok has quit [Remote host closed the connection]
apok has joined #ruby
dpk has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
perun_ has joined #ruby
chin-tas` has joined #ruby
siyusong has joined #ruby
asteve has quit []
asteve has joined #ruby
amskah has joined #ruby
elaptics is now known as elaptics`away
siyusong has quit [Client Quit]
Archisze has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 272 seconds]
carlyle has joined #ruby
beachandbytes has quit [Ping timeout: 240 seconds]
chin-tas` is now known as chin-tastic
dpk has joined #ruby
voodoofish430 has joined #ruby
amskah has quit [Client Quit]
jrajav has quit []
c0rn_ has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
dpk has joined #ruby
c0rn_ has joined #ruby
krz has quit [Quit: krz]
Liquid_X has quit [Remote host closed the connection]
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
kn330 has quit [Ping timeout: 256 seconds]
<awestroke>
I need to run a ruby app on a machine where I cannot install gems. so I thought of bundling the gems I needed with --path=./vendor
<awestroke>
unfortunately the host doesn't have bundler either
<awestroke>
so that fails too
DZwijnenburg has joined #ruby
<Xeago>
why does that fail?
<Xeago>
isn't ./vender in the gempath?
ephemerian has quit [Quit: Leaving.]
nitti_ has joined #ruby
dpk has quit [Excess Flood]
PapaSierra has quit [Ping timeout: 246 seconds]
DZwijnenburg has quit [Client Quit]
dpk has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
dpk has quit [Excess Flood]
ffranz has joined #ruby
dpk has joined #ruby
<awestroke>
Xeago: can't require bundler/setup in the program
Banistergalaxy has joined #ruby
nitti_ has quit [Remote host closed the connection]
<Xeago>
remove that line, or vendor bundler aswell
dpk has quit [Excess Flood]
dpk has joined #ruby
nitti has quit [Ping timeout: 240 seconds]
<awestroke>
I found "gem install <gem> -i <path>" now. how do I let "require" find the gems installed into the custom path?
SegFaultAX|work has quit [Ping timeout: 260 seconds]
xaq_ has quit [Remote host closed the connection]
setient has joined #ruby
Morkel has quit [Quit: Morkel]
mohsinhijazee has joined #ruby
mucker has quit [Quit: leaving]
<mohsinhijazee>
Hi everyone!
moos3 has joined #ruby
<mohsinhijazee>
Do you need an interface (Java, C#) in Ruby which is highly dynamic language? I think not. Am I right? I mean duck typing is there.
nitti has joined #ruby
nitti has quit [Remote host closed the connection]
<Xeago>
no
ndboost has joined #ruby
Nathandim has quit [Quit: Leaving]
reuf has joined #ruby
dpk has quit [Excess Flood]
cjs226 has joined #ruby
<Spooner>
mohsinhijazee : Yeah, all ducks here.
apok has quit [Ping timeout: 272 seconds]
dpk has joined #ruby
<mohsinhijazee>
Spooner: Thank you, I thought the same. Actually, got a project where need to translate from Java to Ruby :)
<RubyPanther>
mohsinhijazee: the idea of an interface in Ruby is that there is some known selection of methods that foo needs to have to support bar. So you might have a mixin Omg and the document says your class needs to implement #next and #omg
<Spooner>
mohsinhijazee : We have mixins (Module) which can look a bit like interfaces, but they are implementation, not just declarations.
<RubyPanther>
it is not formalized in the code
pantomime_cheap has quit [Quit: Leaving]
<mohsinhijazee>
RubyPanther: Right. And when there responds_to? I think consumer should confirm it right there.
serp1 has joined #ruby
pantomime_cheap has joined #ruby
xaq has joined #ruby
<RubyPanther>
mohsinhijazee: yes, that is the one and only way they should attempt to confirm
tvw has quit [Read error: Connection reset by peer]
<DarkStar1>
anyone here tell me how to get ruby to use mysql instead of sqlite?
sneakyness_wk has quit [Ping timeout: 260 seconds]
<mohsinhijazee>
I hope sharing links isn't against the policies here, please pardon me, new to the room.
Liquid_X has joined #ruby
serp1 has left #ruby [#ruby]
<Spooner>
No, fine.
SegFaultAX|work has joined #ruby
kn330 has joined #ruby
F1skr has joined #ruby
dpk has quit [Excess Flood]
mmitchell has joined #ruby
<Spooner>
darkstar Well, you just use mysql instead of sqlite. If you mean "how do you get Rails to use mysql instead of sqlite?" then that is a very different question.
mmitchell has quit [Remote host closed the connection]
<RubyPanther>
Jörg W Mittag explains it pretty well
mmitchell has joined #ruby
dpk has joined #ruby
Vinz_ is now known as Vinz_`
dpk has quit [Excess Flood]
nitti has joined #ruby
Vinz_` is now known as Vinz_
dpk has joined #ruby
<mohsinhijazee>
Besides apidock, and ruby-doc.org what are other good resources about ruby?
Takehiro has joined #ruby
minijupe has joined #ruby
<Spooner>
mohsinhijazee : If you have a lot of Java to convert, you might be better just using JRuby and importing your Java stuff.
sn0wb1rd has quit [Remote host closed the connection]
jcoglan has joined #ruby
<mohsinhijazee>
Spooner: its a small file system emulator, that must be converted for sake of showing Ruby features.
sent-hil has joined #ruby
shadoi has joined #ruby
<mohsinhijazee>
Spooner: RubyPanther: Can you guys guide me about some really awesome online books on Ruby the language only? Thanks in advance. :)
<DarkStar1>
Spooner: yes I mean How do I get rails to use mysql
<mohsinhijazee>
RubyPanther: Thank you, that would suffice.
graft has quit [Ping timeout: 245 seconds]
<Spooner>
Darkstar1 : Yeah, Ruby != Rails. You might get more joy asking on #rubyonrails (but someone might know here).
<arietis>
RubyPanther: last link is nice, bookmarked
<DarkStar1>
can't figure out how to get this damn site/app up and running
JohnBat26 has joined #ruby
headius has quit [Quit: headius]
<RubyPanther>
Mongrel sucks, but Zed is awesome.
<DarkStar1>
Spooner: You'll have to forgive, I'm completely new to ruby or rails. I've just been asked to get this thing going
reinaldob has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
dpk has joined #ruby
ndboost has quit [Remote host closed the connection]
<Spooner>
Darkstar1 : Don't worry, 9/10 Rails devs don't realise that Ruby is a standalone language ;)
ckrailo has quit [Quit: Computer has gone to sleep.]
<iamjarvo>
Spooner: haha
eldar has joined #ruby
ndboost has joined #ruby
samphippen has joined #ruby
shevy has joined #ruby
<DarkStar1>
Ok. Well I won't be working with the tech once I get this site up and running so I hope this is achievable without having to read a few thousand pages :)
g0bl1n has quit [Ping timeout: 246 seconds]
davidcelis has quit [Quit: K-Lined.]
chrisramon has quit [Ping timeout: 245 seconds]
ndboost has quit [Remote host closed the connection]
davidcelis has joined #ruby
dpk has quit [Client Quit]
<Spooner>
It is probably very easy, Darkstar1, but not too many Rails-people in here (though there are some). #rubyonrails should sort you out in a jiffy.
mneorr has quit [Remote host closed the connection]
chrisramon has joined #ruby
ndboost has quit [Remote host closed the connection]
_JamieD_ has quit [Quit: _JamieD_]
savage- has joined #ruby
ryanlecompte has quit [Read error: Connection reset by peer]
irleif has joined #ruby
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
areil has quit [Remote host closed the connection]
gmurphey has joined #ruby
mrsolo has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
freezey has quit [Quit: freezey]
swarley has joined #ruby
JohnBat26 has joined #ruby
baphled has joined #ruby
<swarley>
does anyone know offhand how to take a splat as an argument in a ruby C extension?
baroquebobcat has quit [Quit: baroquebobcat]
<hoelzro>
swarley: take a splat?
<hoelzro>
like, an arbitrary # of args?
<swarley>
def meth(*splat)
<blazes816>
i tried to figure it out for a while the other day but gave up
dnstbr has joined #ruby
<blazes816>
and make it take an array
icole has joined #ruby
<hoelzro>
I see
<hoelzro>
good question...
* swarley
looks for a stdlib method that takes a splat
daniel_- has quit [Read error: Operation timed out]
<hoelzro>
can you think of any core method that behave that way?
<hoelzro>
=)
<hoelzro>
great minds think alike
<swarley>
xD
clj_newb has joined #ruby
icole has quit [Read error: Connection reset by peer]
<hoelzro>
ah, argc = -2
<hoelzro>
swarley: ^^
passbe has quit [Ping timeout: 260 seconds]
<swarley>
oh, that's odd
lewis has left #ruby [#ruby]
<hoelzro>
indeed
icole has joined #ruby
baroquebobcat has joined #ruby
slainer68 has joined #ruby
mohsinhijazee has quit [Remote host closed the connection]
ukd1 has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
mmitchell has quit [Remote host closed the connection]
thecreators has joined #ruby
hadees has quit [Quit: hadees]
mmitchell has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
<matti>
swarley: Splat is annoying.
Trioke has joined #ruby
<ukd1>
does anyone know a good alternative to vcr that works well with rspec2?
<shevy>
matti: like flies!
<tos9>
Can I take a poll? How many of you use reST for documentation? I really really dislike rubydoc, and I dislike comments-for-documentation in general, so I guess I dislike yard too, but slightly less than rubydoc. I like reST a lot though from other languages, but, OOC how many people in the ruby community use it [not that it'd discourage me, so this really is just a poll for curiosity's sake]?
xaq has quit [Ping timeout: 260 seconds]
<matti>
swarley: Part is -2 for argc, part how parse.y will then handle it.
stephenjudkins has joined #ruby
<swarley>
Meh, depends. What I'm doing right now required a splat for it to work and still look pretty
nitti has quit [Remote host closed the connection]
<shevy>
tos9 I only document by explaining in my .rb files, and writing a tutorial. I gave up on everything else related to ruby
m3rl0x has joined #ruby
<matti>
swarley: You could do -2 and RARRAY iteration.
DarkStar1 has left #ruby [#ruby]
<shevy>
within my .rb files, I dont follow any particular convention
<swarley>
hm
<m3rl0x>
could someone help me, given the string "a b c" how would i remove "a b" and get only "c"
<shevy>
rdoc dislikes stuff like # ======= #
<Neurotiquette>
Anyone got any idea how to query with mongoid for all records that have a float value of NaN inside of a hash?
roadt has quit [Ping timeout: 245 seconds]
<Neurotiquette>
I can't find an example on stack overflow or anywhere
<swarley>
m3rl0x; str.split[1]
slainer68 has quit [Ping timeout: 240 seconds]
<swarley>
oh whoops
Servidorv has quit [Quit: Easy as 3.14159265358979323846...]
Michael_ has joined #ruby
<swarley>
str.split.last
<tos9>
shevy: Cool. When you say "explain", is that user documentation or comments for developers?
timmow has quit [Ping timeout: 252 seconds]
jbw has quit [Ping timeout: 252 seconds]
<swarley>
i thought you said "b"
aruntomar has left #ruby [#ruby]
<m3rl0x>
str.split.last(|file|)
<shevy>
tos9 comments for me mostly hehe :)
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<swarley>
I'm debating whether or not to write a whole xml parser or just write the interface over nokogiri
<ukd1>
Neurotiquette, paste a sample of the doc?
<swarley>
what
<swarley>
m3rl0x; that's invalid syntax
<shevy>
tos9 in my tutorials, I try to give specific usage examples, and in add-on sections I often try to explain how this or that is done
<matti>
swarley: Writing XML parses seems like a pain.
<swarley>
it probably is
Serial_Killer_C has quit [Remote host closed the connection]
<m3rl0x>
swarley, str.split.last(|file|)
<m3rl0x>
('#{file}').str.split.last
margle has quit [Quit: Computer has gone to sleep.]
sambio has quit [Ping timeout: 240 seconds]
<swarley>
first of all
<swarley>
not .str
<swarley>
secondly
<swarley>
"#{file}"
<reactormonk>
file.to_s
mmitchell has quit [Ping timeout: 245 seconds]
<swarley>
and you probably want file.read instead of #{file} if its an io object
possibilities has quit [Read error: Connection reset by peer]
strmpnk has quit [Quit: Lost terminal]
yekta has joined #ruby
Morkel has joined #ruby
Morkel has quit [Client Quit]
Morkel has joined #ruby
ffranz has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
<elico>
m3rl0x: what do you want to achieve ?
guilhermekfe has joined #ruby
Morkel has joined #ruby
francisfish has joined #ruby
<guilhermekfe>
What should I do in order to make ruby understand a ',' as a '.' in mathematical operations?
<m3rl0x>
elico, so the input is "a b c d" and I would like to only get "d"
margle has joined #ruby
thedeadghost has quit [Read error: Operation timed out]
jrist is now known as jrist-afk
baphled has quit [Ping timeout: 276 seconds]
telagraphic_ has joined #ruby
<elico>
you would also need chomp
<m3rl0x>
well the problem is that I am still getting the same output and its not just giving me d
<Mon_Ouie>
guilhermekfe: Depends on the usage of that. If it's just because you don't like dots like that in your code, deal with it; if it's to parse user input, Ruby's syntax for floats doesn't matter for that.
<elico>
what is the problem?
baphled has joined #ruby
francisfish has quit [Remote host closed the connection]
dnyy has quit [Quit: Connection closed for inactivity]
Xeago has quit [Ping timeout: 240 seconds]
<m3rl0x>
elico, so i am opening a file that has lots of lines with "a b c d" I need to read the file, and get a list of d
<elico>
if it's a fixed size array you can just use the number of the variable in the arry
<elico>
and not use -1...
<telagraphic_>
doesn't rvm install ruby and gems system-wide? right?
<m3rl0x>
elico, well i was doing .split.last
miphe has joined #ruby
<guilhermekfe>
Mon_Ouie: yeah, I'm getting numbers in the form of 3,14 instead of 3.14
skrewler has joined #ruby
<elico>
you need to print the value.. you are printing the whole line..
margle has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
<Mon_Ouie>
You can translate "," into "." and use to_f (etc.) or split on "," to get the integral and decimal parts of the number
mneorr has joined #ruby
<Mon_Ouie>
(You might have to check input for validity, too)
<havenn>
telagraphic_: Single-user install is RVM default. If you prefix the install script with sudo it will multi-user install to /usr/local/rvm
<m3rl0x>
elico, thank you!
<elico>
NP
SegFaultAX|work has quit [Ping timeout: 252 seconds]
<telagraphic_>
havenn: interesting, does this error at the bottom of the first file look like that type of cause: https://gist.github.com/3899636
<telagraphic_>
havenn: im trying to run cucumber and then it gives me that one
<guilhermekfe>
Mon_Ouie: yeah, I'm gonna make this on the client side
pantomime_cheap has quit [Quit: Leaving]
hbpoison has quit [Ping timeout: 256 seconds]
pantomime_cheap has joined #ruby
dakine has joined #ruby
ckrailo has joined #ruby
JonnieCache has joined #ruby
fuleo2 has quit []
<havenn>
telagraphic_: Since your RVM is single-user, be sure to not prefix sudo when you 'gem install ...'
<havenn>
telagraphic_: If you 'gem list cucumber' what do you get?
niklasb has quit [Quit: WeeChat 0.3.9]
<swarley>
bored. I just I'll just make my own XML parser
kirun has joined #ruby
niklasb has joined #ruby
<swarley>
I guess I'll just*
<telagraphic_>
its listed under local gems
<havenn>
telagraphic_: I'd check your Gemfile, add 'gem cucumber' if it isn't there, and then run the 'bundle' command.
<telagraphic_>
version 1.2.1, 1.1.4
<telagraphic_>
ok
sent-hil has quit [Remote host closed the connection]
<telagraphic_>
its already listed in my gem file
<swarley>
does anyone know how to do something like def herp(var="default") in a c extention?
<havenn>
telagraphic_: And you've already run 'bundle install'?
<swarley>
oh wait
<swarley>
split has a default
<havenn>
swarley: You can change the default with $; variable too: $; = '.'; 'split.on.periods'.split
<telagraphic_>
it says "using cucumber (1.1.3)"
ukd1 has quit [Quit: leaving]
mneorr has quit [Remote host closed the connection]
xaq has joined #ruby
mneorr has joined #ruby
<Mon_Ouie>
Just define a function with varargs and use rb_scan_args, changing the value if it's set to Qnil
<swarley>
havenn; that's not what I'm asking
<swarley>
Mon_Ouie; thank you
<havenn>
swarley: I was just blathering, realized it wouldn't help. >.>
<JohnBat26>
Can I get hash key as Symbols when I parse YAML ?
<swarley>
Mon_Ouie; so, rb_scan_args(argc, argv, "1*", argument_one, splat); ?
<swarley>
JohnBat26; you can do :key:
<swarley>
or you can recreate the entire hash
<swarley>
or "string".to_sym
iamjarvo has joined #ruby
bbttxu has joined #ruby
<JohnBat26>
swarley: I parse my yaml: YAML.load_file('../mediation.yml')
xaq has quit [Remote host closed the connection]
jrist-afk is now known as jrist
<JohnBat26>
and get hash with keys as String
<swarley>
yes
<JohnBat26>
But I want keys as Symbols
<swarley>
Then you have to write the keys as :key: in the source file
<burgestrand>
swarley: argument_one and splat are pointers to VALUEs
<swarley>
yeah
<JohnBat26>
swarley: What better symbols of Strings?
<burgestrand>
(so, usually it’s &argument_one and &splat, if you are using locals)
<burgestrand>
Strings
<JohnBat26>
swarley: for memoty consumption ?
<JohnBat26>
memory
Drewch has joined #ruby
<Spooner>
JohnBat26 : Symbols. As said, YAML.load loads what is in the yaml file, so put symbols in the yaml and you get yaml when you load. Put strings in and you get...strings ;)
<Spooner>
*get symbols when you load
<Mon_Ouie>
swarley: If you want to define something like def foo(a, *rest), sure
<JohnBat26>
Spooner: Thanks
<Mon_Ouie>
Or wait, not sure about the syntax anymore
<swarley>
JohnBat26; it depends
<swarley>
If you'll be dealing with those same symbols hundreds of times
<swarley>
probably symbols
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
tjbiddle has quit [Ping timeout: 245 seconds]
seich- is now known as seich
<swarley>
but if its just once, don't bother with it
<Mon_Ouie>
It'd be "01" for def foo(arg = ?) I think
<swarley>
sec, let me check pickaxe
tjbiddle has joined #ruby
jcoglan has quit [Read error: Operation timed out]
<Spooner>
swarley : Although unique strings probably use the same amount of memory as symbols, symbols still have the advantage of cheap comparison (since they are just ints really).
cjs226 has quit []
greasegum has joined #ruby
<havenn>
But on the other hand, Symbols aren't garbage collected like Strings.
x82_nicole has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<swarley>
Spooner; yeah but if you only use them once in a program then you are just adding memory that never gets collected
jessed has joined #ruby
<swarley>
Like, you can crash an erlang program if you use something like 175,000 atoms i think
lxsameer has quit [Quit: Leaving]
<Spooner>
swarly Ah right, I thought you meant by using them once that they were unique, not referring to temp symbols filling the GC. Good point.
<swarley>
atoms being the symbols of erlang
mando has quit [Remote host closed the connection]
greasegum has quit [Client Quit]
<swarley>
But i believe that symbol collection is being worked on in 2.0 or something right?
<arietis>
how do i access object in subhash of hash?
<ddd>
don;t use captial S for vars. They mean constants in Ruby
<yaymukund>
I now know that is a constant, which might have unintended effects, but I dunno
<yaymukund>
yeah
<ddd>
unless you want a single
<yaymukund>
haha
<ddd>
hehe
wallerdev has quit [Quit: wallerdev]
<ddd>
driving in circles together, trying to get to the same location. funny
rippa has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
davidcelis has joined #ruby
seanyo has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
Archisze has joined #ruby
awarner has quit [Remote host closed the connection]
telagraphic_ has joined #ruby
<havenn>
yaymukund: I like your old way. What unintended effects might there be?
stephenjudkins has quit [Quit: stephenjudkins]
<havenn>
yaymukund: Seems safe to me. ;)
<yaymukund>
I dunno. I think it's okay actually. It's fine if the module is a singleton
sent-hil has joined #ruby
erichmenge has joined #ruby
<yaymukund>
er, nm, ignore the singleton comment
<yaymukund>
I just don't know how constants behave yet, so I need to go read up on that some more
hadees has quit [Quit: hadees]
lushious has quit [Ping timeout: 252 seconds]
ivanacostarubio has joined #ruby
ndboost has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<ddd>
in that case, the Subscription, you can update it, but ruby will bitch because its a constant, and there can only be one Subscription so you can use it throughout the app. I just don't like modifying constants, so I use ivars like @subscription (and it follows proper naming conventions)
<ddd>
but thats me. I'm nuts :)
mucker has quit [Quit: leaving]
JonnieCache has quit [Ping timeout: 272 seconds]
samrose has joined #ruby
maletor has joined #ruby
Hanmac has joined #ruby
erikwr has quit [Quit: erikwr]
<havenn>
ddd: In this case the value really is constant, no? Subscriptions is always going to be User::Payments::Subscriptions or am I confused?
Axsuul has joined #ruby
<Spooner>
yaymukund : You could also 'include User::Payments' (in a class) to expose the direct use of Subscriptions in it and obviously anything in User can use Payments::Subscriptions, etc.
Serial_Killer_C has quit [Remote host closed the connection]
Vert has joined #ruby
zodiak has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
sambio has joined #ruby
<ddd>
havenn: no you are correct
<yaymukund>
Spooner: I was kind of against that but I might do that, since this is all happening in a test for Subscriptions anyway!
m3rl0x has quit [Ping timeout: 248 seconds]
<Spooner>
havenn : It could be a constant, certainly, but if you are needing to make constant references into namespaces, then you are either adverse to typing or the design is off ;)
<yaymukund>
makes more sense to me the more I think about it
tvw has joined #ruby
<havenn>
Spooner: Yeah, I like your way, just didn't occur to me.
<ddd>
Spooner: hehe I think in this case its adverseness to typing :)
dakine has quit [Quit: Leaving]
<ddd>
gotta admit it gets old typing the full chain sometimes
lushious has joined #ruby
<Spooner>
If you are doing it 100s of times, though, just def new_subscription(*args); User::Payments::Subscriptions.new *args; end
mahmoudimus has quit [Quit: Computer has gone to sleep.]
linoj has quit [Ping timeout: 240 seconds]
<Spooner>
Ruby gives you too many ways to skin a cat sometimes ;)
<yaymukund>
ddd, havenn, Spooner: thanks! I'm always happy with how friendly this channel is :)
Ori has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
<Spooner>
yaymukund : You get $50 in credit. Once out, we take a leg per answer.
<ddd>
Spooner: lol true true
<ddd>
hahahaha
<yaymukund>
hahaha
mahmoudimus has joined #ruby
<ddd>
yaymukund: and for the really hard questions we take the spine
<Ori>
Hi guys, having a problem with brew install wondering if you could help
cjs226 has joined #ruby
<Ori>
trying to "brew install --HEAD ruby-build" and getting "Error: You must: brew install git" even though it's already installed
<burgestrand>
Ori: /join #machomebrew
Serial_Killer_C has joined #ruby
<Spooner>
burgestrand : I read that as Macho Brew ;)
justinmcp has joined #ruby
cakehero has joined #ruby
<burgestrand>
Could very well be.
<Ori>
burgestrand: 10x, will do
tvw has quit [Ping timeout: 245 seconds]
<burgestrand>
Ori: 1UP
jenrzzz has quit [Ping timeout: 255 seconds]
freezey has quit [Quit: freezey]
ndboost has quit [Remote host closed the connection]
hadees has joined #ruby
freezey has joined #ruby
m3rl0x has joined #ruby
tvw has joined #ruby
cdzombak has quit []
headius has quit [Quit: headius]
cjs226 has quit []
karakedi has joined #ruby
slainer68 has quit [Remote host closed the connection]
hbpoison has joined #ruby
und3f has quit [Quit: Leaving.]
flagg0204 has quit [Ping timeout: 255 seconds]
jankly has joined #ruby
flagg0204 has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
awarner has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
karakedi has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
mklappstuhl has joined #ruby
morozovm has joined #ruby
Ori has quit [Quit: Page closed]
answer_42 has quit [Ping timeout: 276 seconds]
Michael__ has joined #ruby
Michael_ has quit [Ping timeout: 252 seconds]
hadees has quit [Ping timeout: 246 seconds]
Servidorv has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
<Servidorv>
hey guys
jankly has quit [Client Quit]
Tearan has joined #ruby
<swarley>
ohi
<Servidorv>
i have a question, if i want to start an array u={} then have an each and a map lets say u = users.map{}
<Servidorv>
than return u
<Servidorv>
is that correct??
BSaboia has joined #ruby
eindoofus has joined #ruby
jenrzzz has joined #ruby
<eindoofus>
Hi, I'm a novice in Java learning Ruby and the book I'm going over the naming conventions and I'm somewhat confused about Global and Class variables.
sent-hil has quit [Remote host closed the connection]
schaerli has quit [Ping timeout: 245 seconds]
sent-hil has joined #ruby
<eindoofus>
Could someone please explain the difference?
nitti has quit [Remote host closed the connection]
<Spooner>
eindoofus : A class variable is like a static variable in java.
mando has joined #ruby
Milosh88 has joined #ruby
<eindoofus>
Spooner: thanks. what about a global variable?
cbuxton has quit [Ping timeout: 255 seconds]
<Spooner>
eindoofus : A global is, well, globally accessible from anywhere. Avoid them if you can - class variables are a lot nicer (though we only use class instance variables now; class variables are sort of deprecated- look them up if you need to know the difference).
syamajala has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
steffes has joined #ruby
Milosh88 has left #ruby [#ruby]
<eindoofus>
Cool, good to know. I'm assuming it's the same case when using Ruby on Rails?
<Spooner>
eindoofus : Rails is just a framework written in Ruby. It isn't fundamentally different to Ruby itself.
ewanbje has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<Spooner>
eindoofus : Though I am not sure if it is still standard practice to use cattr_reader et al in Rails (which is just a wrapper around a @@class_variable).
hadees has joined #ruby
scx has joined #ruby
<eindoofus>
thanks for your help. take care
jenrzzz has quit [Ping timeout: 256 seconds]
eindoofus has left #ruby ["Leaving"]
gmcabrita has left #ruby [#ruby]
yxhuvud has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
fduf has joined #ruby
Hanmac has quit [Remote host closed the connection]
brandonblack has quit [Remote host closed the connection]
<swarley>
also, i think I'm going to use URI based open calls
Michael__ has quit [Remote host closed the connection]
<burgestrand>
hydrozen: I don't know of one
<Spooner>
swarley : I would rather use it, yes, but then I'd rather not use anything as dumb as XML ;) Why we need magic to read it is beyond me, since YAML/JSON/etc is designed for serialisation to the sort of data we use all the time. Sheesh!
<voodoofish430>
no the solution he was hoping for....
sambio_ has joined #ruby
<telagraphic_>
but surely i can chmod the permissions
sambio has quit [Ping timeout: 265 seconds]
s0ber has joined #ruby
<voodoofish430>
you should be able to
invisime has quit [Quit: Leaving.]
Ankhers has quit [Ping timeout: 255 seconds]
<telagraphic_>
hmmm
<telagraphic_>
i tried sudo chmod ug+rw Gemfile.lock
valio has quit [Quit: Leaving]
<tos9>
There appears to have been a Ruby Grammar project, but it appears to have died. Are there ruby implementation authors in here? What do you use for lex/parsing Ruby? (I want to write a little toy interpreter for a subset of Ruby, so I could just write it from scratch on just the parts of the grammar I want if it doesn't exist in a nice form already)
anderse has quit [Quit: anderse]
<telagraphic_>
but it cannot access it
<tos9>
The parse.y file in the ruby language repository looks really nasty to try and look at.
stephenjudkins__ has joined #ruby
kevinr has joined #ruby
<blazes816>
tos9: I believe mdi uses yac for the grammar
<blazes816>
tos9: I'd look at rubinius, and see how to handle it
kevinr has quit [Client Quit]
<tos9>
blazes816: Yeah, I'm looking at those two. Rubinius looks like it has its own thing written (other than md?i) but I haven't decyphered it yet. It definitely looks more promising though
stephenjudkins has quit [Ping timeout: 252 seconds]
stephenjudkins__ is now known as stephenjudkins
vlad_starkov has quit [Read error: Connection reset by peer]
<blazes816>
tos9: in general parsers are difficult to read/comprehend, but I'd imagine rubinius would be your best bet
elux has quit [Quit: Bye!]
<Servidorv>
hey guys, i have an array with user_id , page_id of users, and i have a hash od user_id: #
<Servidorv>
how can i build a mothod that will compare the and build an array so it ends up with an array of the user_id, page_id, #
<Servidorv>
??
kevinr has joined #ruby
<tos9>
blazes816: Yeah, I was hoping for something slightly more compact. Doesn't look like I'm going to get it :P, but that's OK. At some small risk, I was looking for the equivalent of what Python has, which is quite compact (http://docs.python.org/reference/grammar.html). I guess I'll stick at Rubinius. Thanks :).
morozovm has quit [Read error: Connection reset by peer]
Boohbah has quit [Ping timeout: 245 seconds]
morozovm has joined #ruby
<blazes816>
tos9: i'm not positive, but I believe the parser.y file is generated from some source file. it may be in the repo
sambio has joined #ruby
kyletcarey has joined #ruby
whalesalad has quit [Quit: whalesalad]
<blazes816>
tos9: also i forgot, try #ruby-lang
sent-hil has quit [Remote host closed the connection]
morozovm has quit [Client Quit]
<tos9>
Oh! Is it? Thought I'd checked. I'll look again.
Michael_ has quit [Remote host closed the connection]
sambio_ has quit [Read error: Connection reset by peer]
freezey has quit [Quit: freezey]
jarred_ has joined #ruby
x82_nicole has joined #ruby
sambio_ has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
Michael_ has joined #ruby
jarred has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
sambio has quit [Ping timeout: 256 seconds]
tjbiddle_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
sent-hil has joined #ruby
Boohbah has joined #ruby
sent-hil has quit [Remote host closed the connection]
Boohbah is now known as Guest79607
rumba has quit [Quit: Page closed]
carloslopes has quit [Quit: Leaving.]
jarred_ has quit [Ping timeout: 245 seconds]
jarred has joined #ruby
heisenmink has quit [Remote host closed the connection]
bbttxu has quit [Quit: bbttxu]
tjbiddle has quit [Ping timeout: 260 seconds]
Michael_ has quit [Remote host closed the connection]
aquarant_ has joined #ruby
tjbiddle_ has quit [Read error: Connection reset by peer]
headius_ has joined #ruby
headius has quit [Disconnected by services]
headius_ is now known as headius
aquaranto has quit [Ping timeout: 252 seconds]
tjbiddle has joined #ruby
yekta has quit [Quit: yekta]
reset has joined #ruby
telagraphic_ has quit [Ping timeout: 245 seconds]
dmiller_ has quit [Ping timeout: 246 seconds]
h4mz1d has quit [Ping timeout: 246 seconds]
Hanmac has quit [Remote host closed the connection]
<jrajav>
Are schemes really only supposed to be lowercase?
<jrajav>
I can put in HTTP in my browser but browsers shove a lot of user idiocy under the rug :P
jeffreybaird has joined #ruby
<swarley>
just like people who type www.?
Hanmac has quit [Ping timeout: 240 seconds]
<jrajav>
Oh, missed the /i option at the end
<jrajav>
It's all case insensitive
<swarley>
RegexpError: target of repeat operator is not specified: /^([a-z0-9+.-]+):(?:\/\/(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(d*))?(\/(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?|(\/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?)(?:?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?$/
<swarley>
oh gee, that helps
<jrajav>
At least it told you the LINE, right? :P
<jrajav>
Technically thats better than the alternative
himsin_ has joined #ruby
himsin_ has quit [Remote host closed the connection]
himsin has quit [Quit: Leaving]
hotovson has joined #ruby
himsin has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
aquaranto has joined #ruby
judd7 has quit [Quit: judd7]
manizzle has joined #ruby
<arietis>
how do i get sha1 hash from file?
hotovson_ has quit [Ping timeout: 245 seconds]
joeycarmello has quit [Remote host closed the connection]
<arietis>
Digest::SHA1.hexdigest file?
dmiller has joined #ruby
lledet has quit [Quit: lledet]
aquarant_ has quit [Ping timeout: 240 seconds]
himsin is now known as djorr
gabrielrotbart has quit [Remote host closed the connection]
endzyme has quit [Ping timeout: 240 seconds]
<Spooner>
arietis : If it is a file, just use Digest::SHA1.file("frog.fish"), which loads it as a stream, not the whole file at once.
gabrielrotbart has joined #ruby
hadees has joined #ruby
<arietis>
Spooner: kk
<Spooner>
Oh no, Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
<Spooner>
Well, obviously not SHA256 in your case.
<Spooner>
arietis : You want to learn how I just found that out though. Much more useful.
jslowe has quit [Read error: Connection reset by peer]
emanu has quit [Quit: emanu]
prettymuchbryce has joined #ruby
<shadewind>
I'm trying to understand Ruby a bit... is a function declaration a statement? that is, is it in imperative or is it a declaration like in C?
pac1 has quit [Quit: I got it one line of code at a time]
Moogs has joined #ruby
headius has joined #ruby
bambanx has left #ruby ["Saliendo"]
<shadewind>
it seems like a statement
josh^ has joined #ruby
pac1 has joined #ruby
<shadewind>
as in "create this function which contains this code" as opposed to "I'm telling you there is a function which contains this code"
cakehero has joined #ruby
jarred_ has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
_bry4n has quit [Remote host closed the connection]
<swarley>
Oh man i just realized how easy state based parsing is going to be with the ruby c api
<blazes816>
indubitably
hadees has quit [Quit: hadees]
<Spooner>
shadewind: And get used to saying "methods" not "functions", since we don't have functions in Ruby.
thecreators_ has joined #ruby
thecreators has quit [Ping timeout: 246 seconds]
thecreators_ is now known as thecreators
adurity has joined #ruby
<shadewind>
Spooner: right
reset has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
nwertman has joined #ruby
sent-hil has joined #ruby
<Spooner>
Although, to cover my back, one could argue that lambda/block/proc are strictly anonymous functions.
hadees has joined #ruby
nateberkopec has quit [Quit: Leaving...]
daniel_- has joined #ruby
<shadewind>
but anything declared top level become class members of Object?
<heftig>
shadewind: "def" without receiver in top-level context adds private methods to Object
<heftig>
er, private instance methods
<heftig>
so they're callable everywhere, unless shadowed
lewis has joined #ruby
<shadewind>
so they are instance methods?
bier has quit [Read error: Operation timed out]
<shadewind>
what object is self in the top level?
<heftig>
shadewind: an anonymous instance of Object the VM calls "main"
<shadewind>
I see
coin3d has quit [Quit: coin3d]
<shadewind>
makes sense
freakazoid0223 has quit [Read error: Connection reset by peer]
seanyo has quit [Remote host closed the connection]
<Spooner>
shadewind : But a lot of the functiony-looking things are actually methods in Kernel (e.g. Kernel#puts).
<swarley>
Ah, parser time
<shadewind>
yeah, I know
h4mz1d has quit [Ping timeout: 260 seconds]
skogis has quit [Ping timeout: 260 seconds]
<shadewind>
so then "def foobar" means "define an instance method for self"?
Michael_ has quit [Remote host closed the connection]
<heftig>
depends on the context
<heftig>
as i said, in top-level context it adds a private instance method to the class Object. this is special-cased
<shadewind>
I see, so it cannot be generalized in the way I'm attempting?
<heftig>
in a module/class context (which you can get via "module X", "class X", X.class_exec/module_exec/class_eval/module_eval) it adds instance methods to self
<heftig>
in any other context it adds singleton methods to self (instance methods of the singleton class of self)
anachronistic has joined #ruby
anachronistic has quit [Client Quit]
<shadewind>
singleton class? sounds like an implicitly created class which inherits from the class of the object?
<shadewind>
from the way you're describing it
judd7 has joined #ruby
slainer68 has joined #ruby
<heftig>
yes.
chrisramon has joined #ruby
<heftig>
its superclass is the object's class, and its only instance is the object itself
tvw has joined #ruby
Michael_ has joined #ruby
<shadewind>
so the "actual class" of myFoobar is not Foobar but this singleton class?
thecreators has quit [Ping timeout: 255 seconds]
hadees has quit [Quit: hadees]
<heftig>
shadewind: yes. though since it initially doesn't define anything, it's virtually invisible