bitZero__ has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 252 seconds]
petey has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 276 seconds]
<volty>
extremely ugly :)
BillCriswell has joined #ruby
einarj has quit [Ping timeout: 248 seconds]
Popple has quit [Quit: Computer has gone to sleep.]
<bnagy>
well the logic seems a bit backwards, but I dunno the whole app and I suspect it's webby so I don't want to :)
Lewix has quit [Remote host closed the connection]
jbrechtel has quit [Ping timeout: 264 seconds]
<endash>
that #each option seems identical to #find
<volty>
map is wrong with this example
<bnagy>
endash: no, cause each lets you break with the object you construct
<endash>
ah good point
<bnagy>
find would return the klass, which imho is still fine, but it would be duplicated work
mary5030 has joined #ruby
* endash
nods
<bnagy>
cause you'd have to find the class then recreate the object outside the block
maletor has joined #ruby
<lunks>
The problem is that each doesn't return the object.
petey has joined #ruby
quazimodo has quit [Ping timeout: 264 seconds]
<bnagy>
you need to explicitly break with it, like I have there
SeySayux has joined #ruby
<bnagy>
otherwise each will return the whole collection once it's done
Kamijou_Touma has quit [Quit: yawn]
<lunks>
oh
<lunks>
Yeah, it works
<lunks>
Still not pretty, but ok
agjacome has quit [Quit: leaving]
eka has joined #ruby
<bnagy>
right lunchtime
<volty>
strange way of testing the one where you have to initialize the object (with just the 'user') to see if it matches
|jemc| has quit [Ping timeout: 245 seconds]
amacgregor_ has quit [Read error: Connection reset by peer]
randomautomator has joined #ruby
Stygia has quit [Quit: Leaving]
Davey has joined #ruby
paulodiniz has quit [Quit: paulodiniz]
lunks has quit [Ping timeout: 245 seconds]
randomautomator has quit [*.net *.split]
larissa has quit [*.net *.split]
v0n has quit [*.net *.split]
workmad3 has quit [*.net *.split]
randomnick_ has quit [*.net *.split]
mephux has quit [*.net *.split]
endash has quit [*.net *.split]
pygospa has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
Deele has quit [*.net *.split]
sarkis has quit [*.net *.split]
osvico has quit [*.net *.split]
JohnBat26 has quit [*.net *.split]
roadt has quit [*.net *.split]
lectrick has quit [*.net *.split]
s0ber has quit [*.net *.split]
awkisopen has quit [*.net *.split]
soulcake has quit [*.net *.split]
icco has quit [*.net *.split]
Kelet has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
jaynewst_ has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
thelamest has quit [*.net *.split]
timmow has quit [*.net *.split]
Gadgetoid has quit [*.net *.split]
Caius has quit [*.net *.split]
kreisys has quit [*.net *.split]
cads has quit [*.net *.split]
hiyosi has quit [*.net *.split]
AndChat| has quit [*.net *.split]
i8igmac has quit [*.net *.split]
Cork has quit [*.net *.split]
Fuzai has quit [*.net *.split]
[0x1a]_ has quit [*.net *.split]
jmccune has quit [*.net *.split]
existensil has quit [*.net *.split]
adnils has quit [*.net *.split]
Jdubs has quit [*.net *.split]
SeySayux has quit [*.net *.split]
Kricir has quit [*.net *.split]
bricker`LA has quit [*.net *.split]
rcs has quit [*.net *.split]
yacks has quit [*.net *.split]
Desert_eagle has quit [*.net *.split]
anekos has quit [*.net *.split]
moshee has quit [*.net *.split]
greenrose1 has quit [*.net *.split]
karlfreeman has quit [*.net *.split]
maroloccio has quit [*.net *.split]
hakunin has quit [*.net *.split]
nomadic has quit [*.net *.split]
notbrent_ has quit [*.net *.split]
Xuerian has quit [*.net *.split]
kevinfagan has quit [*.net *.split]
jacobat has quit [*.net *.split]
Tricon has quit [*.net *.split]
Kneferilis has quit [*.net *.split]
DaZ has quit [*.net *.split]
marcgg_ has quit [*.net *.split]
Nilium has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
braincra- has quit [*.net *.split]
epta has quit [*.net *.split]
madhatter has quit [*.net *.split]
FDj has quit [*.net *.split]
spacemud has quit [*.net *.split]
ping-pong has quit [*.net *.split]
wlanboy has quit [*.net *.split]
SJr has quit [*.net *.split]
eoinkelly has quit [*.net *.split]
KobraKao has quit [*.net *.split]
Muz has quit [*.net *.split]
defrag has quit [*.net *.split]
beilabs_ has quit [*.net *.split]
preller has quit [*.net *.split]
marsLantern has quit [*.net *.split]
labrat__ has quit [*.net *.split]
keyvan_ has quit [*.net *.split]
justinweiss has quit [*.net *.split]
scottstamp has quit [*.net *.split]
guiguidoc has quit [*.net *.split]
moted has quit [*.net *.split]
user258467 has quit [*.net *.split]
ged has quit [*.net *.split]
deavid has quit [*.net *.split]
Coolhand has quit [*.net *.split]
wchun has quit [*.net *.split]
sumark has quit [*.net *.split]
zz_dbRenaud has quit [*.net *.split]
didlix has quit [*.net *.split]
lewellyn has quit [*.net *.split]
zeroXten has quit [*.net *.split]
lancepantz has quit [*.net *.split]
mpereira_ has quit [*.net *.split]
zerun0 has quit [*.net *.split]
spike|spiegel has quit [*.net *.split]
TheHodge has quit [*.net *.split]
rotor has quit [*.net *.split]
riginding has quit [*.net *.split]
zzak has quit [*.net *.split]
klaas has quit [*.net *.split]
Bry8Star{T2 has quit [*.net *.split]
blackmesa has quit [*.net *.split]
atmosx has quit [*.net *.split]
Boohbah has quit [*.net *.split]
Kabaka has quit [*.net *.split]
linduxed has quit [*.net *.split]
quoin has quit [*.net *.split]
volty has quit [*.net *.split]
zero7 has quit [*.net *.split]
nignaztic has quit [*.net *.split]
atno has quit [*.net *.split]
Columcille has quit [*.net *.split]
babinho has quit [*.net *.split]
Targen has quit [*.net *.split]
brisbin has quit [*.net *.split]
vadviktor has quit [*.net *.split]
vadviktor_ has quit [*.net *.split]
kevinykchan has quit [*.net *.split]
cpruitt has quit [*.net *.split]
Guest60186 has quit [*.net *.split]
jrobeson has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
freakazoid0223 has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
brugidou has quit [*.net *.split]
kstephens has quit [*.net *.split]
maloik has quit [*.net *.split]
matchaw has quit [*.net *.split]
dekz has quit [*.net *.split]
TwinkleHood has quit [*.net *.split]
utkarsh has quit [*.net *.split]
Fraeon has quit [*.net *.split]
eregon has quit [*.net *.split]
ozzloy has quit [*.net *.split]
sixteneighty has quit [*.net *.split]
thomasvs has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
yannickoo has quit [*.net *.split]
brandon has quit [*.net *.split]
AntelopeSalad has quit [*.net *.split]
xpirator has quit [*.net *.split]
[Neurotic] has quit [*.net *.split]
Rylee has quit [*.net *.split]
eval-in has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
jgrevich has quit [*.net *.split]
rondale_sc has quit [*.net *.split]
GeissT has quit [*.net *.split]
zorg24 has quit [*.net *.split]
apeiros has quit [*.net *.split]
alx- has quit [*.net *.split]
The-Mad-Pirate has quit [*.net *.split]
Spami has quit [*.net *.split]
lkba has quit [*.net *.split]
davidcelis has quit [*.net *.split]
r0bglees0n has quit [*.net *.split]
mattp_ has quit [*.net *.split]
mmm has quit [*.net *.split]
zodiak has quit [*.net *.split]
banister`sleep has quit [*.net *.split]
Beoran__ has quit [*.net *.split]
`MArceLL` has quit [*.net *.split]
mlue has quit [*.net *.split]
s00pcan has quit [*.net *.split]
g0bl1n has quit [*.net *.split]
Suit_Of_Sables has quit [*.net *.split]
pontiki has quit [*.net *.split]
flori has quit [*.net *.split]
undert- has quit [*.net *.split]
emdub_ has quit [*.net *.split]
geggam has quit [*.net *.split]
eka has quit [*.net *.split]
mary5030 has quit [*.net *.split]
Hanmac1 has quit [*.net *.split]
raphaelivan has quit [*.net *.split]
banghous_ has quit [*.net *.split]
crazymykl has quit [*.net *.split]
dnyy has quit [*.net *.split]
erichmenge has quit [*.net *.split]
radpanda has quit [*.net *.split]
fourq has quit [*.net *.split]
mrapple has quit [*.net *.split]
TomRone has quit [*.net *.split]
davidboy has quit [*.net *.split]
nemesit|znc has quit [*.net *.split]
Domon_ has quit [*.net *.split]
karnowski has quit [*.net *.split]
awarner has quit [*.net *.split]
araujo has quit [*.net *.split]
MJBrune has quit [*.net *.split]
Gate has quit [*.net *.split]
wmoxam has quit [*.net *.split]
matrixise has quit [*.net *.split]
katherinem13 has quit [*.net *.split]
joast has quit [*.net *.split]
classix has quit [*.net *.split]
Todd has quit [*.net *.split]
xybre has quit [*.net *.split]
polaco has quit [*.net *.split]
DrForr has quit [*.net *.split]
__main__ has quit [*.net *.split]
drago777 has quit [*.net *.split]
darkc0met has quit [*.net *.split]
lsmola has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
kpwz has quit [*.net *.split]
cout has quit [*.net *.split]
TheSpectre has quit [*.net *.split]
ccooke has quit [*.net *.split]
obiwahn has quit [*.net *.split]
soukihei has quit [*.net *.split]
tonini has quit [*.net *.split]
Elfix_113 has quit [*.net *.split]
epsylon has quit [*.net *.split]
xefi_ has quit [*.net *.split]
indigo has quit [*.net *.split]
juo has quit [*.net *.split]
maZtah has quit [*.net *.split]
drizz has quit [*.net *.split]
kennyvb_ has quit [*.net *.split]
tonni has quit [*.net *.split]
ThePicard has quit [*.net *.split]
canton7 has quit [*.net *.split]
Guest96486 has quit [*.net *.split]
C0deMaver1ck has quit [*.net *.split]
LBRapid has quit [*.net *.split]
jeekl has quit [*.net *.split]
mdst has quit [*.net *.split]
m_3 has quit [*.net *.split]
mumblerit has quit [*.net *.split]
shtirlic_ has quit [*.net *.split]
BeanDip__ has quit [*.net *.split]
casheew_ has quit [*.net *.split]
jalcine has quit [*.net *.split]
ereslibre has quit [*.net *.split]
aalmenar has quit [*.net *.split]
derf- has quit [*.net *.split]
justinmcp has quit [*.net *.split]
slash_nick has quit [*.net *.split]
Brando753 has quit [*.net *.split]
klip has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
priyam_ has quit [*.net *.split]
kennym has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
germanstudent has quit [*.net *.split]
gsvolt has quit [*.net *.split]
gregj has quit [*.net *.split]
parus has quit [*.net *.split]
telling has quit [*.net *.split]
brjannc has quit [*.net *.split]
go|dfish has quit [*.net *.split]
lupine has quit [*.net *.split]
Lorn has quit [*.net *.split]
sirecote has quit [*.net *.split]
matti has quit [*.net *.split]
hellome has quit [*.net *.split]
crazysim has quit [*.net *.split]
ixx has quit [*.net *.split]
petey has quit [*.net *.split]
maletor has quit [*.net *.split]
xk_id has quit [*.net *.split]
Liothen has quit [*.net *.split]
agent_white has quit [*.net *.split]
robert__ has quit [*.net *.split]
xiphias has quit [*.net *.split]
k0rupted has quit [*.net *.split]
XenoWolf has quit [*.net *.split]
framling has quit [*.net *.split]
autumn has quit [*.net *.split]
jericon has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
Guest35381 has quit [*.net *.split]
daveops has quit [*.net *.split]
dominikh has quit [*.net *.split]
Scient has quit [*.net *.split]
ahuman_ has quit [*.net *.split]
bmn has quit [*.net *.split]
elektronaut has quit [*.net *.split]
vaicine has quit [*.net *.split]
sindork has quit [*.net *.split]
mroth has quit [*.net *.split]
sweeper has quit [*.net *.split]
binw has quit [*.net *.split]
jayne has quit [*.net *.split]
jcarouth has quit [*.net *.split]
epic has quit [*.net *.split]
iaj has quit [*.net *.split]
mburns has quit [*.net *.split]
setient has quit [*.net *.split]
rien has quit [*.net *.split]
shaileshg has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
homelinen has quit [*.net *.split]
Bourbon has quit [*.net *.split]
Alasdairrr has quit [*.net *.split]
bier has quit [*.net *.split]
enriclluelles has quit [*.net *.split]
havenwood has quit [*.net *.split]
ehaliewicz has quit [*.net *.split]
idoru has quit [*.net *.split]
shanlar has quit [*.net *.split]
Niamkik_ has quit [*.net *.split]
x0nic has quit [*.net *.split]
trinode_away has quit [*.net *.split]
_nate has quit [*.net *.split]
fuleo has quit [*.net *.split]
ninegrid has quit [*.net *.split]
dziga has quit [*.net *.split]
elaptics`away has quit [*.net *.split]
miah has quit [*.net *.split]
Blue_Ice_ has quit [*.net *.split]
QKO_ has quit [*.net *.split]
rackburn has quit [*.net *.split]
contradictioned_ has quit [*.net *.split]
tov_ has quit [*.net *.split]
three18ti has quit [*.net *.split]
pikapp has quit [*.net *.split]
lepht_afk has quit [*.net *.split]
gstamp has quit [*.net *.split]
tommyblu` has quit [*.net *.split]
karupa64 has quit [*.net *.split]
eshy has quit [*.net *.split]
cibs has quit [*.net *.split]
Davey has quit [*.net *.split]
jduan1981 has quit [*.net *.split]
lsoa has quit [*.net *.split]
sniffingcats has quit [*.net *.split]
fuhgeddaboudit has quit [*.net *.split]
Sel has quit [*.net *.split]
floridities87 has quit [*.net *.split]
tomzx_mac has quit [*.net *.split]
radic has quit [*.net *.split]
wesside_ has quit [*.net *.split]
CalvinnHobbes has quit [*.net *.split]
devyn has quit [*.net *.split]
JZTech101 has quit [*.net *.split]
martxel has quit [*.net *.split]
guyz has quit [*.net *.split]
Bosox20051 has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
Scorchin has quit [*.net *.split]
ericwood has quit [*.net *.split]
hamakn has quit [*.net *.split]
wudofyr has quit [*.net *.split]
Galgorth has quit [*.net *.split]
ndngvr` has quit [*.net *.split]
allanm has quit [*.net *.split]
Xanderby has quit [*.net *.split]
gallon|w has quit [*.net *.split]
chihhsin has quit [*.net *.split]
JesseH has quit [*.net *.split]
ce_afk has quit [*.net *.split]
keee has quit [*.net *.split]
rtl_ has quit [*.net *.split]
dayepa has quit [*.net *.split]
Asher has quit [*.net *.split]
chinkung has quit [*.net *.split]
froy has quit [*.net *.split]
sethetter has quit [*.net *.split]
micah` has quit [*.net *.split]
Guest19968 has quit [*.net *.split]
tewmten has quit [*.net *.split]
TheNumb has quit [*.net *.split]
ejnahc has quit [*.net *.split]
epochwolf has quit [*.net *.split]
mist has quit [*.net *.split]
Schuy13r has quit [*.net *.split]
denken has quit [*.net *.split]
Koshian has quit [*.net *.split]
zastern has quit [*.net *.split]
wallerdev has quit [*.net *.split]
forced_request has quit [*.net *.split]
devoldmx has quit [*.net *.split]
niftylettuce has quit [*.net *.split]
ix007 has quit [*.net *.split]
JumpMast3r has quit [*.net *.split]
zarul has quit [*.net *.split]
qhartman has quit [*.net *.split]
strax has quit [*.net *.split]
nhhagen has quit [*.net *.split]
jsaak has quit [*.net *.split]
Anarch has quit [*.net *.split]
wyan has quit [*.net *.split]
JoeHazzers has quit [*.net *.split]
ggherdov has quit [*.net *.split]
mikemar10 has quit [*.net *.split]
Skelz0r_ has quit [*.net *.split]
moeSeth__ has quit [*.net *.split]
Nex7 has quit [*.net *.split]
chuck_ has quit [*.net *.split]
rblackwe_ has quit [*.net *.split]
redgetan has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
the_mentat has quit [*.net *.split]
dross has quit [*.net *.split]
DefV has quit [*.net *.split]
eliasp has quit [*.net *.split]
DanielRb has quit [*.net *.split]
jachymko has quit [*.net *.split]
wang has quit [*.net *.split]
cson has quit [*.net *.split]
Kudos has quit [*.net *.split]
mahlon has quit [*.net *.split]
wuest has quit [*.net *.split]
Jb____ has quit [*.net *.split]
bakedb has quit [*.net *.split]
ReinH has quit [*.net *.split]
Mattias has quit [*.net *.split]
Kovensky has quit [*.net *.split]
adamholt has quit [*.net *.split]
jglauche has quit [*.net *.split]
neektza1 has quit [*.net *.split]
Sourceless has quit [*.net *.split]
crazed has quit [*.net *.split]
Nuck has quit [*.net *.split]
xargoon has quit [*.net *.split]
Rydekull has quit [*.net *.split]
jbc22 has quit [*.net *.split]
fearoffish has quit [*.net *.split]
patronus has quit [*.net *.split]
johnjay1 has quit [*.net *.split]
destructure has quit [*.net *.split]
shaman42 has quit [*.net *.split]
fbernier has quit [*.net *.split]
phantomcircuit has quit [*.net *.split]
oz has quit [*.net *.split]
Morrolan has quit [*.net *.split]
blkcrwn has quit [*.net *.split]
aboudreault has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
skinny_much has quit [*.net *.split]
musl has quit [*.net *.split]
dv_ has quit [*.net *.split]
julian-delphiki has quit [*.net *.split]
flowerhack has quit [*.net *.split]
ned has quit [*.net *.split]
paul__k has quit [*.net *.split]
bartj3 has quit [*.net *.split]
airtonix has quit [*.net *.split]
tr4656 has quit [*.net *.split]
jso has quit [*.net *.split]
spacebug has quit [*.net *.split]
ckrailo has quit [*.net *.split]
stnly has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
darrik has quit [*.net *.split]
Nahra has quit [*.net *.split]
reactormonk has quit [*.net *.split]
DylanJ has quit [*.net *.split]
marienz has quit [*.net *.split]
octarine has quit [*.net *.split]
jeremyb has quit [*.net *.split]
duke_nukem has quit [*.net *.split]
asuka has quit [*.net *.split]
Aloysius1 has quit [*.net *.split]
blz37 has quit [*.net *.split]
zeusmns has quit [*.net *.split]
kitak has quit [*.net *.split]
closer has quit [*.net *.split]
BillCriswell has quit [*.net *.split]
get9 has quit [*.net *.split]
thepumpkin has quit [*.net *.split]
baroquebobcat has quit [*.net *.split]
Kruppe has quit [*.net *.split]
sophomorical has quit [*.net *.split]
Anderson has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
jpinnix has quit [*.net *.split]
UForgotten has quit [*.net *.split]
taion809 has quit [*.net *.split]
yasu has quit [*.net *.split]
alo1 has quit [*.net *.split]
swistak35 has quit [*.net *.split]
kenichi has quit [*.net *.split]
graft has quit [*.net *.split]
robwilliamsukio has quit [*.net *.split]
sebastianb has quit [*.net *.split]
oddraisin has quit [*.net *.split]
hanoi has quit [*.net *.split]
yonahw_ has quit [*.net *.split]
awpti has quit [*.net *.split]
arusso has quit [*.net *.split]
Dwarf has quit [*.net *.split]
zaltekk has quit [*.net *.split]
jmaister has quit [*.net *.split]
ryanf has quit [*.net *.split]
voodoofish has quit [*.net *.split]
creature has quit [*.net *.split]
chxane has quit [*.net *.split]
psyprus has quit [*.net *.split]
audibleblink has quit [*.net *.split]
farn has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
wormwood has quit [*.net *.split]
dlind has quit [*.net *.split]
conceal_rs_____0 has quit [*.net *.split]
bugsinlights has quit [*.net *.split]
robustus has quit [*.net *.split]
jan1337z has quit [*.net *.split]
seoNinjaWarrior has quit [*.net *.split]
Akuma has quit [*.net *.split]
Catie has quit [*.net *.split]
aspiers has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
blooberr_ has quit [*.net *.split]
aliljet has quit [*.net *.split]
Davedo has quit [*.net *.split]
fryguy has quit [*.net *.split]
matled has quit [*.net *.split]
lewiz has quit [*.net *.split]
Bish has quit [*.net *.split]
oddalot has quit [*.net *.split]
MrZYX|off has quit [*.net *.split]
cucumbrman has quit [*.net *.split]
aef_ has quit [*.net *.split]
gf3 has quit [*.net *.split]
mfilipe has quit [*.net *.split]
willb1 has quit [*.net *.split]
Zespre has quit [*.net *.split]
avelldiroll has quit [*.net *.split]
falten has quit [*.net *.split]
krnflake has quit [*.net *.split]
mjmac has quit [*.net *.split]
edwardly has quit [*.net *.split]
calmyournerves has quit [*.net *.split]
KillerFox has quit [*.net *.split]
Rix has quit [*.net *.split]
qz has quit [*.net *.split]
phreax has quit [*.net *.split]
orionstein_away has quit [*.net *.split]
Rennex has quit [*.net *.split]
robaman has quit [*.net *.split]
BombStrike has quit [*.net *.split]
jtperreault has quit [*.net *.split]
felipe has quit [*.net *.split]
tomaw has quit [*.net *.split]
ayonix has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
Azure has quit [*.net *.split]
james_woods has quit [*.net *.split]
metallisto has quit [*.net *.split]
BrianJ has quit [*.net *.split]
fridim__ has quit [*.net *.split]
Quashie has quit [*.net *.split]
felixjet__ has quit [*.net *.split]
Cyrus has quit [*.net *.split]
chuk_ has quit [*.net *.split]
snath has quit [*.net *.split]
joshu has quit [*.net *.split]
swordsmanz has quit [*.net *.split]
brian` has quit [*.net *.split]
aggregatebot has quit [*.net *.split]
plotter has quit [*.net *.split]
angelixd has quit [*.net *.split]
gtc has quit [*.net *.split]
Killerkeksdose has quit [*.net *.split]
Mnemon has quit [*.net *.split]
pinage404 has quit [*.net *.split]
awc737_ has quit [*.net *.split]
ainame has quit [*.net *.split]
DanKnox_away has quit [*.net *.split]
faulkner has quit [*.net *.split]
RDash[AW] has quit [*.net *.split]
lessless has quit [*.net *.split]
ItSANgo has quit [*.net *.split]
duracrisis has quit [*.net *.split]
yano has quit [*.net *.split]
kloeri has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
DandyPandy has quit [*.net *.split]
supki has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
tafryn has quit [*.net *.split]
jellow has quit [*.net *.split]
fred has quit [*.net *.split]
Snow- has quit [*.net *.split]
monomyth has quit [*.net *.split]
terlar has quit [*.net *.split]
regedarek has quit [*.net *.split]
yellow5 has quit [*.net *.split]
finges has quit [*.net *.split]
daaaan_ has quit [*.net *.split]
huoxito has quit [*.net *.split]
nerdy has quit [*.net *.split]
sirupsen has quit [*.net *.split]
dmiller has quit [*.net *.split]
Xeago has quit [*.net *.split]
clov3r has quit [*.net *.split]
tehKitten has quit [*.net *.split]
nbouscal has quit [*.net *.split]
crodas has quit [*.net *.split]
fivethre1o has quit [*.net *.split]
hmsimha has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
caveat- has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
Roa has quit [*.net *.split]
phrog has quit [*.net *.split]
cam`_ has quit [*.net *.split]
bw_ has quit [*.net *.split]
RTG` has quit [*.net *.split]
speakingcode-wor has quit [*.net *.split]
Lindrian has quit [*.net *.split]
joschi has quit [*.net *.split]
zmansiv has quit [*.net *.split]
aaroncm_ has quit [*.net *.split]
wereHamster has quit [*.net *.split]
JStoker has quit [*.net *.split]
dubios has quit [*.net *.split]
tchebb has quit [*.net *.split]
TTilus has quit [*.net *.split]
Tarential has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
gregorg has quit [*.net *.split]
z has quit [*.net *.split]
cub1c has quit [*.net *.split]
xsdg has quit [*.net *.split]
nw_ has quit [*.net *.split]
Veejay has quit [*.net *.split]
mostlybadfly has quit [*.net *.split]
sam113101 has quit [*.net *.split]
peterhellberg has quit [*.net *.split]
mosez has quit [*.net *.split]
ichilton has quit [*.net *.split]
replay has quit [*.net *.split]
s2r2 has quit [*.net *.split]
djd has quit [*.net *.split]
diegok has quit [*.net *.split]
thejoecarroll has quit [*.net *.split]
fumduq has quit [*.net *.split]
thomas` has quit [*.net *.split]
jabular has quit [*.net *.split]
Patteh has quit [*.net *.split]
leehambley has quit [*.net *.split]
kaichanvong has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
BadQuanta has quit [*.net *.split]
riku- has quit [*.net *.split]
thesheff17 has quit [*.net *.split]
ajaxJK has quit [*.net *.split]
TDJACR has quit [*.net *.split]
Guest85414__ has quit [*.net *.split]
VTLob has quit [*.net *.split]
SirFunk has quit [*.net *.split]
bobdobbs has quit [*.net *.split]
average has quit [*.net *.split]
predator217 has quit [*.net *.split]
bluehavana has quit [*.net *.split]
heftig has quit [*.net *.split]
sailias has quit [*.net *.split]
jaimef has quit [*.net *.split]
rndstr has quit [*.net *.split]
mattyohe has quit [*.net *.split]
kapowaz has quit [*.net *.split]
denysonique has quit [*.net *.split]
ziyadb has quit [*.net *.split]
knigitz has quit [*.net *.split]
mark- has quit [*.net *.split]
jp- has quit [*.net *.split]
robonerd has quit [*.net *.split]
geoffw8__ has quit [*.net *.split]
cool has quit [*.net *.split]
shevy has quit [*.net *.split]
jimeh has quit [*.net *.split]
waxjar has quit [*.net *.split]
bricker`work has quit [*.net *.split]
Eiam has quit [*.net *.split]
seich- has quit [*.net *.split]
ghr has quit [*.net *.split]
nanoxd has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
jokke has quit [*.net *.split]
akhkharu has quit [*.net *.split]
Drakevr has quit [*.net *.split]
jinie has quit [*.net *.split]
blo has quit [*.net *.split]
tris has quit [*.net *.split]
Olipro has quit [*.net *.split]
AlSquire has quit [*.net *.split]
malcolmva has quit [*.net *.split]
abstractj has quit [*.net *.split]
drPoggs has quit [*.net *.split]
wookiehangover has quit [*.net *.split]
phutchins has quit [*.net *.split]
rgoodwin has quit [*.net *.split]
tessi has quit [*.net *.split]
m4rcu5 has quit [*.net *.split]
FMJaggy has quit [*.net *.split]
PhilK has quit [*.net *.split]
chiel has quit [*.net *.split]
stopbit has quit [*.net *.split]
cschneid has quit [*.net *.split]
dobry-den has quit [*.net *.split]
banzounet has quit [*.net *.split]
Martinez has quit [*.net *.split]
andredieb has quit [*.net *.split]
uxp has quit [*.net *.split]
Jelco___ has quit [*.net *.split]
dorei has quit [*.net *.split]
sepp2k1 has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
vim_shim has quit [*.net *.split]
aetaric has quit [*.net *.split]
tj`_ has quit [*.net *.split]
flagg0204_ has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
mgorbach has quit [*.net *.split]
Xiti has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
Paradox has quit [*.net *.split]
_br_ has quit [*.net *.split]
virtualize has quit [*.net *.split]
crus` has quit [*.net *.split]
mvangala has quit [*.net *.split]
Nanuq has quit [*.net *.split]
naquad has quit [*.net *.split]
bubbajones has quit [*.net *.split]
DonovanYoung has quit [*.net *.split]
gilesw_ has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
raar has quit [*.net *.split]
Trynemjoel has quit [*.net *.split]
randym_ has quit [*.net *.split]
machuga has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
rubyguy has quit [*.net *.split]
heidar has quit [*.net *.split]
Norrin has quit [*.net *.split]
hackeron_ has quit [*.net *.split]
RealMarc has quit [*.net *.split]
foobArrr has quit [*.net *.split]
Mekkis has quit [*.net *.split]
fcoury has quit [*.net *.split]
tethra has quit [*.net *.split]
fasta has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
Nightmare has quit [*.net *.split]
newton has quit [*.net *.split]
nuba has quit [*.net *.split]
peteyg_ has quit [*.net *.split]
Wasp has quit [*.net *.split]
prophile has quit [*.net *.split]
triptec has quit [*.net *.split]
sweet_kid has quit [Excess Flood]
kke has quit [Ping timeout: 351 seconds]
Schmidt has quit [Ping timeout: 351 seconds]
Amnesia has quit [Ping timeout: 372 seconds]
Tobarja has quit [Ping timeout: 414 seconds]
philtr has quit [Ping timeout: 372 seconds]
mick_laptop has quit [Ping timeout: 372 seconds]
maddog_ has quit [Ping timeout: 351 seconds]
ekarlso has quit [Ping timeout: 246 seconds]
bnagy has quit [Ping timeout: 246 seconds]
JMcAfreak has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
rehat has joined #ruby
jduan1981 has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 252 seconds]
jduan1981 has joined #ruby
nisstyre has joined #ruby
petey has quit [Remote host closed the connection]
enriclluelles has quit [Remote host closed the connection]
i_s has joined #ruby
robert_ has quit [Ping timeout: 252 seconds]
robert___ has joined #ruby
randomnick_ has quit [Quit: Leaving]
Cyrus has quit [Ping timeout: 248 seconds]
dagnachew has joined #ruby
Quashie_ has joined #ruby
kazuuu has joined #ruby
Quashie has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
i_s has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
tomzx_mac has quit [Quit: return 0;]
Quashie_ has quit [Ping timeout: 256 seconds]
BillCriswell has quit [Remote host closed the connection]
ehaliewicz has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
Beoran__ has quit [Read error: Connection reset by peer]
BillCriswell has joined #ruby
Beoran__ has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
BillCriswell has quit [Remote host closed the connection]
Quashie has joined #ruby
vim_shim has quit [Ping timeout: 245 seconds]
Quashie has quit [Ping timeout: 245 seconds]
Quashie has joined #ruby
marsLantern has quit [Quit: marsLantern]
jbrechtel has joined #ruby
Stalkr^ has joined #ruby
kaldrenon has joined #ruby
|jemc| has joined #ruby
cpruitt has quit [Quit: cpruitt]
robert___ is now known as robert_
awkisopen has quit [Ping timeout: 260 seconds]
xk_id has quit [Quit:
awkisopen has joined #ruby
Stalkr^ has quit [Ping timeout: 245 seconds]
wesside_ has quit [Ping timeout: 245 seconds]
kazuuu has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
kaldrenon has quit [Ping timeout: 256 seconds]
justsee has joined #ruby
marsLantern has joined #ruby
sailias has joined #ruby
Popple has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has joined #ruby
wesside has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
kazuuu has joined #ruby
kaspergrubbe has quit [Ping timeout: 252 seconds]
jbrechtel has quit [Remote host closed the connection]
randomautomator has joined #ruby
sevenseacat has joined #ruby
andredieb has quit [Ping timeout: 260 seconds]
nisstyre has quit [Ping timeout: 260 seconds]
randomautomator has quit [Ping timeout: 264 seconds]
DanKnox_away is now known as DanKnox
v0n has quit [Quit: WeeChat 0.4.2-dev]
mrsolo has joined #ruby
v0n has joined #ruby
cpruitt has joined #ruby
_dv_ has joined #ruby
polaco is now known as polaco_zZz
dv_ has quit [Ping timeout: 260 seconds]
nisstyre has joined #ruby
Domon has joined #ruby
cj3kim_ has joined #ruby
gwb3 has joined #ruby
starship has joined #ruby
awkisopen_ has joined #ruby
awkisopen_ has quit [Changing host]
awkisopen_ has joined #ruby
fmcgeough has joined #ruby
maletor has joined #ruby
vim_shim has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
paulodiniz has quit [Quit: paulodiniz]
awkisopen has quit [Disconnected by services]
awkisopen_ is now known as awkisopen
cpruitt has quit [Quit: cpruitt]
mrsolo has quit [Quit: This computer has gone to sleep]
zastern has quit [Read error: Connection reset by peer]
zastern has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
sevenseacat1 has joined #ruby
threesome has joined #ruby
cmarques has joined #ruby
robbyoconnor has joined #ruby
cpruitt has joined #ruby
|jemc| has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 248 seconds]
dagnachew has quit [Quit: WeeChat 0.4.1]
paulodiniz has joined #ruby
sevenseacat has quit [Ping timeout: 276 seconds]
vxxr has joined #ruby
i_s has joined #ruby
havenwood has joined #ruby
<xybre>
What about Enumerable#with_object?
Loaft has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 256 seconds]
dorei has quit []
DanKnox is now known as DanKnox_away
dmiller has quit [Remote host closed the connection]
snovak has joined #ruby
sniffingcats has quit [Quit: Til rivido Idisti!]
Stalkr^ has joined #ruby
get9 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maletor has quit [Quit: Computer has gone to sleep.]
eka has quit [Quit: Computer has gone to sleep.]
i_s has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
leehambley has quit [Ping timeout: 260 seconds]
Stalkr^ has quit [Ping timeout: 264 seconds]
leehambley has joined #ruby
cody-- has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
paulodiniz has quit [Quit: paulodiniz]
Aryasam has joined #ruby
Amnesia has joined #ruby
kalleth has joined #ruby
SegFaultAX has joined #ruby
Taranis has joined #ruby
artmann has joined #ruby
Buuyo has joined #ruby
tommyvyo has joined #ruby
ShapeShifter499 has joined #ruby
JaTochNietDan has joined #ruby
jpun has joined #ruby
xerxas has joined #ruby
ohcibi has joined #ruby
guilleiguaran_ has joined #ruby
18WAEEUBU has joined #ruby
jnix has joined #ruby
hoelzro has joined #ruby
tekacs has joined #ruby
Spitfire has joined #ruby
Hien has joined #ruby
tobiasvl has joined #ruby
G has joined #ruby
Sammael has joined #ruby
antulik-afk has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
Aryasam has joined #ruby
Amnesia is now known as Guest96313
Fuzai has quit [Ping timeout: 252 seconds]
wesside has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
kitak has quit [Remote host closed the connection]
Fuzai has joined #ruby
bricker`LA has joined #ruby
tov_ is now known as tov
cody-- has quit [Quit: derp]
thepumpkin has quit [Remote host closed the connection]
radic_ has joined #ruby
radic has quit [Disconnected by services]
cmarques has quit [Read error: Connection reset by peer]
larissa has quit [Quit: Leaving]
quazimodo has joined #ruby
Aryasam has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
dmiller has joined #ruby
petey has joined #ruby
okinomo has joined #ruby
thomasxie has joined #ruby
Aryasam has quit [Ping timeout: 245 seconds]
kazuuu has quit [Remote host closed the connection]
NealJ has quit [Quit: :c]
dmiller has quit [Ping timeout: 256 seconds]
machuga is now known as machuga|away
sevenseacat1 is now known as sevenseacat
rjhunter has joined #ruby
thepumpkin has joined #ruby
Spami has joined #ruby
gwb3 has quit [Remote host closed the connection]
Aryasam has joined #ruby
thomasxie has quit [Remote host closed the connection]
Stalkr^ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
Tarential has quit [Excess Flood]
Tarential has joined #ruby
Stalkr^ has quit [Ping timeout: 256 seconds]
MrHacks has joined #ruby
snovak has joined #ruby
<MrHacks>
Hey rubyist. This may sound like a foolish question but where do I include the Math module generally for my ruby scripts? My class isn't trying to derive from, nor include within itself the entire module, just a few trig functions for a single method that uses them.
flagg0204_ has quit [Remote host closed the connection]
<havenwood>
bnagy: dunno what the bang methods do
The-Mad-Pirate has quit []
flagg0204_ has joined #ruby
<bnagy>
requiring mathn gives you Rational, by the looks
<havenwood>
aye
<r0bglees0n>
i dont think anything Numeric can be mutated?
<havenwood>
r0bglees0n: yeah, the standard bang indicator of 'modifying the receiver' doesn't make sense
kazuuu has joined #ruby
Jdubs has joined #ruby
<r0bglees0n>
doesn't indicate that tho
<r0bglees0n>
suppose to indicate "be careful"
<MrHacks>
I can used self.something to describe @something that is a variable in a class, correct?
<r0bglees0n>
MrHacks: with attr_reader :something, sure
DanKnox_away is now known as DanKnox
<MrHacks>
Got that. But it's down towards the bottom, r0bglees0n
<r0bglees0n>
im not 100% sure what that means. it doesn't matter when you call it, usually.
chinkung has quit [Read error: Connection reset by peer]
<r0bglees0n>
is the method a class or instance method?
Aryasam_ has quit [Ping timeout: 264 seconds]
* MrHacks
programs in C++ sometimes so private variables get declared last. Old habit
petey has quit [Remote host closed the connection]
BizarreCake has joined #ruby
<havenwood>
yeah, Matz from 2009: The bang (!) does not mean "destructive" nor lack of it mean non destructive either. The bang sign means "the bang version is more dangerous than its non bang counterpart; handle with care".
<havenwood>
math... in the DANGER ZONE!
<r0bglees0n>
lol
<r0bglees0n>
where's the retweet button
<bnagy>
BRO I AM TOTALL BANG ACOS UP IN THAT SHIT
mary5030 has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<havenwood>
Lana... Lana... Lana... LLAANNAA!
<MrHacks>
calculus... in the Evil Kinevil part of the danger zone. Woooooooohooo!
* MrHacks
jumps the grand canyon
flagg0204_ has quit [Remote host closed the connection]
flagg020- has joined #ruby
gwb3 has quit [Remote host closed the connection]
girija has joined #ruby
CalvinnHobbes has quit [Ping timeout: 245 seconds]
<havenwood>
refinements on top level would be real nice
fryguy has joined #ruby
clov3r has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
Veejay has quit [Quit: WeeChat 0.3.0]
clov3r has quit [Read error: Connection reset by peer]
sevenseacat has left #ruby [#ruby]
allsystemsarego has joined #ruby
kunday has joined #ruby
<havenwood>
maybe i'm just missing how?
jlebrech has joined #ruby
<|jemc|>
not sure, I'd have to build 2.1 and play with it a bit
<|jemc|>
which of course is fun and worth doing in and of itself anyway
<|jemc|>
also, if I'm understanding how it works, Binding#local_variable_set could be really nifty for DSLs. I was wanting something like that a while ago.
vlad_starkov has quit [Remote host closed the connection]
St_Marx has quit [Ping timeout: 240 seconds]
jbpros has quit [Quit: jbpros]
predator217 has quit [Ping timeout: 260 seconds]
JohnBat26 has joined #ruby
vlad_starkov has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
<johnnode>
what does this mean in a rake file: system(%Q{mkdir -p "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes" && cp Tests/Schemes/*.xcscheme "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/"})
<canton7>
means someone doesn't like FileUtils, for some reason
<johnnode>
i don't know the system(%Q{}) mean
row248 has joined #ruby
johnnode has joined #ruby
<canton7>
system is a method which executes its argument in a subshell
<johnnode>
I know the things in { } but don't know the "system(%Q{})" mean
<canton7>
%Q{...} is a double-quoted string
yacks has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
<johnnode>
so it mean that just execute the things in { } like a bash shell, right?
emergion has quit [Quit: Computer has gone to sleep.]
<canton7>
system("echo foo") and system(%Q{echo foo}) are equivalent
jbpros has joined #ruby
<johnnode>
canton7: thanks you very much.
<johnnode>
it's great.
<canton7>
except in the latter, you don't need to escape double quotes
aryaching has quit [Ping timeout: 260 seconds]
<canton7>
but... use FileUtils.mkdir_p and FileUtils.cp :P
timonv has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
<johnnode>
canton7: because the are " " for the parameters of mkdir and cp therefore it needs to be used by system(%Q{}) instead of system("echo ….") right?
<canton7>
johnnode, yeah. The alternative would be system("mkdir -p \"Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes\" && cp Tests/Schemes/*.xcscheme \"Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/\"")
leonidlm has quit [Ping timeout: 260 seconds]
<johnnode>
canton7: yeah. thanks a lot.
lemonsparrow has joined #ruby
elaptics`away is now known as elaptics
bradhe has joined #ruby
Hanmac has joined #ruby
clov3r has joined #ruby
clov3r has quit [Read error: Connection reset by peer]
atno has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 264 seconds]
<Hanmac>
hihihi i found an bug in irb does someone else wants to test it? ;P
fasciate47 has quit [Quit: fasciate47]
Stalkr^ has joined #ruby
pisces71 has joined #ruby
m00nlight has quit [Remote host closed the connection]
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<avril14th>
>> (73.55 - 73.54).abs
<avril14th>
>> (73.55 - 73.54).abs < 0.01
quoin has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
haxrbyte has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
haxrbyte has joined #ruby
einarj has joined #ruby
haxrbyte_ has joined #ruby
Xeago has quit [Remote host closed the connection]
Rix has joined #ruby
okinomo has quit [Ping timeout: 256 seconds]
robertjpayne has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
Apocalypse has quit [Ping timeout: 260 seconds]
taion809 has quit [Quit: No Ping reply in 180 seconds.]
taion809 has joined #ruby
lkba has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pushpak has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 264 seconds]
Hanmac1 has joined #ruby
Apocalypse has joined #ruby
leonidlm has joined #ruby
clov3r has joined #ruby
beilabs_ has quit [Ping timeout: 264 seconds]
clov3r has quit [Read error: Connection reset by peer]
h_kon has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 256 seconds]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
jefflyne has joined #ruby
<r0bglees0n>
LMolr: I think readpartial() is typically used to stream a response from a socket.
<r0bglees0n>
or read chunks at a time
_whitelogger has joined #ruby
MrZYX|off is now known as MrZYX
ewnd9 has quit [Remote host closed the connection]
axeman- has joined #ruby
beilabs_ has joined #ruby
chairabanta has joined #ruby
snovak has joined #ruby
m00nlight has quit [Remote host closed the connection]
kizzx2 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
hogeo has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Clooth has joined #ruby
YaNakilon has joined #ruby
snovak has quit [Ping timeout: 252 seconds]
Targen_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
Targen has quit [Read error: Operation timed out]
clocKwize has joined #ruby
ismlages has joined #ruby
mklappstuhl has joined #ruby
dmiller has joined #ruby
dodosan has quit [Remote host closed the connection]
chairabanta has quit [Quit: Leaving...]
predator117 has quit [Ping timeout: 256 seconds]
julweber has joined #ruby
julweber has quit [Client Quit]
julweber has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 276 seconds]
camilasan has quit [Remote host closed the connection]
predator117 has joined #ruby
quoin has quit [Remote host closed the connection]
leehambley has quit [Ping timeout: 260 seconds]
quoin has joined #ruby
leehambley has joined #ruby
justsee has joined #ruby
Jdubs has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
<Hanmac1>
apeiros: https://bugs.ruby-lang.org/projects/ruby-trunk/issues is currently trolled again by a rails user that wants to replace Hash with HashWithIndifferentAccess and still does not notice that its maybe a bad idea …
quoin has quit [Ping timeout: 240 seconds]
Hanmac1 is now known as Hanmac
vlad_starkov has quit [Remote host closed the connection]
siwica has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
siwica has joined #ruby
Domon has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Domon has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
pwh has joined #ruby
bluebie has joined #ruby
<YaNakilon>
rails are such a piece of
pwh has quit [Client Quit]
Domon has quit [Ping timeout: 252 seconds]
Anderson has joined #ruby
<shevy>
hehe
Clooth has quit [Read error: Connection reset by peer]
Cheos has joined #ruby
<shevy>
well
<bluebie>
I want to give users a hint as to the correct spelling of a string when they mistype, so I want to search an array for strings which are similar to the one I have, and return the most similar string and preferably also, a number indicating how close it is.. is there any straight forward way to do something like this with ruby? anything in stdlib? any good rubygems?
<shevy>
there is one point - users must understand the difference between symbols and strings, so they have to make a choice all the time
<shevy>
bluebie depends. via Readline module from commandline there is, you can designate a proc to use for commandline completion
<bluebie>
I'm not doing a CLI interface
<shevy>
in stdlib there is no library that gives you numbers indicating how close it is, no idea about gems, it sounds rather specialized
<bluebie>
it's a parser
<bluebie>
distance between two strings is rather specialised? but lots of software does this sort of thing :/
Domon has joined #ruby
browndawg has joined #ruby
sevenseacat has joined #ruby
emergion has joined #ruby
Popple has joined #ruby
<shevy>
it is more specialized than " abc".strip
<bluebie>
but commonly useful in any human interface - command line, on the web
julweber has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
Xeago has quit [Read error: Connection reset by peer]
clov3r has joined #ruby
Hanmac has quit [Quit: Leaving.]
clov3r has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
crunch-choco has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
barratt has joined #ruby
<crunch-choco>
guys, i have downloaded a font called caslon, but idk what name should i use to call him. how should i know if i should call him "caslon", "caslon.ttf", "adobe caslon" etc. is there i place to look at to know this?
<LMolr>
bluebie, you can also take a look at 'soundex'
wildroman has quit [Remote host closed the connection]
jefflyne has quit [Ping timeout: 245 seconds]
<LMolr>
dunno if there's some gem about it
FND has left #ruby [#ruby]
<bluebie>
amatch seems nice, but I'll keep soundx in mind :)
dash_ has quit [Ping timeout: 264 seconds]
dash_ has joined #ruby
Domon has quit [Ping timeout: 248 seconds]
julweber has joined #ruby
johnnode has quit [Quit: johnnode]
Xeago has quit [Read error: Connection reset by peer]
<shevy>
crunch-choco I would name a file always with an extension. more information is usually best, so perhaps adobe_caslon.ttf for the file name itself
spacemud has quit [Read error: Operation timed out]
<shevy>
well, actually... almost always. I do use files like "README" too ... or "TODO"
Xeago has joined #ruby
<shevy>
rather than README.txt or TODO.txt
eka has joined #ruby
eka has quit [Max SendQ exceeded]
eka has joined #ruby
<crunch-choco>
ah yes i will do that too, thanks a lot shevy!
<bluebie>
I do .txt on those, because I see no compelling reason not to, and many people benefit from .txt being added
vlad_starkov has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
tatsuya__ has quit [Read error: Connection reset by peer]
wildroman has joined #ruby
tatsuya__ has joined #ruby
haxrbyte_ has joined #ruby
jokke has joined #ruby
<shevy>
bluebie I am not sure how this got started, but if you look at most github projects, the content, for instance - https://github.com/rack/rack rack has a file called COPYING
<wuest>
Good devs whove extensively used perl should have a million lines in POD alone :P
RealMarc has joined #ruby
<wuest>
bluebie: plain old doc, the ruby doc format (know the =begin =end thing in ruby? That's adopted from perl's POD)
subpreceptor61 has quit [Ping timeout: 246 seconds]
<bluebie>
ooh
<wuest>
s/ruby doc/perl doc/
<bluebie>
it's barely graduated from duct tape prototype
<bluebie>
what comments are in there are mostly signs to remind me what the heck any of it does
<wuest>
See? Uncaffeinated. I'm actively fixing that problem as we speak, though.
<bluebie>
I'm starting to think about and add documentation now
wildroman has quit [Remote host closed the connection]
<wuest>
If you're just beginning to build out your doc, let me recommend: TomDoc.
<wuest>
Easily my favorite format for doc in ruby
subpreceptor61 has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
<bluebie>
is it so much better than rubydoc to be woth maintaining ideas of how each work in my head at once? I have to maintain other projects which are rdoc currently
zarubin has joined #ruby
pkrzywicki has joined #ruby
pkrzywicki has quit [Remote host closed the connection]
filipe has quit [Read error: Connection reset by peer]
kaldrenon has joined #ruby
<wuest>
bluebie: doc is super-subjective. I can't answer that for you. I can say: I've found it to be so
cody-- has joined #ruby
<bluebie>
hmmmmmmmm
cj3kim has joined #ruby
<bluebie>
The thing is, oozby is kind of more of a command line tool than it is a library
<bluebie>
I mean, it is a library
<bluebie>
but I don't imagine many people would ever use it as one
quoin has quit [Remote host closed the connection]
<bluebie>
I think the docs are mainly for people hacking on it to add new features
<bluebie>
the api isn't particularly important
machuga|away is now known as machuga
quoin has joined #ruby
<wuest>
bluebie: that mindset guarantees it never will be ;)
<bluebie>
so my docs thinking are mostly centered around how to document a language / DSL
chrisja has joined #ruby
<bluebie>
you see the way I use it is kinda like coffeescript - a little compiler that runs in the background making files for me
Anticom has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
claymore has quit [Read error: Operation timed out]
mikee has joined #ruby
jbpros has quit [Quit: jbpros]
buibex has quit [Remote host closed the connection]
wildroman has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
<joonty>
hanmac: a very belated lol
julweber has joined #ruby
asym has joined #ruby
Guest40428 has joined #ruby
<asym>
what's the canonical REST client lib to use?
kofno has joined #ruby
sterNiX has joined #ruby
tagrudev has quit [Remote host closed the connection]
Anticom has joined #ruby
rhys has joined #ruby
Anticom has quit [Read error: Connection reset by peer]
braoru has quit [Remote host closed the connection]
rrichardsr3 has joined #ruby
pushpak has joined #ruby
claymore has joined #ruby
mikee has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
bluebie has left #ruby [#ruby]
burlyscudd has quit [Quit: Leaving.]
graydot has joined #ruby
Anticom has joined #ruby
kirun has joined #ruby
girija has joined #ruby
Coolhand has joined #ruby
cody-- has joined #ruby
rickmasta has quit [Quit: Leaving...]
Anticom has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
AlHafoudh has joined #ruby
AlHafoudh has quit [Max SendQ exceeded]
niceguyjames has joined #ruby
mikecmpbll has joined #ruby
wallerdev has quit [Quit: wallerdev]
Coolhand has quit [Read error: Connection reset by peer]
Targen has joined #ruby
AlHafoudh has joined #ruby
julweber has quit [Read error: No route to host]
Coolhand has joined #ruby
AlHafoudh has quit [Max SendQ exceeded]
julweber has joined #ruby
<_br_>
use faraday and switch adapters as you need
AlHafoudh has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
AlHafoudh has quit [Max SendQ exceeded]
kaspergrubbe has quit [Remote host closed the connection]
Anticom has joined #ruby
fmcgeough has joined #ruby
buibex has joined #ruby
RORgasm has joined #ruby
petey has joined #ruby
mary5030 has joined #ruby
Anticom has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
zoee has quit [Quit: zoee]
wildroman has joined #ruby
phutchins has quit [Remote host closed the connection]
mary5030 has joined #ruby
julweber has quit [Remote host closed the connection]
rjhunter has joined #ruby
platzhirsch has left #ruby [#ruby]
MrThePlague has joined #ruby
codecop has joined #ruby
MrThePlague has joined #ruby
Anticom has joined #ruby
mmozuras_ has quit [Ping timeout: 240 seconds]
m8 has joined #ruby
carlyle has joined #ruby
jibi has quit [Ping timeout: 246 seconds]
Anticom has quit [Read error: Connection reset by peer]
Krajsnick has joined #ruby
alex__c2022 has joined #ruby
baroquebobcat has joined #ruby
freerobby has joined #ruby
ahawkins has quit [Quit: leaving]
interactionjaxsn has joined #ruby
jibi has joined #ruby
julweber has joined #ruby
rickmasta has joined #ruby
Anticom has joined #ruby
petey has quit [Remote host closed the connection]
julweber has quit [Remote host closed the connection]
Anticom has quit [Read error: Connection reset by peer]
jefflyne has quit [Ping timeout: 252 seconds]
julweber has joined #ruby
schaerli has joined #ruby
julweber has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
dash_ has quit [Quit: dash_]
admin0 has joined #ruby
Anticom has joined #ruby
admin0 has left #ruby [#ruby]
petey has joined #ruby
Anticom has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
jbrechtel has quit [Remote host closed the connection]
KobraKao has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<shevy>
hmm
Quashie_ is now known as Quashie
Anticom has joined #ruby
JMcAfreak has joined #ruby
jbrechtel has joined #ruby
<shevy>
mruby vs. lua ...
Anticom has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: Computer has gone to sleep.]
<Hanmac>
mruby + because of … ruby ;D
asym has quit [Quit: Lost terminal]
<Hanmac>
mruby can run as EFI -Shell … does it works for lua too?
anonymuse has joined #ruby
anonymus_ has quit [Read error: Connection reset by peer]
cody-- has quit [Quit: derp]
kaspergrubbe has joined #ruby
TheMoonMaster has quit [Excess Flood]
visof has quit [Quit: Leaving]
rins has joined #ruby
<waxjar>
i think lua takes the cake right now, simply because it's, you know, stable :P
timonv has quit [Remote host closed the connection]
kazuuu has joined #ruby
wallerdev has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
bobinator60_ has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
Krajsnick has quit [Remote host closed the connection]
TheMoonMaster has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Quit: Leaving.]
colonolGron has joined #ruby
Anticom has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
jprovazn has quit [Quit: Leaving]
carlyle has quit [Ping timeout: 245 seconds]
threesome has quit [Ping timeout: 245 seconds]
Anticom has quit [Read error: Connection reset by peer]
kazuuu_ has joined #ruby
iamjarvo has joined #ruby
Krajsnick has joined #ruby
rjhunter has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
kazuuu has quit [Ping timeout: 245 seconds]
Anticom has joined #ruby
petey has quit [Remote host closed the connection]
carlyle has joined #ruby
colonolGron has quit [Ping timeout: 260 seconds]
Anticom has quit [Read error: Connection reset by peer]
Gabri has joined #ruby
julweber has joined #ruby
devoldmx has joined #ruby
axeman- has quit [Remote host closed the connection]
wildroman has quit [Remote host closed the connection]
rgbdev has quit [Quit: rgbdev]
wildroman has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby
mansi has joined #ruby
ehc has quit [Quit: ehc]
mercwithamouth has quit [Ping timeout: 248 seconds]
tesuji has quit [Ping timeout: 245 seconds]
leonidlm has quit [Read error: Operation timed out]
mmozuras has joined #ruby
LMolr has joined #ruby
ehc has joined #ruby
dweeb has joined #ruby
simon__ has joined #ruby
<simon__>
Hello!
Hanmac has quit [Quit: Leaving.]
<simon__>
I have uplaoded a gem I created to a local webserver, and I want to put something like gem "blabla", :source "www.blasdfsadf.com/path/to/gem" in my Gemfile.
ineb has joined #ruby
bobinator60_ has quit [Quit: bobinator60_]
<simon__>
I dont want to run a gem server, is this possible?
<simon__>
(Sorry, Im new to ruby :))
senayar has quit [Remote host closed the connection]
godd2 has joined #ruby
mmozuras has quit [Read error: Connection reset by peer]
<terrellt>
Alright guys, metaprogramming question. How can I define a singleton method in a module that then calls that method on the class like it -didn't- have that module? My problem is that a library defines a method_missing setter OR a dynamic method, so I can't count on one or the other. So I need to be able to create a method that defines that setter and then calls that same setter without hitting itself again.
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
terrellt you need to use this: def self.single(obj); obj.func; end but imo there isnt any singleton method needed… an instance method inside the module should work too
<|jemc|>
terrellt: sadly, if I'm understanding your need correctly, alias or alias_method is the only way to do it
peregrine81 has joined #ruby
thebastl has quit [Remote host closed the connection]
<momomomomo>
ineb: What are you trying to do, exactly?
<ineb>
i want to print the hash
geggam_ has joined #ruby
<MrZYX>
ineb: def changes the scope, @a_hash in the class scope and @a_hash in the method scope a different variables
jaynewstrom has quit [Read error: Connection reset by peer]
jaynewst_ has joined #ruby
<Hanmac>
ineb: line2: its an instance variable inside the class, line5: its an instance variable inside an instance of that class
<MrZYX>
use def initialize to initialize your variables
<terrellt>
hanmac: The method needs to be dynamically defined, and I can't just call super (I don't think) - the parent implementation can either be used via dynamic method definition -or- a method missing implementation.
<ineb>
ah, allright
quoin has joined #ruby
<terrellt>
|jemc|: That's not possible - that was my first thought too. Unfortunately the parent implementation is sometimes done via method_missing, so there's nothing to alias
browndawg has joined #ruby
rehat has quit [Remote host closed the connection]
<Hanmac>
terrellt: you still can use super when you use "respond_to_missing?"
intuxicated has quit [Remote host closed the connection]
<terrellt>
hamac: Okay, I'll have to try that. In that case, is there a way to dynamically define a module method which -can- call super?
vlad_starkov has joined #ruby
wildroman has joined #ruby
<Hanmac>
hm ok defined?(super) does not work, it does not check "respond_to_missing?"
Gabri has quit []
bricker`LA has quit [Ping timeout: 240 seconds]
leonidlm has quit [Ping timeout: 248 seconds]
ahmed_elgabri has joined #ruby
<Hanmac>
shevy do you know what "def abc;end" returns in newer ruby?
rrichardsr3 has quit [Quit: -- I'm out --]
amacleod has joined #ruby
Drewch has joined #ruby
bricker`LA has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
shaunbak_ has quit [Remote host closed the connection]
OneMT has joined #ruby
xcfox has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
robertjpayne has quit [Remote host closed the connection]
<|jemc|>
I'll give you a hint
<|jemc|>
it's not nil
cody-- has joined #ruby
<Hanmac>
you meany! you are spoilering ;P
<MrZYX>
I love the entries in the preview release notes
<MrZYX>
"syntax"
Krajsnick has quit [Remote host closed the connection]
ereslibre has quit [Ping timeout: 245 seconds]
gwb3 has quit [Remote host closed the connection]
jezen has joined #ruby
clocKwize has quit [Read error: Operation timed out]
blaxter_ is now known as blaxter
<Hanmac>
MrZYX: did you have links to this "release nodes"?
<OneMT>
When I hit the rescue the begin never seems to happen again. But if I inspect on the rescue it does seem to be only catching errors. Is my rescue only moving errors and then beginning removing and storing files in JSON that aren't errors?
<|jemc|>
the NEWS file in the nightly source package is also very helpful for learning about the new features
mklappstuhl has quit [Remote host closed the connection]
<Hanmac>
MrZYX: yeah it didnt say, which syntax … i think this is a secret ;P
clocKwize has joined #ruby
St_Marx has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
schaerli has quit [Remote host closed the connection]
GeissT has quit [Quit: MillBroChat AdIRC User]
<Hanmac>
like "find all hidden syntax changes and win a secret price" ;D
<OneMT>
I would assume the inspect is correct. But I wondered if somehow my rescue was setup to start moving all files after the first error.
mlpinit has quit [Remote host closed the connection]
atno has joined #ruby
mlpinit has joined #ruby
<waxjar>
cool, def gets a return value?
<|jemc|>
yup
<banisterfiend>
waxjar for real, method decorators coming soon
<Hanmac>
and there are other funny addions too like "frozen"f
<waxjar>
do you happen to know what |jemc|?
<|jemc|>
yeah, I suppose that is the natural outcome of that, banisterfiend
<waxjar>
hoping it's a Symbol :D
blackmesa has joined #ruby
<Hanmac>
waxjar: it is
<|jemc|>
"def-expr now returns the symbol of its name instead of nil."
burlyscudd has joined #ruby
<waxjar>
sweet
<|jemc|>
--from the NEWS file
pranny has quit [Quit: Leaving.]
ereslibre has joined #ruby
<OneMT>
Could my very repetitive block statements somehow ruin my rescue? Is inspect on the rescue error the only way to make sure it is doing proper rescues?
dash_ has quit [Quit: dash_]
jimeh has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
greengriminal has quit [Quit: Leaving]
mlpinit_ has joined #ruby
<|jemc|>
yeah, so a decorator would look like a method call wrapped around the def
<|jemc|>
and take the return value to get access to the method object and act on that in some way
<Hanmac>
yeah … private def abc; end is possible now :D
mlpinit_ has quit [Remote host closed the connection]
g0bl1n has left #ruby [#ruby]
cody-- has quit [Quit: derp]
ahmed_elgabri has quit [Remote host closed the connection]
mlpinit has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
* |jemc|
opens up a ruby-2.1 REPL
<banisterfiend>
|jemc| i'm excited about: auto_curry def my_method(x, y, z); …; end
burlyscudd1 has joined #ruby
<|jemc|>
yeah, very exciting
awarner_ has joined #ruby
mklappstuhl has joined #ruby
jimeh has joined #ruby
schaerli has joined #ruby
mlpinit_ has joined #ruby
<breakingthings>
what an autocurry
MrLawrence has joined #ruby
<|jemc|>
and they could be chainable as well... hm
sloucher has joined #ruby
supergiantrobot has joined #ruby
<|jemc|>
or even take other arguments besides the method def
bradhe has joined #ruby
clocKwize has quit [Quit: Computer is sleeping]
burlyscudd has quit [Ping timeout: 245 seconds]
AndChat| has quit [Ping timeout: 252 seconds]
Boohbah has quit [Remote host closed the connection]
dodosan has joined #ruby
MrLawrence has left #ruby [#ruby]
<waxjar>
i wonder if it could somehow be abused to implement pattern matching
awarner has quit [Ping timeout: 245 seconds]
<|jemc|>
pattern matching?
ereslibre has quit [Ping timeout: 264 seconds]
<banisterfiend>
waxjar i've abused it already to implement multiple dispatch
nomenkun has joined #ruby
<banisterfiend>
waxjar general pattern matching is much more complicated
<MrZYX>
ah, so they just screwed up the nested list
<banisterfiend>
pontiki haskell curry
<pontiki>
banisterfiend: i'm pretty sure scala had it before haskell
<banisterfiend>
pontiki haskell curry is a guy ;)
<pontiki>
oh!
<pontiki>
but..
g0bl1n has joined #ruby
<pontiki>
where did scala get it?
nari has quit [Ping timeout: 264 seconds]
<banisterfiend>
pontiki haskell curry was a mathematician who invented the idea many, many years ago
<|jemc|>
yay decorators work with other arguments without wrapping the whole mess in parentheses
dodosan has quit [Ping timeout: 245 seconds]
gwb3 has joined #ruby
<banisterfiend>
pontiki way before either haskell or scala was even a twinkle in anyone's eye, these guys were working around the same time as turing or a little bit after i think
<pontiki>
that's neat
<|jemc|>
[8] pry(main)> foo 'cow', def bar *args; end
<|jemc|>
=> :foo
<pontiki>
or the action
<|jemc|>
["cow", #<Method: Object#bar>]
<pontiki>
that makes a *whole* lot more sense trying to make sense of the definitions of curry
<|jemc|>
[7] pry(main)> def foo arg1, meth; p [arg1, method(meth)]; meth end
<pontiki>
thanks, banisterfiend
<pontiki>
oh, i see -- just found the wiki page now
<banisterfiend>
yeah, nothing to do with the food ;)
<|jemc|>
=> :bar
filipe has quit [Read error: Connection reset by peer]
ahmed_elgabri has joined #ruby
jezen has quit [Ping timeout: 246 seconds]
Boohbah has quit [Remote host closed the connection]
<|jemc|>
thanks for the tip-off about decorators, banisterfiend; this is really very cool
siwica has joined #ruby
Boohbah has joined #ruby
segfalt has joined #ruby
<banisterfiend>
np
<Hanmac>
what about that: def xyz meth; m=method(meth);define_method(meth) {|*args| p "before"; m.call(*args); p "after" }; end
ananthakumaran has joined #ruby
<banisterfiend>
hanmac nice work, hands
<banisterfiend>
hanmac is it hans or hands?
siwica has quit [Client Quit]
segfalt has left #ruby [#ruby]
jbrechtel has quit [Remote host closed the connection]
<Hanmac>
its the first, but i have two from the second
Drewch has quit [Quit: Computer has gone to sleep.]
ahmed_elgabri has quit [Remote host closed the connection]
segfalt has joined #ruby
pel_daniel has joined #ruby
randomautomator has joined #ruby
<|jemc|>
hanmac: works as you think it does
jbrechtel has joined #ruby
<|jemc|>
xyz def foo; p 'whup' end
mihirrege has joined #ruby
<|jemc|>
[13] pry(main)> foo
segfalt has left #ruby [#ruby]
jbrechtel has quit [Read error: Connection reset by peer]
<|jemc|>
"before"
<|jemc|>
"whup"
<|jemc|>
"after"
<|jemc|>
hm. I wonder how this pans out for instance methods...
St_Marx has quit [Remote host closed the connection]
<|jemc|>
maybe the decorator has to be an instance method of the same object for the receiver to be correct?
St_Marx has joined #ruby
<banisterfiend>
|jemc| the decorator has to be a class method
<banisterfiend>
otherwise u can't call it in the class body bb
<|jemc|>
but if it's an instance method, it can't be called in the class definition body
lethjakm1 has joined #ruby
<Hanmac>
|jemc|: hm no, the old method does not need to be in an instance variable … the block keeps it alive
v0n has quit [Read error: Operation timed out]
<|jemc|>
ah yes, the method object itself knows how to find the correct receiver
coderhs has joined #ruby
michael_mbp is now known as zz_michael_mbp
Xeago has quit [Remote host closed the connection]
danshultz has joined #ruby
AdmiraI has joined #ruby
Teddy2steper has joined #ruby
Trudko has joined #ruby
sarlalian has joined #ruby
zz_michael_mbp is now known as michael_mbp
* Hanmac
says: its magic! ;D
nachtwandler has joined #ruby
<Trudko>
Guys i have variable where i concatenate multiple strings separated by white space -> player_points_hash[player_one.id] += ' ' + mp.player_one_points.to_s + ' ' + mp.player_one_points_2.to_s + ' ' + mp.player_one_points_3.to_s . Things is player_one_points_2 and player_one_points_3 can be nil in which case i dont want to add empty space. How should I write it?
maletor has joined #ruby
<Trudko>
I am used to use if or ternary operations but ruby should have something nicer.
schaerli has quit [Remote host closed the connection]
<Hanmac>
Trudko why does player_one_points is stored in different variables?
clocKwize has joined #ruby
<Trudko>
hanmac: well I am doing one sports league and player can have multiple points
<Trudko>
so yeah they have to be separated. points in this case aren't total points
<Hanmac>
use something like that (player_one_points returns an array) mp.player_one_points.compact.join(" ")
timonv has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
m00nlight has joined #ruby
danshultz has joined #ruby
<OneMT>
Is the require for iconv just 'iconv' ?
bamdad has joined #ruby
<Trudko>
hanmac: I see thx
gwb3 has quit [Remote host closed the connection]
<newton>
is it possible with minitest/testunit to define some special method that triggers in a test file when one of the tests inside it fails?
<Hanmac>
OneMT "iconv" died a painful death … but no one cares about
siwica has joined #ruby
dash_ has joined #ruby
<OneMT>
hanmac, Is there a new replacement?
ryannielson has joined #ruby
<Hanmac>
OneMT "new" in a relative way … look for String#encode
banisterfiend has quit [Quit: Computer has gone to sleep.]
petey has joined #ruby
beilabs_ has joined #ruby
Nogbit1 has joined #ruby
petey has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 259 seconds]
kristiandelay has joined #ruby
Macaveli_ has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
jbpros has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
Macaveli has quit [Ping timeout: 246 seconds]
schaerli has joined #ruby
Nogbit has quit [Ping timeout: 248 seconds]
Blaze_Boy has quit [Quit: Leaving]
DanKnox_away is now known as DanKnox
f0ster has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<f0ster>
Hello, I am trying a simple custom string sort, but I get an error ie "test.rb:18:in `sort': comparison of String with String failed (ArgumentError)", can anyone see why this is ?http://pastebin.com/AE4FCMBH
julweber has quit [Remote host closed the connection]
NealJ has quit [Ping timeout: 256 seconds]
snovak has joined #ruby
cschneid has joined #ruby
interactionjaxsn has joined #ruby
<OneMT>
Is there a resource or gem for converting text ?
<Hanmac>
f0ster: you need a 0 or +1 at line 26
beilabs_ has quit [Ping timeout: 252 seconds]
<OneMT>
converting text encoding*?
<f0ster>
hanmac: ah
postmodern has joined #ruby
mklappstuhl has joined #ruby
<f0ster>
hanmac: so regardless of my order being defined by the if statements, the sort function has to return a 0/1
<Hanmac>
-1/0/1 specialy
narcan has quit [Ping timeout: 245 seconds]
peregrine81 has joined #ruby
vlad_starkov has joined #ruby
girija has quit [Ping timeout: 246 seconds]
rezzack has joined #ruby
Dan_ has joined #ruby
cj3kim_ has joined #ruby
banisterfiend has joined #ruby
dankest has quit [Read error: Connection reset by peer]
Dan_ is now known as Guest60626
Guest60626 has quit [Client Quit]
akhkharu has quit [Ping timeout: 260 seconds]
<f0ster>
hanmac: yeah this isnt going to work like i planned, i thought i could have a kind of transitive ordering, but i have to define all of the relationships explicitly
vlad_starkov has quit [Read error: Connection reset by peer]
Fire-Dragon-DoL has joined #ruby
vlad_starkov has joined #ruby
<Hanmac>
f0ster: you may want to look for sort_by
<f0ster>
hanmac: okay thank you
TheRealPygo has joined #ruby
CalvinnHobbes has joined #ruby
pygospa has quit [Disconnected by services]
banisterfiend has quit [Client Quit]
Stalkr_ has quit [Read error: Connection reset by peer]
tomsthumb has joined #ruby
jcromartie has joined #ruby
Clooth has joined #ruby
<jcromartie>
I just found out that a coworker literally had their laptop taken away for a month while they were under investigation for Googling a Ruby gem name at work.
<jcromartie>
Seriously, Ruby community. Come on.
<jcromartie>
but overreaction from employers is at fault too
shadoi has quit [Quit: Leaving.]
Kricir_ has joined #ruby
wildroman has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
mephux has quit [Ping timeout: 260 seconds]
<|jemc|>
what is his work?
beilabs_ has joined #ruby
iamjarvo_ has quit [Ping timeout: 245 seconds]
apfelbox has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 252 seconds]
<apeiros>
jcromartie: um, seriously, your employer, come on.
<apeiros>
a) they supervise your googling? wtf?!
osvico has quit [Ping timeout: 240 seconds]
<whunt>
what was the ruby gem?
<apeiros>
b) they distrust you so much that it took over a month to resolve it? wtf?!
Tricon has quit [Ping timeout: 240 seconds]
mephux has joined #ruby
<whunt>
also, what did they do for a month without their computer?
headius has joined #ruby
jkamenik has quit [Quit: Leaving.]
<apeiros>
jcromartie: seriously, if what you just said wasn't just utter BS, then that's a place to insta-leave.
<jcromartie>
apeiros: it's not BS, and yeah it's kinda scary
<jcromartie>
it was approx. 2 years ago
einarj has joined #ruby
<apeiros>
I think in our country you could even sue the employer for unjustified spying on the worker.
shadoi has joined #ruby
NealJ has joined #ruby
<jcromartie>
apeiros: well I live in America so I can only assume everybody is spying on me at all times :)
Nogbit1 has quit [Quit: Leaving.]
banisterfiend has joined #ruby
<Eiam>
yah what was the ruby gem name
<Eiam>
i wanna google it
pyoor has joined #ruby
<Eiam>
I'll use it as a litmus test, maybe I should leave my employer!
<pyoor>
Hi all. Is there a way to slice a string from pos n to the end? Like in python foo[10:] ?
banisterfiend has quit [Client Quit]
Macaveli has joined #ruby
apfelbox has quit [Ping timeout: 260 seconds]
browndawg has quit [Read error: Connection timed out]
<Hanmac>
pyoor: str"[n..-1]
<Hanmac>
- the "
<jcromartie>
the gem is defunct or something, a precursor to homebrew
kobain has joined #ruby
<jcromartie>
I'm not going to go googling references to it at work, but it was "bdsm"
<Eiam>
Steve and Wynn caught up with Wayne Seguin to talk about his Ruby enVironment Manager and BDSM shell scripting framework projects.
Macaveli_ has quit [Ping timeout: 240 seconds]
<Eiam>
oh Wayne, you getting people fired! so mean!
<Eiam>
=p
browndawg has joined #ruby
lkba has joined #ruby
<apeiros>
jcromartie: actually it's wayne's other project besides rvm
<apeiros>
unrelated to homebrew
<Eiam>
google hits for "bdsm ruby gem" or "bdsm gem" seem relevant to my interests
Nisstyre-laptop has quit [Quit: Leaving]
<jcromartie>
ok, I wasn't about to go looking into it
<Eiam>
(in ruby, not bdsm) =)
einarj has quit [Ping timeout: 260 seconds]
wildroman has joined #ruby
soberano has joined #ruby
<Eiam>
YOU HEAR THAT SECURITY? leave me alone!
jbpros has quit [Quit: jbpros]
wildroman has quit [Remote host closed the connection]
ahuman_ is now known as ahuman
cdelo has quit [Remote host closed the connection]
wildroman has joined #ruby
<|jemc|>
jcromartie: what type of work is it?
T_T has quit [Remote host closed the connection]
rgbdev has quit [Quit: rgbdev]
Kabaka has joined #ruby
jbrechte_ has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
peregrine81 has quit []
shadoi has joined #ruby
jb41 has joined #ruby
Advocation has joined #ruby
<graft>
okay, so in perl or some such i can easily do something like: x.each do |n| next if seen[n]++; puts n; end - this becomes super awkward in ruby because there's no ++ and 0 is true, so what's the pithy ruby way to do this?
jbrechtel has quit [Ping timeout: 240 seconds]
lowcard has joined #ruby
Tricon has joined #ruby
peregrine81 has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
<apeiros>
graft: you want to increment all non-zero values by 1?
tylersmith has joined #ruby
<apeiros>
errr, and print all zeros in the same run?
<OneMT>
Is there a reliable way to find the encoding of an email and convert it to utf-8? I'm using the mail gem to get the charset, and then converting the email.to_s from it's charset to utf-8 using iconv. But with no successful conversion.
Xeago has joined #ruby
Kabaka has quit [Remote host closed the connection]
<apeiros>
OneMT: huh? I thought the mail gem already sets the encoding of the string, so all you have to do is utf_8_body = mail_body.encode('utf-8')
Guest36090 has joined #ruby
<apeiros>
haven't used it for receiving mail other than experimentally, though
camilasan has quit [Remote host closed the connection]
<OneMT>
I'm reading a set of existing emails.
<waxjar>
graft: something like x.select { |n| seen[n] + 1 > 0 }.each &:puts ? though the coupling between x and seen is a bit weird
carlyle has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
peregrine81 has quit [Client Quit]
schaerli has quit [Remote host closed the connection]
<Hanmac>
&:puts does not work, but he can try &:display
<havenwood>
#succ would be an alternative to +1
<waxjar>
ah, true
maroloccio has quit [Ping timeout: 240 seconds]
<havenwood>
silly #puts being private, grr
<apeiros>
that's not the issue
<apeiros>
that it isn't 5.puts is :)
St_Marx has quit [Remote host closed the connection]
<Hanmac>
but you can so &method(:puts)
<waxjar>
it even looks p nice
St_Marx has joined #ruby
iamjarvo has joined #ruby
rickmasta has joined #ruby
alekst has quit [Quit: Leaving...]
browndawg has left #ruby [#ruby]
<f0ster>
hmm so I wrote this basic function to pass to sort for custom string comparison, but my results always appear backwards, http://pastebin.com/NFQmGNqT
fcahoon has joined #ruby
ner0x has joined #ruby
<Hanmac>
f0ster: when its reverse, try to negate (switch 1, and -1)
mklappst_ has joined #ruby
randomnick_ has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
fcahoon has quit [Client Quit]
splittingred has joined #ruby
bean has joined #ruby
<apeiros>
f0ster: test = ['', 'FB', 'FF', '', 'FB', 'FF', first, second, third] # slightly easier to write than a thousand pushes :)
bamdad has joined #ruby
<f0ster>
hanmac: I Did.. and it returns the same exact thing which is strange
<Hanmac>
oO
<f0ster>
apeiros: thats true
<apeiros>
f0ster: also, please use gist.github.com or any other none-ad-ridden paste service. thank you.
* Hanmac
doesnt see ads since years ...
<cout>
there were ads? I thought those were coupons..
subpreceptor61 has quit [Ping timeout: 245 seconds]
<waxjar>
psh, that's two :D
havenwood has quit [Remote host closed the connection]
<apeiros>
waxjar: you forget `test = …`
<waxjar>
fair enough :p
<Hanmac>
test.sort_by(&:order.method(:index))
havenwood has joined #ruby
<Hanmac>
test.sort_by(&order.method(:index))
<Hanmac>
first one has a ":" tomuch
jb41 has quit [Quit: leaving]
burlyscudd has quit [Ping timeout: 240 seconds]
<apeiros>
hanmac loves the method method
<AndChat|>
Apeiros is "hans" a common name in Switzerland?
<cout>
I like method = method(:method)
<apeiros>
AndChat|: I think so. not that popular anymore, though.
axeman- has joined #ruby
<Hanmac>
oO since when i am in Switzerland? i think i need to look outside
<apeiros>
telsearch lists >90k entries for "Hans"
<cout>
hans == "head and neck support"
quoin has joined #ruby
<cout>
I need to buy one
<OneMT>
apeiros, Is iconv not able to convert encoding ?
<apeiros>
OneMT: it is. but it is deprecated.
zmike123 has quit [Quit: ~]
headius has quit [Ping timeout: 276 seconds]
<Hanmac>
OneMT: like i says before: iconv died
<OneMT>
aperios, hanmac, I tried using String#encode but it doesn't seem to convert.
havenn has joined #ruby
havenwood has quit [Ping timeout: 248 seconds]
<apeiros>
OneMT: that's a rather badly asked question.
<apeiros>
pastes best go to gist.github.com (you can separate in-/output/code/expectation in separate files there)
kazuuu has quit [Remote host closed the connection]
<apeiros>
in a reproduceable fashion
kazuuu has joined #ruby
flanged43 has joined #ruby
Advocation has quit [Quit: Advocation]
<apeiros>
OneMT: if you want help, provide example input, example output, what you did, what you expected
havenn has quit [Remote host closed the connection]
mpereira_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
kazuuu has joined #ruby
gazarsgo has joined #ruby
quoin has quit [Ping timeout: 248 seconds]
<AndChat|>
Cout what's up me bru
mrsolo has quit [Quit: This computer has gone to sleep]
Ox6abe has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
mklappstuhl has joined #ruby
<cout>
AndChat|: I don't know I can't see that far
dankest has joined #ruby
kazuuu has quit [Remote host closed the connection]
<AndChat|>
Haha
havenwood has quit [Ping timeout: 245 seconds]
gazarsgo has quit [Quit: gazarsgo]
maroloccio has joined #ruby
czhang_temp has joined #ruby
gazarsgo has joined #ruby
burlyscudd has joined #ruby
ineb has quit [Quit: leaving]
NealJ has quit [Quit: :c]
jbrechte_ has quit [Remote host closed the connection]
forellentorte has quit [Quit: Verlassend]
fmcgeough has quit [Quit: fmcgeough]
alvaro_o has joined #ruby
NealJ has joined #ruby
BizarreCake has quit [Ping timeout: 260 seconds]
BraddPitt has quit [Ping timeout: 256 seconds]
ukd1 has joined #ruby
snovak has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
Xeago has joined #ruby
julweber has joined #ruby
acrussell has quit [Quit: Leaving.]
Ox6abe has quit [Remote host closed the connection]
BraddPitt has joined #ruby
LMolr has quit [Remote host closed the connection]
platzhirsch has joined #ruby
jprovazn has quit [Quit: Odcházím]
BraddBitt has joined #ruby
Kricir_ has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
zachrab has joined #ruby
julweber has quit [Ping timeout: 276 seconds]
iamjarvo has quit [Ping timeout: 248 seconds]
<platzhirsch>
Has anyone worked with ruby-prof a bit?
blackmesa has quit [Ping timeout: 240 seconds]
<zachrab>
how can i make a first of the month with ActiveSupport::TimeWithZone?
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
apfelbox has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
BraddPitt has quit [Ping timeout: 260 seconds]
tabolario has joined #ruby
apfelbox has quit [Read error: Operation timed out]
mnemon has quit []
apfelbox has joined #ruby
Kricir has joined #ruby
leehambley has quit [Ping timeout: 260 seconds]
jbpros has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
leehambley has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
NinjaPenguin has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
<apeiros>
zachrab: better fit in #rubyonrails
<apeiros>
and I think it has something like beginning_of_month
danshultz has joined #ruby
bigkevmcd has joined #ruby
soheil has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
snovak has joined #ruby
iamjarvo has joined #ruby
<Eiam>
platzhirsch: I had it open to investigate using it but didn't end up getting around to it =/
<apeiros>
oh, cross-poster
<Eiam>
I imagine this will be much like pry, put it off for years then finally do it and wonder why I didn't bother.
<platzhirsch>
ok, well let's see if I am lucky
zachrab was kicked from #ruby by apeiros [if you cross-post, you're required to tell that in all channels where you cross-post. thanks.]
burlyscudd has quit [Quit: Leaving.]
godd2 has quit [Quit: Page closed]
<apeiros>
of course he didn't bother to tell that he got help in another channel.
pellenation has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
apfelbox has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Read error: Operation timed out]
pranny has joined #ruby
pranny has quit [Client Quit]
soheil has quit [Ping timeout: 246 seconds]
MrHacks has joined #ruby
workmad3 has joined #ruby
burlyscudd1 has joined #ruby
<MrHacks>
Are self.colors? and colors the same method if I define them in the same class?
Anderson is now known as anderSon
<apeiros>
MrHacks: where you define them doesn't even matter
<apeiros>
self.colors() is the same as colors() in all cases.
<Eiam>
colors? and colors are not the same...
<MrHacks>
Just wonder, I just keep getting this "getlsrlsx.2.1.rb:291:in `ecf': undefined method `colors?' for #<WXReport:0x0000000117f4e8> (NoMethodError)" message every time I try to run.
<|jemc|>
platzhirsch: out of my personal curiosity, is this pure ruby code or do you have c extensions?
Boohbah has quit [Ping timeout: 240 seconds]
<platzhirsch>
|jemc|: pure ruby code
OneMT has quit [Quit: OneMT]
<platzhirsch>
Eiam: ah I came over this, too. It looks nice, but needs to patch Ruby, too. This is inevitable
timonv has joined #ruby
danshultz has quit [Remote host closed the connection]
Boohbah has joined #ruby
ziyadb has joined #ruby
<platzhirsch>
It's really a shame this patch ticket is from 2007, come on Matz
<|jemc|>
well, it's good to know I should be watching for memory leaks in my pure ruby code
mihirrege has joined #ruby
gwb3 has quit [Remote host closed the connection]
<platzhirsch>
It's only a problem because I run mine on 1 GB RAM machine, I am writing a lot of data gzipped compressed to a file, but only stream based and I don't know why it stacks up
<|jemc|>
well, I run ruby code on arm boards, so memory is a concern there too
banisterfiend has joined #ruby
<platzhirsch>
cool!
radpanda has quit [Changing host]
radpanda has joined #ruby
quoin has joined #ruby
<platzhirsch>
or I run my code on JRuby, I am fond of JVM profiling :P
T_T has joined #ruby
DandyPandy has left #ruby ["Bye"]
peregrine81 has joined #ruby
ahawkins has joined #ruby
<platzhirsch>
there is also ObjectSpace.count_objects, that's a nice start until I find a "Patch your Ruby interpreter" for sillies
bobdobbs has quit [Remote host closed the connection]
<MrHacks>
It works fine everywhere else
gwb3 has joined #ruby
cody-- has quit [Quit: derp]
obs has joined #ruby
einarj has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
<|jemc|>
MrHacks: obviously you're passing a float object into that method somewhere
<|jemc|>
by mistake
pontiki has left #ruby [""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson"]
<|jemc|>
so the problem is in the calling code and not the method itself
Jdubs has quit [Ping timeout: 248 seconds]
havenwood has quit [Read error: Connection reset by peer]
<gf3>
lol rubby
<breakingthings>
r00by
kvirani has joined #ruby
havenwood has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<banisterfiend>
MrHacks you might like pry-rescue (& pry-stack_explorer) for this, it drops you into the exception context and you can 'up' through stack frames and locate the bug and fix it in place
raphaelivan has quit [Quit: Leaving.]
biomass has joined #ruby
<platzhirsch>
Oh, maybe it's simply because I am opening the stream, then I write 350 MB compressed data to it, and do not close before everything is there, I guess it just all gets buffered up in the RAM
<platzhirsch>
a little flush here and then, or... ALWAYS jesus christ
<|jemc|>
ha
<|jemc|>
well I hope that does it for you
burlyscudd1 has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
Kricir has quit [Remote host closed the connection]
<platzhirsch>
RVM is really sweet, you can apply a --patch parameter to rvm install which points to a .patch file or GitHub URL
dodosan has quit [Remote host closed the connection]
flagg0204 has quit [Ping timeout: 260 seconds]
<|jemc|>
for patching the MRI?
<|jemc|>
or patching gems?
flagg0204 has joined #ruby
<banisterfiend>
MRI
<platzhirsch>
yes, the MRI
<banisterfiend>
|jemc| i don't like you inserting the definite article there!!
<banisterfiend>
:)
<|jemc|>
haha
<|jemc|>
my bad
<platzhirsch>
Is there an alternative to MRI?
<banisterfiend>
platzhirsch lots
krawchyk has quit [Remote host closed the connection]
* platzhirsch
hides
ephemerian has joined #ruby
<banisterfiend>
platzhirsch jruby is the main one
<banisterfiend>
but there's rubinius, topaz, and a few others
<platzhirsch>
I don't want to give my Ruby code the power of the JVM,
<biomass>
should casecmp match é with É as true ?
chrstphrhrt has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
chrstphrhrt has left #ruby [#ruby]
evenix has quit [Remote host closed the connection]
Zai00 has joined #ruby
Stalkr_ has joined #ruby
timonv has joined #ruby
JimmyNeutron has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
jezen has quit [Remote host closed the connection]
<apeiros>
biomass: sadly no
sectionme has joined #ruby
coderhs has quit [Ping timeout: 245 seconds]
<apeiros>
ruby has no proper collations and casemaps
<banisterfiend>
platzhirsch also, RubyMotion (but that's not really an alternative)
tjbiddle has joined #ruby
BraddBitt has quit [Read error: Connection reset by peer]
<biomass>
apeiros: ok =/ then I would need to set up my own translation to do "safe" matching ?
BraddBitt has joined #ruby
<platzhirsch>
after looking at the alternatives I think JRuby and JVM profiling is the best choice if you run into serious problems
Zai00 has quit [Client Quit]
<apeiros>
biomass: or use a gem
vlad_starkov has joined #ruby
sectionme has quit [Read error: Operation timed out]
<apeiros>
activesupport's mb_char can do it I think, also some unicode gems
timonv has quit [Remote host closed the connection]
endash has quit [Quit: endash]
<banisterfiend>
platzhirsch yeah a lot of people i know use jruby, it's just a pain when doing certain things (like shelling out)
AdmiraI has quit [Remote host closed the connection]
bluehavana has quit [Ping timeout: 260 seconds]
<platzhirsch>
Okay, what is shelling out? I heard this now the second time. Communicating to the system? Like OS calls? exec..
<biomass>
apeiros: right, I'll start serching =)
AdmiraI has joined #ruby
<apeiros>
platzhirsch: invoke a subshell and execute commands there
AdmiraI has left #ruby [#ruby]
rtl_ is now known as rtl
<platzhirsch>
why should that be a problem with JRuby?
<smirn0v>
Greetings! I have quite simple gem with pair of classes and one runner in "bin" folder. Should I place all classes in module ? Are there any guidelines/best practices about that ?
mrsolo has quit [Client Quit]
<|jemc|>
smirn0v: yes, please do
<|jemc|>
put it in a module with the name of your gem
mengu has joined #ruby
<shevy>
smirn0v there are not guidelines, but putting something into a module gives you some advantages, and only few disadvantages
Atrophius has joined #ruby
Atrophius has quit [Client Quit]
<shevy>
if you have: def foo; end, and lateron def foo; end again, you will overwrite the earlier defined foo(), unless you have them reside in separate module
<platzhirsch>
You can still run GC.start explicitly with Ruby 2.0? I thought they turned that off
<smirn0v>
|jemc|: one question. The name of the gem is 'autotarget', name of one of the classes the same… and… wouldn't that be strange to have Autotarget::Autotarget ? ) Or should I think about names again ? )
claymore has quit [Quit: Leaving]
<|jemc|>
smirn0v: if a user wants your classes accessible from the toplevel for convenience, they can always do 'include MyLibrary' after 'require 'mylibrary''
interactionjaxsn has quit [Remote host closed the connection]
<|jemc|>
oh
<smirn0v>
|jemc|: understood, I will definitely place it into module.
<|jemc|>
in that case
<shevy>
hehe
<shevy>
imagine if ruby would have
<shevy>
Array::Array.new
<shevy>
Hash::Hash.new
<|jemc|>
you could define your other class 'inside' of the first
<smirn0v>
shevy: yep… weird...
<|jemc|>
so someone can use AutoTarget or AutoTarget::Helper
<bnagy>
|jemc|: I never include foreign code
<|jemc|>
this is all subjective based on what your gem actually does, but in general it is courteous to your end user to take steps to avoid name collisions
<shevy>
|jemc| is a wise man
<bnagy>
so you can assume that I'm going to be typing YourModuleName::YourClass every darn time :P
<shevy>
include Bnagy
mrsolo has joined #ruby
flanged43 has quit [Ping timeout: 240 seconds]
<shevy>
hmmm
apeiros has quit [Remote host closed the connection]
<|jemc|>
bnagy: you could also do: ConvenientName = YourModuleName::YourClass
cody-- has quit [Quit: derp]
<shevy>
exclude Bnagy
<smirn0v>
|jemc|: I think the second class can be named just 'DSL', so no name duplication will be presented ) Ok, guys, thank you very much. Got the general idea )
<shevy>
why don't we have an exclude functionality? aka revert an earlier include event
apfelbox has joined #ruby
<shevy>
hanmac tell me
<|jemc|>
sounds sort of like refinements
<|jemc|>
but not quite
<shevy>
hehe
<shevy>
refinements are like an extension to "monkey" patching?
<bnagy>
|jemc|: if the namespace is that simple it doesn't really need to be put in a module, does it :)
paulodiniz has joined #ruby
<shevy>
oh no!
<shevy>
a module it must be!
<bnagy>
anyways my 0.02 is for two classes I wouldn't bother, unless there is a chance your classnames might collide
flanged43 has joined #ruby
<shevy>
I used to have a file called "custom_methods.rb"
<shevy>
it grew to +3000 lines... I eventually put it into its own module namespace
<bnagy>
but I do not have a strong opinion about my view being objectively correct
<bnagy>
(in this instance ;)
<shevy>
well actually
<shevy>
if it's a small file... then yeah... probably not needed to be in a module
<shevy>
so strangely enough, I find myself in agreement with bnagy after at first disagreeing.... hmmmm
i_s has joined #ruby
Stalkr^ has joined #ruby
tyoc213 has joined #ruby
Atrophius has joined #ruby
apfelbox has quit [Ping timeout: 264 seconds]
carlyle has quit [Remote host closed the connection]
<Hanmac>
shevy i think the problem is when you have module included in module included into class, its not so easy possible to remove it again from the chain
<shevy>
hmm
mlpinit_ has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
beilabs_ has quit [Ping timeout: 245 seconds]
devoldmx has quit [Ping timeout: 256 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
devoldmx has joined #ruby
pwh has joined #ruby
mmitchell has quit [Read error: Operation timed out]
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
diegoviola has quit [Ping timeout: 260 seconds]
<tyoc213>
Is there, Im using if thing.instance_of? SomeClass but running my test after this, I notice they run a little slower than if I dont do it
yfeldblum has quit [Ping timeout: 260 seconds]
<tyoc213>
Im only trying to see if it is another thing than a Fixnum
kvirani has quit [Read error: Connection reset by peer]
pwh has quit [Client Quit]
<bnagy>
in general, we frown on this and prefer duck typing
kvirani has joined #ruby
loss has quit [Quit: Leaving]
<bnagy>
as in you should react to how the target object behaves ( respond_to? ) not to what class it is
<bnagy>
cause people subclass etc all the time
Banistergalaxy has quit [Ping timeout: 240 seconds]
<a1ph4g33k>
you can make instances of a class that don't adhere to the type ... so you should rely on type.
<workmad3>
bnagy: no
<a1ph4g33k>
... respond_to? is more idiomatic to ruby.
<workmad3>
bnagy: other way around... if you include that module into a class that defines its own initialize method, then the class's initialize takes precedence (standard method lookup)
ehaliewicz has quit [Remote host closed the connection]
tgf46 has quit [Quit: tgf46]
<bnagy>
ok.. so when would a module initialize ever be invoked?
<workmad3>
when you include it into a class that doesn't have its own initialize
<bnagy>
(too lazy to irb)
danman has joined #ruby
<a1ph4g33k>
doesn't include inject the module into the lookup BEFORE the original type ?
ohcibi has joined #ruby
ehaliewicz has joined #ruby
<workmad3>
at which point it'll be invoked on behalf of the class, not of the module
m8 has quit [Quit: Sto andando via]
<workmad3>
or if you call 'super' inside the initialize of your class's initialize method
evenix has joined #ruby
<shevy>
bnagy I am still not sure how it works, I was just very surprised that one could define @ivars in a module, and then use them in a class
anoNxeRo has joined #ruby
<shevy>
it felt like subclassing in a way
<workmad3>
shevy: the mechanics are pretty much the same
<a1ph4g33k>
nope, I was wrong.
<workmad3>
shevy: it's just the conceptual model that's different
<a1ph4g33k>
>> module Foo ; end ; class Bar ; include Foo ; end ; Foo.ancestors
<workmad3>
shevy: next you'll be expressing amazment that when you subclass, ivars that you define in the superclass end up defined in the instance of the subclass ;)
bluehavana has joined #ruby
<a1ph4g33k>
>> module Foo ; end ; class Bar ; include Foo ; end ; a = Foo.new ; a.class.ancestors
<workmad3>
yes, a module can be thrown into the method lookup, that's kinda the point of them... some small 'module' of functionality that doesn't make sense on its own, it only makes sense in a larger context
<workmad3>
you don't go around creating instances of Comparable... you go around making instances of Foo, which happens to be Comparable
blitz has joined #ruby
<workmad3>
and by making it Comparable, you're stating certain characteristics and behaviours that it conforms to
<blitz>
is #rails the preferred rails channel?
<bnagy>
anyway out of all of this TIL the super in initialize looks up modules as well
<workmad3>
blitz: no, #rubyonrails
<blitz>
thanks
<bnagy>
which I guess I kind of already knew, but never thought of a pattern for
cj3kim_ has quit [Remote host closed the connection]
<bnagy>
I suspect it's bad and wrong though
m00nlight has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
<workmad3>
bnagy: it's not too bad, as long as you do 'super if defined?(super)' within that initialize
<a1ph4g33k>
workmad3, "and by making it Comparable" ... no you aren't ... you are asking for the given class to "by default" include a specific set of functionality. But, because Ruby allows objects to be re-opened and methods added, replaced, & removed ... you really haven't stated anything of the kind.
bugsinlights has joined #ruby
<a1ph4g33k>
... just stating ... as given in a gist just a few minutes ago ... you can easily define an instance of a class that doesn't support the expected interface any more.
<workmad3>
bnagy: as it gives you a place to set up stuff you need for a module's functionality on instanciation
apfelbox has joined #ruby
AFKGeek has joined #ruby
<a1ph4g33k>
it will still say "I am Foo ( or Comparable )" ... but not be.
flanged43 has quit [Quit: flanged43]
<workmad3>
a1ph4g33k: you can... you shouldn't, but you can :)
rgbdev has quit [Quit: rgbdev]
ehaliewicz has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
<a1ph4g33k>
It's because of the "can" that people tend to use respond_to? ... it doesn't matter what the object is an instance of ... if you can find the methods you expect ... you are close enough.
<workmad3>
a1ph4g33k: tbh, I personally do the 'leap, don't look' style rather than respond_to?
<a1ph4g33k>
plus you find all sorts of interesting uses by allowing this freedom that you never expected when you wrote function libraries.
<a1ph4g33k>
appending to strings via << ... also works for files, or arrays ...
pantaloon has joined #ruby
<a1ph4g33k>
and as long as it does something with it, it isn't your place to care what that is.
<workmad3>
a1ph4g33k: the use of modules is more of a statement to the coder that you're making this thing Comparable explicitly, because you want those things that Comparable means
<pantaloon>
hi
anonymuse has quit [Remote host closed the connection]
<a1ph4g33k>
but notice that the code that uses the Comparable interface doesn't check for it ...
<a1ph4g33k>
as long as you provide the appropriate methods ... it doesn't care.
<workmad3>
no
<workmad3>
it doesn't care
ssvo has quit [Ping timeout: 248 seconds]
<workmad3>
code rarely cares about that sort of trivia
anthracocide61 has joined #ruby
mary5030 has quit [Remote host closed the connection]
apfelbox has quit [Ping timeout: 264 seconds]
Jdubs has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
<workmad3>
but if I'm looking at a library or inspecting a class in IRB, and *I* notice 'Comparable' or the <=> operator, I'll make certain assumptions about possible uses
<workmad3>
such as being able to .sort an array of these things
ehaliewicz has quit [Remote host closed the connection]
<a1ph4g33k>
=) I understand, I'm just saying that I do that with <=> ... I don't do that with "Comparable".
ehaliewicz has joined #ruby
<a1ph4g33k>
<=> is comparison, that's all I care about.
<workmad3>
a1ph4g33k: if Comparable is there in the docs, I'll also know that I can do <, <=, >, >=, etc on it (as that's what Comparable pulls in with it)
baroquebobcat has quit [Quit: baroquebobcat]
<workmad3>
a1ph4g33k: and if I want to provide those, chances are I'll start by providing a <=> and including Comparable, rather than implementing them all by hand (I might replace them later because there are better implementations for them in a specific case)
baroquebobcat has joined #ruby
Jdubs has quit [Read error: Connection reset by peer]
lowcard has joined #ruby
<a1ph4g33k>
workmad3, ok ... I'm simply saying, that not only things that have Comparable are. And you limit yourself ( and people that use your code ) when you think that you have to tie yourself to an interface like that.
Jdubs has joined #ruby
<workmad3>
a1ph4g33k: I don't think I *have* to tie myself to an interface
ghost2060 has joined #ruby
<workmad3>
a1ph4g33k: but when I *do* have that interface, I find it useful to document it as such
blitz has left #ruby ["Leaving"]
<a1ph4g33k>
we are talking about different things ... I'm not talking about documentation, I'm talking about usage.
<workmad3>
a1ph4g33k: you're thinking I do this pre-facto as a "I want this thing, and it will be Comparable, and it will be Enumerable, and it will only be usable as an X'
<a1ph4g33k>
having stuff in your code that checks to see if the thing passed in is an object with Comparable in its ancestry ... is all that I'm rallying against.
SloggerKhan has joined #ruby
yfeldblum has joined #ruby
RORgasm has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
<workmad3>
a1ph4g33k: whereas I do it more post-facto, I'll write something, and then go 'oh, this looks similar to that, they both seem to have a similar interface... lets pull that out'
<pantaloon>
hmm $stdin.read(18) whait if 18 bytes have reached when -icanon -echo
<workmad3>
a1ph4g33k: I already said I don't check ancestry
RORgasm has joined #ruby
<workmad3>
a1ph4g33k: I don't even check respond_to? most of the time... I leap before I look :)
<pantaloon>
need a break after any key has pressed
petey has joined #ruby
andredieb has joined #ruby
<a1ph4g33k>
workmad3, then I may have mixed you up with another individual that was in the channel wanting to do kind_of? checks
pkrnj has quit [Quit: Computer has gone to sleep.]
<workmad3>
a1ph4g33k: indeed
<a1ph4g33k>
workmad3, ... sorry for the noise if I did.
<workmad3>
a1ph4g33k: I got that out of my system when I first tried python ;)
<a1ph4g33k>
workmad3, ah, that was shevy.
lowcard is now known as fourqq
<workmad3>
a1ph4g33k: I was the one explaining what (I think) modules are there for :)
<a1ph4g33k>
workmad3, yep, ... feeling foolish.
pwh has joined #ruby
<workmad3>
a1ph4g33k: nah, it was a good counter-point argument that made me express my thoughts slightly differently to usual :)
<SloggerKhan>
Stupid question - I have a class containing an array... is there a way to set it up so that I can use += to add to the array in chunks rather than just + ?
<SloggerKhan>
I tried doing:
<SloggerKhan>
@set.push(*thing)
<SloggerKhan>
def + (thing)
<SloggerKhan>
end
<SloggerKhan>
Which works fine for + thing, but not += thing...
<SloggerKhan>
Obv. behavior of just + is fine, but it doesn't really represent what's happening as nicely as += would.
<SloggerKhan>
Stupid question - I have a class containing an array... is there a way to set it up so that I can use += to add to the array in chunks rather than just + ?
<havenwood>
pantaloon: that sounds beyond getch, doesn't take params for chars or anything
workmad3 is now known as wm3|zzz
<zaltekk>
SloggerKhan: define "add to the array in chunks"
<zaltekk>
does #<< not meet your needs?
<pantaloon>
havenwood: k i see, STDIN.getch is not equal to getch() ncurses ansi c
<SloggerKhan>
+= [1,2,3], for example.
gazarsgo has quit [Ping timeout: 245 seconds]
<SloggerKhan>
Where I'm working with a class rather than an array
<a1ph4g33k>
SloggerKhan, you can define your own def +=( *values ) method ... and delegate the input to your inner array.
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vim_shim has joined #ruby
<pantaloon>
havenwood: thx i play a bit with it
<SloggerKhan>
I tried that but it seems to want to only define the + and not the +=.
<zaltekk>
SloggerKhan: not sure what you expect, but << will add the array as an element, and + will add the array's content as individual elements
<zaltekk>
platzhirsch: you define +, not +=
<zaltekk>
err, SloggerKhan*
<zaltekk>
+= is implemented in terms of +
<a1ph4g33k>
>> class Foo ; def initialize ; @inner_array = [] ; end ; def method_missing( name, *args, &block ) ; @inner_array.send( name, *args, &block ) ; end ; end ; a = Foo.new ; a += [ 1. 2. 3 ] ;
<a1ph4g33k>
( if you like the method_missing to catch everything you can ... or you can just define the few you want ... like += or << ( which are the same method ) )
<bnagy>
just expose the array from the class
thinkclay1 has joined #ruby
thinkclay has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
<bnagy>
or, if you don't want to, use += in your API
<a1ph4g33k>
>> class Foo ; def initialize ; @inner_array = [] ; end ; def +=( *values ) ; @inner_array += *values ; end alias :+= :<< ; end ; a = Foo.new ; a += [ 1, 2, 3 ] ; a += [ 4, 5, 6 ]
end_guy has quit [Remote host closed the connection]
einarj has joined #ruby
<bnagy>
a is an Array now not a Foo
<zaltekk>
lol, oops :P
jefflyne has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
<SloggerKhan>
I don't want an array wrapper, I have a class that does some accumulates stuff with a non-reorderable stack, I just wanted to make it easy to add to the stack. Array is overkill and could actually cause problems. Obviously I could just make an add( method or something, but didn't expect to not be able to use +=. So asked about it.
petey has quit [Remote host closed the connection]
cody-- has quit [Quit: derp]
<zaltekk>
SloggerKhan: if you implment +, you can use +=
quoin has joined #ruby
mrsolo has joined #ruby
<bnagy>
ok then zaltekk's code works, just change it to @inner_array +=
pantaloon is now known as prismate
ssvo has joined #ruby
<SloggerKhan>
I think using .push(*thing) might have been the problem. I'll test again with the variation.
pyoor has left #ruby [#ruby]
snovak has quit [Ping timeout: 245 seconds]
<bnagy>
if you have stack semantics I would prefer an API that uses push *thing, gotta admit
geggam_ has quit [Remote host closed the connection]
dangerousdave has quit [Ping timeout: 260 seconds]
<bnagy>
you can do tricks like [*a], that will give you a flat array
<SloggerKhan>
I don't exactly disagree, however for this particular class the users are more likely to be thinking in terms of set semantics like add/remove even if it has to use a stack to correctly order changes. (I'm working with an insane sftp batch command api)
mrsolo has quit [Quit: This computer has gone to sleep]
<bnagy>
handy for if you want a method to be able to take a value or an array
carlyle has quit [Remote host closed the connection]
ewnd9 has quit [Ping timeout: 245 seconds]
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
crus has joined #ruby
vim_shim has joined #ruby
ghostjangles has joined #ruby
ahawkins has quit [Quit: leaving]
headius has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
nari has joined #ruby
kvirani has quit [Ping timeout: 276 seconds]
<a1ph4g33k>
bnagy, you mean the splat operator ? not quite flattening.
pel_daniel has left #ruby [#ruby]
<bnagy>
I just mean what I said, with the example I showed
<a1ph4g33k>
bnagy: when used during a method invocation it expands the given array into individual parameters ... when used during declaration it takes any number of arguments and turns them into an array ...