hakunin has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby
nhhagen has quit [Ping timeout: 246 seconds]
<shevy>
ewww... the $;='' is so ugly ...
<volty>
Eiam: convert to array (if string), a.each_slice(2).to_a.inject([]) { |t, n| t << { n[0] => n[1] }; t } // ... or like that
<Boohbah_>
yeah but it saves 2 or 3 characters cpmared to map() with a block :)
jrhorn424 has joined #ruby
unixninja92 has quit [Ping timeout: 256 seconds]
unixninja92_ is now known as unixninja92
iliketur_ has joined #ruby
ryandeussing has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
<Boohbah_>
nobody said golf was supposed to be pretty...
hamakn has quit [Ping timeout: 260 seconds]
Fire-Dragon-DoL has quit [Read error: Connection reset by peer]
Fire-Dragon-DoL has joined #ruby
Cheos has joined #ruby
<Boohbah_>
map(&:split(//)) is a syntax error
<Boohbah_>
so i change the IFS
jdolitsky1 has quit [Quit: Leaving.]
unixninja92 has quit [Quit: unixninja92]
mary5030 has joined #ruby
quoin has joined #ruby
tatsuya_o has joined #ruby
hogeo has joined #ruby
hell_lord has joined #ruby
nettoweb has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
danman has quit [Quit: danman]
<hell_lord>
hi. i keep seeing this pattern for mixins where people define a method called "included" and then "inject" the methods they want added to a class. i thought when you include a module you automatically get all of its instance methods - what's the point of this?
<stewart_>
volty: yes just wondering. When I first started working with .constants i expected it to always return constants in the same order. When I found that it does not I started wondering about how MRI in this case handles the implementation. Like I said above I think ruby returns the constants in the order that they where included. So if you have a set of includes loading classes from files that all exist in the same namespace then .constants on
tatsuya_o has quit [Ping timeout: 264 seconds]
kenneth has quit [Ping timeout: 264 seconds]
chrisja has quit [Quit: leaving]
KobraKao has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
duggiefresh has joined #ruby
nisstyre is now known as Nisstyre-laptop
sailias has quit [Ping timeout: 256 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
Boohbah_ is now known as Boohbah
zarubin has quit [Ping timeout: 246 seconds]
Nisstyre-laptop is now known as nisstyre
pskosinski has quit [Read error: Connection reset by peer]
mansi has joined #ruby
ics has quit [Ping timeout: 240 seconds]
kenneth has joined #ruby
nisstyre is now known as nisstyre-laptop
rads has quit [Quit: rads]
hell_lord has quit [Quit: leaving]
thepumpkin has joined #ruby
nisstyre has joined #ruby
DanielPy has quit [Quit: Quit]
jaimef has quit [Excess Flood]
apfelbox has joined #ruby
toothe_ has quit [Quit: leaving]
DanielRb has joined #ruby
DanielRb has quit [Changing host]
DanielRb has joined #ruby
pwh has quit [Quit: pwh]
mercwithamouth has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
apfelbox has quit [Read error: Operation timed out]
jaimef has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
quoin has quit [Ping timeout: 276 seconds]
lukec has quit [Quit: lukec]
dmerrick_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
nhhagen has quit [Ping timeout: 246 seconds]
thepumpkin has quit [Ping timeout: 256 seconds]
ehc has quit [Quit: ehc]
DonRichie has quit [Ping timeout: 256 seconds]
tjad has quit [Read error: Operation timed out]
thepumpk_ has quit [Read error: Connection reset by peer]
azcodex has quit [Quit: azcodex]
thepumpkin has joined #ruby
funburn has quit [Quit: funburn]
<Collin>
Can I store a proc that is a member function of an object?
DonRichie has joined #ruby
kenneth has quit [Quit: kenneth]
<Collin>
Oh, nevermind
dankest has quit [Quit: dankest]
jdeeburke has joined #ruby
jdeeburke has quit [Max SendQ exceeded]
jdeeburke has joined #ruby
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
lembacon has joined #ruby
rburton- has quit [Quit: Leaving...]
jonathanwallace has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
nettoweb has quit [Quit: nettoweb]
iliketur_ has quit [Quit: zzzzz…..]
zorg24 has joined #ruby
brianpWins has quit [Quit: brianpWins]
kvirani has joined #ruby
macro1 has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
stalker34 has quit [Ping timeout: 240 seconds]
jtgiri_ has quit [Quit: jtgiri_]
NedsFlam has quit [Ping timeout: 248 seconds]
pairup has joined #ruby
mary5030 has quit [Remote host closed the connection]
tomzx_mac has joined #ruby
dhruvasagar has joined #ruby
dagnachew has joined #ruby
tealmage has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
tealmage has joined #ruby
gr33n7007h has quit [Quit: Where's John Conner]
jaimef has joined #ruby
kvirani has quit [Ping timeout: 276 seconds]
hakunin_ has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
tealmage has quit [Ping timeout: 256 seconds]
Monie has joined #ruby
bricker has quit [Remote host closed the connection]
bricker`LA has quit [Remote host closed the connection]
d2dchat_ has joined #ruby
Pent has quit [Read error: Connection reset by peer]
c0rn has quit [Quit: Computer has gone to sleep.]
hamakn has joined #ruby
Pent has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: nettoweb]
bricker`LA has joined #ruby
machuga|away is now known as machuga
hamakn has quit [Remote host closed the connection]
jtgiri_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
hamakn has joined #ruby
randomdrake has joined #ruby
cyong has joined #ruby
randomdrake has quit [Client Quit]
MrZYX is now known as MrZYX|off
tkuchiki has joined #ruby
wesside has joined #ruby
qizwiz has joined #ruby
hamakn has quit [Ping timeout: 256 seconds]
jtgiri_ has quit [Quit: jtgiri_]
dagnachew has quit [Quit: Leaving]
MANTAS322_ has joined #ruby
<qizwiz>
if I have a string that looks like this "#<struct Window id=3968>", how do I "convert" (for lack of a better term) it back to the object it references?
<MANTAS322_>
Hello!
nhhagen has joined #ruby
ckrailo has joined #ruby
mroth has joined #ruby
rburton- has joined #ruby
aef has quit [Ping timeout: 245 seconds]
fenicks has quit [Remote host closed the connection]
nari has joined #ruby
Yakko has joined #ruby
iliketur_ has joined #ruby
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bricker`LA>
qizwiz: why do you only have the string, but not the actual object?
agent_white has joined #ruby
nanoxd has joined #ruby
<pontiki>
that just looks like the output of inspect
sevenseacat has joined #ruby
aef has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<qizwiz>
heh...it's from the params hash in a request
<qizwiz>
it isn't just the output of inspect. If I run it through the debugger and look at my object, it's clearly a string
twoism has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
<bricker`LA>
qizwiz: it would be better to pass the object attributes as a parameter(s) and then build an object from that
nanoxd has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
nanoxd has joined #ruby
Pent has quit [Ping timeout: 245 seconds]
<qizwiz>
I'm using zephyros to play with some programmable window management in OSX
<qizwiz>
I thought it'd be neat to pull that into a rails project
tealmage has joined #ruby
stewart_ has left #ruby [#ruby]
Pent has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
mansi has joined #ruby
<qizwiz>
so...the params hash in question corresponds to a window I'm manipulating
<seoNinjaWarrior>
errr i'm having some memory problems with MRI ruby threads. after a thread is terminated, does garbage collection take care of it automatically?
mansi has quit [Ping timeout: 256 seconds]
Klotho1 has quit [Ping timeout: 264 seconds]
Targen has joined #ruby
cody-- has joined #ruby
yekta has joined #ruby
blueredturtle has joined #ruby
blueredturtle has quit [Client Quit]
thepumpkin has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
eshy has joined #ruby
Lewix has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
nerdy has quit [Quit: Computer has gone to sleep.]
Yakko has quit [Remote host closed the connection]
thesheff17 has joined #ruby
cads has joined #ruby
jalcine has quit [Excess Flood]
cfi30 has joined #ruby
freerobby has quit [Quit: Leaving.]
havenwood has quit [Remote host closed the connection]
mary5030 has joined #ruby
apfelbox has joined #ruby
kvirani has quit [Remote host closed the connection]
Bira has quit [Read error: Connection reset by peer]
kvirani has joined #ruby
mary5030_ has joined #ruby
zeade has quit [Quit: Leaving.]
Bira has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
tealmage has quit [Remote host closed the connection]
dodosan_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
`UNION is now known as `or`|`EQ`|
apfelbox has quit [Ping timeout: 246 seconds]
<`or`|`EQ`|>
buzzybron: can you not just write a method that takes each method call and logs it?
varfoo has quit [Quit: WeeChat 0.4.0]
aagdbl1 has joined #ruby
hamed_r has joined #ruby
girija_ has joined #ruby
havenwood has quit [Remote host closed the connection]
octarine has joined #ruby
havenwood has joined #ruby
jefflyne2 has joined #ruby
tealmage has quit [Ping timeout: 256 seconds]
aagdbl has quit [Read error: Connection reset by peer]
girija has quit [Read error: Connection reset by peer]
zorg24 has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
gyzmodo has joined #ruby
kayloos has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
__main__ has quit [Ping timeout: 264 seconds]
cads has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
ehaliewicz has quit [Ping timeout: 268 seconds]
TomRone has quit [Ping timeout: 240 seconds]
`or`|`EQ`| is now known as [Y|n]
brtdv has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
havenwood has joined #ruby
Apocalypse has joined #ruby
diegoviola has joined #ruby
varfoo has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
tylersmith has joined #ruby
cads has quit [Ping timeout: 245 seconds]
DrCode has joined #ruby
bricker`LA has quit [Ping timeout: 256 seconds]
__main__ has joined #ruby
zorg24 has joined #ruby
dagobah has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
dodosan has joined #ruby
dhruvasagar has joined #ruby
tylersmith has quit [Ping timeout: 240 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
tonni has joined #ruby
maveonair has joined #ruby
<maveonair>
456
aagdbl1 is now known as aagdbl
DanKnox is now known as DanKnox_away
Spami has joined #ruby
Spami has joined #ruby
<jrobeson>
789
havenwood has quit [Ping timeout: 240 seconds]
JoeTheGuest has joined #ruby
ics has quit [Ping timeout: 260 seconds]
tesuji has joined #ruby
filipe has joined #ruby
Guest67887 is now known as lemonsparrow
maletor has quit [Quit: Computer has gone to sleep.]
girija_ has quit [Ping timeout: 240 seconds]
greenride has left #ruby [#ruby]
DanKnox_away is now known as DanKnox
endash has quit [Quit: endash]
marienz has joined #ruby
marius has quit [Quit: oh nooo]
beneggett has joined #ruby
girija_ has joined #ruby
jprovazn has joined #ruby
DanKnox is now known as DanKnox_away
mmm has joined #ruby
alup has joined #ruby
mm__ has quit [Ping timeout: 245 seconds]
persand has joined #ruby
tonni has quit [Ping timeout: 256 seconds]
relix has joined #ruby
Koa has quit [Ping timeout: 246 seconds]
iliketur_ has joined #ruby
diegoviola has quit [Ping timeout: 241 seconds]
Guest77068 is now known as mumblerit
havenwood has joined #ruby
parzo has quit [Ping timeout: 240 seconds]
raddazong is now known as madhatter
mansi has joined #ruby
madhatter has quit [Changing host]
madhatter has joined #ruby
iliketur_ has quit [Ping timeout: 246 seconds]
tonni has joined #ruby
beilabs_ has quit [Ping timeout: 276 seconds]
kke has joined #ruby
beilabs_ has joined #ruby
ryandeussing has joined #ruby
quoin has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
kaspergr_ has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
ewnd9 has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<kke>
i have a logger method on module and i'd like to call it like logger.info from inside a class that is inside that module, how should i do it? or should i just call Modulename.logger everywhere?
ryandeussing has quit [Ping timeout: 245 seconds]
kilophoton has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Read error: Operation timed out]
<kke>
i thought it would work just like that, but i'm getting unknown local variable or method logger for Submodule
Davey has quit [Quit: Computer has gone to sleep.]
mrsolo has joined #ruby
<kke>
perhaps i need the create a Log singleton and do Log.info "foo"
apfelbox has joined #ruby
apfelbox has quit [Remote host closed the connection]
apfelbox has joined #ruby
maz-dev has joined #ruby
bricker`LA has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
end_guy_ has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
vikhyat has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<pontiki>
kke: is logger a module function?
apod has joined #ruby
fsck3r has quit [Quit: Leaving...]
Macaveli has joined #ruby
<pontiki>
i usually just use Logger
<pontiki>
extend or include that
tjad has quit [Ping timeout: 246 seconds]
tatsuya_o has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
bricker`LA has quit [Ping timeout: 256 seconds]
Macaveli has joined #ruby
jefflyne2 has quit [Ping timeout: 256 seconds]
<kke>
it's both self and without self, still i don't see it from subclasses. guess i'd have to include some Mainmodule::Logger thing to get the method into the classes
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
fsck3r has joined #ruby
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
pranny has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
pranny1 has quit [Read error: Connection reset by peer]
kapowaz has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
varfoo has joined #ruby
marcgg has joined #ruby
pranny has joined #ruby
Domon has quit [Ping timeout: 256 seconds]
keanehsiao has joined #ruby
pranny2 has joined #ruby
keanehsiao has quit [Client Quit]
senayar has joined #ruby
pranny1 has quit [Read error: Connection reset by peer]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
simoz has joined #ruby
pranny2 has left #ruby [#ruby]
alexchan has joined #ruby
pranny has quit [Ping timeout: 260 seconds]
Domon has joined #ruby
kaspergrubbe has joined #ruby
alexchan has quit [Client Quit]
tonni has quit [Remote host closed the connection]
Criztian has joined #ruby
mklappstuhl has joined #ruby
havenwood has quit [Remote host closed the connection]
jbpros has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
kayloos has quit [Ping timeout: 245 seconds]
apod has quit []
troessner has joined #ruby
karlfreeman has joined #ruby
timonv has joined #ruby
yannickoo has joined #ruby
HavokOC has joined #ruby
strax has joined #ruby
keyvan_ has joined #ruby
lectrick has joined #ruby
xiphiasx_ has joined #ruby
visof has quit [Read error: Operation timed out]
didlix has joined #ruby
tjad has joined #ruby
mattyohe has joined #ruby
mahlon_ has joined #ruby
shredding has joined #ruby
simoz has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
fryguy has joined #ruby
Hanmac has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
<Hanmac>
shevy: did you know the newest funny error? (bad it was not found by me) try this ;P "%.99999f" % 10
mklappstuhl has quit [Remote host closed the connection]
<xybre>
Why would you prefer `logger.info` versus `Log.info`?
<Hanmac>
xybre is the first one an instance method or a class method?
Nanuq has joined #ruby
TDJACR has joined #ruby
tonni has joined #ruby
rdark has joined #ruby
<xybre>
I don't know, that sort of what I'm asking. Log can always be a constant assigned an instance of a logger class though.
obs has joined #ruby
havenwood has joined #ruby
<Hanmac>
hm both is possible, like logger = Log.new; logger.info would work, but you can also implment it as Log.info … depending if you want multible Logs at the same time (and you can make it that the class method Log.info automatically pushs into the current selected log or logs)
hamed_r has quit [Remote host closed the connection]
blackmesa has joined #ruby
Ripp__ has quit [Quit: Ripp__]
fsck3r has quit [Quit: Leaving...]
shaunbaker has joined #ruby
mansi has joined #ruby
nomenkun has joined #ruby
threesome has joined #ruby
visof has joined #ruby
persand has quit [Quit: persand]
persand has joined #ruby
visof_ has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
jmc-be has joined #ruby
ephemerian has joined #ruby
zeel has joined #ruby
visof has quit [Ping timeout: 268 seconds]
wicketn00b has quit [Ping timeout: 264 seconds]
simoz has joined #ruby
quoin has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
adambeynon has joined #ruby
mklappstuhl has joined #ruby
kayloos has joined #ruby
anderson has joined #ruby
ttt_ has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 276 seconds]
funburn has quit [Quit: funburn]
timonv has quit [Remote host closed the connection]
<stevenm>
When executing it I get... lloydstsb.rb:19: undefined method `attributes' for nil:NilClass (NoMethodError
<stevenm>
for line 19 - any thoughts? maybe ruby has moved on and become more strict since this was written?
<stevenm>
i'm not too clued up on ruby i'm afraid
<airtonix>
if i want to make some .sass files available to all my projects in local development am I forced to use use ruby and create a gem file?
agent_white has quit [Quit: gnight]
JohnBat26 has joined #ruby
dodosan has quit [Remote host closed the connection]
<airtonix>
at the moment i only use gem to get compass, sass, and zurb-foundation within a gemset controlled by rvm
blackmesa has quit [Remote host closed the connection]
<rdark>
stevenm: I've got a feeling that the html var, which should contain the output of the curl command is empty
<stevenm>
rdark, probably that the bank site has moved on :S
Elhu has joined #ruby
camilasan has joined #ruby
decoponio has joined #ruby
blackmesa has joined #ruby
<rdark>
stevenm: yup :)
Zai00 has joined #ruby
<rdark>
well, moved elsewhere rather than on. Lloyds are one of the worst uk banks in terms of access to data
<stevenm>
rdark, well it's ok - i have another script (actually based off that one - someone forked it) which does work - but doesn't download statements - it lists balanced.
<stevenm>
*balances
vlad_starkov has quit [Remote host closed the connection]
<stevenm>
so I'll merge the two to get what i want
bluenemo has joined #ruby
bluenemo has joined #ruby
allsystemsarego has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
ghr has joined #ruby
crus has quit [Read error: Connection reset by peer]
simoz2 has joined #ruby
simoz has quit [Read error: Connection reset by peer]
timonv has joined #ruby
denver has joined #ruby
evelyette_ has joined #ruby
havenwood has quit [Remote host closed the connection]
maveonair has quit [Ping timeout: 260 seconds]
nanothief_ has joined #ruby
snovak_ has joined #ruby
<evelyette_>
hi, I have Nokogiri::XML::Document object and I would like to replace a substring with another string directly: which should introduce new XML tags ... I guess this can't be done directly and I should transform XML to string, make the replacement, then convert to XML again ... any ideas how to convert that XML to string ?
maveonair has joined #ruby
emogirlj2 has joined #ruby
emogirlj2 is now known as zets2
tkuchiki_ has joined #ruby
Fuzai_ has joined #ruby
blackmesa has quit [Remote host closed the connection]
v1n has joined #ruby
ryandeussing has joined #ruby
aef_ has joined #ruby
BlueShark_ has joined #ruby
ryandeussing has quit [Ping timeout: 256 seconds]
simoz2 has quit [*.net *.split]
Macaveli has quit [*.net *.split]
jso has quit [*.net *.split]
Fuzai has quit [*.net *.split]
snovak has quit [*.net *.split]
palco66 has quit [*.net *.split]
aef has quit [*.net *.split]
sevenseacat has quit [*.net *.split]
tkuchiki has quit [*.net *.split]
faulkner has quit [*.net *.split]
ahuman_ has quit [*.net *.split]
zets has quit [*.net *.split]
BlueShark has quit [*.net *.split]
v0n has quit [*.net *.split]
nanothief has quit [*.net *.split]
germanstudent has quit [*.net *.split]
visof_ has quit [*.net *.split]
fryguy has quit [*.net *.split]
marcgg has quit [*.net *.split]
maz-dev has quit [*.net *.split]
ewnd9 has quit [*.net *.split]
aagdbl has quit [*.net *.split]
epochwolf has quit [*.net *.split]
krz has quit [*.net *.split]
robustus has quit [*.net *.split]
dnyy has quit [*.net *.split]
pontiki has quit [*.net *.split]
thelamest has quit [*.net *.split]
eregon_ has quit [*.net *.split]
Soda has quit [*.net *.split]
lotherk has quit [*.net *.split]
Tarential has quit [*.net *.split]
dross has quit [*.net *.split]
spike|spiegel has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
echevemaster has quit [*.net *.split]
nazty has quit [*.net *.split]
blooberr has quit [*.net *.split]
Domon_ has quit [*.net *.split]
sethetter has quit [*.net *.split]
braincra- has quit [*.net *.split]
ericmathison has quit [*.net *.split]
Kneferilis has quit [*.net *.split]
lewiz has quit [*.net *.split]
jmccune has quit [*.net *.split]
graft has quit [*.net *.split]
malcolmva has quit [*.net *.split]
mikemar10 has quit [*.net *.split]
Blue_Ice has quit [*.net *.split]
awpti has quit [*.net *.split]
jmaister has quit [*.net *.split]
naquad has quit [*.net *.split]
elektronaut has quit [*.net *.split]
mist has quit [*.net *.split]
Schuy13r has quit [*.net *.split]
askhader has quit [*.net *.split]
slash_nick has quit [*.net *.split]
denken has quit [*.net *.split]
karnowski has quit [*.net *.split]
TheHodge has quit [*.net *.split]
three18ti has quit [*.net *.split]
Koshian has quit [*.net *.split]
dyoung522 has quit [*.net *.split]
sysop2 has quit [*.net *.split]
joschi has quit [*.net *.split]
Skelz0r has quit [*.net *.split]
jolleyjoe has quit [*.net *.split]
defrag has quit [*.net *.split]
denver has quit [*.net *.split]
allsystemsarego has quit [*.net *.split]
mattyohe has quit [*.net *.split]
mahlon_ has quit [*.net *.split]
senayar has quit [*.net *.split]
mrsolo has quit [*.net *.split]
ananthakumaran has quit [*.net *.split]
bricker`work has quit [*.net *.split]
existensil has quit [*.net *.split]
codecop has quit [*.net *.split]
choi0hun has quit [*.net *.split]
blueOxigen has quit [*.net *.split]
julweber_ has quit [*.net *.split]
araujo has quit [*.net *.split]
DanielRb has quit [*.net *.split]
gregorg has quit [*.net *.split]
waxjar_ has quit [*.net *.split]
aliljet_ has quit [*.net *.split]
wuest_ has quit [*.net *.split]
Jb____ has quit [*.net *.split]
Bish has quit [*.net *.split]
bakedb has quit [*.net *.split]
musl has quit [*.net *.split]
Mattias has quit [*.net *.split]
shevy has quit [*.net *.split]
Kovensky has quit [*.net *.split]
FDj has quit [*.net *.split]
hiyosi has quit [*.net *.split]
jglauche has quit [*.net *.split]
adamholt has quit [*.net *.split]
ping-pong has quit [*.net *.split]
neektza1 has quit [*.net *.split]
crazed has quit [*.net *.split]
Nuck has quit [*.net *.split]
mrapple has quit [*.net *.split]
xargoon has quit [*.net *.split]
jbc22 has quit [*.net *.split]
JonathanNeal 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]
ainame has quit [*.net *.split]
quoin has quit [*.net *.split]
tvw has quit [*.net *.split]
tjad has quit [*.net *.split]
karlfreeman has quit [*.net *.split]
troessner has quit [*.net *.split]
marienz has quit [*.net *.split]
dhruvasagar has quit [*.net *.split]
octarine has quit [*.net *.split]
kizzx2 has quit [*.net *.split]
okinomo has quit [*.net *.split]
nfk has quit [*.net *.split]
wallerdev has quit [*.net *.split]
Targen has quit [*.net *.split]
jp- has quit [*.net *.split]
m_3 has quit [*.net *.split]
postmodern has quit [*.net *.split]
chinkung has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
mgorbach has quit [*.net *.split]
JZTech101 has quit [*.net *.split]
stevenm has quit [*.net *.split]
jeremyb has quit [*.net *.split]
adkron_ has quit [*.net *.split]
duke_nukem has quit [*.net *.split]
asuka has quit [*.net *.split]
telling has quit [*.net *.split]
jsaak has quit [*.net *.split]
bubbajones has quit [*.net *.split]
x0nic has quit [*.net *.split]
Aloysius1 has quit [*.net *.split]
pinage404 has quit [*.net *.split]
froy has quit [*.net *.split]
ericwood has quit [*.net *.split]
paul_k has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
machuga|away has quit [*.net *.split]
blz37 has quit [*.net *.split]
micah` has quit [*.net *.split]
redgetan has quit [*.net *.split]
zeusmns has quit [*.net *.split]
darkc0met has quit [*.net *.split]
RTG` has quit [*.net *.split]
wykydtron has quit [*.net *.split]
mvangal__ has quit [*.net *.split]
_br_ has quit [*.net *.split]
ozzloy has quit [*.net *.split]
anderson has quit [*.net *.split]
mklappstuhl has quit [*.net *.split]
strax has quit [*.net *.split]
HavokOC has quit [*.net *.split]
jbpros has quit [*.net *.split]
tatsuya_o has quit [*.net *.split]
filipe has quit [*.net *.split]
brtdv has quit [*.net *.split]
sayd_ has quit [*.net *.split]
Columcille has quit [*.net *.split]
aetaric has quit [*.net *.split]
ShapeShifter499 has quit [*.net *.split]
Dwarf has quit [*.net *.split]
AllStruck has quit [*.net *.split]
Nakilon has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
seich- has quit [*.net *.split]
nisstyre has quit [*.net *.split]
radic__ has quit [*.net *.split]
linduxed has quit [*.net *.split]
dmiller has quit [*.net *.split]
Cheos has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
DylanJ has quit [*.net *.split]
rcs has quit [*.net *.split]
arusso has quit [*.net *.split]
axsuul has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
BraddPitt has quit [*.net *.split]
jaynewst_ has quit [*.net *.split]
joshu has quit [*.net *.split]
MarcWeber has quit [*.net *.split]
bronson_ has quit [*.net *.split]
taion809 has quit [*.net *.split]
SirFunk has quit [*.net *.split]
wormwood has quit [*.net *.split]
Kruppe has quit [*.net *.split]
psyprus has quit [*.net *.split]
lunarjar has quit [*.net *.split]
kkh has quit [*.net *.split]
Buuyo has quit [*.net *.split]
nnww has quit [*.net *.split]
dlind has quit [*.net *.split]
conceal_rs_____0 has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
ttt has quit [*.net *.split]
closer has quit [*.net *.split]
eshy has quit [*.net *.split]
karupanerura has quit [*.net *.split]
cibs has quit [*.net *.split]
BlueShark_ has quit [Remote host closed the connection]
<Xeago>
something somewhere has definitely gone wrong
<Xeago>
Alas, is it okay to ask my future employer (starting 16-09) if I could pick up my laptop before the weekend, so I can start my customizing my personal preferences?
germanstudent has joined #ruby
Macaveli has joined #ruby
BlueShark has joined #ruby
nisstyre has joined #ruby
<xybre>
They might appreciate your desire to get started faster.
pskosinski has joined #ruby
nhhagen has quit [Ping timeout: 250 seconds]
blackratdog has quit [Ping timeout: 250 seconds]
moura has joined #ruby
colonolGron has quit [Ping timeout: 264 seconds]
Stygia has joined #ruby
razi has joined #ruby
anderson has joined #ruby
mklappstuhl has joined #ruby
strax has joined #ruby
Kruppe has joined #ruby
jso_ has joined #ruby
AllStruck has joined #ruby
HavokOC has joined #ruby
Nakilon has joined #ruby
SirFunk has joined #ruby
sayd_ has joined #ruby
linduxed has joined #ruby
yxhuvud has joined #ruby
tatsuya_o has joined #ruby
wormwood has joined #ruby
BraddPitt has joined #ruby
seich- has joined #ruby
Emmanuel_Chanel has joined #ruby
psyprus has joined #ruby
aetaric has joined #ruby
MarcWeber has joined #ruby
dlind has joined #ruby
axsuul has joined #ruby
joshu has joined #ruby
DylanJ has joined #ruby
samuelkadolph has joined #ruby
filipe has joined #ruby
Columcille has joined #ruby
lunarjar has joined #ruby
rcs has joined #ruby
radic__ has joined #ruby
arusso has joined #ruby
taion809 has joined #ruby
Dwarf has joined #ruby
Cheos has joined #ruby
nnww has joined #ruby
Buuyo has joined #ruby
crazedpsyc has joined #ruby
kkh has joined #ruby
brtdv has joined #ruby
jbpros has joined #ruby
conceal_rs_____0 has joined #ruby
jaynewst_ has joined #ruby
bronson_ has joined #ruby
dmiller has joined #ruby
Dwarf has quit [Max SendQ exceeded]
axsuul has quit [Max SendQ exceeded]
crazedpsyc has quit [Max SendQ exceeded]
tesuji has quit [Excess Flood]
zets2 is now known as zets
Levin_22 has joined #ruby
crazed- has joined #ruby
noname001 has quit [Excess Flood]
Dwarf has joined #ruby
avril14th has quit [Excess Flood]
mansi has joined #ruby
tris has quit [Excess Flood]
funburn has joined #ruby
nhhagen has joined #ruby
tris has joined #ruby
kaspergrubbe has joined #ruby
Levin_22 has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
tesuji has joined #ruby
Macaveli_ has joined #ruby
crazed- is now known as crazedpsyc
noname001 has joined #ruby
avril14th has joined #ruby
ttt has joined #ruby
tvw has joined #ruby
mattyohe has joined #ruby
senayar has joined #ruby
visof_ has joined #ruby
maz-dev has joined #ruby
tjad has joined #ruby
karlfreeman has joined #ruby
troessner has joined #ruby
stevenm has joined #ruby
quoin has joined #ruby
fryguy has joined #ruby
marcgg has joined #ruby
mahlon_ has joined #ruby
allsystemsarego has joined #ruby
marienz has joined #ruby
octarine has joined #ruby
slash_nick has joined #ruby
Mattias has joined #ruby
wuest_ has joined #ruby
m_3 has joined #ruby
FDj has joined #ruby
hiyosi has joined #ruby
aliljet_ has joined #ruby
codecop has joined #ruby
patronus has joined #ruby
Targen has joined #ruby
musl has joined #ruby
Nuck has joined #ruby
denken has joined #ruby
Jb____ has joined #ruby
dyoung522 has joined #ruby
chinkung has joined #ruby
nfk has joined #ruby
epochwolf has joined #ruby
julweber_ has joined #ruby
blueOxigen has joined #ruby
xargoon has joined #ruby
ahuman_ has joined #ruby
naquad has joined #ruby
jmaister has joined #ruby
okinomo has joined #ruby
johnjay1 has joined #ruby
graft has joined #ruby
elektronaut has joined #ruby
Skelz0r has joined #ruby
defrag has joined #ruby
ainame has joined #ruby
sethetter has joined #ruby
Koshian has joined #ruby
aagdbl has joined #ruby
Bish has joined #ruby
krz has joined #ruby
lewiz has joined #ruby
adamholt has joined #ruby
DanielRb has joined #ruby
neektza1 has joined #ruby
ananthakumaran has joined #ruby
waxjar_ has joined #ruby
jglauche has joined #ruby
bakedb has joined #ruby
ericmathison has joined #ruby
dnyy has joined #ruby
awpti has joined #ruby
mist has joined #ruby
araujo has joined #ruby
karnowski has joined #ruby
mikemar10 has joined #ruby
mrapple has joined #ruby
malcolmva has joined #ruby
destructure has joined #ruby
blooberr has joined #ruby
TheHodge has joined #ruby
gregorg has joined #ruby
robustus has joined #ruby
braincra- has joined #ruby
thelamest has joined #ruby
Banistergalaxy has joined #ruby
dross has joined #ruby
echevemaster has joined #ruby
eshy has joined #ruby
shevy has joined #ruby
Domon_ has joined #ruby
dhruvasagar has joined #ruby
shaman42 has joined #ruby
Schuy13r has joined #ruby
Kneferilis has joined #ruby
crazed has joined #ruby
postmodern has joined #ruby
pontiki has joined #ruby
jp- has joined #ruby
LiquidInsect has joined #ruby
jolleyjoe has joined #ruby
jmccune has joined #ruby
eregon_ has joined #ruby
faulkner has joined #ruby
kizzx2 has joined #ruby
jbc22 has joined #ruby
lotherk has joined #ruby
JZTech101 has joined #ruby
mgorbach has joined #ruby
fearoffish has joined #ruby
bricker`work has joined #ruby
nazty has joined #ruby
JonathanNeal has joined #ruby
choi0hun has joined #ruby
three18ti has joined #ruby
Soda has joined #ruby
wallerdev has joined #ruby
existensil has joined #ruby
sysop2 has joined #ruby
Kovensky has joined #ruby
Blue_Ice has joined #ruby
mvangal__ has joined #ruby
wykydtron has joined #ruby
ewnd9 has joined #ruby
spike|spiegel has joined #ruby
askhader has joined #ruby
Tarential has joined #ruby
ozzloy has joined #ruby
joschi has joined #ruby
ping-pong has joined #ruby
RTG` has joined #ruby
darkc0met has joined #ruby
onewheelskyward has joined #ruby
blz37 has joined #ruby
froy has joined #ruby
ericwood has joined #ruby
adkron_ has joined #ruby
Aloysius1 has joined #ruby
micah` has joined #ruby
redgetan has joined #ruby
karupanerura has joined #ruby
paul_k has joined #ruby
jsaak has joined #ruby
jeremyb has joined #ruby
bubbajones has joined #ruby
_br_ has joined #ruby
asuka has joined #ruby
zeusmns has joined #ruby
machuga|away has joined #ruby
duke_nukem has joined #ruby
x0nic has joined #ruby
telling has joined #ruby
pinage404 has joined #ruby
cibs has joined #ruby
closer has joined #ruby
avril14th has quit [Excess Flood]
kaspergrubbe has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jibi has joined #ruby
Macaveli has quit [Ping timeout: 256 seconds]
kaspergrubbe has joined #ruby
akemrir has joined #ruby
ShapeShifter499 has joined #ruby
mansi has quit [Ping timeout: 275 seconds]
<rdark>
evelyette_: doc(xpath//path).to_s ?
<rdark>
or doc.xpath('//path').to_s even
palco66 has joined #ruby
<evelyette_>
yes I've found it already, thank you
noname001 has quit [Remote host closed the connection]
havenwood has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noname001 has joined #ruby
greengriminal has joined #ruby
avril14th has joined #ruby
robbyoconnor has quit [Excess Flood]
<dagobah>
No tuple in Ruby 2.0 :(
Macaveli has joined #ruby
robbyoconnor has joined #ruby
echevemaster has quit [Quit: Leaving]
Macaveli_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 264 seconds]
threeturn has joined #ruby
blackmesa has joined #ruby
tealmage has joined #ruby
colonolGron has joined #ruby
Hanmac1 has quit [Quit: Leaving.]
BlueShark has left #ruby ["Bye."]
gyre007 has joined #ruby
jefflyne2 has joined #ruby
tealmage has quit [Ping timeout: 245 seconds]
varfoo has quit [Ping timeout: 246 seconds]
krz has quit [Ping timeout: 245 seconds]
colonolGron has quit [Ping timeout: 240 seconds]
marius has joined #ruby
wildroman has joined #ruby
wildroman has quit [Remote host closed the connection]
Hanmac has joined #ruby
<Hanmac>
dagobah: who cares about "tuple" oO?
bricker`LA has joined #ruby
emergion has joined #ruby
marius has quit [Quit: x]
marius has joined #ruby
vlad_starkov has joined #ruby
parzo has quit [Ping timeout: 276 seconds]
parzo has joined #ruby
wildroman has joined #ruby
wildroman has quit [Remote host closed the connection]
<funburn>
I've just pushed a little wrapper class for AWS that adds your current_ip to an AWS security group of your choice. I would love some feedback if anyone is feeling critical https://github.com/WhiteCrowProductions/aws_authorize_ip
bricker`LA has quit [Ping timeout: 245 seconds]
wildroman has joined #ruby
varfoo has joined #ruby
__main__ has quit [Ping timeout: 240 seconds]
<funburn>
I'm just getting comfortable with writing my own classes, so I'm pretty sure there are pretty obvious (to the initiated) design improvements
plotter has quit [Remote host closed the connection]
krz has joined #ruby
__main__ has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
ics has quit [Ping timeout: 256 seconds]
Dave is now known as Guest94576
nari has joined #ruby
brtdv has quit []
dodosan has joined #ruby
sayan has quit [Ping timeout: 241 seconds]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
dodosan has quit [Ping timeout: 268 seconds]
Domon has quit [Read error: Connection reset by peer]
Domon__ has joined #ruby
lockweel has joined #ruby
lockweel has quit [Client Quit]
lockweel has joined #ruby
Macaveli_ has joined #ruby
persand has quit [Quit: persand]
gadgetoid is now known as Gadgetoid
fly-away has quit [Ping timeout: 276 seconds]
Macaveli_ has quit [Read error: Connection reset by peer]
Macaveli_ has joined #ruby
Macaveli has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
colonolGron has joined #ruby
nari has quit [Ping timeout: 264 seconds]
sleetdrop has joined #ruby
marius has quit [Ping timeout: 240 seconds]
awc737 has quit [Ping timeout: 260 seconds]
Michael_ has joined #ruby
fly-away has joined #ruby
pranny has joined #ruby
shredding_ has joined #ruby
mansi has joined #ruby
colonolGron has quit [Ping timeout: 260 seconds]
awc737 has joined #ruby
Macaveli_ has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 264 seconds]
shredding_ is now known as shredding
nari has joined #ruby
Domon__ has quit [Remote host closed the connection]
Macaveli has joined #ruby
khushildep has joined #ruby
parzo has quit [Read error: Connection reset by peer]
Domon has joined #ruby
parzo has joined #ruby
Macaveli_ has joined #ruby
Klotho1 has quit [Ping timeout: 276 seconds]
kayloos has quit [Remote host closed the connection]
Macaveli_ has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 268 seconds]
Macaveli_ has joined #ruby
MrZYX|off is now known as MrZYX
Macaveli has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
Domon has quit [Ping timeout: 245 seconds]
nerdy has joined #ruby
shaunbaker has quit [Remote host closed the connection]
<shevy>
.gsub(/([A-Z]+)([A-Z])/,'\1_\2')
<shevy>
I forgot what this is doing
<shevy>
it adds a _ right ?
sayan has joined #ruby
<shevy>
but what is valid input that matches to it?
<shevy>
it is supposed to be something related to camelcasing
rdxc has joined #ruby
<Hanmac>
shevy: "ABCD" -> "ABC_D"
<shevy>
hmmm
<shevy>
strange :\
<Hanmac>
shevy, try this in irb, PS: it wasnt found by me :( "%.99999f" % 10
<workmad3>
shevy: if you run it repeatedly on the result, it'll slowly turn "ABCD" into "A_B_C_D"
<shevy>
I'd wish I would have written down what I wanted to do with this back then...
<shevy>
hanmac I think I will remove my old code... I can't figure out what I really wanted to do
claymore has joined #ruby
<workmad3>
ah, it's trying to print out 10 with almost 100k decimal places
<Hanmac>
shevy, yes and no … the interpreted program can break, but not the bot, the bot is "safe"
<shevy>
I think I wanted to either turn foo_bar into FooBar ... or FooBar into foo_bar ... but whatever I wanted, it does not seem to work well at all with the given regex
Macavel__ has joined #ruby
<workmad3>
shevy: hehe :) should have dragged in some bits of ActiveSupport :P
<shevy>
oh man
<shevy>
I am trying to get rid of things
Macaveli_ has quit [Read error: Connection reset by peer]
<shevy>
but I found an old ascii clock written in ruby hehe ... either I wrote that years ago or I stole it
Domon has joined #ruby
<workmad3>
shevy: 'require "active_support/inflector" ' (to keep the AS stuff to a minimum"
<workmad3>
shevy: and then "foo_bar".camelize
<shevy>
ack
<shevy>
activesupport
<shevy>
:(
maveonair has quit [Ping timeout: 264 seconds]
<workmad3>
shevy: some bits aren't bad
<workmad3>
shevy: although yes, pulling in the entire inflector to play around with CamelCase to camel_case is probably a bit much... maybe just grab the methods?
Macaveli has quit [Ping timeout: 264 seconds]
<shevy>
yeah
<workmad3>
seeing as they're just gsubbing, not using anything else :)
<workmad3>
oh, the camelize is doing a bit more...
<RubNoob>
MrZYX I figured that, but I've already got my Psych::Nodes::Document, so I'm trying to convert that to a hash
<MrZYX>
Why?
<workmad3>
RubNoob: how did you get that?
<RubNoob>
YAML.parse my_yaml_string
<canton7>
well *dont* use YAML.parse, *do* use YAML.load
<RubNoob>
ohhhh - thanks canton7 !
<RubNoob>
that's what I was looking for
<MrZYX>
RubNoob: he said that 10 minutes ago already, you should improve your reading skills ;)
<canton7>
that was... attempt 4 to say that? I lost count
<RubNoob>
haha, sorry - too early, eyes aren't working properly :)
<RubNoob>
thanks again
aagdbl has joined #ruby
aagdbl has quit [Client Quit]
<canton7>
MrZYX> there's Yaml.load_file
<canton7>
<RubNoob> MrZYX I figured that, but I've already got my Psych::Nodes::Document, so I'm trying to convert that to a hash
<canton7>
Come on man, you even responded to MrZYX saying to use .load
<canton7>
(well, a variant thereof)
<RubNoob>
yea, I read YAML.parse instead of YAML.load
<MrZYX>
(which was rather in response to the Yaml.load(File.read construct)
<RubNoob>
reading too fast
<canton7>
anyway, solved now :)
mansi has joined #ruby
Wayneoween has joined #ruby
narcan has quit [Read error: Connection reset by peer]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubNoob>
yep, much appreciated - sorry for the madness
Mephisto3 has joined #ruby
havenwood has quit [Remote host closed the connection]
DrCode has joined #ruby
havenwood has joined #ruby
<Mephisto3>
Hello Guys: I am new to rb and have a quick Question: Is it possible to execute Javascript (that contains binding this.location.href(?) to a ruby-method and calling several javascript methods (which then will call this.location.href or openPopup [That I'll have to see upon execution, which methods are missing])
cpruitt has quit [Quit: cpruitt]
mansi has quit [Ping timeout: 240 seconds]
mklappstuhl has joined #ruby
robbyoconnor has joined #ruby
cody-- has joined #ruby
<hoelzro>
Mephisto3: how does Ruby relate to JS here?
<hoelzro>
are you writing a webapp in Ruby?
havenwood has quit [Ping timeout: 256 seconds]
nerdy has joined #ruby
nerdy has quit [Client Quit]
<Mephisto3>
Rather an app that is http-getting a homepage, and I need a js-binding for correct execution
chrisja has joined #ruby
<Mephisto3>
and I want the application to interact with that javascript on the page
<hoelzro>
ah,I see
<hoelzro>
well
<hoelzro>
you need to be "driving" a browser that has JS support
jdenen has joined #ruby
<hoelzro>
PhantomJS comes to mind
<Mephisto3>
a "browser"? Will that work with plain bash execution?
nettoweb has quit [Read error: Connection reset by peer]
<hoelzro>
PhantomJS is a headless browser
<hoelzro>
designed for this kind of thing
<hoelzro>
tbh, though, I've never used it
mklappstuhl has quit [Ping timeout: 256 seconds]
breakingthings has joined #ruby
dagnachew has joined #ruby
dagnachew has quit [Client Quit]
maz-dev has joined #ruby
shaunbaker has joined #ruby
shredding_ has joined #ruby
dagnachew has joined #ruby
lfox has quit [Client Quit]
vlad_starkov has joined #ruby
geeky-sh has quit [Ping timeout: 245 seconds]
lfox has joined #ruby
linux_noob_666 has joined #ruby
shredding has quit [Ping timeout: 256 seconds]
shredding_ is now known as shredding
robbyoconnor has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
lfox has quit [Client Quit]
visof__ has joined #ruby
krawchyk has joined #ruby
telling has joined #ruby
malkomalko has joined #ruby
lfox has joined #ruby
zorg24 has quit [Ping timeout: 264 seconds]
iamjarvo_ has joined #ruby
mark_locklear has joined #ruby
rcosta has quit [Remote host closed the connection]
visof_ has quit [Ping timeout: 245 seconds]
jp- has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jcromartie has joined #ruby
a7d7p has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
kaldrenon has joined #ruby
jdeeburke has joined #ruby
dorei has joined #ruby
freerobby has joined #ruby
rcosta has joined #ruby
jefflyne2 has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
mansi has joined #ruby
elux has joined #ruby
zorg24 has joined #ruby
<Mephisto3>
Ok, I have yet another Question regarding ruby itself: Isn't it quite more inperformant having Objects of whose every one is holding some Virtual-Method-Pointers? ("abc".length instead of length("abc")) (as of "abc" only requiring 3 byte, "abc".length needs at least a lookup-table and a 4Byte Pointer)
nari has joined #ruby
mansi has quit [Remote host closed the connection]
<hoelzro>
Mephisto3: method lookups are cached
<hoelzro>
but yes, every object has a lookup table
mikecmpbll has joined #ruby
<hoelzro>
except (to my knowledge) for fixnums and symbols
aagdbl has joined #ruby
okinomo has joined #ruby
<Mephisto3>
but that won't matter in todays RAM capacities
udoprog has quit [Quit: WeeChat 0.4.0]
<joonty>
hoelzro: why not symbols and Fixnums?
nisstyre has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 260 seconds]
<hoelzro>
they're implemented using black magic
<joonty>
ah
girija_ has quit [Ping timeout: 268 seconds]
tealmage has joined #ruby
<hoelzro>
I'm not sure on the details of symbols
<joonty>
that well known c function
<Mephisto3>
(as far as I am in my tryruby-challenge, they don't have any methods?)
<Hanmac>
joonty both symbols and fixnums are not really objects … they are only bit-shifts ;P
<hoelzro>
in the case of :sort!, it mutates the underlying array
<hoelzro>
rather than returning a new one
<canton7>
(quote often, but not exlusively, methods which mutate the object they're called on)
<canton7>
*quite
<Hanmac>
Mephisto3: it was a try, some ! methods return nil when they do nothing … and as hoelzro says, they alter the object itself
<shevy>
Mephisto3 ! usually means "modification of self in place, dangerous!"
bluOxigen has quit [Ping timeout: 240 seconds]
dawkirst has quit [Ping timeout: 256 seconds]
<Mephisto3>
Ok now I get it, thanks :)
<shevy>
x = [12, 47, 35]; x.sort!
<shevy>
vs
<shevy>
x = [12, 47, 35]; x = x.sort
<shevy>
3 chars less
dawkirst has joined #ruby
Wayneoween has left #ruby [#ruby]
<canton7>
x = [12, 47, 35].sort; Many chars less :)
elux has quit [Quit: Bye!]
<jdeeburke>
Mephisto3: It's also sometimes used for methods that raise an exception when the method lacking the '!' does not by default raise an exception
<joonty>
hanmac: i know, i'm wondering why you're telling me :P
<Banistergalaxy>
Hello hanmac
jkamenik has joined #ruby
<Hanmac>
Mephisto3: its because thats how "print" is designed, if you want other you need puts, or p
<jdeeburke>
joonty: In the case of ActiveRecord save, the '!' doesn't just say "this could raise an exception", it changes the functionality to raise an exception instead of just returning false if it fails. I don't think in general the meaning should be "could raise an exception" — as you said, that's misleading — but there may be use cases that make sense that don't necessarily change the object it's being called on
<Hanmac>
Banistergalaxy: hello! did you watch "Gravity Falls" ?
<Mephisto3>
ok
quazimodo has joined #ruby
<Banistergalaxy>
Hanmac no, I don't even know what it is
<joonty>
jdeeburke: i've actually used ! to signify that a method raises an exception, I'm kind of playing devil's advocate. Also just seeing what other people think of the idea. But yeh, I can see why they've done it
iamjarvo_ has quit [Ping timeout: 268 seconds]
dawkirst has quit [Ping timeout: 260 seconds]
ewnd9 has joined #ruby
<Hanmac>
Banistergalaxy: its a cartoon, and i recommented you to watch it
dawkirst has joined #ruby
<Hanmac>
eka: uhhu
<jdeeburke>
joonty: Another example is Kernel::exit and exit! - the bang method exits and bypasses any exit handlers - a potentially dangerous action. Maybe we are good just to stick with 'dangerous methods' :P
<joonty>
jdeeburke: that's a good example actually, forgot about that
nhhagen_ has quit [Ping timeout: 245 seconds]
dkamioka has joined #ruby
<Hanmac>
jdeeburke: what about that gsub! may return nil? it can be used inside if(…) i think that may be useful
companion is now known as Companion
<Mephisto3>
why does "books" return the hashtable but "print books" not
KobraKao has quit [Read error: Connection timed out]
<jdeeburke>
hanmac: that could be useful. We were talking about the bang methods that don't modify their calling object, though, and gsub does do that
<shevy>
no
<shevy>
"books" as you gave here must be a string
<shevy>
books could be a hash variable
tkuchiki_ has quit [Remote host closed the connection]
Criztian has joined #ruby
<Mephisto3>
yes but why does books return the values and print books not. If Ilater want to display some value, do I just call books?
<shevy>
print() will print out your variable but not return anything (well... will return NilClass I suppose)
<Mephisto3>
(It is without "" obvious)
Gillo has joined #ruby
<shevy>
what do you mean with "call books"... return books is not the same as print books of course, one returns, the other prints out something
pskosinski has joined #ruby
dzorin has joined #ruby
Xeago has quit [Remote host closed the connection]
<Mephisto3>
following:
<shevy>
as long as your hash data structure has the values you want to display, you can always just output it, perhaps from a method that formats your hash properly aas you need it displayed
<hoelzro>
and then use the method that momomomomo suggested
<momomomomo>
sounds like you have specific lines to read
<hoelzro>
hmm
<hoelzro>
actually, don't do that
<hoelzro>
that'll slurp everything in
svector has quit [Ping timeout: 245 seconds]
wildroman has quit [Remote host closed the connection]
<hoelzro>
you want #each_line
dzorin has quit [Remote host closed the connection]
blackratdog has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
JStoker has joined #ruby
michaellynch has quit [Read error: Operation timed out]
<momomomomo>
hoelzro: each_line will end the block once EOF
tomzx_mac has quit [Ping timeout: 264 seconds]
<hoelzro>
momomomomo: you mean it will stop calling the block on EOF?
michaellynch has joined #ruby
<hoelzro>
akemrir wants to read from xinput as long as it's providing input
<hoelzro>
so I think that's the desired functionality
<momomomomo>
I think so, so if there's a delay between when the next push to the file/buffer is added, and the each call reaches EOF, then the block might end
jdeeburke1 has joined #ruby
<momomomomo>
oh, well then bueno
jdeeburke has quit [Ping timeout: 245 seconds]
<akemrir>
yes, I want to count data as long as xinput provide data
tealmage has joined #ruby
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
<hoelzro>
as long as the pipe's open, the receiving end shouldn't get an EOF
sr78ger has joined #ruby
<hoelzro>
no matter how long the write side takes to feed it more input
jlast has joined #ruby
<hoelzro>
akemrir: then you want a pipe + #each_line
thesheff17 has joined #ruby
VTLob has joined #ruby
<akemrir>
hoelzro: read from stdin?
<hoelzro>
no
<hoelzro>
read from the pipe =)
rcosta has quit [Remote host closed the connection]
<akemrir>
xinput --text-xi2 | script.rb ?
* Hanmac
is reminded at n old DOS game … pipes everywhere ,D
freerobby has quit [Quit: Leaving.]
pwh has quit [Quit: pwh]
axl_ has joined #ruby
dangerousdave has joined #ruby
shredding_ has joined #ruby
<hoelzro>
akemrir: ah, that would work too
<hoelzro>
but you could just open the pipe in your script...
shaunbak_ has joined #ruby
<hoelzro>
that way you couldn't forget to do it
MissionCritical has quit [Ping timeout: 240 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
svector has joined #ruby
stevechiagozie has joined #ruby
ffranz has joined #ruby
<Hanmac>
joonty: to confuse you more about ruby, in ruby its possible to define an method inside an method with the exact same name ;P
tagrudev has quit [Remote host closed the connection]
mrsolo has joined #ruby
Davey has joined #ruby
sjltaylo_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
maveonair has quit [Ping timeout: 256 seconds]
greengriminal has quit [Read error: Connection reset by peer]
greengriminal has joined #ruby
burlyscudd has quit [Read error: Connection reset by peer]
mansi has quit [Read error: Connection reset by peer]
kurt21 has joined #ruby
azcodex has joined #ruby
mansi has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
barratt has quit [Remote host closed the connection]
barratt has joined #ruby
mfridh has quit [Read error: Operation timed out]
<kurt21>
when I do "gem install rdoc", I get "cannot load such file -- zlib". I installed zlib.x86_64 and zlib-devel.x86_64 with yum on CentOS 5.6
<kurt21>
any ideas?
mrsolo has quit [Quit: This computer has gone to sleep]
Apocalypse has quit [Ping timeout: 245 seconds]
aganov has quit [Remote host closed the connection]
Stygia has quit [Read error: Operation timed out]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khushildep has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Ping timeout: 245 seconds]
khushildep has joined #ruby
sambao21 has joined #ruby
mary5030 has joined #ruby
Stygia has joined #ruby
aagdbl has joined #ruby
blackratdog has quit [Ping timeout: 245 seconds]
Nanuq has quit [Ping timeout: 245 seconds]
kaspergrubbe has quit [Remote host closed the connection]
bean has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
Ox6abe has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
bean has joined #ruby
Hanmac has quit [Quit: Leaving.]
michaellynch has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
moura has quit [Quit: Computer has gone to sleep.]
dawkirst has joined #ruby
maveonair has joined #ruby
TDJACR has quit [Quit: Quit]
Hanmac has joined #ruby
kaspergrubbe has joined #ruby
rhys has joined #ruby
<Hanmac>
kurt21 it seems that your ruby was not build against zlib
Ox6abe has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
evelyette_ has quit [Ping timeout: 245 seconds]
GeissT has quit [Quit: MillBroChat AdIRC User]
vlad_starkov has joined #ruby
ttt has quit [Remote host closed the connection]
cody-- has quit [Quit: Computer has gone to sleep.]
buzzybron has quit [Quit: Leaving.]
svector has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
rcosta has joined #ruby
rdark has joined #ruby
tatsuya__ has quit [Read error: Connection reset by peer]
jefflyne2 has quit [Ping timeout: 276 seconds]
unrar has joined #ruby
tatsuya_o has joined #ruby
freerobby has joined #ruby
Catbuntu has quit [Disconnected by services]
moura has joined #ruby
rcosta has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
mfridh has joined #ruby
Apocalypse has joined #ruby
moura has joined #ruby
TDJACR has joined #ruby
deception has joined #ruby
moura has quit [Max SendQ exceeded]
TDJACR has quit [Changing host]
deception has joined #ruby
TDJACR has joined #ruby
deception has quit [Changing host]
cody-- has joined #ruby
rcosta has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
bluenemo has quit [Remote host closed the connection]
Ripp__ has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<kurt21>
hanmac: what do I do to resolve that?
moura has joined #ruby
moura has quit [Max SendQ exceeded]
MissionCritical has joined #ruby
<kurt21>
hanmac: ah, reinstall ruby. got it. thanks!
dawkirst has quit [Ping timeout: 260 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
malkomalko has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 240 seconds]
moura has joined #ruby
ewnd9 has joined #ruby
RORgasm has joined #ruby
moura has quit [Max SendQ exceeded]
JumpMast3r has quit [Quit: JumpMast3r]
moura has joined #ruby
Tricon has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
codezombie has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
Ox6abe has quit [Remote host closed the connection]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
RORgasm_ has joined #ruby
moura has joined #ruby
<Hanmac>
apeiros: hm what about this moura?
buibex has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
rcosta has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
moura has joined #ruby
rcosta has joined #ruby
moura has quit [Max SendQ exceeded]
buibex has joined #ruby
obs has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
JumpMast3r has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
wereHamster has joined #ruby
RORgasm has quit [Ping timeout: 276 seconds]
bartocc has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
<bartocc>
can anyone tell me how to use the -i flag with the ruby binary ?
mmozuras has quit [Read error: Connection reset by peer]
mmozuras has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
snovak has joined #ruby
<eka>
hanmac: so, I watched a bunch of gnomes go Transformer and vomit rainbows
DrCode has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
<Hanmac>
eka and? do you like the "3" book? ;P
<eka>
hanmac: what about it… missing something I think
solidoodlesuppor is now known as baordog
snovak has quit [Remote host closed the connection]
bluefsh has joined #ruby
tealmage has joined #ruby
seoNinjaWarrior has quit [Ping timeout: 264 seconds]
snovak_ has quit [Read error: No route to host]
snovak has joined #ruby
<Hanmac>
eka, the later episodes tells more about the "3" book and the misteries of this Town
<eka>
hanmac: 6 fingers?
<bluefsh>
https://github.com/alexreisner/geocoder I'm not using geocoder with rails... how would I setup this in my file? Geocoder.configure(:api_key => [key, secret])
<eka>
hanmac: in the episode shows that it's the 3rd volume… so must be more
Fuzai_ is now known as Fuzai
jlebrech has quit [Ping timeout: 245 seconds]
rcosta has quit [Remote host closed the connection]
malkomalko has joined #ruby
<bluefsh>
essentially, how do i replicate the rails initializer functionality outside of rails
peregrine81 has quit []
carlyle has joined #ruby
peregrine81 has joined #ruby
randomdrake has joined #ruby
alex__c2022 has joined #ruby
dhruvasagar has joined #ruby
mando has joined #ruby
okinomo has quit [Ping timeout: 276 seconds]
<Hanmac>
eka, yeah PS: often there are secret messages you need no play them "backwarts" ;P
<MrZYX>
bluefsh: a rails initializer is just a file that is loaded when the application boots up, no magic to it
<Hanmac>
eka or some things that you can only see when you "freeze" some frames ;P
tjad has joined #ruby
<eka>
hanmac: is there something around the interweb showing that?
<bluefsh>
MrZYX: that makes sense... how would I configure the geocoder then? it's not an instance of a model so I'm confused as to how that would work
<Hanmac>
eka, yeah but i dont want to spoiler ;P
persand has quit [Quit: persand]
dhruvasagar has quit [Read error: Connection reset by peer]
<eka>
ok
bricker`LA has joined #ruby
<eka>
have to watch more though
<eka>
hanmac: you ruining me
dhruvasagar has joined #ruby
<MrZYX>
bluefsh: just code that is loaded. Doesn't depend on any kind of rails environment at all
tealmage has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
* Hanmac
's plain succeeded ;D
okinomo has joined #ruby
shredding has quit [Quit: shredding]
sambao21 has joined #ruby
tk_ has quit [Quit: ばいばい]
obs has joined #ruby
jlebrech has joined #ruby
<Hanmac>
eka in the opening, did you see the yeti or book page for a slit second? ;P
<eka>
hanmac: mmm nope
havenwood has quit [Remote host closed the connection]
<Hanmac>
apeiros: it was an user that goes in this room and shortly was kicked out again, it was a bit anoying
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eka>
hanmac: konami code??? wtf
JumpMast3r has quit [Quit: JumpMast3r]
<apeiros>
hanmac: and what do you want from me with regards to that user?
Monie has joined #ruby
<onewheelskyward>
select was never part of the konami code.
spap has joined #ruby
tesuji has quit [Ping timeout: 264 seconds]
<eka>
hanmac: matrix transformation?
malkomal_ has joined #ruby
jprovazn has quit [Quit: Leaving]
<eka>
onewheelskyward: A common misconception is that the code ends with Start or SelectStart. In Contra, the player must press Start after entering the code in order to start the game, or press SelectStart to switch to two-player mode and then start the game, leading to the confusion. In other games, pressing these buttons will cause the code to not work.
rdark has quit [Ping timeout: 240 seconds]
<Hanmac>
eka : yeah and there is many more stuff hidden inside the episodes … (look for the triangle with the eye inside while watching the other episodes … ) and also notice the background, you may miss in the first episde the person with the gay futureistic suit right? ;P
maz-dev has quit [Remote host closed the connection]
<Hanmac>
apeiros: i dont know … (it seems he was gone)
<onewheelskyward>
fascinating. :)
catdog123 has quit [Remote host closed the connection]
okinomo has quit [Ping timeout: 264 seconds]
havenwood has quit [Ping timeout: 245 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
duggiefresh has joined #ruby
malkomalko has quit [Ping timeout: 256 seconds]
DrCode has joined #ruby
havenwood has joined #ruby
okinomo has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
IceyEC has joined #ruby
rdark has joined #ruby
azcodex has quit [Remote host closed the connection]
<apeiros>
hanmac: ok. please, if you ping me about user behavior and wish something done, be descriptive about it. it doesn't help me if I have to pull the infos out of your nose ;-)
carlyle has quit [Ping timeout: 245 seconds]
malkomal_ has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
mrsolo has joined #ruby
<Hanmac>
apeiros: its was an "Max SendQ" user … if you know what that means
<eka>
hanmac: saw the yeti running in the opening
mikepack has joined #ruby
jefflyne2 has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
shaunbak_ has quit [Remote host closed the connection]
carlyle has joined #ruby
<apeiros>
hanmac: it means he sent messages to the ircd faster than allowed
wildroman has quit [Remote host closed the connection]
<apeiros>
those messages can be /join, /msg or whatever
<apeiros>
but that's not what I meant you should be descriptive about :)
jlebrech has quit [Ping timeout: 260 seconds]
girija_ has quit [Ping timeout: 260 seconds]
browndawg has quit [Ping timeout: 240 seconds]
<apeiros>
I need: who, what he/she does, what you want done about it. something like that. e.g. "ping apeiros, foobar join/part spams the channel, can you please ban him?"
<apeiros>
then I don't have to go around read backlogs and try to figure out what's wrong or what you're talking about. and I don't have to ask you 3 questions to finally understand that you wanted somebody banned.
<apeiros>
(I will still read the backlog to verify the claim, of course - but that's much more targeted and thus quicker)
<Hanmac>
yeah got it
mklappstuhl has joined #ruby
jefflyne2 has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
duggiefresh has quit [Remote host closed the connection]
aagdbl has quit [Quit: Leaving.]
<Hanmac>
eka: other part about the opening : "Towards the end of the song you hear a voice whisper, "I am still here." But play it backwards, you hear, "three letters back." This is how one solves the cryptograms at the end of each episode" xD
duggiefresh has joined #ruby
<eka>
hanmac: too much for me… lol
<eka>
hanmac: have work you know??
pwh has joined #ruby
jcromartie has joined #ruby
obs has quit [Ping timeout: 276 seconds]
jefflyne2 has joined #ruby
pel_daniel has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
aryaching has quit []
jrhorn424 has joined #ruby
alexju has quit [Remote host closed the connection]
wildroman has joined #ruby
dankest has joined #ruby
shaunbaker has joined #ruby
jdolitsky1 has joined #ruby
gyzmodo has quit [Ping timeout: 260 seconds]
m8 has joined #ruby
m8 has quit [Changing host]
m8 has joined #ruby
[[thufir]] has quit [Quit: Leaving.]
pwh has quit [Quit: pwh]
dhruvasagar has quit [Ping timeout: 264 seconds]
hogeo has quit [Remote host closed the connection]
theRoUS has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
visof has quit [Ping timeout: 268 seconds]
dawkirst has quit [Ping timeout: 264 seconds]
jefflyne2 has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 240 seconds]
michaellynch has joined #ruby
dawkirst has joined #ruby
jefflyne2 has joined #ruby
popcornlover has quit [Ping timeout: 245 seconds]
khushildep has quit [Quit: khushildep]
jprovazn has joined #ruby
jefflyne2 has quit [Read error: Connection reset by peer]
popcornlover has joined #ruby
jefflyne2 has joined #ruby
khushildep has joined #ruby
alup has quit [Quit: Leaving]
<lectrick>
Is there any way to assert that a method definition hasn't changed? (instance method)
<lectrick>
Calling .hash on the method(:methodname) doesn't work as that changes with every new instance
jlebrech has joined #ruby
<eka>
lectrick: why that? you don't want somebody monkey patching your code?
lepht_afk is now known as lepht
azcodex has joined #ruby
<banisterfiend>
lectrick just check the source_location
<lectrick>
eka: I have a monkeypatch manager that needs it :)
senayar_ has joined #ruby
<eka>
wow
<lectrick>
banisterfiend: I also see that .source is available. When was that added?
<banisterfiend>
lectrick it's not available, that's patched in by pry ;)
buzzybron has joined #ruby
jamesoram has joined #ruby
<banisterfiend>
lectrick source_location should be fairly robust though
burlyscudd has quit [Quit: Leaving.]
<lectrick>
I built a mechanism for our gigantic app code that causes monkeypatches to fail if the things they're trying to monkeypatch have changed. Usually I can just assert behavior, but in this case it would take too much work to do that so I just want to assert that the source of the method that is being monkeypatched is what is expected
<lectrick>
banisterfiend: If you add behavior to the method, source_location won't change
obs has joined #ruby
BRMatt has joined #ruby
<lectrick>
banisterfiend: assuming it's starting on the same line
T_T has joined #ruby
<lectrick>
banisterfiend: ah i figured. you devil you
<banisterfiend>
lectrick what? how do you add behaviour to a method without changing the source_location? :)
quoin has joined #ruby
<banisterfiend>
obviously you can do it, but you have to do strange stuff to keep the source_location the same...
<banisterfiend>
in the 99.999999% case the source_location will change
<lectrick>
banisterfiend: isn't the source_location the first line of the method definition? so if you add lines to that definition it won't change? :)
Xeago has quit [Remote host closed the connection]
okinomo has quit [Ping timeout: 260 seconds]
Davey has quit [Read error: Connection reset by peer]
<banisterfiend>
lectrick wait, you're editing the method at the point it's actually defined? then that's not a monkey patch, that's just a refactor
Davey_ has joined #ruby
azcodex has quit [Ping timeout: 264 seconds]
lepht is now known as lepht_afk
senayar has quit [Ping timeout: 245 seconds]
lepht_afk is now known as lepht
senayar_ has quit [Remote host closed the connection]
RichardBaker has joined #ruby
<banisterfiend>
lectrick you redefine the method at any other place, then that's a redefinition/monkeypatch, and the source_location will most definitely change
<banisterfiend>
if you*
senayar has joined #ruby
jfredee has joined #ruby
<lectrick>
banisterfiend: I have a monkeypatch manager. Everyone here agrees it is pretty cool and I am a douche for not gemming it out yet. Basically it runs an assertion block asserting that the patch is still required, then it applies the patch block, then it runs the assertion again. If the answer hasn't changed, something is wrong and the manager complains.
wildroman has quit [Remote host closed the connection]
visof has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
RichardBaker has quit [Read error: Connection reset by peer]
elux has joined #ruby
RichardBaker has joined #ruby
<lectrick>
A coworker wants help with writing the assertion block and erecting the right context in this case will be hideously complicated so I am trying to work around it by just checking somehow that the method we're patching (in this case a method inside Paperclip::HasAttachedFile) is the method we actually intend to patch (i.e. it hasn't changed)
<banisterfiend>
lectrick you'd have to show me some code at this point :) Can you show me an example where the source_location approach would fail? :)
alekst has quit [Quit: Computer has gone to sleep.]
<lectrick>
banisterfiend: source_location is just a line number, right? The line number of the "def" for that method? how would that change if I add more behavior to the method implementation?
<banisterfiend>
lectrick no it's a line number and a file name
<banisterfiend>
lectrick how are you adding more behaviour?
mmm has quit [Ping timeout: 240 seconds]
<lectrick>
what's the difference? if I don't move the method def and add lines to it, source_location stays the same
rcosta has joined #ruby
<banisterfiend>
lectrick how exactly are you adding more lines to it
Clooth has quit [Read error: Connection reset by peer]
<lectrick>
banisterfiend: oh I think I see what you're saying. redefining the method changes the source_location
mmm has joined #ruby
Cheos has joined #ruby
lepht is now known as lepht_afk
<banisterfiend>
yes
kaldrenon has quit [Remote host closed the connection]
<lectrick>
banisterfiend: but in this case I just want to assert that the paperclip we're patching is the exact version of the method FROM PAPERCLIP (not from our patch) that we want to patch. capiche? :)
brianpWins has quit [Quit: brianpWins]
kaldrenon has joined #ruby
ssvo has joined #ruby
<lectrick>
i.e. we want this patch to auto expire if the Paperclip guys change this method in any way
<lectrick>
So we are forced to review it
<banisterfiend>
lectrick then you have a few approaches. 1. You can check the source_location of the method, if the file name is inside the paperclip gem, then it's their method definition (and not the patch) 2. alternatively, if you monkey patch by module inclusion, you can just check the #owner of the method
threeturn has quit [Quit: threeturn]
iamjarvo_ has joined #ruby
dhruvasagar has joined #ruby
dawkirst has joined #ruby
<lectrick>
banisterfiend: but what if paperclip gets updated to a new version and this method changes (by them)? Those things won't change. This patch needs to break if that happens
iamjarvo_ has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
<lectrick>
And it can't just check the gem version as not all gem versions would change this method
greengriminal has quit [Quit: Leaving]
iamjarvo_ has joined #ruby
<banisterfiend>
lectrick whatever you do it's going to be incredibly brittle
<banisterfiend>
lectrick why not just update your code *after* they modify it so you know for sure :)
khushildep_ has joined #ruby
<lectrick>
banisterfiend: That's the whole point. IT IS A MONKEYPATCH. monkeypatches SHOULD be brittle. This is where the complexity comes from that causes bugs that everyone bitches about Ruby about.
ttt has joined #ruby
jonathanwallace has joined #ruby
<lectrick>
It's not Ruby's fault. It's blind monkeypatching.
baroquebobcat has joined #ruby
iamjarvo has quit [Ping timeout: 276 seconds]
<lectrick>
That's why I wrote this patch manager class to begin with and it's already proven itself. Which is why I need to gem it out.
peregrine81 has quit []
DrCode has quit [Ping timeout: 240 seconds]
rcosta has quit [Remote host closed the connection]
khushildep has quit [Ping timeout: 260 seconds]
khushildep_ is now known as khushildep
<banisterfiend>
lectrick How do you know whether to apply the patch or not ?
<lectrick>
When I got here we had countless little monkeypatch initializers doing things like still patching things in old versions of Rack that had long since been fixed. I am working on a very large codebase so this sort of thing became necessary
Andrevan has joined #ruby
Xeago has joined #ruby
lukec has quit [Quit: lukec]
<lectrick>
banisterfiend: That's the whole point of my manager. You have to define a method on your patch that proves that it still needs to be applied and its result has to change after the patch his actually applied
<eka>
lectrick: what is the use case of your patch manager?
<Hanmac>
lectrick: for installed gems, the source-location also has the version number of the gem inside the path
youcallme has quit [Remote host closed the connection]
oozeman has quit [Ping timeout: 260 seconds]
iamjarvo_ has quit [Ping timeout: 245 seconds]
<banisterfiend>
lectrick sounds reasonable
monkegjinni has joined #ruby
RichardBaker has quit [Ping timeout: 245 seconds]
<lectrick>
eka: Backporting bugfixes/security updates (which auto expire when you move to those versions), implementing behavior tweaks that may be necessary for environmental reasons which may be temporary, basically any code modification that can either expire in utility at some point or that needs to be carefully applied for the sake of avoiding unintended side
<lectrick>
effects/regressions
shaunbaker has quit [Remote host closed the connection]
<lectrick>
Not sure if you know this already but debugging bugs caused by errant monkeypatches is a sonofabitch
quoin has quit [Ping timeout: 276 seconds]
ttt has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
Croms has quit [Quit: Croms]
<banisterfiend>
lectrick so what's the source_location thing about?
<banisterfiend>
how does that relate to your patch manager thing
bluefsh has quit [Quit: Page closed]
<lectrick>
banisterfiend: Before I apply this particular patch or even check whether it's necessary, I want to raise unless the method definition I'm about to patch has changed. We could use .source but Pry is not Gemfile'd out in our production environment (and we can't) so that is probably not workable
hamakn has quit [Remote host closed the connection]
<lectrick>
sorry I want to raise IF the method def has changed
hamakn has joined #ruby
<banisterfiend>
lectrick changed with respect to what? you mean, check if it's already been patched by another library (or your own library) ? or check whether the authors of the gem did an internal refactor?
burlyscudd has joined #ruby
dagobah has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
jamesoram has left #ruby ["Leaving"]
<lectrick>
banisterfiend: Either.
Ripp__ has quit [Quit: Ripp__]
<lectrick>
I want a patch that will yell if either changes.
hamakn_ has joined #ruby
tealmage has joined #ruby
Spami has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
kristiandelay has quit [Remote host closed the connection]
nhhagen_ has joined #ruby
<banisterfiend>
lectrick but your'e not guaranteed that a change to the method is meaningful, what if they just add a comemnt?
<banisterfiend>
lectrick or rename a variable from 'x' to 'y'
monkegjinni has quit [Remote host closed the connection]
Quashie has quit [Ping timeout: 246 seconds]
<banisterfiend>
lectrick or change their indentation, etc
hamakn has quit [Ping timeout: 256 seconds]
alexju has joined #ruby
endash has joined #ruby
popcornlover has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
Criztian has quit [Remote host closed the connection]
ewnd9 has quit [Ping timeout: 264 seconds]
Davey_ is now known as Davey
hamakn_ has quit [Ping timeout: 245 seconds]
<banisterfiend>
lectrick can i see the API for your monkey patch manager?
nisstyre has joined #ruby
nemesit|znc has quit [Ping timeout: 256 seconds]
jtgiri_ has quit [Quit: jtgiri_]
bronson_ has quit [Remote host closed the connection]
sarkis has joined #ruby
tealmage has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
Dave is now known as Guest53784
mmlac-bv has joined #ruby
jdeeburke1 has joined #ruby
obs has quit [Read error: No route to host]
obs has joined #ruby
jdeeburke has quit [Ping timeout: 245 seconds]
obs has quit [Client Quit]
shaunbaker has joined #ruby
alekst has joined #ruby
radic__ has quit [Ping timeout: 240 seconds]
bricker`1A has joined #ruby
nickbender has joined #ruby
Koa has joined #ruby
khushildep_ has joined #ruby
yacks has quit [Read error: Connection reset by peer]
shaunbak_ has joined #ruby
bricker`LA has quit [Ping timeout: 268 seconds]
khushildep has quit [Ping timeout: 264 seconds]
khushildep_ is now known as khushildep
kilophoton has joined #ruby
Lewix has joined #ruby
tatsuya_o has joined #ruby
medusa_ has joined #ruby
mmlac-bv has quit [Quit: mmlac-bv]
shaunbaker has quit [Ping timeout: 245 seconds]
Spami has quit [Quit: This computer has gone to sleep]
swistak35 has quit [Excess Flood]
nwertman has joined #ruby
raul782 has joined #ruby
sh00tm3 has joined #ruby
nisstyre has quit [Quit: Leaving]
dawkirst has quit [Ping timeout: 245 seconds]
lfox has quit [Quit: ZZZzzz…]
swistak35 has joined #ruby
randomautomator has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
maz-dev has joined #ruby
dawkirst has joined #ruby
allanm__ has joined #ruby
nowthatsamatt has joined #ruby
Ripp__ has joined #ruby
bronson_ has joined #ruby
filipe has quit [Remote host closed the connection]
jtgiri_ has joined #ruby
rcosta has joined #ruby
efg has joined #ruby
Xeago has quit [Remote host closed the connection]
fsck3r has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<efg>
I'm trying to better the structure of my code, make it more object oriented... if anyone wants to have a look I'd be more than happy to hear suggestions
timonv has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
julweber_ has quit [Remote host closed the connection]
visof has quit [Ping timeout: 264 seconds]
buzzybron has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
nemesit|znc has joined #ruby
<burlyscudd>
anyone in here use the jbuilder gem for making templates for JSON responses? trying to figure out if there is a way to generate documentation from those templates — preferably YARD
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
yfeldblum has quit [Ping timeout: 264 seconds]
qizwiz has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
rdark has quit [Quit: leaving]
senayar has joined #ruby
monkegjinni has quit [Remote host closed the connection]
momomomomo has joined #ruby
carraroj has joined #ruby
Gillo has quit [Remote host closed the connection]
tonni has joined #ruby
neku has quit [Quit: Leaving...]
<Nakilon>
i don't
AndChat| has joined #ruby
kindjal has joined #ruby
yacks has quit [Ping timeout: 245 seconds]
Gillo has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
dodosan has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mikeg has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
monkegjinni has joined #ruby
senayar has quit [Ping timeout: 245 seconds]
vlad_sta_ has quit [Remote host closed the connection]
senayar has joined #ruby
<tjbiddle>
Hey guys - Is there a reason why special chars need to be in double quotes and not single for split()? eg: "somestring\n".split('n') vs. "somestring\n".split("\n")
<hoelzro>
because '\n' is a backslash character and an n
<banisterfiend>
hanmac link that gravity fall thing
jdenen1 has quit [Quit: Leaving.]
nwertman has quit [Ping timeout: 260 seconds]
tonni has quit [Remote host closed the connection]
nwertman_ has quit [Ping timeout: 256 seconds]
Targen has joined #ruby
nwertman has joined #ruby
momomomomo has quit [Quit: momomomomo]
Notte has joined #ruby
nwertman_ has joined #ruby
<eka>
hanmac: what's with gravity fall? you making a club?
<Nakilon>
[21:37:22] <Mephisto3> Can you recommend a good Ruby IDE for Windows/Mac
<Collin>
Does anyone know how I take ownership of a VALUE in a native extension?
<Collin>
Or maybe it's called marking
<Nakilon>
i have slow java crap
<Hanmac>
banisterfiend: i only have the wiki page or the opening, for the episdoes you need to look for your self
<Nakilon>
but non-java crap doesn't have debuggers
<Nakilon>
windows - SciTE
<Nakilon>
mac - Sublime
<Collin>
tl;dr a VALUE is passed via a function and I want to store it internally, but I'm afraid it will get garbage collected
burlyscudd has joined #ruby
jdenen has joined #ruby
<Nakilon>
*ш рфеу
<Nakilon>
*i hate
kaldreno_ has joined #ruby
<Nakilon>
also there is SciTE for mac
arietis has joined #ruby
tjbiddle_ has joined #ruby
<Nakilon>
but you'll have to install 70 mbytes of other shit, and it will start in like a 10-20 seconds
kaldreno_ is now known as kaldrenon_
<Nakilon>
with no font smoothing, etc.
jdenen1 has joined #ruby
azcodex has quit [Read error: Connection reset by peer]
<Nakilon>
also scite on mac depends on sqlite python and php
kaldrenon has quit [Read error: Connection reset by peer]
<Nakilon>
don't ask me why
<Hanmac>
Collin you are right it would be, so you need rb_global_variable() function or something similar (i often use an std::map<uint,VALUE> Table combined with an rubyHash so i may remove them later)
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
<Nakilon>
but sublime can't put STDOUT field to the right
TomRone has joined #ruby
* Nakilon
away
KobraKao has joined #ruby
kaldrenon_ is now known as kaldrenon
<Collin>
But there's no way to just mark it, without storing it somewhere?
<banisterfiend>
hanmac if you want me to watch it you have to do all the work for me
jbpros has joined #ruby
<Hanmac>
Mephisto3: i use Eclipse, but only because i need one Editor that support multible languages at the same time
jbpros has quit [Client Quit]
<Hanmac>
banisterfiend: you can ask piratepay for bt
<Morrolan>
Use the Jetbrains family of editors. ;)
snovak_ has quit [Remote host closed the connection]
jonkri has quit [Quit: jonkri]
momomomomo has joined #ruby
<Nakilon>
hanmac Sublime has smth called "build steps", which make you able to compoile one project with any scenario and any number of compilers i guess
<Hanmac>
Morrolan: if that was for me, nope does not work, i need something that support multible languages in the same project at the same time
<Morrolan>
hanmac: Oh, I see.
<Nakilon>
btw i didn't find the default shortcut for "stop build" for mac but it is all tweakable
Xeago has quit [Ping timeout: 264 seconds]
* Nakilon
totally away
jdenen has quit [Ping timeout: 246 seconds]
xeon_ has joined #ruby
<Hanmac>
Nakilon: my problem: one of my projects has C++ files, Ruby files, xml files and other stuff, and i need an Editor that can work with all of them at the same time
KobraKao has quit [Ping timeout: 245 seconds]
KobraKao has joined #ruby
graft has quit [Ping timeout: 245 seconds]
atmosx has quit [Quit: Lost in trance]
Squarepy has joined #ruby
catphish has quit [Quit: Leaving]
s0ny123 has quit [Quit: leaving]
Guest45032 has joined #ruby
marius has joined #ruby
kurt21 has quit [Quit: Leaving.]
Guest45032 has left #ruby [#ruby]
sh00tm3 has quit [Remote host closed the connection]
KobraKao has quit [Ping timeout: 264 seconds]
KobraKao has joined #ruby
jcromartie has quit [Ping timeout: 245 seconds]
pwh has joined #ruby
<ericwood>
Vim
<ericwood>
VimVimVimVimVim
<ericwood>
VIM!
<Hanmac>
ericwood: for some of my bigger projects its happends often that i need to open many files, and also change many files … it is not nice todo with vim … (and with massive i mean 100+)
mmlac-bv has quit [Quit: mmlac-bv]
<ericwood>
hanmac: Gvim + tabs and splits...
<ericwood>
or if you're more into directly manipulating buffer you can do that too
tonz has joined #ruby
<ericwood>
honestly a lot of other editors buckle under that load
<ericwood>
Vim can handle it
jezen has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
<tonz>
howdy everyone
<Lewix>
What's the point of having something like this: foo = somethinghappen(here) rescue nil #and not do anything to handle the error
<disgrntld>
hello, how are multiple elements combined into a list? is `[]<<a<<b<<c` the most elegant way?
<Hanmac>
ericwood can i click into an function and jump into the file where its defined?
mlpinit has joined #ruby
<ericwood>
hanmac: with ctags I believe so
burlyscudd has quit [Quit: Leaving.]
<sam113101>
Lewix: to ignore them?
brennanMKE has joined #ruby
<jezen>
Good evening everyone
<sam113101>
so it doesn't stop the program from running
<Morrolan>
disgrntld: `[a, b, c]` ? :P
brennanMKE has quit [Remote host closed the connection]
<ericwood>
Lewix: whoever wrote it was lazy
fuhgeddaboudit has joined #ruby
<Hanmac>
disgrntld: you can also use .push(a,b,c)
KobraKao has quit [Ping timeout: 264 seconds]
anderson has joined #ruby
<tonz>
I am looking for something that is lightweight for a blog I am working on. I just want to have like a text field that can position content and recognize a new p tag based off a new line in a text field
<disgrntld>
lol, just forget I asked that
<sam113101>
hanmac: you could use Command-T
<tonz>
any suggestions
<disgrntld>
no, morrolan was right, I just had a brain fart
JumpMast3r has joined #ruby
KobraKao has joined #ruby
<Lewix>
ericwood: sam113101: so the variable foo is ignored and the program continue?
maz-dev has joined #ruby
iamjarvo_ has joined #ruby
<jezen>
How can I remove some chars from a string without doing this: "string!'&€".tr("!","").tr("'","").tr("&","").tr("€","") etc?
senayar has quit [Remote host closed the connection]
gyre008 has quit [Read error: Operation timed out]
iamjarvo has quit [Read error: Operation timed out]
<ericwood>
Lewix: pretty much
<Hanmac>
sam113101: try to browse with vm thouth this: https://github.com/Hanmac/rwx and then tell me what macro_attr(String,wxString) would do from reading the code
carraroj has quit [Quit: Konversation terminated!]
gyre007 has joined #ruby
<yxhuvud>
jezen: string.delete "!'&"
dodosan has quit [Remote host closed the connection]
<jezen>
brilliant. Thanks yxhuvud!
<Hanmac>
jezen: what about ? gsub(/[!'&€]/,'')
peregrine81 has quit []
dodosan has joined #ruby
graft has joined #ruby
graft has joined #ruby
musl has quit [Quit: WeeChat 0.4.1]
<sam113101>
hanmac: what? why?
<Hanmac>
jezen or with tr: "string!".tr("!'&€","")
<apeiros>
or delete
<jezen>
thanks hanmac :)
<apeiros>
"string!".delete("!'&€")
<Hanmac>
sam113101: that is one of my projects i used the Editors for … show me that you can also do it with vim
Lewix has quit [Remote host closed the connection]
randomdrake has quit [Quit: randomdrake]
haxrbyte_ has quit [Remote host closed the connection]
musl has joined #ruby
KobraKao has quit [Ping timeout: 276 seconds]
haxrbyte has joined #ruby
KobraKao has joined #ruby
<sam113101>
hanmac: should I know in which file the function is defined or is it part of the challenge?
dodosan has quit [Ping timeout: 248 seconds]
<sam113101>
I'd probably grep it (inside vim), but sublime text has that function
<Hanmac>
this is also part of the challange, (hint, its often used so its in a header file) and PS: eclipse can solv this macro
<Hanmac>
finding the function is part one, but you also need to understand what this one does
pskosinski has quit [Remote host closed the connection]
sarkis has quit [Quit: leaving]
<sam113101>
why? does your editor do that for you?
Nakilon has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
<Hanmac>
no i mean, when i hover "macro_attr(String,wxString)" it shows me into what it would be readed from the compiler
<sam113101>
I still don't understand, give me an example man
Michael_ has quit [Remote host closed the connection]
xeon_ has quit [Ping timeout: 276 seconds]
KobraKao has joined #ruby
failshell has quit [Remote host closed the connection]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
cj3kim has quit [Remote host closed the connection]
moura has joined #ruby
Michael_ has joined #ruby
kristiandelay has quit [Write error: Broken pipe]
moura has quit [Max SendQ exceeded]
iamjarvo_ has quit [Read error: Connection reset by peer]
YaNakilon has joined #ruby
Collin has quit [Ping timeout: 252 seconds]
moura has joined #ruby
tealmage has joined #ruby
iamjarvo has joined #ruby
deception has quit [Quit: Goodbye]
decoponio has quit [Quit: Leaving...]
moura has quit [Max SendQ exceeded]
browndawg has quit [Quit: Leaving.]
DropSQL has joined #ruby
bline79_2 has joined #ruby
moura has joined #ruby
<DropSQL>
Hi all
moura has quit [Max SendQ exceeded]
<DropSQL>
Help me please with rails runner
<Hanmac>
DropSQL: wrong channel, try #rubyonrails
<DropSQL>
RoR 4: Where i can make script (class) for net execute rails runner "MyClass:method_for_run" and which parrent class script can have?
senayar has joined #ruby
<ericwood>
DropSQL: #rubyonrails
moura has joined #ruby
<bline79_2>
http://pastebin.com/B6k41Tsy When I run this script, it just puts: munin-graphite.rb:64:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
moura has quit [Max SendQ exceeded]
Gillo has quit [Remote host closed the connection]
<DropSQL>
hanmac: this channel sleep :( help me please
<Hanmac>
apeiros: EU is shocked that the NSA uses SWIFT data for EVIL ;P
cascalheira has quit [Quit: Leaving...]
Collin_ has quit [Ping timeout: 252 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<MrZYX>
bline79_2: that means there's no service listening at 192.168.15.179:2003
kristiandelay has joined #ruby
<bline79_2>
there is however
snovak has joined #ruby
moura has joined #ruby
KobraKao has quit [Ping timeout: 276 seconds]
moura has quit [Max SendQ exceeded]
maycon has quit [Quit: Saindo]
<bline79_2>
I can: telnet 192.168.15.179 2003
<bline79_2>
that works :(
KobraKao has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<MrZYX>
and line 64 corresponds to line 6?
pyrac has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<DropSQL>
help me please, I don't know where i need search this information, all found sites not help for me
Yakko has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrZYX>
hah, I can do it too
<MrZYX>
DropSQL: #rubyonrails
sayan has quit [Ping timeout: 260 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<bline79_2>
MrZYX: yes
moura has joined #ruby
<bline79_2>
I'm curious as to why the hostname isn't getting outputted
moura has quit [Max SendQ exceeded]
<bline79_2>
when I run that
tealmage has quit [Ping timeout: 264 seconds]
chrishough has quit [Quit: chrishough]
<apeiros>
hanmac: yeah, that was such an utter surprise…</sarcasm>
moura has joined #ruby
moura has quit [Max SendQ exceeded]
thepumpkin has joined #ruby
<sam113101>
so it executes the macro as if it was the preprocessor?
KobraKao has quit [Ping timeout: 240 seconds]
ianclarksmith has joined #ruby
moura has joined #ruby
<MrZYX>
bline79_2: provide a minimal example that can reproduce the problem then, that's just class not showing how you call it
moura has quit [Max SendQ exceeded]
cj3kim has joined #ruby
<bline79_2>
k, one moment while I pull the file
KobraKao has joined #ruby
robscomputer has joined #ruby
<Hanmac>
apeiros: the EU is so pissed that they thought about to break the entire SWIFT-Pact ;D
moura has joined #ruby
<apeiros>
hanmac: and you believe that theater?
julweber has joined #ruby
moura has quit [Max SendQ exceeded]
Michael_ has quit [Remote host closed the connection]
<apeiros>
jezen: put requires on the top of your script
moura has quit [Max SendQ exceeded]
peregrine81 has joined #ruby
SHyx0rmZ has quit [Ping timeout: 257 seconds]
Soda has quit [Read error: Connection reset by peer]
<jezen>
apeiros: Ok, thanks for the feedback :)
moura has joined #ruby
<apeiros>
yw
moura has quit [Max SendQ exceeded]
DropSQL has left #ruby [#ruby]
moura has joined #ruby
<apeiros>
jezen: f = File.new("#{path}/raw.json", "w+") --> File.write("#{path}/raw.json", JSON.generate(hash))
moura has quit [Max SendQ exceeded]
burlyscudd has quit [Ping timeout: 264 seconds]
<apeiros>
jezen: if you want to use a filehandle, try to use the block-form as that properly closes your filehandles:
iamjarvo has quit [Remote host closed the connection]
moura has joined #ruby
<apeiros>
File.open(path, mode) do |fh| fh.puts data end # can spread it to 3 lines
mrsolo has joined #ruby
moura has quit [Max SendQ exceeded]
<jezen>
ah, ok
<jezen>
so much to learn…
iamjarvo has joined #ruby
mando has quit [Remote host closed the connection]
<Morrolan>
Would be odd to learn a language and know everything after one day. :o
<apeiros>
don't worry. ruby is quite consistent.
moura has joined #ruby
KobraKao has quit [Ping timeout: 245 seconds]
rippa has quit [Read error: Connection reset by peer]
krawchyk has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
<Hanmac>
eka if you can, watch the first episode again, from the moment the gnome-giant apears at the house at the end … notice everything in the background and then come back to tell me what you found ;P
<Eiam>
,,
<Eiam>
'liar
<Eiam>
ruby is not consistent at all
KobraKao has joined #ruby
<eka>
hanmac: hate you
moura has joined #ruby
<jezen>
I’m going to start going through Bruce Tate’s ‘Seven Languages in Seven Weeks’, so I should start pounding through this material
<MrZYX>
jezen: smthing.class == Bar -> smthig.is_a? Bar
moura has quit [Max SendQ exceeded]
<Hanmac>
apeiros: i also use require inside functions ;P
<apeiros>
hanmac: you have functions? :-p
moura has joined #ruby
<Hanmac>
i mean methods
<Eiam>
apeiros: paren vs no, hash as the last parameter can be structured totally different, blocks with do end vs {}
gusnasis has quit [Quit: Computer has gone to sleep.]
<apeiros>
Eiam: and there I thought you'd come up with some real inconsistencies
kaspergrubbe has quit [Remote host closed the connection]
<Eiam>
apeiros: those "inconsistencies" (they surely meet the definition of the word) make a lot of code look very different
<apeiros>
Eiam: ruby does have inconsistencies. however, what you just named are not inconsistencies.
moura has joined #ruby
moura has quit [Max SendQ exceeded]
quoin has quit [Ping timeout: 264 seconds]
<Eiam>
inconsistent = not staying the same throughout
moura has joined #ruby
Ripp__ has quit [Quit: Ripp__]
<Eiam>
making a hash behave totally different in how you interact with it because its the last parameter in a method
<apeiros>
Eiam: that's a rather bad definition
<Eiam>
is TOTALLY inconsistent.
alvaro_o has quit [Quit: Ex-Chat]
moura has quit [Max SendQ exceeded]
<Hanmac>
Eiam do you know "the seven types of parameters" ? ;D
<Eiam>
apeiros: uh, that the definition of the word.
<MrZYX>
tjbiddle: object.current_state
v0n has joined #ruby
<tjbiddle>
MrZYX: Wasn't working. Just tried object[:current_state] though a few seconds ago
noopq has quit [Ping timeout: 260 seconds]
iamjarvo_ has joined #ruby
moura has joined #ruby
<apeiros>
Eiam: anyway, {} stays the same throughout, it doesn't change during code
<tjbiddle>
That worked. Any idea why that's the case?
iamjarvo has quit [Ping timeout: 245 seconds]
<apeiros>
so does do/end
<Eiam>
either {blah=>yo} is a hash or its not. except sometimes its okay to say blah => yo and thats a hash
<Eiam>
but only in some cases
c0rn has joined #ruby
moura has quit [Max SendQ exceeded]
saarinen has quit [Quit: saarinen]
<bline79_2>
I'm just confused because of the output... it goes through and parses my munin files, but can't connect despite the correct hostname and port being there
<apeiros>
and do/end has a different meaning from {}. it doesn't change.
ner0x has quit [Quit: Leaving]
<xybre>
Every language is a set of "exceptions" to rules.
<Eiam>
totally inconsistent. will never be convinced otherwise.
<apeiros>
it also does not collide with any set up rule.
moura has joined #ruby
<xybre>
They are well defined, so, consistant.
moura has quit [Max SendQ exceeded]
<Eiam>
lol
<Eiam>
"Ruby consistently follow its rules that define inconsistencies, therefore there are no inconsistencies!"
<Eiam>
mkay.
maveonair has joined #ruby
<Eiam>
yes, by that rule, ruby is great.
moura has joined #ruby
<apeiros>
Eiam: you're being pathetic.
<tjbiddle>
MrZYX: Nevermind - both worked. I just had a typo when I tried calling it like a method. Thanks!
cascalheira has joined #ruby
<xybre>
Why are you even here?
moura has quit [Max SendQ exceeded]
jefflyne2 has joined #ruby
<breakingthings>
somebody is mad
<apeiros>
inconsistencies in ruby to make examples of actual inconsistencies: Array#delete and String#delete working entirely different
burlyscudd has joined #ruby
<xybre>
u mad bro?
<Hanmac>
xybre: he is a php user ;P
<Eiam>
so mad bro
moura has joined #ruby
<xybre>
hanmac: I'd be mad too :(
<breakingthings>
hanmac: more and more I find that to be true.
moura has quit [Max SendQ exceeded]
monkegjinni has joined #ruby
<apeiros>
Eiam: "a is not the same as b" is not equivalent to "a is inconsistent with b"
<Eiam>
apeiros: how is that inconsistent?? they are methods defined clearly with a set of rules for how they work on Array vs String!
<apeiros>
Eiam: and "do/end blocks are not the same as {} blocks". no inconsistency.
moura has joined #ruby
moura has quit [Max SendQ exceeded]
cj3kim has quit [Remote host closed the connection]
<breakingthings>
what's your favorite language Eiam
<Eiam>
breakingthings: ruby...
<apeiros>
lol
kurt21 has joined #ruby
<Eiam>
=)
<Hanmac>
Eiam there are also some ones that whine about that String doesnt have each anymore
jezen has quit [Read error: Connection reset by peer]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
jezen has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
<breakingthings>
top lel
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<Eiam>
apeiros: clearly we disagree with what it means to be inconsistent. I'm okay with that =)
<apeiros>
Eiam: *shrug*, fine, make up your own definition and say ruby is inconsistent
<Morrolan>
You two are inconsistent.
<xybre>
I think the reasoning behind removing String#each is dumb. But its not a super useful feature and its easy to emulate, so I'm kind of ambivalant about it.
<Morrolan>
Or inequal?
<Morrolan>
Eh, whatever.
<apeiros>
Morrolan: incompatible
<Morrolan>
That too!
<xybre>
Incomparable.
<apeiros>
incongruent
<Morrolan>
Incomprehendible. At least some.
moura has joined #ruby
<Eiam>
apeiros: you just said it was inconsistent yourself!
<Eiam>
Morrolan: star crossed
colonolGron has joined #ruby
rezzack has joined #ruby
<apeiros>
Eiam: o0
moura has quit [Max SendQ exceeded]
<Eiam>
well, i like apeiros even if he doesn't like me
bean has joined #ruby
<Eiam>
I'm also okay with that
jefflyne2 has quit [Read error: Connection reset by peer]
<apeiros>
I said ruby has inconsistencies.
<apeiros>
I also said ruby overall is very consistent
cj3kim has joined #ruby
jefflyne3 has joined #ruby
moura has joined #ruby
alvaro_o has joined #ruby
<apeiros>
not sure where you're making out a contradiction.
moura has quit [Max SendQ exceeded]
<Hanmac>
you all should be happy that IO still have an #each method and didnt lose it like String ;P
<Hanmac>
MrZYX: "something"f is an new syntax in ruby-trunk that supports the creation of frozen string literals … the funny part, two same frozen strings literals can share the object id like symbols ;P
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<apeiros>
*sob*, ruby2+ argument definition is IMO not nice
<MrZYX>
that sounds... not too useful :P
moura has joined #ruby
jprovazn has quit [Ping timeout: 264 seconds]
<Hanmac>
MrZYX: it is for Version constants for sample
<Hanmac>
apeiros: the most funny part, it works inside of the | | from a block too :P …
brianpWins has quit [Quit: brianpWins]
moura has joined #ruby
<MrZYX>
mmh, e:, is required keyword argument? wasn't :e, in discussion?
moura has quit [Max SendQ exceeded]
brianpWins has joined #ruby
moura has joined #ruby
ryannielson has left #ruby [#ruby]
moura has quit [Max SendQ exceeded]
<Morrolan>
I find the distinction between 'regular' arguments and keyword arguments a tad odd. Why not just allow to pass regular arguments as keyword arguments?
tabolario has joined #ruby
iamjarvo_ has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
rezzack has joined #ruby
<apeiros>
I thought I had read of a reason why that wasn't done, but don't remember it anymore :-/
<xybre>
I'd much prefer the %x{} syntax to the damn suffixes.
moura has joined #ruby
<xybre>
It'll all end in tears.
moura has quit [Max SendQ exceeded]
marius has quit [Quit: x]
mando has joined #ruby
<shevy>
all those keyword stuff looks ugly like hell
<Morrolan>
apeiros: Heh. Poke me when you remember. :)
moura has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
moura has quit [Max SendQ exceeded]
<apeiros>
Morrolan: I don't think I want to remember.
<Morrolan>
(Or was that in response to MrZYX?)
<Morrolan>
Hah.
<Hanmac>
apeiros: this works for me: [{a: 4},{a: 7},{a: 5} ].map {|a:| a } #=> [4,7,5]
<apeiros>
this "meandering" syntax of ruby… all the more reason to continue on my own language.
Andrevan has joined #ruby
moura has joined #ruby
tvw has joined #ruby
moura has quit [Max SendQ exceeded]
iamjarvo_ has quit [Remote host closed the connection]
lockweel has joined #ruby
<apeiros>
hanmac: I'd expect that. then again I was surprised that proc { |&block| } did not work back in 1.8
iamjarvo has quit [Ping timeout: 260 seconds]
rcosta has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 245 seconds]
moura has joined #ruby
iamjarvo has joined #ruby
moura has quit [Max SendQ exceeded]
zarubin has quit [Ping timeout: 276 seconds]
linux_noob_666 has quit [Ping timeout: 245 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
toddWork_ has joined #ruby
moura has joined #ruby
Tuxist has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
hamakn has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
girija_ has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
unrar has quit [Quit: Leaving]
<xybre>
`%f{foobar}` is ugly, but `"foobar"f` just looks *wrong*.
lockweel has quit [Remote host closed the connection]
momomomomo has joined #ruby
huoxito has quit [Ping timeout: 240 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<Hanmac>
xybre: there is also an "str"b flag for binary strings and they maybe can combined, but its not enabled yet
moura has joined #ruby
moura has quit [Max SendQ exceeded]
hamakn has quit [Ping timeout: 260 seconds]
moura has joined #ruby
moura has quit [Max SendQ exceeded]
RORgasm_ is now known as RORgasm
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<xybre>
That is even worse.
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<Hanmac>
hm i maybe request the flags for symbols and for Regex too ;P so that :"sym"f would work ;DD
<xybre>
hanmac: might as well change all the %'s so it'll be consistant, that will make Eiam happy. "this is a regex"r
<xybre>
Hillarity ensues!
moura has joined #ruby
moura has quit [Max SendQ exceeded]
brbcoding has quit []
moura has joined #ruby
moura has quit [Max SendQ exceeded]
dodosan has joined #ruby
mmlac-bv has quit [Ping timeout: 260 seconds]
moura has joined #ruby
seoNinjaWarrior has joined #ruby
moura has quit [Max SendQ exceeded]
xeon_ has joined #ruby
moura has joined #ruby
jezen has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
snovak has joined #ruby
razi has quit [Ping timeout: 264 seconds]
Uranio has quit [Ping timeout: 264 seconds]
girija_ has quit [Ping timeout: 260 seconds]
jezen has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
Notte_ has quit []
mklappstuhl has joined #ruby
burlyscudd has quit [Quit: Leaving.]
Notte has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
<seoNinjaWarrior>
anyone know where there's good documentation on jruby db gems?
moura has joined #ruby
moura has quit [Max SendQ exceeded]
Monie has joined #ruby
moura has joined #ruby
mib_mib has joined #ruby
T_T has quit [Remote host closed the connection]
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
burlyscudd has joined #ruby
snovak has quit [Read error: Operation timed out]
<mib_mib>
hi guys - i have a file that i am reading in just using File.read(myfile) that has chinese characters, and when i read it in and then puts it in the console they all appears as underscores - is ruby converting these characters to underscores by default because they are bad utf8 or what?
NealJ has quit [Quit: :c]
jezen has quit [Ping timeout: 256 seconds]
<xybre>
mib_mib: are you sure its not just your console font?
huoxito has joined #ruby
<seoNinjaWarrior>
lol
<xybre>
seoNinjaWarrior: most gems are documented on rubydocs.info
<apeiros>
mib_mib: that'd be why your regex doesn't match
saarinen has joined #ruby
<apeiros>
I have no idea why you think it should match
<Mephisto3>
may i use the ruby 2.0.0 net::http documentation for 1.8.7?
ezra has quit [Read error: Connection reset by peer]
<momomomomo>
Got it mib_mib apeiros
<shevy>
Mephisto3 it will be only partially correct, but I think for 80% it may be correct, except for new classes like io-console
iamjarvo has quit [Read error: Connection reset by peer]
<mib_mib>
apeiros: does that mean its not utf8 ? utf16 perhaps?
<shevy>
the ftp module for example is about the same I think
<momomomomo>
The text isn't the same - as the length should only be 12 characters apeiros mib_mib - maybe the file is ANSI
tatsuya_o has joined #ruby
iamjarvo has joined #ruby
<shevy>
Mephisto3 I use 2.x docu for 1.9.3 right now :P
<Mephisto3>
ok, because itseems that 1.8.7 is missing half of the information.I'll also getan error when being wrong :)
Naoe-Kanno has quit [Ping timeout: 260 seconds]
tatsuya_o has quit [Remote host closed the connection]
<shevy>
yeah
<shevy>
official ruby docu always was lacking
tatsuya_o has joined #ruby
<shevy>
you should have been here in the year 2005, it was even worse than it is today
vlad_sta_ has joined #ruby
ssvo_ has joined #ruby
<Mephisto3>
:D
<shevy>
see, rather than adding fancy new syntax for ruby, they could improve docu
vlad_starkov has quit [Read error: Connection reset by peer]
julweber has joined #ruby
tricon_ has joined #ruby
beilabs_ has joined #ruby
ssvo has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
emanon_ has joined #ruby
<apeiros>
oh dear. programmers should be required to have an education about encodings and stuff.
burlyscudd has quit [Quit: Leaving.]
linux_noob_666 has joined #ruby
Notte has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 260 seconds]
<mib_mib>
apeiros: so what encoding are the characters? arent they utf8?
geekbri has quit [Remote host closed the connection]
<apeiros>
mib_mib: `puts [21271,20140,20845,26234,20449,24687,25216,26415,26377,38480,20844,21496].pack("U*")` in your code prints those chars?
tealmage has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 264 seconds]
julweber has quit [Ping timeout: 264 seconds]
girija_ has quit [Ping timeout: 264 seconds]
<apeiros>
mib_mib: also what does f.unpack("U*") give? (might want to strip first, as a length of 52 might indicate lots of whitespace)
<momomomomo>
apeiros: Was I in the wrong with my comment?
<apeiros>
momomomomo: at the moment quite a lot is just a shot in the blue.
brianpWins has quit [Quit: brianpWins]
ukd1_ has joined #ruby
ukd1 has quit [Ping timeout: 264 seconds]
<apeiros>
momomomomo: which is why I ask the questions I ask. I see no value in guessing with such things.
<Hanmac>
eka: did you also watch other episodes yet?
<eka>
hanmac: no
<eka>
hanmac: have to search for them and you know… (NSA looking) :)
<mib_mib>
apeiros: ah weird.... so if i download the file and read it directly, they display correctly... i was copy pasting them out of a web page and then saving it. They display as chinese in excel, but then when saving and reading in again they dissapear... weird... but if i do .match(/[\u0080-\uffff]/) then i do get a match
brianpWins has joined #ruby
<momomomomo>
apeiros: Fair enough, was just wondering if your "apeiros: oh dear. programmers should be required to have an education about encodings and stuff." was a shot at me :p Which would be fair enough, as I should read up on encoding further
rcosta has joined #ruby
rads has quit [Quit: rads]
<apeiros>
momomomomo: it wasn't shot at anybody in particular.
<apeiros>
programmers being confused about encodings is a heavily recurring thing
ukd1_ is now known as ukd1
evenix has quit [Remote host closed the connection]
pskosinski has joined #ruby
xeon_ has joined #ruby
xeon_ has quit [Max SendQ exceeded]
monkegjinni has quit [Remote host closed the connection]
<apeiros>
and it's not such a difficult thing really. you have a bunch of bytes. the encoding tells you what characters that bunch of bytes represent.
<apeiros>
and wow, that's all there is to it. the rest is understanding the implications of it.
<shevy>
hmm can someone explain to me why ARGV input is frozen and whether .dup is the recommend way to check for this? most of the time I use my ruby scripts, and when I want to modify a string there, like append to a path, I seem to have frozen strings
<momomomomo>
apeiros: Right on, and I think mib_mib 's concern here is that once he uses File.readline, it seems to be UTF-8, but seems like something has changed along the way
c0rn has quit [Quit: Computer has gone to sleep.]
funburn has joined #ruby
xeon_ has joined #ruby
alexju has quit [Remote host closed the connection]
<shevy>
Foo.new(ARGV)
xeon_ has quit [Max SendQ exceeded]
<shevy>
class Foo; def initialize(i); @foo = i.to_s.dup # to_s for the sake of demonstration, let's assume that string is lateron further processed
quoin has quit [Ping timeout: 276 seconds]
Companion is now known as companion
xeon_ has joined #ruby
simoz has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mary5030 has joined #ruby
<xybre>
shevy: Can you ARGV.to_a?
<xybre>
Yes, you can I just tried it. Then you'll get an array you can mutate.
<shevy>
hmm not sure, I would not do so directly though, I always work through input given to methods
<apeiros>
ARGV already is an array… and already mutable
Cheos has quit [Quit: Leaving...]
<shevy>
"The Object#dup method will make a shallow copy of an object. To achieve this, the dup method will call the initialize_copy method of that class."
momomomomo has quit [Quit: momomomomo]
<xybre>
Oh. So it is. I was thinking of ARGF, nevermind.
spider-mario has quit [Read error: Connection reset by peer]
mando has quit [Remote host closed the connection]
lancepantz_ is now known as lancepantz
<shevy>
if you throw away braces, you lose options
<xybre>
I think it might be a fine exercise to try.
Soda has joined #ruby
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pskosinski has quit [Read error: Operation timed out]
<xybre>
Pay attention to the pain points that not using braces causes you and figure out the best clean alternative.
<shevy>
though perhaps jezen could design a new language, I really want an alternative to ruby
<jezen>
when I said interpolation, I mean `puts "herp #{derp}"`
<shevy>
hahaha xybre :D
<pontiki>
shevy, there are 1000's of languages
<pontiki>
go off and try another
<pontiki>
ruby isn't perfect, nor best for everything
<shevy>
pontiki right but take php, what advantage would it have over ruby
<Collin>
Do Ruby arrays make any guarantee on memory layout?
<pontiki>
none
chrishough has quit [Quit: chrishough]
<pontiki>
except it's dead easy to deploy a php app
duggiefresh has quit [Remote host closed the connection]
cody-- has quit [Quit: Computer has gone to sleep.]
ldnunes has quit [Quit: Leaving]
evenix has quit [Read error: Connection reset by peer]
<jezen>
pontiki: That can also be seen as a bad thing
<pontiki>
and you can probably find a lot more pickup work since there's so much of it laying about
ShapeShifter499 has joined #ruby
<xybre>
shevy: I am designing a new language, but you probably won't like it either ;)
<pontiki>
of course it can
<shevy>
xybre depends
solrize has joined #ruby
<jezen>
I think my current colleagues are worthless copy pasta programmers
<Collin>
Is there anythin better than a string for storing ~500,000 32-bit integers that will need to be accessed consecutively?
<shevy>
xybre there are things I hate in ruby but as long as I can avoid it, it's fine, much better than php or perl
casheew has quit [Read error: Connection reset by peer]
<jezen>
and I’d rather learn coffeescript so they can’t contribute
casheew has joined #ruby
<Nilium>
jezen: You should scalp them. and then stick their heads on pikes outside the office.
<pontiki>
Collin: i feel a song coming on...
<solrize>
hi, there's a number_to_currency function in rails that gets the formatting right for local currency... is there a way to use it without rails ? i couldn't figure out where to d/l it from
<jezen>
otherwise they’ll derp my javscript
<solrize>
collin use array
<Collin>
If array is fragmented in heap, I'm not sure about the performance
<Collin>
I'll try it though
<shevy>
solrize, what is the name ... number_to_currency ... let's search
<pontiki>
shevy: if there are things you hate, find out why
<pontiki>
if there are things you hate in php, find out why
<jezen>
Nilium: One is already scalped. Six of my colleagues are bald men.
<shevy>
so I think this is part of ActionView whatever that is
<Nilium>
In that case, the pikes will have to do.
<Nilium>
Begin the slaughter.
<jezen>
XD
<pontiki>
let slip the dogs of ruby
<Nilium>
Or Scala.
<Nilium>
I'm in favor of Scala.
<Nilium>
It is my new toy.
Michae___ has joined #ruby
<shevy>
pontiki I hate everything in php - the syntax, the limitedness it gives you. I failed writing a bot in php. I switched to ruby and succeeded. the reason had 99,9% to do with a language. since that day I am no longer a believer in "use the right tool for the job", simply because there are tools that are total and utter shit
<jezen>
I’m in favour of anything white-space sensitive
<Nilium>
I'm opposed to anything whitespace-sensitive.
<solrize>
shevy thanks
<shevy>
hmm all but one thing - the web focus of php was a good thing, ruby should have also included that
snovak has joined #ruby
funburn has quit [Quit: funburn]
<shevy>
solrize let me find it :D
<Nilium>
Mostly because that also implies loss of clear end-of-scope delimiters like braces, which means the code is infinitely worse for reading
<solrize>
i have to install actionview?
<solrize>
hmm
<shevy>
solrize I am not sure... I dont know the game
<shevy>
oops, *gem
jtgiri_ has joined #ruby
<jezen>
Nilium: I did think that; I thought python seemed silly for that reason
mklappstuhl has quit [Remote host closed the connection]
<prometheanfire>
oops, wrong ruby
<jezen>
gonna try installing iOS7GM. Hope I don’t derp my phone.
GG__ has quit [Client Quit]
cj3kim has joined #ruby
Elhu has quit [Client Quit]
iliketur_ has joined #ruby
jeebster has quit [Quit: Leaving.]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mercwithamouth has joined #ruby
T_T has joined #ruby
interactionjaxsn has quit [Ping timeout: 264 seconds]
RichardBaker has joined #ruby
<onewheelskyward>
It's fine.
<onewheelskyward>
Betas 1-4 were crap.
codecop has quit [Remote host closed the connection]
<onewheelskyward>
5 and 6 were reasonable.
saarinen has quit [Quit: saarinen]
yano has quit [Ping timeout: 624 seconds]
iamjarvo_ has joined #ruby
maveonair has quit [Ping timeout: 245 seconds]
gyre007 has quit [Read error: Operation timed out]
mlpinit has quit [Remote host closed the connection]
w3pm has joined #ruby
<w3pm>
im trying to use ruby as a bash replacement -- backtick ` works well for executing commands, however is there a way to redirect output to stdout?
claymore has quit [Quit: Leaving]
jeebster has joined #ruby
mando has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
cj3kim has quit [Ping timeout: 260 seconds]
iamjarvo_ has quit [Read error: Operation timed out]
mmlac-bv has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
<pontiki>
w3pm: during the execution? i use Open3.popen3 to deal with that
stevechiagozie has quit [Quit: Computer has gone to sleep.]
__main__ has quit [Ping timeout: 245 seconds]
<xybre>
w3pm: you need to continually read the IO object return by popen and puts it
saarinen has quit [Client Quit]
<xybre>
Well, probably read+print, not puts
io_syl has quit []
quoin has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
iamjarvo has joined #ruby
__main__ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
iliketur_ has quit [Quit: zzzzz…..]
c0rn has joined #ruby
saarinen has joined #ruby
nate_ has joined #ruby
elux has quit [Quit: Leaving...]
JohnBat26 has quit [Ping timeout: 264 seconds]
saarinen has quit [Client Quit]
Gillo has quit [Remote host closed the connection]
mmlac-bv has joined #ruby
jdeeburke has quit [Quit: Leaving.]
<w3pm>
hmmm
saarinen has joined #ruby
pwh has quit [Quit: pwh]
ravster has quit [Quit: Leaving.]
vlad_sta_ has quit [Remote host closed the connection]
azcodex has quit [Read error: No route to host]
<Collin>
How do I return something from a proc early?
<Collin>
I'm obviously not very good at Ruby :(
ixti has quit [Read error: Connection reset by peer]
mando has joined #ruby
ixti has joined #ruby
iliketur_ has joined #ruby
azcodex has joined #ruby
T_T has joined #ruby
RORgasm has quit [Remote host closed the connection]
jdolitsky1 has quit [Quit: Leaving.]
RichardBaker has quit [Quit: RichardBaker]
iliketur_ has quit [Client Quit]
<w3pm>
whats the difference between "hi [%s]" % mystr and "hi #{mystr}" ?
Inoperable has quit [Quit: Rectified]
iliketur_ has joined #ruby
eiight has joined #ruby
carlyle has quit [Remote host closed the connection]
Es0teric has joined #ruby
<w3pm>
and why doesnt 'Some "quoted #{mystr}"' work
<MrZYX>
the first one prints [] around mystr
<w3pm>
er sorry ignore the []
Inoperable has joined #ruby
<w3pm>
thought that was syntax :)
mikeg has joined #ruby
<MrZYX>
'foo' simply doesn't interpret interpolation and (most) escape sequences, it's a language feature
<w3pm>
so 'Hi "%s"' % mystr works but 'Hi "#{mystr}"' doesnt work
T_T has quit [Remote host closed the connection]
<w3pm>
oh i see
mib_mib has quit [Ping timeout: 250 seconds]
<w3pm>
hm works in the former case, for some reason
<MrZYX>
because % is actually a method call on String
<w3pm>
ah ok so thats the difference, gotcha
<w3pm>
thanks
quoin has joined #ruby
kirun has quit [Quit: Client exiting]
v0n has joined #ruby
jp- has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
RichardBaker has joined #ruby
jdolitsky1 has joined #ruby
kaichanvong has quit [Read error: Connection reset by peer]
Stygia has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
rads has joined #ruby
xk_id has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
enebo has quit [Quit: enebo]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mmlac-bv has quit [Quit: mmlac-bv]
apeiros has quit [Read error: Connection reset by peer]
jcromartie has joined #ruby
zeade has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
narcan has joined #ruby
tvw has quit []
nowthatsamatt has quit [Quit: nowthatsamatt]
T_T has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
apeiros has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
colonolGron has quit [Quit: Lost terminal]
workmad3 has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
tufflax has joined #ruby
<pontiki>
Collin: return
blackmesa has joined #ruby
jefflyne3 has quit [Ping timeout: 260 seconds]
dougireton has joined #ruby
quoin has quit [Remote host closed the connection]
<tufflax>
Does anyone happen to know which version of ruby i'm supposed to use with vim 7.4 on windows? gvim.exe references "msvcrt-ruby192.dll" but even ruby 1.9.3 has "msvcrt-ruby191.dll" in it.
quoin has joined #ruby
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 264 seconds]
peregrine81 has quit []
<Galgorth>
you use the virtualized ubuntu version of ruby on windows ;)
snovak has quit [Ping timeout: 246 seconds]
zeade has quit [Quit: Leaving.]
rcosta has quit [Remote host closed the connection]
io_syl has joined #ruby
dkamioka has quit [Remote host closed the connection]
iamjarvo has quit [Remote host closed the connection]
anonymuse has joined #ruby
dougireton has quit [Ping timeout: 260 seconds]
quoin has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
fridim_ has joined #ruby
ryandeussing has quit [Remote host closed the connection]
ryandeussing has joined #ruby
<xybre>
w3pm: Also, if you want to use both ' and " in a string you can use %Q{some string} to to interpolated strings (like ") or %q{something} for uninterpolated ones.
Xeago has quit [Remote host closed the connection]
musl has quit [Quit: WeeChat 0.4.1]
ryandeussing has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 264 seconds]
kindjal has quit [Quit: Computer has gone to sleep.]
musl has joined #ruby
tabolario has joined #ruby
<w3pm>
xybre: hmm not sure if i'm following, do you have an example?
mansi has quit [Remote host closed the connection]
MrThePlague has quit [Remote host closed the connection]
rads has quit [Ping timeout: 256 seconds]
julweber has joined #ruby
nwertman has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
yano has joined #ruby
twoism_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
twoism has quit [Ping timeout: 245 seconds]
BRMatt has joined #ruby
monkegjinni has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
rcosta has joined #ruby
mklappstuhl has joined #ruby
cody-- has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
c0rn has joined #ruby
monkegjinni has quit [Ping timeout: 260 seconds]
mklappstuhl has quit [Remote host closed the connection]
bigoldrock has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
maroloccio has joined #ruby
<w3pm>
xybre: ah i see, cool thanks :)
mmlac-bv has joined #ruby
jachymko has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
alexju has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
mklappstuhl has quit [Ping timeout: 246 seconds]
jlast has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
pel_daniel has left #ruby [#ruby]
mlpinit has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
kurt21 has left #ruby [#ruby]
anonymuse has quit [Remote host closed the connection]
anonymuse has joined #ruby
thepumpkin has quit [Remote host closed the connection]
funburn has joined #ruby
baordog has quit [Remote host closed the connection]
gstamp has joined #ruby
mmlac-bv has quit [Ping timeout: 260 seconds]
jefflyne3 has joined #ruby
quoin has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
c0rn has joined #ruby
kvirani has joined #ruby
tricon_ has quit [Ping timeout: 256 seconds]
mikeg has quit [Remote host closed the connection]
Tricon has quit [Ping timeout: 260 seconds]
Guest53784 has quit [Ping timeout: 264 seconds]
beneggett has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
Alina-malina has quit [Read error: Connection reset by peer]
cub1c has joined #ruby
Alina-malina has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
jlebrech has quit [Ping timeout: 268 seconds]
rcosta has quit [Remote host closed the connection]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VTLob has quit [Quit: VTLob]
robscomputer has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
kvirani has quit [Ping timeout: 276 seconds]
lfox has quit [Quit: ZZZzzz…]
rcosta has joined #ruby
Michae___ has quit [Remote host closed the connection]
mmlac-bv has joined #ruby
Michael_ has joined #ruby
duggiefresh has joined #ruby
lockweel has quit [Ping timeout: 245 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
ryannielson has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
tjbiddle has joined #ruby
iamjarvo has joined #ruby
Steve009 has joined #ruby
linux_noob_666 has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Client Quit]
quoin has quit [Ping timeout: 264 seconds]
<Steve009>
How do you pass a null/nil value into a MongoDB Aggregate query using the Mongodb Ruby API?
<Steve009>
have tried nil, :null, "", ''
Ox6abe has joined #ruby
haxrbyte has joined #ruby
Michael_ has quit [Ping timeout: 245 seconds]
jcromartie has joined #ruby
osvico has joined #ruby
ryandeussing has joined #ruby
iamjarvo has quit [Remote host closed the connection]
taternuts has joined #ruby
iamjarvo has joined #ruby
mrsolo has joined #ruby
saarinen has quit [Quit: saarinen]
r4nd0m1_ has joined #ruby
mrsolo has quit [Client Quit]
mrsolo has joined #ruby
r4nd0m1 has quit [Ping timeout: 264 seconds]
pumper has joined #ruby
snovak has joined #ruby
vlad_starkov has joined #ruby
spap has quit []
iamjarvo has quit [Ping timeout: 256 seconds]
kaichanvong has joined #ruby
ryandeussing has quit [Read error: Connection reset by peer]
ryandeussing has joined #ruby
ItSANgo has quit [Quit: Leaving...]
jezen has quit [Remote host closed the connection]
nickbender has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Remote host closed the connection]
<Steve009>
nvm typo
jerius has quit []
spap has joined #ruby
snovak has quit [Ping timeout: 251 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
zaargy has left #ruby [#ruby]
agent_white has joined #ruby
predator117 has joined #ruby
saarinen has joined #ruby
predator217 has quit [Ping timeout: 248 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
nwertman_ has quit [Remote host closed the connection]
<xybre>
w3pm: np :)
mikeg has joined #ruby
nhhagen_ has quit [Remote host closed the connection]
nhhagen_ has joined #ruby
crus has joined #ruby
kvirani has joined #ruby
dkamioka has joined #ruby
<w3pm>
hmmm im trying to write a command-line tool in ruby where i use OptionParser to write values into a hash
<w3pm>
so far so good
<w3pm>
then i try to build the command and run it
<w3pm>
but the way i've written it feels decisively ugly? i dont know what the nice ruby way of doing this is :) http://codepad.org/U6DsifYz
<w3pm>
mainly using the ternary operator like that, im not sure of an alternative
nanoxd has joined #ruby
nanoxd has quit [Client Quit]
ixti has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nhhagen_ has quit [Ping timeout: 246 seconds]
sweet_kid has quit [Read error: Connection reset by peer]
dkamioka has quit [Ping timeout: 245 seconds]
quoin has joined #ruby
sweet_kid has joined #ruby
<dorei>
w3pm: u dont need == true, only nil and false evaluate to false
headius has quit [Quit: headius]
ixti has joined #ruby
swistak35 has quit [Ping timeout: 245 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
pskosinski has quit [Remote host closed the connection]
randomdrake has quit [Quit: randomdrake]
z has quit [Ping timeout: 245 seconds]
<xybre>
w3pm: yep thats pretty horrific
senayar has joined #ruby
parus has quit [Ping timeout: 264 seconds]
nwertman has joined #ruby
z has joined #ruby
<onewheelskyward>
I'd make those decision points ahead of the command, and put the results in strings. Then make the command just the command, no logic.
parus has joined #ruby
z is now known as Guest71235
<xybre>
w3pm: might help to make your own mini-DSL to build commandlines. Or use one of the gems that do it for you.
kvirani has quit [Ping timeout: 276 seconds]
jezen has joined #ruby
huoxito has joined #ruby
mootpointer has joined #ruby
nari has joined #ruby
Ox6abe has quit [Remote host closed the connection]
swistak35 has joined #ruby
nwertman has quit [Remote host closed the connection]
ItSANgo has joined #ruby
randomdrake has joined #ruby
nfk has quit [Quit: yawn]
baroquebobcat_ has quit [Quit: baroquebobcat_]
cody-- has joined #ruby
kvirani has joined #ruby
thesheff17 has joined #ruby
quoin has quit [Ping timeout: 245 seconds]
hadees has joined #ruby
<shevy>
w3pm if it works, it works, but writing it as a class might be better if you plan to re-use that code
<shevy>
right now it seems like a throw-away script
Steve009 has quit [Quit: Steve009]
Monie has joined #ruby
<shevy>
w3pm also, make cmd = [], then a newline, then do: cmd <<
<shevy>
your script seems to not work
nowthatsamatt has joined #ruby
mklappstuhl has joined #ruby
tealmage has joined #ruby
headius has joined #ruby
kvirani has quit [Ping timeout: 276 seconds]
<Eiam>
yeah I like onewheelskyward suggestion..
<Eiam>
make the decisions ahead of time
yano has quit [Ping timeout: 600 seconds]
iliketurtles has joined #ruby
mootpointer has quit [Quit: ENOCAFFEINE.]
tabolario has joined #ruby
Soda has quit [Read error: Connection reset by peer]