havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
hahuang65 has joined #ruby
selim has joined #ruby
sanscoeur has quit [Ping timeout: 248 seconds]
zapata has quit [Ping timeout: 252 seconds]
jxv has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jxv has quit [Client Quit]
cschneid_ has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 260 seconds]
jxv has joined #ruby
xelkarin has quit [Quit: WeeChat 1.9.1]
DTZUZO has quit [Quit: WeeChat 2.0]
pastorinni has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
guacamole has joined #ruby
guacamole has quit [Client Quit]
zapata has joined #ruby
guacamole has joined #ruby
k0mpa has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
k0mpa has quit [Remote host closed the connection]
k0mpa has joined #ruby
Noisy has joined #ruby
Mekkis has quit [Quit: ZNC - http://znc.in]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mekkis has joined #ruby
goatish has joined #ruby
jamiejackson has joined #ruby
Inoperable has joined #ruby
Miron has quit [Ping timeout: 276 seconds]
zapata_ has joined #ruby
banisterfiend has joined #ruby
dizzy1or5[m] has quit [Ping timeout: 276 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Ping timeout: 276 seconds]
znz_jp has quit [Ping timeout: 276 seconds]
jonjits[m]1 has quit [Ping timeout: 276 seconds]
nyuszika7h has quit [Ping timeout: 276 seconds]
S007 has quit [Ping timeout: 276 seconds]
endemic has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
dizzy1or5[m] has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
alfiemax has joined #ruby
elphe has joined #ruby
headius has quit [Ping timeout: 240 seconds]
m0x00 has quit [Ping timeout: 240 seconds]
headius has joined #ruby
znz_jp has joined #ruby
nyuszika7h has joined #ruby
jonjits[m]1 has joined #ruby
Miron has joined #ruby
m0x00 has joined #ruby
marr has quit [Ping timeout: 248 seconds]
endemic has joined #ruby
S007 has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
Noisy has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
troys_ is now known as troys
jxv has quit [Quit: zzz…]
Miron has quit [Ping timeout: 276 seconds]
guacamole has joined #ruby
S007 has quit [Ping timeout: 276 seconds]
Troy2 has joined #ruby
guacamole has quit [Client Quit]
pastorinni has joined #ruby
alfiemax has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
Miron has joined #ruby
S007 has joined #ruby
Troy2 has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
pastorinni has quit [Remote host closed the connection]
John___ has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
l_tonz has quit [Ping timeout: 248 seconds]
r4z3r has joined #ruby
bmurt has joined #ruby
ResidentBiscuit has joined #ruby
orbyt_ has joined #ruby
l_tonz has joined #ruby
jamiejackson has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
Algebr has joined #ruby
<troydm> I might be dumb, but I open3 a cat command and trying to feed stdin to it but I keep weird behaviour with stderr, because it blocks read_nonblock
<Algebr> anyone here going to the ruby thing tonight in SF?
<Algebr> havenwood: going to SF thing?
<havenwood> Algebr: I'm in LA at the moment
<havenwood> Algebr: Otherwise I would be!
<Algebr> ah
k0mpa has quit [Remote host closed the connection]
cdg_ has quit [Ping timeout: 256 seconds]
vhvv has joined #ruby
vhvv has quit [Client Quit]
l_tonz has quit [Ping timeout: 276 seconds]
Zamyatin has joined #ruby
guacamole has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
guacamole has quit [Client Quit]
s3nd1v0g1us has joined #ruby
ResidentBiscuit is now known as jready
SeepingN has quit [Quit: The system is going down for reboot NOW!]
guacamole has joined #ruby
jeffreylevesque has quit [Remote host closed the connection]
eckhardt has joined #ruby
jeffreylevesque has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
guacamole has quit [Client Quit]
cdg has joined #ruby
Algebr has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
hahuang65 has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
drewmcmillan has joined #ruby
ta_ has joined #ruby
alfiemax has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 276 seconds]
r4z3r has quit [Quit: Textual IRC Client: www.textualapp.com]
jnollette has quit [Ping timeout: 272 seconds]
k0mpa has joined #ruby
jnollette has joined #ruby
troys is now known as troys_
n0m4d1c has joined #ruby
steveh7 has joined #ruby
shinnya has joined #ruby
<ramfjord> What's this ruby thing in SF tonight??
cdg has joined #ruby
<ramfjord> havenwood: do you have a link for it? Seems Algebr is offline
<ramfjord> ty for the link!
Azure|dc is now known as Azure
<havenwood> np!
hahuang65 has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 276 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has quit [Ping timeout: 276 seconds]
l_tonz has joined #ruby
ta__ has joined #ruby
SuperLag has joined #ruby
l_tonz has quit [Ping timeout: 264 seconds]
kinduff has quit [Quit: gg]
steveh7 has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 248 seconds]
jready has quit [Remote host closed the connection]
jready has joined #ruby
gizmore has joined #ruby
brianpWins has joined #ruby
mjolnird has quit [Remote host closed the connection]
AJA4350 has quit [Quit: AJA4350]
jready has quit [Ping timeout: 246 seconds]
gizmore|2 has quit [Ping timeout: 264 seconds]
Hexian has quit [Ping timeout: 260 seconds]
troys_ is now known as troys
ramfjord has quit [Ping timeout: 256 seconds]
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
alfiemax has joined #ruby
guacamole has joined #ruby
guacamole has quit [Client Quit]
marxarelli is now known as marxarelli|afk
govg has quit [Ping timeout: 248 seconds]
chocoelho has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
chocoelho has quit [Client Quit]
pastorinni has joined #ruby
cdg has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
elphe has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
l_tonz has joined #ruby
ta__ has quit [Ping timeout: 265 seconds]
vhvv has joined #ruby
ta_ has joined #ruby
bronson has joined #ruby
vhvv has left #ruby [#ruby]
alfiemax has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
troys is now known as troys_
safetypin has joined #ruby
l_tonz has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
l_tonz has joined #ruby
kies has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has quit [Quit: tempusfugit]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l_tonz has quit [Ping timeout: 260 seconds]
justicefries has joined #ruby
pilne has quit [Quit: Quitting!]
safetypin has quit [Quit: ZZZzzz…]
mjolnird has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 276 seconds]
ta_ has quit [Ping timeout: 264 seconds]
Azure has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
darkhanb has joined #ruby
hahuang65 has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tfitts has quit [Quit: Connection closed for inactivity]
ta_ has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
pastorinni has quit [Remote host closed the connection]
bmurt has joined #ruby
KrzaQ has quit [Quit: :(]
zwliew has joined #ruby
KrzaQ has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
uZiel has joined #ruby
govg has joined #ruby
elphe has joined #ruby
<banisterfiend> anyone here?
chridal has quit [Ping timeout: 256 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chridal has joined #ruby
alfiemax has joined #ruby
l_tonz has joined #ruby
elcontrastador has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DmitryBochkarev has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
alfiemax has quit [Ping timeout: 248 seconds]
troys_ is now known as troys
bmurt has joined #ruby
<Radar> yues
ta_ has joined #ruby
elphe has quit [Ping timeout: 260 seconds]
megamosaren has joined #ruby
elphe has joined #ruby
justicefries has joined #ruby
justicefries has quit [Client Quit]
KeyJoo has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
Zamyatin has joined #ruby
kies has joined #ruby
Zamyatin has quit [Client Quit]
gix has joined #ruby
gix- has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
mikecmpbll has joined #ruby
iamarun has joined #ruby
mikecmpbll has quit [Client Quit]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
ta_ has joined #ruby
jtdoncas has quit [Ping timeout: 255 seconds]
troys is now known as troys_
troys_ is now known as troys
l_tonz has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
jtdoncas has joined #ruby
aupadhye has joined #ruby
aupadhye is now known as aupadhye|meeting
aupadhye|meeting is now known as aupadhye
za1b1tsu has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
zapata_ is now known as zapata
hahuang65 has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
megamosaren has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
Puffball has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
apeiros has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 260 seconds]
brianpWins has quit [Quit: brianpWins]
elphe has quit [Ping timeout: 268 seconds]
iamarun has quit [Ping timeout: 256 seconds]
iamarun has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
jenrzzz has joined #ruby
oetjenj has quit [Client Quit]
ur5us has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
troys is now known as troys_
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
jamesaxl has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
quobo has joined #ruby
oetjenj has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has quit [Client Quit]
troys_ is now known as troys
LocaMocha has joined #ruby
dinfuehr has quit [Ping timeout: 255 seconds]
dinfuehr has joined #ruby
elphe has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
rabajaj has joined #ruby
anisha has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
oleo has quit [Quit: Leaving]
ta_ has joined #ruby
elphe has quit [Ping timeout: 264 seconds]
alfiemax has quit [Remote host closed the connection]
apeiros has joined #ruby
mikhael_k33hl has joined #ruby
<mikhael_k33hl> Tried running rubocop on my rb file to check. I'm getting this Missing top-level module documentation comment. module FileOps warning. What does this mean?
<apeiros> mikhael_k33hl: I assume it means that you didn't document that module
elphe has joined #ruby
<mikhael_k33hl> apeiros: Uhhhm how do I document it? using comments?
Asher has quit [Quit: Leaving.]
<apeiros> yes. see rdoc or yard.
<mikhael_k33hl> apeiros: okay I'll take a look at it
<mikhael_k33hl> thanks
alfiemax has joined #ruby
megamosaren has joined #ruby
Asher has joined #ruby
darkhanb has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
darkhanb has quit [Client Quit]
megamosaren has quit [Ping timeout: 276 seconds]
drewmcmillan has joined #ruby
drewmcmillan has quit [Client Quit]
bronson has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
dionysus69 has joined #ruby
phaul has joined #ruby
jtdoncas has quit [Ping timeout: 248 seconds]
darkhanb has joined #ruby
Puffball has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
sundhell_away is now known as sundhell
zwliew has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
Asher has quit [Quit: Leaving.]
ramfjord has quit [Ping timeout: 248 seconds]
za1b1tsu has quit [Remote host closed the connection]
Asher has joined #ruby
LenPayne has quit [Ping timeout: 268 seconds]
sundhell is now known as sundhell_away
LenPayne has joined #ruby
roshanavand has joined #ruby
sundhell_away is now known as sundhell
jtdoncas has joined #ruby
zwliew has joined #ruby
troys has quit [Quit: Bye]
<mikhael_k33hl> Regarding Logging, can someone refer me to an article pertaining ruby's best practice about it? or are you guys using a gem?
jtdoncas has quit [Ping timeout: 248 seconds]
<apeiros> mikhael_k33hl: logger is part of stdlib
<apeiros> best practices depend highly on your use-case
<mikhael_k33hl> apeiros: currently reading about it: http://rubylearning.com/satishtalim/ruby_logging.html
jtdoncas has joined #ruby
<apeiros> f.ex. part of 12factor apps is to not log to files at all
<apeiros> in a server application which runs in multiple processes and threads, you should make PID and Thread-ID part of what you emit (rails terribly fails at that)
<mikhael_k33hl> apeiros: so just output it on standard output?
<apeiros> mikhael_k33hl: again, depends on your use-case.
<apeiros> as with most things in programming, there's no silver bullet. no one true answer.
<mikhael_k33hl> apeiros: Hmm so it would be best to create the Log Object on a module and just include it on every class that I need logging capabilities right?
<mikhael_k33hl> oh or just create a global variable
ta_ has quit [Ping timeout: 248 seconds]
<apeiros> I prefer constants over globals
hahuang65 has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
jtdoncas has quit [Ping timeout: 248 seconds]
<apeiros> and I'd probably prefer a class method over a constant to access the logger
<apeiros> e.g. YourApp.logger
andikr has joined #ruby
madhatter has quit [Quit: Lost terminal]
<dminuoso> apeiros: constants _are_ globals.
conta has joined #ruby
<dminuoso> The only difference is that $ gvars dont have namespacing, so I guess that makes constants a little more organizeable.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
<dminuoso> Though I guess there's that bit about private_constant, but oh well - out of all the gems I have installed, only concurrent-ruby actually makes use of it.
ta_ has joined #ruby
iamarun has quit [Remote host closed the connection]
<apeiros> dminuoso: no, they are globally visible. they are not globals. yes, the distinction matters.
iamarun has joined #ruby
<apeiros> and correct, the namespacing is the relevant feature. Foo != Foo depending on your Module.nesting
<apeiros> whereas $foo is always == $foo
<dminuoso> apeiros: what exactly is the difference between a globally visible variable and a global variable then?
<apeiros> (meaning the variable, not the ref'd obj)
<apeiros> ^
<dminuoso> apeiros: That's just language ergonomics. private_constant aside, constants are global variables. Foo == Foo always. The thing is, just imagine you never used relative constant names, but always fully qualify them.
<dminuoso> Say ::Foo::Bar::Quux
<apeiros> in short: the difference is that the name alone is not identifying the constant.
<dminuoso> apeiros: It absolutely is.
<apeiros> if you fully qualify it, yes
<apeiros> if not, context is part of the identification.
<apeiros> same as other variables.
<apeiros> by your logic, any globally reachable variable is a global.
<dminuoso> Yes.
<dminuoso> Precisely.
<dminuoso> That is the very definition of a global variable.
<apeiros> then the distinction doesn't matter and why do we use terminology anyway? :-p
<apeiros> I can reach ivars globally too
<apeiros> if I have enough identifying information
kapil___ has quit [Quit: Connection closed for inactivity]
<dminuoso> You dont need identifying information.
<apeiros> and "enough identifying information" = "stuff beyond the bare name"
<dminuoso> And realistically yes.
<dminuoso> Because you have ObjectSpace.
<apeiros> and "fully qualified" = "stuff beyond the bare name"
<apeiros> so sorry, but IMO your reason is pointless.
<apeiros> ObjectSpace requires identifying information too
<apeiros> e.g. an object id for _id2ref
* apeiros shall henceforth call an @ivar an @diminuoso_global ;-p
<apeiros> -i
<apeiros> no tabcomplete with @ :<
elphe has quit [Ping timeout: 276 seconds]
l_tonz has quit [Remote host closed the connection]
Chuguniy has joined #ruby
TomyWork has joined #ruby
elphe has joined #ruby
mark_66 has joined #ruby
madhatter has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
elphe has quit [Ping timeout: 265 seconds]
elphe has joined #ruby
ta_ has joined #ruby
jtdoncas has joined #ruby
drewmcmillan has joined #ruby
jtdoncas has quit [Ping timeout: 255 seconds]
QualityAddict has quit [Ping timeout: 264 seconds]
iamarun has quit [Ping timeout: 268 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
elphe has quit [Ping timeout: 248 seconds]
jameser has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
eckhardt has joined #ruby
iamarun has joined #ruby
amatas has joined #ruby
jtdoncas has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
Chuguniy has quit [Ping timeout: 248 seconds]
l_tonz has joined #ruby
claudiuinberlin has joined #ruby
InfinityFye has joined #ruby
Chuguniy has joined #ruby
marr has joined #ruby
InfinityFye has left #ruby [#ruby]
jtdoncas has quit [Ping timeout: 268 seconds]
anisha has quit [Quit: Leaving]
elphe has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
guille-moe has joined #ruby
dinfuehr has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
elphe has quit [Ping timeout: 248 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 248 seconds]
VladGh_ has joined #ruby
vtx has joined #ruby
bronson has joined #ruby
VladGh has quit [Ping timeout: 268 seconds]
iamarun has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 240 seconds]
iamarun has joined #ruby
iamarun has quit [Remote host closed the connection]
livcd has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
ramfjord has joined #ruby
livcd has joined #ruby
surrounder has quit [Quit: WeeChat 1.9.1]
Beams has joined #ruby
jtdoncas has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
anisha has joined #ruby
surrounder has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
iamarun has joined #ruby
MrBusiness3 has quit [Ping timeout: 265 seconds]
MrBusiness has joined #ruby
dviola has joined #ruby
l_tonz has joined #ruby
DmitryBochkarev has quit [Ping timeout: 248 seconds]
guardianx has joined #ruby
biberu has joined #ruby
alfiemax has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
surrounder has quit [Quit: WeeChat 2.0.1]
surrounder has joined #ruby
randomstrangerb has quit [Ping timeout: 240 seconds]
randomstrangerb has joined #ruby
hahuang65 has joined #ruby
Axy has quit [Read error: Connection reset by peer]
ana_ has joined #ruby
Axy has joined #ruby
jnollette has quit [Remote host closed the connection]
iamarun has quit [Remote host closed the connection]
guardianx has quit []
jnollette has joined #ruby
DaniG2k has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
iamarun has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
jtdoncas has joined #ruby
DaniG2k has quit [Quit: leaving]
jtdoncas has quit [Ping timeout: 268 seconds]
Cavallari has joined #ruby
Cavallari has quit [Client Quit]
vichib has quit [Remote host closed the connection]
tomphp has joined #ruby
alex`` has joined #ruby
vdl has quit [Ping timeout: 240 seconds]
iamarun has quit [Remote host closed the connection]
iamarun has joined #ruby
jaruga has joined #ruby
modin has quit [Ping timeout: 256 seconds]
immune has quit [Ping timeout: 265 seconds]
alex`` has quit [Quit: WeeChat 1.9]
alex`` has joined #ruby
tvw has joined #ruby
jtdoncas has joined #ruby
jottr_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cdg has quit [Remote host closed the connection]
milardovich has joined #ruby
alfiemax_ has joined #ruby
ldnunes has joined #ruby
jtdoncas has quit [Ping timeout: 265 seconds]
Tempesta has joined #ruby
uZiel_ has joined #ruby
uZiel has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
modin has joined #ruby
ur5us has quit []
miskatonic has joined #ruby
l_tonz has joined #ruby
jtdoncas has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
iamarun has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
immune has joined #ruby
l_tonz has quit [Ping timeout: 276 seconds]
Riddell has quit [Ping timeout: 265 seconds]
alfiemax has quit [Ping timeout: 268 seconds]
iamarun has joined #ruby
Riddell has joined #ruby
uZiel_ has quit [Quit: Lost terminal]
jtdoncas has joined #ruby
roshanavand has left #ruby [#ruby]
miskatonic has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 252 seconds]
miskatonic has joined #ruby
uZiel has joined #ruby
huyderman has quit [Read error: Connection reset by peer]
huyderman has joined #ruby
bronson has joined #ruby
sja has joined #ruby
jameser has quit [Ping timeout: 276 seconds]
milardovich has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 260 seconds]
ldnunes has quit [Remote host closed the connection]
ldnunes has joined #ruby
sundhell is now known as sundhell_away
Inoperable has quit [Ping timeout: 276 seconds]
Inoperable has joined #ruby
l_tonz has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
alex`` has quit [Remote host closed the connection]
alex`` has joined #ruby
jottr_ has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
tvw has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
ams__ has joined #ruby
webguynow has quit [Ping timeout: 265 seconds]
jtdoncas has joined #ruby
drewmcmillan has joined #ruby
iamarun has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 248 seconds]
l_tonz has joined #ruby
Troy2 has joined #ruby
jameser has joined #ruby
tcopeland has quit [Quit: tcopeland]
l_tonz has quit [Ping timeout: 260 seconds]
rahul_bajaj has joined #ruby
AJA4350 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
SCHAPiE has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
l_tonz has joined #ruby
immune has quit [Ping timeout: 264 seconds]
immune has joined #ruby
Puffball has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
Psybur has joined #ruby
l_tonz has quit [Ping timeout: 260 seconds]
dinfuehr has joined #ruby
jamiejackson has joined #ruby
jtdoncas has joined #ruby
pwnd_nsfw` has joined #ruby
Revan007 has quit [Read error: Connection reset by peer]
pwnd_nsfw has quit [Ping timeout: 264 seconds]
pwnd_nsfw has joined #ruby
UncleCid__ has quit [Ping timeout: 260 seconds]
jtdoncas has quit [Ping timeout: 248 seconds]
zwliew has quit [Quit: Connection closed for inactivity]
jtdoncas has joined #ruby
jtdoncas has quit [Ping timeout: 248 seconds]
megamosaren has joined #ruby
KeyJoo has joined #ruby
govg has quit [Ping timeout: 260 seconds]
n0m4d1c has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
govg has joined #ruby
cdg has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
jottr has joined #ruby
apparition has joined #ruby
QualityAddict has joined #ruby
SCHAPiE has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
n0m4d1c_ has joined #ruby
uZiel has quit [Ping timeout: 272 seconds]
jottr_ has quit [Ping timeout: 268 seconds]
immune has quit [Ping timeout: 240 seconds]
n0m4d1c has quit [Ping timeout: 276 seconds]
jamiejackson has quit [Remote host closed the connection]
zwliew has joined #ruby
l_tonz has joined #ruby
immune has joined #ruby
jtdoncas has joined #ruby
rahul_bajaj has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtdoncas has quit [Ping timeout: 240 seconds]
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
alfiemax has quit [Read error: Connection reset by peer]
VladGh_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VladGh has joined #ruby
leah2 has quit [Quit: trotz alledem!]
roshanavand has quit [Quit: Leaving.]
l_tonz has joined #ruby
Inoperable has quit [Ping timeout: 276 seconds]
Troy2 has quit [Ping timeout: 260 seconds]
alfiemax has quit [Read error: Connection reset by peer]
jeffreylevesque has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
r3kz has quit [Quit: Connection closed for inactivity]
l_tonz has quit [Ping timeout: 248 seconds]
sja has quit []
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
miskatonic has quit [Remote host closed the connection]
miskaton` has joined #ruby
vondruch_ has joined #ruby
bronson has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
Strepsils has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 265 seconds]
PaulCapestany has quit [Read error: Connection reset by peer]
immune has quit [Ping timeout: 248 seconds]
apeiros has quit [Read error: Connection reset by peer]
dviola has quit [Quit: WeeChat 2.0.1]
synthroid has joined #ruby
jottr has quit [Quit: WeeChat 2.0.1]
PaulCapestany has joined #ruby
jtdoncas has joined #ruby
immune has joined #ruby
tomphp has joined #ruby
ramfjord has joined #ruby
rahul_bajaj has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
leah2 has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
rahul_bajaj has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
l_tonz has joined #ruby
rahul_bajaj has joined #ruby
bweston92 has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
tcopeland has joined #ruby
Troy2 has joined #ruby
PaulCapestany has joined #ruby
hahuang65 has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miskaton` has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Strepsils has quit [Quit: Textual IRC Client: www.textualapp.com]
jaruga has quit [Quit: jaruga]
uZiel has joined #ruby
immune has quit [Ping timeout: 252 seconds]
jtdoncas has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
jaruga has joined #ruby
immune has joined #ruby
jtdoncas has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
andikr has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
l_tonz has joined #ruby
Psybur_ has joined #ruby
elphe has joined #ruby
ua has quit [Ping timeout: 248 seconds]
Psybur has quit [Ping timeout: 268 seconds]
l_tonz has quit [Ping timeout: 255 seconds]
Troy2 has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
bmurt has quit [Ping timeout: 268 seconds]
ua has joined #ruby
jeffreylevesque has joined #ruby
apeiros has quit [Remote host closed the connection]
terens has joined #ruby
<terens> Is there a way to override a private module ?
n0m4d1c_ has quit [Remote host closed the connection]
<dminuoso> terens: What private what?
amatas_ has joined #ruby
<terens> class AClass .... private .... module XXX ... end end
<terens> to extend/change XXX module from outside
<dminuoso> terens: That doesn't do what you think it does.
<dminuoso> terens: `private` changes method visibility. A module has no notion of being "private"
<dminuoso> terens: There are however private constants.
alfiemax has quit [Ping timeout: 268 seconds]
<terens> having private visibility
<terens> is there a way to alter its code?
<terens> i mean if the code above is at a gem
<terens> and I want to change it
alfiemax has joined #ruby
<dminuoso> terens: Then fork the code.
<terens> change a method inside that module
<terens> maybe that is what I am going to do
<dminuoso> terens: If you intend to change how somebody elses code behaves, then change that code.
<dminuoso> :-)
jottr has joined #ruby
tomphp has joined #ruby
jtdoncas has joined #ruby
bonhag has joined #ruby
kyle__ has quit [Remote host closed the connection]
daed has quit [Remote host closed the connection]
immune has quit [Ping timeout: 240 seconds]
amatas_ has quit [Quit: amatas_]
milardovich has joined #ruby
megamosaren has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
amatas_ has joined #ruby
Guest37798 has joined #ruby
tomphp has quit [Client Quit]
Guest37798 is now known as kyle__
jtdoncas has quit [Ping timeout: 252 seconds]
milardovich has quit [Remote host closed the connection]
terens has quit [Ping timeout: 276 seconds]
<Burgestrand> terens Yes, ruby allows you to override defined methods, and replace constants
terens has joined #ruby
<Burgestrand> terens Typically frowned upon, because changing code that's not yours means it might change from underneath you without you knowing
l_tonz has joined #ruby
<Burgestrand> Noticed you left the channel, so my previous message said: terens Yes, ruby allows you to override defined methods, and replace constants
<dminuoso> Burgestrand: And how do you access a module behind a private constant?
ramfjord has joined #ruby
<dminuoso> (For the purpose of this discussion you are forbidden to use ObjectSpace or Fidddle)
<Burgestrand> dminuoso Where does it say it's a private constant?
<dminuoso> Burgestrand: It was kind of implied.
<Burgestrand> dminuoso Not to me
<dminuoso> Burgestrand: Fair enough/
milardovich has joined #ruby
immune has joined #ruby
terens has quit [Ping timeout: 268 seconds]
apparition has quit [Quit: Bye]
ramfjord has quit [Ping timeout: 264 seconds]
milardovich has quit [Client Quit]
<Burgestrand> dminuoso Turns out `const_get` doesn't care about constant visibility :)
<Burgestrand> (nor `const_set`)
cdg has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 265 seconds]
drewmcmillan has joined #ruby
r4z3r has joined #ruby
r4z3r has quit [Client Quit]
vdl has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
terens has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
pastorinni has joined #ruby
pastorinni has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
pastorinni has joined #ruby
alfiemax has joined #ruby
rippa has joined #ruby
Burgestrand has quit [Quit: Closing time!]
sleetdrop has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
Psybur__ has joined #ruby
alfiemax has joined #ruby
jtdoncas has joined #ruby
Psybur_ has quit [Ping timeout: 255 seconds]
chocoelho has joined #ruby
alfiemax_ has joined #ruby
kies has quit [Ping timeout: 248 seconds]
kies has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
Phlogistique has quit [Read error: Connection reset by peer]
immune has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
terens has quit [Ping timeout: 260 seconds]
jtdoncas has quit [Ping timeout: 240 seconds]
randomstrangerb has quit [Ping timeout: 248 seconds]
safetypin has joined #ruby
randomstrangerb has joined #ruby
Psybur__ is now known as Psybur
Psybur has quit [Changing host]
Psybur has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
aupadhye has quit [Remote host closed the connection]
l_tonz has joined #ruby
immune has joined #ruby
kobain has joined #ruby
elphe has quit [Ping timeout: 265 seconds]
Rapture has joined #ruby
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 264 seconds]
elphe has joined #ruby
Torrone has joined #ruby
bmurt has joined #ruby
Torrone has quit [Client Quit]
l_tonz has quit [Ping timeout: 240 seconds]
elphe has quit [Ping timeout: 256 seconds]
oleo has joined #ruby
rahul_bajaj has quit [Quit: Leaving]
elcontrastador has quit [Ping timeout: 248 seconds]
roshanavand has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
vtx has quit [Quit: vtx]
cedum has joined #ruby
cedum has left #ruby ["Good Bye"]
jamiejackson has joined #ruby
jtdoncas has joined #ruby
zwliew has quit [Quit: Connection closed for inactivity]
Puffball has joined #ruby
jtdoncas has quit [Ping timeout: 276 seconds]
ana_ has quit [Quit: Leaving]
Chuguniy has quit [Quit: Leaving]
immune has quit [Ping timeout: 276 seconds]
immune has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
roshanavand has left #ruby [#ruby]
elphe has joined #ruby
cdg has joined #ruby
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
l_tonz has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
cdg_ has joined #ruby
jamiejackson has quit [Ping timeout: 276 seconds]
VladGh has quit [Quit: Lost terminal]
bonhag has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_66 has quit [Remote host closed the connection]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VladGh has joined #ruby
ta_ has quit [Remote host closed the connection]
bonhag has joined #ruby
im0nde has joined #ruby
dionysus69 has joined #ruby
ta_ has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
bonhag has quit [Remote host closed the connection]
dionysus69 has quit [Client Quit]
l_tonz has quit [Ping timeout: 268 seconds]
ta_ has quit [Ping timeout: 248 seconds]
LenPayne has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 276 seconds]
jtdoncas has joined #ruby
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
hays_ has joined #ruby
hays_ has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
LenPayne has joined #ruby
vichib has joined #ruby
<hays_> hey can someone help me with a pattern? I want to have a class where I define an error handler, e.g. onError { |e| ... } and then I call that error handler whenever I feel like I need do with argument e
<hays_> not sure how to set all of this up... an example would be awesome
jtdoncas has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby
n0m4d1c has joined #ruby
immune has quit [Ping timeout: 264 seconds]
<ule> hays_: I guess you can create a custom excemption, and then every time you feel like you can raise that exception
AndroUser2 has joined #ruby
uZiel has quit [Ping timeout: 272 seconds]
<canton7> hays_, https://eval.in/933171
<canton7> but yeah, consider whether throwing an exception is more appropriate
<hays_> I will consider. thanks for the same.
<hays_> sample
uZiel has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
<hays_> as is usually the case, I have a few things going on here, so .. my design may not be perfect :)
vichib has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
drewmcmillan has joined #ruby
<hays_> I was thinking I'd need yields to make this happen
vichib has joined #ruby
alfiemax_ has joined #ruby
vichib has quit [Remote host closed the connection]
<hays_> canton7: can you explain the .(e) ? what are the parens for?
synthroid has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 248 seconds]
immune has joined #ruby
vichib has joined #ruby
<canton7> that's shorthand for Proc#call. You could also do @error_handler.call(e)
alfiemax has joined #ruby
GremL1N2 has quit [Ping timeout: 248 seconds]
alfiemax_ has quit [Ping timeout: 268 seconds]
axsuul has quit [Ping timeout: 248 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
axsuul has joined #ruby
randomstrangerb has quit [Ping timeout: 248 seconds]
randomstrangerb has joined #ruby
<hays_> what is the shortest way to create an Exception class? I want to do it at the begginning of my class definition and its just derived from standarderror. Do I need two lines to do this?
<hays_> RIght now all I am using this for is to give the exception a different name, so that I can identify it as a unique error
<hays_> class Foo < StandardException / end is the shortest I've found today, but I could have sworn there was a one-liner
<canton7> class Foo < StandardException; end
synthroid has joined #ruby
[Butch] has joined #ruby
nadir has joined #ruby
AndroUser2 has quit [Remote host closed the connection]
<hays_> I think this is what I'd seen: FailedReset = Class.new(NoMethodError)
<hays_> is that just different syntax for the same thing?
alfiemax has quit [Remote host closed the connection]
<leah2> is there a ruby ORM library which maps to plain old ruby objects (i.e. doensn't make them inherit some active record thingy), i'm thinking of something like Yesod.Persistent
l_tonz has joined #ruby
ta_ has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<canton7> yes, and there's DataMapper (you need an include though), but I'm not sure if that's still in fashion
<leah2> last release 2011, hmm :P
jtdoncas has joined #ruby
AndroUser2 has joined #ruby
l_tonz has quit [Ping timeout: 264 seconds]
<leah2> i guess everone not using AR uses sequel now
<canton7> shows how long it's been since I last did databasey stuff in Ruby :P
aufi has quit [Quit: Leaving]
<canton7> aah I forgot about Sequel, yes
<leah2> hm, there is ROM too
cdg has joined #ruby
l_tonz has joined #ruby
cdg__ has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
drewmcmillan has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg_ has quit [Ping timeout: 248 seconds]
uZiel has quit [Remote host closed the connection]
d^sh has joined #ruby
troys has joined #ruby
immune has quit [Ping timeout: 248 seconds]
d^sh- has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
sanscoeur has joined #ruby
vichib has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 255 seconds]
AndroUser2 has quit [Ping timeout: 255 seconds]
biberu has quit []
l_tonz has joined #ruby
immune has joined #ruby
biberu has joined #ruby
bronson has joined #ruby
John___ has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
John___ has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 256 seconds]
ta_ has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 252 seconds]
rabajaj has joined #ruby
rabajaj has quit [Client Quit]
justicefries has joined #ruby
c_nick has joined #ruby
ta_ has joined #ruby
lacour has joined #ruby
uZiel has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
darkhanb has joined #ruby
jtdoncas has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BTRE has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
cloaked1 has joined #ruby
randomstrangerb has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
chocoelho has quit [Remote host closed the connection]
orbyt_ has joined #ruby
randomstrangerb has joined #ruby
Beams has quit [Quit: .]
modin has quit [Read error: Connection reset by peer]
cdg__ has quit [Ping timeout: 248 seconds]
dinfuehr has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Ping timeout: 255 seconds]
immune has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
modin has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
dinfuehr has joined #ruby
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
plexigras has joined #ruby
BTRE has joined #ruby
jottr has joined #ruby
Vapez has joined #ruby
hahuang65 has joined #ruby
mikecmpbll has joined #ruby
immune has joined #ruby
kies has quit [Ping timeout: 240 seconds]
Mrgoose has quit [Read error: No route to host]
justicefries has joined #ruby
apeiros has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
Mrgoose has joined #ruby
mikecmpbll has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
[Butch] has joined #ruby
marxarelli|afk is now known as marxarelli
Mrgoose has quit [Ping timeout: 246 seconds]
guacamole has joined #ruby
Mrgoose has joined #ruby
Troy2 has joined #ruby
drcode has quit [Ping timeout: 248 seconds]
jtdoncas has joined #ruby
l_tonz has joined #ruby
darkhanb_ has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
leah2 has quit [Ping timeout: 246 seconds]
jtdoncas has quit [Ping timeout: 256 seconds]
drcode has joined #ruby
Mrgoose has quit [Ping timeout: 265 seconds]
l_tonz has quit [Ping timeout: 248 seconds]
darkhanb has quit [Ping timeout: 248 seconds]
drcode has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
drcode has joined #ruby
hays_ has quit [Remote host closed the connection]
leah2 has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
plexigras has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
plexigras has joined #ruby
tvw has quit [Remote host closed the connection]
l_tonz has joined #ruby
darkhanb has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
Troy2 has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
darkhanb_ has quit [Ping timeout: 248 seconds]
randomstrangerb has quit [Ping timeout: 256 seconds]
eckhardt has joined #ruby
immune has quit [Ping timeout: 246 seconds]
randomstrangerb has joined #ruby
ta_ has joined #ruby
benjen has quit [Quit: *Dies off camera*]
drewmcmillan has joined #ruby
immune has joined #ruby
drewmcmillan has quit [Client Quit]
KeyJoo has quit [Read error: Connection reset by peer]
TomyWork has quit [Ping timeout: 240 seconds]
elphe has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 265 seconds]
l_tonz has quit [Ping timeout: 265 seconds]
kriskropd has quit [Ping timeout: 248 seconds]
jtdoncas has joined #ruby
dionysus69 has joined #ruby
oetjenj has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
jtdoncas has quit [Ping timeout: 240 seconds]
l_tonz has joined #ruby
c_nick has left #ruby ["Ex-Chat"]
im0nde has quit [Quit: im0nde]
dionysus69 has quit [Ping timeout: 276 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
l_tonz has quit [Ping timeout: 260 seconds]
woodruffw has quit [Ping timeout: 260 seconds]
guacamole has joined #ruby
workmad3 has quit [Quit: Lost terminal]
guacamole has quit [Client Quit]
darkhanb_ has joined #ruby
<havenwood> g'mornin'!
woodruffw has joined #ruby
woodruffw has joined #ruby
darkhanb has quit [Ping timeout: 265 seconds]
<baweaver> mornin
<gizmore|2> havenwood: an honor to re-greet you
gizmore|2 is now known as gizmore
nexi has joined #ruby
uZiel has quit [Ping timeout: 272 seconds]
<gizmore> baweaver: hi
<baweaver> See havenwood? I get the original to say hi to me
<baweaver> you get #2
plexigras has quit [Ping timeout: 256 seconds]
guacamole has joined #ruby
<gizmore> havenwood formed me. he trained me for years to eat things you would find disgusting
<gizmore> [/rambo]
bweston92 has quit [Quit: Connection closed for inactivity]
marr has quit [Remote host closed the connection]
plexigras has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raynold has joined #ruby
immune has quit [Ping timeout: 276 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has quit [Ping timeout: 268 seconds]
plexigras has quit [Client Quit]
kobain has quit [Ping timeout: 272 seconds]
plexigras has joined #ruby
immune has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
Dimik has joined #ruby
k0mpa has quit [Remote host closed the connection]
Mrgoose2 has joined #ruby
ta_ has joined #ruby
jtdoncas has joined #ruby
Inoperable has joined #ruby
nexi has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
TomyLobo has joined #ruby
bronson has joined #ruby
govg has joined #ruby
bawNg has joined #ruby
bawNg has quit [Changing host]
bawNg has joined #ruby
bawNg has joined #ruby
nexi has joined #ruby
jtdoncas has quit [Ping timeout: 248 seconds]
nexi has left #ruby [#ruby]
govg has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Vapez has quit [Ping timeout: 248 seconds]
troys is now known as troys_
l_tonz has joined #ruby
hanmac has joined #ruby
jobewan has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
l_tonz has quit [Ping timeout: 248 seconds]
minimalism has joined #ruby
Dimik has quit [Remote host closed the connection]
kies has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
plexigras has quit [Ping timeout: 256 seconds]
LocaMocha has quit [Ping timeout: 248 seconds]
Dimik has joined #ruby
dviola has joined #ruby
immune has quit [Ping timeout: 248 seconds]
jaruga has quit [Quit: jaruga]
Rapture has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
terens has joined #ruby
immune has joined #ruby
pastorinni has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<bawNg> does anyone know of a faster way to call a proc from a C extension? with a cached proc and interned name, rb_funcall still takes like 400 us
goatish has joined #ruby
AndroUser2 has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
drewmcmillan has joined #ruby
John___ has joined #ruby
brent__ has joined #ruby
jtdoncas has joined #ruby
ta_ has joined #ruby
dionysus69 has joined #ruby
daed has joined #ruby
mahlon has quit [Ping timeout: 252 seconds]
mahlon has joined #ruby
jtdoncas has quit [Ping timeout: 276 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt_ has joined #ruby
amatas_ has quit [Quit: amatas_]
l_tonz has joined #ruby
plexigras has joined #ruby
plexigras has quit [Client Quit]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l_tonz has quit [Ping timeout: 255 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed has quit [Remote host closed the connection]
matled has quit [Remote host closed the connection]
c0ncealed has joined #ruby
biberu has quit []
dionysus69 has quit [Ping timeout: 248 seconds]
AndroUser2 has quit [Ping timeout: 268 seconds]
Vapez has joined #ruby
elphe has joined #ruby
Sembei has joined #ruby
m0x00 has left #ruby ["Leaving"]
elphe has quit [Ping timeout: 256 seconds]
xco has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
ldnunes has quit [Quit: Leaving]
mtkd has joined #ruby
jrabe has quit [Killed (Sigyn (BANG!))]
jrabe has joined #ruby
jtdoncas has joined #ruby
John___ has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 240 seconds]
plexigras has joined #ruby
John__ has joined #ruby
sameerynho has joined #ruby
eckhardt has joined #ruby
ur5us has joined #ruby
miskatonic has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
jeremy04 has joined #ruby
miskatonic has quit [Client Quit]
sammi` has joined #ruby
Sembei has quit [Quit: WeeChat 2.1-dev]
Sembei has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
Psybur has quit [Ping timeout: 264 seconds]
sammi`_ has quit [Quit: Lost terminal]
Inoperable has quit [Quit: WeeChat 2.0.1]
cdg has quit [Ping timeout: 276 seconds]
marxarelli is now known as marxarelli|afk
xco has quit [Quit: xco]
ta_ has joined #ruby
mikecmpbll has joined #ruby
orbyt_ has joined #ruby
chocoelho has joined #ruby
chocoelho has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
pilne has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jtdoncas has joined #ruby
pastorinni has joined #ruby
pastorinni has quit [Remote host closed the connection]
troys_ is now known as troys
pastorinni has joined #ruby
guacamole has joined #ruby
xco has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
Pgouv_ has joined #ruby
nemesit|znc has quit [Ping timeout: 255 seconds]
Pgouv__ has joined #ruby
terens has quit [Ping timeout: 265 seconds]
braderhart has joined #ruby
r3kz has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pgouv_ has quit [Ping timeout: 260 seconds]
Sembei has quit [Quit: WeeChat 2.1-dev]
guacamole has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
Sembei has joined #ruby
bronson has joined #ruby
guacamole has quit [Client Quit]
l_tonz has joined #ruby
guacamole has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
jenrzzz_ has joined #ruby
spiette has quit [Quit: :qa!]
weathermaker has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<yeoman> thing that always bugged me
<yeoman> how do i read all from a socket that is there
<yeoman> if i do IO.select([socket])
<yeoman> i know i can read from that socket
<yeoman> but if i do socket.read
<yeoman> it blocks.. until? i don't know..
l_tonz has quit [Ping timeout: 276 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eam> yeoman: if select returns saying it's readable then #sysread will not block
guacamole has joined #ruby
<eam> don't use #read or #write if you want to be particular about your i/o, as they may do i/o you don't want (or, may not do i/o that you do want) because of the buffering
weathermaker has quit [Quit: weathermaker]
weathermaker has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Client Quit]
prutheus has joined #ruby
ta_ has quit [Remote host closed the connection]
<prutheus> Hello. I need to parse a difficult string: "Building: ?????? ??????? ???? ??????Address: محيط الظريفRemark: \nمستودع للايجار محيط الظريف مساحة 300متر مع نزلة كميون ايجار شهري 1500$ للاستعلام 03124927 \\ 71127376" Need to parse the parameters Building, Address, Remark etc. Difficulty: String is not always same. Maybe Building is missing, but some Parameters more
ta_ has joined #ruby
<prutheus> And the parameters are directly without space behind one other, so how to split?
<cjohnson> prutheus: That sure sounds like a shitty format lol
<cjohnson> How did you end up with that?
jtdoncas has joined #ruby
<cjohnson> Assuming there is no end-of-value boundary, you can try using a start-of-value boundary to find the end
n0m4d1c has quit [Remote host closed the connection]
<cjohnson> So for example, come up with a list of parameters, and for each one, find Parameter:.*(?!Other|Parameters|Here)
the_f0ster has joined #ruby
<cjohnson> And run that regexp once per parameter
<cjohnson> I wouldn't just split on : since the value might contain :
inoperable__ has joined #ruby
<the_f0ster> how I can access an instance or class variable from a module that is being extended ?
<prutheus> its from taht site
guacamole has joined #ruby
jtdoncas has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
<prutheus> cjohnson: so any better idea maybe? becasue that is very difficult
dave_den has joined #ruby
<dave_den> anyone know how the _default_ compile flags for compiling native extensions are set? in particular, when '-fstack-protector' is used
Pgouv__ has quit [Ping timeout: 265 seconds]
matled has joined #ruby
<cjohnson> prutheus: Oh...well you have HTML. that makes this much easier
<cjohnson> You didn't paste the html here
<cjohnson> Just use a DOM lib
alex`` has quit [Ping timeout: 265 seconds]
<prutheus> I use currently nokogiri
<prutheus> but that html ... is still just a p block
plexigras has quit [Ping timeout: 252 seconds]
<cjohnson> No it's not, inside that p block the title is wrapped in a <b>
<cjohnson> and the values are separated by <br>
<cjohnson> So you can just find the TextNode following the appropriate <b> that you want
<prutheus> you think so, but now take that one
<prutheus> the remark is f*cked up
plexigras has joined #ruby
<cjohnson> Looks the same here
<cjohnson> The heading is in a <b>
<cjohnson> And the value is in the text nodes that follow
alex`` has joined #ruby
<prutheus> ahh yeah
<prutheus> the b's are the seperators
<cjohnson> You'll have to strip ": " from the beginning of the value but otherwise seems straightforward
<prutheus> ok.
<prutheus> ill try to code that behavior
<cjohnson> Good luck! This is why we always suggest not scraping HTML
<cjohnson> :P
<cjohnson> You'll write this code and then tomorrow it will change and break
<cjohnson> or you'll get an example that fails
jottr has quit [Quit: WeeChat 2.0.1]
<prutheus> haha :d
inoperable__ has quit [Quit: slated for deresolution]
inoperable__ has joined #ruby
<baweaver> welcome to htmHell
<baweaver> cjohnson: want a fun one to try?
<cjohnson> NOOOOOOOO
<cjohnson> I'm going to codemash
<cjohnson> bye
<baweaver> Open challenge to the channel then, difficulty: hard
<baweaver> Take this site: http://www.classtab.org/
inoperable__ has quit [Client Quit]
<baweaver> Now give me a JSON list of Composer => tabs
inoperable__ has joined #ruby
DEac- has quit [Ping timeout: 255 seconds]
<baweaver> such that {'Zequinha de Abreu' => ['Tico Tico']} and etc
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> (mind I've already written aforementioned code, just haven't put it on git yet)
<baweaver> the fun is that it's not semantic html and there's no real nesting
inoperable__ has quit [Client Quit]
<baweaver> if you really want a challenge, get the meta information like LHF, MIDIs, Videos, and links as well :D
synthroid has quit []
<baweaver> cjohnson: that's how you give Nokogiri one heck of a workout
matchaw has joined #ruby
the_f0ster has quit [Read error: Connection reset by peer]
<baweaver> havenwood: if you want a hard one ^
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
guacamole has joined #ruby
alfiemax has quit [Remote host closed the connection]
plexigras has quit [Ping timeout: 256 seconds]
jeffreylevesque has quit [Ping timeout: 248 seconds]
<baweaver> Also an easier one-liner challenge: Take a string like 'aaaaaabbbcccccddd' and compact it to 'a6b3c5d3'
troys is now known as troys_
<cjohnson> def foo(input) 'a6b3c5d3' end
<cjohnson> foo('aaaaaabbbcccccddd')
<cjohnson> boom
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* cjohnson mic drop
plexigras has joined #ruby
guacamole has quit [Client Quit]
elphe has joined #ruby
cdg has joined #ruby
jtdoncas has joined #ruby
marr has joined #ruby
guacamole has joined #ruby
jenrzzz_ has quit [Ping timeout: 248 seconds]
DEac- has joined #ruby
plexigras has quit [Ping timeout: 276 seconds]
* baweaver claps
elphe has quit [Ping timeout: 276 seconds]
guacamole has quit [Client Quit]
jtdoncas has quit [Ping timeout: 240 seconds]
weaksauc_ has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
guacamole has joined #ruby
alfiemax has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<baweaver> >> 'aaaaaabbbcccccddd'.chars.slice_when{|a,b|a!=b}.reduce(''){|s,a|s+a[0]+a.size.to_s} # Not fond of it though
<ruby[bot]> baweaver: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
plexigras has joined #ruby
chocoelho has joined #ruby
<baweaver> works in my REPL at least.
<baweaver> odd
jamesaxl has quit [Quit: WeeChat 1.9.1]
alfiemax has quit [Ping timeout: 264 seconds]
cloaked1 has quit [Quit: Leaving]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
chocoelho has quit [Quit: chocoelho]
guacamole has joined #ruby
LenPayne has quit [Ping timeout: 240 seconds]
LenPayne has joined #ruby
guacamole has quit [Client Quit]
tomphp has joined #ruby
amatas has quit [Quit: amatas]
bmurt has quit [Ping timeout: 276 seconds]
mtkd has quit [Ping timeout: 265 seconds]
guacamole has joined #ruby
bmurt has joined #ruby
ta_ has quit [Remote host closed the connection]
mtkd has joined #ruby
jenrzzz has joined #ruby
ta_ has joined #ruby
plexigras has quit [Remote host closed the connection]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Remote host closed the connection]
guacamole has quit [Client Quit]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
plexigras has joined #ruby
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
guacamole has joined #ruby
LenPayne has quit [Ping timeout: 256 seconds]
PaulCapestany has quit [Quit: .]
LenPayne has joined #ruby
PaulCapestany has joined #ruby
plexi has joined #ruby
guacamole has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
tectonic has joined #ruby
plexigras has quit [Ping timeout: 276 seconds]
hello_world has joined #ruby
hello_world has quit [Client Quit]
randomstrangerb has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
clemens3 has quit [Ping timeout: 265 seconds]
drewmcmillan has joined #ruby
g105b has joined #ruby
alfiemax has joined #ruby
<g105b> Hi I'm trying to run gem install sass and I get this error: The last version of ffi (< 2, >= 0.5.0) to support your Ruby & RubyGems was 1.9.18. I'm running Windows 10 Pro, followed instructions on http://sass-lang.com/install "The fastest way to get Ruby on your Windows computer is to use Ruby Installer (http://rubyinstaller.org/)"
DEac- has quit [Ping timeout: 268 seconds]
<Radar> g105b: is that the entirety of the error?
<g105b> Running gem install ffi -v 1.9.18 brings up the exact same message.
<g105b> Looks that way. I'm new to Ruby, so what do you think I could do to start using it?
<Radar> g105b: You should uninstall Ruby, then find the installer for Ruby 2.4 and install Ruby using that.
<havenwood> g105b: Or switch to bash on a native ubuntu kernel with WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10
<g105b> Oh I see RubyInstaller has back-dated versions. Thanks.
plexi has quit [Read error: No route to host]
alfiemax has quit [Ping timeout: 264 seconds]
<havenwood> g105b: If you install WSL then you can just follow Ubuntu instructions.
benjen has joined #ruby
plexi has joined #ruby
<g105b> havenwood: The reason I'm here is because I'm very familiar with Linux over Windows, and turned to WSL as my security blanked, but unfortunately it isn't fit for real world use yet.
<havenwood> (In bash instead of PowerShell.)
<havenwood> g105b: I'm afraid Windows is no more fit for real world use. ;-P
<havenwood> g105b: gotcha
<g105b> I think you might be right, but somehow people insist on using it !
clemens3 has joined #ruby
<g105b> WSL is a lie.
<havenwood> I got as far as Postgres, then it borked.
<havenwood> We were trying to update the RailsGirls curriculum for Windows and it would *really* be nice for WSL to actually work,
<havenwood> They may have fixed that issue? Unuse.
<g105b> I had to start supporting Windows, so I have forced myself to use it. WSL sounded superb, and so did Docker, but unfortunately neither are a solution just yet.
<havenwood> mmm
<bawNg> on the off chance that anyone here ever needs to reduce the overhead of calling a proc from a C extension, I got it down to around 1us by digging through the internals and using rb_vm_invoke_proc directly
<g105b> Sorry bawNg but that's too fast for me.
plexi has quit [Ping timeout: 276 seconds]
<havenwood> bawNg: Good question. It might be worth posing the question on the mailing list as well.
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Err, I guess not a question now. You've solved it!
<havenwood> bawNg: Neat!
jenrzzz has quit [Ping timeout: 256 seconds]
dave_den has quit [Quit: Leaving.]
<bawNg> I'm prototyping a scheduler which needs to be able to fire timer callbacks as accurately as possible, getting the calling overhead down to about 1us allows the reactor thread to wake up and fire the timer with more precision than sleeping in a native ruby thread
Ltem has joined #ruby
<g105b> havenwood: Thanks for your help, I'm up and running as I need to :)
DEac- has joined #ruby
immune has quit [Ping timeout: 265 seconds]
Ltem has quit [Client Quit]
conceivably has joined #ruby
pastorinni has quit [Remote host closed the connection]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
tcopeland has quit [Quit: tcopeland]
jeffreylevesque has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
<conceivably> Hello, I'm writing a Ruby class that will only have one public method 'run'. How do I decide what belongs into 'initialize' and what should be done in 'run'? Both of them will be called whenever the class is used.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l_tonz has joined #ruby
jenrzzz has joined #ruby
prutheus has quit [Quit: Page closed]
l_tonz has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
bronson has joined #ruby
l_tonz has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
<Radar> conceivably: can you show us what code you have now? It'd be easier to talk to code than theoreticals.
<yeoman> eam: my problem wasn't the blocking
<yeoman> it was.. that if i don't say how much should be read
<eam> yeoman: ah, what's the problem?
<yeoman> it blocks.. for how long?
<yeoman> i certainly shouldn't read byte by byte, should i
<eam> I would characterize that as having a problem with the blocking :)
<yeoman> ewll.. what does sysread do? raise?
<eam> so first lemmie talk about read
<yeoman> this is not really ruby specific i always wondered about that
<eam> #read is going to make zero or more system calls to read(2)
John__ has quit [Read error: Connection reset by peer]
<eam> and if you give it no size it will read it all
<eam> which means blocking until the connection is closed
<yeoman> even a flush doesn't unblock it?
<yeoman> so how do people do it.. generally.. i mean
<eam> so fd.read() literally means read everything
<yeoman> let's say i read 400 bytes
GremL1N2 has joined #ruby
<yeoman> client sends 399 and that's the last thing he sends
mahlon has quit [Ping timeout: 252 seconds]
<eam> fd = open "foo.iso"; buf = fd.read # you're asking to read a few gigs into buf
cdg has quit [Ping timeout: 276 seconds]
<yeoman> i think the message should be 400 bytes long.. but client things it's 399
<yeoman> thinks*
mahlon has joined #ruby
<yeoman> how do people fix that problem?
<eam> fd.read is really a big while loop that makes lots of smaller calls to read(2) until nothing more can be read
<eam> does that make sense?
BTRE has quit [Read error: Connection reset by peer]
<yeoman> yeah.. well.. how do i read everything that is there?
<eam> so generally when you're using select() to multiplex i/o to sockets (and or do other things in the meantime) you're going to want to construct a state machine that looks like
<conceivably> Radar: Well there is almost no code to show yet, since I was trying to decide where to start putting it (but perhaps this is the wrong approach?). The class is a 'Report' that is initialized with some input, grabs some things from a database, makes an api call, and finally produces a more or less deeply nested hash as a result of calling run. So it seesm to me that constructing the hash should go into 'run'. But what about retrieving
<conceivably> things from the database and the api?
<eam> 1) is it ready for some amount of i/o 2) do as much i/o as you can, saving the result in a buffer 3) goto 1
<yeoman> yeah well
<yeoman> step 2 is the thing that bugs me
l_tonz has quit [Ping timeout: 264 seconds]
<eam> ok so how to do #2
<eam> fd.sysread 4096
<eam> read up to 4k
<yeoman> yeah.. well, what if client sends 4095
<eam> if there's more than 4k, that's fine, you loop back around to select and it returns right away
<eam> yeoman: that is fine, fd.read 4096 will return *up to* 4k
<eam> if there's one byte on the wire, you get one byte
<yeoman> oh.. that's where my misunderstanding was
<eam> and it tells you how many bytes you read
BTRE has joined #ruby
<eam> yeah no prob
<yeoman> then i don't have problems
<eam> also
<yeoman> confusing that it's reading it all without params
<eam> you should read up on what else it can return, if select says ready and you read zero bytes, that means EOF
<eam> and various other exceptions or return codes can matter as well
<yeoman> good to know, thanks
<yeoman> heading to bed, thanks alot
<eam> np
<yeoman> eam: i've never seen you around here
<yeoman> who are you?
<eam> I am ... me!
<eam> I'm around sometimes
<yeoman> i really wanna know~
<yeoman> who who, who whoi
<yeoman> or something like that.
<eam> I love that song
<yeoman> me too
<yeoman> i've been here alot, weird that i can't recall your nick
<yeoman> maybe it's a timezone thing
<yeoman> are you us?
troys_ is now known as troys
orbyt_ has quit [Max SendQ exceeded]
<Radar> conceivably: The question you should be asking is: should the retrieving of the data be done when the object is initialized, or when the "run" method is called?
elphe has joined #ruby
PaulCapestany has quit [Quit: .]
<Radar> conceivably: I think when the run method is called.
milardovich has joined #ruby
g105b has quit [Quit: Page closed]
cdg has joined #ruby
<eam> yeah I'm in California
<yeoman> eam: how do people write multi client servers with IO.select in ruby?
PaulCapestany has joined #ruby
<yeoman> i have a Thread that does accepting and selecting and puts them into a hash in a class
sanscoeur has quit [Remote host closed the connection]
conceivably has quit [Ping timeout: 276 seconds]
cdg has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
marxarelli|afk is now known as marxarelli
solocshaw has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
<eam> yeoman: you can either multiplex within a single thread, or do a thread-per-connection model
<eam> (or some hybrid variation thereof when you get very high performance)
<eam> I have a kinda simple example of multiplexing multiple connections here, if you wanna take a look. It's very much *not* abstracted so hopefully it's sort of easy to piece apart https://github.com/square/mssh/blob/master/lib/mcmd.rb
<eam> it's somewhat of a mess, this was one of the first things I wrote when I came back to ruby after about a decade away from it
<eam> in this case it's multiplexing pipes to subprocesses, but the mechanism is more or less the same
phaul has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
plexi has joined #ruby
Scient has quit [Ping timeout: 268 seconds]
kke has quit [Ping timeout: 268 seconds]
conceivably has joined #ruby
nowhereman_ has quit [Ping timeout: 248 seconds]
kke has joined #ruby
Scient has joined #ruby
tcopeland has joined #ruby
PaulCapestany has quit [Quit: .]
jenrzzz has quit [Ping timeout: 248 seconds]
<mozzarella> >> 'aaaaaabbbcccccddd'.gsub(/(.)\1*/) {|s| s[0] + s.size.to_s }
John___ has joined #ruby
<ruby[bot]> mozzarella: # => "a6b3c5d3" (https://eval.in/933241)
<mozzarella> baweaver: ^
<baweaver> mozzarella: you're hired.
<mozzarella> ;D
PaulCapestany has joined #ruby