apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
mdw has joined #ruby
nari_ has joined #ruby
binaryplease has joined #ruby
<heftig> kenneth: i admit i haven't done any pure functional programming, but ruby's inject/reduce seems to fit wikipedia's definition of a "fold function" quite accurately
<binaryplease> sorrry im trying to understand what method chaining acually means. is this method chaining : ('a'..'z').to_a.shuffle[0..7].join
<binaryplease> just chaining them through dots?
headius has joined #ruby
mdw has quit [Remote host closed the connection]
locriani has joined #ruby
Faris has joined #ruby
artOfWar_ has quit [Remote host closed the connection]
mikeg has quit [Remote host closed the connection]
<heftig> binaryplease: yes
<binaryplease> cool. then its pretty easy to understand
Faris1 has quit [Ping timeout: 244 seconds]
ramblex has quit [Quit: ramblex]
Mission-Critical has joined #ruby
iamjarvo has quit [Quit: Leaving.]
ciopte7 has quit [Quit: ciopte7]
[Neurotic] has joined #ruby
heftig has quit [Quit: leaving]
keithcelt has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
headius has quit [Quit: headius]
<bambanx> guys what i do bad here pls http://pastie.org/3963772
<shevy> binaryplease yeah
mikeg has joined #ruby
looopy has quit [Remote host closed the connection]
albemuth has quit [Quit: Computer has gone to sleep.]
Mission-Critical has quit [Ping timeout: 256 seconds]
heftig has joined #ruby
dnyy has quit [Remote host closed the connection]
headius has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
mvangala_ has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
Solnse has joined #ruby
otters has quit [Changing host]
otters has joined #ruby
irrationalfab has quit [Remote host closed the connection]
linus95014 has quit [Quit: linus95014]
<digitalcakestudi> whats the quickest way to check if an array has an element?
<digitalcakestudi> I don't mean empty
<digitalcakestudi> but a match
<xnm> digitalcakestudi: array.include? object
<digitalcakestudi> thanks
MissionCritical has joined #ruby
joast has joined #ruby
phantasm66 has joined #ruby
BeLucid_ has joined #ruby
phantasm66 has quit [Client Quit]
dzhulk1 has joined #ruby
odinswan1 has joined #ruby
icyfenix_ has joined #ruby
raddazong has joined #ruby
rking_ has joined #ruby
Mohan__ has joined #ruby
Muz_ has joined #ruby
mtkd_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
fred_ has joined #ruby
psino_ has joined #ruby
ChloeD_ has joined #ruby
fred_ is now known as Guest49410
AndChat| has joined #ruby
epochwolf|2 has joined #ruby
JC_SoCal_ has joined #ruby
dnyy has joined #ruby
Beoran__ has joined #ruby
The_Doctor has joined #ruby
M- has joined #ruby
Faris has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
cephalopod has quit [*.net *.split]
samsonjs has quit [*.net *.split]
wallerdev has quit [*.net *.split]
test34- has quit [*.net *.split]
froy has quit [*.net *.split]
s0ber has quit [*.net *.split]
pygospa has quit [*.net *.split]
baroquebobcat has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
joukokar has quit [*.net *.split]
Carson_ has quit [*.net *.split]
perryh has quit [*.net *.split]
AnswerGuy has quit [*.net *.split]
ByteCrunch has quit [*.net *.split]
ping-pong has quit [*.net *.split]
pzol has quit [*.net *.split]
straind` has quit [*.net *.split]
kinesis has quit [*.net *.split]
passbe has quit [*.net *.split]
Kartagis has quit [*.net *.split]
crodas has quit [*.net *.split]
aetaric has quit [*.net *.split]
irk3z has quit [*.net *.split]
patronus has quit [*.net *.split]
xoebus has quit [*.net *.split]
brian- has quit [*.net *.split]
ged has quit [*.net *.split]
peterhil has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
DefV has quit [*.net *.split]
avtobiff has quit [*.net *.split]
locriani has quit [*.net *.split]
Vert has quit [*.net *.split]
akem has quit [*.net *.split]
stewart_ has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
naquad has quit [*.net *.split]
denysonique has quit [*.net *.split]
wilmoore has quit [*.net *.split]
cantonic has quit [*.net *.split]
lolmaus has quit [*.net *.split]
tfitts has quit [*.net *.split]
elliottcable has quit [*.net *.split]
mnaser has quit [*.net *.split]
gentz has quit [*.net *.split]
davidboy has quit [*.net *.split]
marienz has quit [*.net *.split]
fpd has quit [*.net *.split]
AlbireoX has quit [*.net *.split]
gmci has quit [*.net *.split]
philips has quit [*.net *.split]
mtfk has quit [*.net *.split]
JonnieCache has quit [*.net *.split]
vitoravelino`afk has quit [*.net *.split]
mockillo has quit [*.net *.split]
kalleth__ has quit [*.net *.split]
ekaleido has quit [*.net *.split]
gogiel has quit [*.net *.split]
heph has quit [*.net *.split]
c3l has quit [*.net *.split]
Rious has quit [*.net *.split]
emmanuelux has quit [*.net *.split]
avalarion has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
welterde has quit [*.net *.split]
ohcibi has quit [*.net *.split]
dr_Poggs has quit [*.net *.split]
Solnse has quit [*.net *.split]
heftig has quit [*.net *.split]
TobsCore has quit [*.net *.split]
Axsuul has quit [*.net *.split]
voodoofish430 has quit [*.net *.split]
c0rn has quit [*.net *.split]
Mchl has quit [*.net *.split]
shadoi has quit [*.net *.split]
beneggett has quit [*.net *.split]
bier has quit [*.net *.split]
emsilva has quit [*.net *.split]
monokrome has quit [*.net *.split]
Azure has quit [*.net *.split]
SeySayux has quit [*.net *.split]
skyjumper has quit [*.net *.split]
anekos has quit [*.net *.split]
ViperMaul has quit [*.net *.split]
tenseiten has quit [*.net *.split]
sonkei has quit [*.net *.split]
jmcphers has quit [*.net *.split]
kiela has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
srnty has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
kichawa has quit [*.net *.split]
fahadsadah has quit [*.net *.split]
Limb has quit [*.net *.split]
Fraeon has quit [*.net *.split]
theoros has quit [*.net *.split]
Stefunel has quit [*.net *.split]
dagobah has quit [*.net *.split]
wang_ has quit [*.net *.split]
jalljo has quit [*.net *.split]
upasna has quit [*.net *.split]
moted has quit [*.net *.split]
trebaum has quit [*.net *.split]
jeekl has quit [*.net *.split]
alexhanh has quit [*.net *.split]
dju has quit [*.net *.split]
tomzx has quit [*.net *.split]
tomb_ has quit [*.net *.split]
brngardn_ has quit [*.net *.split]
rbanffy has quit [*.net *.split]
deric_skibotn has quit [*.net *.split]
bambanx has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
wereHamster has quit [*.net *.split]
fukushima has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
kaktus has quit [*.net *.split]
PaciFisT has quit [*.net *.split]
mxweas has quit [*.net *.split]
hemanth has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
kickroot has quit [*.net *.split]
x0F has quit [*.net *.split]
d_roge has quit [*.net *.split]
Asher has quit [*.net *.split]
lsone has quit [*.net *.split]
alek_b has quit [*.net *.split]
mischief has quit [*.net *.split]
xkx has quit [*.net *.split]
pkondzior has quit [*.net *.split]
nimred has quit [*.net *.split]
TheFuzzball has quit [*.net *.split]
mikekelly has quit [*.net *.split]
akhkharu has quit [*.net *.split]
wagle has quit [*.net *.split]
banghouse has quit [*.net *.split]
Jb_ has quit [*.net *.split]
Shamgar has quit [*.net *.split]
dphase has quit [*.net *.split]
dross has quit [*.net *.split]
terra-and-luna has quit [*.net *.split]
pro has quit [*.net *.split]
nigelb has quit [*.net *.split]
Seventoes has quit [*.net *.split]
ozzloy has quit [*.net *.split]
PhilK has quit [*.net *.split]
tdmackey has quit [*.net *.split]
orealis has quit [*.net *.split]
rotor has quit [*.net *.split]
dominikh has quit [*.net *.split]
klip has quit [*.net *.split]
TaTonka has quit [*.net *.split]
affix has quit [*.net *.split]
__main__ has quit [*.net *.split]
parse_ has quit [*.net *.split]
Doobie_ has quit [*.net *.split]
ereslibre_laptop has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
Veejay has quit [*.net *.split]
regedarek has quit [*.net *.split]
ex0a has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
liluo has quit [*.net *.split]
jcromartie has quit [*.net *.split]
kil0byte has quit [*.net *.split]
jayrulez has quit [*.net *.split]
rmascarenhas has quit [*.net *.split]
wvms has quit [*.net *.split]
krz has quit [*.net *.split]
devdazed has quit [*.net *.split]
davidcelis has quit [*.net *.split]
djd has quit [*.net *.split]
jjp has quit [*.net *.split]
deryldoucette has quit [*.net *.split]
Natch| has quit [*.net *.split]
musl has quit [*.net *.split]
Guedes has quit [*.net *.split]
wataken44 has quit [*.net *.split]
asdfqwer has quit [*.net *.split]
kapowaz has quit [*.net *.split]
Tomasso has quit [*.net *.split]
relix has quit [*.net *.split]
xrl has quit [*.net *.split]
dekz has quit [*.net *.split]
[Tritium] has quit [*.net *.split]
SegFaultAX|work2 has quit [*.net *.split]
alup has quit [*.net *.split]
indeterminate has quit [*.net *.split]
mfridh has quit [*.net *.split]
nisstyre has quit [*.net *.split]
jprovazn_away has quit [*.net *.split]
pcboy___ has quit [*.net *.split]
jrist-out has quit [*.net *.split]
TheNumb has quit [*.net *.split]
QKO has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
Jck_true has quit [*.net *.split]
eighty4 has quit [*.net *.split]
Jelco has quit [*.net *.split]
jacobw has quit [*.net *.split]
Sigma00 has quit [*.net *.split]
nricciar has quit [*.net *.split]
cynosure has quit [*.net *.split]
Caius has quit [*.net *.split]
ahuman_ has quit [*.net *.split]
xsdg has quit [*.net *.split]
imami|afk has quit [*.net *.split]
stockholm has quit [*.net *.split]
kalleth has quit [*.net *.split]
pvh has quit [*.net *.split]
companio- has quit [*.net *.split]
withnale has quit [*.net *.split]
frishi has quit [*.net *.split]
whuffor has quit [*.net *.split]
mattp_ has quit [*.net *.split]
otters has quit [*.net *.split]
TrevorBramble has quit [*.net *.split]
zodiak has quit [*.net *.split]
Gonzih has quit [*.net *.split]
palmfrond has quit [*.net *.split]
dhodgkin has quit [*.net *.split]
phrame has quit [*.net *.split]
epochwolf|vps has quit [*.net *.split]
jmccune has quit [*.net *.split]
sj26 has quit [*.net *.split]
bpgoldsb has quit [*.net *.split]
Kiall has quit [*.net *.split]
vandemar has quit [*.net *.split]
lupine_85 has quit [*.net *.split]
oliwer has quit [*.net *.split]
cryptfu has quit [*.net *.split]
xorspark has quit [*.net *.split]
Mez has quit [*.net *.split]
joppe has quit [*.net *.split]
msch has quit [*.net *.split]
notwen has quit [*.net *.split]
deadbea7_ has quit [*.net *.split]
forestbird has quit [*.net *.split]
G has quit [*.net *.split]
zaargy has quit [*.net *.split]
jodell has quit [*.net *.split]
babinho has quit [*.net *.split]
jasond has quit [*.net *.split]
Drakevr has quit [*.net *.split]
end3r- has quit [*.net *.split]
any-key has quit [*.net *.split]
CharlieSu has quit [*.net *.split]
phreax has quit [*.net *.split]
rails has quit [*.net *.split]
altivec has quit [*.net *.split]
Osaka has quit [*.net *.split]
canton7 has quit [*.net *.split]
LowKey has quit [*.net *.split]
joschi has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
pavelz_ has quit [*.net *.split]
indian has quit [*.net *.split]
Zolrath has quit [*.net *.split]
Guest76606 has quit [*.net *.split]
dzhulk has quit [*.net *.split]
BeLucid has quit [*.net *.split]
JC_SoCal has quit [*.net *.split]
stefanp has quit [*.net *.split]
lkba has quit [*.net *.split]
odinswand has quit [*.net *.split]
BRMatt has quit [*.net *.split]
fr0gprince_mac has quit [*.net *.split]
medik has quit [*.net *.split]
nfk has quit [*.net *.split]
Seabass_ has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
Beoran_ has quit [*.net *.split]
blooberr has quit [*.net *.split]
saidin_ has quit [*.net *.split]
_marvin has quit [*.net *.split]
ziyadb has quit [*.net *.split]
Mohan has quit [*.net *.split]
KillerFox has quit [*.net *.split]
Muz has quit [*.net *.split]
tsou has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
sgronblom has quit [*.net *.split]
ichilton has quit [*.net *.split]
ezra has quit [*.net *.split]
xea has quit [*.net *.split]
jbpros has quit [*.net *.split]
caveat- has quit [*.net *.split]
cespare has quit [*.net *.split]
rking has quit [*.net *.split]
bperry has quit [*.net *.split]
dubios has quit [*.net *.split]
sts has quit [*.net *.split]
Utkarsh_ has quit [*.net *.split]
Ttech has quit [*.net *.split]
_axx has quit [*.net *.split]
icyfenix has quit [*.net *.split]
epochwolf has quit [*.net *.split]
snapcase has quit [*.net *.split]
fred has quit [*.net *.split]
flyingoctopus has quit [*.net *.split]
mtkd has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
madhatter has quit [*.net *.split]
parus_ has quit [*.net *.split]
eregon has quit [*.net *.split]
bubuz has quit [*.net *.split]
ChloeD has quit [*.net *.split]
felipe has quit [*.net *.split]
d2s has quit [*.net *.split]
tomaw has quit [*.net *.split]
rcj_ has quit [*.net *.split]
psino has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
ZachBeta has quit [*.net *.split]
krusty_ar_ has quit [*.net *.split]
araujo has quit [*.net *.split]
tewecske has quit [*.net *.split]
adamkittelson has quit [*.net *.split]
keymone has quit [*.net *.split]
nilg` has quit [*.net *.split]
Drewch has quit [*.net *.split]
fr0gprince_ has quit [*.net *.split]
tchebb has quit [*.net *.split]
yellow5 has quit [*.net *.split]
pradeepto has quit [*.net *.split]
axl_ has quit [*.net *.split]
keanehsiao has quit [*.net *.split]
matti has quit [*.net *.split]
hackeron has quit [*.net *.split]
Rizzle has quit [*.net *.split]
pietr0 has quit [*.net *.split]
sejo has quit [*.net *.split]
Guest74504 has quit [*.net *.split]
quuxman has quit [*.net *.split]
Drakx has quit [*.net *.split]
dkissell has quit [*.net *.split]
Guest63274 has quit [*.net *.split]
thedonvaughn has quit [*.net *.split]
shaman42 has quit [*.net *.split]
soulcake has quit [*.net *.split]
__class__ has quit [*.net *.split]
zigidias has quit [*.net *.split]
Kovensky has quit [*.net *.split]
Gm4n has quit [*.net *.split]
ixx has quit [*.net *.split]
xybre_ has quit [*.net *.split]
offby1 has quit [*.net *.split]
rramsden has quit [*.net *.split]
Aaton has quit [*.net *.split]
Yappo____ has quit [*.net *.split]
Prudhvi has quit [*.net *.split]
Nowaker has quit [*.net *.split]
willb has quit [*.net *.split]
elspeth has quit [*.net *.split]
drizz has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
RichGuk has quit [*.net *.split]
tessi has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
epochwolf|2 is now known as epochwolf
Facefox has quit [Max SendQ exceeded]
psino_ is now known as psino
kenneth has left #ruby [#ruby]
The_Doctor is now known as Ttech
Guest76606 has joined #ruby
Araxia_ is now known as Araxia
pdtpatrick has quit [Quit: pdtpatrick]
nari_ has quit [Ping timeout: 245 seconds]
Facefox has joined #ruby
brianpWins has quit [Quit: brianpWins]
odinswand has joined #ruby
SecretAgent has joined #ruby
<binaryplease> hey how can i overwrite the "new" operator? should be something with mixins, closures or method chaining
<seanstickle> binaryplease: don't
<binaryplease> i know i should not but ho do i do its its just for exam questions :d
mvangala_ has joined #ruby
<seanstickle> Oh, you're looking for #homework-help
dayanand has joined #ruby
<binaryplease> no im asking if that is even possible in ruby and why i should not
wardrop_ has joined #ruby
Araxia is now known as 17SAA79RB
blast_hardcheese has quit [Ping timeout: 245 seconds]
Whoop has quit [Quit: WeeChat 0.3.7]
irk3z has joined #ruby
crodas has joined #ruby
aetaric has joined #ruby
straind` has joined #ruby
Kartagis has joined #ruby
kinesis has joined #ruby
pzol has joined #ruby
ping-pong has joined #ruby
ByteCrunch has joined #ruby
AnswerGuy has joined #ruby
perryh has joined #ruby
Carson_ has joined #ruby
joukokar has joined #ruby
robbyoconnor has joined #ruby
s0ber has joined #ruby
pygospa has joined #ruby
samsonjs has joined #ruby
wallerdev has joined #ruby
froy has joined #ruby
test34- has joined #ruby
TorpedoSkyline has joined #ruby
cephalopod has joined #ruby
passbe has joined #ruby
sts has joined #ruby
Faris has joined #ruby
bubuz has joined #ruby
BRMatt has joined #ruby
ged has joined #ruby
brian- has joined #ruby
patronus has joined #ruby
xoebus has joined #ruby
tsou has joined #ruby
snapcase has joined #ruby
cespare has joined #ruby
d2s has joined #ruby
blooberr has joined #ruby
parus has joined #ruby
_marvin has joined #ruby
flyingoc1opus has joined #ruby
ezra_ has joined #ruby
_axx_ has joined #ruby
bperry_ has joined #ruby
caveat-_ has joined #ruby
xea_ has joined #ruby
jbpros has joined #ruby
ichilton_ has joined #ruby
albemuth has joined #ruby
dubios has joined #ruby
yeltzooo7 has joined #ruby
rcj__ has joined #ruby
Seabass__ has joined #ruby
eregon_ has joined #ruby
Utkarsh has joined #ruby
medik has joined #ruby
KillerFox has joined #ruby
sgronblo1 has joined #ruby
jmeeuwen_ has joined #ruby
MissionCritical has joined #ruby
Solnse has joined #ruby
tomzx has joined #ruby
tomb_ has joined #ruby
jcromartie has joined #ruby
locriani has joined #ruby
kil0byte has joined #ruby
rmascarenhas has joined #ruby
Vert has joined #ruby
krusty_ar_ has joined #ruby
akem has joined #ruby
wvms has joined #ruby
brngardn_ has joined #ruby
bambanx has joined #ruby
stewart_ has joined #ruby
flagg0204 has joined #ruby
deric_skibotn has joined #ruby
TobsCore has joined #ruby
Emmanuel_Chanel has joined #ruby
krz has joined #ruby
Axsuul has joined #ruby
Sou|cutter has joined #ruby
banghouse has joined #ruby
emmanuelux has joined #ruby
araujo has joined #ruby
Mchl has joined #ruby
voodoofish430 has joined #ruby
devdazed has joined #ruby
c0rn has joined #ruby
shadoi has joined #ruby
naquad has joined #ruby
wereHamster has joined #ruby
fukushima has joined #ruby
tewecske has joined #ruby
beneggett has joined #ruby
banisterfiend has joined #ruby
bier has joined #ruby
nilg` has joined #ruby
keymone has joined #ruby
kaktus has joined #ruby
denysonique has joined #ruby
PaciFisT has joined #ruby
Drewch has joined #ruby
cantonic has joined #ruby
davidcelis has joined #ruby
fr0gprince_ has joined #ruby
tchebb has joined #ruby
mxweas has joined #ruby
emsilva has joined #ruby
rails has joined #ruby
Apocalypse has joined #ruby
Azure has joined #ruby
monokrome has joined #ruby
pradeepto has joined #ruby
SeySayux has joined #ruby
Natch| has joined #ruby
hoelzro|away has joined #ruby
jjp has joined #ruby
d_roge has joined #ruby
avalarion has joined #ruby
tfitts has joined #ruby
Mon_Ouie has joined #ruby
lsone has joined #ruby
welterde has joined #ruby
deryldoucette has joined #ruby
yellow5 has joined #ruby
x0F has joined #ruby
hemanth has joined #ruby
mnaser has joined #ruby
bpgoldsb has joined #ruby
elliottcable has joined #ruby
peterhil has joined #ruby
ahuman_ has joined #ruby
lolmaus has joined #ruby
Asher has joined #ruby
Guedes has joined #ruby
musl has joined #ruby
axl_ has joined #ruby
skyjumper has joined #ruby
alek_b has joined #ruby
mischief has joined #ruby
wataken44 has joined #ruby
kickroot has joined #ruby
gentz has joined #ruby
asdfqwer has joined #ruby
anekos has joined #ruby
keanehsiao has joined #ruby
xkx has joined #ruby
pkondzior has joined #ruby
davidboy has joined #ruby
marienz has joined #ruby
nimred has joined #ruby
Kiall has joined #ruby
matti has joined #ruby
hackeron has joined #ruby
kapowaz has joined #ruby
TheFuzzball has joined #ruby
dphase has joined #ruby
Tomasso has joined #ruby
Rizzle has joined #ruby
ViperMaul has joined #ruby
pvh has joined #ruby
relix has joined #ruby
xrl has joined #ruby
dekz has joined #ruby
companio- has joined #ruby
withnale has joined #ruby
frishi has joined #ruby
Mez has joined #ruby
[Tritium] has joined #ruby
fpd has joined #ruby
mtfk has joined #ruby
SegFaultAX|work2 has joined #ruby
pietr0 has joined #ruby
mikekelly has joined #ruby
indeterminate has joined #ruby
alup has joined #ruby
whuffor has joined #ruby
mattp_ has joined #ruby
AlbireoX has joined #ruby
mfridh has joined #ruby
otters has joined #ruby
akhkharu has joined #ruby
TrevorBramble has joined #ruby
wagle has joined #ruby
gmci has joined #ruby
tenseiten has joined #ruby
nisstyre has joined #ruby
sonkei has joined #ruby
philips has joined #ruby
zodiak has joined #ruby
JonnieCache has joined #ruby
jprovazn_away has joined #ruby
vitoravelino has joined #ruby
Jb_ has joined #ruby
jmcphers has joined #ruby
orealis has joined #ruby
palmfrond has joined #ruby
sejo has joined #ruby
Gonzih has joined #ruby
Guest74504 has joined #ruby
pcboy___ has joined #ruby
pro has joined #ruby
vandemar has joined #ruby
jrist-out has joined #ruby
soulcake has joined #ruby
mockillo has joined #ruby
kiela has joined #ruby
Shamgar has joined #ruby
kalleth__ has joined #ruby
dhodgkin has joined #ruby
quuxman has joined #ruby
lupine_85 has joined #ruby
avtobiff has joined #ruby
TheNumb has joined #ruby
Stefunel has joined #ruby
oliwer has joined #ruby
cryptfu has joined #ruby
dross has joined #ruby
Kwpolska has joined #ruby
srnty has joined #ruby
xorspark has joined #ruby
terra-and-luna has joined #ruby
DarthGandalf has joined #ruby
QKO has joined #ruby
Drakx has joined #ruby
kichawa has joined #ruby
fahadsadah has joined #ruby
Jck_true has joined #ruby
cjk101010 has joined #ruby
eighty4 has joined #ruby
DefV has joined #ruby
joppe has joined #ruby
offby1 has joined #ruby
heph has joined #ruby
msch has joined #ruby
dkissell has joined #ruby
rotor has joined #ruby
Jelco has joined #ruby
Guest63274 has joined #ruby
ekaleido has joined #ruby
jacobw has joined #ruby
notwen has joined #ruby
thedonvaughn has joined #ruby
shaman42 has joined #ruby
gogiel has joined #ruby
c3l has joined #ruby
Limb has joined #ruby
ohcibi has joined #ruby
Veejay has joined #ruby
Sigma00 has joined #ruby
deadbea7_ has joined #ruby
jodell has joined #ruby
Doobie_ has joined #ruby
forestbird has joined #ruby
nricciar has joined #ruby
dominikh has joined #ruby
Caius has joined #ruby
cynosure has joined #ruby
zaargy has joined #ruby
G has joined #ruby
theoros has joined #ruby
Fraeon has joined #ruby
babinho has joined #ruby
jasond has joined #ruby
klip has joined #ruby
__class__ has joined #ruby
end3r- has joined #ruby
Rious has joined #ruby
Drakevr has joined #ruby
affix has joined #ruby
Gm4n has joined #ruby
altivec has joined #ruby
dagobah has joined #ruby
Seventoes has joined #ruby
nigelb has joined #ruby
upasna has joined #ruby
TaTonka has joined #ruby
CharlieSu has joined #ruby
zigidias has joined #ruby
parse_ has joined #ruby
Kovensky has joined #ruby
jalljo has joined #ruby
any-key has joined #ruby
ozzloy has joined #ruby
phreax has joined #ruby
ixx has joined #ruby
wang_ has joined #ruby
ereslibre_laptop has joined #ruby
xybre_ has joined #ruby
__main__ has joined #ruby
Osaka has joined #ruby
alexhanh has joined #ruby
moted has joined #ruby
stockholm has joined #ruby
canton7 has joined #ruby
rramsden has joined #ruby
Aaton has joined #ruby
Prudhvi has joined #ruby
phrame has joined #ruby
TheMoonMaster has joined #ruby
PhilK has joined #ruby
Yappo____ has joined #ruby
LowKey has joined #ruby
regedarek has joined #ruby
epochwolf|vps has joined #ruby
Nowaker has joined #ruby
xsdg has joined #ruby
joschi has joined #ruby
Y_Ichiro has joined #ruby
dr_Poggs has joined #ruby
gianlucadv has joined #ruby
imami|afk has joined #ruby
jmccune has joined #ruby
trebaum has joined #ruby
jeekl has joined #ruby
sj26 has joined #ruby
ex0a has joined #ruby
dju has joined #ruby
zz_chrismcg has joined #ruby
tdmackey has joined #ruby
elspeth has joined #ruby
kalleth has joined #ruby
willb has joined #ruby
pavelz_ has joined #ruby
drizz has joined #ruby
WanderingGlitch has joined #ruby
tessi has joined #ruby
RichGuk has joined #ruby
Sp4rKy has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
classix has quit [Max SendQ exceeded]
dubios has quit [Changing host]
dubios has joined #ruby
Corey has quit [Max SendQ exceeded]
Facefox has quit [Max SendQ exceeded]
classix has joined #ruby
wardrop_ has quit [Excess Flood]
rcj__ is now known as rcj_
Wh00p has joined #ruby
BRMatt has quit [*.net *.split]
bubuz has quit [*.net *.split]
sts has quit [*.net *.split]
Faris has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
cephalopod has quit [*.net *.split]
samsonjs has quit [*.net *.split]
wallerdev has quit [*.net *.split]
test34- has quit [*.net *.split]
froy has quit [*.net *.split]
s0ber has quit [*.net *.split]
pygospa has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
joukokar has quit [*.net *.split]
Carson_ has quit [*.net *.split]
perryh has quit [*.net *.split]
AnswerGuy has quit [*.net *.split]
ByteCrunch has quit [*.net *.split]
pzol has quit [*.net *.split]
ping-pong has quit [*.net *.split]
straind` has quit [*.net *.split]
kinesis has quit [*.net *.split]
passbe has quit [*.net *.split]
Kartagis has quit [*.net *.split]
crodas has quit [*.net *.split]
aetaric has quit [*.net *.split]
irk3z has quit [*.net *.split]
odinswan1 has quit [Ping timeout: 240 seconds]
<binaryplease> is that a problem to ask that here?
<Solnse> only when it causes massive netsplits!
Facefox has joined #ruby
Wh00p is now known as Whoop
tomaw has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
wardrop has joined #ruby
<wardrop> Does anyone know how to discard the timezone information of a Time or DateTime object? For example, if I have the time "2012-05-25 10:42:21 +1000", how do I change it to "2012-05-25 10:42:21 +0000". I basically want to set the timezone to UTC without adjusting the actual time value.
<wardrop> I'll post my question again cause I think my IRC client just went screwy.
<wardrop> Does anyone know how to discard the timezone information of a Time or DateTime object? For example, if I have the time "2012-05-25 10:42:21 +1000", how do I change it to "2012-05-25 10:42:21 +0000". I basically want to set the timezone to UTC without adjusting the actual time value.
<binaryplease> wardrop: irc is working :D
<wardrop> binaryplease: Thanks :)
saidin_ has joined #ruby
<Boohbah> wardrop: puts Time.utc
<Boohbah> wardrop: puts Time.now.utc
joshman_ has joined #ruby
heftig has joined #ruby
<binaryplease> wardrop: sorry i cant help you with your question. do you know how to overwrite the new operator using mixins, method chainig or closures?
<wardrop> Boohbah: Yes, that converts to UTC, but it also adjusts the time.
jarred has quit [Quit: jarred]
Corey has joined #ruby
<kiin> hi guys, i'm trying to use `` or system() (or other means) to change rubies using RVM, and then run a command -- i've not been able to figure out how, anyone encountered this before?
jayrulez has joined #ruby
bubuz has joined #ruby
BRMatt has joined #ruby
dankest has joined #ruby
sts has joined #ruby
passbe has joined #ruby
Faris has joined #ruby
test34- has joined #ruby
joukokar has joined #ruby
AnswerGuy has joined #ruby
perryh has joined #ruby
froy has joined #ruby
Carson_ has joined #ruby
straind` has joined #ruby
samsonjs has joined #ruby
ByteCrunch has joined #ruby
cephalopod has joined #ruby
pzol has joined #ruby
s0ber has joined #ruby
wallerdev has joined #ruby
TorpedoSkyline has joined #ruby
pygospa has joined #ruby
ping-pong has joined #ruby
robbyoconnor has joined #ruby
Kartagis has joined #ruby
kinesis has joined #ruby
aetaric has joined #ruby
crodas has joined #ruby
irk3z has joined #ruby
<wardrop> Ok, this seems to work in getting rid of the timezone offset: d.utc + d.offset
dankest has quit [Client Quit]
peterhil has quit [Ping timeout: 248 seconds]
savage- has quit [Remote host closed the connection]
<kiin> i was answered in #rvm. thanks
sts is now known as Guest92259
ziyadb has joined #ruby
blast_hardcheese has joined #ruby
krusty_ar_ has quit [Read error: Connection reset by peer]
albemuth has quit [Quit: Computer has gone to sleep.]
looopy has joined #ruby
<bambanx> guys when i use this code with csv myarray = CSV.read later i can print p myarray[1] and it return me all the row how i can point to specific element of this row?
wiwillia has quit [Ping timeout: 240 seconds]
looopy has quit [Remote host closed the connection]
bhunt has joined #ruby
krusty_ar has joined #ruby
peterhil has joined #ruby
jayrulez has quit [Quit: Leaving]
jayrulez has joined #ruby
felipe has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has joined #ruby
berserkr has quit [Quit: Leaving.]
Urth|Away is now known as Urthwhyte
beneggett has quit [Ping timeout: 245 seconds]
seanstickle has quit [Quit: Nihil sub sole novum]
bglusman has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
Hanmac1 has joined #ruby
eywu has quit [Quit: Leaving.]
stephenjudkins has quit [Quit: stephenjudkins]
Hanmac has quit [Ping timeout: 250 seconds]
mikeg has quit [Quit: Leaving]
choffstein has quit [Remote host closed the connection]
mvangala_ has quit [Remote host closed the connection]
mvangala_ has joined #ruby
brngardn_ has quit [Remote host closed the connection]
brngardner has joined #ruby
kil0byte has quit [Remote host closed the connection]
Targen has joined #ruby
kah_ has joined #ruby
bglusman has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
liluo has joined #ruby
shadoi has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
shadoi1 has joined #ruby
shadoi1 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
MissionCritical has joined #ruby
mikepack has joined #ruby
Riccardo has joined #ruby
<Riccardo> ciao
bglusman has joined #ruby
brngardner has quit [Ping timeout: 245 seconds]
<RBV> What's the easiest away to sort a hash by the values? I could put each key and value in an array but then how would I 'link' them to sort the keys?
Riccardo has left #ruby [#ruby]
cming has joined #ruby
<Boohbah> RBV: hash.values.sort
looopy has joined #ruby
RudyValencia has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
jgrevich has joined #ruby
<RBV> I want to print 'bob', 1, 'joe', 2, 'tom, 3' ... that just gives the values, can I get the keys too?
Karmaon has quit [Quit: WeeChat 0.3.8-rc1]
<RBV> Basically what I did is wrote a program that counts the number of times a character occurs in a paraph and stores each character as the key, and the # of times as the value
Karmaon has joined #ruby
td123 has quit [Read error: Connection reset by peer]
<bambanx> rbv maybe using csv can u help
maletor has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
td123 has joined #ruby
<Boohbah> RBV: hash.sort_by {|k,v| v}
<RBV> I think it might be easier to just store them in arrays
<RBV> Boohbah: That seems to work
jgrevich has quit [Ping timeout: 265 seconds]
test34 has joined #ruby
TorpedoSkyline has quit [Quit: Leaving]
bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
cantonic has quit [Quit: cantonic]
jgrevich has joined #ruby
test34- has quit [Ping timeout: 256 seconds]
test34- has joined #ruby
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
khakimov has joined #ruby
bambanx_ has joined #ruby
kenperkins has quit [Ping timeout: 244 seconds]
test34 has quit [Ping timeout: 240 seconds]
khakimov has quit [Client Quit]
jgrevich has quit [Read error: No route to host]
simao has joined #ruby
bambanx has quit [Ping timeout: 260 seconds]
freakazoid0223 has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
simao has quit [Read error: Operation timed out]
jgrevich has joined #ruby
bambanx_ has quit [Ping timeout: 260 seconds]
graspee has joined #ruby
cryptfu has quit [Quit: Leaving]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<voodoofish430> I'm seeming to get way too many escape /'s in a string when I try to .to_json it....
<voodoofish430> this is giving me a headache...
choffstein has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
cryptfu has joined #ruby
noganex has joined #ruby
sam113101 has quit [Remote host closed the connection]
otherj has quit [Ping timeout: 245 seconds]
sohocoke has joined #ruby
looopy has quit [Remote host closed the connection]
sam113101 has joined #ruby
<offby1> paste if the code is super-simple
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
bambanx has joined #ruby
manizzle has joined #ruby
17SAA79RB has quit [Quit: 17SAA79RB]
bglusman has quit [Ping timeout: 260 seconds]
bambanx has quit [Ping timeout: 252 seconds]
thecreators has quit [Quit: thecreators]
Faris has quit [Read error: Connection reset by peer]
Faris has joined #ruby
bikcmp_ has joined #ruby
bikcmp_ is now known as Guest38769
kil0byte has joined #ruby
test34- has quit [Ping timeout: 245 seconds]
austinbv has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
mattonrails has joined #ruby
dbgster has joined #ruby
pdtpatrick has joined #ruby
Guest38769 has quit [Read error: Connection reset by peer]
austinbv has quit [Client Quit]
crankycoder has joined #ruby
voodoofish430 has joined #ruby
<voodoofish430> offby1: here it is....super simple
<voodoofish430> foo = Hash.new
<voodoofish430> foo["tagVal"] =%["test", "values"]
<voodoofish430> foo["tagVal"].to_json
<offby1> what on Earth does =% do?
<voodoofish430> makes [ and ] string delimiters
sohocoke has quit [Quit: Computer has gone to sleep.]
<offby1> what looks wrong about it to you?
<voodoofish430> well...
<voodoofish430> "\"\\\"test\\\", \\\"values\\\"\""
<voodoofish430> I get that
<offby1> is that the output from "puts", or is that the value in the repl?
<offby1> I'm betting the latter
<voodoofish430> repl?
<offby1> try puts %["foo", "bar"].to_json
<offby1> "repl" is my way of saying "irb" :-)
<voodoofish430> irb
<offby1> (that's an old Lisp-head term)
<voodoofish430> ahhh
<offby1> ((I am an old Lisp-head))
<graspee> i raise my mug of ale to that
<graspee> for i am a warcraft dwarf stereotype
* offby1 grabs graspee's mug and downs it
<offby1> eww, barleywine
<offby1> voodoofish430: anyway, I suspect it's working fine, and you're confused by the two different levels of quoting -- one from JSON, one from irb itself
<offby1> the "puts" effectively tells irb not to do any quoting
<offby1> so you can see what it really looks like
keymone_ has joined #ruby
<voodoofish430> it's killing something I'm working on...
<offby1> again: paste if it's not too big. (To a paste site like gist.github.com)
shadoi has joined #ruby
fearoffish has quit [Quit: Computer has gone to sleep.]
apok has quit [Quit: apok]
keymone has quit [Ping timeout: 248 seconds]
keymone_ is now known as keymone
<offby1> banisterfiend: I don't mean to pry, but ... why'd you name it "pry"? :-
<offby1> :-)
<voodoofish430> hhmmmm...will have to look into it later.
amalvagomes has joined #ruby
<voodoofish430> it's a bit big
dv310p3r has joined #ruby
<voodoofish430> out for now
voodoofish430 has quit [Quit: Leaving.]
banisterfiend has quit [Read error: Connection reset by peer]
harukomoto has joined #ruby
linus95014 has joined #ruby
jenrzzz-mac has joined #ruby
nyuszika7h has quit [Quit: WeeChat 0.3.8-rc2]
ex0a has quit [Quit: peace]
Progster has quit [Ping timeout: 260 seconds]
albemuth has joined #ruby
banisterfiend has joined #ruby
monokrome has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
busybox42 has quit [Quit: Leaving.]
baroquebobcat has quit [Client Quit]
busybox42 has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
becom33 has quit [Read error: Operation timed out]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
becom33 has joined #ruby
igotnolegs has joined #ruby
looopy has joined #ruby
mattonrails has quit [Remote host closed the connection]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
lamba has joined #ruby
wilmoore has joined #ruby
jcromartie has quit [Quit: jcromartie]
yonggu has joined #ruby
azm has quit [Ping timeout: 265 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
carson__1 has joined #ruby
jenrzzz-mac has joined #ruby
mvangala_ has quit [Remote host closed the connection]
Carson_ has quit [Ping timeout: 256 seconds]
fukushima has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
bperry_ is now known as bperry
Gavilan has joined #ruby
_adeponte has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
fukushima has joined #ruby
phantasm66 has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
bhunt has left #ruby [#ruby]
jenrzzz-mac has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
iamjarvo has joined #ruby
noodletraveler has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
choffstein has quit [Remote host closed the connection]
_adeponte has quit [Remote host closed the connection]
tchebb has quit [Remote host closed the connection]
robdodson has joined #ruby
itnomad has quit [Quit: Leaving]
cj3kim has joined #ruby
tchebb has joined #ruby
emmanuelux has quit [Ping timeout: 264 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
tomb_ has joined #ruby
ymasory has joined #ruby
radic has quit [Ping timeout: 240 seconds]
jobicoppola has joined #ruby
x0F has quit [Read error: Connection reset by peer]
tewecske has quit [Quit: Leaving.]
x0F has joined #ruby
kvirani has joined #ruby
one8zero_ has joined #ruby
jayrulez has quit [Ping timeout: 265 seconds]
ymasory has quit [Ping timeout: 245 seconds]
mvangala has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
one8zero has quit [Ping timeout: 244 seconds]
one8zero_ is now known as one8zero
xsdg has quit [Ping timeout: 252 seconds]
xsdg has joined #ruby
radic has joined #ruby
dnyy has quit [Remote host closed the connection]
phipes has joined #ruby
niklasb has quit [Ping timeout: 245 seconds]
hemanth has quit [Ping timeout: 260 seconds]
ymasory has joined #ruby
QKO has quit [Ping timeout: 252 seconds]
jayrulez has joined #ruby
cableray has joined #ruby
Aaton is now known as Aaton_off
dnyy has joined #ruby
linus95014 has quit [Quit: linus95014]
simao has joined #ruby
phantasm66 has quit [Quit: *poof*]
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
simao has quit [Read error: Operation timed out]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
m_3 has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
yankov has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
ex0a has joined #ruby
t0mmyvyo has joined #ruby
azm has joined #ruby
Aberen has joined #ruby
kenperkins has joined #ruby
kenperkins has quit [Client Quit]
Aberen has quit [Read error: Operation timed out]
greenwolf has joined #ruby
<phipes> hi all. is there a better way to do this? https://gist.github.com/2785617
greenwolf has left #ruby [#ruby]
jtrudeau has quit [Ping timeout: 276 seconds]
dbgster has quit [Quit: dbgster]
<offby1> phipes: I assume that characters have messages like "is_upper etc
<offby1> hm, seems they don't.
Faris has quit [Read error: Connection reset by peer]
Tomasso has quit [Remote host closed the connection]
becom33 has quit [Ping timeout: 244 seconds]
linus95014 has joined #ruby
<banisterfiend> offby1: string == string.upcase is fine isn't it homie
kvirani has quit [Remote host closed the connection]
Faris has joined #ruby
imami|afk is now known as banseljaj
<offby1> I guess.
<offby1> seems klunky
Solnse has quit []
<phipes> i can't use up case on lowercased_letters_character_set, it's not a string
<offby1> most languages expose the C library's "isupper" and "islower" functions; I'm surprised ruby doesn't
<phipes> lowercased_letters_character_set.upcase.include? c does not compute
<offby1> phipes: you should probably just use a regex
<offby1> string =~ /[A-Za-z0-9]/ should do it
<offby1> er
<offby1> string =~ /^[A-Za-z0-9]+$/ should do it
choffstein has joined #ruby
rmascarenhas has quit [Quit: leaving]
<offby1> that returns nil or a number, whereas yours returns true or false; but it's probably OK
<phipes> eh, I'm put off by regex
<offby1> *shrug*
robdodson has quit [Quit: robdodson]
bambanx has joined #ruby
<bambanx> hi
t0mmyvyo has quit [Ping timeout: 244 seconds]
azm has quit [Ping timeout: 244 seconds]
t0mmyvyo has joined #ruby
choffstein has quit [Ping timeout: 245 seconds]
kenperkins has joined #ruby
chimkan_ has joined #ruby
headius has quit [Quit: headius]
kenperkins has quit [Client Quit]
andrewhl has joined #ruby
mattonrails has joined #ruby
vladiim has joined #ruby
kawa_xxx has joined #ruby
sungnyc has quit [Read error: Connection reset by peer]
Hanmac1 is now known as Hanmac
kawa_xxx has quit [Remote host closed the connection]
mattonrails has quit [Remote host closed the connection]
<banisterfiend> anyone here good at american slang?
<offby1> Well, I'm a native speaker ...
<offby1> watch:
<offby1> "That's the cat's pyjamas!:
<offby1> see?
<banisterfiend> offby1: ok translate this tweet, and explain what he's talking about
* offby1 shifts uncomfortably
<banisterfiend> offby1: "mattyblair: O_O! afaik, iPython is not this baller: https://t.co/rn3k5Y7T"
<offby1> the only mystery there is "baller", about which I have no idea ... although "ball" is supposedly a slang term for "fuck", although I've only run into it in books -- no actual humans have ever said it
<offby1> I actually suspect it's a typo
<banisterfiend> offby1: no there are a few mysteries
<banisterfiend> offby1: 1. why would he say anything about ipython in the first place? 2. why does he link to a specific line of the CHANGELOG? 3. what does the O_O! mean
<offby1> nfi
<banisterfiend> offby1: and yeah, what does 'baller' mean in that context
<billiamii> 'awesome'
<banisterfiend> billiamii: so is he literally saying "dont confuse ipython with this" (even if they have similar name, i don tthink this is right) or is he saying "ipython isn't as good as this" ?
<banisterfiend> i dont understand the point he's making
<billiamii> The latter.
<banisterfiend> billiamii: oh ok, so linking to the line of the changlog is linking to features that he finds cool?
<billiamii> I suspect the highlighted line is an accident or just referring to the new features.
<billiamii> yeah.
<banisterfiend> oh ok
<billiamii> and the O_O is an emoticon
<billiamii> surprise / amazement.
<offby1> I assumed banisterfiend recognized emoticons
cha1tanya has quit [Ping timeout: 260 seconds]
<offby1> being an IRC denizen and all
<banisterfiend> billiam: thx
<banisterfiend> billiamii: are you american?
<billiamii> Fraid so.
* offby1 derides billiamii cruelly
<banisterfiend> billiamii: i also thought that maybe 'X is not this baller" could be an american idiomatic expression that had a certain meaning
looopy has quit [Remote host closed the connection]
<offby1> maybe it's a Saturday Night Live reference.
<offby1> I'm still voting for typo, though
Aaton_off is now known as Aaton
<bambanx> guys i have a string "asasas/sasasjq/aassasasas/" how i can transform all " / " to "\\" e.g. "asasas\\sasasjq\\aassasasas\\" ?
Aaton is now known as Aaton_off
<bambanx> with .sub?
<bnagy> you want literally two backslashes?
<bnagy> "asasas/sasasjq/aassasasas/".gsub '/', '\\\\'
<bnagy> => "asasas\\sasasjq\\aassasasas\\"
<bambanx> thanks bnagy
jgrevich has quit [Read error: Connection reset by peer]
one8zero has quit [Quit: one8zero]
<bnagy> uh waaait - do you want literally two backslashes, or one?
<bnagy> "f/a".gsub( '/', '\\\\').size => 3
jgrevich has joined #ruby
<bambanx> damn sometimes my code is so confused i forget what i am doing lol
noodletraveler has quit [Ping timeout: 260 seconds]
noodletraveler has joined #ruby
DRCALKIN has joined #ruby
<bnagy> so with '\\\\' you get ONE 0x5c in the resulting string
rippa has joined #ruby
vladiim has quit [Quit: vladiim]
harukomoto has quit [Ping timeout: 244 seconds]
noodletraveler has quit [Client Quit]
Vert has quit [Read error: Connection reset by peer]
looopy has joined #ruby
cpruitt has quit [Quit: cpruitt]
<bnagy> which confuses me, tbh :(
noodletraveler has joined #ruby
one8zero has joined #ruby
mohits has joined #ruby
mohits has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
<offby1> backslashes are confusing.
dhaskew has quit [Quit: dhaskew]
harukomoto has joined #ruby
<bambanx> i have a mymethod(one, two) within my method i have an array it gets the arguments , btu how i can in case i wanna this array only with one arguments ? i mean array[one] without two argument
cpruitt has joined #ruby
<offby1> python has a "raw" string, where backslashes aren't special; if ruby has something similar, it'd be handy here
davidpk has joined #ruby
cpruitt has quit [Client Quit]
<phipes> does anyone use data mapper here?
cj3kim has joined #ruby
<bambanx> guys how i fix this pls http://pastie.org/3964544
<Hanmac> bmbanx: read about default parameters
chimkan_ has quit [Quit: chimkan_]
<Hanmac> phipes: i think the most are in #rubyonrails
pdtpatrick has joined #ruby
<phipes> Hanmac: thanks ill go there
<bambanx> i am looking for
<bambanx> bnagy, you know this pls http://pastie.org/3964544 ?
<Hanmac> WHY didnt you try this? def mymethod(i, j=nil)
<bambanx> dont work
<bambanx> i tryed
<Hanmac> "dont work" is not an valid error message
<bambanx> well when i use both parameters mymethod(0,1) works
<bambanx> when i use one mymethod(0) this return nil
Chryson has quit [Quit: Leaving]
<Hanmac> WHAT do you want to return?? you didnt say it
<bambanx> is an array within my method
kil0byte has quit [Remote host closed the connection]
<bambanx> but dont worry i will write condittionals
<pdtpatrick> Question - anyone run into this problem ? http://cl.ly/3U1Y202g0S1D1y1K1H0C
<xnm> bambanx: then do : if j; array[i][j]; else; array[i]; end
<bambanx> yeah xnm thanks
freakazoid0223 has quit [Ping timeout: 245 seconds]
KL-7 has joined #ruby
<xnm> np
c0rn has joined #ruby
<Hanmac> better: j ? array[i][j] : array[i]
<bnagy> ternary is never better
<bnagy> only shorter
<bambanx> is more clear for me use if and else
<bambanx> when i re read my code
<bnagy> pdtpatrick: wtf you posted a _screenshot_?
<Hanmac> let me guess ... you are on of the guys who do: if(con); true;else; false; end ?
<bnagy> uh no, I'd do if con :)
<bnagy> ternary is not common idiom, it confuses people and it's often difficult to read
<bnagy> end of story - I'm not telling you never to use it
AndChat| has quit [Ping timeout: 244 seconds]
kah_ has quit [Quit: Leaving]
<palmfrond> zoomscale REAL NOT NULL DEFAULT 1.0
<palmfrond> is that appropriate syntax?
<palmfrond> in a table def that is
<pdtpatrick> bnagy: shows step by step what i was doing and the output, lot easier than the paste bin text. Anyway the problem I'm having is that if ~/.ssh/known_hosts is empty it'll work but if it has something in it, it fails
<Hanmac> palmfrond depending on your sql engine
<Hanmac> "in a table def that is" ... its to early to speak yoda
<palmfrond> sqlite
<palmfrond> wrapped by FMDB
<palmfrond> hahaha
<bnagy> pdtpatrick: ok well my internet is too slow to dl high res screenies so good luck with that :) Hopefully someone in a first world country can help
<palmfrond> sorry, how i talk it is
<palmfrond> lol
<palmfrond> bnagy, where're you?
<Hanmac> of REAL is a valid type, then i think the syntax is ok
<palmfrond> yea it's from sqlite's types doc
<bnagy> Hanmac: that's broken, I can only assume it's written tat was because of limited syntax or a compiler that needs a lot of help
<bnagy> which, given the author, seems reasonable :) Nobody would write that in 'real' ruby
<pdtpatrick> bnagy: http://pastie.org/3964585
dv310p3r has quit [Ping timeout: 245 seconds]
<bnagy> pdtpatrick: ok... is net/ssh properly installed?
<bnagy> maybe it never gets invoked if there are no known_hosts
<palmfrond> bh, ?
<palmfrond> bnagy ?
<bnagy> palmfrond: uh... what?
<palmfrond> whe're are you?
<palmfrond> err where're you?
<Hanmac> pdtpatrick: cat /dev/null ... WHAT are you trying todo??
lkba has joined #ruby
<bnagy> palmfrond: kathmandu, nepal
<pdtpatrick> Hanmac: I'm truncating the known_hosts file so i can test
<pdtpatrick> bnagy: it is installed just fine. I've even cleaned it and tried installing it
<pdtpatrick> and still failed
<palmfrond> bnagy, wow, that's so cool! how do you like it?
* palmfrond loves goji berries; i believe they come from nepal
<bnagy> pdtpatrick: ok... and you can require it in irb and see that exact constant?
<xnm> pdtpatrick: have you tried downgrading net-ssh?
razer123 has joined #ruby
<pdtpatrick> xnm: i've downgrade 2.4.0 and same error
iamjarvo has quit [Quit: Leaving.]
<pdtpatrick> bnagy: i see Net::SSH:KnownHosts but not the SUPPORTED_TYPE
<Hanmac> maybe there is no SUPPORTED_TYPE?
<bnagy> pdtpatrick: guess that's the issue then, I just don't know why :)
<palmfrond> bnagy?
andrewhl has quit [Quit: andrewhl]
<bnagy> palmfrond: sorry, dude, but I'm a bit bored with talking about nepal :)
beneggett has joined #ruby
tcopp has joined #ruby
<palmfrond> bnagy, hook it up bro
<banisterfiend> bnagy: be naggy
<palmfrond> where're you originally from?
<bnagy> pdtpatrick: cool, looks like someone's on it
<banisterfiend> palmfrond: he's from austarlia
<pdtpatrick> Hanmac: thanks
<pdtpatrick> bnagy: thanks
<palmfrond> bnagy, living in nepal for good?
<bnagy> banisterfiend: hey, how do I gist a class from pry? Or what's the line-range syntax? :)
lkba has quit [Ping timeout: 245 seconds]
zeromodulus has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
<bnagy> palmfrond: I love it | Australia | No, we've been here 2 years, leaving next Jan | because we're here with the red cross | Yes, there ARE a lot of cows on the streets
<palmfrond> could you be happy living there for life?
<bnagy> damn, didn't see that one coming
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
<palmfrond> :)
<bnagy> no, we're expat junkies, we move every 2-3 years. I think I would go nuts living _anywhere_ for 'life' at this point
kenperkins has joined #ruby
crankycoder has quit [Remote host closed the connection]
<banisterfiend> bnagy: i was too lazy to add gisting of classes, though it's very possible. But if you typed the class in at the repl then you can gist it by using: gist -i EXPRESSION_NUMBER
<banisterfiend> bnagy: where EXPRESSION_NUMBER is the number in [N] beside the prompt, next to the class def. you typed
<banisterfiend> if u know what i mean
<banisterfiend> letme show u
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<banisterfiend> bnagy: https://gist.github.com/2785853
<palmfrond> bnagy, i understand
<palmfrond> bnagy, thanks for taking the time
<palmfrond> btw someone in #iphonedev said the other day they think there are more ruby gigs now than even ios/objc. opinions on that?
<palmfrond> i've been out of the ruby contract scene for 3 years doing ios
<banisterfiend> palmfrond: just wait until rubymotion takes off
<bnagy> banisterfiend: ok... can I get that later though?
<palmfrond> banisterfiend, what'll happen then?
<banisterfiend> palmfrond: then you can do rubymotion and ios in the same breath
<banisterfiend> bnagy: what do u mean get it later
<palmfrond> awesome. is it production ready?
kawa_xxx has joined #ruby
<banisterfiend> palmfrond: Yes
<palmfrond> nice
<banisterfiend> palmfrond: im surprised you haven't heard about it
test34 has quit [Ping timeout: 244 seconds]
<palmfrond> i hae
<palmfrond> have
<banisterfiend> ok
<palmfrond> haven't looked into it deeply yet however
<bnagy> well the expression num where I defined it is gone in scrollback, but I can show-source it and the the original line numbers etc
<palmfrond> and honestly i know/like objc at this point
<banisterfiend> bnagy: well if you scroll up you'll see the expression number again, just use that.
tonini has joined #ruby
<banisterfiend> bnagy: i will add the ability to gist classes soon, it should get around that boredom
<banisterfiend> sorry
<bnagy> but that's lame :)
<banisterfiend> i just got lazy
<bnagy> there's a -l option for girst, why can't I use that?
<bnagy> *gist
<banisterfiend> bnagy: Yeah, oversight on my part
<banisterfiend> bnagy: because -l only works to limit what you're gisting, like: gist -m Pry#repl -l 2..3
<banisterfiend> will restrict the lines from Pry#repl to 2..3
vladiim has joined #ruby
<bnagy> oic
linus95014 has quit [Quit: linus95014]
<banisterfiend> bnagy: there's a request to be able to gist actual readline history, that will do what u want
<banisterfiend> but it's not implemented yet
tcopp has left #ruby [#ruby]
<banisterfiend> bnagy: we're about to do another point release in a day or so i can add your gist class feature then
<banisterfiend> gist -c Bnagy
cming has quit [Remote host closed the connection]
<banisterfiend> no it would have to be gist -k Bnagy
<banisterfiend> as '-c' is already used by commands
cming has joined #ruby
<bnagy> if I use edit I have to go back and remember which edit command was the class I want to gist :S
simao has joined #ruby
<bnagy> you could also just have the expression number in the output for show-source, that would work, no?
noodletraveler has quit [Ping timeout: 248 seconds]
<banisterfiend> bnagy: wll currently that's only an issue because we dont support gist -k, right? we'll support that in 1-2 days :) so it wont be an issue anymoer?
<bnagy> I guess if you can gist Modules and Methods then that should be most stuff, yeah
<banisterfiend> bnagy: what epxresison number are you up to?
<banisterfiend> what's the current number beside your prompt
<bnagy> 31?
noodletraveler has joined #ruby
<banisterfiend> bnagy: ok, type this: cat -i 1..-1
<banisterfiend> that will show oyu al input epxressions
<banisterfiend> fully expanded (i.e if you used edit, then the full code for methods/classes you typed in edit will be displayed)
Solnse has joined #ruby
<bnagy> ok, that would be cool if you could pipe it to grep :D
<banisterfiend> bnagy: Yeah, good point
<banisterfiend> bnagy: does it at least have pagin?
<banisterfiend> bnagy: cos if you have a pger then the pager should support a kind of grep
<banisterfiend> pressing '/' in 'less' lets u grep
<bnagy> no, because I turned it off because the pager couldn't work out my terminal size
<banisterfiend> bnagy: ah, still in jruby?
simao has quit [Ping timeout: 244 seconds]
<banisterfiend> bnagy: we dont use a real pager in jruby, we just use my little home made thing :P
<bnagy> no mri now
<banisterfiend> the real pager is less
<banisterfiend> what?
<banisterfiend> on mri it should work
<banisterfiend> weird
<bnagy> but it's less than a screen worth of output :)
<banisterfiend> that's strange
<bnagy> I am on 158x81, so it's not hitting the pager
<bnagy> I'll try later when there is more stuff in there
amalvagomes has quit [Quit: amalvagomes]
kenperkins has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Eldariof59-ru has joined #ruby
francisfish has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
noodletraveler has quit [Ping timeout: 248 seconds]
<banisterfiend> bnagy: the difficult thing about classes though
<banisterfiend> bnagy: is they can have more than one defintion, so what should gist -k MyClass do if MyClass has been monkeypatched in mutliple palces?
<billiamii> How can I iterate through the bits in a fixnum?
td123 has quit [Quit: WeeChat 0.3.7]
nyuszika7h has joined #ruby
noodletraveler has joined #ruby
<palmfrond> banisterfiend, that's a tough one. solution?
vladiim has quit [Quit: vladiim]
cj3kim has joined #ruby
<banisterfiend> palmfrond: what?
<banisterfiend> i was the one asking a question
<palmfrond> o
kenperkins has joined #ruby
francisfish has quit [Remote host closed the connection]
heftig has quit [Remote host closed the connection]
<bnagy> billiamii: quick and dirty? ("%b" % 25).split(//).each {|bit|
heftig has joined #ruby
<bnagy> banisterfiend: well somewhere there's the current source for MyClass, or..not? ruby2ruby? :)
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
visof has quit [Client Quit]
vladiim has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
<banisterfiend> bnagy: i get it using clever tricks based on source_location, butthe issue is it can match more than one class defintion
<bnagy> billiamii: the reason I used pritf instead of to_s(2) is cause you can specify alignment with printf, if you need it (%.8b)
<palmfrond> banisterfiend, yea it's dirty
<banisterfiend> like the diff. monkey patches to MyClass
Urthwhyte is now known as Urth|Away
savage- has joined #ruby
<ewag> [B[A
<palmfrond> so do we wipe monkey patching then?
<bnagy> banisterfiend: hrmmmm what are people likely to want?
<banisterfiend> palmfrond: objc has monkeypatches too
<banisterfiend> bnagy: the class with the most methods, i guess
<palmfrond> banisterfiend, categories?
<billiamii> bnagy, that makes sens. I'll be able to get away without the alignment
<billiamii> sense*
<bnagy> I think the point of being able to gist from a repl would be to gist the running code, yeah
<billiamii> Is there a way to get the 'length' of the boolean without converting to string?
<banisterfiend> palmfrond: Yeah
<palmfrond> ya sure
lxsameer has joined #ruby
<palmfrond> i like simplicity. easier
<bnagy> billiamii: booleans are length 1 :)
<billiamii> errr
<banisterfiend> palmfrond: what country are you from?
<palmfrond> USA
noodletraveler has quit [Ping timeout: 265 seconds]
<bnagy> you want the minimum length, in bits? to_s(2).size, but it will almost never be that size IRL
<banisterfiend> palmfrond: are you sure? your english seems a bit weird ;)
<bnagy> without converting to string I think is going to take bit hacks
noodletraveler has joined #ruby
<bnagy> but I haven't thought about it yet
<palmfrond> yea. how so banisterfiend ?
<billiamii> hmm
<bambanx> guys can give me a hand here pls http://pastie.org/3964673
<banisterfiend> palmfrond: nevermind
<banisterfiend> probably just my imagination
<pdtpatrick> Hanmac: thanks again - i also added my fix to the thread just in case someone else ran into the same issue: http://tinyurl.com/cejl7rz
<bnagy> bambanx: I don't think that code will ever work
<bambanx> :( bnagy
<bnagy> why do you still have that crazy loop?
davidpk has quit [Quit: Computer has gone to sleep.]
<bambanx> i am just a human
<bnagy> and also, you're reading the first file every time
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ryanf has joined #ruby
<bambanx> i am trying to put all my content files in one
davidpk has joined #ruby
beneggett has quit [Ping timeout: 245 seconds]
<Hanmac> bambanx: files.map {|file| CSV.read(file.gsub('/', '\\'), :headers => true) }
beneggett has joined #ruby
<bambanx> amp Hanmac ?
<bambanx> map*
<bambanx> what do map?
r0bby has joined #ruby
<bnagy> instead of your loop
<Hanmac> its mapping something to something else :P
<bnagy> that replaces your lines 4-10
noodletraveler has quit [Ping timeout: 244 seconds]
harukomoto has quit [Ping timeout: 265 seconds]
<bnagy> if it's a CSV file I am surprised it has slashes that need converting, though
<bambanx> dont work without \\
<Hanmac> bnagy its for the paths, but i dont know why :P
noodletraveler has joined #ruby
Eldariof-ru has quit [Read error: Operation timed out]
<bambanx> with this files.map {|file| CSV.read(file.gsub('/', '\\'), :headers => true) } also i need loop
<Hanmac> no you didnt
<bambanx> for iterate the diferent files ?
<bnagy> bambanx: no, that's a different way of iterating over a collection
<bnagy> each file contained in files (the array) gets fed into that block, one by one
burgestrand has quit [Read error: Connection reset by peer]
zodiak has quit [Ping timeout: 246 seconds]
tewecske has joined #ruby
<bnagy> I can't believe CSV.read needs windows style paths
burgestrand has joined #ruby
<bambanx> so how i read my diferent files files.map {|mypath/* | CSV.read(file.gsub('/', '\\'), :headers => true) } ?
Eldariof-ru has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
jhunter_ has joined #ruby
<bnagy> it doesn't
jhunter_ has quit [Client Quit]
kil0byte has joined #ruby
test34 has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
davidpk has quit [Quit: Computer has gone to sleep.]
zodiak has joined #ruby
<bnagy> that gsub makes no sense
Eldariof27-ru has joined #ruby
<bnagy> bambanx: I already read, Hanmac's one line replaces your lines 4-10
<bnagy> s/read/said/
<bambanx> ok
roflmaus has joined #ruby
<bambanx> patience pls i am just a human trying to learn :)
<bnagy> and I don't believe tat you need that gsub
QKO has joined #ruby
test34- has quit [Ping timeout: 265 seconds]
Jb_ has quit [Ping timeout: 260 seconds]
lolmaus has quit [Read error: Connection reset by peer]
noodletraveler has quit [Ping timeout: 248 seconds]
<bnagy> until you pastie me the code with an error to prove me wrong - CSV works fine with windows paths with /
wardrop has quit [Read error: Connection reset by peer]
davidpk has joined #ruby
xnm has quit [Read error: Connection reset by peer]
Faris has quit [Quit: Leaving.]
wardrop has joined #ruby
Mez has quit [Ping timeout: 272 seconds]
noodletraveler has joined #ruby
<bambanx> look i do this what i say Hanmac http://pastie.org/3964708
fpd has quit [Ping timeout: 252 seconds]
Jb_ has joined #ruby
<bnagy> bambanx: file.gsub, not files, but you don't need it
jacobw has quit [Ping timeout: 252 seconds]
yxhuvud has joined #ruby
mockillo has quit [Ping timeout: 252 seconds]
<Hanmac> data = files.map {|files| CSV.read(file, :headers => true) }; p data
<Hanmac> OR files.map! {|files| CSV.read(file, :headers => true) }; p files
ping-pong has quit [Read error: Operation timed out]
Eldariof59-ru has quit [Ping timeout: 265 seconds]
ping-pong has joined #ruby
jacobw has joined #ruby
<bnagy> except oth of those |files| should be |file|
fpd has joined #ruby
<bambanx> ok
Guest76606 has quit [Remote host closed the connection]
mockillo has joined #ruby
Eldariof27-ru has quit []
<bambanx> the part i dont understand is in this code data = files.map {|files| CSV.read(file, :headers => true) }; how i point to my folder with my files
wilmoore has quit [Remote host closed the connection]
xnm has joined #ruby
<bnagy> bambanx: you already stored the array of filenames in the files variable on the line above
noodletraveler has quit [Ping timeout: 244 seconds]
<bambanx> this ? files = Dir.glob('C:/Users/Market/*') - Dir.glob('C:/Users/Market/My Orders-*.txt')
<bnagy> yes
<bambanx> cool
<bambanx> thanks
noodletraveler has joined #ruby
hemanth has joined #ruby
<bnagy> by the way, when you use the :headers option you're going to get an array of hashes, per file
Mez has joined #ruby
<bambanx> look this pls bnagy Hanmac http://pastie.org/3964737
rushed has joined #ruby
nowthatsamatt has joined #ruby
<bnagy> yeah |files| should be |file|, I said
vectorshelve has joined #ruby
noodletraveler has quit [Ping timeout: 252 seconds]
<bambanx> now works !!!!!!! bnagy Hanmac \o/
nirakara has joined #ruby
<Hanmac> shevy did you know that mruby can turn ruby code to c code?
rdegraci has joined #ruby
noodletraveler has joined #ruby
<bambanx> Hanmac, bnagy is a gift for your help in ruby guys http://www.youtube.com/watch?v=IZh-U5NY-wM
r4um has joined #ruby
<bambanx> like?
<bnagy> bambanx: I can't watch youtube
<bambanx> :(
dnyy has joined #ruby
<bambanx> bnagy, using headers in my csv can i get a element using for example a key?
savage- has quit [Remote host closed the connection]
* hemanth wanted a kid to love CLI so did kidomath; gem install kidomath; kidomath
<hemanth> vectorshelve, ^
noodletraveler has quit [Ping timeout: 256 seconds]
<hemanth> bambanx, still stuck with My Orders-*.txt...hmmm
<bambanx> heheh hemanth i am using csv now
<bambanx> learning
dnyy has quit [Remote host closed the connection]
<hemanth> bambanx, nice, try json and yaml too :)
noodletraveler has joined #ruby
<bambanx> i will !!!
looopy has quit [Remote host closed the connection]
<bambanx> but no now i need to finish my program
<bnagy> bambanx: it should be an array of arrays of hashes
<bnagy> keyed by your headers
<bnagy> so like data.each {|order| p order['order_number']} or whatever the headers look like
<bambanx> p data[0][1][2] this way is working but if i wanna use a hash for get a element ?
Urth|Away is now known as Urthwhyte
<bambanx> o
noyb has joined #ruby
Urthwhyte is now known as Urth|Away
TandemAdam has quit [Quit: Leaving]
kil0byte has quit []
<bnagy> my bad, it will be array of CSV::Table, but they work like hashes anyway
<bnagy> cute, they kind of work like both, you can do tbl[2] or tbl['header'
dnyy_ has joined #ruby
vladiim has quit [Quit: vladiim]
<bambanx> can i conbinate like tbl['header'][0] ?
<bnagy> and it should be data.each {|file| file.each {|order| p order['id']}} or similar
noodletraveler has quit [Ping timeout: 252 seconds]
MissionCritical has quit [Ping timeout: 245 seconds]
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<bnagy> data is an array of parsed files, each parsed file is an array of CSV::Table objects (one line from the file)
noodletraveler has joined #ruby
<bambanx> ok master
<bambanx> i can conbinate :P
banisterfiend has quit [Remote host closed the connection]
test34 has quit [Ping timeout: 252 seconds]
<bnagy> data[0][1][2] is the third heading (or column) in the second row of the first file
linus95014 has joined #ruby
ph^ has joined #ruby
<bnagy> but doing it my ways makes it twenty times easier to read
<bambanx> i used data[0]['price'] and works =)
one8zero has quit [Quit: one8zero]
<bnagy> eh?
<bnagy> you mean data[0][0]['price'] or something I guess?
<bambanx> i used p data[0]['price'] and works well print me the row of prices
<bambanx> yeah
<bnagy> ahhh yeah I am retarded, a Table is 2D
one8zero has joined #ruby
r0bby is now known as robbyoconnor
<bambanx> you are very smart bro
<bnagy> so data[0][0] is the first row and data[0]['price'] is the price column
odinswand has quit [Ping timeout: 240 seconds]
<bnagy> CSV is awesome!
<bambanx> yeah
<bnagy> data[0][0]['price'] could just just the price from the first row
<bambanx> data[this number is my file] e.g. if is 0 is my first file
<bnagy> s/c/w/
noodletraveler has quit [Ping timeout: 252 seconds]
mikeycgto has quit [Remote host closed the connection]
<bambanx> data[0]['price'] row of prices of my first file data[1]['price row of my second file
<bnagy> bambanx: if you want to be able to reliably link the Tables to a filename then you need to change the initial parsing a little bit
one8zero has quit [Client Quit]
noodletraveler has joined #ruby
<bnagy> but if you just want to iterate through all of them then it's fine like this
vladiim has joined #ruby
<bambanx> yeah i can iterate the first value of my array
stewart_ has quit [Quit: Leaving.]
rdegraci has quit [Quit: rdegraci]
<bnagy> bambanx: you should say price _column_ not row, so people don't get confused. Columns go down, rows go arcoss
<bnagy> I really cannot type for toffee today :(
<bambanx> thanks bnagy
<bnagy> bambanx: data.map {|f| f['price']}.flatten.inject(:+) <-- sum of all order prices from all files
<bambanx> how i can get the minor or major ( < or >)
noodletraveler has quit [Ping timeout: 240 seconds]
<bnagy> without knowing your data structure I have no idea what you're talking about :)
mdw has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
<bambanx> for example of my list of price , the major price or minor
<bambanx> < >
noodletraveler has joined #ruby
<bnagy> bambanx: I recommend getting into irb, running that import and then playing with map etc
<Hanmac> something like this: data.map {|f| f['price']}.flatten.max data.map {|f| f['price']}.flatten.min
<bambanx> ok
<bambanx> what do flatten?
<bnagy> uh that gets the biggest and smallest price for any order in any file
<bnagy> but I still have no idea what your data looks like, so I am staying on the fence
<bnagy> bambanx: seriously, try this stuff in irb
<Hanmac> bambanx flatten does if you have an array in array in array, it turns into one big flat array
looopy has joined #ruby
<bnagy> you need to learn what's happening with all this magic
djdb has joined #ruby
<bambanx> what wrong of use a editor and run them with F7?
burgestrand has quit [Quit: Leaving.]
<bnagy> irb is quicker
<bnagy> and it shows you the inspect output every time so you can see step by step what is happening
<bambanx> my editor too , i ws tryed in irb but i can copy n the shell and move code easyly
<bambanx> i am on windows my shell suck
khakimov has joined #ruby
<bnagy> irb in cmd.exe is pretty much the same as on linux :)
schovi has joined #ruby
<bnagy> cut and paste sucks, that's all
foofoobar has joined #ruby
DRCALKIN has quit [Quit: Leaving]
noodletraveler has quit [Ping timeout: 252 seconds]
Apocalypse has quit [Ping timeout: 264 seconds]
linus95014 has quit [Quit: linus95014]
noodletraveler has joined #ruby
SPYGAME has joined #ruby
<razer123> On my mac it doesn't do indent numbers in irb like on windows
<bnagy> macs can't do indenting, that's why most rubyists use windows
<razer123> ?
Morkel has joined #ruby
odinswand has joined #ruby
<bnagy> yeah, it's a big problem, I had to buy a whole new laptop
noodletraveler has quit [Ping timeout: 252 seconds]
manizzle has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 252 seconds]
noodletraveler has joined #ruby
<bnagy> razer123: is your irb prompt '>>' ?
MissionCritical has joined #ruby
Apocalypse has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
igotnolegs has quit [Quit: Computer has gone to sleep.]
noodletraveler has quit [Ping timeout: 256 seconds]
noodletraveler has joined #ruby
abstrusenick has joined #ruby
carson__1 has quit [Ping timeout: 245 seconds]
banseljaj is now known as imami|afk
mdw_ has joined #ruby
noodletraveler has quit [Ping timeout: 240 seconds]
noodletraveler has joined #ruby
<TTilus> fyi, the combination of ruby and finnish as natural language: #ruby.fi
<bnagy> perkele
senny has joined #ruby
mdw has quit [Ping timeout: 248 seconds]
CheeToS has joined #ruby
vladiim has quit [Quit: vladiim]
trivol has quit [Quit: trivol]
noodletraveler has quit [Ping timeout: 260 seconds]
etehtsea has joined #ruby
noodletraveler has joined #ruby
vladiim has joined #ruby
francisfish has joined #ruby
pjn_oz has joined #ruby
tomzx has quit [Ping timeout: 260 seconds]
niku4i has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<bambanx> bnagy, Hanmac my data have this structure http://pastie.org/3964895 , is posible filter for example if i wanna all prices equal to 1200 or < 2000 .... ?
noodletraveler has quit [Ping timeout: 265 seconds]
<Hanmac> data.find_all {|f| f['price'] == 1200} or data.find_all {|f| f['price'] < 2000}
<bambanx> Hanmac, ty
banisterfiend has joined #ruby
ipoval has quit [Quit: ipoval]
noodletraveler has joined #ruby
zommi has joined #ruby
ananthakumaran has joined #ruby
maesbn has joined #ruby
noyb has quit [Ping timeout: 265 seconds]
pawdro has joined #ruby
noodletraveler has quit [Ping timeout: 265 seconds]
noodletraveler has joined #ruby
niku4i has quit [Remote host closed the connection]
sepp2k has joined #ruby
seanstickle has joined #ruby
<bambanx> Hanmac, bnagy looks pls here is doing something weird max give me a value but not the max http://pastie.org/3964924
noodletraveler has quit [Ping timeout: 240 seconds]
<bambanx> is necessary convert to integer maybe?
looopy has quit [Remote host closed the connection]
noodletraveler has joined #ruby
pawdro has quit [Remote host closed the connection]
jmeeuwen_ is now known as jmeeuwen
simao has joined #ruby
<bambanx> yeah i need convert :/
cming has quit [Remote host closed the connection]
cming has joined #ruby
francisfish has quit [Ping timeout: 245 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
noodletraveler has quit [Ping timeout: 260 seconds]
noodletraveler has joined #ruby
simao has quit [Ping timeout: 244 seconds]
mdw_ has quit [Remote host closed the connection]
beneggett has joined #ruby
dtang has quit [Quit: dtang]
vladiim has quit [Quit: vladiim]
mikepack has quit [Remote host closed the connection]
<bambanx> anyonee can give me a hand with this pls data.find_all {|f| f['price'] == 1200}
<bambanx> sorry with this http://pastie.org/3964924
monokrome has joined #ruby
noodletraveler has quit [Ping timeout: 250 seconds]
noodletraveler has joined #ruby
<bnagy> it's a string
<bnagy> easiest - in the CSV line there is an option for autoconvert or something
<bnagy> which will convert those strings to floats by itself
JohnBat26 has joined #ruby
<bnagy> when you read it in :header=>true, :converters=>:all
<bnagy> or just :converters=>:numeric if you don't have any dates
Telgsta has joined #ruby
<bnagy> bambanx: also, please don't crosspost in #ruby-lang, especially without telling people you're doing it
<bambanx> ok sorry
davidpk has quit [Quit: Computer has gone to sleep.]
<bambanx> yeah now works !!!! \o/ bnagy
<Tasser> bnagy, a redirect needs to be done either way... :-/
jimeh has joined #ruby
gilead has joined #ruby
<bnagy> Tasser: yep, done
consti has joined #ruby
consti has quit [Changing host]
consti has joined #ruby
piotr_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<Tasser> bnagy, as in channel redirect ;-)
<bnagy> oh right, yeah well I have no idea about politics
krz has quit [Quit: krz]
dzhulk1 has quit [Quit: Leaving.]
jenrzzz-mac has joined #ruby
test34- has quit [Ping timeout: 252 seconds]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
yonggu_ has joined #ruby
<bambanx> nice bnagy i am filtering how say Hanmac p data[0].find_all {|f| f['price'] < 1.10 && f['bid'] == "True"} =) very cool and easy i love csv now
beneggett has quit [Quit: Computer has gone to sleep.]
KL-7 has quit [Quit: This computer has gone to sleep]
vladiim has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
yonggu has quit [Ping timeout: 248 seconds]
jenrzzz-mac has joined #ruby
hoelzro|away is now known as hoelzro
nirakara has quit [Read error: Connection reset by peer]
vladiim has quit [Quit: vladiim]
xnm has quit [Read error: Connection reset by peer]
c0rn has quit []
ryanf has quit [Quit: leaving]
xnm has joined #ruby
cordoval has joined #ruby
yankov has quit [Quit: yankov]
blacktulip has joined #ruby
noodletraveler has quit [Ping timeout: 248 seconds]
phipes has quit [Quit: phipes]
binaryplease has quit [Quit: WeeChat 0.3.7]
zz_chrismcg is now known as chrismcg
kelsey has joined #ruby
noodletraveler has joined #ruby
tvw has joined #ruby
sent-hil has joined #ruby
foofoobar has quit [Quit: Computer has gone to sleep]
zeromodulus has joined #ruby
Telgsta has quit [Ping timeout: 260 seconds]
<bambanx> gn all , thanks bnagy Hanmac for all see ya
bambanx has quit [Quit: Saliendo]
<bnagy> o/
imami|afk is now known as banseljaj
noodletraveler has quit [Ping timeout: 252 seconds]
BiHi has joined #ruby
noodletraveler has joined #ruby
Helius has joined #ruby
devsharpen has joined #ruby
bluOxigen has joined #ruby
nfk has joined #ruby
<shevy> <Hanmac> shevy did you know that mruby can turn ruby code to c code?
xbayrockx1 has quit []
<shevy> Hanmac, nope didnt know that. sounds awesome
<shevy> RubyOS here we come!!!
berkes has joined #ruby
noodletraveler has quit [Ping timeout: 245 seconds]
<deryl> grrr why does evolution's cancel button never friggin work when querying a server for supported authentication types. hangs the entire damned thing
<seanstickle> shevy: wait what?
<seanstickle> mruby -> c ?
<seanstickle> Really?
noodletraveler has joined #ruby
<shevy> seanstickle would be cool if. I dont know how Hanmac knows these things, until a few weeks I didnt even know mRuby existed
<Helius> which is the main advantage in using mruby ?
keanehsiao has quit [Quit: keanehsiao]
<seanstickle> Apparently, compilation to C!
devsharpen has quit [Quit: ffs]
akemrir has joined #ruby
akemrir has quit [Client Quit]
xbayrockx has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
akemrir has joined #ruby
akemrir has quit [Client Quit]
rakm has quit [Quit: Computer has gone to sleep.]
eurek has joined #ruby
noodletraveler has quit [Ping timeout: 250 seconds]
orbiting has joined #ruby
simao has joined #ruby
noodletraveler has joined #ruby
Telgsta has joined #ruby
akemrir has joined #ruby
araujo has quit [Remote host closed the connection]
roolo has joined #ruby
jgrevich has quit [Quit: jgrevich]
stephenjudkins has joined #ruby
noodletraveler has quit [Ping timeout: 252 seconds]
orbiting has left #ruby ["Leaving"]
ukwiz has joined #ruby
noodletraveler has joined #ruby
sent-hil has quit [Remote host closed the connection]
<shevy> Helius, I suppose it is small and embeddable and thus easier to integrate into C programs, like lua
mdw has joined #ruby
<shevy> matz authored 34 minutes ago
<shevy> whee he is active :D
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<hoelzro> I see a few hints taken from Lua in there =)
<hoelzro> namely mrb_state
francisfish has joined #ruby
alem0lars has joined #ruby
ddv has joined #ruby
nu7hatch has joined #ruby
<shevy> what is mrb_state? is there a lua_state?
Vainoharhainen has joined #ruby
<hoelzro> lua_State is the interpreter state
piotr__ has joined #ruby
Telgalizer has joined #ruby
<hoelzro> because the state is encapsulated in a struct rather than in globals, it allows you to easily embed several interpreters in the same process
piotr_ has quit [Ping timeout: 245 seconds]
jenrzzz-mac has joined #ruby
petercs has joined #ruby
Telgsta has quit [Ping timeout: 245 seconds]
flype has joined #ruby
Telgalizer has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby
zeroXten has joined #ruby
<zeroXten> hmm, "hello there"[5] returns the decimal ascii value for space?
<zeroXten> but when using a range one gets the actual chars
<zeroXten> is that right?
<hoelzro> in 1.8, yes
<zeroXten> ah
<hoelzro> in 1.9, 'hello there'[5] will return a string consisting of a single character
<zeroXten> ahhh, how strange
KL-7 has joined #ruby
<hoelzro> indeed
<hoelzro> shocked me when I read it!
<zeroXten> i'd better upgrade then.. why one earth does it do that
snearch has joined #ruby
<hoelzro> unicode integration in 1.9
cache_za has joined #ruby
<bnagy> you can test against characters by str[3]==?a
<bnagy> but not space :/
<bnagy> because ?char changed at the same time from returning the ord to returning a str
<zeroXten> hmm, why would you want to return a string from a char?
<bnagy> but yeah, upgrade if you can :)
<bnagy> zeroXten: well it makes that test 1.8 and 1.9 compatible
workmad3 has joined #ruby
<zeroXten> ah true
<deryl> iirc peter cooper covers all of that in hsi Ruby 1.9 walkthrough
<bnagy> it used to be a shortcut to get the ord
<deryl> (gotta pull it off the external backup to be sure)
stephenjudkins has quit [Quit: stephenjudkins]
<shevy> zeroXten string[1,3] will work in both 1.8 and 1.9
<shevy> sad story of yesterday:
<shevy> here on mageia linux I can compile 1.9.3 from source, but not 1.8.7
<shevy> :(
<hoelzro> why not?
fgwaegeawgfwa has joined #ruby
maesbn has quit [Remote host closed the connection]
<bnagy> shevy: my sad story is that my 0mq FFI stuff isn't working with jruby at the moment, so I am stuck with shitty MRI
<shevy> not sure hoelzro I can pastie the error I get here
<bnagy> need to try a million JVM upgrade / downgrades now etc. booring.
keymone has left #ruby [#ruby]
<shevy> hoelzro, http://pastie.org/3965272 I think it does not like something about dl/ not sure what that is ... perhaps glibc? ruby 1.9.3 has no problem with that
iocor has joined #ruby
<shevy> bnagy, I am still scared of jruby because they want me to install java :D
Gavilan has quit [Ping timeout: 244 seconds]
<bnagy> I can appreciate your distaste
<bnagy> BUT it's so much FASTER
Telgalizer has joined #ruby
<shevy> yah well
<deryl> after the initial jvm rampup
maesbn has joined #ruby
<shevy> I think speed was not what I needed most. but I did want to use jruby at one point because of redcar actually
tomb_ has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: Nihil sub sole novum]
<banisterfiend> shevy: hey shevy wevy
<shevy> banisterfiend woke up already? :P
<banisterfiend> shevy: sup dogg
Natch| has quit [Ping timeout: 252 seconds]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
SPYGAME has quit [Read error: Connection reset by peer]
pting has quit [Quit: Ex-Chat]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
dkannan has joined #ruby
Natch| has joined #ruby
Natch| has quit [Excess Flood]
abstrusenick has quit [Quit: abstrusenick]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
wardrop has quit [Ping timeout: 265 seconds]
francisfish has quit [Remote host closed the connection]
Sulaiman has joined #ruby
Natch| has joined #ruby
Natch| has quit [Excess Flood]
tatsuya_o has joined #ruby
<Sulaiman> I'm a little late to the party, just beginning to learn and use ruby. hello.
M- has quit [Quit: Leaving]
ddv has quit [Quit: *poof*]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
ramblex has joined #ruby
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
piotr_ has joined #ruby
piotr__ has quit [Ping timeout: 245 seconds]
Natch has joined #ruby
Natch has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
flype has quit [Quit: Computer has gone to sleep.]
Natch| has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
Natch| has quit [Excess Flood]
prtksxna has joined #ruby
sgronblo1 is now known as sgronblom
<hoelzro> Sulaiman: hi!
Natch| has joined #ruby
Natch| has quit [Excess Flood]
francisfish has joined #ruby
ichilton_ is now known as ichilton
Natch| has joined #ruby
<shevy> Sulaiman good!
snearch has quit [Quit: Verlassend]
<shevy> Sulaiman the only thing that really works learning ruby is to write scripts on your own, in my opinion
<banisterfiend> shevy: do u know sulaiman is an alternative spelling of solomon
tonini has quit [Remote host closed the connection]
<shevy> haha
<shevy> sulaiman reminds me of the turk emperor
<shevy> the name
<Sulaiman> that is correct, it's the arabic version of solomon.
<graspee> i was going to say, was he learning ruby too?
jenrzzz-mac has quit [Quit: jenrzzz-mac]
nowthatsamatt has quit [Quit: nowthatsamatt]
<shevy> as Alan Kay said in a lecture a year ago
<shevy> we build on the progress of other people before us
wvms has quit [Read error: Connection reset by peer]
<shevy> our own intellect, and abilities to do something, depends on that earlier progress. and the available methods and tools that we now have, compared to people who lived before
wvms has joined #ruby
Kartagis has quit [Read error: Operation timed out]
<workmad3> 'if I have seen further than others, it is only because I have stood on the shoulders of giants'
consti has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
serroba has joined #ruby
xnm has quit [Quit: WeeChat 0.3.7]
cespare has quit [Ping timeout: 252 seconds]
binaryplease has joined #ruby
<workmad3> (I think Isaac Newton beat Alan Kay to that observation ;) )
SPYGAME has joined #ruby
mohits has quit [Ping timeout: 260 seconds]
<binaryplease> hey can anybody tell me how i can overwrite the new operator using mixins, method chaining of closures
ramblex has quit [Quit: ramblex]
<workmad3> binaryplease: are you just stringing together words you've heard people use when talking about ruby? :/
nari has joined #ruby
cespare has joined #ruby
<hoelzro> if so, he/she forgot rails =P
<banisterfiend> workmad3: newton was being a smartass though hehe
<binaryplease> workmad3: no i heard its possible and as im learning ruby i would be intrested in how you do this
<workmad3> banisterfiend: true :)
<bnagy> you heard it was possible because it was in your homework question, binaryplease :)
<workmad3> banisterfiend: newton, such a sarky smartass :)
banseljaj is now known as imami|afk
<banisterfiend> Yeah pretty spiteful guy too
<bnagy> If I have seen further than others, it is truly surprising because I Kepp JAMMING NEEDLES INTO MY EYE SOCKETS
<banisterfiend> geniuses dont have to be nice i guess
akemrir has quit [Quit: WeeChat 0.3.7]
<workmad3> bnagy: don't forget almost blinding himself by staring at the GODDAMN SUN ALL DAY
<bnagy> and essentially huffing ercury
<workmad3> bnagy: in fairness, if newton saw further than others, it's a fecking miracle :)
zeromodu_ has joined #ruby
<bnagy> binaryplease: start with this class Foo;def self.new; puts 'lol';end;end
<workmad3> but still, it's a nice sentiment and a poetic turn of phrase :)
berserkr has joined #ruby
<vectorshelve> shevy: :)
<shevy> binaryplease, you can overwrite new
<shevy> binaryplease, you can even kill it by doing ... include Singleton
<bnagy> doing it with a mixin is quite a bit more involved
<bnagy> but possible
<workmad3> shevy: or just 'class << self; private :new; end' inside the class def :)
<bnagy> haha
dnyy_ has quit [Remote host closed the connection]
<shevy> binaryplease there, workmad3 showed you how to do this
<workmad3> shevy: hey, I only showed him how to make new a bit more inaccessible :P
<binaryplease> yep these are all good starts for google searche
<binaryplease> stanks
zeromodulus has quit [Ping timeout: 265 seconds]
<bnagy> Foo.instance_eval {class << self; private :new;end}
jbw has quit [Ping timeout: 245 seconds]
<bnagy> but that's not really overwriting it
<bnagy> although it is funny :)
<shevy> workmad3 I really would not now why making .new useless is useful, but to each his own. binaryplease wants it so it must be useful to him
<shevy> :)
<shevy> ewww
<shevy> eval!
<shevy> !!!
<shevy> I used to be tolerating and accepting
<shevy> nowadays I just hate things I dont like
<shevy> I cant even go back to windows because I hate that too :(
<bnagy> String.instance_eval {def new( *args );puts "Arrays are more fun!";[];end}
cming_ has joined #ruby
<Tasser> bnagy, at least do Array.new(*args)
<bnagy> Tasser: breaks on String.new "foo", that was the first thing I tried :(
binaryplease has quit [Quit: WeeChat 0.3.7]
francisfish has quit [Remote host closed the connection]
nari_ has joined #ruby
<vectorshelve> is there an online site or something where I can create table with contents.. and then copy paste it as text to mail.. in that format itself ?
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
cming has quit [Ping timeout: 256 seconds]
nari has quit [Ping timeout: 260 seconds]
<Tasser> bnagy, huh?
<Tasser> vectorshelve, you could just use emacs org-mode for plaintext tables ;-)
kelsey has quit [Read error: Connection reset by peer]
<vectorshelve> Tasser: :-/ exmaple
<bnagy> Tasser: String.new "foo" is legal, Array.new "foo" isn't
workmad3 has quit [Quit: Lost terminal]
<Tasser> bnagy, huh
<Tasser> vectorshelve, google yourself n stuff
<banisterfiend> vectorshelve: you are a potato-head
<bnagy> Tasser: you said at least do Array.new(*args) in my thing where I clobbered String.new, but it didn't work, which was why I used the version I did
pjn_oz has quit [Read error: Connection reset by peer]
<bnagy> Tasser: I don't know if I can explain any more verbosely, so if this answer remains unsatisfactory I feel we have come to an impasse, so please refrain from saying 'huh' again
<banisterfiend> hehe
jbw has joined #ruby
dekroning has joined #ruby
schovi has quit [Remote host closed the connection]
Kartagis has joined #ruby
schovi has joined #ruby
<banisterfiend> vectorshelve: what's your name on twitter?
<Tasser> bnagy, formulate it like a sir :-)
<vectorshelve> banisterfiend: potato -head lol
<banisterfiend> vectorshelve: is this you @Nirjhor ?
<vectorshelve> banisterfiend: no who is that ? :-/
<banisterfiend> vectorshelve: no idea
<vectorshelve> banisterfiend: yuck lol
<vectorshelve> banisterfiend: this looks more like mine... follow me here -> https://twitter.com/#!/mithun_tweets
lxsameer has quit [Quit: Leaving]
<banisterfiend> vectorshelve: oh ok
alem0lars has quit [Quit: quit]
<vectorshelve> banisterfiend: what's ur take ?
Sulaiman has quit [Ping timeout: 244 seconds]
<dekroning> when I have a class which doesn't actually contain any logic, just data structure, what is a clean way of creating this datastrcuture ? just leave it a Struct or create a class which inherits from that Struct? e.g. class Foo < Struct.new(:bar); end
<bnagy> if it doesn't have any logic, why is it a class, for a start?
<dekroning> bnagy: I was thinking (perhaps wrongly) that it's good practise to encapsulate them in some kind of Domain Object?
<bnagy> I have no idea what you mean by Domain Object, but the caps are scary :) If it's just chunks of data maybe a module would be better
<dekroning> bnagy: some extar background, I want to create a Person class which has an address (Address class)
<bnagy> classes are usually for making instances of
<Tasser> dekroning, you can either use a struct or a hash... a struct is more like a hash that's casted
<bnagy> ok it sounds like you want class Person blah blah @address= # something here
<Tasser> you can use a hash as dictionary or as struct - if the keys are given symbols, it's a struct semantically, so you could replace it with a struct and it would still be the same
<bnagy> in which case, either an instance of Hash or an instance of OpenStruct, like Tasser is explaining
dhruvasagar has joined #ruby
<bnagy> you could have class Address < OpenStruct or class Address < DelegateClass(OpenStruct) but I wouldn't, personally
workmad3 has joined #ruby
<bnagy> seems to be over complicating stuff
<Tasser> depends, if you cast it to a Struct, you kind of get a typing
<dekroning> for example to reuse the address struct/class, e.g. now i'm starting with a Person who has indeed a association with an Address, but later for example I would also like to have an Company with same Address association
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<Tasser> dekroning, you want to persist that some time soon?
<bnagy> you're not reusing the class you're reusing the instance, and it doesn't really matter what class it is
<dekroning> yeah, I was trying to get to that point later indeed :-)
<bnagy> but this sounds like it is heading towards webcrap
<Tasser> dekroning, AR, datamapper or sequel
<dekroning> bnagy: well, indeed i'm heading towards webcrap, but i'm trying to find a way to write my nieuwe application, without "webcrap dependency" :-)
nari__ has joined #ruby
fermion has joined #ruby
<dekroning> Tasser: yeah , well I would like to somehow later make an PersistanceAddress class, which would be derived from indeed some ORM like ActiveRecord::Base
<dekroning> s/stance/stant/
nari_ has quit [Ping timeout: 265 seconds]
<deryl> err? AR is webcrap?
<deryl> thats just database interfacing
lupine_85 has quit [Quit: If you see this, my dogfood was poisoned]
<dekroning> deryl: I tried speaking in the bnagy language ;-)
r4um has quit [Quit: leaving]
wallerdev has quit [Quit: wallerdev]
ramblex has joined #ruby
<banisterfiend> Tasser: thanks for the follow on twitter, what cuased you to follow jsut now?
<Tasser> banisterfiend, procrastrination
<banisterfiend> Tasser: haha
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
eurek has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
<shevy> hmmm
<shevy> has matz abandoned MRI?
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<deryl> hardly
test34 has quit [Ping timeout: 256 seconds]
nu7hatch has quit [Ping timeout: 252 seconds]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
test34- has quit [Ping timeout: 248 seconds]
lupine_85 has joined #ruby
Beoran__ has quit [Ping timeout: 245 seconds]
flype has joined #ruby
Solnse has quit [Read error: No route to host]
Eiam has quit [Ping timeout: 244 seconds]
cming_ has quit [Quit: cming_]
fr0gprince_mac has joined #ruby
nari_ has joined #ruby
Telgalizer has quit [Remote host closed the connection]
<vectorshelve> banisterfiend: and Tasser : follow me on twiitter buddy :)
ronniy has joined #ruby
Kartagis has quit [Remote host closed the connection]
cming has joined #ruby
snapcase has quit [Quit: Reconnecting]
snapcase has joined #ruby
cming has quit [Client Quit]
nari__ has quit [Ping timeout: 252 seconds]
Bartholomeae has joined #ruby
test34- has joined #ruby
Kartagis has joined #ruby
fr0gprince_ has quit [Ping timeout: 248 seconds]
test34 has quit [Ping timeout: 248 seconds]
deryl has quit [Quit: back in awhile. reboot time]
Beoran__ has joined #ruby
joshman_ has joined #ruby
etehtsea has quit [Ping timeout: 248 seconds]
arturaz has joined #ruby
liluo has quit [Remote host closed the connection]
tomb_ has joined #ruby
cousine has joined #ruby
<vectorshelve> i have a string and I need to get the count of all numbers alphabets and special characters in it
nirakara has joined #ruby
<banisterfiend> vectorshelve: string.split.count { |v| is_your_special_char?(v) }
<banisterfiend> vectorshelve: string.chars.count is better
<vectorshelve> banisterfiend: I was thinking of building a gem that would take in a string and get the count of all that.. is it worth a gem really or too low ?
nari_ has quit [Ping timeout: 244 seconds]
<banisterfiend> vectorshelve: not worth a gem IMO
<vectorshelve> banisterfiend: what is IMO ?
<banisterfiend> in my opinion
<banisterfiend> vectorshelve: if the size of the gemspec > the size of the code in the gem, probably not worth a gem ;)
fr0gprince_ has joined #ruby
<vectorshelve> banisterfiend: I am really interesting in making a gem of my own.. any suggestions please.. something that can reallly useful to ppl :)
Bartholomeae has quit [Ping timeout: 250 seconds]
<shevy> vectorshelve just make a tiny test gem
nari_ has joined #ruby
<vectorshelve> shevy: test gem ? for what
<shevy> vectorshelve it is however too easy a task. it is just one method that solves the problem you described
<shevy> well, we assume here that you wanna make a .gem because others find it useful
<shevy> but a one-method gem is usually not so useful
<vectorshelve> shevy: I need to give something back to ruby.. and a gem of my own.. wooooh will make me really feel good.. and I need that to be something useful
<banisterfiend> vectorshelve: yes i have an idea for a gem, but can you program C?
<shevy> yes but it's not a lot of work what you describe vectorshelve ;)
<vectorshelve> shevy: the above example right.. yeah I need u guys suggestion.. I can do it this weekend
<vectorshelve> banisterfiend: can try.. tell me what is it ?
deryl has joined #ruby
<shevy> vectorshelve right but you also say you wanna have it useful for others
<vectorshelve> shevy: yeah.. that is important.. that would highlight my resume with something.. and I had be really happy if my gem help ppl do less coding :) just like how u help me out here.. I also wish to help others.. ;)
<shevy> the best way that works is by finding something that is useful to you, over a longer period of time
<shevy> and to release that as a gem
<shevy> ok now it is about a resume suddenly? :P
<vectorshelve> shevy: like what.. that is what isnt striking my head :P
akem has quit [Read error: Connection reset by peer]
<vectorshelve> shevy: not really.. I genuinely wanna contribute to open source..
yonggu_ has quit [Remote host closed the connection]
<shevy> I dunno, I have way too MUCH to pick on what is useful to me
<vectorshelve> shevy: resume will be just 15% of the reason..
akem has joined #ruby
yonggu has joined #ruby
<shevy> I started writing todo files
<banisterfiend> vectorshelve: convert this to a C ext http://www.zenspider.com/projects/event_hook.html
<shevy> and from those ideas stored there, projects get auto spawned
<vectorshelve> shevy: have u created gems ?
<shevy> yeah but only small gems, I have not found out how to bundle yaml config files with gem yet :(
PaciFisT1 has joined #ruby
ZachBeta has joined #ruby
PaciFisT has quit [Read error: No route to host]
ipoval has joined #ruby
<vectorshelve> banisterfiend: ok what is it and what do I have to do.. just in brief can u explain ?
<shevy> vectorshelve eww that page recommends bundler
<bnagy> also rails
<shevy> :(
<vectorshelve> shevy: yeah,... why cant u use bundler ? or gemfile ?
<bnagy> and 'what's new' from april 2008 is probably...not
<vectorshelve> shevy: what did banisterfiend wanted me to do with that link ? as far making a gem is concerned ?
<shevy> I can use it, although bundler has not worked for me at all. my question is, why would I need to use bundler at all vectorshelve?
<shevy> vectorshelve, no idea. ask him not me ;)
davidcelis has quit [Read error: Connection reset by peer]
bosphorus has joined #ruby
<vectorshelve> shevy: he isnt replying banisterfiend wake up buddy
<vectorshelve> shevy: I still feel it's somewhere round the corner.. a simple gem that can be of real use... but somehow it's nt striking me :(
change has joined #ruby
change is now known as uolala
osdkadosadada has joined #ruby
<shevy> my first gem was just a small module that bundled together the ansi escape colours
osdkadosadada has quit [Client Quit]
uolala has quit []
<bnagy> vectorshelve: you might want to learn to code before you start writing gems
<vectorshelve> bnagy: very funny :P
<vectorshelve> shevy: I thought of creating gem to encrypt and decrypt gem.. but they are already there... :-/
<bnagy> it wasn't supposed to be a joke
<bnagy> get 3-4 000 lines of code under your belt, and then see
<hoelzro> here's the start of my first gem: https://github.com/hoelzro/ruby-keepass
<bnagy> go through euler, or koans, or write an irc bot or whatever the kids do
davidcelis has joined #ruby
ken_barber has joined #ruby
<vectorshelve> bnagy: hmmm... I will write a bot and put it in github :)
<shevy> vectorshelve many gems will be there already
<shevy> 70% will be crap
<vectorshelve> shevy: yeah.. I will need to publicise my gem well on social media :D
<bnagy> vectorshelve: go through this http://puzzlenode.com/ in ruby
<shevy> 5% good
<shevy> but often enough, what is there does not fit a specific use case
<bnagy> that's a really nic site
<shevy> I really wanted nothing else than a module with the ansi colour escape codes available. most ansi colour gems, add up fancy methods... things like "foo".red.bold
<deryl> !iwanttolearnruby
<deryl> oh snap wrong channel hehe
<shevy> pr0n!
<vectorshelve> bnagy: thanks man will look into it
<vectorshelve> shevy: right
<hoelzro> shevy: I wrote something like that for Lua
<shevy> pr0n?
<shevy> hmm
<shevy> how do you do "gems" in lua? do you also define one file?
SPYGAME has quit [Ping timeout: 252 seconds]
<hoelzro> in Lua they're called "rocks"
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
noganex has quit [Ping timeout: 260 seconds]
SPYGAME has joined #ruby
dekroning has quit [Quit: leaving]
<bnagy> vectorshelve: not trying to be particularly mean, but I would go through the first 20 or so project euler problems, or something simpl before you start puzzlenode
ZachBeta has quit [Quit: Computer has gone to sleep.]
<vectorshelve> bnagy: Hmm...
test34- has quit [Ping timeout: 244 seconds]
<bnagy> some of them are really quite difficult
cordoval has left #ruby [#ruby]
noganex has joined #ruby
<bnagy> only 3-4 are 'easy'
<deryl> yeah they are
<deryl> i've tried a few.
<deryl> keyword there.. tried
<bnagy> the tough ones are 3rd year compsci degree level
<bnagy> I would love to mess with some in ruby, I was using Ada and C when I did stuff like that :<
<vectorshelve> bnagy: shevy guys this http://puzzlenode.com/puzzles/12-secret-messages problem gave me an idea... gem to encrypt messages (strings) using monoalphabetic substitutions and even user can select the count by which each alphabet should be replaced by the other
<bnagy> sadly I have enough tricky problems so solve for my actual job
bauuuuuud has joined #ruby
<shevy> I dunno
<bnagy> vectorshelve: why would that be a gem?
<shevy> I never had to encrypt anything so far
iocor has quit [Quit: Computer has gone to sleep.]
<shevy> vectorshelve, as I wrote above. find something that you *need*
<bnagy> nobody will ever want to use it, it's toy encryption
<bnagy> I mean go ahead and do it for fun, but...
bauuuuuud has quit [Client Quit]
gyre007 has joined #ruby
<bnagy> although that puzzle (breaking that kind of cipher) is much more challenging and interesting than ciphering with it
<vectorshelve> bnagy: ok... :'( so anything useful... let my mind think abt something
<bnagy> write some code first, forget gems
akem has quit [Ping timeout: 252 seconds]
akem has joined #ruby
<bnagy> there are already plenty of useless gems written by people who code with their feet
<bnagy> we don't need more
dhruvasagar has quit [Ping timeout: 246 seconds]
* deryl codes up a foot-hackery gem!
<bnagy> if you get to the point where you think you have some skills, go look at issues in gems you like, fork, fix, send pull requests to the maintainer
<bnagy> at least that's genuinely useful
dhruvasagar has joined #ruby
<bnagy> plus fixing problems and working in an SCM model is a useful skill
nu7hatch has joined #ruby
<vectorshelve> bnagy: SCM model ?
<deryl> source code management
<vectorshelve> deryl: to name a few projects under SCM model ? bnagy
<deryl> ummm
<deryl> really?
<bnagy> github is a big, public SCM
jcromartie has joined #ruby
<deryl> ruby, rails, git, linux kernel, jsut about every gem going.. etc
zeromodu_ is now known as zeromodulus
<deryl> actually its a SCR
<deryl> Sour
jcromartie has quit [Client Quit]
ZachBeta has joined #ruby
<vectorshelve> bnagy: ok
* deryl blinks
<bnagy> vectorshelve: for now, do puzzles, do exercises, write toy code
<vectorshelve> bnagy: ok.. and I will push everything to github too.. that will be nice right ?
<deryl> actually it'd actually be called a Source Code Repository Management Site wou;dn't it? (think thats the official term for what GH actually does)
<bnagy> unless you've got a lot of previous programming experience or you are Knuth you're not going to be producing code that's useful to anyone else for a few months to a year
<hoelzro> vectorshelve: I wouldn't push *everything* to GH
<deryl> SCRMS or SCRM
<bnagy> using github for your own stuff is fine, it's good practice
<deryl> hoelzro, hehe I do. good or bad. there and bitbucket :)
<vectorshelve> ok
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
* hoelzro shrugs
<hoelzro> it's up to your personal preference I guess =)
<deryl> hoelzro, i came late to the programming game. i was also a lemming when i did. so all my crap went on gh. :shrug:
gtuckerkellogg has joined #ruby
<bnagy> yeah I came too early for all that stuff (this never happens to me I swear) ;)
<hoelzro> I started when I was 17; I consider that quite late =)
<bnagy> didn't get around to learning svn until late 90s
<bnagy> hahah I started long before then, but BASIC doesn't count, and it actually makes you stupider :)
<deryl> hoelzro, i'm 41. i started coding about 3y ago. I mean i've done coding before that but only one thing that was substantial (in C), everything else was all personal crap that nhever left my network
<bnagy> wooo I'm not the oldest one!
<shevy> cool
<shevy> 3 years ago
<deryl> bnagy, naaa. my first programming language ever was BASIC and that was WAY WAY back in the day for me. took an NRI (National Radio Institute) course in it when I was like 21-22. something like that
<shevy> when I look back, that I started ruby 7 years ago, I feel old and lazy
kvirani has joined #ruby
<shevy> I think in 8 more years I will be too lazy to write any code
<bnagy> yay same time as me
<deryl> home based course. I promptly forgot everything after i passed the course. I needed it for a couple Army credits in order to increase my education scores for promotion points :)
<bnagy> are names are also .{4,}y which makes us TWINS
<bnagy> deryl: probably for the best. BASIC really is a turd of a language
<deryl> hehe
<bnagy> at least asm is cumbersome and painful but useful
<deryl> i tried to learn asm.. not my cup o' tea
AxonetBE has joined #ruby
<workmad3> asm can be fun
<workmad3> optimising it can also be fun
<bnagy> x86 asm is a pigdog
<workmad3> not something I'd want to ever do commercially though
<workmad3> I've only ever really dealt with ARM asm
<deryl> btw, is there a currently active smalltalk still in service?
<bnagy> imho you want to learn on a nice simple fake assembler
<AxonetBE> Some people have here performance problems with ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) ?
Sulaiman has joined #ruby
<workmad3> bnagy: MIX? :)
<bnagy> then the next year you can write the VM for the assembler that you learned :)
<deryl> i keep hearing craploads about smalltalk, but always referenced as if its dead
<bnagy> it's old
<workmad3> deryl: there's still smalltalk development, but it's quite a small group
<bnagy> and it lives on in lots of neckbeard hearts
<deryl> there's like 3 or 4 people in (i forget which) here or #ruby-lang that seem to still code in it but even they seem to talk about it like its a bygone era language
<bnagy> AxonetBE: depends what you mean by problems, but MRI 1.8.7 is the slowest available ruby interpreter by quite a lot
mdw has quit [Remote host closed the connection]
<workmad3> bnagy: unless all you need from the interpreter is to require a crapload of files :)
<deryl> but from what i've gathered it seemed to have a large impact on ruby itself
<workmad3> deryl: yeah, ruby's object model is closer to smalltalk than java
<deryl> think i remember reading a translation from matz about the impact it made
<bnagy> Ruby - cursed by Perl, blessed by Smalltalk
<deryl> ok, cool so i'm not crazy. well, i am, just not on this :)
<workmad3> ruby is sort of like the union of perl and smalltalk :)
<AxonetBE> bnagy: Since we rebooted server, we have a high load on CPU and Memory, the ruby version was updated to 2012.2 and the app is still the same.
<deryl> i wouldn't say that. perl is nowhere near as nice as ruby
<deryl> not even close
<workmad3> deryl: philosophy wise though, there's a lot of perl influence
<bnagy> AxonetBE: I dunno what 'the app' is. If it's rails then try that channel, they know a lot more about troubleshooting
<AxonetBE> bnagy: thanks :) It is indeed rails
carloslopes has joined #ruby
<deryl> and perl coders seem to take OBSCENE joy in being as freakin terse as they can and extreme beyond measure in how dense they can code their stuff
<bnagy> #rubyonrails
<workmad3> deryl: with things like 'there's more than one way to do things' and the ability to do short, concise programs :)
<deryl> ahh ok
<hoelzro> deryl: not every Perl coder =)
<bnagy> "perl is the only language that looks the same before and after RSA encryption"
<workmad3> deryl: ruby does reject the perl maxim of 'not everything is an object' though :)
<deryl> hoelzro, i like expressive, ability to code pretty close to as if i was talking in english, and have stuff work. perl coders i've talked to (and the one's in person couple it with the actual looks) look at my like i have 5 heads or something
<deryl> workmad3, i like the idea of everything ebing an object.
<deryl> err being. not sure on all levels, why. but instinctively that sits 'well' with me. (not sure if thats good or bad,k haven't been coding long enough to be sure)
<workmad3> sure, and I do too, when I'm doing OO coding :)
<hoelzro> deryl: I'm not saying there aren't perl coders that strive for brevity, but I would say that most of the community these days rejects that notion
gyre007 has quit [Quit: Ex-Chat]
<workmad3> that particular perl maxim is the perl community pushing back against the pervasive 'everything must be an object because objects are all-powerful goodness, even when using them in atrocious ways for problems that are not nicely solved with OO techniques' :)
<workmad3> you don't need a heavy object system to do what perl was originally developed for, which was short and sweet text processing scripts
<deryl> i *think* i understand that comment but not entirely sure
<deryl> rigfht
<deryl> like php was iirc
<workmad3> nah, php was a set of tools for doing simple webpages
<daed> php is the bane of my existence
<workmad3> php - personal home page
<deryl> wasn't that the original intent of php? a better perl but oriented towards trhe web?
<workmad3> ah, that was after perl had already migrated from its original purpose and was pervasive in the cgi web script arena :)
AxonetBE has left #ruby [#ruby]
<deryl> ahh
<deryl> timing then
amalvagomes has joined #ruby
<workmad3> (although processing HTTP requests could be seen as text processing... and perl does work well there, as long as you don't go too extreme)
ZachBeta has quit [Quit: Computer has gone to sleep.]
<workmad3> it's all about recognising the sweet spot... perl is very good for doing short, throwaway scripts for file-processing for example
<workmad3> but then, so is a bash script using sed and awk...
<deryl> i imagine there's a few in here snickering at reading my comments, hopefully my lack of experience isn't too far off the map in formulating my ideas on things.
<bnagy> right, pool. beer.
[Neurotic] has quit [Quit: Leaving]
<workmad3> I'd still reach for ruby for doing file processing though, because I can write it quicker in ruby than I can in perl or bash, because I'd spend so long looking things up :)
ZachBeta has joined #ruby
<deryl> well i live shell scripting. i mean the simplicity of a single prog to do a single job, using a pretty simplistic semantic for pushing data between the apps, with some fairly basic logic is rather appealing
<workmad3> but a couple of years ago, I'd have gone for perl, because I knew it better (Symbian OS toolchain was written in perl... great fun)
<deryl> s/live/love/
<deryl> and you don't even have to be all that freakin great at it either.
<deryl> and be able to do some more than fairly advanced stuff
<deryl> i think there's a far greater learning curve with ruby than there is with bash/shells
<workmad3> there is
<workmad3> but it's less noisy...
<deryl> how do you mean?
<workmad3> the syntax of bash scripting, with lots of case matched with esac, and $ for variables gets noisy
<workmad3> ruby has less noise
<deryl> ahh
<deryl> yeah thats true
<workmad3> some people can get very hung up on the noise
flip_digits has joined #ruby
<workmad3> the same is true with perl... perl syntax is in many ways really simple... but it's got a lot of noise :)
<deryl> no. doubt. :-)
<workmad3> although even perl pales in comparison with the noise you can introduce with C and the C preprocessor :D
ddv has joined #ruby
<deryl> woot! dragon getting close to docking with iss
<deryl> hah!
<workmad3> if you want some fun, have a look at the international obfuscated C coding competition entries at some point :D
<deryl> i like C. what i hate is the pointer math. i always fuck that up.
<deryl> no thanks. one of the things i love about ruby is it lets me be expressive. doesn't get in my way like that
Progster has joined #ruby
fr0gprince_mac has quit [Quit: Leaving...]
<deryl> i don't wana deal with obfuscation thank very much
<workmad3> I particularly like the self-referencing entries you get at times... a program formatted to look like the mandlebrot set that prints out the mandlebrot set
<workmad3> or the maze solver that can take its own source code as a maze to solve...
BiHi_ has joined #ruby
<workmad3> oh,
<workmad3> I wouldn't suggest trying to understand them... but they are awesome bits of coding :D
<workmad3> same with perl haiku
<banisterfiend> workmad3: i liked the 3d flight simulator in the shape of a plane
<workmad3> banisterfiend: :D
<banisterfiend> the C code in the shape of a plane*
<workmad3> banisterfiend: there was one at one point that was in the shape of a train
Husel has joined #ruby
<deryl> heheh the human brain.. amazing little engine ;)
<workmad3> banisterfiend: and its entire purpose was to print out 'choo choo' :D
<deryl> imaginative
<banisterfiend> cute
<deryl> bbiam
<workmad3> shows the range of things that happens in the IOCCC though... simple things to print out a single like but massively obfuscated, up to 3d flight simulators and operating systems
<workmad3> and all of them actually aimed at making the most obtuse, hard to understand programs imaginable
BiHi has quit [Ping timeout: 260 seconds]
<workmad3> and most entries stand as paragons of how to not actually write C programs :)
<deryl> you knowi'm sitting here thinking its hard to believ eits been 3y since i picked up programming. i *still* feel likie a freakin idiot most of the time with code.
<workmad3> hey, don't think like that
<workmad3> my first 3 years of coding were things like copying BASIC adventure game transcripts out of books and doing lottery number generators
seanstickle has joined #ruby
fbernier has joined #ruby
<deryl> i got into it so i had something to do at home since i don't work a regular job since gtting out the service (injuries as you now) so i do spend a lot of time readin and trying stuff, but it *still* feels like i dont know a damned thing]
<workmad3> or playing around with visual basic (again with transcripts and stuff from books :) )
<deryl> yeah 90% of what i know comes from books
ZachBeta has quit [Quit: Computer has gone to sleep.]
<deryl> that twgr really makes a lot of sense of stuff for me though
<workmad3> you've done more in your first 3 years of coding than I did... hell, you've done more in your first 3 years than I did in my first 12 years :)
<deryl> though i forget a lot of it hehe
<deryl> ehh i wouldn't call rvm-test *that* big a deal. that and taking over libpam-pgsql are really all i've done thats of any 'consequence'
<seanstickle> The nice thing about programming is that the best teacher is the computer.
<seanstickle> Which you need to use anyways. :0
<deryl> i mean i haven't written a real program like a rails app and stuff
tatsuya__ has joined #ruby
tatsuya_o has quit [Ping timeout: 260 seconds]
<workmad3> seanstickle: yeah, I know that now... unfortunately, I kept on thinking things like 'no, it must be more complicated, I'll put X or Y off till I know more' and wasted a lot of time
<workmad3> (the time wasted being me from the age of 6 to 18)
<deryl> seanstickle, yeah. i love that i can do crap on the computer and screw up stuff left and right and its all digital. i can just start all over from scratch :)
<seanstickle> deryl: and the computer even says "nope, that's wrong"
<seanstickle> :D
<deryl> yep
<seanstickle> And never gets tired of telling me.
<deryl> leaves me sometimes going HOW the hell is it wrong damn it!
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<deryl> then its not so 'friend;y' hehe
<deryl> er friendly
<seanstickle> Well, true.
test34 has quit [Ping timeout: 256 seconds]
<JonnieCache> compiler/interpreter error messages are hard
<workmad3> deryl: just be glad you're not dealing with a C++ template compiler error ;)
<JonnieCache> one of the hardest thingd about writing a compiler is good errors
<workmad3> JonnieCache: one of the hardest things about anything is good diagnostics
<seanstickle> clang forevers!
<JonnieCache> true
<deryl> what i have found so amazing though with computers is, i've done CRAPLOADS of stuff, *really* advanced stuff with no programming experience. piranha setups, ldirectord, built my own distro (though i used templated setups for a lot of that), i can do just about any damned thing i want for server setups and stuff. i've set up clusters etc.
<deryl> but man, i do i have to admit for as dumb as i feel since picking up coding, i wojuldn't give it up for anything.
<deryl> its friggin addictive!
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<workmad3> deryl: heh :) I feel the same when I have to do sysadmin stuff
<workmad3> I feel like I'm paddling in a big ocean and at any point I'm going to trip and drown
dv310p3r has joined #ruby
`brendan has joined #ruby
<workmad3> while coding... I can do that practically in my sleep nowadays (I think I may actually have done it in my sleep a few times... stupid dreams :P )
<deryl> yeah see that stuff i absolutely love. admin stuff is right up my alley. i figure if i can put a few more years into learning coding, even at my age, i will be able to do some 8really* cool stuff that will make admin stuff look small time :)
Husel has quit [Quit: Page closed]
<deryl> its just i want it NOW damn it! i want the knowledge now now now! hehe
<workmad3> :)
blacktulip has quit [Remote host closed the connection]
hynkle has joined #ruby
sterNiX has joined #ruby
<deryl> brain is just awash in ideas. sickening at times when you want to do something but just odn't have the skill yet to do it.
<deryl> i was never a patient man hehe
sterNiX is now known as Guest32002
<seanstickle> Impatience is a Perl programmer virtue. :)
geekbri has joined #ruby
<workmad3> seanstickle: yeah... so impatient, they just open an editor and hit keys at random, then slowly refine the mess towards the program they actually wanted :)
lxsameer has joined #ruby
<deryl> my hard drive is just *littered* with half done programs, partial ideas i just couldn't get working yet. but, in a way thats good. i get to look back and sort of see an evolution of sorts.
lxsameer has quit [Changing host]
lxsameer has joined #ruby
sohocoke has joined #ruby
<workmad3> deryl: yeah, I have that too... or did have (I think those hard drives are now dead)
sirdeiu has quit [Ping timeout: 244 seconds]
<seanstickle> workmad3: aw, don't be that way
<workmad3> deryl: most of my projects were things like game engines and 3d graphics and physics stuff, where the problems I had weren't in coding but in design and maths
<shevy> deryl I have that too, but usually it tends to evolve on its own - when I find it useful, when I use it a lot, it gets improved upon and better. whereas those files, that I rarely use, slowly decay and die away until I finally remove them (because they are not useful enough to have a reason to exist)
<deryl> wookiehangover, whats keeping me from really going balls to the wall with testrunner is really just fear. fear that i'll put it out there, get laughed at and that.. that i think would drive me away from doing anything public at all
<shevy> I find organizing things properly difficult :(
<deryl> shevy, me too.
ipoval has quit [Quit: ipoval]
Guest32002 is now known as sterNiX
sterNiX has quit [Changing host]
sterNiX has joined #ruby
KL-7 has quit [Quit: Leaving]
<deryl> err workmad3 that was for you not wookiehangover
<deryl> bad nick complete
<shevy> cool nick
<deryl> yeah :)
<workmad3> deryl: yeah, fear is annoying... I started just throwing stuff on github :) half my projects on there are half-completed piles of crap
<shevy> I would have never realized we had a wookiehangover here haha
<workmad3> or things that I created the project for and then never touched again :)
<deryl> workmad3, exactly like mine :)
<workmad3> the other half is stuff I've forked :P
<deryl> i deleted about 20 projects off there, things i know i'll never do
<deryl> but of all my projects on there, rvm-test (now testrunner) is the one i keep coming back to. its the one that keeps me up at night thinking on wtf i really want to do.
thecreators has joined #ruby
<deryl> maybe its a sign. just frigign do it already or somethin
nirakara has quit [Quit: This computer has gone to sleep]
<workmad3> yeah, I have some projects like that
<workmad3> things that I know I need to do, but have ended up spending so long thinking about them that I'm stugk
<workmad3> *stuck
<deryl> *exactly*
<banisterfiend> deryl: do rubymotion stuff
<deryl> banisterfiend, i'm nto going to spend 150 bucks on something i might not even like. i'm shareware generation :)
<deryl> s/nto/not/
<deryl> especially since 150 clams aint cheap in my world
<banisterfiend> deryl: well it'll be $200 if you leave it much longer :)
<deryl> hehehe
<banisterfiend> $150 is just the special offer for the first few weeks
<shevy> I dont quite know why forking is done. it's just done to do a few changes and patches or? or is it a project takeover
<deryl> i know, doesn't change my point
amalvagomes has quit [Quit: amalvagomes]
<banisterfiend> shevy: usually just patches
<deryl> shevy, *I* fork for 1 of 2 reasons. 1) to make a change and pull req. or 2) so i hav a copy under my user on GH so i dont' forget it (locationj) or in case it goes byebye
<deryl> but thats just my own personal usage pattern of forking. right or wrong
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cha1tanya has joined #ruby
tatsuya__ has quit [Ping timeout: 246 seconds]
mohits has quit [Remote host closed the connection]
<deryl> oncve i read about _why and his trashing all his stuff and then disappearing, there are a few projects that i use or that i pick through for ideas that i'd be a bit miffed if they went bye bye all together, so a fork (sometimes just a pull down locally though but more often a fork) is usually what i do
nari__ has joined #ruby
tatsuya_o has joined #ruby
<deryl> hope the GH guys don';t get too bent out of shape over that hehe
<workmad3> shevy: I tend to fork to make a few patches. I'll then keep my fork around until patches are accepted so I can use it :)
<banisterfiend> shevy: have u learned git yet
<shevy> banisterfiend not really, my current workflow is at odds with it :(
iamjarvo has joined #ruby
<deryl> workmad3, yeah thats my gist gem fork. i'm thinking of taking that over or at least just using my own fork (if nothing else its a learning tool as the GH api changes and stuff)
<deryl> i think defunkt is way too busy or something to fix it up. there's quite a few of us waiting on pull reqs to get merged or a fix to come out. he used to be really responsive, so i'[m thinking its just that he's swamped with work or something.
nari_ has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
<deryl> so i figure if i fork, patch and make it work again it would also be pretty good education wise.
Morkel has quit [Quit: Morkel]
Alantas has joined #ruby
rippa has quit [Quit: derp herp]
berserkr has quit [Quit: Leaving.]
cha1tanya has quit [Ping timeout: 245 seconds]
crankycoder has joined #ruby
sirdeiu has joined #ruby
sbanwart has joined #ruby
fearoffish has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
alfakini has joined #ruby
<deryl> hrmm anyone else watching the nasatv and seeing it hang? (dragon to iss)
eurek has joined #ruby
choffstein has joined #ruby
dayanand_ has joined #ruby
nari_ has joined #ruby
asuka_ has quit [Read error: Connection reset by peer]
dayanand has quit [Ping timeout: 245 seconds]
asuka_ has joined #ruby
Poapfel has quit [Quit: reboot]
dv310p3r has quit [Ping timeout: 260 seconds]
nari__ has quit [Ping timeout: 248 seconds]
amalvagomes has joined #ruby
amalvagomes has quit [Read error: Connection reset by peer]
noodletraveler has quit [Quit: leaving]
codespectator has joined #ruby
asuka has joined #ruby
alfakini has quit [Quit: Leaving]
Poapfel has joined #ruby
rking_ is now known as rking
vectorshelve has quit [Quit: Page closed]
goodieboy has joined #ruby
<codespectator> Hey guys, I am not sure how to describe this problem but here is a pastie that hopefully illustrates it: http://pastie.org/3966031
asuka_ has quit [Ping timeout: 245 seconds]
nari__ has joined #ruby
<Alantas> Okay. What were you expecting to happen, that's different from what did happen?
<rking> codespectator: There's not enough info for me to know what's going on.
<rking> codespectator: .create is not something available by default, nor is SomeClass.first
wangr has joined #ruby
choffstein has quit [Remote host closed the connection]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<codespectator> rking, sorry I have updated the pastie, these classes actually extend mongoid documents
<rking> Aha, that helps.
<codespectator> but I don't believe this is a rails or mongoid problem it is more ruby problem
<rking> Oops, not quite.
<rking> codespectator: Let me know if you come up with a pastie that is runnable.
<rking> Part of asking for help is reducing the problem down to a minimal example. This saves time for the people helping you, and maybe 50% of the time you can come up with the answer by yourself through the process.
nari_ has quit [Ping timeout: 252 seconds]
indian has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
jrist-out is now known as jrist
tomzx has joined #ruby
<banisterfiend> rking: did u get a chance to read that post
<codespectator> rking: thanks for the advice, I have updated the pastie to a fuller example closer to what I am working with. This is as far as I can get and not sure I can take it much further
<codespectator> I may well be approaching this problem all wrong
<rking> banisterfiend: At only 50% depth. I still need to find a real chance to focus on it.
<banisterfiend> np
<banisterfiend> rking: can just skip to the conclusion anyway, which ahs the object diagram
<rking> banisterfiend: Well, part of what I want to get from it is a better understanding of the Ruby internals calls.
<rking> I kind of skim over them in general, so this doc gives me a chance to make sense of a few.
<banisterfiend> ok
<banisterfiend> rking: i wrote another series that might be more useful to u then
<banisterfiend> one sec
tatsuya__ has joined #ruby
sepp2k has quit [Remote host closed the connection]
fr0gprince_mac has joined #ruby
<rking> Ahh, cool. Yeah, I guess I'm going to start reading your blog.
tatsuya_o has quit [Ping timeout: 246 seconds]
zommi has quit [Remote host closed the connection]
<banisterfiend> rking: u should probably read this other blog first, one sec
deryl has quit [Quit: rebooting for newer kernel]
mvangala_ has joined #ruby
Nies has joined #ruby
cousine has quit [Remote host closed the connection]
dkannan has quit []
Vainoharhainen has quit [Ping timeout: 260 seconds]
RegEchse has joined #ruby
deryl has joined #ruby
flype has joined #ruby
chomp has joined #ruby
jaystay has joined #ruby
Seabass__ has quit [Quit: Leaving]
amalvagomes has joined #ruby
Vainoharhainen has joined #ruby
locriani has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
choffstein has joined #ruby
tatsuya_o has joined #ruby
mvangala_ has quit [Remote host closed the connection]
tatsuya__ has quit [Ping timeout: 245 seconds]
mvangala_ has joined #ruby
ElitestFX has joined #ruby
mdw has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
jgarvey has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
vmil86 has joined #ruby
foofoobar has joined #ruby
foofoobar has quit [Client Quit]
S2kx has joined #ruby
trivol has joined #ruby
trivol has quit [Client Quit]
fr0gprince_mac has quit [Ping timeout: 256 seconds]
S1kx has quit [Ping timeout: 244 seconds]
elux has joined #ruby
crankyco_ has joined #ruby
tomzx has quit [Ping timeout: 246 seconds]
dhaskew has joined #ruby
ken_barber1 has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
cantonic has joined #ruby
alfakini_ has joined #ruby
nari__ has quit [Ping timeout: 240 seconds]
erikstraub has joined #ruby
crankycoder has quit [Ping timeout: 260 seconds]
goodieboy has quit [Read error: Connection reset by peer]
goodieboy has joined #ruby
ken_barber has quit [Ping timeout: 245 seconds]
dkissell has quit [Read error: Connection reset by peer]
dkissell has joined #ruby
goodieboy has quit [Read error: Connection reset by peer]
goodieboy has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
KarlFreeman has joined #ruby
dv310p3r has joined #ruby
blast_hardcheese has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
linoj has joined #ruby
dhruvasagar has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
bluOxigen has joined #ruby
kvirani has quit [Remote host closed the connection]
uris has joined #ruby
baroquebobcat has joined #ruby
roflmaus has quit []
awarner has joined #ruby
linus95014 has joined #ruby
andrewhl has joined #ruby
test34- has quit [Ping timeout: 245 seconds]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
<KarlFreeman> It seems like RBAC is more prominent in libraries then DAC. Am I missing something by thinking that DAC makes more sense from an API's perspective ( eg the resources themselves knowing who can do what )
nari__ has joined #ruby
ilya has joined #ruby
zommi has joined #ruby
dhaskew has quit [Quit: dhaskew]
cpruitt has joined #ruby
itnomad has joined #ruby
dayanand_ has quit [Ping timeout: 244 seconds]
dv310p3r has quit [Quit: Leaving]
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
dayanand has joined #ruby
nari_ has joined #ruby
test34 has quit [Ping timeout: 248 seconds]
binaryplease has joined #ruby
Targen has joined #ruby
nari__ has quit [Ping timeout: 245 seconds]
bbttxu has joined #ruby
Jackneill has joined #ruby
rbanffy has joined #ruby
jaystay has quit [Quit: jaystay]
bbttxu has quit [Client Quit]
test34- has quit [Ping timeout: 265 seconds]
maesbn has quit [Remote host closed the connection]
jcromartie has joined #ruby
test34 has joined #ruby
bbttxu has joined #ruby
elhu has joined #ruby
jaystay has joined #ruby
Morkel has joined #ruby
<Synthead> so here's a question. is there a way I can do something like my_function.config 'this', 'that'; my_fuction_start ?
<Synthead> and have my_fuction hold some vars for the length of the script?
TheFuzzball has quit [Read error: Connection reset by peer]
iocor has joined #ruby
<Alantas> Not with a method as such, but you could do that with a class instance, or a module.
nari__ has joined #ruby
TheFuzzball has joined #ruby
adambeynon has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<Synthead> Alantas: ahhh, I'm reading through a classes tutorial right now. Looks excellent :) thanks!
gyre007 has joined #ruby
dhruvasagar has joined #ruby
nari_ has quit [Ping timeout: 265 seconds]
<dagobah> I'm looking for a ruby snippet that will prove that a block is _not_ an object.
<dagobah> I.E How can I call block.class to prove block is not an object?
<Hanmac> with mruby you could generate bytecode like in Java :P XD
asuka is now known as asuka_
Targen has quit [Ping timeout: 265 seconds]
<banisterfiend> dagobah: why do you want to prove that?
<Hanmac> dagobah: the block itself is not an object, but if you store it in a variable it turns into an proc wich is an object
td123 has joined #ruby
carlyle has joined #ruby
locriani has joined #ruby
LBRapid has joined #ruby
<dagobah> banisterfiend: Huge argument with colleague, just want a one liner that will prove that it's syntactic sugar passed to Proc.
nari_ has joined #ruby
C0deMaver1ck has joined #ruby
<banisterfiend> dagobah: let me show u a blog post
<banisterfiend> yehuda wrote on this topic
kvirani has joined #ruby
crankyco_ has quit [Remote host closed the connection]
<dagobah> Thanks banisterfiend
Morkel has quit [Quit: Morkel]
<banisterfiend> dagobah: as far as implementation is concerned, iirc, a block IS a proc
<dagobah> Really?
<banisterfiend> it's just an implicit proc that's stored in the 'block slot' of a stack frame
<banisterfiend> yes
<banisterfiend> it has type Proc and everything
<dagobah> I see.
crankycoder has joined #ruby
<dagobah> But it's not an "object"?
<banisterfiend> dagobah: but it's a semantic argument
<dagobah> Or it is and it's of type Proc?
test34 has quit [Ping timeout: 244 seconds]
<banisterfiend> dagobah: even if i told you that in implementation it is an object of type Proc, it wouldn't be determinative
<banisterfiend> because you could just write that off as implementation details
nari__ has quit [Ping timeout: 245 seconds]
<banisterfiend> dagobah: i would just suggest reading yehuda's blog post
<banisterfiend> i think he goes through all the arguments
test34 has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
<banisterfiend> and evan phoenix chimes in too
<banisterfiend> who actually implemented this stuff in rbx
albemuth has joined #ruby
gyre007 has quit [Quit: Ex-Chat]
ananthakumaran1 has quit [Quit: Leaving.]
<banisterfiend> dagobah: ah, yehuda has proof that it is a Proc, actually, as the object_id is the same
<banisterfiend> throughout &passing it on
<workmad3> ah, is a block a proc?
<workmad3> yehudas argument is that 'semantically, yes, but the VM may optimise things so that an actual proc object isn't created unless you request it'
<banisterfiend> dagobah: "You can tell that blocks are not being semantically wrapped and unwrapped because blocks passed along via & share the same object_id across methods."
beneggett has joined #ruby
<apeiros_> banisterfiend: huh? that's a new development, no?
niklasb has joined #ruby
<Hanmac> workmad3 no, only if its stored in a variable
<apeiros_> at least I'm pretty sure I tested that once, and it did not have the same id…
baroquebobcat has quit [Quit: baroquebobcat]
<workmad3> Hanmac: that's 'requesting' it ;)
gregorg_taf has joined #ruby
<workmad3> Hanmac: basically, it's a proc when you look... if you don't look, then it might not actually have a proc object
gregorg has quit [Read error: Connection reset by peer]
<banisterfiend> i really dont care either way, but
<banisterfiend> "These two mental models are perfectly valid (the first actually reflects Ruby’s internal implementation). I claim that those who want to use the first mental model have the heavy burden of introducing the new concept to the Ruby language of a non-object block, and that as a result, it should be generally rejected."
<workmad3> ^^
itnomad has quit [Read error: Connection reset by peer]
<workmad3> I agree with that one... it's simpler to think of it as a proc all the time
pdtpatrick has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
<banisterfiend> i just think of it as a proc inserted into the 'block slot' of the stack frame
itnomad has joined #ruby
<workmad3> heh :) you think more low-level than me
<Hanmac> workmad3 you mean its like a photon? if you look its a particle and if you dont look its a wave? XD
<workmad3> Hanmac: if you look, it's a particle, if you don't look, it doesn't matter :)
[edu] has joined #ruby
<shevy> we should call the property "behaves_like :particle and behaves_like :wave" as ... behaves_like :warticle
<shevy> a warticle!
<shevy> it is a warticle object
jobicoppola has quit [Ping timeout: 256 seconds]
<Hanmac> xD
<shevy> what I dont understand is
<shevy> how a single photon can be a wave
<workmad3> shevy: a single photon is both a wave and a particle
[edu] has quit [Client Quit]
aod has left #ruby [#ruby]
<workmad3> shevy: and you can basically treat it as either, depending on how your maths works best :)
KarlFreeman has left #ruby [#ruby]
<workmad3> shevy: how that's the case... I'm not sure anyone knows :)
<flip_digits> shevy and it depends on 'how' you are observing the photon
<Hanmac> http://www.youtube.com/watch?v=DfPeprQ7oGc << ... but i dont know if its true
<workmad3> double-slit experiment :D
<flip_digits> sorry for butting in
ten00 has joined #ruby
<flip_digits> yes workmad3 double-split!
<Hanmac> workmad3 click my video link
kenperkins has quit [Quit: Computer has gone to sleep.]
<workmad3> Hanmac: yeah, I did that at school :)
punkrawkR has joined #ruby
<shevy> I remember in high school, in higher math... I missed some lessons, then I no longer understood anything
<banisterfiend> workmad3: you studied physics?
<workmad3> banisterfiend: to A-level (UK system)
<banisterfiend> workmad3: ah ok
<Hanmac> workmad3 and in the next year you build an Startrek Enterprise ship :P
<workmad3> banisterfiend: and then recreationally since about 3rd year of uni :)
<banisterfiend> workmad3: and you did two-slit experiment in freaking highschool?
<workmad3> banisterfiend: we covered the double-slit, I think the teacher did the actual experiment in that case
<banisterfiend> ah ok
<workmad3> A-level covered intro quantum physics stuff :)
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
banisterfiend is now known as horseman
<horseman> workmad3: have you seen the girl the internet is crazy about atm?
ten00 has left #ruby [#ruby]
<workmad3> horseman: don't think so
<horseman> workmad3: http://i.imgur.com/Mv5cg.jpg
<workmad3> horseman: sfw?
<horseman> kind of
<horseman> no one is naked
joshman_ has joined #ruby
<workmad3> good enough
<workmad3> meh
Osaka is now known as musee
<horseman> i guess u had to be following the meme... :)
<shevy> horseman you are meme addicted!
<horseman> shevy: u r
benatwork has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
ghanima has joined #ruby
ilya has left #ruby ["Leaving"]
spuz has joined #ruby
<spuz> Hi, where can I find the documentation on the basic_auth method on the Net::HTTP::Get class?
<gift> I have an array of hashes, x = [ { :name => "a", :val => 1 }, { :name => "b", :val => 2 } ]. How can i reference one of those hashes by the :name key without specifying an array element number? for instance, i do not want to have to do "x[0][:name]"
Axsuul has quit [Ping timeout: 245 seconds]
<horseman> spuz: right here: "Set the Authorization: header for "Basic" authorization."
<spuz> horseman, IRC?
<Hanmac> gift x.find {|e| e[:name] == "a"}
<gift> Ah very good, thanks Hanmac
goodieboy has quit [Remote host closed the connection]
<shevy> spuz are you sure it is "Get"?
<shevy> I only seem to find documention for a .get method print Net::HTTP.get(URI('http://www.example.com/index.html'))
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dv310p3r has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<shevy> aha
<shevy> yeah just found it
<spuz> I'd like to know how I can find out what methods are on that class?
yankov has joined #ruby
<workmad3> spuz: HTTP::Get.methods
<spuz> I know basic_auth is one of them, I just can't see it in the docs
<spuz> workmad3, what is that?
<shevy> no real idea. I think there is someone on #ruby-lang who improves the official docu
<workmad3> spuz: a command to run in irb to get all the methods :)
Axsuul has joined #ruby
<spuz> workmad3, ok, so I shouldn't be looking online for documentation?
<shevy> hehe
<workmad3> or would it be Net::HTTP::Get.methods ?
TorpedoSkyline has joined #ruby
<shevy> spuz, it is a workaround, until that guy adds the docu ;P
<workmad3> spuz: you can look... but it might be quicker to play ;)
<spuz> shevy, so is the documentation missing?
bluOxigen has quit [Ping timeout: 252 seconds]
<shevy> spuz I think so for this part, probably. I think it is somehow autogenerated
perryh is now known as perryh_away
<horseman> spuz: i gave u the docs
<horseman> if by docs u mean the comments above the method
wiwillia has joined #ruby
<spuz> horseman, I didn't ask for the documentation I asked where to find it
<horseman> spuz: Set the Authorization: header for "Basic" authorization. <----------- that was all there was
<horseman> spuz: there's a million different ways to find documentation for a library
beneggett has quit [Quit: Computer has gone to sleep.]
<horseman> spuz: i'm not sure any particular one is canonical, unless the maintainer has created his own wiki or so
<spuz> how did you find it then?
<horseman> spuz: i used pry, of course
<spuz> pry ok
jcromartie has quit [Quit: jcromartie]
<shevy> heeh
awarner has quit [Remote host closed the connection]
<shevy> the simplest thing to assume is that someone didnt write docu :(
<horseman> cd Net/HTTP/Get
<horseman> ? basic_auth
<shevy> spuz, pry is cool
<shevy> horseman just showed what he did
markborcherding has joined #ruby
<shevy> in pry
* spuz installs pry
<spuz> hmm cannot resolve Net...
<spuz> well that's a problem
<horseman> spuz: require 'net/http'
<horseman> spuz: ok?
tomb_ has joined #ruby
<spuz> that's great
<spuz> thanks
<horseman> spuz: what could be more useful is typing: ? Net::HTTP
<horseman> try that
<spuz> ah ok
<horseman> that'll give u the full docs for that class
<horseman> and if u wanna see the source for that class, type: $ Net:HTTP
ddv has quit [Quit: *poof*]
Shahor has joined #ruby
beneggett has joined #ruby
<spuz> That is useful, for some reason it fails when doing $ Net::HTTP::Get though
<horseman> spuz: yeah, because Get doesn't have any of its own methods
nari__ has joined #ruby
<horseman> i should probably improve that error message
markborcherding has quit [Remote host closed the connection]
tomb_ has quit [Client Quit]
jchauncey has joined #ruby
<spuz> is it possible to see mixed in methods?
<horseman> spuz: yeah, just type ls -M Net::HTTP::Get
<horseman> spuz: then find the one u want, and type: $ Net::HTTP::Get#method_name
<horseman> though may be easier to first 'cd' into Get so u dont have to use the full class path eeach time
brngardner has joined #ruby
<horseman> if you first go: cd Net/HTTP/Get
<horseman> then u can just type: $ method_name
nari_ has quit [Ping timeout: 244 seconds]
<spuz> That works if I know the method name
nari__ has quit [Client Quit]
<spuz> what if I want to see a list of methods?
<horseman> spuz: i told you :) ls -M
cache_za has quit [Quit: Lost terminal]
<horseman> "-M" means 'instnace methods'
<horseman> it tells u where the instance methods come from, too
<spuz> awesome, thanks
<horseman> spuz: remember oyu can use ? to see docs, and $ to see source
<horseman> also type help to see a list of all pry commands
beneggett has quit [Remote host closed the connection]
<spuz> Yep I figured that
mikepack has joined #ruby
lorandi has joined #ruby
TheHunter_1039 has joined #ruby
horseman has quit [Read error: Connection reset by peer]
horseman has joined #ruby
berkes has quit [Ping timeout: 260 seconds]
eurek has joined #ruby
ben_alman has quit [Excess Flood]
billiamii| has joined #ruby
Natch| has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
Natch| has joined #ruby
nowthatsamatt has joined #ruby
ank has joined #ruby
uris has quit [Read error: Connection reset by peer]
uris has joined #ruby
robdodson has joined #ruby
nfk has quit [Ping timeout: 248 seconds]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
BeLucid_ has quit [Read error: Connection reset by peer]
ben_alman has joined #ruby
carloslopes has quit [Ping timeout: 240 seconds]
test34 has quit [Ping timeout: 260 seconds]
BeLucid has joined #ruby
dtang has joined #ruby
andrewhl has quit [Quit: andrewhl]
lorandi has quit [Ping timeout: 248 seconds]
tatsuya_o has quit [Ping timeout: 246 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
serroba has quit [Quit: This computer has gone to sleep]
krusty_ar has joined #ruby
jeebster has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
xiaotian has joined #ruby
tommyvyo has quit [Ping timeout: 244 seconds]
thomasfedb has quit [Ping timeout: 250 seconds]
kawa_xxx has quit [Remote host closed the connection]
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
Tick-Tock has quit [Ping timeout: 250 seconds]
krusty_ar_ has joined #ruby
linus95014 has quit [Quit: linus95014]
krusty_ar has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby
tommyvyo has joined #ruby
goodieboy has joined #ruby
maesbn has joined #ruby
ckrailo has joined #ruby
Targen has joined #ruby
fbernier has quit [Ping timeout: 246 seconds]
Neil___ has joined #ruby
tatsuya_o has joined #ruby
thomasfedb has joined #ruby
gilaniali has joined #ruby
<gilaniali> Hi. what would be the best way to change this while loop into an each loop? http://pastebin.com/cxhihf5H
test34 has joined #ruby
Tick-Tock has joined #ruby
rushed has quit [Quit: rushed]
<hoelzro> gilaniali: 0.upto(lines)?
dnyy has joined #ruby
pvh has quit [Quit: Connection closed for inactivity]
dekroning has joined #ruby
<dekroning> hi
pdtpatrick has joined #ruby
test34- has quit [Ping timeout: 265 seconds]
<lectrick> Can any greybeard explain this to me? https://gist.github.com/2788720
one8zero has joined #ruby
xrl has quit [Quit: Connection closed for inactivity]
kenperkins has joined #ruby
<gilaniali> hoelzro: so the each loop only works on arrays? can we use a for loop?
<hoelzro> lectrick: when you create a class definition, self is the class in question within its scope
<hoelzro> gilaniali: each works on Enumerables
<hoelzro> you could do ( 0 .. lines ).each
marcusalmeida__ has joined #ruby
<hoelzro> lectrick: so when you say '@foo' in a class definition, you're referring to an instance variable relative to the current self
<hoelzro> namely, AttributeHolder
theRoUS has joined #ruby
<hoelzro> (disclaimer: I am NOT a Ruby expert. just reading through "The Ruby Programming Language")
<marcusalmeida__> hi guy! what's the last patch for 1.9.3 ?
<gilaniali> hoelzro: ah. thanks. and just so I understand loops, how will this be done using a for loop? for i in range?
<lectrick> hoelzro: ok, but why can't I access it from a self method defined in an instance method?
<lectrick> hoelzro: no that's fine :)
<hoelzro> gilaniali: I've never used a for loop in Ruby
<hoelzro> lectrick: try @@what_is_this
<lectrick> don't use for loops in Ruby. They are there as training wheels until you grok enumerations.
<hoelzro> lectrick: because it's an instance variable on the class, not on objects of that class
<lectrick> hoelzro: I know I can use a class attribute generally speaking but I'm wondering what the difference between @@what_is_this and @what_is_this which is set inside the class definition, is
<gilaniali> hoelzro: lectrick: yeah thats what i though, it seems each/each do loops are more common in ruby code
<billiamii|> Re: enumerators: how can I iterate over a slice of an array, while maintaining the original indices?
<lectrick> hoelzro: if it's an instance variable of the class then calling "self" inside an instance method refers to the class, no?
<lectrick> hoelzro: oh wait.
<lectrick> hoelzro: ok it doesn't. it refers to the instance. but… hmmm hold on.
<hoelzro> billiamii|: you mean something like enum.each_in_slice do |index, element| ... end?
<gilaniali> hoelzro: thanks
gilaniali has left #ruby [#ruby]
<hoelzro> lectrick: there is no difference
dnyy has quit [Remote host closed the connection]
<lectrick> ok i get it.
<billiamii|> hoelzro, possibly. I'm not sure what I'd expect for a method like that
<shevy> billiamii| can you rephrase and provide an example input and example output
<hoelzro> @@foo is just shorthand for self.class.instance_variable.get(:foo)
<billiamii|> Sure, sec.
<hoelzro> @foo == self.instance_variable_get(:foo)
<hoelzro> er, :'@foo'
<shevy> whoa
<shevy> cool hoelzro
<hoelzro> sorry
<shevy> I never thought about that
marcusalmeida__ has left #ruby [#ruby]
<shevy> the self.class.instance_variable.get(:name_here)
amar_key has quit [Quit: Connection closed for inactivity]
<hoelzro> shevy: the perspective of the learner affords much =)
maesbn has quit [Remote host closed the connection]
goodieboy has quit [Read error: Connection reset by peer]
<shevy> ohhhh
Guest92259 is now known as sts
<shevy> now I understand why some people call these "class instance variable"
test34 has quit [Ping timeout: 240 seconds]
davidcelis has quit [Quit: K-Lined]
<asdfqwer> i'm stuck on a koan
<asdfqwer> about_hashes.rb
goodieboy has joined #ruby
<asdfqwer> 35
test34 has joined #ruby
<shevy> cool
<shevy> and what made you stuck precisely there
macmartine has joined #ruby
<asdfqwer> assert_raise()
<asdfqwer> line 26
dnyy has joined #ruby
<dekroning> when you have a Person object which also has an Address object, and the address object has street, city, etc. Is it then still concidered a train wreck to write: person.address.street ?
nu7hatch has quit [Ping timeout: 265 seconds]
<dekroning> or should I do somethinglike person.street_address instead ?
<shevy> dekroning well. I think it feels odd, because address suddenly is a method on the person
idoru has quit [Ping timeout: 600 seconds]
<shevy> how about...
<shevy> Address.find person
<shevy> or
<shevy> hmm
<shevy> indeed...
<shevy> Person.home :\
<dekroning> shevy: which would return Address object ?
<dekroning> of his home address ?
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<shevy> I guess so
<shevy> then you can ask the address object where it resides
<fgwaegeawgfwa> dekroning: the person.address.street isn't bad... if address is in person...
carloslopes has joined #ruby
<fgwaegeawgfwa> dekroning: but you sould probably create an additional object like... CustomerInformation or PersonInformation or whatever... which knows both the Person and the Address...
<dekroning> i'm wondering when i'm violating the "tell, don't ask" principle when doing something like a = person.address; a.street
<shevy> dekroning, that alone doesnt violate anything
<dekroning> fgwaegeawgfwa: ahh also intrestting point
<shevy> you just use an extra variable
<fgwaegeawgfwa> dekroning: You got to understand the rational that creates the principles... Sometimes it's a good idea to break them....
oooPaul has joined #ruby
<dekroning> fgwaegeawgfwa: :-)
<shevy> whether you do foo.bar.bla or x = foo.bar, then x.bla, really makes no diference
<dekroning> shevy: yeah that's true indeed
v0n has joined #ruby
<fgwaegeawgfwa> dekroning: what you should try to avoid, is creating restrictions where there isn't a real one in the Domain...
andrewhl has joined #ruby
test34 has quit [Ping timeout: 244 seconds]
<dekroning> fgwaegeawgfwa: could you elaborate more on that ?
<Tasser> fgwaegeawgfwa, you need a pacman to clean up after you.
joshman_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
joshman_ has joined #ruby
<fgwaegeawgfwa> dekroning: suppose you do person.home.telephoneNumber... then someone could tell you that it's a bad idea because you could some time after need to update your program, because a person may have a telephoneNumber without having a home...
<fgwaegeawgfwa> (That would be a homeless guy with a mobile phone xD) but anyways....
test34- has quit [Ping timeout: 256 seconds]
<billiamii|> shevy, example of the args and output: https://gist.github.com/2788808
<fgwaegeawgfwa> if you do person.telephoneNumber it works well, you can remove the home, or don't have one, and all is happy...
Sulaiman_ has joined #ruby
Sulaiman_ has quit [Client Quit]
<billiamii|> I only need to iterate over a portion of an array, and using .slice means my index starts over at zero. Make sense?
<fgwaegeawgfwa> if you do person.home.telephoneNumber... then you are "restricting" your model saying that... each home has a phone number, and a person must have a home to have a phone number... w
<fgwaegeawgfwa> which is not true...
<shevy> ok, so you specify a start position, and an extra argument to count
<lectrick> http://www.ideapaint.com/ IdeaPaint, Y U SO SPENSIVE?
blooberr has quit [Quit: Connection closed for inactivity]
bruder has joined #ruby
<shevy> billiamii| I am not sure there is something built in... there is .step but it kinda steps in regular intervals
<billiamii|> shevy, yes. Count or end position would work fine.
codebeaker has joined #ruby
<horseman> lectrick: what the hell, how does that work?
maesbn has joined #ruby
maesbn has quit [Remote host closed the connection]
test34 has joined #ruby
<shevy> billiamii| I think you may have to write your own method on Enumerator for that
<shevy> if you need it only once, you could always use .each_with_index and only allow output of the desired results
<billiamii|> Ok, as long as I'm not missing something obvious. Thanks.
adeponte has joined #ruby
<dekroning> fgwaegeawgfwa: for example i'm wondering if in the following cause, i'm making Parent also depandant on person having an address, and thus making it too smart: http://pastie.org/3966774
elhu has quit [Ping timeout: 265 seconds]
Sulaiman has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
djdb has quit [Remote host closed the connection]
<fgwaegeawgfwa> dekroning: the problem isn't only making it too smart... but that your program doesn't "agree" with reality... and that can bring you troubles, specially if your requirements isn't fixed...
<Synthead> is there a variable in ruby for the last returned value?
fbernier has joined #ruby
<fgwaegeawgfwa> dekroning: what problem are you trying to solve?
<dekroning> fgwaegeawgfwa: i'm making this "test" project, indeed to think as if the requirements could change
<Synthead> like if I say "false", can I call a variable to get "false"?
<hoelzro> Synthead: in a program, or in IRB/pry?
<dekroning> fgwaegeawgfwa: just trying to write well written code... wel well architected code :)
<erikstraub> dekroning: why couldn't parent be a subclass of person?
<jeebster> sythhead, write a method and return the value you desire
<jeebster> ruby implicitly returns the last statement in a method, either way
<dekroning> erikstraub: because then i'm really coupled to person class, which I don't want to
<fgwaegeawgfwa> <erikstraub> dekroning: why couldn't parent be a subclass of person? ---> because that doesn't agree with reality either...
<fgwaegeawgfwa> dekroning: what's your program about?
<erikstraub> fgwaegeawgfwa: why not?
artOfWar has joined #ruby
azm has quit [Ping timeout: 252 seconds]
<erikstraub> fgwaegeawgfwa: that's a better question
<dekroning> fgwaegeawgfwa: what exactly do you mean with "doesn't agree with reality" ... in the sence that my code doesn't reflect all the flexibility which the real world might need ?
<dekroning> fgwaegeawgfwa: well, what I wanted to "write" and "test" is how, I could make like a object (parent) which would by my "domain model" and have it depend on two entity models which could be out side of the domain model (like the abstract Address and Person objects), hope that make sense
<fgwaegeawgfwa> erikstraub: If parent is subclass of person then you are saying that there is a strict hard coded immutable relationship of "is" between parent and person...
<dekroning> erikstraub: like a "parent" could also be an Animale, write fgwaegeawgfwa ?
<dekroning> s/write/right/
<fgwaegeawgfwa> erikstraub: that has a lot of consequences... some of are: 1: you can't have a parent that isn't a person... (That could break if you ever want to model the family of your dog, or dead people... Are dead people persons? Not Leaglly at least.. depending on what your program is, that might be a problem)
<erikstraub> parent is a person? that would only not reflect reality if the domain had additional need for the concept of a 'parent'
Gekz has quit [Ping timeout: 276 seconds]
<dekroning> erikstraub: so then I would be able todo p1 = Parent.new(Person.new) p2 = Parent.new(Animal.new)
<shevy> even britney spears is a parent so pretty much everyone can be
<dekroning> shevy: haha :)
xiaotian has quit [Quit: Computer has gone to sleep.]
<fgwaegeawgfwa> erikstraub: 2: You are also saying that the relation is "immutable"... suppose you have a person Pete... that isn't a parent... but that can change after a while...
test34 has quit [Quit: left]
<shevy> I see we have found a sweet spot for discussions on #ruby now :)
<erikstraub> fgwaegeawgfwa: i get it, just depends on the domain
<fgwaegeawgfwa> so now, you'll have to change all instances to Pete instance of just person, for Pete instance of Parent...
yonggu_ has joined #ruby
nfk has joined #ruby
<fgwaegeawgfwa> which is "strange" and difficult sometimes...
<shevy> haha
<fgwaegeawgfwa> and can have a lot of unforseen complications...
<erikstraub> fgwaegeawgfwa: could it not depend on a scope?
chienpo has joined #ruby
<fgwaegeawgfwa> also, saying that someone is a "Parent" or not... it's a little anti-intuitive because Parent is closely related to a relationship....
gilead has quit [Quit: Leaving]
<fgwaegeawgfwa> the "Child" of a parent, is quite an important thing, you might want to model sometime... and you may want to model something of that relationship too...
<fgwaegeawgfwa> and if you model "Parent" as a static property, that becomes more difficult...
<fgwaegeawgfwa> it doesn't appear as a serious "problem" at first, but if your program start getting more complex, you'll start making lot of "hacks" or not so nice things...
<dekroning> fgwaegeawgfwa: so in my pastie example, what would be a better thing todo in my case? and that is, I want to know street_name and city of a parent
yonggu has quit [Ping timeout: 245 seconds]
<fgwaegeawgfwa> to patch up the fact that a Parent shouldn't be a subclass of Person, because reality doesn't work that way...
<dekroning> fgwaegeawgfwa: like shevy also says Address.find(person) which is also something i like
Ammar01 has quit [Ping timeout: 240 seconds]
<fgwaegeawgfwa> dekroning: I'd have an object to represent the information of a person, and that object would have the address... and you could do information.address.street_name....
<fgwaegeawgfwa> you might also want to consider, that some people will have none, or multiple addresses...
<fgwaegeawgfwa> ContactInformation.of(person).address.street_name
pen has joined #ruby
<fgwaegeawgfwa> Address.find(person) ---> this also "feels" strange to me... why is an Address related to a Person?
jrist is now known as jrist-afk
<shevy> :)
cbuxton1 has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
cbuxton has joined #ruby
<shevy> in your example though you would create a new class
<shevy> ContactInformation
MasterIdler has joined #ruby
<fgwaegeawgfwa> shevy: yes...
<dekroning> fgwaegeawgfwa: well your injecting a object into find that responds to "street" and "city" so you wouldn't necerally have a Address related to a Person right ?
<fgwaegeawgfwa> i tend to create a lot of small classes... millons of them, with very few methods...
lxsameer has quit [Ping timeout: 248 seconds]
<dekroning> fgwaegeawgfwa: that's actually also the route i'm trying to go now... lot's of small classes, but since I just started out this style, I get confused as to when exactly to use them, and how to call them for example :)
fflush has joined #ruby
<fgwaegeawgfwa> dekroning: In my opinion, the thing that "relates" Address to Person is the contact information... the contact information tells you this person lives (or can be contacted) at this address...
<fgwaegeawgfwa> dekroning: If you wanna go a little further, you could do AddressBook.find(Person)// this would return the ContactInformation of that person... and go on from that...
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<fgwaegeawgfwa> if you start to think about it, that's what you'd do in real life...
<dekroning> right, so would a Person class have a aggregation of ContactInformation classes ?
<fflush> bonjour
<horseman> fflush: hey can u give me ops pls
<fgwaegeawgfwa> You pick up your address book, you search for the page with the contact information of that person, and on that page you have all the information you need...
tvw has quit [Read error: Connection reset by peer]
<dekroning> fgwaegeawgfwa: ah right, so then ContactInformation would have an aggregaton of Address objects ?
<fgwaegeawgfwa> dekroning: No! the AddressBook will have a collection of ContactInformation instances... Or a dictionary from Person to ContactInformation or something like that
SPYGAME has quit [Quit: Leaving]
<fgwaegeawgfwa> dekroning: yes...
<fgwaegeawgfwa> think about real life...
<fgwaegeawgfwa> Think about it like this...
<fflush> let's start with +v
<horseman> fflush: heheh, do you own the chan?
<fgwaegeawgfwa> Does it has sense to talk about a Person, if you don't know its contact information?
Ammar01 has joined #ruby
<fflush> maybe someday a +o ;)
<fgwaegeawgfwa> If it has sense, then Person shouldn't "has" a contact information...
<fgwaegeawgfwa> Does it has sense to talk about a Contact Information without a Person? or an address?
<dekroning> fgwaegeawgfwa: no indeed, the responsbility of a Person should more be about what the Person it self is, not about his contact info
<fflush> I guess so
<fgwaegeawgfwa> not really, so a Contact Information needs to have a person and an address. (well you may argue that you may have contact information for a company or something like that)
<fgwaegeawgfwa> so actually ContactInformation has a "Contact" that might be a person, a company, or the thing that you have information...
<dekroning> fgwaegeawgfwa: I was actually thining about company as well ;-)
<fgwaegeawgfwa> And then you have the information, that in this case is the address, telephones, whatever...
<fgwaegeawgfwa> If I have a ContactInformation, that doesn't has a Contact... Then.... IT's stop being a contact information... it doesn't has "sense"...
<dekroning> right! :-)
<fgwaegeawgfwa> So it <has> to have (or know) the contact... the same for the information...
<dekroning> intrestting
clockwize has joined #ruby
<horseman> fflush: are you still a ruby programmer?
<fgwaegeawgfwa> an object A needs to know an object B... If "removing" B from A makes A don't have sense any more...
<fflush> I am perl guy actually
<fflush> but I am looking for enlightment
<dekroning> fgwaegeawgfwa: different question, you do TDD? I'm trying to tackle my stuff TDD wise at the moment (this "test" project i'm trying to make now) and then i'm really wondering which objects to start unit testing
binaryplease has quit [Ping timeout: 265 seconds]
<fgwaegeawgfwa> That's the "purest" rule... You may sometimes break it... But it's a good idea knowing why you are breaking it... (generally because following it's too much in some cases that you know you won't need it)
Neil___ has quit [Remote host closed the connection]
<fgwaegeawgfwa> dekroning: In my opinion... TDD is great, if you do it properly...
lorandi has joined #ruby
<fgwaegeawgfwa> dekroning: And TDD isn't about unit tests... It's about Functional tests, or user story tests....
davidcelis has joined #ruby
<dekroning> fgwaegeawgfwa: right, so now the question, when is it "properly" ? :)
<dekroning> fgwaegeawgfwa: so your talking mostly "integration tests" then ?
<fgwaegeawgfwa> Why? Because how can you test a unit, if you don't know it will exist? or how it will behave?
odinswand has quit [Ping timeout: 248 seconds]
<fgwaegeawgfwa> dekroning: I just write functional tests... Some of them are user stories, some of them are just for a single "unit"... But they are still functional...
<horseman> fflush: haha, ok :)
<fgwaegeawgfwa> dekroning: Basically, try doing just black-box tests, and you'll be fine...
<rking> I need to find some good vids of people doing Test-First Development. It's the hardcorest thing there is.
<rking> (I learned the old fashioned way, but I keep finding myself wanting to explain it to other people on the net)
<dekroning> fgwaegeawgfwa: but then i'm thinking about, all the dependencies one most include to run some tests
<fgwaegeawgfwa> dekroning: dependencies? what?
codespectator has quit [Ping timeout: 246 seconds]
yankov has quit [Quit: yankov]
freakazoid0223 has joined #ruby
<dekroning> fgwaegeawgfwa: for example when I started my "integration test" i would like to write something that form a Parent object, I can ask it's street name and city for example. But now in the short talk, we discovered already a couple of additional objects we would need, to best store this information
<rking> dekroning: That's why you mock things out.
<dekroning> rking: in the integration tests you don't want to mock
fr0gprince_mac has joined #ruby
<rking> Right, no, I'm coming into the conversation late.
lxsameer has joined #ruby
<dekroning> rking: ah no problem :)
<fgwaegeawgfwa> dekroning: AddressBook.Add(PetesContactInformation); AddressBook.Add(JohnsContactInformation); contactInformation = AddressBook.ContactInformationFor(Pete); assert(contactInformation.street.address, "something");
senny has quit [Remote host closed the connection]
sspiff has quit [Remote host closed the connection]
nowthatsamatt has left #ruby [#ruby]
<fgwaegeawgfwa> note that even though AddressBook has an Add method, and a Collection of "Contact information"... <IT'S NOT> a Collection, and shouldn't subclass a collection class... The collection will be a member...
awarner has joined #ruby
krusty_ar_ has quit [Read error: Connection reset by peer]
thone has quit [Ping timeout: 244 seconds]
hoelzro is now known as hoelzro|away
<dekroning> fgwaegeawgfwa: member being a field ?
kenperkins has quit [Ping timeout: 252 seconds]
Eiam has joined #ruby
jaystay has quit [Quit: jaystay]
<fgwaegeawgfwa> dekroning: a field... or may be something more indirect...
<fgwaegeawgfwa> if A has B and B has C and C has D... then you can say that A know B,C and D...
goodieboy has quit [Remote host closed the connection]
thone has joined #ruby
<fgwaegeawgfwa> if A directly has a B a C or a D is more an implementation thing... The important thing is that there is a one-to-one association... or one-to-many(and the direction) or whatever kind of association/relationship you have...
<dekroning> fgwaegeawgfwa: right, like in my pastie, Parent knows Address via Person
<fgwaegeawgfwa> that's why I say "knows" instead of has.... <has> has a connotation of ownership and directness, that I don't wish to imply...
krusty_ar has joined #ruby
<dekroning> fgwaegeawgfwa: I was wondering how you would draw this relationship, e.g. again my pastie example. would you also draw a dependancy arrow from Parent to Address ?
<fgwaegeawgfwa> saying that a Person has a House, usually means that if the person "disappears" the house disappears too... But you may have another persone which "has" the same house... So that's might not be "true"...
niklasb has quit [Ping timeout: 252 seconds]
niklasb has joined #ruby
<fgwaegeawgfwa> dekroning: I'd draw an an arrow from AddressBook to multiple instances ContactInformation... each ContactInformation instance will have an arrow to a Person (or a company or whateveer), and to an address, etc...
<dekroning> fgwaegeawgfwa: so you would also draw arrows towards indirect relationships
<dekroning> ?
albemuth has quit [Quit: Computer has gone to sleep.]
<fgwaegeawgfwa> dekroning: yes... a relationship being direct or indirect (if it doesn't change the multiplicity) is an implementation detail...
t0mmyvyo has joined #ruby
wallerdev has joined #ruby
BigFatFatty has joined #ruby
<fgwaegeawgfwa> So A knows a single B and B knows a single C... You can also say that A knows a single C without any problem...
<dekroning> fgwaegeawgfwa: ok great :-) man, sucks I have to leave in a couple of minutes :(
<workmad3> transitive closures :)
<dekroning> fgwaegeawgfwa: thanks a lot for your information and enlightment on the topic
<fgwaegeawgfwa> workmad3: something like that, but I'm not sure if all closures are actually always valid...
adeponte has quit [Read error: Connection reset by peer]
<workmad3> fgwaegeawgfwa: in fairness, a relationship like that doesn't necessarily have transitive properties
adeponte has joined #ruby
ralxz has joined #ruby
<workmad3> for example, you know me (by IRC) and I know my sister... but you don't know my sister
Criztian has joined #ruby
<fgwaegeawgfwa> workmad3: that's a different "know" relationship...
<fgwaegeawgfwa> you certanly aren't a field of mine :)
<workmad3> wasn't entirely sure on the context ):
<workmad3> :)
ElitestFX has quit [Ping timeout: 245 seconds]
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
<dekroning> fgwaegeawgfwa: your here more often?
robdodson has quit [Quit: robdodson]
<fgwaegeawgfwa> dekroning: sometimes...
MasterIdler has quit [Quit: MasterIdler]
<shevy> hehehe
<shevy> best answer :)
<shevy> workmad3 where are the pics of ur sister
petercs has quit [Ping timeout: 250 seconds]
<dekroning> shevy: lol :)
khakimov has joined #ruby
<shevy> dekroning, well he mentioned that first!
codespectator has joined #ruby
<dekroning> :-)
<shevy> he is guilty for the idea kinda. now if he would have mentioned teletubbies instead...
sirdeiu has quit [Remote host closed the connection]
jaystay has joined #ruby
shadowcat_ has joined #ruby
<dekroning> shevy: i know exactly what you mean ;-)
test34 has joined #ruby
Helius has quit [Ping timeout: 260 seconds]
jaystay has quit [Client Quit]
savage- has joined #ruby
Drewch has quit [Ping timeout: 248 seconds]
bier has quit [Ping timeout: 245 seconds]
<shevy> dekroning we need to find out more
williamcotton has joined #ruby
<dekroning> shevy: indeed, he got suspiciously quite
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<shevy> hehehe exactly!
<Synthead> hoelzro: in a script she'banged with #!/usr/bin/env ruby, if it matters. I'm thinking of something like $_ in bash
<dekroning> need to go guys, thanks all, ttyl
<shevy> who she banged with now
<dekroning> shevy: when I get back, tell me the rest of the story... so you can forward me the pics
<shevy> hehe
Drewch has joined #ruby
weasels has joined #ruby
jaystay has joined #ruby
clockwize has quit [Quit: clockwize]
vmil86 has quit [Quit: Leaving]
kvirani has quit [Remote host closed the connection]
Vendethiel has joined #ruby
weasels has left #ruby [#ruby]
jarednorman has joined #ruby
<workmad3> shevy: but I don't know the teletubbies :P
ramblex has quit [Ping timeout: 252 seconds]
xpot-station has joined #ruby
<shevy> yeah but you know ur sister!
Nies has quit [Read error: Connection reset by peer]
maletor has joined #ruby
ken_barber1 has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
sirdeiu has joined #ruby
ken_barber has joined #ruby
sirdeiu has quit [Remote host closed the connection]
CheeToS has quit [Ping timeout: 250 seconds]
stephenjudkins has joined #ruby
keithcelt has joined #ruby
deric_skibotn has quit [Quit: ChatZilla 0.9.88-rdmsoft [XULRunner 1.8.0.9/2006120508]]
gyotoit22 has joined #ruby
mdw has quit [Remote host closed the connection]
mrmist has quit [Remote host closed the connection]
kenichi has joined #ruby
spuz has quit [Quit: Leaving]
jaystay has quit [Quit: jaystay]
rakm has joined #ruby
bier has joined #ruby
Criztian has quit [Remote host closed the connection]
b1rkh0ff has joined #ruby
ken_barber1 has joined #ruby
mrmist has joined #ruby
sirdeiu has joined #ruby
fayimora has joined #ruby
tatsuya_o has joined #ruby
nfk has quit [Quit: yawn]
internet_user has joined #ruby
kuranai|off is now known as kuranai
ken_barber has quit [Ping timeout: 260 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
nfk has joined #ruby
codebeaker has quit [Remote host closed the connection]
berserkr has joined #ruby
<any-key> yeahhhhhh...not clicking that
<bruder> you bet.
pdtpatrick has quit [Ping timeout: 252 seconds]
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gyotoit22 has quit [K-Lined]
<carloslopes> guys, anyone know how can i make a regexp that return true only if the text is '/signin' ?
<carloslopes> '/users', '/home' and etc, must return false
pdtpatrick has joined #ruby
<any-key> /^\/signin$/
MasterIdler has joined #ruby
<carloslopes> isn't
<carloslopes> sorry
<carloslopes> isn't '/signin'
<carloslopes> :)
<any-key> just do match and invert the boolean
<any-key> tadaaaa
<any-key> it'll look better than doing it in regex
<carloslopes> any-key: i think i can't, because i want do this in the sinatra's before filter
<carloslopes> any-key: and, in the filter, it not accept the invert operator i think :/
<any-key> ah
apok has joined #ruby
<Synthead> I LOVE CLASSES IN RUBY <3
* Synthead explodes
fbernier has quit [Ping timeout: 246 seconds]
<any-key> carloslopes: damn, yeah I dunno, [^] will do characters but not whole words
<any-key> (if I'm understanding it correctly)
icooba has quit [Quit: icooba]
<carloslopes> any-key: yeah, ^ only reject character :(
Solnse has joined #ruby
<any-key> #sinatra may have some advice for you
walbert has joined #ruby
fr0gprince_mac has quit [Ping timeout: 246 seconds]
<carloslopes> any-key: ok, i will try there, thanks mate :)
shadowcat_ has quit [Quit: shadowcat_]
<shevy> ok need some brains
<any-key> best of luck
<shevy> I need some brains!
<any-key> no you don't
<shevy> I have input like ... 'C12H12N2'
albemuth has joined #ruby
<shevy> I want to split at characters, and at number-contingents. So my array would be: ['C','12','H','12','N2']
zastaph has joined #ruby
seanstickle has joined #ruby
<any-key> you need a parser
<shevy> right now my genius idea was to use .split(//)
<shevy> apparently I never thought that the input could be more than one number, but that is what I am facing right now :(
<any-key> yes, use that to "tokenize" it, then write a simple parser
<any-key> PARSER
<rking> Nah, regexes will do that.
<any-key> nope
<any-key> too many rulez
<rking> Only have to figure out how.
<rking> Oh wait, maybe not.
<any-key> no, they won't do it
* shevy sobs.
<chiel> it'll be a multidimensional array if you do it with regexes
<any-key> he'll hurt his brain in the process
<shevy> my beautiful simple .split(//) will become more complex... :(
<shevy> I think I will add a method to array
c0rn has joined #ruby
<shevy> merge_brothers
<any-key> why
<any-key> you just need a parser
<shevy> it seems the simplest way
<any-key> WRITE A PARSER
<horseman> any-key: you can mathematically prove regexes can do it
<shevy> pffft, when I read all the documentation, it's already bedtime for me
<horseman> if it's a regular language
<any-key> write a simple state machine
<any-key> seriously
<any-key> figure out the rules, then write it
ken_barber1 has quit [Remote host closed the connection]
<any-key> or use a stack
<any-key> anyways, lunch time
ken_barber has joined #ruby
<any-key> shevy: state machine
<shevy> what
<shevy> good
<shevy> enjoy your lunch
lxsameer has quit [Quit: Leaving]
ken_barber1 has joined #ruby
Dreamer3 has joined #ruby
xnm has joined #ruby
ken_barber has quit [Read error: Operation timed out]
sporkbomb has joined #ruby
sirdeiu has quit [Read error: Connection reset by peer]
looopy has joined #ruby
artOfWar_ has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
sirdeiu has joined #ruby
dekroning has quit [Ping timeout: 252 seconds]
artOfWar has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
werdnativ has joined #ruby
yankov has joined #ruby
adamkittelson has joined #ruby
adamkittelson has quit [Read error: Connection reset by peer]
keithcelt has quit [Remote host closed the connection]
jaystay has joined #ruby
adamkittelson has joined #ruby
<billiamii|> carloslopes, individual negative characters ([^/][^s]...), or negative lookahead '/signin' =~ %r|^((?!/signin).)*$|
eric-atl_ has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
<davidcelis> state machine
keithcelt has joined #ruby
eric-atl_ has quit [Client Quit]
chrismcg is now known as zz_chrismcg
eric-atl_ has joined #ruby
DrShoggoth has joined #ruby
berserkr has quit [Quit: Leaving.]
BiHi_ has quit [Quit: bye]
eric-atl_ has quit [Client Quit]
jaystay has quit [Quit: jaystay]
simao has quit [Quit: Lost terminal]
jaystay has joined #ruby
eric-atl has joined #ruby
schovi has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
jcromartie has joined #ruby
eric-atl has quit [Client Quit]
burgestrand has joined #ruby
juo100 has joined #ruby
burgestrand has quit [Client Quit]
Aaton_off is now known as Aaton
burgestrand has joined #ruby
jchauncey has quit [Quit: jchauncey]
upasna is now known as human_bot
stepnem has quit [Ping timeout: 244 seconds]
jjjj has joined #ruby
eric-atl has joined #ruby
looopy has quit [Remote host closed the connection]
rbanffy has quit [Quit: Ex-Chat]
arturaz has quit [Ping timeout: 245 seconds]
roolo has quit [Quit: Linkinus - http://linkinus.com]
eric-atl has quit [Quit: eric-atl]
eric-atl has joined #ruby
stepnem has joined #ruby
imami|afk is now known as banseljaj
eric-atl has quit [Client Quit]
horseman has quit [Remote host closed the connection]
<elux> hey guys
<elux> how can i redirect STDOUT/STDERR in ruby of a daemon?
<elux> ahh .. STDOUT.reopen .. cool
horseman has joined #ruby
mdw has joined #ruby
noyb has joined #ruby
cha1tanya has quit [Quit: Leaving]
azm has quit [Ping timeout: 245 seconds]
rippa has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
shevy has quit [Ping timeout: 244 seconds]
sterNiX has quit [Ping timeout: 250 seconds]
gks has joined #ruby
<gks> I was hoping someone could possibly point me to a way that i could load an external ruby script, and effectively import it. Then via some type of introspection find the name of the class inside that script that was just imported
shadoi has quit [Remote host closed the connection]
brianpWins has joined #ruby
<gks> i realize the "load" method in Kernel will load and execute the script, but not sure if that is what i want to do. I would like to load the file and then be able to create an instance of the class inside it and create an instance of it. the tricky part is that the class name will be unknown at launch time
brianpWins has quit [Client Quit]
brianpWins has joined #ruby
codebeaker has joined #ruby
brianpWins has quit [Client Quit]
kvirani has joined #ruby
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby
jackiechan0 has joined #ruby
<robacarp> you know whats irritating is when ruby-debug doesn't trigger because you're debug statement doesn't have a statement after it.
TorpedoSkyline has quit [Quit: Leaving]
ananthakumaran has joined #ruby
schovi has joined #ruby
stephenjudkins has joined #ruby
itnomad has quit [Ping timeout: 260 seconds]
<codebeaker> robacarp: indeed, i mapped a vim command to `debugger; 1+1`
<codebeaker> stupid, but it works
shevy has joined #ruby
jgrevich has joined #ruby
blacktulip has joined #ruby
cbuxton1 has joined #ruby
<robacarp> I usually put "puts :doom" on the next line....I like the 1+1 thing better though because when I foget to take it out its not going to shout 'doom' at me ...or maybe that is _why_ I put it like that, so I don't forget...
digitalcakestudi has joined #ruby
mucker has joined #ruby
<gks> no ideas on the easiest way to load files with classes at runtime and obtain those classnames?
<gks> i'm not asking for the work, just a pointer in the right direction
sandGorgon has joined #ruby
<gks> while i can get around in Ruby, this one is a bit outside my realm of knowledge and just need a shove in the right direction
<robacarp> gks, I would adopt some sort of standardization...
<gks> robacarp: right, the idea here is that they're going to be "test" cases. a tad bit more complicated than using UnitTests, but in the same idea
<LiquidInsect> 'require' should return a list of newly-defined class names, though I don't think it'll tell if what you just required monkeypatched some other class
<gks> so basically the classname will be unknown, in an unknown file, BUT the methods inside these classes will all be the same
cbuxton has quit [Ping timeout: 256 seconds]
<robacarp> this sounds like a bad idea...
<gks> robacarp why's that?
<robacarp> I dunno, arbitrarly executing code just seems like a security vulnerability...maybe thats just me though
<gks> robacarp: understood, it isn't going to be user driven though
<gks> ideally no user will ever see the internals of this. the point is to make it easier for us to extend
werdnativ has quit [Quit: werdnativ]
<shevy> gks how can you determine the classnames?
<billiamii|> Can your class names not map to filenames?
DRCALKIN has joined #ruby
<shevy> if you know the name of the class, or have some other reference to them, you can instantiate it
mrc has joined #ruby
mrc has quit [Read error: Connection reset by peer]
<gks> billiamii|: ah, good point, that would be ideal and expected
<robacarp> yea. I mean, ideally then your libraries should be packaged up and signed with a key, but you still should adopt some sort of standardization so as to correlate the filename to the classes within.
<shevy> otherwise, if you dont know the name, I dont know how you wanna call em
<billiamii|> what robacarp said.
<gks> robacarp: they will be signed and packaged using Gate Keeper
fbernier has joined #ruby
<gks> basically all of this is going on behind the scenes and packaged in a OS X app
<robacarp> gks, I_suppose_ that you could also put in a sort of manifest .yml or something [aside, this internet connection is so bloody laggy..sorry for any typos I don't fix]
<gks> the user clicks a button and the scripts get executed
<gks> robacarp: yea, ideally i'd like it to just plug and go. create a file, add the test routines and blamo. i can repackage and upload
<gks> not that a manifest.yml file would be difficult to manage though, so definitely another option
<robacarp> then favor some sort of standard, and anything outside that standard is considered broken.
<gks> robacarp: define standard?
stkowski has joined #ruby
<gks> i think i grasp what you're saying, but i want to be sure
voodoofish430 has joined #ruby
<robacarp> uh...a system you follow for class names / file names. (e.g. my_exploit_for_your_software.rb contains a class called MyExploitForYourSoftware)
Cicloid has joined #ruby
kenyabob has joined #ruby
<gks> right, that is already figured out
<gks> which now gives me a way to find the class name
<robacarp> uh huh
<gks> inside the class is all standardized too. The class will include a Module that contains all of the guts to run the test. it will expect certain methods to be present
ryanf has joined #ruby
<gks> sorry if i sound inept... trying to learn here :-/
<robacarp> gks are you writing a desktop application in rubyonrails?
<gks> no
<gks> the desktop component will simply execute the scripts.. it's part of a diagnostics package. it gathers system information
jchauncey has joined #ruby
Vainoharhainen has joined #ruby
<gks> mac os version, the version of our software, system.log, etc.
shadoi has joined #ruby
<robacarp> I ask because, "GateKeeperis a Ruby on Rails plugin providing a natural language DSL to manage security permissions on instances of ActiveRecord classes"
<gks> it helps us track down issues with the software
<gks> nope, when I said Gate Keeper, I meant the OS X Lion/ML Gate Keeper
<robacarp> ah, okay.
<gks> so technically, the application shouldn't run if the contents of the package don't match the signed package we put up and refuse to run
<gks> or some crazy gobble-de-gunk like that. my understanding is the whole package is signed. including resources. since the ruby stuff would be part of the resources in the app they should have to match too
<gks> thus, no security issues because it will come directly from us and be signed
<robacarp> yea, I haven't read into using osx gatekeeper, but that is likely the case...it got decent reviews from sec people. I still think loading and executing code on the client is a bad idea...because hackers will hack.
skum has joined #ruby
<robacarp> but if its in ruby its probably pretty trivial to modify the script anyway.
Karmaon has quit [Quit: WeeChat 0.3.8-rc1]
keithcelt has quit [Remote host closed the connection]
<gks> right
Vainoharhainen has quit [Ping timeout: 246 seconds]
ramblex has joined #ruby
rdesfo has joined #ruby
<gks> that was my thinking, it's plain text.. if a hacker can bypass Gate Keeper... then what's the big deal between editing our scripts directly to do malicous things vs just including a file that we arbitrarily run
ukwiz has quit [Quit: Leaving]
skum has quit [Read error: Connection reset by peer]
sandGorgon has quit [Ping timeout: 246 seconds]
carlyle has quit [Remote host closed the connection]
<gks> i certainly get your point though. I will discuss with our security expert on staff and see if he has any insight in whether this is all moot with gate keeper or if i need to re-evaluate
jrist-afk is now known as jrist
<robacarp> I think it also depends on what a malicous user could gain by exploiting your stack...via included scripts or by modifying the code directly.
ralxz has left #ruby [#ruby]
<robacarp> if its purely a diagnostic routine for something else that you already server, then who cares ...they'renot likely to gain anything by exploiting.
<robacarp> but if , for example, they could use the code at hand to discern a way to DOS some server of yours, you might have a problem.
<robacarp> damn thi sinternet!
ddv has joined #ruby
<gks> security expert says i need to re-evaluate *sigh*
carlyle has joined #ruby
<robacarp> heh.
Karmaon has joined #ruby
<gks> so, you're right, something has to change
wiwillia has left #ruby [#ruby]
<robacarp> if you don't mind the whole world knowing, what are you diagnosing with this scripting work?
Vainoharhainen has joined #ruby
SegFaultAX|work2 has quit [Quit: Lost terminal]
<gks> without being too obvious, we make a Mac app that has a few "working parts" that can sometimes become out of sync
kenyabob has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<gks> basically a Safari/Firefox/Chrome extension that communicates with our main application
<gks> what i was hoping was that i could easily check for software versions, if they're not up to date then tell the user to update
<gks> then possibly get more extensive, like check system.log for certain strings of errors
<robacarp> you might just be able to do that within the extensions themselves
<gks> basically automating some of the "we see this, you fix it this way" stuff
<gks> we can, but not all of it
<robacarp> well, I bet chrome won't let you out into the system that way.
<robacarp> yea.
<gks> the other part is that we want to be able to ahve the user generate a report for us
<gks> the report would allow them to send the info to us to see
<gks> the tests would've been used to help the user self-help themselves
<gks> and reduce our inflow of customer support
<gks> if the tests didn't help them, then it would generate a report (html file) that they can submit to us to look at
<robacarp> yea.
Vendethiel has quit [Ping timeout: 240 seconds]
<robacarp> I would box all that up into the osx application, personally.
<gks> we are
<gks> but for ease of updating, we would like it to be ruby
harukomoto has joined #ruby
<gks> doing all of this stuff in Cocoa is a real PITA
<robacarp> yes
<robacarp> been there.
<gks> sounds like you might be able to tell GateKeeper which files need to be signed
<gks> so there may be hope
<robacarp> [brackets [on brackets]] or something....
<robacarp> gks are you using macruby?
<gks> nope
adamkitt_ has joined #ruby
Vainoharhainen has quit [Ping timeout: 246 seconds]
<robacarp> does 1.8.7 still come packaged with the newer osx's?
<gks> just plain ol Cocoa for the main interface and ruby for the report generating right now.. but the current ruby script is a pile of junk that has grown to be a real pain to update. so.. my job to rewrite it
Dilan has joined #ruby
<gks> Lion uses 1.8.7
<gks> not sure what ML has as i haven't checked just yet
<robacarp> I doubt they've changed it.
looopy has joined #ruby
<gks> that would be my guess too
<gks> the real trouble is i know just enough ruby to be dangerous
<gks> so a lot of what i'm doing requires some learning
<robacarp> heh. well thats the best way to learn...by doing.
<gks> so, i truly appologize if i am sounding a dunce
Eldariof59-ru has joined #ruby
<gks> the idea was to have two ruby scripts, one that executes the tests, then outputs the results to a file (JSON or something) and then the Cocoa app can read it and present the data to the user
<gks> this would primarily be for simple things they can fix on their own and for common things we see all the time
adamkittelson has quit [Ping timeout: 260 seconds]
<gks> if that doesn't help then a second script gets run to generate a more extensive report of system info that we can use for troubleshooting
<robacarp> yea, makes sens.
fermion has quit [Quit: P]
macmartine has quit [Quit: macmartine]
davidpk has joined #ruby
itnomad has joined #ruby
adamkittelson has joined #ruby
rdesfo has quit [Remote host closed the connection]
flyingoc1opus is now known as flyingoctopus
SimSala has joined #ruby
adamkitt_ has quit [Ping timeout: 250 seconds]
sbanwart has quit [Ping timeout: 245 seconds]
btanaka has joined #ruby
godzirra has quit [Read error: Operation timed out]
Vert has joined #ruby
gks has quit [Quit: Linkinus - http://linkinus.com]
pdtpatrick has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has joined #ruby
gks has joined #ruby
<robacarp> any idea how to change your email address on this fancy app store and keep the apps associated with the account?
pdtpatrick has joined #ruby
<gks> it is doable... or was...
c0rn has quit [Quit: Computer has gone to sleep.]
zeromodulus has joined #ruby
RoUS has quit [Ping timeout: 260 seconds]
<robacarp> theres is a view my account thing in there...just found it.
<gks> the key is remembering to change it.... instead of creating a new one.. i can't tell you the number of times people create a new one and expect their apps to be moved over too :)
lkba has joined #ruby
stepnem has quit [Ping timeout: 245 seconds]
<robacarp> okay, I'm on app store, just updated my email address.
mensvaga has left #ruby [#ruby]
SimSala has quit [Quit: leaving]
jaystay has quit [Quit: jaystay]
stepnem has joined #ruby
Corey has quit [Quit: leaving]
Corey has joined #ruby
ronniy has quit [Remote host closed the connection]
godzirra has joined #ruby
SimSala has joined #ruby
<lectrick> How do I count the number of times a certain element appears in an array?
<seanstickle> count
<seanstickle> With a block
<erikstraub> I'm trying to figure out why this might be possible http://pastebin.com/RaPP2GAw
<erikstraub> basically,
<erikstraub> object.is_a? Post #=> false
<erikstraub> object.class = Post
<erikstraub> object.is_a? object.class #=> true
<seanstickle> [1,2,3,4,5,6].count{|x| x > 3}
<seanstickle> #=> 3
chimkan_ has joined #ruby
<Hanmac> erikstraub: i need more infos, show me code of the Post class ... and did the error happen at irb too?
<erikstraub> Hanmac: here's the post class https://gist.github.com/4cbd013e87e0c0fe1831 irb does the right thing
iNerd has joined #ruby
<erikstraub> it happens when passing a post object into another class
<Hanmac> passing into another class??
bosphorus has quit [Remote host closed the connection]
<Synthead> is there a way, in ruby, that I can start and stop a "job," much like Ctrl-Z and "bg" in linux?
<erikstraub> Hanmac: i made an exhibitor class for rendering the post depending on certain attributes
<erikstraub> this is straight from objectsonrails.com
<erikstraub> just walking thru the book
locriani has quit [Read error: Connection reset by peer]
locriani has joined #ruby
<Hanmac> and what did object.class == Post say in pry?
<shevy> 42
<shevy> Synthead I think with "daemons"
<shevy> or if you dont want to use a gem, try fork {} and keep a handle to that
dcolebatch2 has joined #ruby
pting has joined #ruby
<Synthead> shevy: yeah, I'm using fork. is there a way I can "pause" a forked process?
jaystay has joined #ruby
xnm has quit [Read error: Connection reset by peer]
human_bot has left #ruby ["Leaving"]
<lectrick> how do I ensure every _other_ element of an array is something? Using an enumerator?
zommi has quit [Remote host closed the connection]
<shevy> Synthead hmm perhaps if you put it into a thread and use thread.join
<shevy> Synthead, anyway, have a look at daemons, how they solve that problem in ruby code
<iNerd> Hey guys where do I find Pikachu in pokémon Ruby!
<iNerd> :p
jackiechan0 has quit [Quit: Sto andando via]
sandGorgon has joined #ruby
nowthatsamatt has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
tangledhelix has joined #ruby
tangledhelix has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
nowthatsamatt has left #ruby [#ruby]
pygospa has quit [Read error: Operation timed out]
chomp has quit [Quit: Leaving]
<erikstraub> Hanmac: I think i'm just testing wrong
jonatha__ has quit [Remote host closed the connection]
wvdschel has quit [Read error: Connection reset by peer]
TobsCore has quit [Ping timeout: 245 seconds]
iNerd has quit [Quit: iNerd]
pygospa has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
alanp has quit [Remote host closed the connection]
alanp has joined #ruby
jjjj has quit [Quit: Leaving.]
ken_barber1 has quit [Remote host closed the connection]
Guest49410 is now known as fred
sandGorgon has quit [Ping timeout: 265 seconds]
fred has quit [Changing host]
fred has joined #ruby
looopy has quit [Remote host closed the connection]
aaroncm has joined #ruby
statix has quit [Remote host closed the connection]
statix has joined #ruby
Seventoes has left #ruby [#ruby]
mihi has joined #ruby
<lectrick> Anyway, to test that an element is every *other* element of a set, do this: set.inject(true){|b,element| (element==some_comparison) ^ !b}
<lectrick> ah crap that doesn't work either
davidw_ has joined #ruby
mihi has left #ruby [#ruby]
snearch has joined #ruby
Eldariof59-ru has quit []
kirun has joined #ruby
<Hanmac> lectrick, ... so all elements in the set need to be the same?
mdw has quit [Remote host closed the connection]
kidoz has joined #ruby
llaskin has joined #ruby
<llaskin> https://gist.github.com/89390baa7c8c6ece2af8 why would this never get to qa8@.com credential in the each loop?
<llaskin> it seems to get qa2 and qa7, but never qa8
jonathanwallace has joined #ruby
chienpo has left #ruby [#ruby]
<lectrick> Hanmac: No, they have to alternate. So for example [0,1,0,1], [1,0,1,0] and [1,0,1,0,1] should all pass but [1,1,0,1] should not
<lectrick> Hanmac: if the test is n==1
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
Carson__ has joined #ruby
khakimov has joined #ruby
kenperkins has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
<llaskin> anyone with an idea?
jonathanwallace has quit [Ping timeout: 240 seconds]
<burgestrand> llaskin: hover_creds and credential are the same object, and you’re modifying it during iteration
<burgestrand> almost never a good idea to remove the floor from under your own feet
<llaskin> burgestrand: why would it matter if they were the same object
<llaskin> they are definied seperately...
codebeaker has quit [Quit: codebeaker]
<llaskin> 2 seperate arrays
<llaskin> i'm not saying hover_creds = credential
<lectrick> Hanmac: There seems to be a bunch of ways to skin this cat, none of them pretty: http://stackoverflow.com/questions/1614147/odd-or-even-entries-in-a-ruby-array
<burgestrand> llaskin: hover_creds = credential =
<burgestrand> llaskin: line #2
eurek has joined #ruby
<llaskin> sorry
<llaskin> refresh
<llaskin> thats what it should have been
<llaskin> i miswrote...
jshsu has quit [Ping timeout: 240 seconds]
<burgestrand> llaskin: also, again, modifying the object you’re iterating of during iteration is often not a good idea: http://19pad.charlie.bz/1446
<burgestrand> (that’s most likely your actual bug)
rekav0k has joined #ruby
c0rn has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<llaskin> ok burgestrand
<llaskin> yea but you did it wrong
<llaskin> but yes i can see where it breaks
<llaskin> ok
<llaskin> cool
<llaskin> ty burgestrand
<burgestrand> ;)
<llaskin> i changed it to work a diff way
rekav0k has left #ruby [#ruby]
<burgestrand> llaskin: also, you can intersect arrays in a better way using &
dkissell_ has joined #ruby
tcopp has joined #ruby
<llaskin> burgestrand: how?
<burgestrand> Array has the common set operations you usually see: intersection, union, difference
kaneda has joined #ruby
<llaskin> i'm not trying to intersect them
<llaskin> i'm trying to identify if there is any difference
kaneda is now known as Guest73052
<burgestrand> llaskin: ah, alright, arrayA - arrayB = arrayC of the difference
<burgestrand> llaskin: arrayC will be empty if there is no difference
jaystay has quit [Quit: jaystay]
dkissell has quit [Ping timeout: 252 seconds]
dkissell_ is now known as dkissell
jonathanwallace has joined #ruby
<burgestrand> llaskin: http://19pad.charlie.bz/1451
<llaskin> oh i get it burgestrand
<llaskin> ok awesome
<burgestrand> llaskin: be careful though, if there are duplicates of some elements it might not behave as you want
seanstickle has joined #ruby
<burgestrand> llaskin: http://19pad.charlie.bz/1453
<llaskin> i'm also comparing their lengths
<llaskin> so if the lengths don't match too, then it will raise a flag
jshsu has joined #ruby
<burgestrand> Alright :)
itnomad has quit [Ping timeout: 248 seconds]
<llaskin> who is charlie?
senj has joined #ruby
<llaskin> pretty neat website
senj has quit [Remote host closed the connection]
<burgestrand> no idea
looopy has joined #ruby
jaystay has joined #ruby
<burgestrand> unfortunately MRI support is broken, but I liked it until it broke :o
jonatha__ has joined #ruby
robdodson has joined #ruby
Marulk2 has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
<Rubinista> Does anyone know why the '\[unicode-char]' behavior was changed between 1.9.2 and 1.9.3? Is it intentional?
stephenjudkins has joined #ruby
jonatha__ has quit [Ping timeout: 265 seconds]
<rking> Rubinista: Hrm. Weird. What is the before/after behavior?
abra has quit [Remote host closed the connection]
Marulk2 has left #ruby [#ruby]
khakimov has quit [Ping timeout: 246 seconds]
cek has joined #ruby
<Rubinista> '\x' where x is a utf-8 char in 1.9.2 is equivalent to '\\x'. In 1.9.3 it's equivalent to 'x'.
<rking> By utf-8 I guess you mean non-ASCII UTF-8?
erikstraub has quit [Quit: Leaving.]
<cek> Will invoking the same method in the same context be optimized out to 1 such method invokation and "referecing" the result through local var?
<rking> Rubinista: And is this in String context or Regex?
bosphorus has joined #ruby
<Rubinista> rking: A string.
choffstein has quit [Remote host closed the connection]
llaskin has left #ruby [#ruby]
DrShoggoth has quit [Quit: Leaving]
<rking> Rubinista: I guess I don't follow. ruby -e 'p [RUBY_VERSION, "\ö"]' ⇒ ["1.9.3", "\\ö"]
jonathanwallace has quit [Read error: Connection reset by peer]
<Rubinista> rking: Yeah, in Windows XP running 1.9.3 I get ["1.9.3", "\xF6"]. But I had a better example I'll try to find.
<rking> Umm, that's super odd.
gks has quit [Quit: Leaving...]
jonathanwallace has joined #ruby
<rking> Rubinista: What shell?
mdw has joined #ruby
<Rubinista> cmd.exe...?
IPGlider has joined #ruby
<rking> \xF6 is ISO-8859-1. That shouldn't be showing up like that.
petercs has joined #ruby
<rking> What I mean is that your input, there, is not UTF-8.
adambeynon has quit [Quit: adambeynon]
petercs has quit [Client Quit]
<Rubinista> Yeah, my example was a file with an encoding: utf-8 header.
<rking> Rubinista: Can you make a short example file then gist it?
nlc has joined #ruby
<Rubinista> Doing so. 2 min.
wangr has quit [Ping timeout: 240 seconds]
petercs has joined #ruby
Guedes is now known as Guedes_out
jonathanwallace has quit [Ping timeout: 244 seconds]
dhaskew has joined #ruby
alfakini_ has quit [Quit: This computer has gone to sleep]
clockwize has joined #ruby
<quuxman> How do you make an aptional argument?
<quuxman> like "def foo(bar, *baz): ..." in python
<Rubinista> quuxman: def test foo, bar = 'default_value' ; end
bambanx has joined #ruby
<bambanx> Hi
<Rubinista> wb bambanx, get that path separator stuff settled?
<bambanx> Yeah
<bambanx> :)
<bambanx> Dude what big
<Rubinista> ?
<bambanx> Diferences have 1.9.2v with 1.9.3 of ruby
itnomad has joined #ruby
<bambanx> I am in my phone .... Slow typing :)
<Rubinista> Really? That's sort of what I'm tracking down now. Backslash handling in single-quoted strings.
<bambanx> you need the code?
<bambanx> I will in my pc in 20m if u need the code
fbernier has quit [Ping timeout: 246 seconds]
<bambanx> Rubinista: What u need?
idoru has joined #ruby
hynkle has quit [Quit: hynkle]
<Rubinista> My backslash issue, this time with sample output: http://pastie.org/3967996
itnomad has quit [Ping timeout: 265 seconds]
<elux> hey guys..
<Rubinista> bambanx: I just want to know what the specific issue was. Though code would answer that.
mlue has joined #ruby
mdw_ has joined #ruby
<Rubinista> rking: Do you see what I mean?
<elux> im looking to create a proxy object on the fly.. something like x = Struct.new(:constructor_var) { def puts(msg); constructor_var(msg); end } something = x.new
<elux> any suggestions? does that look good?
fbernier has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
berkes has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<elux> that seems to work..
jonathanwallace has joined #ruby
<Synthead> is there a way in ruby to block a port? like something internal to ruby, not iptables-related?
carlyle has quit [Remote host closed the connection]
mdw has quit [Ping timeout: 265 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
<rking> Rubinista: I get \и \и \x \X when I run (1.9.3 on Linux)
schovi has quit [Remote host closed the connection]
<robacarp> Synthead: ruby isn't responsible for allowing/disallowing ports, the host operating system is.
<Rubinista> rking: Do you have windows available? (I don't habve Ruby1.9.3 on Linux, and the issue code is meant for windows test clients anyways.)
ctevie has joined #ruby
<rking> Rubinista: No. =\
macmartine has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<robacarp> eewindows
<Rubinista> Yeah, heh
jgrevich has quit [Quit: jgrevich]
ilyam has joined #ruby
<ctevie> hey, there. I'm a total ruby noob and trying to build a rakefile for using uglyfier ... and on top of that on Windows. My problem is that I get a "rake aborted" file "C:\Program " not found... when i try to use uglyfier
clockwize has quit [Quit: clockwize]
<ctevie> can I find out from which variable this value is coming from?
Criztian has joined #ruby
<robacarp> ctevie: gist code, somebody will look at it.
<robacarp> I wager you're missing a set of quotes
jcromartie has quit [Quit: jcromartie]
<Rubinista> elux: So you'd then say proxy = x.new ; proxy.constructor_var = thing_to_be_proxied ; proxy.foo(args) and it should call thing_to_be_proxies.foo(args)?
SimSala has quit [Ping timeout: 252 seconds]
<Rubinista> ctevie: Use \progra~1\ style paths?
looopy has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
<ctevie> Rubinista: not that I know of https://gist.github.com/90f7b765cac86bf6087b
devdazed has quit [Quit: Bye]
slimjimflim has joined #ruby
kalleth has quit [Ping timeout: 252 seconds]
<slimjimflim> hi, i'm running a ruby webserver with: ruby script/server -e production
<slimjimflim> anybody know where i should look for error logs?
<robacarp> slimjimflim: the log directory in your app
akem has quit [Ping timeout: 245 seconds]
<slimjimflim> k
pdtpatrick has quit [Quit: pdtpatrick]
bambanx has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
pdtpatrick has joined #ruby
thecreators has quit [Quit: thecreators]
crankycoder has quit [Remote host closed the connection]
C0deMaver1ck is now known as C0deZ
C0deZ is now known as C0deZ0
C0deZ0 is now known as C0deZ0m
C0deZ0m is now known as C0deZ0mb
C0deZ0mb is now known as C0deZ0mbi
crankycoder has joined #ruby
carlyle has joined #ruby
C0deZ0mbi is now known as C0deZ0mbie
<ctevie> robacarp Rubinista nevermind. I fixed the problem by checking not only the user-dirs in PATH but also the global ones. some just had no quotes around dirnames with spaces.
crankycoder has quit [Remote host closed the connection]
A124 has joined #ruby
mvangala_ has quit [Ping timeout: 250 seconds]
hydrozen has joined #ruby
asdfqwer has quit [Read error: Connection reset by peer]
<Rubinista> Does anyone have Ruby 1.9.3 on Windows? Can you run http://pastie.org/3967996 and see if you get the same results?
C0deZ0mbie is now known as C0deMaver1ck
andrewhl has quit [Quit: andrewhl]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
A124 has left #ruby [#ruby]
<graspee> Rubinista: i'll try in a minute i'm just about to be interrupted
Carson__ has quit [Ping timeout: 265 seconds]
<ctevie> Rubinista: I have it but I can't run it w/o errors.
jrgifford has quit [Quit: "Not here"]
<ctevie> invalid multibyte char (US-ASCII)
geekbri has quit [Remote host closed the connection]
mikeycgto has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
<Hanmac> ctevie, let me guess ... you did not google the error right?
<ctevie> Hanmac: which one? the newer one or my first problem?
<Hanmac> i mean the "invalid multibyte char (US-ASCII)"
<ctevie> yes, I didn't google it. but now I know and have an answer for Rubinista
<slimjimflim> is the best way to revert to an older version of a gem to uninstall and reinstall with: gem install -v
<slimjimflim> or can i use: gem upgrade <some argument> <version>
<ctevie> Rubinista: I have the same result on Win7 with 1.9.3
brngardner has quit [Remote host closed the connection]
itnomad has joined #ruby
brngardner has joined #ruby
khakimov has joined #ruby
<Hanmac> ctevie Rubinista: you need to say what encoding the ruby file has
<ctevie> Hanmac: I know now ;)
<ctevie> Hanmac: wasn't the problem. just a problem I had to try it for Rubinista (see his paste)
<jeebster> very very strange. I'm requesting a hash key via the 'key' method, and when I pass in the value I get undefined method key
petercs has quit [Quit: Leaving.]
<jeebster> my hash is such { 1 => 'san-francisco' }
<jeebster> but if I call keys, I get the key in an array
bfrog has quit [Read error: Operation timed out]
lorandi has quit [Quit: Leaving]
<jeebster> and if I query key? or has_key? I get true
<Hanmac> jeebster: maybe it returns an array of keys? ... you should read the docs
<jeebster> it doesn't. key(value) returns the key
schovi has joined #ruby
<jeebster> extremely strange
<ctevie> Rubinista: did you check the changelog for 1.9.3 on windows? I guess it's a bug with the escape of multibyte chars in 1.9.2
<Hanmac> but keys returns an array
<jeebster> but I get the key back in an array if I call keys
<jeebster> yes
<jeebster> and I know I'm passing in the correct value for the given key
Shamgar has quit [Ping timeout: 260 seconds]
<ctevie> Rubinista: I have the same results on Win7 with 1.9.2/1.9.3 like you had on WinXp
brngardner has quit [Ping timeout: 245 seconds]
<Rubinista> ctevie: I looked in the changelog and didn't see anything I recognized. If you could paste the link here I'll read what you found.
<Hanmac> jeebster: so that des hash.key('san-francisco' ) return?
itnomad has quit [Ping timeout: 248 seconds]
<ctevie> Rubinista: I didn't check, sorry. was just a guess
C0deMaver1ck is now known as Eed5
elux has quit [Quit: Bye!]
adambeynon has joined #ruby
mikeycgto has quit [Ping timeout: 244 seconds]
<jeebster> hanmac, it returns a no method error for key
davidw_ has quit [Ping timeout: 246 seconds]
<jeebster> I' trying it out in irb and the same behavior ensues
<Rubinista> Hanmac: Did you see my paste? Is there a problem with the encoding header I used? I'm a bit new to non-ascii strings, etc.
Eed5 is now known as C0deMaver1ck
<jeebster> well shucks, I'm reading the 1.9.3 docs
<jeebster> facepalm
<jeebster> and I'm on 1.9.2
<Hanmac> you need index
<Hanmac> or an newer ruby
_marvin has quit [Quit: Connection closed for inactivity]
<jeebster> lol, yup
<jeebster> sorry, that was dumb
td123 has quit [Read error: Connection reset by peer]
<Hanmac> no ... dumb is using 1.8 and dont want to update
<jeebster> ha, I agree. I have a few different projects I'm working on and unfortunately one is still running 1.8 with rails 2.3
<jeebster> we're due for an upgrade anytime now...
<ctevie> Rubinista: lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): IO#tty? of Windows has been fixed at r29969.
itnomad has joined #ruby
<jeebster> have a good weekend everyone, peace
jeebster has quit [Quit: Leaving.]
tommyvyo has quit [Quit: Computer has gone to sleep.]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
carloslopes has quit [Quit: Leaving]
prtksxna has joined #ruby
prtksxna_ has quit [Read error: Connection reset by peer]
fbernier has quit [Ping timeout: 246 seconds]
<Rubinista> ctevie: That says it's a cmdline thing. This happens from a file.
pdtpatrick has quit [Quit: pdtpatrick]
<ctevie> Rubinista: that's all I found.
<Rubinista> ctevie: Yeah, okay.
DRCALKIN has quit [Ping timeout: 245 seconds]
LBRapid has quit [Quit: Farewell...]
nwo6 has joined #ruby
BrokenCog has quit [Quit: leaving]
thecreators has joined #ruby
<nwo6> Is any one there
wvms has quit [Read error: Connection reset by peer]
khakimov has quit [Ping timeout: 250 seconds]
wvms has joined #ruby
khakimov has joined #ruby
Solnse has quit []
nwo6 has quit [Client Quit]
jenrzzz-mac has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
_marvin has joined #ruby
adambeynon has quit [Quit: adambeynon]
joshman_ has quit [Ping timeout: 246 seconds]
xnm has joined #ruby
ph^ has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined]
mengu has joined #ruby
scb has joined #ruby
scb has quit [Remote host closed the connection]
<shevy> lol
<shevy> even 671 in the channel
foofoobar has joined #ruby
pdtpatrick has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
azm has quit [Ping timeout: 245 seconds]
choffstein has joined #ruby
<seanstickle> We're all out at dinner.
<seanstickle> Check back tomorrow.
scb has joined #ruby
scb has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
manizzle has joined #ruby
tommyvyo has joined #ruby
internet_user has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
sspiff has quit [Ping timeout: 246 seconds]
rippa has quit [Ping timeout: 244 seconds]
jchauncey has quit [Quit: jchauncey]
kvirani has quit [Remote host closed the connection]
sohocoke has quit [Quit: Computer has gone to sleep.]
<cek> Will invoking the same method in the same context be optimized out to 1 such method invokation and "referecing" the result through local var?
brngardner has joined #ruby
foofoobar has quit [Quit: Computer has gone to sleep]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
dv310p3r has quit [Read error: Operation timed out]
kenichi has quit [Remote host closed the connection]
itnomad has quit [Ping timeout: 245 seconds]
jrist is now known as jrist-out
demian`_ has joined #ruby
sohocoke has joined #ruby
<Rubinista> cek: def test ; something_expensive(); something_expensive() ; end ... will it call something_expensive() twice? Yes. It can't tell if you want any side-effects in that method so unless you specifically cache the result it can't help you.
banseljaj is now known as imami|afk
<cek> Rubinista, that ain't an expensive method, but it accesses external of method data
<cek> method doesnt take any args
<Rubinista> You mean yours isn't expensive but touches (reads?) external data or resources?
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
davidpk has quit [Quit: Computer has gone to sleep.]
macmartine has quit [Quit: macmartine]
workmad3 has joined #ruby
hippyphysicist has joined #ruby
hippyphysicist has quit [Remote host closed the connection]
kenichi has joined #ruby
silky__ has joined #ruby
zastaph has quit []
jaystay has quit [Quit: jaystay]
BrokenCog has joined #ruby
robdodson_ has joined #ruby
robdodson_ has quit [Client Quit]
dtang has quit [Quit: dtang]
malcolmva has quit [Ping timeout: 276 seconds]
bbttxu has quit [Quit: bbttxu]
robdodson has quit [Ping timeout: 260 seconds]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
ddv has quit [Quit: *poof*]
schovi has quit [Remote host closed the connection]
banghouse has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
kuranai is now known as kuranai|off
davidpk has joined #ruby
billiamii| has quit []
aaroncm has quit [Remote host closed the connection]
aaroncm has joined #ruby
cpruitt has quit [Quit: cpruitt]
yankov has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Synthead has quit [Quit: p33 ba115]
yxhuvud has quit [Ping timeout: 245 seconds]
headius has joined #ruby
pdtpatrick has quit [Read error: Connection reset by peer]
aaroncm has quit [Ping timeout: 246 seconds]
pdtpatrick has joined #ruby
jimeh has quit [Ping timeout: 252 seconds]
alanp has quit [Read error: Operation timed out]
kalleth has joined #ruby
xiaotian has joined #ruby
dcolebatch2 has quit [Quit: home]
<David_Mi1ler> anyone ever used URI or a similar library to parse relative hrefs from html anchors and turn then to absolute refs?
amalvagomes has quit [Quit: amalvagomes]
jimeh has joined #ruby
mikeric has joined #ruby
<relix> hey guys
<relix> I'm using RoR and I'm trying to generate a pretty version of JSON (human readable with indentations and linebreaks)
<relix> the only thing I find is that I should use JSON.pretty_generate
awarner has quit [Remote host closed the connection]
<relix> however when I try that out (in server or in console), it's all on one line (no linebreaks), so not pretty at all
<relix> even though every article on the web says this is the solution for linebreaks
cableray has quit [Quit: cableray]
stkowski has quit [Quit: stkowski]
thola has joined #ruby
workmad3 has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<xnm> relix: in the console, try puts JSON.pretty_generate
<relix> xnm: yeah that's what I mean when I say I tried it out in teh console :)
<relix> AH
<jadon> what about using to_yaml.
jjjj has joined #ruby
jmontross has joined #ruby
<relix> apparently Rails interferes and actually returns a ActiveSupport::HashWithIndifferentAccess instead of a Hash
<jmontross> shock3r!
<relix> calling .to_hash on it first makes it work
<relix> jmontross: :)
<relix> well thanks for looking guys, sorry to waste your time!
<jjjj> rails is filled with gotchyas - mostly pleasant as you learn to use it :|
thecreators has quit [Quit: thecreators]
nowthatsamatt has joined #ruby
<relix> jjjj: yeah, it's hard to keep all the magic in your head while you're working it
pdtpatrick has quit [Read error: Connection reset by peer]
kvirani has joined #ruby
davidcelis has joined #ruby
Shamgar has joined #ruby
PaciFisT1 has quit [Quit: Leaving.]
Monie has quit [Read error: Connection reset by peer]
pdtpatrick has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
headius has quit [Quit: headius]
dkissell_ has joined #ruby
stephenjudkins has joined #ruby
walbert has quit []
slimjimflim has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
theRoUS has quit [Ping timeout: 260 seconds]
Zolrath has joined #ruby
dkissell has quit [Ping timeout: 256 seconds]
dkissell_ is now known as dkissell
alanp has joined #ruby
piotr_ has quit [Remote host closed the connection]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
fubada has joined #ruby
hydrozen has quit [Quit: Computer has gone to sleep.]
MasterIdler has quit [Ping timeout: 265 seconds]
headius has joined #ruby
akem has joined #ruby
akem has joined #ruby
bbttxu has joined #ruby
<fubada> yo people
<fubada> can God be used as a scheduler
<fubada> down to the second?
deobald__ has joined #ruby
Carson__ has joined #ruby
savage-_ has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
savage- has quit [Ping timeout: 250 seconds]
C0deMaver1ck has quit [Remote host closed the connection]
BigFatFatty has quit [Quit: leaving]
goodieboy has joined #ruby
gmci has joined #ruby
<xnm> fubada: God can do anything He wants, didn't you know?
<fubada> yea
<fubada> xept he cant manage those finanaces
<fubada> and he needs $$$
nowthatsamatt has quit [Quit: nowthatsamatt]
jchauncey has joined #ruby
<xnm> is that why he keeps smiting me? cause i don't give him any?
jchauncey has quit [Client Quit]
cek has quit [Quit: жопа диридай диридиридай]
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
vitor-br has joined #ruby
EspadaV8 has joined #ruby
amalvagomes has joined #ruby
vitor-br has quit [Max SendQ exceeded]
vitor-br has joined #ruby
workmad3 has quit [Quit: leaving]
uris has quit [Quit: leaving]
thola has quit [Ping timeout: 245 seconds]
Chryson has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
oooPaul has quit [Quit: Ciao for now!]
<davidcelis> there is no god
<David_Mi1ler> nil
<davidcelis> correct, that is what is returned from `god.present?`
mikeric has quit [Quit: mikeric]
cordoval has joined #ruby
Progster has quit [Ping timeout: 244 seconds]
artOfWar_ has quit [Remote host closed the connection]
nilg` has quit [Remote host closed the connection]
havenn has joined #ruby
tatsuya_o has joined #ruby
tomzx has joined #ruby
carlyle has quit [Remote host closed the connection]
cordoval has left #ruby [#ruby]
b1rkh0ff has quit [Ping timeout: 256 seconds]
shadoi has quit [Remote host closed the connection]
shadoi has joined #ruby
shadoi has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
harukomoto has quit [Ping timeout: 244 seconds]
tatsuya_o has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
jgarvey has quit [Quit: Leaving]
<razer123> Can anyone tell me how to get a terminal prompt inside RubyMine? Is taht possible?
benatwork has quit [Remote host closed the connection]
v0n has quit [Quit: Quitte]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
havenn has quit [Remote host closed the connection]
stephenjudkins_ has joined #ruby
<EspadaV8> in a if statement how come the second part of an || gets tested if the first part is already true?
<EspadaV8> e.g. if (!defined?(parent) && p.root?) || (p.parent == parent)
<seanstickle> EspadaV8: it doesn't
<EspadaV8> i get an error 'parent is undefined'
stephenjudkins has quit [Ping timeout: 256 seconds]
stephenjudkins_ is now known as stephenjudkins
roams has quit [Ping timeout: 245 seconds]
jenrzzz-mac has joined #ruby
<EspadaV8> !defined?(parent) has to be true (otherwise i wouldn't get the error) and testing p.root? by itself shows that is also true
<EspadaV8> so those 2 should && to true and then the if should just carry on, shouldn't it?
<EspadaV8> ah ha, got it, i'm a tool
deobald__ has quit [Ping timeout: 260 seconds]
Manhose has joined #ruby
adamkitt_ has joined #ruby
<Manhose> Hey guys, my problem is on a rails app but it's mostly a ruby issue
<Manhose> When I POST to my Api::SessionsController
<Manhose> it says it can't find my Api::BaseController
<Manhose> (BTW, Api::SessionsController < Api::BaseController, obviously)
<burgestrand> What’s the opposite of haste?
goodieboy has quit [Remote host closed the connection]
<Manhose> sluggishness
<Manhose> I'd say
<burgestrand> slugbin!
<burgestrand> (it’s not loading for me :p)
kirun has quit [Quit: Client exiting]
<TheHunter_1039> when exporting environment variables in your .rvmrc are you supposed to wrap strings in quotation marks?
<Manhose> sigh... gonna up it to pastie
Carson__ has quit [Ping timeout: 245 seconds]
<Manhose> burgestrand: http://pastie.org/3968806
td123 has joined #ruby
<burgestrand> Manhose: base_constroller
<Manhose> Idiot me
<Manhose> I feel like swearing
<Manhose> can I swear on here?
andrewjf has joined #ruby
adamkittelson has quit [Ping timeout: 252 seconds]
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-dev)]
<Manhose> thanks burgestrand, seriously
<Manhose> what a damned idiot
andrewjf has quit [Client Quit]
<burgestrand> :)
n8ji has joined #ruby
davidcelis has quit [Quit: K-Lined]
Cicloid has quit [Remote host closed the connection]
Cicloid has joined #ruby
DRCALKIN has joined #ruby
adamkitt_ has quit [Ping timeout: 244 seconds]
goodieboy has joined #ruby
Cicloid_ has joined #ruby
DRCALKIN has quit [Client Quit]
niku4i has joined #ruby
Cicloid_ has quit [Remote host closed the connection]
niklasb has quit [Read error: Operation timed out]
jobicoppola has joined #ruby
Cicloid has quit [Ping timeout: 246 seconds]
niku4i has quit [Remote host closed the connection]
adamkittelson has joined #ruby
gchristensen has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
<gchristensen> Hi, what is the ||= operator? my google-fu thinks || is a boolean search operator
S1kx has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
S2kx has quit [Ping timeout: 245 seconds]
fayimora has quit [Ping timeout: 244 seconds]
Ttech is now known as cowmoo
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
adamkitt_ has joined #ruby
cowmoo is now known as Ttech
niklasb has joined #ruby
fayimora has joined #ruby
<seanstickle> gchristensen: look for "conditional assignment"
<gchristensen> okay, thank you seanstickle
kvirani has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
adamkittelson has quit [Ping timeout: 244 seconds]
zeromodulus has joined #ruby
zeromodu_ has joined #ruby
ten00 has joined #ruby
ten00 has left #ruby [#ruby]
aaroncm has joined #ruby
bosphorus has quit [Remote host closed the connection]
iocor has quit [Quit: Computer has gone to sleep.]
zeromodulus has quit [Ping timeout: 260 seconds]
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
aaroncm has quit [Remote host closed the connection]
ilyam has quit [Ping timeout: 248 seconds]
sohocoke has quit [Quit: Computer has gone to sleep.]