apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
zeade has quit [Quit: Leaving.]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
astrobun_ has quit [Ping timeout: 272 seconds]
Shidash has joined #ruby
assurbanipal has joined #ruby
wildroma_ has quit [Ping timeout: 272 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
polaco is now known as polaco_zZz
tatsuya_o has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
einarj has quit [Remote host closed the connection]
astrobunny has joined #ruby
einarj has joined #ruby
jkhwan has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
kirun has quit [Quit: Client exiting]
pwh has joined #ruby
pwh has quit [Max SendQ exceeded]
s2013 has joined #ruby
pwh has joined #ruby
<s2013> is there anything like numpy or scipy for ruby
einarj has quit [Ping timeout: 240 seconds]
coderhs has quit [Ping timeout: 240 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
Shellcat has joined #ruby
astrobunny has quit [Ping timeout: 245 seconds]
<wald0_> ruby cannot read UTF-8 chars?
<wald0_> "こんにちは".scan(/\w/)
|jemc| has joined #ruby
theoretick has quit [Quit: Textual IRC Client: www.textualapp.com]
<wald0_> >> "foo bar".scan(/\w/)
<eval-in> wald0_ => ["f", "o", "o", "b", "a", "r"] (https://eval.in/59719)
<wald0_> >> "こんにちは".scan(/\w/)
<eval-in> wald0_ => [] (https://eval.in/59720)
jkhwan has joined #ruby
zz_michael_mbp is now known as michael_mbp
lstefani has quit [Ping timeout: 245 seconds]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<wald0_> im searching an equivalent in ruby for match "words", like this grep which works: echo "こんにちは" | grep "[[:alpha:]]"
b00stfr3ak has quit [Ping timeout: 260 seconds]
Methylated has quit [Ping timeout: 241 seconds]
dbrenaud is now known as dbRenaud
astrobunny has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
smathieu has joined #ruby
vpretzel has joined #ruby
<wald0_> >> "こんにちは".scan(/[[:alpha:]]/)
<eval-in> wald0_ => ["こ", "ん", "に", "ち", "は"] (https://eval.in/59723)
<wald0_> mmh, seems like this is what im searching for
justsee has joined #ruby
michael_mbp is now known as zz_michael_mbp
mlpinit has joined #ruby
eeriegeek has quit [Quit: Leaving.]
brianpWins has quit [Quit: brianpWins]
lstefani has joined #ruby
Beoran_ has quit [Ping timeout: 246 seconds]
angusiguess has joined #ruby
frustrum has quit [Quit: WeeChat 0.4.2]
frustrum has joined #ruby
TheMoonMaster has quit [Excess Flood]
assurbanipal has quit [Quit: Leaving]
TheMoonMaster has joined #ruby
tylersmith has quit [Remote host closed the connection]
<wald0_> so much people and nobody talks :þ
<wald0_> better to go to sleep for me
tylersmith has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
capicue has quit [Quit: Leaving...]
haukur has joined #ruby
<haukur> I wanted to try out Pry, so I added it to my Gemfile and ran bundle install, but when I run Pry I get an error saying "undefined method source_index for Gem:Module. Any idea what this could be?
lnormous has quit [Ping timeout: 260 seconds]
jkhwan has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 245 seconds]
jkhwan has joined #ruby
wald0_ has quit [Ping timeout: 245 seconds]
gyre007 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allaire has quit []
sailias has joined #ruby
horofox has quit [Read error: Connection reset by peer]
Shidash1 has joined #ruby
Shidash has quit [Read error: Connection reset by peer]
jkhwan has quit [Ping timeout: 272 seconds]
horofox has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
haukur has quit [Quit: Lost terminal]
Beoran_ has joined #ruby
bigoldrock has quit [Ping timeout: 240 seconds]
cooldman224 has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
SteveBenner9 has joined #ruby
gyre007 has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
gyre007 has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
timtch has joined #ruby
soheil_ has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
mmcdaris has joined #ruby
a1ph4g33k has quit [Quit: Leaving]
araujo has quit [Quit: Leaving]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
mrsolo has joined #ruby
nateberkopec has joined #ruby
cooldman224 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cooldman224 has joined #ruby
werdnativ has quit [Quit: werdnativ]
Deele has quit [Quit: User excited]
frem has quit [Ping timeout: 260 seconds]
cody-- has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
volty has quit [Quit: Konversation terminated!]
sailias has joined #ruby
havenwood has joined #ruby
ravster has quit [Quit: Leaving.]
predator217 has joined #ruby
pothibo has quit [Quit: pothibo]
jalcine has joined #ruby
Xeago has joined #ruby
platypine has quit [Ping timeout: 246 seconds]
predator117 has quit [Ping timeout: 245 seconds]
cody-- has quit [Quit: derp]
tatsuya_o has joined #ruby
capicue has joined #ruby
capicue has quit [Client Quit]
Astralum has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 245 seconds]
mmcdaris has quit [Quit: mmcdaris]
VTLob has quit [Quit: VTLob]
yfeldblu_ has joined #ruby
pen has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
tatsuya_o has quit [Ping timeout: 272 seconds]
pel_daniel has left #ruby [#ruby]
mmcdaris has joined #ruby
randomnick_ has quit [Quit: Leaving]
i_s has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 245 seconds]
i_s has joined #ruby
yfeldblu_ has quit [Ping timeout: 245 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
goleldar has quit []
Hanmac1 has quit [Ping timeout: 240 seconds]
i_s has quit [Ping timeout: 260 seconds]
i_s has joined #ruby
santillan has joined #ruby
vpretzel has joined #ruby
einarj has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
Spami has quit [Quit: This computer has gone to sleep]
bean__ has quit [Ping timeout: 245 seconds]
lnormous has joined #ruby
timonv has joined #ruby
VictorSK has joined #ruby
VictorSK_ has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
VictorSK_ has quit [Client Quit]
Senjai_ has quit [Ping timeout: 272 seconds]
dma_ has joined #ruby
astrobunny has joined #ruby
einarj has quit [Ping timeout: 245 seconds]
osvico has joined #ruby
io_syl has quit []
timonv has quit [Ping timeout: 260 seconds]
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
platypine has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 245 seconds]
VictorSK has quit [Remote host closed the connection]
lnormous has quit [Ping timeout: 248 seconds]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
zeade has joined #ruby
k610 has quit [Quit: Leaving]
mmcdaris has quit [Quit: mmcdaris]
lnormous has joined #ruby
mmcdaris has joined #ruby
sailias has joined #ruby
jkline has quit [Quit: jkline]
timtch has quit [Quit: Leaving.]
justsee has joined #ruby
zipper has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
zipper is now known as Guest25854
Guest25854 has quit [Client Quit]
pen has quit []
blackmesa has quit [Quit: WeeChat 0.4.2]
butblack has joined #ruby
adeponte has quit [Remote host closed the connection]
zipper_ has joined #ruby
araujo has quit [Quit: Leaving]
tylersmith has joined #ruby
zipper_ has quit [Client Quit]
zipper_ has joined #ruby
zipper_ has quit [Client Quit]
choobie has quit [Quit: choobie]
tylersmith has quit [Ping timeout: 246 seconds]
Sinco has quit [Remote host closed the connection]
misutowolf has joined #ruby
Zeeraw has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
i_s has joined #ruby
lukec has quit [Quit: lukec]
gyre007 has quit [Remote host closed the connection]
mmcdaris has quit [Quit: mmcdaris]
<misutowolf> So, quick poll! What's your Ruby editor of choice? GO.
gyre007 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
heidi has quit [Quit: Leaving.]
whunt has quit [Quit: Computer has gone to sleep.]
taternuts has quit [Read error: Connection reset by peer]
<havenwood> misutowolf: TM2
<misutowolf> TextMate?
taternuts has joined #ruby
<havenwood> yup, they open sourced TextMate2, its currently in beta
CaptainJet has joined #ruby
<shevy> cool
<shevy> for non mac folks as well?
<havenwood> shevy: OS X only
<shevy> :(
gyre007 has quit [Ping timeout: 240 seconds]
<IcyDragon> <shevy> :(
<IcyDragon> same expression
<IcyDragon> gn on that note
IcyDragon has quit [Quit: Space~~~]
sepp2k has quit [Quit: Leaving.]
axl_ has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<nanothief> RubyMine for me, vim for small scripts though
butblack has left #ruby [#ruby]
<havenwood> misutowolf: i vim too, but when i'm feeling lazy (usually) i tm2
maletor has joined #ruby
<havenwood> misutowolf: emacs and st2 are the other usual culprits i see
<havenwood> seems to me that st2, tm2, emacs and vim are all solid choices
<misutowolf> I've been using RubyMine, but I think I'm going to mess around with ST2
<havenwood> misutowolf: what OS?
<misutowolf> havenwood: Xubuntu 13.04 x64
<havenwood> ST2 seems reasonable to me. (Though I guess they're actually on ST3 now.)
tatsuya_o has joined #ruby
<havenwood> beta but been in beta a long time and i imagine it's stable
sputnik13 has joined #ruby
Hanmac1 has joined #ruby
tatsuya_o has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
Hanmac has quit [Ping timeout: 246 seconds]
Foredoomed has joined #ruby
moted has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 245 seconds]
tvw has quit []
maletor has quit [Quit: Computer has gone to sleep.]
kitak has joined #ruby
Shellcat has quit [Quit: Later peeps]
kofno has joined #ruby
Foredoomed has quit [Client Quit]
Foredoomed has joined #ruby
capicue has joined #ruby
kofno has quit [Read error: Connection reset by peer]
kitak has quit [Ping timeout: 246 seconds]
soheil_ has joined #ruby
cooldman224 has quit [Remote host closed the connection]
pr0ggie has quit [Ping timeout: 240 seconds]
pr0ggie has joined #ruby
pdimitrov has quit [Ping timeout: 264 seconds]
soheil_ has quit [Ping timeout: 240 seconds]
pdimitrov has joined #ruby
Ripp__ has joined #ruby
<|jemc|> yeah, ST3 is very stable
t4nkd has joined #ruby
jeffree has joined #ruby
havenwood has quit [Remote host closed the connection]
Hanmac has joined #ruby
TDJACR has quit [Ping timeout: 245 seconds]
TDJACR has joined #ruby
vpretzel has joined #ruby
zigomir has quit [Ping timeout: 240 seconds]
Hanmac1 has quit [Ping timeout: 248 seconds]
nfk has quit [Quit: yawn]
havenwood has joined #ruby
adjo has quit [Ping timeout: 240 seconds]
astrobunny has quit [Ping timeout: 248 seconds]
Targen has quit [Ping timeout: 272 seconds]
DanKnox_away is now known as DanKnox
DanKnox is now known as DanKnox_away
devyn has quit [Ping timeout: 245 seconds]
TDJACR has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
codezomb has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
epichero has joined #ruby
yfeldblum has joined #ruby
vpretzel has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
vpretzel has joined #ruby
sailias has quit [Quit: Leaving.]
_HolyCow1 has joined #ruby
zpinter has joined #ruby
_HolyCow has quit [Ping timeout: 272 seconds]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
kitak has joined #ruby
ixti has quit [Ping timeout: 272 seconds]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
|jemc| has quit [Quit: WeeChat 0.4.1]
xk_id has quit [Quit:
smathieu has quit [Ping timeout: 272 seconds]
i_s_ has joined #ruby
msplain has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
gyre007 has joined #ruby
SilverKey has quit [Quit: Sleep now]
eka has quit [Quit: Computer has gone to sleep.]
msplain is now known as mikesplain
TDJACR has joined #ruby
tatsuya_o has joined #ruby
epichero has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
taternuts has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
gyre007 has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
Targen has joined #ruby
tharindu has joined #ruby
tharindu_ has joined #ruby
kreeves has quit []
TDJACR has quit [Ping timeout: 272 seconds]
Aryasam has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 245 seconds]
tharindu has quit [Ping timeout: 245 seconds]
endash has quit [Quit: endash]
sadleb has quit [Ping timeout: 260 seconds]
lnemo has quit [Ping timeout: 240 seconds]
lemonsparrow has quit [Ping timeout: 250 seconds]
digital-ghost has quit [Remote host closed the connection]
lnemo has joined #ruby
rupee has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
dbRenaud is now known as dbrenaud
sparq_ has joined #ruby
mixel has quit [Quit: mixel]
Aryasam has joined #ruby
sparq_ has quit [Read error: Connection reset by peer]
pothibo has joined #ruby
<rupee> Newb here. In the Pickaxe book, discussing attribute methods, it says, "...attribute methods...create a virtual instance variable...[it] seems to be an attribute like any other. Internally, though, it has no corresponding instance variable." Is this significant? That value is being stored SOMEWHERE, making it effectively an attribute, right? Or am I missing something significant?
Dreamer3 has joined #ruby
ulik has quit [Ping timeout: 272 seconds]
psyl0n has quit [Quit: psyl0n]
<bnagy> that is a really horrible description
pothibo has quit [Client Quit]
<bnagy> attributes don't really exist, methods exist, and instance variables exist
Aryasam has quit [Ping timeout: 240 seconds]
<bnagy> you can create a method def foo; @foo; end which will return whatever is in @foo
<bnagy> you could also create def foo; 3; end which will always return 3
Aryasam has joined #ruby
dbrenaud is now known as dbRenaud
<bnagy> all things like attr_reader :foo do is provide an abbreviated syntax for doing the former
vpretzel has quit [Quit: Adios!]
zachrab has joined #ruby
lewis has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
DanKnox_away is now known as DanKnox
zachrab has quit [Client Quit]
lewis has joined #ruby
<rupee> I meant, "...effective an instance variable." It seems like it's a variable to me, it's a value that can be set and returned.
<bnagy> there's no such thing as 'virtual instance variables', it's a completely backwards way of looking at it
<rupee> Is "attribute" a well-defined term? It seems like he's using it to just define interaction with an object. But it's throwing me off when he say "attr_accessor :foo" has no instance variable.
<rupee> Sounds like a distinction without a difference, maybe.
<bnagy> either something is an ivar or it's not
Aryasam has quit [Ping timeout: 240 seconds]
<bnagy> attr_accessor absolutely does have an instance variable
<rupee> That sounds natural to me, but the text appears to state that it does not.
bugsinlights has quit [Ping timeout: 245 seconds]
bugsinlights has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<rupee> "Internally...it has no corresponding instance variable." It may not matter...I was just curious if there was some significance I was missing.
<bnagy> >> class A; attr_accessor :foo; end; a=A.new; a.foo = 3; a.instance_variables
<eval-in> bnagy => [:@foo] (https://eval.in/59764)
lewis has quit [Ping timeout: 246 seconds]
<bnagy> he might mean that the ivar isn't created at initialize
<rupee> Kind of solves that, doesn't it
<rupee> Makes sense
adeponte has quit [Remote host closed the connection]
Heero has joined #ruby
<bnagy> if you run that same line but don't assign you'll see an empty array
adeponte has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<rupee> Thanks bnagy
mengu has quit [Ping timeout: 248 seconds]
DanKnox is now known as DanKnox_away
horofox has quit [Quit: horofox]
TDJACR has joined #ruby
adeponte has quit [Ping timeout: 260 seconds]
horofox has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
TorpedoSkyline has joined #ruby
Xiti` has quit [Ping timeout: 272 seconds]
radic has joined #ruby
i_s_ has quit [Remote host closed the connection]
i_s has joined #ruby
TorpedoSkyline has quit [Changing host]
TorpedoSkyline has joined #ruby
radic_ has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
zz_michael_mbp is now known as michael_mbp
intuxicated has quit [Ping timeout: 240 seconds]
dma_ has quit [Remote host closed the connection]
smathieu has joined #ruby
dma has joined #ruby
dma is now known as Guest63432
aspiers has quit [Ping timeout: 260 seconds]
michael_mbp is now known as zz_michael_mbp
<derebos> is it normal to install ruby1.9.3 and jruby on the same system without rvm?
<derebos> and using gem for each one separately or this will cause a problems?
smathieu has quit [Ping timeout: 245 seconds]
Guest63432 has quit [Ping timeout: 245 seconds]
Ox6abe has joined #ruby
_HolyCow1 is now known as _HolyCow
frem has joined #ruby
hiall has joined #ruby
rurufufuss-away has joined #ruby
tatsuya_o has joined #ruby
axl_ has quit [Quit: axl_]
horofox has quit [Quit: horofox]
Xiti has joined #ruby
johnnyfuchs has joined #ruby
johnnyfuchs has quit [Client Quit]
tatsuya_o has quit [Ping timeout: 272 seconds]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPot4to has quit [Read error: Connection reset by peer]
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
misutowolf has quit [Ping timeout: 248 seconds]
frem has left #ruby ["WeeChat 0.4.2"]
fgo has joined #ruby
lewis has joined #ruby
Lewix has joined #ruby
astrobun_ has joined #ruby
bugsinlights has quit [Remote host closed the connection]
mrsolo has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has joined #ruby
platypine has quit [Ping timeout: 248 seconds]
<bnagy> if you have two versions I'd recommend a version manager, just not rvm
<bnagy> chruby uses path switching, rbenv uses shims, they're both clean, but chruby+ruby-install is probably easiest
devyn has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
mercwithamouth has joined #ruby
agjacome has quit [Quit: leaving]
hamakn has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
Bry8Star{T2 has quit [Quit:]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Quit: baroquebobcat]
end_guy has joined #ruby
JohnBat26 has joined #ruby
astrobun_ has quit [Ping timeout: 260 seconds]
CreativeEmbassy has joined #ruby
adeponte has joined #ruby
dhilipsiva has joined #ruby
astrobunny has joined #ruby
smathieu has joined #ruby
tjbarber has quit [Quit: Textual IRC Client: www.textualapp.com]
t4nkd has quit [Quit: Linkinus - http://linkinus.com]
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
sayan has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
rupee has quit [Quit: Page closed]
smathieu_ has joined #ruby
i_s has joined #ruby
cochin has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
cads has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
Zeeraw has joined #ruby
judd7_ has joined #ruby
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
smathieu_ has quit [Ping timeout: 246 seconds]
i_s has quit [Ping timeout: 248 seconds]
s3itz has joined #ruby
tatsuya_o has joined #ruby
codeFiend has quit [Quit: codeFiend]
rickruby has joined #ruby
cads has quit [Ping timeout: 246 seconds]
jonahR has joined #ruby
x1337807x has joined #ruby
tatsuya_o has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
epichero has joined #ruby
judd7_ has quit [Quit: judd7_]
cads has joined #ruby
coderhs has joined #ruby
tjad has joined #ruby
ZenGuy311 has quit [Ping timeout: 265 seconds]
CaptainJet has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
ZenGuy311 has joined #ruby
frustrum has quit [Ping timeout: 260 seconds]
cads has quit [Excess Flood]
cads has joined #ruby
mikesplain has quit [Ping timeout: 272 seconds]
jrhe has joined #ruby
dbRenaud is now known as dbrenaud
fridim_ has quit [Ping timeout: 272 seconds]
jeffdb has quit [Quit: jeffdb]
codeFiend has quit [Quit: codeFiend]
epichero has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
kiri has quit [Ping timeout: 246 seconds]
<robonerd> anyone use webmachine? if so, what for?
Shidash1 has quit [Quit: Leaving.]
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
kiri has joined #ruby
<existensil> i have no use for erlang's sloppy seconds
<existensil> :-P it does actually look interesting, but, no, haven't used
lnormous has quit [Ping timeout: 272 seconds]
<robonerd> rofl
<robonerd> sheesh :P
havenwood has joined #ruby
Sauvin has joined #ruby
rickruby has quit [Remote host closed the connection]
Sauvin has quit [Max SendQ exceeded]
Guest86644 has quit [Ping timeout: 240 seconds]
jlast has quit [Ping timeout: 272 seconds]
Hanmac1 has joined #ruby
derebos has quit [Quit: Leaving]
Hanmac has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
nism has joined #ruby
<nism> Anyone here used 'best_in_place' with 'auto_link' ?
ewnd9 has joined #ruby
jeffdb has joined #ruby
cochin has left #ruby [#ruby]
falood has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
poutine has joined #ruby
<poutine> Why is this not valid? f = %Q卐\007卐
<poutine> hmm that probably didn't display right
kiri has quit [Ping timeout: 245 seconds]
krz has joined #ruby
<s2013> is that a swastika
<s2013> nism, might need to check #rubyonrails
kiri has joined #ruby
choobie has joined #ruby
lnemo has quit [Ping timeout: 260 seconds]
<Boohbah> s2013: it is a swastika
choobie has left #ruby [#ruby]
<nism> s2013. yes posted there. but that seems to be dormant
<s2013> nism, ive used best_in_place but what exactly do you need to know
<s2013> i dont even know what auto_link is
karls0n has joined #ruby
<nism> s2013, I want to auto_link the content. so if it has a url that should display as one and not just text
<s2013> uh
kitak has quit [Remote host closed the connection]
<s2013> so you mean you can edit it?
<s2013> edit the url
<s2013> otherwise click on it?
<nism> so consider this for a comment to a blogpost. I can edit it inplace. but if that comment has a url it displays as one.
kitak has joined #ruby
kobain_ has quit []
yfeldblum has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<nism> s2013. tried it . its just a replacement for auto link as in /rails_autolink by tenderlove. but they did not work in conjunction with best in place. because of extra attributed from the best in place tag
<s2013> hmm. then just do it custom using regex
<s2013> see if that helps
<nism> s2013. on it. thanks
<s2013> ea n
<s2013> yeah np
smathieu has joined #ruby
kitak has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
jrhe has quit [Quit: jrhe]
Guest49052 has quit []
tatsuya_o has joined #ruby
kitak has joined #ruby
nari has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
El_Dood has joined #ruby
postmodern has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
thepumpkin has quit [Remote host closed the connection]
krz has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
thepumpkin has joined #ruby
kiri has quit [Ping timeout: 272 seconds]
heidi has joined #ruby
Ox6abe has quit [Remote host closed the connection]
Ox6abe has joined #ruby
OdNairy has joined #ruby
iliketurtles has joined #ruby
rezzack has quit [Ping timeout: 260 seconds]
kiri has joined #ruby
thepumpkin has quit [Ping timeout: 272 seconds]
mikesplain has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
WillAmes has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
WillAmes has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rdnsget has joined #ruby
rdnsget has left #ruby [#ruby]
santillan has quit [Remote host closed the connection]
pwh has quit []
kiri has quit [Read error: Operation timed out]
mikesplain has quit [Ping timeout: 260 seconds]
mrsolo has joined #ruby
diegoviola has joined #ruby
jeffree is now known as pjeffree
wawers has joined #ruby
osvico has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
lnormous has joined #ruby
Ripp__ has quit []
Zeeraw has quit [Quit: Computer has gone to sleep.]
_maes_ has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
pjeffree is now known as jeffree
adam has quit [Disconnected by services]
kiri has joined #ruby
jblack has joined #ruby
adeponte has quit [Remote host closed the connection]
adam_ has joined #ruby
lewis has quit []
zz_michael_mbp is now known as michael_mbp
petey_ has joined #ruby
gr33n7007h has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
araujo has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
sakshi has joined #ruby
tvw has joined #ruby
gr33n7007h has quit [Quit: Where's John Conner]
robscomputer has quit [Ping timeout: 272 seconds]
OdNairy has joined #ruby
sakshi has quit [Ping timeout: 240 seconds]
JeanMertz has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
smathieu has joined #ruby
coderhs has quit [Ping timeout: 260 seconds]
Astralum has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
fntzr has joined #ruby
aiguu has joined #ruby
<aiguu> hello-- is there a simple way to 'select' from an array while removing those elements.. essentially plucking the whole object ?
<aiguu> I want to sort a big array into two arrays without creating more copies of the array
dangerousdave has joined #ruby
<havenwood> aiguu: Take a look at Array#keep_if: http://ruby-doc.org/core-2.0.0/Array.html#method-i-keep_if
<aiguu> thanks!
<Nilium> Isn't that the same as Array#select!?
<Nilium> Wow that makes me sound angry.
<havenwood> Nilium: Hehe
<havenwood> Nilium: If nothing matches, select! returns nil.
<Nilium> Which I am, but not over anything in here
smathieu has quit [Ping timeout: 248 seconds]
<Nilium> Ah. Inconvenient.
<aiguu> shoot-- not quite...
<Hanmac1> PS: select! may be faster than keep_if ...
Hanmac1 is now known as Hanmac
<krz> is there a better way to write this: "#{foo} #{bar}".present? ? "#{foo} #{bar}" : nil
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<krz> actually that will always be present
<aiguu> basically if I have an array 'a =[1,2,3,4]' and I want to do 'b = a.something{|s| s%2==0}'
<krz> actually not
<aiguu> I want b to be even ones, and a to be odd ones
<krz> yea so, any better way to write this?
<aiguu> without creating two copies of this array in memory
tatsuya_o has joined #ruby
<aiguu> I have thousands of objects in memory and can't do that
<havenwood> aiguu: a.keep_if &:even?
stormbytes has joined #ruby
<s2013> krz, "#{foo} #{bar}" if "#{foo} #{bar}".present?
<aiguu> keep removes from original array but doesn't return removed
<aiguu> I want to create two arrays
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aiguu> [1,3,5], [4]
<Nilium> >> [1,2,3,4].keep_if &:even?
<Nilium> Damn it, what was the bot?
<eval-in> Nilium => [2, 4] (https://eval.in/59776)
<Nilium> Oh, guess I was right.
<Hanmac> krz: [foo,bar].any? ? "#{foo} #{bar}" : nil
<Nilium> >> a = [1,2,3,4]; [a, a.keep_if(&:even?)]
<eval-in> Nilium => [[2, 4], [2, 4]] (https://eval.in/59777)
<Nilium> Hm
<aiguu> see?
<aiguu> :p
<bnagy> >> [1,2,3,4].partition(&:even?)
<eval-in> bnagy => [[2, 4], [1, 3]] (https://eval.in/59778)
<Nilium> I like that solution.
<aiguu> ohh that looks like the winner
<bnagy> yeah but it copies
<s2013> whats the cost of that bnagy
<Nilium> Though I think it allocates two new arrays.
<aiguu> ahh, so still taking the hit
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<s2013> would find_all work?
<s2013> >> [1,2,3,4].find_all &:even
<eval-in> s2013 => undefined method `even' for 1:Fixnum (NoMethodError) ... (https://eval.in/59779)
<s2013> >> [1,2,3,4].find_all { |i| i %2 == 0 }
<eval-in> s2013 => [2, 4] (https://eval.in/59780)
tatsuya_o has quit [Ping timeout: 245 seconds]
<s2013> hmm
<aiguu> I assume find_all wouldn't remove from original array
<s2013> you want to remove from array?
<aiguu> more like an inplace partition
<existensil> select is a few less characters
dawkirst has quit [Ping timeout: 240 seconds]
<existensil> and there is select!, right?
<aiguu> I want to partition into two arrays without copying the original array
<bnagy> I would suggest a) suck it up b) write your algorithm differently
<s2013> i have a realy shitty way of doiong it aiguu
mengu has quit [Remote host closed the connection]
wawers has quit [Remote host closed the connection]
<s2013> but it wont copy the original array
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<Nilium> >> a = [1, 2, 3, 4]; [a, a.select!.each_with_object([]) { |e, a| e.even?.tap { |c| unless c ; a << e ; end } }]
<eval-in> Nilium => [[2, 4], [1, 3]] (https://eval.in/59781)
* Nilium has done a bad thing.
<existensil> aiguu: what about Array#delete_if
<existensil> that will return the items removed, so you have mutated the original array and created a new one with the items that were removed
<bnagy> existensil: same, sadly, it returns kept, not deleted
<existensil> really?
<existensil> its not supposed to
<bnagy> >> [1,2,3].delete_if {|e| e==2}
<eval-in> bnagy => [1, 3] (https://eval.in/59782)
<aiguu> I thought I tried delete if
<Nilium> >> a = [1, 2, 3, 4]; [a, a.select!.each_with_object([]) { |e, a| (if e.even? ; a << e ; end).nil? }]
<eval-in> Nilium => [[1, 3], [2, 4]] (https://eval.in/59783)
fertitta has joined #ruby
<Nilium> I should win an award for horrible ideas.
<bnagy> srsly just use partition
<aiguu> Nilium, looks a lot like partition :p
<havenwood> +1 partition
<Nilium> partition will allocate two additional arrays, this modifies the original array and allocates one new array
<bnagy> >> a=[1,2,3,4]; a,b = a.partition(&:even?); [a,b]
<havenwood> aiguu: check how fast #partition is for a baseline
<eval-in> bnagy => [[2, 4], [1, 3]] (https://eval.in/59784)
<Nilium> I assumed you simply wanted to avoid allocating more than one additional array.
<aiguu> Yeah-- I would like to avoid copying
<aiguu> I will try both and compare :)
<aiguu> thanks!
<Nilium> That said, I'm also assuming this might be optimizing without a good reason
<bnagy> write it in C then
<Nilium> I wonder if you can do anything like scala's views for this.
<aiguu> doing some big number crunching on thousands of users
mengu has quit [Ping timeout: 240 seconds]
<s2013> this is a very very shitty solution and i doubt it will work
<Nilium> I think you just did what I did.
<s2013> probably
<aiguu> in C it would be easy as pie but you would have to shrink original array or it would get fragmented
<Nilium> Albeit without returning the new array.
<aiguu> linked list would be the way to go
<Nilium> Also missing an end in there.
<s2013> oh yea
<s2013> sorry its late
<s2013> but just wanted to show the way i was thinking it *might* work
<bnagy> aiguu: how do you delete from an array in C?
<Nilium> well it was wrong and you should feel bad >:|
* Nilium replaces his teeth with candy corn for dramatic effect.
<Nilium> Probably something in intern.h
<Nilium> Probably either rb_ary_delete or rb_ary_delete_at
<aiguu> You move the object to a new array directly
<aiguu> But arrays are always allocated in C, so you would still take a memory hit n+k where k is # of elements to remove
<aiguu> but a linked list you could do in O(N)
<bnagy> ... this is what I'm saying
<aiguu> that's o(n) memory
<aiguu> you could make a linked list
<aiguu> :p
Astralum has quit [Read error: Connection timed out]
Mon_Ouie has joined #ruby
<bnagy> an array is just a lump of contiguous memory, how do you think you're going to make ruby do what's impossible in C?
<Nilium> Sounds good to me.
Astral_ has joined #ruby
<aiguu> It depends, if Ruby implements arrays as chunks of memory or uses a linked list as a backing store
<bnagy> ie just, as I said, use partition :)
<existensil> >> a = [1,2,3,4]; b = [].tap{|r| a.delete_if{|n| r << n if n.even?}}
<eval-in> existensil => [2, 4] (https://eval.in/59785)
fertitta has quit [Remote host closed the connection]
earthquake has joined #ruby
<existensil> allocation of a single new array, like Nilium's, but several chars shorter
<existensil> :-)
capicue has quit [Quit: Leaving...]
<Nilium> I hate your resourcefulness.
<existensil> just practicing my short game
<existensil> my favorite kind of golf. the real kind is boring and i have to wait forever before getting to drive the cart again.
<Nilium> Also, as far as I know, arrays in Ruby are contiguous blocks of memory because it wouldn't really make all that much sense to use a linked list.
<bnagy> I think someone should go and read ary_reject_bang() before we decide delete_if! is even an 'optimisation'
<bnagy> hint: won't be me
yfeldblum has quit [Ping timeout: 248 seconds]
reick has joined #ruby
<existensil> i'm not saying its a good idea. i was just teeing up
<Nilium> I leave it up to whoever asked originally.
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
Ox6abe has joined #ruby
<Nilium> Also, re: delete_if!, you might as well use reject! since the result of tap is always the same.
<Nilium> That way you shave off a few chars.
krz has quit [Quit: krz]
krz has joined #ruby
Astralum has joined #ruby
<havenwood> #partition is the right thing to do and if memory usage is *actually* a problem look to an extension
<havenwood> strong hints of premature optimization
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
capicue has joined #ruby
<Nilium> I'd just pick the one that reads best.
Astral_ has quit [Read error: Connection reset by peer]
<havenwood> #partition &:even? or #partition &:odd? :P
<Nilium> Choices to be made.
psyprus has quit [Ping timeout: 240 seconds]
<havenwood> >> [:even, :odd].sample
<eval-in> havenwood => :odd (https://eval.in/59786)
<existensil> correct approach aside, here is the current state of progress. i'm bored.
<existensil> >> [1,2,3,4];b=[].tap{|r|a.reject!{|n|r<<n if n.even?}};[a,b]
<eval-in> existensil => undefined local variable or method `a' for main:Object (NameError) ... (https://eval.in/59787)
<Nilium> odd is shorter.
<existensil> >> a=[1,2,3,4];b=[].tap{|r|a.reject!{|n|r<<n if n.even?}};[a,b]
<eval-in> existensil => [[1, 3], [2, 4]] (https://eval.in/59788)
Ox6abe has quit [Ping timeout: 272 seconds]
<havenwood> Nilium: Odd it is, eval-in coin flip agreed.
Heero has quit [Ping timeout: 241 seconds]
right1 has left #ruby ["Leaving"]
<Nilium> I am the god of samples.
<existensil> >> a=[1,2,3,4];b=[].tap{|r|a.reject!{|n|r<<n if n.odd?}};[a,b]
<eval-in> existensil => [[2, 4], [1, 3]] (https://eval.in/59789)
<existensil> that's another char
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPot4to has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
<bnagy> b=[];a=[1,2,3,4]; a.reject! {|e| b << e if e.even?}; [a,b]
<bnagy> forgot to bot :/
adambeynon has quit [Client Quit]
<existensil> yeah, i realized tap was making it longer
<existensil> heh
<havenwood> Nilium: Maybe a compromise on even?/odd?: [1, 2, 3, 4].partition { |n| n.send [:even?, :odd?].sample }
lnormous has quit [Ping timeout: 240 seconds]
<Nilium> >> [a=[1,2,3,4],b=[].tap{|r|a.reject!{|n|r<<n if n.odd?}}]
<eval-in> Nilium => [[2, 4], [1, 3]] (https://eval.in/59790)
mrsolo has quit [Quit: This computer has gone to sleep]
<aiguu> like how a simple question turned into a golfing competition :p
<bnagy> >> a=[1,2,3,4];b=[];[a.reject!{|e|b<<e if e.odd?},b]
<eval-in> bnagy => [[2, 4], [1, 3]] (https://eval.in/59791)
<bnagy> shorter and vaguely sane
<Nilium> Hm, there's no good way to use partition with each_with_object, I think.
<existensil> >> [a=[1,2,3,4],b=[]&a.reject!{|n|b<<n if n.odd?}&&b]
<eval-in> existensil => undefined method `<<' for nil:NilClass (NoMethodError) ... (https://eval.in/59793)
psyprus has joined #ruby
<Nilium> I should probably feel bad about booting up my Blackberry Playbook out of boredom.
<existensil> aww.. it works for me in ruby2
<existensil> oh, wait, not really
<existensil> heh
justsee has quit [Ping timeout: 240 seconds]
lnormous has joined #ruby
bubbajones has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
<existensil> >> b=[];[a=[1,2,3,4],a.reject!{|n|b<<n if n.odd?}&&b]
unholycrab has quit [Ping timeout: 245 seconds]
<eval-in> existensil => [[2, 4], [1, 3]] (https://eval.in/59795)
<Nilium> >> [a=[1,2,3,4],(b=[])&a.reject!{|n|b<<n if n.odd?}&&b]
<Nilium> Maybe?
<eval-in> Nilium => [[2, 4], [1, 3]] (https://eval.in/59796)
Astralum has quit [Read error: Connection reset by peer]
<existensil> mine was the same length as bnagy's anyways
<Nilium> This is getting kind of insane.
<Nilium> >> [a=[1,2,3,4],(b=[])&a.reject!{|n|b<<n if n&1>0}&&b]
<Nilium> Hee hee.
<Nilium> I shaved off one character by doing a bad thing.
<eval-in> Nilium => [[2, 4], [1, 3]] (https://eval.in/59797)
<havenwood> >> a,b=[*1..4],[];[a.reject!{|e|b<<e if e.odd?},b]
<eval-in> havenwood => [[2, 4], [1, 3]] (https://eval.in/59798)
krz has quit [Read error: Connection reset by peer]
<havenwood> cheating :P
<havenwood> Anyways... partition. :P
<existensil> >> a,b=[*1..4],[];[a.reject!{|e|e.odd?&&b<<e},b]
<eval-in> existensil => [[2, 4], [1, 3]] (https://eval.in/59800)
<existensil> one more character
<existensil> :-)
<Nilium> Pretty much.
<havenwood> existensil: that was a good one, got rid of last whitespae
s2013 has quit [Ping timeout: 264 seconds]
popl has quit [Ping timeout: 240 seconds]
gasbakid has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
OdNairy has joined #ruby
<havenwood> whitespace is just unseemly in golf
<havenwood> :O
<existensil> lol
<bnagy> >> a,b=[*1..4,[]];[a.reject!{|e|e.odd?&&b<<e},b]
<eval-in> bnagy => undefined method `reject!' for 1:Fixnum (NoMethodError) ... (https://eval.in/59804)
<bnagy> >> *a,b=[*1..4,[]];[a.reject!{|e|e.odd?&&b<<e},b]
<eval-in> bnagy => [[2, 4], [1, 3]] (https://eval.in/59806)
<bnagy> bad paste
petey_ has quit [Remote host closed the connection]
justsee has joined #ruby
petey_ has joined #ruby
<Nilium> Hm, that's actually longer and somehow less readable.
<Nilium> I feel like I have understood Java in this moment
<bnagy> oh it is too, I was looking at it crooked :)
<havenwood> bnagy: don't pack any denser or may implode in on itself
earthquake has quit [Quit: earthquake]
<existensil> >> a,b=[*1..4],[];[a.reject!{|e|e%2>0&&b<<e},b]
<eval-in> existensil => [[2, 4], [1, 3]] (https://eval.in/59809)
<existensil> one more
<Nilium> that's it, use the implode method!
<existensil> Ooo! two more
<existensil> >> a=*1..4;b=[];[a.reject!{|e|e%2>0&&b<<e},b]
<eval-in> existensil => [[2, 4], [1, 3]] (https://eval.in/59810)
diegoviola has quit [Ping timeout: 260 seconds]
petey_ has quit [Ping timeout: 272 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lnormous has quit [Ping timeout: 272 seconds]
hiroyuki has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
pr0ggie has quit [Ping timeout: 272 seconds]
pdimitrov has quit [Ping timeout: 272 seconds]
simoz has joined #ruby
pr0ggie has joined #ruby
pdimitrov has joined #ruby
ayaz has joined #ruby
smathieu has joined #ruby
Tuxist has joined #ruby
hamakn has joined #ruby
mlpinit_ has joined #ruby
<shaileshg_> Hi.. I am doing RSA encryption using public key and some string data..
Guest33553 has joined #ruby
Guest33553 is now known as diegoviola
<shaileshg_> however, calling the encryption function using same key and data twice is not returning same encrypted output
<shaileshg_> can anyone suggest if I need to reset something.. ? i.e. does it gives different output on calling twice with same input?
<shaileshg_> here is the link to my gist to reproduce the error
<popl> of course it would
<shaileshg_> popl: care to explain some more
mlpinit has quit [Ping timeout: 272 seconds]
krz has joined #ruby
smathieu has quit [Ping timeout: 272 seconds]
<popl> I think it should be obvious, but ok. You have plaintext, which you then encrypt. Then it is ciphertext.
<popl> any input to your encryption function will be treated as plaintext and encrypted
<shaileshg_> hmm.. but then data is same as its memoized
mlpinit_ has quit [Ping timeout: 272 seconds]
tatsuya_o has joined #ruby
<popl> Think of it like this: With plaintext P, Encryption function E(); encrypting it produce E(P). Encrypting it twice produces E(E(P)).
<shaileshg_> and i encode ciphertext using base64 to get readable characters
<popl> You need your decryption
<popl> what?
<shaileshg_> popl: I think you got it wrong.. I m calling E(P) twice i.e. E(P) and E(P).. but it is giving different outputs
<popl> Oh
<shaileshg_> and not E(P) and E(E(P))
<popl> So there's something wrong with your implementation of the algorithm
justsee has quit [Quit: leaving]
<shaileshg_> you have the code in my gist.. and i m using nothing but ruby libraries
<popl> ah
<shaileshg_> *standard libraries
Ripp__ has joined #ruby
<shaileshg_> popl: ?
thepumpkin has joined #ruby
Foredoomed has quit []
<havenwood> shaileshg_: Padding or salt?
tatsuya_o has quit [Ping timeout: 272 seconds]
<shaileshg_> Padding.. standard one
<shaileshg_> default padding
<shaileshg_> with ECB mode
blo has quit [Ping timeout: 245 seconds]
<shaileshg_> PKCS1
<shaileshg_> havenwood: PKCS1
blo has joined #ruby
blo has joined #ruby
blo has quit [Changing host]
Zeeraw has joined #ruby
Zeeraw has quit [Client Quit]
<popl> shaileshg_: I'm not really familiar with the libraries. Are you sure you're using them right?
thepumpkin has quit [Ping timeout: 272 seconds]
<shaileshg_> popl: seems to be.. I have quite some time on reading about it before using and seems to be doing it right
<havenwood> i mean if you're using it right you're salting and using an iv, so will certainly be different each time
colonolGron has joined #ruby
<havenwood> shaileshg_: each time should have a different initialization vector
<shaileshg_> havenwood: if its so.. then do you also send IV to the receiver to decrypt using IV and private key?
<shaileshg_> but as far as i know.. you don't use IV for RSA
<havenwood> shaileshg_: the iv gets stored internally
<bnagy> shaileshg_: how much do you know about pkcs1.5 padding?
<shaileshg_> in the ciphertext for use by private key?
<shaileshg_> not much.. never went into the details of it
<havenwood> shaileshg_: like `cipher.key = OpenSSL::PKCS5.pbkdf2_hmac_sha1(key, salt, 20000, 32)` then `iv = cipher.random_iv`
<bnagy> it includes random octets
<shaileshg_> hmm
psyprus has quit [Ping timeout: 240 seconds]
sevenseacat has joined #ruby
<havenwood> shaileshg_: you can safely send the salt and iv in plaintext along with the encrypted data, in fact you must, cause presumably you want to be able to decrypt it :P
Astral_ has joined #ruby
<shaileshg_> havenwood: but as per the implementation spec given by vendor.. they expect only base64 encoded encrypted data using public key.. no mention of sending salt / iv in the template documentation..
<shaileshg_> and i have tried decrypting it using only private key and it works
<havenwood> shaileshg_: ahh, k, well if they don't include it in their spec...
<bnagy> so why do you care if the ciphertexts are identical?
<havenwood> shaileshg_: it is an additional layer of security, not required but in addition to the normal padding, nvm then if you're conforming to a spec
<shaileshg_> bnagy: oh I see.. actually i m getting some other weird error response from their server and I was just seeing the cause of the error.. printing different parts of the xml object being formed..
capicue has quit [Quit: Leaving...]
<shaileshg_> now.. when you print it.. values in the print are different from the values being sent because of the above problem..
klaut has joined #ruby
<shaileshg_> so u see why i was comparing if the ciphertexts are identical
capicue has joined #ruby
<bnagy> huh looks like openssl doesn't use ruby prng ( probably wise )
<bnagy> so you can't even seed the rng to check
capicue has quit [Client Quit]
<shaileshg_> hmm
<bnagy> anyway, create a keypair and just check that successive encryptions decrypt correctly, job done
simoz has quit [Ping timeout: 246 seconds]
<havenwood> ^
<shaileshg_> bnagy: havenwood: hmm.. i think I will have to resort to it only
<shaileshg_> thanks guys :)
timtch has joined #ruby
<havenwood> What is the best way to retire an unused gem? Just yank all the versions? Does that free the gem name?
carraroj has joined #ruby
<havenwood> Nice, yup, last yank frees name.
<aiguu> good night all-- thanks for help!
aiguu has left #ruby [#ruby]
<havenwood> aiguu: g'night
coca_rails has joined #ruby
achru has joined #ruby
timonv has joined #ruby
<Nilium> I think it's time to sleep for me as well. I can't take the pain in my arm anymore, so that's about all I can do.
<coca_rails> Gnite.
<havenwood> ouch, g'night
<Nilium> Yeah, don't let your cuts get infected.
<Nilium> It hurts.
Fuzai has quit [Remote host closed the connection]
<coca_rails> Nilium: Were the cuts deep?
Fuzai has joined #ruby
carraroj has quit [Read error: Operation timed out]
<coca_rails> havenwood: Hello again.
<havenwood> hi hi
timonv has quit [Ping timeout: 245 seconds]
OdNairy has joined #ruby
<coca_rails> Any interesting projects lately?
<coca_rails> I'm working on something myself. Interested to chat, lol?
drumusician has joined #ruby
monkegjinni has joined #ruby
<Nilium> not too deep -- they're from a cat, though, and naturally kitty scratches are a good way to get an infection. one went deeper than the others though, so I'm assuming that's what got me first.
psyprus has joined #ruby
<coca_rails> ah
<Nilium> so I get the pleasure of draining, cleaning, and applying antibiotic to it. fun times.
skaflem has joined #ruby
Lewix has quit [Remote host closed the connection]
<coca_rails> Yikes. I hope you get relief soon.
<Nilium> it'll probably be fine in a few days. if it gets worse, I'll see a doctor. standard injury stuff.
<coca_rails> Good to konw.
<coca_rails> know/
<coca_rails> Is anyone in here in my shoes.. i can't get enough of watching Ruby videos
<coca_rails> And i enjoy it more than coding.
wallerdev has quit [Quit: wallerdev]
unholycrab has joined #ruby
krz has quit [Read error: Connection reset by peer]
michael_mbp is now known as zz_michael_mbp
<coca_rails> Is that a bad sign for a newcomer?
<coca_rails> Well, truthfully, I've enjoyed learning for a while now. It started with Java videos.
psyprus has quit [Ping timeout: 240 seconds]
<coca_rails> Anyone, lol?
bubbajones has joined #ruby
<coca_rails> Sorry, Ive had one too many shots.
<Nilium> I've never seen the point of videos of people coding, but whatever, if you like it, it's not like it's a problem.
<coca_rails> @__@
<havenwood> as long as you're learning, there's not a right way
psyprus has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<havenwood> <3 confreaks
<Nilium> I could see them maybe being useful for seeing tool workflows
<Nilium> I.e., how the hell emacs users code with their magic and stuff
ananthakumaran has joined #ruby
<coca_rails> haha
<coca_rails> exactly
tharindu_ has quit [Quit: Leaving...]
<Nilium> The way I work, particularly in IntelliJ, would probably just offend anyone who saw my key bindings. So many two-stroke bindings.
<coca_rails> Wow, looks like im going to be a Confreakazoid
<coca_rails> Awesome site.
SteveBenner9 has quit [Quit: Leaving]
tharindu has joined #ruby
niklasb has joined #ruby
<coca_rails> what do you mean by two stroke?
<coca_rails> Sorry, still new.
iliketurtles has joined #ruby
iliketurtles has quit [Remote host closed the connection]
colonolGron has quit [Quit: Lost terminal]
smathieu has joined #ruby
Hanmac1 has joined #ruby
lsmola has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
smathieu has quit [Ping timeout: 272 seconds]
Roa has quit [Ping timeout: 240 seconds]
Roa has joined #ruby
krz has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
banzounet has quit [Ping timeout: 260 seconds]
tatsuya_o has joined #ruby
wildroma_ has joined #ruby
tatsuya_o has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
Fire-Dragon-DoL1 has left #ruby [#ruby]
pyrac has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
banzounet has joined #ruby
Spami has joined #ruby
ctp_ has quit [Quit: Leaving...]
Linux_Extremist has joined #ruby
timtch has quit [Quit: Leaving.]
timonv has joined #ruby
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
klaut has quit []
adambeynon has joined #ruby
pyrac has quit [Quit: pyrac]
pyrac has joined #ruby
nism has quit [Quit: Page closed]
capicue has joined #ruby
Hanmac has joined #ruby
instinkt has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
Alina-malina has joined #ruby
claymore has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
popl_ has joined #ruby
popl_ has joined #ruby
popl_ has quit [Changing host]
chihhsin has quit [Quit: leaving]
chihhsin has joined #ruby
Spami has joined #ruby
zz_michael_mbp is now known as michael_mbp
atmosx has joined #ruby
popl has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
havenwood has quit []
dangerousdave has quit [Read error: Connection reset by peer]
Spami has quit [Client Quit]
dangerousdave has joined #ruby
drumusician has quit [Ping timeout: 272 seconds]
stormbyte has joined #ruby
krz has quit [Read error: Connection reset by peer]
chihhsin has quit [Quit: leaving]
stormbytes has quit [Read error: Connection reset by peer]
chihhsin has joined #ruby
stormbyte is now known as stormbytes
wald0_ has joined #ruby
lukec has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
popl_ is now known as popl
Sinco has joined #ruby
coca_rails has quit [Remote host closed the connection]
petey_ has joined #ruby
threesome has joined #ruby
coca_rails has joined #ruby
Amen has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
d45h has joined #ruby
petey_ has quit [Ping timeout: 272 seconds]
Amen is now known as z3r0_
z3r0_ is now known as am3n
zigomir has joined #ruby
jbpros has joined #ruby
monkegjinni has quit [Ping timeout: 246 seconds]
krz has joined #ruby
smathieu has joined #ruby
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
DonRichie has joined #ruby
tvw has quit []
wildroma_ has quit [Remote host closed the connection]
falood has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
wildroma_ has joined #ruby
spider-mario has joined #ruby
kil0byte has joined #ruby
smathieu has quit [Ping timeout: 246 seconds]
wildroma_ has quit [Read error: Connection reset by peer]
wildrom__ has joined #ruby
coca_rails has quit [Remote host closed the connection]
mikesplain has joined #ruby
tatsuya_o has joined #ruby
coca_rails has joined #ruby
tjad is now known as tjadc
jbpros has quit [Quit: jbpros]
Jetchisel has joined #ruby
thepumpkin has joined #ruby
mikesplain has quit [Ping timeout: 240 seconds]
coca_rails has quit [Client Quit]
dhilipsiva has quit [Remote host closed the connection]
coca_rails has joined #ruby
pyrac has joined #ruby
tatsuya_o has quit [Ping timeout: 272 seconds]
hiall has quit [Quit: hiall]
diegoviola has quit [Ping timeout: 272 seconds]
gasbakid has quit [Read error: Connection reset by peer]
thepumpkin has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coca_rails has quit [Client Quit]
timonv has joined #ruby
coca_rails has joined #ruby
wald0_ has quit [Ping timeout: 240 seconds]
Mitchellvanw has joined #ruby
wald0_ has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
ZoanthusR has joined #ruby
ZoanthusR has quit [Remote host closed the connection]
hiall has joined #ruby
madb055 has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
vlad_starkov has joined #ruby
fgo has quit [Remote host closed the connection]
Linux_Extremist has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
Linux_Extremist has joined #ruby
timonv has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
OdNairy has joined #ruby
Squarepy has joined #ruby
OdNairy has quit [Client Quit]
michael_mbp is now known as zz_michael_mbp
tharindu has quit [Ping timeout: 240 seconds]
stormbytes has quit [Quit: Linkinus - http://linkinus.com]
derebos has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
<wald0_> what means the () here? puts "You are a " + (age < 18 ? "child" : "adult")
<wald0_> its like a forked subrutine ?
mercwithamouth has quit [Ping timeout: 240 seconds]
VTLob has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Xeago has joined #ruby
vlad_starkov has joined #ruby
pyrac has quit [Quit: pyrac]
timonv has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<Mon_Ouie> No, it's just for precedence
thecopy has joined #ruby
Czupa has joined #ruby
<Mon_Ouie> `a ? b : c` is a shortcut for `if a then b else c`
mercwithamouth has joined #ruby
<Mon_Ouie> (plus the missing `end`)
<wald0_> i mean, why to put that code between () instead of without them
Linux_Extremist has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
monkegjinni has joined #ruby
relix has joined #ruby
Mitchellvanw has quit [Quit: Dozing off...]
wildrom__ has quit []
wildroma_ has joined #ruby
smathieu has joined #ruby
OdNairy has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Zeeraw has joined #ruby
<Mon_Ouie> Because it's a syntax error otherwise
monkegjinni has joined #ruby
<Mon_Ouie> Oh, sorry it isn't
<Mon_Ouie> But it gets parsed as ("…" + age < 18) ? "child" : "adult"
<Mon_Ouie> Which then errors because "…" is a string and age an integer
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby
psyl0n has joined #ruby
ZenGuy311 has quit [Ping timeout: 240 seconds]
OdNairy has quit [Client Quit]
smathieu has quit [Ping timeout: 272 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
sanav has joined #ruby
dangerousdave has joined #ruby
lkba has joined #ruby
ZenGuy311 has joined #ruby
coca_rails has quit [Ping timeout: 248 seconds]
tatsuya_o has joined #ruby
fridim_ has joined #ruby
Blue_Ice has quit [Ping timeout: 245 seconds]
coca_rails has joined #ruby
krz has quit [Read error: Connection reset by peer]
<sanav> hello guys ! i'm little confused about object binding in ruby .I tried many links but i can't clear my doubt and now even forget actual definition and its benfite .Correct meif i'm wrong (Object binding : linking of object at run/compile time for better synchronization between them) .Please tell me how object binding take place in ruby ......
pskosinski has joined #ruby
achru has quit [Remote host closed the connection]
achru has joined #ruby
achru has quit [Remote host closed the connection]
<coca_rails> sanav: what kind of binding are you referring to?
achru has joined #ruby
jeffdb has quit [Quit: jeffdb]
krz has joined #ruby
_maes_ has joined #ruby
tatsuya_o has quit [Ping timeout: 246 seconds]
<sanav> coca_rails: i just want to clear my basic defination of binding .And role of kernel and value intialization of object .
<sanav> coca_rails: i'm very confused .
Blue_Ice has joined #ruby
<coca_rails> Watch this and let me know what you think; http://www.youtube.com/watch?v=ESk6YLDtGR8
<coca_rails> It's in a different language, but the idea was clear to me.hopefully you too
decoponio has joined #ruby
<sanav> coca_rails: you make this ?
<sanav> coca_rails: oh ! thanks
h_kon has joined #ruby
fntzr has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
krz has quit [Quit: krz]
mercwithamouth has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
lewis has joined #ruby
echevemaster_afk has quit [Quit: Leaving]
eka has joined #ruby
monkegjinni has joined #ruby
sanav has quit [Ping timeout: 250 seconds]
tatsuya_o has joined #ruby
tatsuya_o has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
h_kon has quit [Remote host closed the connection]
danshultz has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
joelio has quit [Ping timeout: 264 seconds]
karls0n has quit [Ping timeout: 272 seconds]
jbpros has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
monkegjinni has joined #ruby
joelio has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
judd7_ has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
zipper has joined #ruby
wildroma_ has quit []
anderson has quit [Quit: Leaving]
wildroman212131 has joined #ruby
wildroman212131 has quit [Client Quit]
sichardrtallman has joined #ruby
wildroman2 has joined #ruby
timonv has joined #ruby
adjo has joined #ruby
coca_rails has quit [Remote host closed the connection]
zipper has quit [Read error: No route to host]
coca_rails has joined #ruby
jbpros has quit [Quit: jbpros]
mobile has joined #ruby
zipper has joined #ruby
wald0 has quit [Quit: Lost terminal]
Thanatermesis has quit [Remote host closed the connection]
wildroman2 has quit [Client Quit]
petey_ has joined #ruby
mobile has quit [Quit: mobile]
wildroman2 has joined #ruby
mobile has joined #ruby
closer has quit [Ping timeout: 240 seconds]
thecopy has quit [Remote host closed the connection]
mobile has quit [Client Quit]
lassebunk has joined #ruby
coca_rails has quit [Ping timeout: 260 seconds]
mobile has joined #ruby
lassebunk has quit [Remote host closed the connection]
sichardrtallman has quit [Quit: leaving]
anderson has joined #ruby
closer has joined #ruby
mobile has quit [Client Quit]
pskosinski has quit [Quit: Til rivido Idisti!]
petey_ has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
roolo has joined #ruby
kirun has joined #ruby
capicue has quit [Ping timeout: 246 seconds]
<wald0_> what means the () here in ruby syntax? puts "You are a " + (age < 18 ? "child" : "adult")
<wald0_> for example #{foo} is for include a variable or evaluate something, what is ( ) for ?
smathieu has joined #ruby
<roolo> i think it's just enclosing
<roolo> like (3x5)+(5x4)
<Xeago> correct
<Xeago> without the parenthesis this would be interpreted: (You are a " + age) < 18 ? "child" : "adult"
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
roolo has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
smathieu has quit [Ping timeout: 248 seconds]
ayaz has quit [Ping timeout: 260 seconds]
nari has quit [Ping timeout: 248 seconds]
cina has joined #ruby
roolo has joined #ruby
jbpros has joined #ruby
porco has joined #ruby
roolo has quit [Client Quit]
thepumpkin has joined #ruby
misutowolf has joined #ruby
roolo has joined #ruby
roolo has quit [Client Quit]
roolo has joined #ruby
timonv has quit [Remote host closed the connection]
banisterfiend has joined #ruby
solars has joined #ruby
<solars> hey, can anyone tell me why this returns nil? from = start or Cost.last_seekda_fee(self.id) or Date.parse('2013-01-01')
roolo has quit [Client Quit]
roolo has joined #ruby
thepumpkin has quit [Ping timeout: 248 seconds]
pothibo has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
<Morrolan> solars: '=' binds more tightly than 'or', use || instead.
<Morrolan> (Or add a bunch of parentheses)
<Morrolan> >> x = nil or 1; x
<eval-in> Morrolan => nil (https://eval.in/59836)
roolo has quit [Remote host closed the connection]
<Morrolan> >> x = nil || 1; x¨
<eval-in> Morrolan => undefined local variable or method `x¨' for main:Object (NameError) ... (https://eval.in/59837)
<Morrolan> >> x = nil || 1; x
<eval-in> Morrolan => 1 (https://eval.in/59838)
roolo has joined #ruby
workmad3 has joined #ruby
Sinco has quit [Remote host closed the connection]
<solars> ah damn, I confused the irb output
<solars> :)
<solars> thanks a lot
ravster has joined #ruby
<Morrolan> :)
pushpak has joined #ruby
misutowolf has quit [Ping timeout: 245 seconds]
capicue has joined #ruby
brtdv has joined #ruby
Czupa has quit [Remote host closed the connection]
ct529 has joined #ruby
roolo has quit [Remote host closed the connection]
sepp2k has joined #ruby
k610 has joined #ruby
jbpros has quit [Quit: jbpros]
vlad_starkov has joined #ruby
jibi has joined #ruby
jbpros has joined #ruby
danshultz has quit [Remote host closed the connection]
popl has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
DouweM has joined #ruby
mixel has joined #ruby
hiall has quit [Quit: hiall]
JeanMertz has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 245 seconds]
Ox6abe has joined #ruby
bassclef has joined #ruby
misutowolf has joined #ruby
bassclef is now known as Guest72302
<banisterfiend> waxjar yo
<banisterfiend> waxjar what's going on in leiden right now?
<banisterfiend> seems some kind of parade
<waxjar> oh i think they're reenacting some funeral today
<waxjar> not sure wether that's today or not
monkegjinni has quit [Remote host closed the connection]
horofox has joined #ruby
<banisterfiend> waxjar oh yes it is can u explain a bit abou tit?
monkegjinni has joined #ruby
ct529 has quit [Remote host closed the connection]
nari has joined #ruby
<waxjar> idk much about it either. all i know is they used to do funerals that way. there's a guy in the front (a comedian from leiden) called "the wailer" that's supposed to make people cry.
mengu has joined #ruby
<waxjar> well, was. now it's supposed to be funny i guess :P
<banisterfiend> waxjar weird...whose funeral are they supposed to be reenacting btw?
<banisterfiend> is it someone in particular?
<banisterfiend> very interesting that everyone is wearing clothing from the middle ages
<banisterfiend> long spooky black capes and top hats
thyagobr has joined #ruby
hiall has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
pyrac has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
zipper has quit [Quit: leaving]
gaklav has joined #ruby
<waxjar> i think they're reburying someone, but i don't know who
coca_rai_ has joined #ruby
ulik has joined #ruby
aapzak has quit [Ping timeout: 272 seconds]
coca_rai_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
coca_rails has joined #ruby
<gaklav> So what's going down people?
aapzak has joined #ruby
<gaklav> (bots?)
misutowolf has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
gaklav has quit [Quit: leaving]
sepp2k has joined #ruby
judd7_ has quit [Quit: judd7_]
coca_rails has quit [Ping timeout: 272 seconds]
wildroman2 has quit [Remote host closed the connection]
capicue has quit [Ping timeout: 246 seconds]
wildroman2 has joined #ruby
jbpros has quit [Quit: jbpros]
lewis has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
lewis has joined #ruby
wildroman2 has quit [Ping timeout: 245 seconds]
d45h has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
pyrac has quit [Quit: pyrac]
krnflake has quit [Ping timeout: 264 seconds]
d45h has joined #ruby
lewis has quit [Ping timeout: 240 seconds]
hiall has quit [Quit: hiall]
smathieu has quit [Ping timeout: 240 seconds]
misutowolf has joined #ruby
krnflake has joined #ruby
Clooth has joined #ruby
jbpros has joined #ruby
reick has quit [Remote host closed the connection]
taternuts has joined #ruby
taternuts has quit [Client Quit]
krnflake has quit [Excess Flood]
lillard has joined #ruby
apeiros has joined #ruby
monkegjinni has joined #ruby
jbpros has quit [Quit: jbpros]
<atmosx> what does it mean ||= _var_ ?
hamakn has quit [Read error: Connection reset by peer]
fridim_ has quit [Quit: Leaving]
zarubin has quit [Ping timeout: 240 seconds]
Clooth has quit [Quit: Leaving...]
<Morrolan> x ||= value assigns value to x, if x is nil or false.
misutowolf has quit [Quit: Leaving]
mengu has quit [Remote host closed the connection]
porco has quit [Quit: Linkinus - http://linkinus.com]
<sevenseacat> its equal to `x = x || value`
heftig has quit [Quit: Quitting]
threesome has quit [Ping timeout: 246 seconds]
<Morrolan> No it's not. It's equal to x || value = x
banisterfiend has quit [Quit: Computer has gone to sleep.]
capicue has joined #ruby
<Morrolan> Err, `x || x = value`, of course.
wildroman2 has joined #ruby
<sevenseacat> oh right
shredding has joined #ruby
<yxhuvud> morrolan: that is also not really equal since ||= will autocreate the variable if it doesn't exist. if false, x = nil; end; x || x = value is slightly closer
mengu__ has joined #ruby
vlad_starkov has joined #ruby
<Morrolan> Heh, didn't know of that property of ||=
vlad_sta_ has joined #ruby
mengu__ has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
aspiers has joined #ruby
timonv has joined #ruby
krnflake has joined #ruby
osvico has joined #ruby
capicue has quit [Ping timeout: 272 seconds]
rurufufuss-away has quit [Quit: Leaving]
Clooth has joined #ruby
danshultz has joined #ruby
jrhe has joined #ruby
jrhe has quit [Client Quit]
xjiujiu has joined #ruby
Al_ has joined #ruby
braincrash has joined #ruby
danshultz has quit [Ping timeout: 260 seconds]
krnflake has quit [Ping timeout: 252 seconds]
eeriegeek has joined #ruby
krnflake has joined #ruby
pothibo has quit [Quit: pothibo]
El_Dood has quit []
Al_ has quit [Ping timeout: 272 seconds]
LarsSmit has joined #ruby
vlad_sta_ has quit [Ping timeout: 260 seconds]
dma has joined #ruby
jbpros has joined #ruby
parus has quit [Read error: Operation timed out]
LarsSmit has quit [Client Quit]
dma is now known as Guest48067
LarsSmit has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
PaulePanter has quit [Ping timeout: 264 seconds]
jbpros has quit [Client Quit]
PaulePanter has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
cody-- has joined #ruby
end_guy has joined #ruby
xjiujiu has joined #ruby
xjiujiu has quit [Max SendQ exceeded]
DanBoy has quit [Ping timeout: 240 seconds]
jbpros has joined #ruby
aef has quit [Ping timeout: 260 seconds]
smathieu has joined #ruby
Ox6abe has quit [Remote host closed the connection]
xjiujiu has joined #ruby
aef has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
parus has joined #ruby
xk_id has joined #ruby
Guest72302 is now known as bassclef
capicue has joined #ruby
timtch has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
workmad3 has joined #ruby
tiglog has joined #ruby
mikesplain has joined #ruby
thepumpkin has joined #ruby
fgo has joined #ruby
cody-- has quit [Quit: derp]
DRAGON7777 has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
lfox has joined #ruby
axl_ has joined #ruby
allaire has joined #ruby
DRAGON7777 has left #ruby [#ruby]
ananthakumaran has joined #ruby
mikesplain has quit [Ping timeout: 246 seconds]
thepumpkin has quit [Ping timeout: 245 seconds]
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
cfi30 has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
mephux has quit [Ping timeout: 264 seconds]
Clooth has quit [Quit: Leaving...]
end_guy has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
mephux has joined #ruby
lectrick_ has quit [Remote host closed the connection]
denysonique has quit [Remote host closed the connection]
Guest85414___ has quit [Remote host closed the connection]
davidboy has quit [Remote host closed the connection]
akhkharu has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
ziyadb has quit [Remote host closed the connection]
tommyvyo has quit [Remote host closed the connection]
heidar has quit [Remote host closed the connection]
im0b has quit [Remote host closed the connection]
zpinter has quit [Remote host closed the connection]
xerxas has quit [Remote host closed the connection]
bluehavana has quit [Remote host closed the connection]
mattyohe has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
pkondzior___ has quit [Remote host closed the connection]
randym_ has quit [Remote host closed the connection]
andrewstewart has quit [Remote host closed the connection]
chuk has quit [Remote host closed the connection]
rubyguy has quit [Remote host closed the connection]
rndstr has quit [Remote host closed the connection]
pipework_ has quit [Remote host closed the connection]
guilleiguaran_ has quit [Remote host closed the connection]
zero7 has quit [Remote host closed the connection]
sichardrtallman has joined #ruby
capicue has quit [Ping timeout: 264 seconds]
ananthakumaran1 has quit [Ping timeout: 272 seconds]
ananthakumaran has joined #ruby
nari has quit [Ping timeout: 272 seconds]
Shidash has joined #ruby
shredding has quit [Quit: shredding]
end_guy has joined #ruby
IceDragon has joined #ruby
Banistergalaxy has joined #ruby
Ripp__ has quit []
am3n has quit [Remote host closed the connection]
Shidash has quit [Ping timeout: 246 seconds]
ananthakumaran1 has joined #ruby
Guest85414___ has joined #ruby
kapowaz has joined #ruby
OdNairy has joined #ruby
robscomputer has joined #ruby
vlad_starkov has joined #ruby
ananthakumaran has quit [Ping timeout: 272 seconds]
robscomputer has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 240 seconds]
pkondzior___ has joined #ruby
robscomputer has joined #ruby
cina has quit [Ping timeout: 260 seconds]
Guest80537 has joined #ruby
ananthakumaran1 has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
heidar has joined #ruby
xjiujiu has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
end_guy has joined #ruby
dnyy has joined #ruby
FukUmist has joined #ruby
bluehavana has joined #ruby
guilleiguaran_ has joined #ruby
wildroman2 has quit []
frustrum has joined #ruby
davidboy has joined #ruby
lectrick_ has joined #ruby
xerxas has joined #ruby
plague88 has joined #ruby
ziyadb has joined #ruby
chuk has joined #ruby
tommyvyo has joined #ruby
hiroyuki has joined #ruby
pipework_ has joined #ruby
im0b has joined #ruby
mattyohe has joined #ruby
randym_ has joined #ruby
<shevy> dumdedum
derebos has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Ping timeout: 248 seconds]
ananthakumaran1 has joined #ruby
capicue has joined #ruby
zero7 has joined #ruby
nari has joined #ruby
FukUmist has quit [Quit: Leaving]
rndstr has joined #ruby
FukUmist has joined #ruby
k610 has quit [Quit: Leaving]
zarubin has joined #ruby
rubyguy has joined #ruby
raphaelivan has joined #ruby
akhkharu has joined #ruby
Xeago has joined #ruby
andrewstewart has joined #ruby
rickruby has joined #ruby
wallerdev has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leokaito has joined #ruby
sichardrtallman has quit [Quit: leaving]
zpinter has joined #ruby
petey_ has joined #ruby
rickruby has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
derebos has joined #ruby
sayan has joined #ruby
Hoozt has joined #ruby
derebos has quit [Max SendQ exceeded]
<Hoozt> hello friends
Bry8Star{T2 has joined #ruby
derebos has joined #ruby
<Hoozt> I have a noob question :) Sitting here with a total brain black out..
MrZYX is now known as MrZYX|off
vlad_starkov has quit [Read error: Connection reset by peer]
<canton7> lots of bored people kicking around on a day like today... ask and someone will probably chip in
smathieu has joined #ruby
<Hoozt> I have a string and I need to escape all the double quotes in it. I know I have done this a million times. Trying with URI but I get a very strange result with too many back slahes.
<Hoozt> Actually Im sitting in rubymotion, but this should be a ruby thing.
<canton7> let's see what you've got, and what it produces
<Hoozt> alright, one sec
<Hoozt> this is the string
<Hoozt> [{"city":"Tj\u00f6rn"},{"city":"Stenungsund"},{"city":"Kung\u00e4lv"},{"city":"Finsp\u00e5ng"}]
<Hoozt> [{\\\"city\\\":\\\"Tj\\u00f6rn\\\"},{\\\"city\\\":\\\"Stenungsund\\\"},{\\\"city\\\":\\\"Kung\\u00e4lv\\\"},{\\\"city\\\":\\\"Finsp\\u00e5ng\\\"}]"
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
g0bl1n has joined #ruby
Hanmac1 has joined #ruby
smathieu has quit [Ping timeout: 246 seconds]
leokaito has quit [Remote host closed the connection]
raphaelivan has quit [Quit: Leaving.]
leokaito has joined #ruby
<canton7> and your code?
<Hoozt> I don't want it uri encoded, just backslashing the double quotes.
g0bl1n has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hoozt> right now my code is just in the middle of typing. im chaning and trying different ways.. :/
<Hoozt> URI::encode is not the result im looking for.
<waxjar> what do you want, exactly?
Hanmac has quit [Ping timeout: 245 seconds]
<Hoozt> I want that string with backslashed double quotes.
<Hoozt> So that I can do a JSON.parse on it :)
pskosinski has joined #ruby
<shevy> just apply .select on it?
<canton7> doing that sort of escaping is dead easy, unless the string you're escaping can have escaped quotes in it already, in which case it becomes trickier. then if it might have escaped backslashes in it, it gets more complex, and beyond that you start looking at using a proper parser instead of regex
leokaito has quit [Read error: No route to host]
relix has joined #ruby
leokaito has joined #ruby
<waxjar> why wouldn't JSON.parse handle a string like that?
<canton7> .gsub('"', '\"') ?
kobain has joined #ruby
jujuba has joined #ruby
<shevy> >> '"city'.gsub('"', '\"')
<eval-in> shevy => "\\\"city" (https://eval.in/59859)
<Hoozt> No but look
<Hoozt> this is the string: [{"city":"Tj\u00f6rn"},{"city":"Stenungsund"},{"city":"Kung\u00e4lv"},{"city":"Finsp\u00e5ng"}]
pipework_ has quit [Quit: Updating details, brb]
<Hoozt> I have back slahes there, but I will not get back clashed double quotes
<shevy> >> '[{"city":"Tj\u00f6rn"},{"city":"Stenungsund"},{"city":"Kung\u00e4lv"},{"city":"Finsp\u00e5ng"}]'.gsub('"', '\"')
<eval-in> shevy => "[{\\\"city\\\":\\\"Tj\\u00f6rn\\\"},{\\\"city\\\":\\\"Stenungsund\\\"},{\\\"city\\\":\\\"Kung\\u00e4lv\\\"},{\\\"city\\\":\\\"Finsp\\u00e5ng\\\"}]" (https://eval.in/59860)
OdNairy has joined #ruby
<Hoozt> Si i need to backslash the quotes. With gsubbing it I get too many slashes.
Gwyxx has joined #ruby
<waxjar> i really don't understand the problem. are you hard-coding that string in your code?
<Hoozt> well, just like that @eval-in
<Hoozt> Man im bad at explaing.
<Hoozt> ok
<Hoozt> Im dealing with an API here.
<canton7> Hoozt, that's because it's being printed with 'p', which does its own escaping
<Hoozt> I gives me string like this -----------> [{"city":"Tj\u00f6rn"},{"city":"Stenungsund"},{"city":"Kung\u00e4lv"},{"city":"Finsp\u00e5ng"}]
<canton7> >> puts '"city'.gsub('"', '\"')
<eval-in> canton7 => \"city ... (https://eval.in/59861)
<shevy> >> puts '[{"city":"Tj\u00f6rn"},{"city":"Stenungsund"},{"city":"Kung\u00e4lv"},{"city":"Finsp\u00e5ng"}]'.gsub('"', '\"')
<eval-in> shevy => [{\"city\":\"Tj\u00f6rn\"},{\"city\":\"Stenungsund\"},{\"city\":\"Kung\u00e4lv\"},{\"city\":\"Finsp\u00e5ng\"}] ... (https://eval.in/59862)
<jujuba> anyone use ox for xml ?
<shevy> die, xml, die!!!
pipework has joined #ruby
<Hoozt> @eval-in how did you do that?
<jujuba> :o @shevy
<Hoozt> gsubing?
<shevy> Hoozt eval-in is a bot that can interprete ruby code here
<Hoozt> lol... ok
<shevy> with two leading > you can test ruby code
<shevy> >> puts 'Hello Hoozt'
<eval-in> shevy => Hello Hoozt ... (https://eval.in/59863)
<Hoozt> Ahh.. I see. Thx
<jujuba> cry cry cry
<Hoozt> yea so is there a proper parser for this?
<shevy> what does p object call on the object? #inspect ?
<waxjar> yea shevy
<shevy> ok
<shevy> Hoozt a parser for?
<Hoozt> hmm
<Hoozt> Then I guess it might be because Im using BubbleWrap in rubymotion, and not using the 'json' gem for ruby, which I don't think is possible actually.
<Hoozt> Thx people!
<jujuba> y'all are so smart
timtch has quit [Quit: Leaving.]
mephux has quit [Quit: w0ots...]
ananthakumaran1 has quit [Ping timeout: 245 seconds]
kitak has quit [Remote host closed the connection]
mephux has joined #ruby
wallerdev has quit [Quit: wallerdev]
kitak has joined #ruby
<shevy> jujuba year long practice!
ananthakumaran has joined #ruby
leokaito has quit [Remote host closed the connection]
Lewix has joined #ruby
lewis has joined #ruby
jeffdb has joined #ruby
<jujuba> wow you learnt all this in a year lol
<shevy> jujuba years long practice!
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
<jujuba> yeah just playin
leokaito has joined #ruby
<jujuba> i love it
<shevy> I guess it might be technically possible to learn it all in one year
<jujuba> :|
<shevy> but that would require many hours of intense learning daily
monkegjinni has quit [Remote host closed the connection]
am3n has joined #ruby
<jujuba> i've had a good 3 mnths and i no longer want to be sick on my keyboard!
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
leonidlm has joined #ruby
jlast has joined #ruby
tjadc has quit [Ping timeout: 272 seconds]
leokaito has quit [Ping timeout: 240 seconds]
cody-- has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
<jujuba> ox is so much faster than nokogiri
freerobby has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
lfox has quit [Quit: ZZZzzz…]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
high_fiver has joined #ruby
Davey has joined #ruby
volty has joined #ruby
niklasb has joined #ruby
Mohan has joined #ruby
pwh has joined #ruby
cody-- has quit [Client Quit]
vlad_starkov has joined #ruby
horofox has quit [Quit: horofox]
tomzx_mac has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
ananthakumaran has quit [Ping timeout: 245 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran1 has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
Kabaka has joined #ruby
pdimitrov has quit [Ping timeout: 260 seconds]
pr0ggie has quit [Ping timeout: 272 seconds]
pdimitrov has joined #ruby
pr0ggie has joined #ruby
mrpot4to_ has quit [Quit: No Ping reply in 180 seconds.]
LarsSmit has quit [Quit: Leaving.]
karls0n has joined #ruby
mrpot4to_ has joined #ruby
MrPot4to has quit [Read error: Connection reset by peer]
pr0ggie has quit [Max SendQ exceeded]
aspiers has quit [Ping timeout: 260 seconds]
MrPot4to has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
Heero has quit [Ping timeout: 272 seconds]
lewis has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
pr0ggie has joined #ruby
ananthakumaran has joined #ruby
lewis has joined #ruby
BizarreCake has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
hiroyuki has joined #ruby
malcolmva has quit [Ping timeout: 248 seconds]
FukUmist has quit [Ping timeout: 248 seconds]
znode has joined #ruby
lewis has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
bocaneri has joined #ruby
monkegjinni has joined #ruby
Freeaqingme has joined #ruby
<Freeaqingme> Hi folks. This line gives me an error 'method xmlschema not defined in date': remove_method :xmlschema if base.instance_methods.include?(:xmlschema)
<Freeaqingme> any ideas?
Hoozt has quit [Remote host closed the connection]
<Freeaqingme> I figured that if clause would prevent it from being removed if not defined? (didnt put it there myself, it's an existing lib)
banisterfiend has joined #ruby
bocaneri has left #ruby [#ruby]
petey_ has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
<shevy> what is date there?
petey_ has joined #ruby
<shevy> and what is base
monkegjinni has quit [Ping timeout: 245 seconds]
atmosx has quit [Quit: Lost in trance]
aryaching has quit []
<Freeaqingme> shevy, dunno. will check it out ;)
aryaching has joined #ruby
CaptainJet has joined #ruby
petey_ has quit [Ping timeout: 272 seconds]
Banistergalaxy has quit [Quit: Bye]
Banistergalaxy has joined #ruby
Speed has joined #ruby
malcolmva has joined #ruby
axl_ has quit [Quit: axl_]
dangerousdave has quit [Read error: Connection reset by peer]
rellin has joined #ruby
dangerousdave has joined #ruby
capicue has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
s2013 has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
astrobun_ has joined #ruby
thesheff17 has joined #ruby
znode has quit [Quit: Lingo - http://www.lingoirc.com]
s2013 is now known as s2013{Texas}
astrobunny has quit [Ping timeout: 245 seconds]
petey_ has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
thepumpkin has joined #ruby
phrozen77 has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
<wald0_> how can i define methods or classes using words that has spaces?
<havenwood> huh?
<volty> havenwood: wald0_ likes it strange :)
wallerdev has joined #ruby
pskosinski has joined #ruby
rvchangue has quit [Ping timeout: 260 seconds]
rickruby has joined #ruby
<havenwood> >> define_method :'yuck please no', ->{}
<eval-in> havenwood => #<Proc:0x40889164@/tmp/execpad-292e96a256d8/source-292e96a256d8:2 (lambda)> (https://eval.in/59864)
phrozen77 has joined #ruby
<havenwood> Now good luck calling it. :P
monkegjinni has joined #ruby
axl_ has joined #ruby
<wald0_> i was just thinking in the possibility to write code in (almost) pure english, something like: if 5 is greater than 4
<havenwood> >> define_method %s(just don't do it), ->{'well i did'}; send :"just don't do it"
<eval-in> havenwood => "well i did" (https://eval.in/59865)
rvchangue has joined #ruby
MrPot4to has quit [Read error: Connection reset by peer]
mrpot4to_ has quit [Read error: Connection reset by peer]
thepumpkin has quit [Ping timeout: 246 seconds]
<havenwood> is_greater_than
am3n has joined #ruby
<havenwood> wald0_: Looks like you're going to need to learn Haskell. :P
monkegjinni has quit [Remote host closed the connection]
<wald0_> well, with _ still has sense
monkegjinni has joined #ruby
<wald0_> nah, trying to learn ruby now :þ
Guest80537 has quit []
<havenwood> wald0_: Not possible without doing really bad things.
<volty> you can try chaining objects: eg yuck (Yuck class) please (method that returns another class instance), no (yet another method - that could return another class instance)
enebo has joined #ruby
<wald0_> sounds funny in any case :)
keen_____ has quit [Read error: Connection reset by peer]
<havenwood> wald0_: Underscore just are the spaces. You could and should not use a whitespace-like character to make it appear empty. :P
keen_ has joined #ruby
<volty> but you should better go with a plain new parser if you want to «if 5 is greater than 4»
<havenwood> write a parser in Ruby
am3n has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Ping timeout: 245 seconds]
s2013{Texas} has quit [Ping timeout: 241 seconds]
Guest80537 has joined #ruby
rvchangue has quit [Ping timeout: 241 seconds]
pyrac has joined #ruby
rvchangue has joined #ruby
yano has quit [Quit: WeeChat, The Better IRC Client: http://weechat.org/]
rellin has quit [Read error: Connection reset by peer]
robonerd has quit [Ping timeout: 245 seconds]
rellin has joined #ruby
Davey has joined #ruby
phrozen77 has quit [Max SendQ exceeded]
CreativeEmbassy has joined #ruby
<wald0_> is there any example (complete) of a class, module, method... which includes all the possible elements and on their order? like the rescue, @vars, parameters, etc (of course with comments explaining them)
<heftig> >> def method_missing(*x) return super if x[0][0,3] == 'to_'; x.join ' ' end; oh my goddess! what have i done?
<eval-in> heftig => "oh my goddess! what have i done?" (https://eval.in/59866)
randomnick_ has joined #ruby
Croesus has joined #ruby
vlad_starkov has joined #ruby
<DouweM> heftig: nice
robonerd has joined #ruby
s2013{Texas} has joined #ruby
nari has quit [Ping timeout: 248 seconds]
phrozen77 has joined #ruby
Guest80537 has quit []
pu22l3r has joined #ruby
finnomenon has quit [Ping timeout: 240 seconds]
preller has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Quit: Leaving.]
finnomenon has joined #ruby
platypine has joined #ruby
brtdv has quit []
yacks has joined #ruby
<Croesus> is this the official ruby irc?
<Croesus> or is it ruby-lang?
<havenwood> Croesus: This channel doesn't have a registration requirement.
<volty> no official seals around
<Croesus> Ok?
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
<Morrolan> Croesus: #ruby-lang is more official. We're more sane. ;D
<havenwood> Croesus: So talk here if you want to chat with folks who might not have registered. And #ruby-lang if you maybe want a better signal to noise ratio. Ruby's website links to the other.
<Croesus> pishposh
Mitchellvanw has joined #ruby
<havenwood> Croesus: TIMTOWTDI
horofox has joined #ruby
horofox has quit [Client Quit]
<Morrolan> havenwood: In god's name, what abomination is *that*?
preller has joined #ruby
<havenwood> Morrolan: There is more than one way to do it. :P
<Morrolan> Oh. :P
<havenwood> Morrolan: A Perlism Ruby borrowed.
timonv has quit [Remote host closed the connection]
volty has quit [Quit: Konversation terminated!]
<heftig> i hope ruby 3 cleans up with most of the perlisms
<Morrolan> Yea, I've heard the sentence before, but haven't stumbled across the acronym, up to now. :P
<havenwood> Croesus: It is okay to cross post, just say in both channels when you do it.
timonv has joined #ruby
petey__ has joined #ruby
monkegjinni has joined #ruby
pyrac has quit [Quit: pyrac]
Guest4825 has joined #ruby
smoothbutta has quit [Read error: Connection timed out]
Guest4825 has quit [Excess Flood]
adjo_ has joined #ruby
tbuehlmann has joined #ruby
Guest24676 has joined #ruby
adjo_ has quit [Client Quit]
petey_ has quit [Ping timeout: 248 seconds]
pyrac has joined #ruby
adjo_ has joined #ruby
derebos has quit [Remote host closed the connection]
avqXb0uv has joined #ruby
avqXb0uv is now known as avqxb0uv
carraroj has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
yano has joined #ruby
brtdv has joined #ruby
mrfoto has joined #ruby
mrfoto has quit [Client Quit]
pskosinski has quit [Quit: Til rivido Idisti!]
mrfoto has joined #ruby
baroquebobcat has joined #ruby
earthquake has joined #ruby
<havenwood> #ruby-lang - #ruby == 196
<havenwood> #ruby - #ruby-lang => 682
<wald0_> thats not good for this channel lol
<havenwood> wald0_: how so?
threesome has joined #ruby
<wald0_> oh, i readed that you meant the total
<havenwood> i wrote it very poorly
niklasb has quit [Ping timeout: 246 seconds]
Tearan has joined #ruby
mrfoto has quit [Client Quit]
Hanmac1 is now known as Hanmac
<Morrolan> I'm still trying to figure out what you meant to say. ;D
<wald0_> mmh, there's something that i dont quite understand "how it is made", in ruby theres things like .lenght, running it from a specific object can show something different than others (having different code), how this is made? where it is set/coded?
<havenwood> Both have very similar avg lengths of nics: {ruby_avg: => 7.40, ruby: => 7.35}
<Hanmac> havenwood: #ruby-lang is protected, not every one can enter, only the seekers that know the truth ;P
<havenwood> Hanmac: Indeed... hehe
<havenwood> Morrolan: What i meant: (ruby_lang - ruby).size #=> 196; (ruby - ruby_lang).size #=> 682
<wald0_> or acting differently depending of its type
<Morrolan> wald0_: Methods like .length are defined inside the respective classes.
mrfoto_ has joined #ruby
volty has joined #ruby
<wald0_> Morrolan: so a different "lenght" method inside each type of class ?
<plotter> wald0; good question i think you can use "s
Davey has quit [Quit: Computer has gone to sleep.]
<havenwood> >> class NilClass; def length; 0 end end; nil.length
<eval-in> havenwood => 0 (https://eval.in/59869)
<plotter> Oh, I was scrolled wayyy up
<Morrolan> wald0_: The String class will implement the .length method to return the number of characters, the array class to return the number of items, yea.
mrfoto_ has quit [Client Quit]
<plotter> >> class NewClass; def length; 1 end end; nil.length
<eval-in> plotter => undefined method `length' for nil:NilClass (NoMethodError) ... (https://eval.in/59870)
<Morrolan> havenwood: Now I'm wondering how you are subtracting ruby from ruby-lang. :P
mrfoto_ has joined #ruby
<plotter> >> class NilClass; def length; 1 end end; nil.length
<eval-in> plotter => 1 (https://eval.in/59871)
<havenwood> Morrolan: Oh, they're both Arrays of Strings.
Mitchellvanw has quit [Quit: Dozing off...]
* Morrolan stabs havenwood
<havenwood> :P
mrfoto_ has quit [Client Quit]
<Morrolan> What strings? Nicknames? Messages? :P
<havenwood> nics
<Morrolan> Was it that hard to tell me from the beginning? :P
mrfoto_ has joined #ruby
mrfoto_ has quit [Client Quit]
tiglog has quit [Quit: Leaving]
<havenwood> Morrolan: output from `/names #ruby-lang` and `/names #ruby`
mrfoto has joined #ruby
mrfoto has quit [Client Quit]
mrfoto has joined #ruby
kraljev2 has joined #ruby
<kraljev2> How can I run bundler to install gems into application directory?
<havenwood> kraljev2: bundle --deployment
<havenwood> if i understand what you're asking, you wanna vendor locally?
Roa has quit [Ping timeout: 272 seconds]
<kraljev2> yep, have for each application gems bundled together
petey__ has quit [Remote host closed the connection]
<kraljev2> in their own directory
petey_ has joined #ruby
mrsolo has joined #ruby
<havenwood> kraljev2: installs to app's vendor/bundle dir, or override location with --path
Davey has joined #ruby
timonv has joined #ruby
<volty> what is the syntax for passing a method of an object as a & proc ? // I have @alarms.method(:to_x) and &@alarms.method(:to_x) does not work
Mitchellvanw has joined #ruby
<havenwood> kraljev2: More info: bundle help install
<havenwood> volty: like?: @alarms.method(&:to_x)
Roa has joined #ruby
maletor has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has joined #ruby
<volty> havenwood: that doesn't work
<havenwood> volty: `:to_x` is a method and `#method` takes a block?
Guest21184 has joined #ruby
<DouweM> volty: I think that syntax should work. could you gist the actual code?
greenrose1 has joined #ruby
yfeldblum has joined #ruby
<volty> DouweM: which syntax?
pipework is now known as pipecloud
<havenwood> volty: oh, you mean the real #method method not #foo, huh? I need coffee...
<DouweM> volty: `&@alarms.method(:to_x)`
<kraljev2> havenwood: Unfortunately, I haven't found it in help
timonv has quit [Ping timeout: 240 seconds]
<kraljev2> I just want to install all the gems app needs to ./my_app/.gems/
smathieu has joined #ruby
greenrose has quit [Ping timeout: 246 seconds]
<DouweM> volty: but perhaps you need () around @alarms.method(:to_x)
pu22l3r has quit [Remote host closed the connection]
<volty> DouweM: does not work, gives /home/volty/prog/ruby/qt_alarm.rb:31:in `to_x': wrong number of arguments (1 for 0) (ArgumentError)
<havenwood> kraljev2: No luck with?: bundle --deployment --path .gems
<volty> and all the same if you with () around
<DouweM> volty: post the whole script then
pu22l3r has joined #ruby
<havenwood> Indeed, moar codes! \o/
axl_ has quit [Quit: axl_]
<kraljev2> The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into
<volty> my code works well when that method is passed as a regular proc // (it is a callback proc) // but i want it passed as a &b and that could be wrong (because the other one is binded to its object)
<kraljev2> version control before deploying.
<DouweM> volty: codes pls
<havenwood> kraljev2: bundle first, to create the .lock file (which you want to check into git), then you'll have it and deployment will use it
leonidlm has quit [Ping timeout: 245 seconds]
smoothbutta has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
<volty> DouweM: thanks but it's too complicated, the code is too much interdependent, i'll go without & for now and try something with lambdas later // it must have to do with the bindings
vlad_sta_ has joined #ruby
thyagobr has quit [Ping timeout: 245 seconds]
am3n has joined #ruby
smathieu has quit [Ping timeout: 272 seconds]
jonathanwallace has quit [Ping timeout: 260 seconds]
<havenwood> kraljev2: Just an aside, a new non-bundler option is to: gem install -g Gemfile -i .gem
pyrac has quit [Quit: pyrac]
<volty> i wanted to use that &b for an inline block as well is with an object's method converted to a proc
freerobby has quit [Quit: Leaving.]
pu22l3r has quit [Ping timeout: 268 seconds]
mikesplain has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
<havenwood> kraljev2: then use something like chgems with ^, but bundler is the more established way no doubt
monkegjinni has quit [Remote host closed the connection]
zz_michael_mbp is now known as michael_mbp
baroquebobcat has quit [Quit: baroquebobcat]
monkegjinni has joined #ruby
xk_id has quit [Quit:
am3n has quit [Ping timeout: 256 seconds]
noop has joined #ruby
krnflake has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
cads has quit [Ping timeout: 240 seconds]
<volty> DouweM: you were useful anyway, i found the problem isolating a sample classes
<DouweM> :)
havv has joined #ruby
<volty> it has to do with qt lib code // going to see what could be wrong
derebos_ has joined #ruby
mikesplain has joined #ruby
fgo has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
enebo has quit [Quit: enebo]
Seich has joined #ruby
avqxb0uv has left #ruby [#ruby]
mixel has quit [Quit: mixel]
banisterfiend has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
mikesplain has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
enebo has joined #ruby
Trudko has joined #ruby
smoothbutta has quit [Read error: Connection timed out]
Trudko has quit [Read error: Connection reset by peer]
OdNairy has joined #ruby
karls0n has quit [Ping timeout: 240 seconds]
* shevy hugs volty
<volty> I got it
Pixi__ has joined #ruby
Xiti has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
banisterfiend has joined #ruby
werdnativ has joined #ruby
IcyDragon has joined #ruby
<volty> sometimes i'm surprised how much intelligent I am and sometimes I am surprised how much stupid I am // do you have the same alternating feeling guys ? :)
<DouweM> haha
<kraljev2> rarely
IceDragon has quit [Ping timeout: 272 seconds]
Czupa has joined #ruby
xk_id has joined #ruby
Pixi__ has quit [Quit: Leaving]
ananthakumaran has quit [Quit: Leaving.]
<poutine> volty, I'm sure old people feel proud of themselves when they type google into the search bar in their web browser, and then type facebook into google, and click it to go to facebook every time. All achievements are relative, I see no evidence of extraordinary intelligence from you.
classix has joined #ruby
<volty> so: the qt initializers allow for a block to which they pass itself // and for some reason the qt code, given granted that it is an initializer block, calls the methods inside the proc passing the object is param
<volty> poutine: i am an expert for frustrated people
brennanMKE has quit [Remote host closed the connection]
kraljev2 has left #ruby [#ruby]
brennanMKE has joined #ruby
<Nilium> I am an expert at angering people who don't like obvious answers. Also getting myself injured.
brennanMKE has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
allaire has quit []
enebo has quit [Quit: enebo]
Technodrome has joined #ruby
mlpinit has quit [Remote host closed the connection]
<volty> pimply anonymous, under stairs vandalism
<Technodrome> what is the difference between #ruby and #ruby-lang?
mlpinit has joined #ruby
<Nilium> The latter is the official channel.
freerobby has joined #ruby
splashs has joined #ruby
<havenwood> Technodrome: This channel doesn't require nic registration.
<Nilium> this one is the Wild West of ruby channels.
<Technodrome> ah havenwood
Xiti has joined #ruby
wallerdev has joined #ruby
<volty> where from all this resentment ? dear pimply? :)
<Nilium> I have found a coffee machine that I want but will probably never buy.
Heero has joined #ruby
<volty> coin
<havenwood> Technodrome: Pretty typical for there to be more than twice as many people and more noise here.
<volty> and some frusties :)
<Technodrome> ah, never even knew the channel existed
<volty> coin coders with coin souls
banghouse2 is now known as banghouse
freerobby has quit [Ping timeout: 240 seconds]
<volty> (it always goes together )
banghouse is now known as Guest85090
Guest85090 is now known as banghouse
mrfoto has quit []
earthquake has quit [Quit: earthquake]
jbpros has quit [Quit: jbpros]
BizarreCake has quit [Ping timeout: 245 seconds]
<Nilium> Does anyone know what volty is rambling about?
<ezkl> volty: You're working with some impressive slang
<volty> ask that question about you nilly
<ezkl> I like it
<Nilium> You're a confusing person.
<volty> what was talking poutine about ? Tell me, gangy boy !
werdnativ has quit [Quit: werdnativ]
lnormous has joined #ruby
Seich has quit [Ping timeout: 272 seconds]
<poutine> I think volty is spergin' like there ain't no tomorrow
<volty> If you are confused you should try to inspect yourself before talking about other's rambling
<Nilium> Or a bot..
banisterfiend has quit [Quit: Computer has gone to sleep.]
<volty> go gangy! Show your frustration
<Nilium> Yeah, volty's a bot.
Mitchellvanw has quit [Quit: Dozing off...]
<volty> Show how you are able to attack as a bunch of raging dogs
<volty> bau bau
Mitchellvanw has joined #ruby
Seich has joined #ruby
bean has joined #ruby
timonv has quit [Remote host closed the connection]
SilverKey has joined #ruby
timonv has joined #ruby
derebos_ has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
<ezkl> volty: Stai utilizzando una sorta di traduttore italiano a inglese, non è vero?
<Mon_Ouie> Technodrome: The other difference is that twice as many people asked the same question as you today on #ruby than on #ruby-lang :p
<volty> no caro - è il mio modo
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
timonv_ has joined #ruby
tjad has joined #ruby
derebos_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<Nilium> Ok, so he's not a not but is probably misunderstanding stuff people say and maybe getting defensive over it.
<Nilium> *not a bot.
UNIXgod has joined #ruby
Vivekananda has joined #ruby
<havenwood> minswan
<shevy> pizza! spaghetti!
mrsolo has quit [Quit: This computer has gone to sleep]
<ezkl> volty: Negli Stati Uniti, che chiamiamo la vostra afflizione linguistica "swagger"
<havenwood> I'm curious how Topaz Ruby is coming along. No versioned release yet.
<Nilium> I should probably clean the cut on my arm.
<shevy> havenwood it may be idling to power
<shevy> Nilium no!
<volty> Nilium: imbarassed, not defensive // I always get imbarassed when in front of the pettiness of some humans
<shevy> Nilium deepen it!
<Nilium> shevy: Nah, I'll pass, that'd probably put it into the muscle.
<shevy> yes
<shevy> and then you put some funig into it!
<volty> piccolino, devi ancora mangiare per misurarti con me -- perfino in inglese
<shevy> and become FungiNilium
<shevy> *guni
<shevy> grrr
<shevy> *fungi
<Nilium> I ain't trying to get high in novel ways.
<shevy> hehe
ravster has quit [Quit: Leaving.]
<volty> «Negli Stati Uniti, che chiamiamo » is a product of an automatic translation
earthquake has joined #ruby
banisterfiend has joined #ruby
TheMoonMaster has quit [Excess Flood]
<shevy> stati spaghetti!
TheMoonMaster has joined #ruby
<ezkl> Totally
<Morrolan> Gorgonzola. :)
achru has quit [Remote host closed the connection]
<volty> ahah
codeFiend has quit [Quit: codeFiend]
<shevy> mascarpone!
<Morrolan> Gosh darn, now there better be some in the fridge. :<
<volty> not like fat us food , neither smell, neither taste
achru has joined #ruby
<Nilium> fever gone, but itchy. itchy. tasty.
<Morrolan> Fat us food? I'm not food. D:
<shevy> Nilium place something salty on it
<shevy> Morrolan how about fat?
<Morrolan> Neither. :)
am3n has joined #ruby
<shevy> more schoki
<volty> pecorino
<Nilium> I should go through the log to see what set off volty.
<shevy> mozzarella
<shevy> yeah... I'll do that as well now...
* shevy scrolls up
<volty> going to prepare aglio, olio, peperoncino and PECORINO
<shevy> <volty> what is the syntax for passing a method of an object as a & proc ? <-- that was it
<shevy> that made him crazy
smathieu has joined #ruby
<volty> <<< <poutine> volty, I'm sure old people feel proud of themselves when they type google into the search bar in their web browser, and then type facebook into google, and click it to go to facebook every time. All achievements are relative, I see no evidence of extraordinary intelligence from you. >>>
<Morrolan> Well, I can understand that the magic of '&' can make one crazy.
<shevy> I always said... remove &, it is harmful to people
<Morrolan> Indeed.
<shevy> array.map &:chomp
<volty> no, i have to pass to a regular proc
<shevy> hmm... let's combine & with ->()
<volty> too much & magic may hurt in the future
<shevy> agreed
<shevy> wait
Andrevan has joined #ruby
<shevy> too much magic in general can hurt in the future
OdNairy has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
<volty> shevy: i'm talking about my code that uses qt and relays on slot, signals, callbacks etc etc
<Morrolan> Callbacks! That must've been it.
achru has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
<shevy> volty I went with ruby-gnome
<shevy> I never understood the slot-signal concept in qt
mercwithamouth has joined #ruby
<volty> ruby magic mixed with slots & signals can get quite untraceable and untrustable
<shevy> and I think ruby-qt wants you to use camelcased method calls or?
ner0x has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
<volty> all the same, you can choose camel or the other
<shevy> ok
aryaching has quit []
smathieu has quit [Ping timeout: 240 seconds]
<Nilium> Would be odd to see camelcase in Ruby.
<UNIXgod> Nilium: camelCase? or CamelCase or camel_case || #t
<volty> i say that humans are like rats: get used to everything! even to camelcase :)
Seich has quit [Quit: Computer has gone to sleep.]
freerobby has joined #ruby
thepumpkin has joined #ruby
<UNIXgod> I like _cc! use that one!
<Nilium> volty, are you the crazy guy who quotes scripture or whatever on every programming/tech site's comments section ever?
krz has joined #ruby
<volty> do not what you are talking about
<poutine> This is what happens when #wrongplanet leaks their aspies into other channels
<Nilium> Ok, well, at least you're not that guy.
<volty> find the guy and argue with him
<Morrolan> Arguing on the internet? Hah.
<volty> do not behave like an old woman
<volty> (acid)
<Nilium> So, volty, can I suggest relaxing or something? You seem to be responding in a semi-hostile manner to everyone even when nobody is talking to you
<volty> no honey
<volty> you have some problem, not me
<Nilium> It's not really a healthy habit.
<Nilium> Well, I tried.
<volty> i was asking advice
<UNIXgod> Nilium: but volty groks rats!
chuk has quit []
<Morrolan> volty: And then your proceeded to spit out random noise. ;)
<volty> that about 'rats' is what I say regularly / / nothing to do with offense
<volty> Morrolan: no
<volty> <<< <poutine> volty, I'm sure old people feel proud of themselves when they type google into the search bar in their web browser, and then type facebook into google, and click it to go to facebook every time. All achievements are relative, I see no evidence of extraordinary intelligence from you. >>>
<Nilium> Hey, I'd swallow a rat alive too if I thought it tasted good.
achru has joined #ruby
Andrevan is now known as afader
<volty> I like the frusties like him to argue
sichardrtallman has joined #ruby
endash has joined #ruby
<Morrolan> Which brings us back to 'noise', doesn't it.
havenwood has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 248 seconds]
<volty> To tell what makes them spit out acid
<UNIXgod> Nilium: it's a bot or bored human which groks rats
jonathanwallace has quit [Ping timeout: 246 seconds]
<volty> Morrolan: why don't you ask poutine???
<Nilium> One of the signs of internet craziness is having a ton of words that you understand but nobody else does.
havenwood has joined #ruby
thepumpkin has quit [Ping timeout: 260 seconds]
<shevy> Nilium you rat murderer you!
jonathanwallace has joined #ruby
<Nilium> I thought it was a bot, but it's apparently just a confused Italian man
<shevy> no wonder my cat is starving
RagingDave has joined #ruby
<Morrolan> My cat always claims to be starving.
axl_ has joined #ruby
<Morrolan> So far she hasn't starved.
<Nilium> I plead the fifth.
<volty> think about yourself // do not hide behind «internet craziness» // tell poutine that is is not ok to do what he did and we are ok
<shevy> Nilium the italian have their own unique way of writing english, just as the austrians have as well and the japanese too ;)
<volty> fair?
<Nilium> shevy: Yes, but I know a fair amount of Italians, and they're nothing like this
<shevy> I think it has a lot to do with the prevalent grammar in use, it seems hard to quickly switch between different languages
mercwithamouth has quit [Ping timeout: 245 seconds]
<volty> eh?
<Nilium> This guy is the sort that sounds like he joins a channel, claims to be extremely smart and have the solution to everything, and then goes off the deep end when he doesn't get a positive response
<Nilium> In other words, he's like that crazy guy who quotes scripture.
<shevy> Nilium aha? well I know quite some too and volty fits one hundred percent with them! :D
RagingDave has quit [Client Quit]
<shevy> though only northern italy, I have no idea about the south
<volty> think about yourself // do not hide behind «internet craziness» // tell poutine that is is not ok to do what he did and we are ok
<Nilium> You know some strange Italians
<volty> you are just gangy!
<Nilium> Is it normal for your Italian friends to write in what appears to be stanzas?
<shevy> Nilium they are! there are restaurants where there is an italian man standing in a perfect suit and his sole job is to be friendly and guide people to empty places where they can sit down :D
<volty> goes on ... insulting italians
<volty> hoh!
<Nilium> Could you explain what gangy means without using that word?
<volty> too much frustrated for me, going to eat my pecorino :)
<volty> gang
<shevy> dunno, seems to be just like they talk too ... ciao ... buongiorno ... italian rules!
<volty> banda del buco
havenwood has quit [Ping timeout: 240 seconds]
<Nilium> shevy: Ok, those are robots, they're not real people
<volty> you are supposed to be real, too real :)
mercwithamouth has joined #ruby
<volty> going to eat my pecorino, pecorone!
volty has quit [Quit: Konversation terminated!]
<Nilium> So, #ruby has a resident crazy person..
<Nilium> Achievement unlocked?
maletor has quit [Quit: Computer has gone to sleep.]
<DouweM> lol
jonathanwallace has quit [Ping timeout: 248 seconds]
* UNIXgod bots can be autonomous agents with recursive linguitics ... this one is broken
snath has quit [Ping timeout: 272 seconds]
<Nilium> I don't think it's actually a bot, just crazy.
<UNIXgod> ELIZA wasn't crazy.
<Nilium> You occasionally get folks like that on the 'net, e.g., the sort that believe crystals are a spiritual thing (or living creatures), the sort who think they're messiahs or have uncovered the newest programming paradigm and if only you'd listen to their insanity, etc.
<Nilium> It's always weird.
plague88 has quit [Quit: Page closed]
yfeldblum has quit [Read error: Connection reset by peer]
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
<UNIXgod> Nilium: oh! web developers! I know what your talking about. met one last week!
<shevy> I think he described me when I was young
<Nilium> I've been trying to not make fun of web developers lately.
<shevy> everyone downvotes me on reddit... they do not want to see the truth :(
<shevy> they can't handle the truth
<Nilium> I forgot to include the bit about coming up with weird ways of saying shit on the internet.
<shevy> web developers make the world a better place
<UNIXgod> shevy: I believe in the truth!
<shevy> now you can order everything online and never have to leave home
<Nilium> Like saying // shit with double slashes // between things, kind of like stanzas.
<Nilium> That must be a not-living-in-the-boonies feature.
<shevy> he just likes to pack it into one thing
<shevy> others like to space it out on multiple lines
<shevy> without saying much
<shevy> you see?
<UNIXgod> shevy: webDevelopers should be in camelCase
<shevy> god I hate camelcase
<Nilium> I just use what's normal for a given language/platform.
iliketurtles has joined #ruby
<existensil> i_would_love_underscores_a_lot_more_if_my_keyboard_had_a_dedicatd_button
<Nilium> My preference is to_underscore_everything, but it's not that big of a deal, usually.
<endash> when it comes to web development i think that means using PHP
<shevy> but you can use any name in php
<shevy> function HeLlOwOrLd()
snath has joined #ruby
<shevy> god I hate php
<endash> not enough inline SQL… invalid PHP!!
<UNIXgod> shevy: can you do hythens? like (web-developer? #t)
<shevy> what is that
<Nilium> Placeholders in SQL wassat let me just go ahead and concatenate strings to build statements
<Nilium> eval's evil? pfft I've been using it all this time
<UNIXgod> shevy: s/hythens/hyphens
<shevy> hash key?
<shevy> oh you mean - ?
<shevy> that's in lisp or?
<UNIXgod> shevy: its (not nil)
<shevy> (cool-function(what 'hi there
<Nilium> Looks like clisp to me.
Seich has joined #ruby
derebos_ has quit [Ping timeout: 240 seconds]
<Nilium> (vector->list '#(1 2 3)) ← Lisp lets you have nice function names.
jbpros has joined #ruby
eeriegeek has quit [Quit: Leaving.]
<s2013{Texas}> any good linear algebra library in ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
lnormous has quit [Ping timeout: 240 seconds]
pagios has joined #ruby
sichardrtallman has quit [Quit: leaving]
<pagios> can i send from ruby some data using named piped?
<pagios> s*
tylersmith has joined #ruby
jbpros has quit [Quit: jbpros]
<existensil> yes, i'm sure ruby can interface with named pipes
<existensil> i've never done it, but there are very few things ruby can't do
<UNIXgod> pagios: I've done it. Same as anything else
<sam113101> it's just a file after all
<pagios> UNIXgod: i have a c program sitting in memory with a named pipe accepting stdin, how can i interface with it from ruby
<sam113101> open the file
<UNIXgod> pagios: popen. cat. ticks. system. file read like C. anything really
<sam113101> print to it
axl_ has quit [Quit: axl_]
colonolGron has joined #ruby
<pagios> i dont have a file it is mainly loaded in c this way: mystream = g_unix_input_stream_new(0,FALSE);
<pagios> count = g_input_stream_read(mystream,mydata,200,NULL,NULL)
amacgregor has joined #ruby
OdNairy has joined #ruby
axl_ has joined #ruby
<splashs> having trouble compiling ruby 2.0... help? https://gist.github.com/rpq/7282181
nateberkopec has joined #ruby
lnormous has joined #ruby
<UNIXgod> pagios: he's saying it's just a FILE. unix metaphor. Just like the files in /dev. It's an abstraction. you write to the fifo and send the c program into the background as it will be in waiting state. Then call the ruby script to empty the pipe. The c program will finish and move on.
agjacome has joined #ruby
<UNIXgod> splashs: you need to run a more verbose compile. That gist doesn't tell us anything of the actual error.
<pagios> how can i located the fifo of the c program?
<pagios> i didnt quite get it
<splashs> UNIXgod: how?
<UNIXgod> pagios: you make a named pipe with the command mkfifo.
iliketurtles has quit [Quit: zzzzz…..]
<UNIXgod> pagios: man mkfifo
Mitchellvanw has quit [Quit: Dozing off...]
<pagios> UNIXgod: i should then modify the c program to make that fifo
<pagios> i cant modify the c code
<UNIXgod> splashs: read the ruby source and follow the build instructions
agjacome has quit [Client Quit]
<pagios> i am supposed to communicate from ruby to the c program without touching the c program, the c program works fine when i do echo "hi" | ./cprogram
<pagios> so i need a way to make it go input data -> ruby -> cprogram
<UNIXgod> pagios: you asked about named pipes.
petey_ has quit [Remote host closed the connection]
petey_ has joined #ruby
<UNIXgod> pagios: look at rubies io class. you can make ruby act like awk or whatever.
<splashs> UNIXgod: there's very little in the readme file to assist
<pagios> UNIXgod: but my question is once C program is loaded into memory, knowing that it accepts data from "|" can i make a query to it from ruby at any point in time?
am3n has joined #ruby
freezey has joined #ruby
kidoz has joined #ruby
CaptainJet has quit []
<UNIXgod> pagios: no. foo | bar | baz acts as a single unit. You'd have to call it a second time. which is okay. unix was set up to make processes cheap and is meant for that.
<UNIXgod> pagios: if your c program is running as a service you need to look into how to make a daemon.
<pagios> UNIXgod: i want a way to communicate with the c program withouyt running it a second itme
<pagios> it is doing some other work...
petey_ has quit [Ping timeout: 245 seconds]
<UNIXgod> pagios: sounds like you need to make a service.
CaptainJet has joined #ruby
<pagios> i need a way to send data from ruby to that process thats it
<splashs> i used -v for gcc and nothing useful there either
am3n has quit [Ping timeout: 256 seconds]
mlpinit_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv has joined #ruby
atno has quit [Remote host closed the connection]
UNIXgod has quit [Quit: leaving]
smathieu has joined #ruby
<splashs> turns out i had to use -O1
mlpinit_ has quit [Ping timeout: 246 seconds]
mlpinit has quit [Ping timeout: 272 seconds]
freezey has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 246 seconds]
lillard has quit [Remote host closed the connection]
freezey has joined #ruby
ner0x has quit [Quit: Leaving]
chinkung has joined #ruby
havenwood has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
lnormous has quit [Ping timeout: 245 seconds]
Soda has joined #ruby
kung has quit [Ping timeout: 256 seconds]
smathieu has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
jonathanwallace1 has joined #ruby
Technodrome has quit [Quit: Technodrome]
freezey has quit [Ping timeout: 272 seconds]
adjo has quit [Ping timeout: 245 seconds]
adjo_ has quit [Ping timeout: 245 seconds]
theoretick has joined #ruby
axl_ has quit [Quit: axl_]
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
freerobby has quit [Ping timeout: 272 seconds]
jonathanwallace1 has quit [Quit: WeeChat 0.4.1]
<RubyPanther> pagios: a "named pipe" has a path like /tmp/foo and you just read/write to it
mikesplain has joined #ruby
noop has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Ping timeout: 240 seconds]
<existensil> treat it just like any other file. use w+/r+ as the modes to prevent blocking
<existensil> i think
freerobby has joined #ruby
carraroj has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
yfeldblum has joined #ruby
axl_ has joined #ruby
Seich has quit [Ping timeout: 240 seconds]
goganchic has joined #ruby
mikesplain has quit [Ping timeout: 246 seconds]
michael_mbp is now known as zz_michael_mbp
serp` has joined #ruby
Guest24676 has quit [Read error: Connection reset by peer]
Jetchisel has quit [Ping timeout: 260 seconds]
Seich has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
voodoofish has joined #ruby
platypine has quit [Ping timeout: 246 seconds]
hiyosi has joined #ruby
akhkharu has quit []
akhkharu has joined #ruby
earthquake has quit [Quit: earthquake]
MrPot4to has quit [Remote host closed the connection]
mrpot4to_ has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
jbpros has joined #ruby
mlpinit has joined #ruby
Technodrome has joined #ruby
volty has joined #ruby
axl_ has joined #ruby
rvchangue has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
atno has joined #ruby
dmiller has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
zz_tsykoduk is now known as tsykoduk
rvchangue has joined #ruby
derebos has joined #ruby
sayan has joined #ruby
axl_ has quit [Quit: axl_]
zipper has joined #ruby
OdNairy has quit [Ping timeout: 272 seconds]
mercwithamouth has joined #ruby
voodoofish has quit [Ping timeout: 272 seconds]
robustus has quit [Ping timeout: 264 seconds]
am3n has joined #ruby
robustus has joined #ruby
<Technodrome> what is better rvm or rbenv?
am3n has quit [Ping timeout: 256 seconds]
<volty> they're much of a muchness :)
<goganchic> rbenv
<yxhuvud> neither. chruby.
<Nilium> chruby.
<volty> i'm fine with rbenv
<Nilium> I use rbenv and I still tell people to use chruby.
<havenwood> chruby
axl_ has joined #ruby
<volty> missing why
<havenwood> volty: Tests. No shims. Less code. An irc channel and better support.
pskosinski has joined #ruby
<Technodrome> seems like chruby is the most newest and simplistic way
<Technodrome> you can use ruby-build to build ruby and put it in a dir ,and use chruby to manage it right?
<havenwood> Technodrome: yup
<Technodrome> how does bundler make gem sets obsolete though? Like i see some people implying?
<volty> havenwood: just for sake of not-googling, is the philosophy behind chruby behind that of chroot?
<havenwood> Technodrome: These days I use ruby-install, but still use ruby-build from time to time.
<havenwood> volty: Pretty much.
<Technodrome> what does ruby-install do?
<havenwood> volty: Here's the code, a quick read: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
Davey has quit [Quit: Computer has gone to sleep.]
<volty> then: simpler => better, but I will not change since I do not change versions // thx, going to give a look at the url
<Technodrome> i'm just using the mac osx mavericks ruby right now with rails
<Technodrome> it seems to work ok
<Technodrome> havenwood: so it's not compiling or anything
<havenwood> Technodrome: ruby-install and chruby work well with Mavericks too btw (rvm and rbenv seem up to speed at this point.)
<havenwood> too
drumusician has joined #ruby
<Technodrome> well i just really wanted to keep all the gems separate
<havenwood> Technodrome: It compiles and installs Ruby, JRuby, Rubinius or Maglev.
<Technodrome> but maybe i should look into using bundler for that
<havenwood> Technodrome: chgems is nice if you don't use bundler
<havenwood> Technodrome: I use chruby and bundler.
<Technodrome> yes
<Technodrome> seems like the combo made for win atm
aapzak has quit [Ping timeout: 246 seconds]
Speed has left #ruby ["WeeChat 0.4.2"]
mercwithamouth has quit [Ping timeout: 246 seconds]
voodoofish has joined #ruby
aapzak has joined #ruby
snath has quit [Ping timeout: 245 seconds]
<havenwood> volty: yeah, if you start version changing at some point give it a look! if you're not doing that then yeah prolly not really needed
<volty> Nice. I'll pass with chruby when I decide to install 2.x.
buscooo has joined #ruby
<volty> that's my way of doing things, btw
Seich has quit [Quit: Computer has gone to sleep.]
<havenwood> reasonable unless you wanna waste lots of time... me <--
Seich has joined #ruby
smathieu has joined #ruby
Shidash has joined #ruby
<volty> also because I'm trying to avoid 'external' executables and object libs
staafl has joined #ruby
CreativeEmbassy has joined #ruby
butblack has joined #ruby
butblack has left #ruby [#ruby]
Davey has joined #ruby
bluefintuna has joined #ruby
Seich has quit [Ping timeout: 245 seconds]
<bluefintuna> test
<Technodrome> you know i started with ruby in 2003, went to Java
<havenwood> bluefintuna: helloooo
<Technodrome> now back with Ruby
butblack has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
<havenwood> Technodrome: Use RedBridge JRuby stuffs much these days?
<Technodrome> i've never used Jruby ever
freerobby has joined #ruby
<Technodrome> i was a J2EE dev
jeffdb has quit [Quit: jeffdb]
<havenwood> aha
thepumpkin has joined #ruby
<Technodrome> which is a whole world in itself
<Technodrome> when you break it down, it's not so hard, but boy when you don't , you're in for it as a new user there
<existensil> I was one of those. heh
Sinco has joined #ruby
<Technodrome> existensil: got overwhelmed?
<existensil> being a ruby programmer is generally more fun, day to day, than being a j2ee developer
<Technodrome> ah
<existensil> Technodrome: heh. more like underwhelmed
<Technodrome> well I want to do my own things now
<Nilium> I learned Java in two weeks about three years ago, dropped it afterward, then picked up Scala last month because I needed something that compiled to JVM bytecode that didn't suck.
<Nilium> Thankfully never had to touch J2EE
<Technodrome> i need the fastest and most elegant way to build web applications
<staafl> iterators, enumerators, enumerables, generators, fibers, can anyone explain the iterator pattern implementation in ruby to me?
<Nilium> Scala lets me feel like I'm writing Ruby.
<Nilium> Makes me pretty happy.
<existensil> Technodrome: i found enterprise projects to be excruciatingly slow paced at times. maybe it was the company.
<Technodrome> its ok though, you can use things like ruby and python in the enterprise if you want, if you have a good product or service, it's acceptable
bluefintuna has quit [Client Quit]
amacgregor has quit [Read error: Connection reset by peer]
<Technodrome> the bank i was working at, uses Python extensively
bluefintuna has joined #ruby
momomomomo has joined #ruby
jinxD has joined #ruby
goganchic has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 245 seconds]
<volty> banks do not need fantasy -- ay contraire
<Technodrome> i'm not really new to ruby, but new to getting back into it for sure, it will be a little rough, like "self" had me confused for a few ours
<Technodrome> hours*
eflynn has joined #ruby
thepumpkin has quit [Ping timeout: 260 seconds]
<havenwood> Nilium: Ever tried Clojure?
mrfoto has joined #ruby
mrfoto has quit [Client Quit]
<havenwood> Nilium: Was having fun doing hybrid JRuby/Clojure project Eulers.
<eflynn> anyone familiar with jekyll?
<Nilium> Interesting.
<Nilium> re: the bank
<Nilium> Using python
<Nilium> I tried Clojure, but it doesn't play nice with Android, which is what I use Scala for.
mrfoto has joined #ruby
<havenwood> Nilium: Ahhh, yeah.
<Technodrome> but i'm just tired of the status quo
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<Nilium> Very, very hard to get it working well on there, mostly because Android's an ill-designed piece of crap in a lot of respects.
<existensil> Technodrome: working for someone else?
<havenwood> eflynn: Yup, question on whether to use it or problem using it?
<Nilium> I'd love to have a good Lisp for Android
zipper has quit [Quit: Rebooting to make sure archey install has worked.]
<Technodrome> there is so many enterprise product vendors who have the most generic software that can be easily replaced with a solid new solution
<eflynn> havenwood: I did "jekyll docs" to view the docs, and got "Permission denied - /var/lib/gems/1.9.1/gems/jekyll-1.2.1/site/_site. Use --trace to view backtrace". I shouldn't need sudo just to view docs, any ideas?
bluefintuna has quit [Client Quit]
<havenwood> eflynn: Because of where you have Ruby installed, you'll need to: sudo jekyll docs
<Mon_Ouie> Nilium: Did you try this for clojure? https://github.com/clojure-android/lein-droid
<Technodrome> existensil: from 2004 I worked *everyday* as a J2EE dev literally, I got tired of that in 2009 but it's all good
<volty> nil - tail recursive :)
bluefintuna has joined #ruby
<Technodrome> existensil: i meant status quo really within myself
<Nilium> volty: Scala actually has a tail-recursion annotation that tells the compiler to make sure a function is optimized for tail recursion. If it can't optimize it, it emits an error.
irated has joined #ruby
<irated> need helps
<irated> yo
axl_ has quit [Quit: axl_]
<volty> Nilium: will take a note and read further // now (excuse for // :) ) i'm too tired for recursive thinking, thx
<irated> bcrypt is throwing an err
<Nilium> Mon_Ouie: I think I looked at it, but the problem with Clojure was partly the size of the runtime it drags in and partly that it's just unpleasant to use Clojure with the Android APIs.
<momomomomo> irated: !code
bluefintuna has quit [Client Quit]
<momomomomo> irated: Paste your code and all related errors to http://gist.github.com
bluefintuna has joined #ruby
<momomomomo> and then come back, and explain what failed, why you think it failed, and what you've done to try to resolve it
zipper has joined #ruby
<Nilium> That said, I haven't looked at Clojure in a while, so the situation might've improved.
bluefintuna has quit [Client Quit]
<irated> momomomomo: sec ill past the error
<irated> i dont know what code is causing it
<eflynn> havenwood: can i install the gem in my user account?
<havenwood> eflynn: Looks like you're using an apt package of Ruby, yeah?
<eflynn> havenwood: yeah
<havenwood> eflynn: You can install Ruby youself, unfortunately Debian unlike everyone else has kinda borked Ruby.
<eflynn> havenwood: it's ubuntu, does it make a difference?
<existensil> eliasp: nope. you will probably have the best luck using one of the ruby version managers, which can install a userland version of ruby for you
<Technodrome> existensil: what is your work situation like?
<havenwood> eflynn: Ubuntu uses the Debian package. I'd suggest just using ruby-install with chruby or rvm instead of apt-get with update-alternatives.
<existensil> Technodrome: I work for a startup from home
<irated> momomomomo: http://pastebin.ca/2473203
<havenwood> existensil: ditto
<Technodrome> existensil: better than j2ee
<existensil> Technodrome: indeed.
<eflynn> havenwood: ok
mrfoto has quit [Remote host closed the connection]
<eflynn> havenwood: that's good to know
butblack has quit [Quit: butblack]
<havenwood> eflynn: If your Unix-fu is up to par, go chruby. If you don't want to have to think about it, rvm.
<Technodrome> existensil: got any stuff going on yourself?
<momomomomo> irated: For future reference, use either http://gist.github.com or pastie, not pastebin - what is the trace of `gem install bcrypt-ruby`
Seich has joined #ruby
<existensil> Technodrome: yeah, i'm trying to save up money and learn a bunch of stuff, so when the right opporunity presents itself i can dive in. i have a few side projects, but i think the odds of any of them breaking out are pretty low.
dmiller has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
skaflem has quit [Quit: Leaving]
amacgregor has joined #ruby
derebos has quit [Read error: Connection reset by peer]
<irated> momomomomo: how do i find that
jbpros has quit [Quit: jbpros]
OdNairy has joined #ruby
<momomomomo> type `gem install bcrypt-ruby -V
chomskiii has quit [Read error: Connection reset by peer]
chomskiii has joined #ruby
atphalix has joined #ruby
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<eflynn> havenwood: is there a way to remove all gems
mercwithamouth has joined #ruby
<havenwood> eflynn: gem uninstall --all
<havenwood> eflynn: (I actually submitted pull request to add that feature. :p Though drbrain did most the work, as usual.)
jrhe has joined #ruby
coderhs has joined #ruby
<eflynn> havenwood: thanks
<havenwood> eflynn: Requires a new-ish RubyGems, so if it doesn't work: gem update --system
<havenwood> eflynn: Or :P, in apt's case: sudo gem update --system
<momomomomo> irated: toss that into http://gist.github.com
<irated> you told me to use pastie
<irated> now its gist
<momomomomo> oh sorry irated
<momomomomo> pastie is cool
<momomomomo> so, it looks like it's just an rdoc issue
lsmola has quit [Read error: Operation timed out]
Technodrome has quit [Quit: Technodrome]
<momomomomo> irated: type `gem list bcrypt-ruby`
mary5030 has joined #ruby
<eflynn> havenwood: uh, it gave me an error message related to debian ;)
<havenwood> eflynn: oh dear!!
<havenwood> eflynn: This did?: sudo gem update --system
<ezkl> irated: gem install bcrypt-ruby --platform=ruby
<irated> bcrypt-ruby (3.1.2, 3.1.1)
<eflynn> havenwood: gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
<eflynn> havenwood: that was the message
<momomomomo> ezkl: Looks like it's already installed ot me, the error is an rdoc issue
Gwyxx has quit [Ping timeout: 272 seconds]
<momomomomo> ezkl: is this a known issue/ workaround with --platform=ruby
<havenwood> eflynn: Debian shouldn't screw up Ruby like this...
<havenwood> eflynn: Is it Ruby 1.8 balking?
<irated> havenwood: why does it
adambeynon has joined #ruby
<havenwood> eflynn: ruby -v
Sinco has quit [Ping timeout: 246 seconds]
<eflynn> havenwood: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<havenwood> irated: The RedHat folk just did a more elegant job. Debian took the process they were using for 1.8 (when gem didn't ship with Ruby) and just royally screwed up the whole package imho.
<ezkl> momomomomo: nope, you're right .. saw the c-extension error and stopped reading
predator217 has quit [Ping timeout: 245 seconds]
<havenwood> irated: RedHat Ruby 2.0.0-p247 *just works*. Local gem installs, a real RubyGems, sane package.
<irated> lol
<havenwood> irated: Debian packaging everything is just face palm.
<eflynn> havenwood: I don't know what I'm doing with ruby, i just want to use jekyll in a sane way. my linux-fu is strong
<havenwood> eflynn: Then grab chruby, setup your dotfiles!! :)
jeffdb has joined #ruby
<havenwood> eflynn: then anything you install with ruby-install will get autodetected
<eflynn> havenwood: ok but i have to do something with /var/lib/gems
<eflynn> havenwood: not sure if i can just delete it or what
mikesplain has joined #ruby
<havenwood> eflynn: Leave your system ruby be.
jrhe has quit [Quit: jrhe]
<havenwood> eflynn: You can always go back to it with `chruby system`.
<eflynn> havenwood: oh
<ezkl> irated: momomomomo: relevant rdoc issue https://github.com/rdoc/rdoc/issues/189
<eflynn> havenwood: but i don't really need it, do i?
<havenwood> eflynn: no, prolly not
<ezkl> irated: what is the output of gem list rdoc
<irated> sec
<irated> thats what im trying to do
<momomomomo> irated: easiest way to bypass this would be to create a ~/.gemrc file, and add "gem --no-rdoc --no-ri"
Seich has quit [Ping timeout: 245 seconds]
<momomomomo> without the quotations irated
bradhe has joined #ruby
<eflynn> havenwood: thanks for the protip, tho
<irated> momomomomo: my linux-fu is strong too
<irated> :p
<irated> read that last pastie its what im trying to do
<ezkl> irated: gem update rdoc
serp` has quit [Quit: serp`]
Technodrome has joined #ruby
<Technodrome> existensil: you can't go wrong with some enterprise software solution that can leave an impact
<ezkl> irated: bcrypt-ruby issue was patched in rdoc v4.0.1
am3n has joined #ruby
yfeldblum has quit [Remote host closed the connection]
predator117 has joined #ruby
codeFiend has joined #ruby
serp` has joined #ruby
Seich has joined #ruby
platypine has joined #ruby
<irated> ezkl: look at my last paste
<irated> i tried it the last rdoc samething
coderhs has quit [Ping timeout: 246 seconds]
am3n has quit [Ping timeout: 256 seconds]
kidoz has quit [Quit: Ухожу я от вас]
timonv has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
snath has joined #ruby
mary5030 has quit [Remote host closed the connection]
capnmalarkey has joined #ruby
<zzak> irated: what are you trying to do? i missed the conversation
mercwithamouth has quit [Ping timeout: 245 seconds]
<ezkl> irated: https://github.com/rubygems/rubygems/blob/master/lib/rubygems/ext/builder.rb#L51 <- make is failing - the output is logged to /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/bcrypt-ruby-3.1.1/ext/mri/gem_make.out
<ezkl> pastie that
zigomir_ has joined #ruby
<irated> /usr/local/bin/ruby extconf.rb
<irated> thats it
<irated> thats in that file
misutowolf has joined #ruby
ejnahc has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 248 seconds]
petey_ has joined #ruby
m4rcu5 has quit [Ping timeout: 260 seconds]
<Technodrome> the superclass of a Class is a Module
<Technodrome> the superclass of a Module is a Class
<Technodrome> circle of love?
eregon has joined #ruby
ejnahc has joined #ruby
zigomir has quit [Ping timeout: 240 seconds]
<existensil> I don't think that's quite right
<existensil> >> Class.ancestors
<eval-in> existensil => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/59906)
<havenwood> This is the superclass of my Class. There are many like it, but this one is mine.
<existensil> >> Module.ancestors
<eval-in> existensil => [Module, Object, Kernel, BasicObject] (https://eval.in/59907)
<existensil> but...
<Nilium> Module's superclass is Object.
<existensil> >> Module.class
<eval-in> existensil => Class (https://eval.in/59908)
<Technodrome> ah sorry
<existensil> I don't know why Class returns there...
dmiller has joined #ruby
<Technodrome> for some reason i thought the superclass of Module was Class
<Technodrome> my bad
<Technodrome> i just accidentally typed class only
theoretick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac> existensil: Module itself is a class
<Nilium> Because module is a class and not a module.
<Nilium> *Module
capnmalarkey has quit [Quit: capnmalarkey]
<Nilium> Not hard to understand.
<existensil> :-)
m4rcu5 has joined #ruby
<Technodrome> Nilium: yes very simple
<Nilium> A module is an instance of Module, basically.
<irated> Think i figured it out
<Technodrome> Nilium: module does have a .class property though
zipper has quit [Quit: leaving]
petey_ has quit [Ping timeout: 260 seconds]
<ezkl> irated: gem build only generates a package, not the same as gem install
<ezkl> irated: What was the issue?
<irated> nvm
<Nilium> Technodrome: Why wouldn't it?
vlad_sta_ has quit [Ping timeout: 240 seconds]
psyl0n has quit [Quit: psyl0n]
<irated> gem install was fine too
<irated> just when i issue that bundle command its all borked
<havenwood> The superclass of my Module, without my Class, is worthless. Without my Class, my Module is worthless. I must instantiate my Class true. I must be higher in the method lookup than the methods who are trying to be called. I must be called be for they are called. I wll...
serp` has quit [Quit: serp`]
eregon has quit [Read error: Connection reset by peer]
<Technodrome> Nilium: shouldn't Module be of type Module? hmm, maybe i'm over thinking it
<Nilium> No.
<Nilium> Module is a class. _A module_ is a Module.
dmiller has quit [Read error: Connection reset by peer]
dmiller_ has joined #ruby
Seich has quit [Ping timeout: 240 seconds]
havenwood has quit []
<Nilium> You'll probably figure it out when you manage to shut off your brain.
<volty> the other way of what already said by Nilium: when you instantiate o = MyObject.new you get an instance of MyObject, when you write module MyModule ... end you create an instance of Module (same as Module.new(Name))
maletor has joined #ruby
<Technodrome> ok a class is a "Module" right, that's it's superclass, i just don't see how then a Module can be of type "class" as well
<irated> ezkl: i dont freakin understand this
atphalix has left #ruby [#ruby]
<existensil> lol
<momomomomo> irated: did you create the file I told you to?
<Nilium> Technodrome: Stop thinking about it and it'll make sense.
<irated> which one
<irated> maybe i missed that line
<momomomomo> a re quote
<momomomomo> irated: easiest way to bypass this would be to create a ~/.gemrc file, and add "gem --no-rdoc --no-ri"
eregon has joined #ruby
<Technodrome> Nilium: it's not a big deal, its just a little quirk in my mind :)
mercwithamouth has joined #ruby
<irated> just did momomomomo trying again now
bugsinlights has joined #ruby
<Nilium> Which is why I'm telling you to turn off your mind and let Enki take over and flood you with his rivers.
dmiller_ has quit [Read error: Operation timed out]
Seich has joined #ruby
<Technodrome> Nilium: no, don't flood me, no!
smathieu has joined #ruby
bugsinlights has quit [Remote host closed the connection]
Czupa has quit [Ping timeout: 272 seconds]
Ripp__ has joined #ruby
eregon has quit [Remote host closed the connection]
<Nilium> I ain't doing it. That's Enki's job. He's the god of beer.
<irated> Failed to load /home/git/.gemrc because it doesn't contain valid YAML hash
pwh has quit [Ping timeout: 246 seconds]
Guest21184 is now known as denysonique
Czupa has joined #ruby
afader has quit [Quit: WeeChat 0.4.2-rc1]
psyl0n has joined #ruby
psyl0n has quit [Remote host closed the connection]
eregon has joined #ruby
<irated> momomomomo: same error
butblack_ has joined #ruby
freerobby has joined #ruby
<ezkl> irated: gem: --no-ri --no-rdoc ... not sure it is going to help
<irated> gem install bcrypt-ruby is fine
smathieu has quit [Ping timeout: 240 seconds]
<irated> but this is failing now
<irated> sudo -u git -H bundle install --deployment --without development test mysql aws
pwh has joined #ruby
yfeldblum has joined #ruby
eflynn has quit [Ping timeout: 250 seconds]
voidbottle has joined #ruby
butblack_ has quit [Client Quit]
monkegjinni has joined #ruby
chinychinchin has joined #ruby
<voidbottle> hi folks!
<bahar> hi so i have a question, i'm reading Why's Guide and got stumped on something, is this the right place to ask a n00b question?
monkegjinni has quit [Remote host closed the connection]
<voidbottle> you can try
monkegjinni has joined #ruby
<momomomomo> bahar: ask away
<bahar> ok
freerobby has quit [Ping timeout: 272 seconds]
<momomomomo> if you have code to show, use http://gist.github.com bahar
<bahar> in Why's Guide, building wordlist.rb, i got stumped with this:
<bahar> File::open( 'idea-' + idea_name + '.txt', 'w' ) do |f|
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikesplain has quit [Ping timeout: 246 seconds]
Andrevan has joined #ruby
pskosinski_ has joined #ruby
tsykoduk is now known as zz_tsykoduk
Andrevan has quit [Client Quit]
<bahar> it says that "we are handed back the file in variable f" but i'm not sure where f is defined
<Hanmac> bahar: use 'idea-#{idea_name}.txt'
<bahar> is it just shorthand for file?
<heftig> bahar: |f| defines f
Andrevan has joined #ruby
<staafl> > (1..1000000000000).each.lazy.take(10)
tjad has quit [Ping timeout: 240 seconds]
<staafl> >> (1..1000000000000).each.lazy.take(10)
<eval-in> staafl => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1..1000000000000:each>>:take(10)> (https://eval.in/59912)
<bahar> ah, ok... |f| defines f, and then later, we do something to f?
<shevy> Hanmac are you using rubygems.org? with projects of your own
<heftig> it's the parameter list for the block, like in "def foo(bar, baz)": "(bar, baz)" is the parameter list for "foo"
mixel has joined #ruby
<volty> you can beat that f as much as you please :)
<staafl> why does this return a composed enumerator instead of running?
<staafl> does Enumerator::Lazy redefine .take?
<bahar> thanks
<heftig> yes
<volty> staafl: ?
monkegjinni has quit [Ping timeout: 272 seconds]
<volty> you supply a block or add to_a
<staafl> volty, I expected [*1..10]
ixti has joined #ruby
<staafl> volty, sure, but why
pskosinski has quit [Ping timeout: 246 seconds]
lukec has quit [Quit: lukec]
<heftig> because lazy
<staafl> >> (1..1000).take(10)
<eval-in> staafl => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/59913)
<volty> it IS [*1..10], but lazy, it will give you the values when you need them
<heftig> >> (1..1000).each.take(10)
<eval-in> heftig => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/59914)
<heftig> >> (1..1000).each.lazy.take(10)
<eval-in> heftig => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1..1000:each>>:take(10)> (https://eval.in/59915)
<Hanmac> >> (1..1000000000000).each.lazy.take(10).force
<eval-in> Hanmac => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/59916)
<volty> e.c. when your code REQUIRE the actual values
<staafl> Hanmac, ok, I get how it behaves
<staafl> I don't get how it *works*
CreativeEmbassy has joined #ruby
<staafl> who creates the composed enumerator
<Hanmac> with witchcraft?
<heftig> it redefines several methods that used to return arrays so that they return enumerators
<staafl> heftig, which ones?
<heftig> >> Enumerator::Lazy.instance_methods(false)
<eval-in> heftig => [:to_enum, :enum_for, :map, :collect, :flat_map, :collect_concat, :select, :find_all, :reject, :grep, :zip, :take, :take_while, :drop, :drop_while, :lazy, :chunk, :slice_before, :force] (https://eval.in/59917)
<staafl> so basically all the iterators
derebos has joined #ruby
<volty> a lazy harmony
maletor has quit [Quit: Computer has gone to sleep.]
<staafl> how would I go about implementing my own lazy iterator?
<staafl> say, every_nth
<volty> with Enumerator.new
lnormous has joined #ruby
<volty> (i'm with 1.9)
<volty> I'm already lazy -- myself :)
<staafl> >> Enumerator.new {|yielder|} yielder<<1; yielder<<2 }
<eval-in> staafl => /tmp/execpad-def00c1ff9df/source-def00c1ff9df:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end ... (https://eval.in/59918)
<staafl> >> Enumerator.new {|yielder| yielder<<1; yielder<<2 }
<eval-in> staafl => #<Enumerator: #<Enumerator::Generator:0x41841124>:each> (https://eval.in/59919)
<staafl> ok, so this is an enumerator that wraps a generator
<staafl> which is *also* lazy
<volty> Enumerators are fantastic but you need real, life problems to get ad enjoy their full potential
<staafl> what's the difference between that and an Enumerator::Lazy?
<volty> do not know
petey_ has joined #ruby
<volty> probably forcing and/or extending the laziness on the rest of methods // ask others
psyl0n has joined #ruby
<staafl> volty, I love them too, just having trouble grasping the pattern in Ruby
<staafl> a lot of trouble
<heftig> staafl: lazy lets you use .map and stuff lazily, that's what it's for
<volty> staafl: pose e real-life question and you will receive answers, receipts and explanations from the ppl that are up to that
<volty> map too! great!
<staafl> it's not about real life actually, I think I can cargo cult it to work, I'm trying to understand the architecture
fuhgeddaboudit has joined #ruby
<staafl> I've used lazy sequences in other languages and it was easy to understand
<staafl> here, we have Enumerable which gets mixed in and uses .each, but it's always eager, regardless of whether .each is
<staafl> (so far as I understand)
<staafl> so you have to redefine the iterators in Enumerator::Lazy
<heftig> not all of its methods are, but many
<heftig> staafl: yes, it's all so backward compatibility isn't broken
Czupa has quit [Ping timeout: 272 seconds]
buscooo has quit [Quit: • IRcap • 8.6 •]
adambeynon has joined #ruby
<staafl> heftig, ok, fair enough
<staafl> but how do enum_for, Enumerator.new, Enumerator::Generator and all the rest fit into the puzzle
<volty> give a look at fibers
vlad_starkov has joined #ruby
<staafl> volty, Enumerator::Generator uses them to yield control, right?
<heftig> enum_for is used to return enumerators
tjad has joined #ruby
<staafl> heftig, from methods that otherwise expect blocks?
<heftig> the usual way to define an iterator that can be eager or lazy is this:
am3n has joined #ruby
<heftig> def each_foo(); return enum_for(__method__) unless block_given?; loop { yield :foo }; end
mercwithamouth has quit [Ping timeout: 272 seconds]
lukec has joined #ruby
<heftig> so this expects a block to work. if one isn't passed, it returns an Enumerator
<staafl> heftig, an eager enumerator?
<heftig> the Enumerator will ensure the method is called with a block
psyl0n has quit [Quit: psyl0n]
<heftig> nope, lazy
<heftig> er
<heftig> well
mercwithamouth has joined #ruby
<staafl> > def each_foo(); return enum_for(__method__) unless block_given?; loop { yield :foo }; end; each_foo
<staafl> >> def each_foo(); return enum_for(__method__) unless block_given?; loop { yield :foo }; end; each_foo
<eval-in> staafl => #<Enumerator: main:each_foo> (https://eval.in/59930)
<staafl> >> def each_foo(); return enum_for(__method__) unless block_given?; loop { yield :foo }; end; each_foo.take(10)
<eval-in> staafl => [:foo, :foo, :foo, :foo, :foo, :foo, :foo, :foo, :foo, :foo] (https://eval.in/59931)
<staafl> looks lazy
<heftig> Enumerators themselves are lazy in the meaning that they are just a means of storing iteration state
<heftig> they're still subject to the eagerness or lazyness of the methods of Enumerable and such
<staafl> heftig, but they are Enumerable, so we have the question...
<staafl> yeah, what you just said
<staafl> so why does Enumerable#take work here?
pu22l3r has joined #ruby
<heftig> why wouldn't it?
am3n has quit [Ping timeout: 256 seconds]
mikesplain has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
<shevy> hehe
<volty> btw it is not an Enumerable, it is an Enumerator
<heftig> Enumerators are Enumerable
<staafl> heftig, for the same reason why (1..1000000000000).take doesn't work
<heftig> >> (1..100000000000000).take(10)
<eval-in> heftig => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/59934)
<volty> higher,
<heftig> what?
<heftig> >> (1..Float::INFINITY).take(10)
<eval-in> heftig => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/59935)
<staafl> heftig, so take is lazy by default?
<heftig> it's not. it's obviously eager as it returns an array
ehaliewicz has joined #ruby
<shevy> you two are hilarious!
Briareos1 has joined #ruby
<staafl> shevy, and you're witty in a not at all kind of way
<shevy> like those two old men in the muppets show
<volty> eager vs lazy -- have to agree on meaning
<shevy> "is it lazy"... "nah it is eager" ... "why is it lazy" ...
<shevy> The code is too lazy to work.
mikesplain has quit [Ping timeout: 240 seconds]
<shevy> >> (1..Float::INFINITY).take
<eval-in> shevy => wrong number of arguments (0 for 1) (ArgumentError) ... (https://eval.in/59936)
krz has quit [Quit: krz]
<staafl> >> def each_foo(); return enum_for(__method__) unless block_given?; loop { yield :foo }; end; each_foo.map {|x| x}.take(10)
<eval-in> staafl => (https://eval.in/59937)
Davey has quit [Quit: Computer has gone to sleep.]
<heftig> staafl: eager doesn't mean it iterates the whole range. eager means it will immediately gather all values it needs, which are just 10 in this case
<staafl> heftig, yeah, I got confused for a moment
dmiller has joined #ruby
<heftig> map however, is eager AND iterates until end
momomomomo has quit [Quit: momomomomo]
<heftig> >> (1..Float::INFINITY).map { |x| x * 2 }.take(10)
<staafl> heftig, so the enumerator returned by enum_for is eager
<eval-in> heftig => (https://eval.in/59938)
<heftig> >> (1..Float::INFINITY).lazy.map { |x| x * 2 }.take(10).force
<eval-in> heftig => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] (https://eval.in/59939)
<heftig> staafl: yes. it's not the special Enumerator::Lazy wrapper.
<volty> >> [:eager, :lazy, :that_which_we_call_lazy_by_any_other_name_will_return_its_values_when_required].take(1)
<eval-in> volty => [:eager] (https://eval.in/59940)
rickruby has quit [Read error: Connection reset by peer]
<staafl> ok, one last test...
ner0x has joined #ruby
rickruby has joined #ruby
platypine has quit [Ping timeout: 245 seconds]
<staafl> >> Enumerator.new {|yielder| loop { yielder<<1 } }.map {|x| x}.take 10
<eval-in> staafl => (https://eval.in/59941)
<staafl> >> Enumerator.new {|yielder| loop { yielder<<1 } }.lazy.map {|x| x}.take 10
<eval-in> staafl => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x41ed4ef0>:each>>:map>:take(10)> (https://eval.in/59942)
<staafl> ok, it's starting to make some sense
<volty> just starting ? :)
CorpusCallosum has joined #ruby
<volty> (so we have a long way ahead ... )
dmiller has quit [Ping timeout: 246 seconds]
petey_ has quit [Remote host closed the connection]
zz_michael_mbp is now known as michael_mbp
<staafl> volty, there are a lot of things to keep in your head here
petey_ has joined #ruby
tbuehlmann has quit [Remote host closed the connection]
jujuba has quit [Ping timeout: 250 seconds]
<heftig> ruby started off having only internal iterators like [1,2,3].each { |x| ... }
<staafl> some enumerators are eager by nature, some support laziness but you have to wrap them in an Enumerator::Lazy instance
<heftig> the Enumerator class came later, and is a way of making an external iterator from an internal one, by means of storing execution state (stack, registers and all)
<volty> imho the use case of laziness should be that of very big files that you iterate on (not using readlines or gets)
<staafl> heftig, so methods were retrofitted with an enum_for call?
<heftig> yes
<heftig> staafl: and as I said eagerness isn't really a property of the enumerator. there's just two enumerator classes, Enumerator and the even more recent addition Enumerator::Lazy
<heftig> eagerness is a property of the method you call
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atmosx has joined #ruby
<volty> behavior
<staafl> heftig, but you can't call a lazy method on a vanilla enumerator
<staafl> or can you...
dmiller has joined #ruby
<heftig> uh?
<heftig> they could have called them lazy_map instead of making an extra class
petey_ has quit [Ping timeout: 272 seconds]
<staafl> heftig, do you prefer the current approach?
Davey has joined #ruby
<heftig> not really, i would have liked all Enumerator methods to be made lazy instead of needing an extra lazy wrapper
<heftig> have the eager versions directly on Array and stuff
<volty> you can call lazy on vanilla -- it will just not make difference in regards of accessing / generating the values
<staafl> heftig, yeah, me too
<volty> all lazy? why?
lnemo has joined #ruby
<volty> it could mean performance penalty for enumerating things that do not require laziness
michael_mbp is now known as zz_michael_mbp
dmiller has quit [Ping timeout: 272 seconds]
<heftig> volty: but having eager methods on Array should solve most of those cases
<heftig> when you start handling Enumerators you usually want laziness as well, or don't care
<staafl> volty, isn't the major performance penalty the Enumerator indirection?
Technodrome has left #ruby [#ruby]
<heftig> staafl: i think the major performance penalty is the Fiber switching and massive loss of locality
<volty> usually i don't care
<staafl> whether it's lazy or not doesn't make much difference, if you want performance work with the specific collection
<staafl> heftig, oh, right
<volty> i do not use enumerators if I already have a ready array
<staafl> heftig, thank you very much for your help
derebos has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
pu22l3r has quit [Remote host closed the connection]
tjad has quit [Ping timeout: 260 seconds]
pu22l3r has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
thepumpkin has joined #ruby
smathieu has quit [Ping timeout: 260 seconds]
jbpros has joined #ruby
pu22l3r has quit [Ping timeout: 268 seconds]
mmcdaris has joined #ruby
dorei has joined #ruby
freerobby has quit [Ping timeout: 272 seconds]
pskosinski_ has quit [Quit: Til rivido Idisti!]
thepumpkin has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
brtdv has quit []
popl has quit [Quit: We must make an idol of our fear, and call it God.]
colonolGron is now known as Vozhd2
Vozhd2 is now known as colonolGron
xk_id has quit [Ping timeout: 245 seconds]
robonerd has quit [Read error: Connection reset by peer]
platypine has joined #ruby
serp` has joined #ruby
CaptainJet has quit []
claymore has quit [Quit: Leaving]
zipper has joined #ruby
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros has joined #ruby
brennanMKE has joined #ruby
CaptainJet has joined #ruby
carraroj has joined #ruby
carraroj has quit [Client Quit]
aa47f8 has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
xk_id has joined #ruby
mengu has quit [Remote host closed the connection]
am3n has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
jbpros has quit [Quit: jbpros]
d45h has quit []
jeffdb has quit [Quit: jeffdb]
apeiros has quit [Ping timeout: 248 seconds]
zamanfoo has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
colonolGron has quit [Quit: leaving]
mengu has quit [Ping timeout: 246 seconds]
am3n has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
roflmaus has joined #ruby
timonv has joined #ruby
MrPot4to has joined #ruby
CreativeEmbassy has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<roflmaus> Hi! Is it possible to do JS-like events in Ruby (e. g. subscribe to events and trigger events) without utilizing networking?
apeiros has joined #ruby
zamanfoo has quit [Quit: Leaving]
mrpot4to_ has joined #ruby
<_br_> roflmaus: eventmachine? cool.io ? There is lot out there..
<roflmaus> _br_, both utilize an IP address and a port.
timonv has quit [Ping timeout: 272 seconds]
amacgregor_ has joined #ruby
amacgregor_ has quit [Read error: No route to host]
amacgregor_ has joined #ruby
Seich has quit [Quit: Computer has gone to sleep.]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
amacgregor has quit [Read error: Connection reset by peer]
amacgregor_ is now known as amacgregor
MrPot4to has quit [Read error: Connection reset by peer]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPot4to has joined #ruby
CreativeEmbassy has joined #ruby
mrpot4to_ has joined #ruby
mrpot4to_ has quit [Remote host closed the connection]
MrPot4to has quit [Read error: Connection reset by peer]
zipper has quit [Ping timeout: 272 seconds]
Seich has joined #ruby
zipper has joined #ruby
achru has quit []
chinychinchin has quit [Quit: Konversation terminated!]
mrfoto has joined #ruby
mrfoto_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dmiller has joined #ruby
mrfoto_ has quit [Client Quit]
wald0_ has quit [Read error: Connection reset by peer]
mrfoto_ has joined #ruby
mrfoto_ has quit [Client Quit]
mrfoto_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
mrfoto_ has quit [Client Quit]
<_br_> never mind it does as well
<_br_> not sure if there is anything not requiring network.
serp` has quit [Quit: serp`]
mrfoto_ has joined #ruby
mrfoto has quit [Ping timeout: 248 seconds]
spider-mario has quit [Remote host closed the connection]
mrfoto_ has quit [Client Quit]
mrfoto has joined #ruby
aa47f8 has quit [Quit: aa47f8]
mrfoto has quit [Client Quit]
dmiller has quit [Ping timeout: 245 seconds]
wald0 has joined #ruby
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
bdnelson has joined #ruby
bdnelson has quit [Remote host closed the connection]
bdnelson has joined #ruby
pu22l3r has joined #ruby
mrsolo has joined #ruby
smathieu has joined #ruby
lukec has quit [Quit: lukec]
derebos has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
_maes_ has joined #ruby
freerobby has joined #ruby
rickruby has quit [Ping timeout: 245 seconds]
<roflmaus> _br_, it's just kinda confusing. I just want to declare an event, subscribe some actions to it and then trigger it. Why networking?
smathieu has quit [Ping timeout: 246 seconds]
robscomputer has quit [Ping timeout: 245 seconds]
CreativeEmbassy has joined #ruby
mixel has quit [Quit: mixel]
freerobby has quit [Ping timeout: 245 seconds]
CreativeEmbassy has quit [Client Quit]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
<wald0> if i can do "class String" and define "lenght", why there's not an error or something that appears saying me that is already defined ? is not a class a constant?
* wald0 trying to understand better ruby
<shevy> hey
<shevy> do you really want to define "length"
<shevy> oops
<shevy> "lenght"
<shevy> ;)
<shevy> wald0 in ruby you can redefine and reopen almost everything at run time
<shevy> so being able to modify class String is a feature
<shevy> it would not be intuitive to show a warning when someone uses a proper feature
<wald0> yeah, sure it is a feature, but i thought that it would have show an error or something, im just trying to understand it better
<wald0> >> Pi = 3.14 ; Pi = 3.14
<eval-in> wald0 => /tmp/execpad-9af35edb34d5/source-9af35edb34d5:2: warning: already initialized constant Pi ... (https://eval.in/59946)
<wald0> like this
<wald0> in fact, i think that in the book that i have read it said that classes are constants too and this is why starts with upcase
<atmosx> shevy: did you look at haml?
brennanMKE has joined #ruby
<shevy> wald0, well this reassigns to a constant
<shevy> atmosx not lately again, I am modifying an old project and learning for upcoming exams
<shevy> atmosx I will rewrite my web "framework" one day, then I will look into haml etc... more closely again
pabloh has joined #ruby
<shevy> wald0 class names are constants
<shevy> String vs string
<shevy> class String
<shevy> class string
<shevy> wald0, you could reassign to class String :D
<shevy> >> X = String; X.new 'hi'
<eval-in> shevy => "hi" (https://eval.in/59947)
amacgregor has quit [Read error: No route to host]
amacgregor_ has joined #ruby
<wald0> hu?
* wald0 confused
mrpot4to_ has quit [Remote host closed the connection]
<wald0> >> Pi = 3.14 ; Pi = 3.14
<eval-in> wald0 => /tmp/execpad-25ad9d303e11/source-25ad9d303e11:2: warning: already initialized constant Pi ... (https://eval.in/59948)
MrPot4to has quit [Read error: Connection reset by peer]
<shevy> >> X = String; String = Array; X.new('okd').class
<eval-in> shevy => /tmp/execpad-be1a10412aae/source-be1a10412aae:2: warning: already initialized constant String ... (https://eval.in/59949)
<wald0> >> class String ; end ; class String ; end
<eval-in> wald0 => nil (https://eval.in/59950)
<shevy> wald0 well you don't do an assignment there, right?
<shevy> >> String = Object
<eval-in> shevy => /tmp/execpad-ad36454da1a4/source-ad36454da1a4:2: warning: already initialized constant String ... (https://eval.in/59951)
mrsolo has quit [Quit: This computer has gone to sleep]
<shevy> so cool
<wald0> hum
<wald0> this remembers to .freeze, i thought that was nice, but then i was able to re-assign a freezed object lol
nooodl has joined #ruby
<shevy> how??
<shevy> ah
<shevy> you meant assign... not modify
<atmosx> shevy: nice
chinychinchin has joined #ruby
am3n has joined #ruby
zipper has quit [Ping timeout: 246 seconds]
mrsolo has joined #ruby
dannymcc has joined #ruby
Seich has quit [Ping timeout: 245 seconds]
zipper has joined #ruby
dannymcc has left #ruby [#ruby]
DanKnox_away is now known as DanKnox
serp` has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
Seich has joined #ruby
Jetchisel has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
petey_ has joined #ruby
chinychinchin has quit [Quit: Konversation terminated!]
chinychinchin has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
brennanMKE has quit [Read error: Connection reset by peer]
newbiehacker has joined #ruby
drumusician has quit [Ping timeout: 240 seconds]
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
tjbarber has joined #ruby
CaptainJet has quit []
CaptainJet has joined #ruby
rickruby has joined #ruby
CaptainJet has quit [Client Quit]
s2013{Texas} has quit [Ping timeout: 246 seconds]
chinychinchin has quit [Ping timeout: 245 seconds]
derebos has quit [Quit: Leaving]
jibi has quit [Quit: .]
nateberkopec has quit [Quit: Leaving...]
_HolyCow1 has joined #ruby
CreativeEmbassy has joined #ruby
brennanMKE has joined #ruby
_HolyCow has quit [Ping timeout: 245 seconds]
mmcdaris has joined #ruby
capnmalarkey has joined #ruby
sailias has joined #ruby
voidbottle has quit [Quit: Ухожу я от вас]
timeout has joined #ruby
splashs has quit [Ping timeout: 250 seconds]
timeout has quit [Client Quit]
timeout has joined #ruby
jalcine has quit [Excess Flood]
Sauvin has joined #ruby
Aryasam has joined #ruby
thyagobr has joined #ruby
Sauvin has quit [Max SendQ exceeded]
petey_ has quit [Remote host closed the connection]