<tejas-manohar>
shevy: mine works till that point tho it shows the output but it doesn't parse to remove the stack trace, i'm not really sure how to attack this, i see the author of that IRC bot is using string formatting but I'm not sure how rescue Exception etc works since the code is being run on eval.in and not locally
<tejas-manohar>
shevy: any idea on how to implement the string formatting to remove stacktrace in my app? im not using any different templates like new or old maybe i needa make a template or someting?
<shevy>
well I don't know the code of that bot
LouisRoR has quit [Ping timeout: 252 seconds]
<shevy>
and I am not sure which string formatting you need or have
<shevy>
let's first start with Exceptions
<shevy>
you understand how they work?
<shevy>
or rather how you use them in your code
<shevy>
it's always a problem when you use code written by someone else by the way
<shevy>
sometimes it is just hard to understand
<tejas-manohar>
shevy: yeah i understand exceptions
<tejas-manohar>
shevy: this is p much like try/catch stuff in java
tombroomfield has quit [Read error: Connection reset by peer]
tombroomfield has joined #ruby
Sawbones has joined #ruby
AndyBotwin has quit [Read error: Connection reset by peer]
AndyBotwin has joined #ruby
<shevy>
dunno
leafybasil has quit [Remote host closed the connection]
<shevy>
it packs a lot of information in a few lines
tina has joined #ruby
<shevy>
I don't like any of the API
<shevy>
body = Nokogiri(Net::HTTP.get(location))
<anskeit>
im trying to make a chat based game just like Zork, but with a multiplayer. i thougt i could make it like a chat. but i dont know how i could realize that, im not very comfortable with ruby
<shevy>
anskeit probably by using some socket connection
asmodlol has quit [Ping timeout: 272 seconds]
asmodlol has joined #ruby
Sawbones has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
Sawbones has joined #ruby
maletor has joined #ruby
tombroomfield has quit [Read error: Connection reset by peer]
maletor has quit [Client Quit]
tombroomfield has joined #ruby
haxr has joined #ruby
EasyCo has joined #ruby
jaequery has quit [Ping timeout: 256 seconds]
tina has quit [Killed (idoru (Spam is off topic on freenode.))]
oo_ has joined #ruby
Takle has joined #ruby
josephndenton has quit [Ping timeout: 250 seconds]
dts|pokeball has joined #ruby
pdlug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jack_rabbit has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
Takle has quit [Ping timeout: 245 seconds]
asmodlol has quit [Ping timeout: 252 seconds]
lemur has joined #ruby
Sawbones has quit [Remote host closed the connection]
Musashi007 has joined #ruby
jdj_dk has quit [Ping timeout: 265 seconds]
asmodlol has joined #ruby
yfeldblum has joined #ruby
jack_rabbit has joined #ruby
Sawbones has joined #ruby
Musashi007 has quit [Ping timeout: 265 seconds]
sargas has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
duncannz has quit [Ping timeout: 240 seconds]
Areessell has quit [Quit: leaving]
pu22l3r has joined #ruby
crueber has joined #ruby
yfeldblum has joined #ruby
ishikawa91 has quit [Quit: Connection closed for inactivity]
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
Sawbones has quit [Remote host closed the connection]
jaequery has joined #ruby
vinleod has joined #ruby
jaequery has quit [Client Quit]
mjuszczak has joined #ruby
duncannz has joined #ruby
timonv_ has joined #ruby
jaequery has joined #ruby
Sawbones has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
i8igmac has quit [Read error: Connection reset by peer]
claw__ has joined #ruby
mjuszczak has quit [Client Quit]
psy has joined #ruby
jaequery has joined #ruby
Musashi007 has joined #ruby
i8igmac has joined #ruby
Sawbones has quit [Remote host closed the connection]
Guest52757 is now known as nitrix
anskeit has quit []
jaequery_ has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
charliesome has joined #ruby
<Hijiri>
Does ruby respond to the TZ environment variable when getting local time?
timonv_ has quit [Ping timeout: 244 seconds]
elfuego has quit [Quit: elfuego]
jaequery has quit [Ping timeout: 264 seconds]
mjuszczak has joined #ruby
jack_rabbit has quit [Ping timeout: 245 seconds]
jdj_dk has joined #ruby
AndyBotwin has quit [Quit: Leaving]
AndyBotwin has joined #ruby
oo_ has joined #ruby
<shevy>
good question
<shevy>
I would say no but I have no data to back up my statement
<shevy>
but I think - if you assign to TZ some silly value, then the ruby time-related code should still work fine
tejas-manohar has quit [Quit: Page closed]
rbrs has joined #ruby
oo_ has quit [Ping timeout: 244 seconds]
<shevy>
if [ -e file.txt ]; then echo "hi"; fi
<shevy>
is bash not a pretty thing
jack_rabbit has joined #ruby
Menorah has quit [Quit: This computer has gone to sleep]
dseitz has joined #ruby
AndroUser466 has joined #ruby
AndroUser466 has quit [Client Quit]
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
Hijiri has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
Joufflu has joined #ruby
govg has joined #ruby
Hijiri has joined #ruby
duncan_ has joined #ruby
Hijiri has quit [Client Quit]
Hijiri has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
pu22l3r has quit [Remote host closed the connection]
phutchins has joined #ruby
hamakn has quit [Remote host closed the connection]
jaequery_ has quit [Ping timeout: 240 seconds]
<Karunamon>
Google's oauth implementation is a huge pain in the ass.
<Karunamon>
that is all.
jdj_dk has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
<Karunamon>
we've gone from basic encrypted username/password to expiring token BS
AndroUser466 has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
Takle has joined #ruby
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #ruby
asmodlol has quit [Ping timeout: 244 seconds]
oo_ has quit [Ping timeout: 258 seconds]
asmodlol has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
PanzerModern has quit [Quit: Leaving]
charliesome has quit [Quit: zzz]
psyprus has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Ping timeout: 265 seconds]
conniemj__ has joined #ruby
asmodlol has quit [Ping timeout: 244 seconds]
asmodlol has joined #ruby
sargas has joined #ruby
sargas has quit [Client Quit]
psyprus has quit [Ping timeout: 258 seconds]
psyprus has joined #ruby
asmodlol has quit [Ping timeout: 240 seconds]
fenzil has quit [Read error: Connection reset by peer]
sargas has joined #ruby
phutchins has quit [Read error: Connection reset by peer]
MasterPiece has joined #ruby
_Andres has joined #ruby
asmodlol has joined #ruby
ishikawa91 has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby
<shevy>
hehe
JoshGlzBrk has joined #ruby
TripTastic has quit [Ping timeout: 240 seconds]
klmlfl has quit [Remote host closed the connection]
mary5030 has joined #ruby
jdj_dk has joined #ruby
<Karunamon>
anyone familiar enough with the google drive gem that knows what exception gets raised when you try to do something with an expired token? otherwise I'm going to have to wait an hour for this one to expire so I can find out :P
<godd2>
You can ignore coloring, it was just for my personal notes on how familiar I was with that class
Musashi007 has quit [Quit: Musashi007]
duncan_ has joined #ruby
<zhando>
godd2: fantastic.. that helps. thanks!
jamto11 has quit [Ping timeout: 258 seconds]
<godd2>
The ones that are underlined link to other docs which describe instance methods. you have to ctrl+click them. (cmd_click on mac I think) lemme make those public too
hamakn has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
<godd2>
there you go. and I think each method links to the ruby-docs page for that method
<zhando>
godd2: btw, i'm interested in a comprehensive list of those classes you don't need to require. it'd be great if builtin modules were illustrated as well but that's secondary..
chinmay_dd has quit [Quit: Leaving]
<zhando>
godd2: thanks again..
<godd2>
Everything in that list doesn't need to be required
lzx has joined #ruby
<godd2>
I was pretty thorough. I may have missed a couple maybe?
<godd2>
also, it helped me a lot to quiz myself on what the methods did
<zhando>
godd2: looks great to me. Wow that ctrl-click is neato..
crueber has quit [Quit: Leaving.]
Sawbones has quit [Remote host closed the connection]
<godd2>
You can File -> Make a Copy... for your own google drive
<zhando>
godd2: awesome document. That link goes in my bookmarks. Gracias..
agjacome has quit [Quit: leaving]
AmirolAhmad has joined #ruby
oo_ has joined #ruby
St_Marx has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby
D9 has joined #ruby
MasterPiece has joined #ruby
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jdj_dk has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
CrazyM4n has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
MasterPiece has joined #ruby
Zamyatin has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
josephndenton has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
MasterPiece has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
Zamyatin has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
basex has quit [Remote host closed the connection]
MasterPiece has joined #ruby
druznek has joined #ruby
agrinb has quit [Ping timeout: 258 seconds]
it0a has joined #ruby
it0a has quit [Client Quit]
asmodlol has quit [Ping timeout: 245 seconds]
pwnz0r has quit [Remote host closed the connection]
tkuchiki has joined #ruby
MasterPiece has quit [Ping timeout: 245 seconds]
asmodlol has joined #ruby
AndyBotwin has quit [Quit: Leaving]
nicolastarzia has joined #ruby
zorak_ has quit [Ping timeout: 272 seconds]
taylor_ has joined #ruby
chipotle has quit [Quit: cheerio]
taylor_ has quit [Killed (idoru (Spam is off topic on freenode.))]
Takle has joined #ruby
hgl- has joined #ruby
nicolastarzia has quit [Ping timeout: 255 seconds]
onlyme has joined #ruby
Abhijit has joined #ruby
hgl has quit [Ping timeout: 255 seconds]
hgl- is now known as hgl
hamakn has joined #ruby
Takle has quit [Ping timeout: 244 seconds]
asmodlol has quit [Ping timeout: 255 seconds]
asmodlol has joined #ruby
mjuszczak has joined #ruby
dts|pokeball has quit [Read error: Connection reset by peer]
Abhijit has quit [Ping timeout: 250 seconds]
agrinb has joined #ruby
Spami has joined #ruby
agrinb_ has joined #ruby
onlyme has quit [Quit: Be back later ...]
agrinb has quit [Ping timeout: 258 seconds]
agrinb_ has quit [Ping timeout: 245 seconds]
dts|pokeball has joined #ruby
druznek has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
mjuszczak has quit []
lzx has quit []
lzx has joined #ruby
makapa has joined #ruby
timonv_ has joined #ruby
psy has joined #ruby
timonv_ has quit [Remote host closed the connection]
xenomorph is now known as {xenomorph}
{xenomorph} is now known as xenomorph
yfeldblum has quit [Remote host closed the connection]
leafybasil has joined #ruby
atmosx has joined #ruby
ta has quit [Remote host closed the connection]
claptor has quit [Quit: this channel is bakas]
pu22l3r has joined #ruby
lzx has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 265 seconds]
makapa has left #ruby [#ruby]
leafybasil has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
kapil__ has joined #ruby
oo_ has quit [Ping timeout: 264 seconds]
amclain has quit [Quit: Leaving]
tkuchiki has quit [Remote host closed the connection]
antgel has joined #ruby
govg has quit [Ping timeout: 256 seconds]
basex has joined #ruby
atmosx has quit [Quit: computer went to sleep...]
jaequery has joined #ruby
p0wn3d_mhs has quit [Ping timeout: 250 seconds]
Dopagod has quit [Ping timeout: 245 seconds]
basex has quit [Ping timeout: 255 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
lzx has joined #ruby
decoponio has joined #ruby
i8igmac has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jamto11 has joined #ruby
onlyme has joined #ruby
hephaestus_rg has quit [Ping timeout: 258 seconds]
jamto11 has quit [Ping timeout: 258 seconds]
ohaibbq has quit [Quit: Leaving...]
<pontiki>
man, why is someone explicitly for my opinion on their style
Menorah has joined #ruby
CrazyM4n has quit [Quit: sleep]
lzx has quit [Remote host closed the connection]
yfeldblum has joined #ruby
asmodlol has quit [Ping timeout: 258 seconds]
lzx has joined #ruby
asmodlol has joined #ruby
Abhijit has joined #ruby
agrinb has joined #ruby
i8igmac has quit [Ping timeout: 264 seconds]
fantazo has joined #ruby
<j416>
pontiki: sounds like a good thing!
atmosx has joined #ruby
djbkd has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
blizzy has quit [Ping timeout: 264 seconds]
agrinb has quit [Ping timeout: 244 seconds]
djbkd has quit [Ping timeout: 255 seconds]
lzx_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
blizzy has joined #ruby
lzx has quit [Ping timeout: 244 seconds]
dts|pokeball has quit [Ping timeout: 245 seconds]
lkba_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
renderful has quit [Ping timeout: 258 seconds]
Jackneill has joined #ruby
startupality has joined #ruby
dx7iso has joined #ruby
dx7iso has quit [Client Quit]
rshetty has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
oo_ has joined #ruby
startupality has joined #ruby
duncan_ has quit [Ping timeout: 252 seconds]
MasterPiece has joined #ruby
dotix has joined #ruby
Liendre has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
MasterPiece has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
govg has joined #ruby
Takle_ has joined #ruby
oo_ has quit [Ping timeout: 265 seconds]
MasterPiece has joined #ruby
Takle has quit [Ping timeout: 265 seconds]
MasterPiece has quit [Max SendQ exceeded]
MasterPiece has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
davedev24_ has joined #ruby
MasterPiece has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
decoponio has quit [Ping timeout: 258 seconds]
MasterPiece has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
MasterPiece has joined #ruby
decoponio has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
asmodlol has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby
asmodlol has joined #ruby
MasterPiece has joined #ruby
luriv has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
agrinb has joined #ruby
jamto11 has joined #ruby
DadoCe has joined #ruby
MasterPiece has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
autochthon has joined #ruby
agrinb has quit [Ping timeout: 258 seconds]
hgl has quit [Max SendQ exceeded]
jamto11 has quit [Ping timeout: 258 seconds]
DadoCe has quit [Ping timeout: 272 seconds]
hgl has joined #ruby
ihme-TTilus is now known as TTilus
cmarques has joined #ruby
luriv has quit [Quit: Leaving]
oleo is now known as Guest96167
oleo__ has joined #ruby
Guest96167 has quit [Ping timeout: 265 seconds]
rkalfane has joined #ruby
oleo__ has quit [Read error: Connection reset by peer]
autochthon has quit [Quit: autochthon]
oleo__ has joined #ruby
oleo__ is now known as oleo
Abhijit has quit [Ping timeout: 272 seconds]
teotwaki has quit [Ping timeout: 265 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
teotwaki has joined #ruby
Soda has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
dextaa has quit [Quit: Leaving]
teotwaki has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
dotix has quit [Ping timeout: 245 seconds]
asmodlol has quit [Ping timeout: 244 seconds]
Takle_ has quit [Read error: No route to host]
asmodlol has joined #ruby
Takle has joined #ruby
hendricius has quit [Ping timeout: 245 seconds]
AxonetBE has joined #ruby
devdazed_ has joined #ruby
oo_ has quit [Remote host closed the connection]
hendricius has joined #ruby
nicolastarzia has joined #ruby
devdazed has quit [Ping timeout: 240 seconds]
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
AxonetBE has quit [Client Quit]
tombroomfield has quit [Read error: Connection reset by peer]
tombroom_ has joined #ruby
gfawcettpq has quit [Quit: Leaving.]
nicolastarzia has quit [Ping timeout: 264 seconds]
AmirolAhmad has quit []
charliesome has joined #ruby
devdazed_ has quit [Ping timeout: 258 seconds]
ishikawa91 has quit [Quit: Connection closed for inactivity]
druznek has quit [Ping timeout: 272 seconds]
raducroitoru has joined #ruby
cmarques has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
EasyCo has quit [Quit: Connection closed for inactivity]
dotix has quit [Ping timeout: 252 seconds]
basex has joined #ruby
pandaant has joined #ruby
yfeldblum has joined #ruby
basex has quit [Ping timeout: 245 seconds]
devdazed has joined #ruby
asmodlol has quit [Ping timeout: 255 seconds]
Takle has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
Takle has joined #ruby
elfuego has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
Liendre has quit [Read error: Connection reset by peer]
codecop has joined #ruby
kasperti_ has joined #ruby
tombroom_ has quit [Remote host closed the connection]
jamto11 has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Beoran__ has joined #ruby
rkalfane has joined #ruby
cmarques has joined #ruby
Xeago has joined #ruby
rkalfane has quit [Client Quit]
jamto11 has quit [Ping timeout: 258 seconds]
devdazed has quit [Ping timeout: 245 seconds]
TgMts has quit [Read error: Connection reset by peer]
Beoran_ has quit [Ping timeout: 265 seconds]
TgMts has joined #ruby
tombroomfield has joined #ruby
devdazed has joined #ruby
sergicles has joined #ruby
rkalfane has joined #ruby
Takle has quit [Read error: No route to host]
Takle_ has joined #ruby
<sergicles>
hi all, been battling with trying to install bundler (gem install bundler) on Yosemite… with —debug it looks like an SSL issue but this is the error I am getting, also tried with —source http (not https, same deal) : “ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2)
<apeiros_>
whichever is more interesting to talk about ;-)
<pontiki>
more broadly, doing some hacking on some personal stuff
jamto11 has joined #ruby
shadeslayer has quit [Ping timeout: 256 seconds]
shadeslayer has joined #ruby
josephndenton has quit [Ping timeout: 272 seconds]
hamakn has quit [Remote host closed the connection]
<pontiki>
like, i was an idiot when i wrote that, i know better now, so i should clean it up
TgMts has quit [Ping timeout: 244 seconds]
AxonetBE has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
AxonetBE has quit [Client Quit]
Guest50216 has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
DadoCe has joined #ruby
<apeiros_>
I find it interesting that so many people seem to experience that
<pontiki>
you don't?
<pontiki>
i think it's a natural aspect of continuous learning
<apeiros_>
I have some code like that too, but I don't think the majority of my code elicits it
<apeiros_>
well, I guess my nick is apt then :D
<apeiros_>
(one meaning of "apeiros" is "unteachable")
<pontiki>
i never confuse teaching with learning
diegoviola has joined #ruby
<apeiros_>
learning is the consequence of teaching, no? even if you teach yourself (actively or passively)
<pontiki>
perhaps i consider teaching to be deliberate
<apeiros_>
but yeah, that's just trying to save it :D
<apeiros_>
I don't consider the two to be equivalent either
<pontiki>
at any rate, it's fun
TgMts has joined #ruby
moritzs has joined #ruby
Spami_ has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
Spami has quit [Ping timeout: 272 seconds]
RikkiMongoose has quit [Quit: Leaving]
hamakn has joined #ruby
komanda3 has joined #ruby
davedev24_ has quit [Ping timeout: 258 seconds]
moritzs has quit [Remote host closed the connection]
klmlfl has joined #ruby
davedev24_ has joined #ruby
wolf4ood has quit [Quit: (null)]
moritzs has joined #ruby
asmodlol has quit [Ping timeout: 264 seconds]
Sawbones has joined #ruby
browndawg has joined #ruby
browndawg has left #ruby [#ruby]
asmodlol has joined #ruby
Flcn__ has joined #ruby
Techguy305 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
commmmodo has quit [Quit: commmmodo]
rshetty has joined #ruby
rahult has joined #ruby
Hanmac has quit [Ping timeout: 250 seconds]
AxonetBE has joined #ruby
Lingo___ has quit [Read error: Connection reset by peer]
luriv has joined #ruby
Lingo___ has joined #ruby
Flcn__ has quit [Ping timeout: 255 seconds]
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
Sawbones has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
Hanmac has joined #ruby
giuseppesolinas has quit [Client Quit]
Lingo_____ has joined #ruby
Xeago has joined #ruby
Xeago_ has joined #ruby
Lingo___ has quit [Read error: Connection reset by peer]
Lingo_____ has quit [Read error: Connection reset by peer]
Lingo_____ has joined #ruby
Lingo_____ has quit [Read error: Connection reset by peer]
Spami_ has quit [Quit: This computer has gone to sleep]
Lingo_____ has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
St_Marx has joined #ruby
Lingo_________ has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
krz has quit [Quit: WeeChat 1.0.1]
shuber_ has joined #ruby
Lingo_____ has quit [Ping timeout: 256 seconds]
St_Marx has quit [Client Quit]
St_Marx has joined #ruby
shuber_ has quit [Remote host closed the connection]
slick has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JBreit has joined #ruby
josephndenton has joined #ruby
JBreit has left #ruby [#ruby]
shuber_ has joined #ruby
raducroitoru has quit [Ping timeout: 255 seconds]
Hanmac has quit [Ping timeout: 272 seconds]
moritzs has quit [Remote host closed the connection]
slawrenc_ has joined #ruby
julieeharshaw has quit [Ping timeout: 245 seconds]
arya_ching has joined #ruby
Channel6 has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
klmlfl has quit [Remote host closed the connection]
julieeharshaw has joined #ruby
<Karunamon>
hm, so if you define an exception handler outside a bunch of functions (say they can all throw the same kind of failure you want to deal with), will a 'retry' inside that handler cause the original function to be called again?
<apeiros_>
Karunamon: note that "throw" exists in ruby and has nothing to do with exceptions. the term is "raise"
<Karunamon>
d'oh, getting my terminology mixed up again
<Karunamon>
but yes, raise
<apeiros_>
I suggest you paste up a simple example.
<Karunamon>
say, some kind of API authorization error that requires a reauth, at which point the code that raised the exception needs to try again
<apeiros_>
(and then, since you have the example, you can just try…)
<Karunamon>
eh, mostly I just want to know if I'm going to have to write one rescue block or 5
<gr33n7007h>
Will SystemCallError rescue a multitude of Errno:: errors?
Hanmac has joined #ruby
yfeldblum has joined #ruby
arya_ching has quit [Read error: No route to host]
<godd2>
gr33n7007h yes, just rescue on SystemCallError
shuber_ has quit [Remote host closed the connection]
Zai00 has joined #ruby
<gr33n7007h>
nice link too
yfeldblum has quit [Ping timeout: 244 seconds]
<godd2>
the googlefu is strong in this one
spastorino has quit [Quit: Connection closed for inactivity]
<apeiros_>
Karunamon: you have an empty begin/rescue part. I guess you want to move the api_authorize in there
_5kg has quit [Ping timeout: 250 seconds]
<apeiros_>
Karunamon: and to answer your question - set up a small example with demo methods and test
nicolastarzia has quit [Ping timeout: 272 seconds]
<gr33n7007h>
:)
agjacome has joined #ruby
<pontiki>
Karunamon: when would a begin-rescue defined in the Class context fire?
<Karunamon>
pontiki: if I understand this correctly, the exception would happen in the "do_stuff_with_api" function. It's not handled there, so it bubbles up one level, at which point it's rescued by the block defined above
kapil__ has quit [Quit: Connection closed for inactivity]
<pontiki>
the method defined within the rescue block itself?
<pontiki>
i don't even know how that's supposed to work...
<Karunamon>
any number of API calls could fail with an auth error (FYVM Google...), and that should be handled by re-authing and re-running the function that raised the exception in the first place
leafybasil has joined #ruby
julieeharshaw has quit [Ping timeout: 250 seconds]
mattmcclure has quit [Quit: Connection closed for inactivity]
leafybasil has quit [Remote host closed the connection]
Spami has joined #ruby
<pontiki>
i don't understand how that works in a Class context
pdlug has joined #ruby
<Karunamon>
me either :P
<pontiki>
shouldn't it be done during the instance context?
julieeharshaw has joined #ruby
rshetty has quit [Remote host closed the connection]
<Karunamon>
Well, my class is just a plugin container, basically. (Not sure if you're familiar with Cinch, it looks something like this: https://github.com/cinchrb/cinch#plugins)
<pontiki>
yeah, a bigt
<pontiki>
bit*
<Karunamon>
I never actually instantiate the class myself, it's done by this library,
<pontiki>
nevertheless, wouldn't the exception occur while running the code in an instance?
<Karunamon>
yes, absolutely
<pontiki>
then i don't see how it could be defined in the class context, and the methods only defined during the rescue phase
<pontiki>
i obviously do not understand something...
<apeiros_>
class level code is just code. it works the same way as method level code works.
<apeiros_>
or as top level code works
<Karunamon>
so where are exceptions handled, at the class level, at the method level, or both?
<pontiki>
so it runs at every instance?
<apeiros_>
the only differences are in the way lookups work (self/ivar, constants, lvars, def's)
<apeiros_>
Karunamon: at the level of your code
<apeiros_>
instance/class/etc is unrelated to that
<pontiki>
well, okay, when will it run?
haxr has quit [Read error: Connection timed out]
<Karunamon>
the function?
<pontiki>
i thought it would only run when the class is evaluated
haxr has joined #ruby
<Karunamon>
which will happen when the library instantiates my class
<Karunamon>
via initilization
haxr has quit [Max SendQ exceeded]
<Karunamon>
so that instance of the class now has an API session bound to it
<pontiki>
it seems unlikely an API::Authorization error would be happening while the class is being loaded
<apeiros_>
class level code is run when the class is evaluated
<Karunamon>
unless my API token got revoked or something
<Karunamon>
which shouldn't happen, but I need to deal with it if it does
haxr has joined #ruby
<apeiros_>
place some `puts` statements and see
<pontiki>
right, not when an object of that class is instantiated
haxr has quit [Max SendQ exceeded]
<apeiros_>
def, proc and blocks are the only deferred pieces of code
haxr has joined #ruby
<apeiros_>
the other code runs all immediately
haxr has quit [Max SendQ exceeded]
Takle_ has quit [Remote host closed the connection]
<Karunamon>
the moment you create a new instance of the class
<Karunamon>
right/
haxr has joined #ruby
<pontiki>
ok, i have to try this
* Karunamon
is doing the same
Flcn__ has joined #ruby
havenwood has joined #ruby
<apeiros_>
blocks also only defer if the method you pass it to doesn't immediately yield
<pontiki>
right
conniemj__ has joined #ruby
<pontiki>
so, again, the likelihood of there being an API::Authorization failure during the class definition phase seems highly unlikely, in which case the other methods never get defined
<apeiros_>
class body being ordinary code is what allows things like attr_reader to be code
<Karunamon>
I don't understand this explanation.. class Foo; bar = 1; end. bar=1 gets evaluated and "exists" even though Foo hasn't been instantiated yte?
<Mon_Ouie>
Yes, that code is *only* run once when you create the class, and not when you instantiate it
<apeiros_>
atmosx: `->(*args) { …code… }` is alternative syntax for `lambda { |*args| …code… }`
<atmosx>
oh
<apeiros_>
shevy: not if all your code looks like that!
<shevy>
hehehe
<atmosx>
I need to get a better grip of yield, lambda and more advanced ruby techniques. I have the PickAxe 1.9, maybe it's time for me to read the entire thing... I used as reference up until now.
<apeiros_>
atmosx, allen: btw., if you split and only care for the first N results, pass a second arg to split. that allows it to stop processing. -> str.split(sep, 2)[0]
jcdesimp has joined #ruby
shuber_ has joined #ruby
oo_ has quit [Ping timeout: 244 seconds]
phutchins has joined #ruby
<atmosx>
apeiros_: thanks for the hin
<atmosx>
t
mantas322 has quit [Quit: Page closed]
Jet4Fire has quit []
<atmosx>
apeiros_: I'm trying to create a client-server application. I'd like the server to act as a standard linux service. God is the safest bet when it comes to ruby?
<apeiros_>
hm? god is there to control daemons. that's unrelated to your app being a server.
Takle has joined #ruby
<shevy>
lol
<shevy>
is this philosophical
<shevy>
I'm gonna send my angels to counter your daemons!
<majeure>
Installing gentoo on this macbook is going to be a pain.
Takle has quit [Remote host closed the connection]
<shevy>
Installing gentoo is going to be a pain.
<apeiros_>
shevy: god controls your unicorn which is a daemon
hamakn has quit [Remote host closed the connection]
<apeiros_>
only in ruby
<shevy>
yeah
<shevy>
ponicorns
<majeure>
I suppose I would've been mildly satisfied with archlinux.
* majeure
ponders the situation.
Ancient has left #ruby ["Leaving"]
shock_one has joined #ruby
aswen has joined #ruby
<atmosx>
apeiros_: so I must fork / exec and Process.detach?
<apeiros_>
if you target newer rubies, there's Process.daemon
atmosx_ has joined #ruby
it0a has joined #ruby
LouisRoR has joined #ruby
<ght>
Anyone recommend any good gems to add reporting functionality to your app?
<ght>
Something a little more robust than the standard logger?
<apeiros_>
in what regard is stdlib's logger not robust?
<atmosx_>
ght: what's wrong witht he standard logger?
atmosx has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
wpp has joined #ruby
Channel6 has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Ping timeout: 264 seconds]
Zamyatin has joined #ruby
<ght>
Which logger do you use? Right now I'm using the "logger" gem.
<ght>
Looks like "logging" is an opion as well
Asher has quit [Quit: Leaving.]
<waxjar>
i believe it's good practice to just log to STDOUT and have a specialised tool handle storing, rotating, etc.
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
<ght>
Really? Ok.
<apeiros_>
no answer to the question, I see…
<ght>
I hadn't heard that, right now I"m using logger for writing app logs and it's working great.
dangerousdave has joined #ruby
<ght>
apeirois_ Well, to begin with, I"m trying to determine how the hell to delete the header from the log file that is auto-generated.
<apeiros_>
oh wow dude, impressive how you misspell my nick
<apeiros_>
you know that about all irc clients can tab complete nicks, right?
<ght>
Also, for reporting in our app, I'll pobably be writing to CSV, but it would be interesting if a logger could suport CSV / XLS, what have you.
<waxjar>
sounds french now :p
<wasamasa>
aperiross: don't worry, someone else will do even worse
<ght>
apeiros_ : apologies for the high offense.
<apeiros_>
wasabima: I've stopped thinking I had seen it all
<ght>
Sounds like this isn't the first time.
basex has quit [Remote host closed the connection]
<apeiros_>
not sure how headers are about robustness, but well.
<wasamasa>
thg: It's never the first time
basex has joined #ruby
<ght>
Regardless, forget reporting; what gem do you guys prefer for general logging functionality? Or do you not use a specific gem?
<waxjar>
the standard logger library allows you to log in a custom format, no?
<atmosx_>
ght: the default logger is great, but I'm positive that logger doesn't output to CSV. You might want to use logger library for debugging and CSV library to generate logs that match your requirements though.
<ght>
So the Logger.new() method is built-in these days, and doesn't require a gem? I must have been reading an old stackoverflow article when I set that up.
<apeiros_>
Logger is stdlib. that's not built-in. it still needs a require. but it doesn't need an additional gem.
<ght>
atmosx_: I read that last stackoverflow article, I was going to paste that earlier, if you'll notice it the question is four years old, didn't know if the information was still relevant.
<apeiros_>
(unless you use a package manager which manages to split ruby up in a new fancy way)
<atmosx_>
ght: you can still monkey-patch though
<ght>
So it's still valid, ok.
<ght>
Thank you.
<atmosx_>
no worries, good night (everyone)
atmosx_ has quit [Quit: Let him that would move the world first move himself. - Socrates]
dangerousdave has quit [Read error: No route to host]
<shock_one>
atomi: you can pass a file handler to the standard logger, and modify its output format to be CSV.
<shock_one>
atmosx_, I mean ↑
basex has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
Hobogrammer has joined #ruby
dangerou_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
mary5030 has joined #ruby
shuber_ has quit [Remote host closed the connection]
dc_ has joined #ruby
komanda3 has quit [Ping timeout: 245 seconds]
dangerou_ has quit [Read error: Connection reset by peer]
<ght>
While we're on the topic, any clue if it's possible to use variables in the filename path of a logger?
<ght>
The standard string #{varname} isn't working.
<bradland>
Using double quotes?
djbkd has joined #ruby
wallerdev has joined #ruby
haxr has quit [Read error: Connection timed out]
<shock_one>
ght: come on, it's a regular string. You can do any string operations with it.
<bradland>
ght: strings are strings. they’re interpolated regardless of what class you pass them to. provided you use double-quotes, and provided no library you’re using has badly mangled String, you can use standard variable expansion.
sinkensabe has quit [Ping timeout: 250 seconds]
haxr has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
<ght>
bradland: That did it, thank you. Had a bit of a brain fart there.
decoponio has quit [Quit: Leaving...]
haxr has quit [Max SendQ exceeded]
sinkensabe has joined #ruby
shuber_ has joined #ruby
Techguy305 has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
haxr has joined #ruby
hephaestus_rg has joined #ruby
wpp has quit []
haxr has quit [Max SendQ exceeded]
MartynKeigher has quit [Ping timeout: 244 seconds]
haxr has joined #ruby
MartynKeigher has joined #ruby
stunder has quit [Ping timeout: 258 seconds]
haxr has quit [Max SendQ exceeded]
lkba has quit [Ping timeout: 255 seconds]
elaptics is now known as elaptics`away
havenwood has joined #ruby
haxr has joined #ruby
AndyBotwin has quit [Read error: Connection reset by peer]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
lkba has joined #ruby
Flcn__ has joined #ruby
pygospa has quit [Ping timeout: 272 seconds]
shuber_ has quit [Remote host closed the connection]
crack_user has joined #ruby
pygospa has joined #ruby
oo_ has joined #ruby
DadoCe has quit [Remote host closed the connection]
DadoCe has joined #ruby
hvid has joined #ruby
psy has joined #ruby
oo_ has quit [Ping timeout: 264 seconds]
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
basex has joined #ruby
sinkensabe has quit [Ping timeout: 255 seconds]
shuber_ has joined #ruby
comm64 has joined #ruby
jamto11 has quit []
Flcn__ has quit [Quit: Be back later ...]
DadoCe has quit [Ping timeout: 252 seconds]
Azure has joined #ruby
MartynKeigher has quit [Quit: Leaving]
MartynKeigher has joined #ruby
sinkensabe has joined #ruby
shuber_ has quit [Remote host closed the connection]
ptrrr has joined #ruby
psy has quit [Ping timeout: 245 seconds]
keen__________16 has joined #ruby
keen__________15 has quit [Ping timeout: 244 seconds]
Asher has joined #ruby
Soda has joined #ruby
<apeiros_>
anybody want to give a shot at optimizing performance of something which is used in tight loops?
<apeiros_>
v1 is what I currently have, but it can't deal with composite inputs, i.e. casters which consume more than just 1 value
<apeiros_>
so for the input [1,2,3,4,5,"USD",7,8,"USD"], I want the output [1,2,3,4,[5,"USD"],7,[8,"USD"]] (technically, I want the blocks be called with that as arguments)
asmodlol has joined #ruby
Sawbones has joined #ruby
CrazyM4n has quit [Quit: going to eat food]
giuseppesolinas has joined #ruby
Sawbones has quit [Ping timeout: 250 seconds]
<comm64>
say a variable can be set to true or false by something other than me, and I want to be able to check the value of the variable, how would I do that? I looked into how ruby does exist? and is_a? but not much help.
<apeiros_>
comm64: you use the name of variable
<apeiros_>
if @your_var == true …; if @your_var == false; …
<comm64>
I want to be able to call it as a method like variable.value? so I tried def value?; unless variable == false; return true; end; end; but it doesnt work
<apeiros_>
variables are not objects
<apeiros_>
.value? would have to be defined on the object which you assign to the variable.
<comm64>
I thught everything is an object
<apeiros_>
you thought wrong
sinkensabe has quit [Read error: Connection reset by peer]
<comm64>
then why does everybody say in ruby everything is an object?
<bradland>
comm64: before going down this path, you should look in to how values eval true/false in ruby
<apeiros_>
because it's approximately true
<comm64>
they should say everlthing has the potential to be an object
<bradland>
if you find yourself using the literal comparison `variable == true` or `variable == false`, you have probably arrived at a place you don’t want to be
<apeiros_>
that'd not be more correct
<apeiros_>
almost everything is an object
<apeiros_>
and almost everything which is not an object to begin with, can be turned into an object
fantazo has joined #ruby
<comm64>
bradland: pls explain
<bradland>
you can normally use the variable directly in the conditional, because of how ruby evals in a true/false context
Dopagod has quit [Read error: Connection reset by peer]
haxr has joined #ruby
basex has quit [Remote host closed the connection]
haxr has quit [Max SendQ exceeded]
basex has joined #ruby
<havenwood>
A}|||||A\
Spami has joined #ruby
<bradland>
writing some brainfuck havenwood?
haxr has joined #ruby
<havenwood>
cleaning the keyboard, sorry about that!
<bradland>
indistinguishable from bf :)
Deele has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
startupality has joined #ruby
ta has joined #ruby
<bradland>
comm64: if it’s possible, pastie some context and someone can provide suggestions on a good way to test/structure the conditional for the case you’re examining
<comm64>
back from irb with this...maybe someone can tell me if it is rubyish enough or not
Timgauthier has joined #ruby
byprdct has joined #ruby
<bradland>
with… ?
<comm64>
a = true; if a.inspect == "true"; puts "value of a is true" end
dc_ has quit [Remote host closed the connection]
<apeiros_>
comm64: can a only be true or false?
<comm64>
yes
<apeiros_>
if a; puts "true"; else; puts "false"; end
byprdct has quit [Read error: Connection reset by peer]
<apeiros_>
inspect is for developers to inspect an object during development (hence the name)
<bradland>
you don’t need the literal comparison there
<bradland>
as apeiros_ pointed out, you can place a directly in the conditional
<bradland>
you don’t care if it is literally “true”, you only care if it evaluates true
<comm64>
yes
<comm64>
enlightening
dionysus69 has quit [Ping timeout: 240 seconds]
<comm64>
I thank you much
<apeiros_>
and if you care whether it is not just logically true, but really the value true, compare it directly. don't go via its string representation.
<apeiros_>
if a == true …
basex has quit [Remote host closed the connection]
Timgauthier has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haxr has quit [Read error: Connection reset by peer]
amundj has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
maestrojed has joined #ruby
bronson has quit [Client Quit]
sinkensabe has quit [Remote host closed the connection]
bronson has joined #ruby
kirun has quit [Quit: Client exiting]
randiman has joined #ruby
Sawbones has joined #ruby
codecop has quit [Remote host closed the connection]
mjuszczak has quit []
basex has quit [Remote host closed the connection]
Vile` has quit [Remote host closed the connection]
Sawbones has quit [Ping timeout: 244 seconds]
tvw has quit []
Vile` has joined #ruby
ta_ has quit [Remote host closed the connection]
SparkMasterTape has joined #ruby
elfuego has joined #ruby
startupality has joined #ruby
Menorah has quit [Quit: This computer has gone to sleep]
djbkd has quit [Quit: My people need me...]
AndyBotwin has joined #ruby
AndyBotwin has quit [Changing host]
AndyBotwin has joined #ruby
gsd has joined #ruby
basex has joined #ruby
gsd has quit [Client Quit]
djbkd has joined #ruby
gsd has joined #ruby
mjuszczak has joined #ruby
basex has quit [Remote host closed the connection]
ta_ has joined #ruby
basex has joined #ruby
claw__ has quit [Ping timeout: 265 seconds]
<Karunamon>
Ok, I need to run this idea by somebody
<Karunamon>
i'm hitting a metacritic API that doesn't give me access to the aggregate user score
<Karunamon>
but it does say how many of each positive/mixed/negative reviews there are
Azure has quit [Quit: My MBP went to sleep.]
timonv_ has joined #ruby
<Karunamon>
Each review is 1-100, so if I were to say mutliply the number of + reviews by 100, middling reviews by 50, and negative reviews by zero, sum that number up, and divide by the number of reviews
frem has joined #ruby
djbkd has quit [Ping timeout: 252 seconds]
<Karunamon>
would I have something resembling a reasonably accurate 0-10 rating of whatever title? I tried it a couple of times and it only ended up being off by .1-.2 from what the site actually says, just wondering if there are any edge cases i'm missing
Menorah has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
shock_one has quit [Remote host closed the connection]
yfeldblum has joined #ruby
yfeldblu_ has joined #ruby
asmodlol has quit [Ping timeout: 245 seconds]
basex has quit [Remote host closed the connection]
iamjarvo has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mjuszczak has quit []
yfeldblum has quit [Ping timeout: 240 seconds]
asmodlol has joined #ruby
Pupeno has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
Musashi007 has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
shuber_ has joined #ruby
mjuszczak has joined #ruby
startupality has quit [Quit: startupality]
AndyBotwin has quit [Read error: Connection reset by peer]
AndyBotwin has joined #ruby
shuber_ has quit [Ping timeout: 272 seconds]
hanmac1 has joined #ruby
gusto has quit [Quit: Leaving]
randiman has quit [Quit: (null)]
Spami has quit [Quit: This computer has gone to sleep]
mjuszczak has quit []
Hanmac has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
az7ar_away has joined #ruby
Menorah has quit [Quit: This computer has gone to sleep]