kapil____ has quit [Quit: Connection closed for inactivity]
Swyper has joined #ruby
spacesuitdiver has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
desperek has quit [Quit: xoxo]
davidw has joined #ruby
hutch has joined #ruby
RougeR has joined #ruby
hutch has quit [Ping timeout: 268 seconds]
gix has quit [Quit: Client exiting]
davidw has quit [Ping timeout: 240 seconds]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarink has joined #ruby
sotrhraven has joined #ruby
sarink has quit [Remote host closed the connection]
code_zombie has quit [Quit: Leaving]
sotrhraven has quit [Quit: Leaving]
hutch has joined #ruby
AJA4350 has quit [Read error: Connection reset by peer]
sarink has joined #ruby
tiff has joined #ruby
Swyper has quit [Quit: Page closed]
cschneid has joined #ruby
sgen has joined #ruby
hutch has quit [Ping timeout: 272 seconds]
sarink has quit [Remote host closed the connection]
donofrio has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
hutch has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
spacesuitdiver has joined #ruby
_whitelogger has joined #ruby
nchambers has joined #ruby
esrse has joined #ruby
tdy has quit [Ping timeout: 244 seconds]
ellcs has joined #ruby
_whitelogger has joined #ruby
clemens3 has joined #ruby
clemens3_ has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
sgen has quit [Ping timeout: 250 seconds]
hutch has quit [Ping timeout: 245 seconds]
moei has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
braincrash has quit [Quit: bye bye]
sgen has joined #ruby
braincrash has joined #ruby
kapil____ has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
cschneid has joined #ruby
Nicmavr has joined #ruby
hutch has joined #ruby
tdy has joined #ruby
hutch has quit [Ping timeout: 268 seconds]
Exuma has joined #ruby
tdy has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
tdy has joined #ruby
elphe has quit [Ping timeout: 272 seconds]
elphe has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
darkhanb has joined #ruby
marz_d`ghostman has joined #ruby
elphe has quit [Ping timeout: 250 seconds]
tdy has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
elphe has joined #ruby
tdy has joined #ruby
cschneid has joined #ruby
donofrio has quit [Ping timeout: 268 seconds]
tdy has quit [Ping timeout: 250 seconds]
cschneid has quit [Ping timeout: 272 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthu| has joined #ruby
paranoicsan has joined #ruby
rippa has joined #ruby
cthulchu_ has quit [Ping timeout: 268 seconds]
tdy has joined #ruby
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Ping timeout: 250 seconds]
elphe has joined #ruby
donofrio has joined #ruby
donofrio has quit [Quit: Leaving]
nchambers has quit [Quit: WeeChat 2.2]
tdy has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
aupadhye has joined #ruby
Mia has joined #ruby
<marz_d`ghostman>
How do I capture my thread's output and error? https://gist.github.com/marzdgzmn/dc6e8992a353ecf9ed2384b2cb987c3a When I manually run the class itself, the one that should be run on a different thread, it gives me errors. But if I run it on a different thread the errors/output doesn't come up
kapil____ has quit [Quit: Connection closed for inactivity]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc has joined #ruby
dellavg_ has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
clemens3 has quit [Ping timeout: 250 seconds]
za1b1tsu has joined #ruby
cschneid has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has quit [Read error: Connection reset by peer]
Exuma has joined #ruby
yqrashawn has joined #ruby
elphe has quit [Ping timeout: 244 seconds]
tiff has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
cruzo66342 has quit [Remote host closed the connection]
cruzo66342 has joined #ruby
cruzo66342 has quit [Ping timeout: 250 seconds]
elphe has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
Exuma has quit [Client Quit]
cschneid has quit [Ping timeout: 240 seconds]
elphe has quit [Ping timeout: 246 seconds]
RougeR has quit [Ping timeout: 272 seconds]
armyriad has quit [Ping timeout: 250 seconds]
paranoicsan has quit [Quit: paranoicsan]
Exuma has joined #ruby
Exuma has quit [Client Quit]
sgen has quit [Ping timeout: 240 seconds]
paranoicsan has joined #ruby
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 268 seconds]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
alxd has left #ruby ["Leaving"]
cnsvc has quit [Ping timeout: 256 seconds]
yqrashawn has joined #ruby
yqrashaw_ has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
evdubs has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
<Calinou>
hi, I'm writing a Jekyll plugin as a convenience method (implementing cache busting) so I'm looking up keys in a hash. However, I can't look up the hash by an object property (which is a string) but I can look it up by a string assigned to a variable
<Calinou>
I'll make it clear Ruby isn't a language I use often, but this still puzzles me… I haven't found anything online about that
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 246 seconds]
<phaul>
Calinou: first glance I can't spot anything, it should work. Can you puts @text == '/static/main.js'? If false it's possible that some non-visible UTF-8 char is in @text
pwnd_nsfw has joined #ruby
<phaul>
the other possibility is if some gem or code messed with String#hash
gix has joined #ruby
<Calinou>
looks like it's always returning false :(
<Calinou>
I'm using a Liquid tag of the form {% asset '/static/main.js' %} to call it
<phaul>
So I don't think @text is a String. You can verify by puts ing its class. puts @text.class. Therefore it's not found in the hash.
<Calinou>
I did that, it's a String
<phaul>
but it's not equal to '/static/main.js' but when printed looks like it. So maybe indeed it contains some non visible differences. check their lengths
cthulchu_ has joined #ruby
<Calinou>
I compared the lengths of a version stripped from its non-ASCII characters and it's the same
laaron has quit [Remote host closed the connection]
cthu| has quit [Ping timeout: 250 seconds]
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 250 seconds]
cschneid has quit [Ping timeout: 250 seconds]
za1b1tsu has quit [Remote host closed the connection]
esrse has quit [Ping timeout: 272 seconds]
aupadhye has quit [Remote host closed the connection]
marvin2 has quit [Ping timeout: 250 seconds]
yqrashawn has joined #ruby
yqrashaw_ has quit [Ping timeout: 246 seconds]
agent_white has quit [Remote host closed the connection]
<marz_d`ghostman>
What does catch(:halt) { yield } do? I know it catches the thrown :halt but what does the { yield } do? I don't see anywhere it's being used with a block passed to it
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Ping timeout: 272 seconds]
elphe has joined #ruby
claudiuinberlin has joined #ruby
cruzo66342 has joined #ruby
cruzo66342 has quit [Ping timeout: 250 seconds]
<marz_d`ghostman>
tbuehlmann: Oh, I see, so the block is passed to invoke, thanks.
venmx has quit [Ping timeout: 246 seconds]
aonemd has quit [Quit: leaving]
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
nchambers has joined #ruby
RougeR has joined #ruby
nchambers is now known as uplime
RougeR has quit [Max SendQ exceeded]
RougeR has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
venmx has joined #ruby
cruzo66342 has joined #ruby
Rapture has joined #ruby
hiroaki has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
cruzo66342 has quit [Remote host closed the connection]
cruzo66342 has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
marz_d`ghostman has quit [Ping timeout: 256 seconds]
Xiti has quit [Ping timeout: 250 seconds]
Nicmavr has joined #ruby
cruzo66342 has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
Mike11 has joined #ruby
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has joined #ruby
claudiuinberlin has quit [Ping timeout: 250 seconds]
elphe has joined #ruby
agent_white has joined #ruby
masterasia has joined #ruby
agent_white has quit [Client Quit]
agent_white has joined #ruby
elphe has quit [Ping timeout: 246 seconds]
agent_white has quit [Quit: brb]
donofrio has joined #ruby
cruzo66342 has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman>
Anyone using concurrent-ruby gem? How do I rescue exception from threads? thread_pool = Concurrent::FixedThreadPool.new(10, max_queue:50) until job_list.empty? job = job_list.shift Concurrent::Promises.future(executor: thread_pool) { MyJob.run(job) }. rescue{ |e| puts e }.result end
cruzo66342 has quit [Remote host closed the connection]
cschneid has joined #ruby
cruzo66342 has joined #ruby
Sembei has joined #ruby
Pisuke has quit [Ping timeout: 272 seconds]
donofrio has quit [Ping timeout: 240 seconds]
cruzo66342 has quit [Ping timeout: 240 seconds]
neuraload has joined #ruby
<marz_d`ghostman>
I was missing the .result at the end though :)
yqrashawn has joined #ruby
yqrashaw_ has quit [Ping timeout: 240 seconds]
sarink has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
donofrio has joined #ruby
neuraload has quit [Quit: This computer has gone to sleep]
davidw has joined #ruby
Xiti` has joined #ruby
Xiti` has quit [Write error: Connection reset by peer]
Xiti` has joined #ruby
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 244 seconds]
Xiti has quit [Ping timeout: 268 seconds]
yqrashaw_ has joined #ruby
ixti has quit [Ping timeout: 245 seconds]
yqrashawn has quit [Ping timeout: 250 seconds]
RougeR has quit [Ping timeout: 245 seconds]
sgen has joined #ruby
cthu| has joined #ruby
santastache is now known as justache
cthulchu_ has quit [Ping timeout: 250 seconds]
cruzo66342 has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
donofrio has quit [Read error: Connection reset by peer]
donofrio has joined #ruby
ua has quit [Ping timeout: 268 seconds]
donofrio has quit [Ping timeout: 246 seconds]
RougeR has joined #ruby
<hays>
what is truffleruby?
cschneid has joined #ruby
gitness has joined #ruby
darkhanb has joined #ruby
ua has joined #ruby
<havenwood>
hays: It's an implementation of Ruby.
<hays>
saw it pop up when checking out the new 2.6
polishdub has joined #ruby
<hays>
(when doing ruby-install)
<havenwood>
hays: It's fun to contribute to as a Rubyist, since much of core is implemented in pure Ruby.
<havenwood>
hays: The other perks are performance and language interop on the GraalVM.
hiroaki has joined #ruby
<hays>
reading about it--never heard of the Graal VM
<havenwood>
At 46.5% Ruby, it's the highest percent Ruby of any of the Ruby implementations.
twobitsprite has joined #ruby
ellcs has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
\void has joined #ruby
sarink has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 244 seconds]
sarink has joined #ruby
spacesuitdiver has joined #ruby
sarink has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil____ has joined #ruby
spacesuitdiver has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
pavelz has quit [Quit: brb]
cschneid has quit [Ping timeout: 250 seconds]
Mike11 has quit [Ping timeout: 244 seconds]
_whitelogger has joined #ruby
hutch has joined #ruby
ixti has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prestorium has quit [Remote host closed the connection]
<hays>
i have been programming in Ruby for a while now and i feel a bit stuck. Not sure I really 'get it' and always feel like im fighting against the language
prestorium has joined #ruby
sauvin has quit [Ping timeout: 245 seconds]
Exuma has joined #ruby
<hays>
i think im missing a high level view of the philosophy of the language and how things are supposed to fit together
<phaul>
hays: is the object model clear to you?
<phaul>
if not digging into that could help I think
<hays>
hmm.. do you mean generally what an object is with reference to OOP?
<phaul>
I mean in Ruby. Modules vs Classes , Meta classes. include, extend prepend etc
sarink has joined #ruby
<hays>
then i must admit I am not clear
<hays>
modules vs. classes has been a point of confusion for me--when I've tried to use them they haven't worked how i expect
<phaul>
if you google ruby object model you should find some material
cthulchu_ has joined #ruby
<hays>
i'll check it out
<phaul>
there is a youtube vid (with Dave Thomas) that's my fav, but it takes him some time to get into the topic, and also some might find his style a bit too much.
ixti has quit [Quit: WeeChat 2.3]
cthu| has quit [Ping timeout: 252 seconds]
gnarmis has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarink has quit [Remote host closed the connection]
laaron has quit [Ping timeout: 256 seconds]
laaron has joined #ruby
gnarmis has joined #ruby
hutch has joined #ruby
sarink has joined #ruby
gnarmis has quit [Client Quit]
arand has quit [Ping timeout: 244 seconds]
spacesuitdiver has joined #ruby
arand has joined #ruby
<hays>
i think im watching it
<hays>
the medium article i read ended at part 1
twobitsprite has quit [Ping timeout: 250 seconds]
sonofentropy has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
hutch has quit [Ping timeout: 246 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
agent_white has quit [Quit: brb]
agent_white has joined #ruby
armyriad has joined #ruby
RougeR has quit [Read error: Connection reset by peer]
hutch has joined #ruby
hutch has quit [Ping timeout: 240 seconds]
sarink has quit [Remote host closed the connection]
jaj8 has joined #ruby
trif has left #ruby [#ruby]
jaj8 has quit [Quit: WeeChat 1.9.1]
jaj8 has joined #ruby
sarink has joined #ruby
jaj8 has quit [Quit: WeeChat 1.9.1]
donofrio has joined #ruby
ellcs has joined #ruby
sarink has quit [Remote host closed the connection]
sarink has joined #ruby
sarink has quit [Remote host closed the connection]
ur5us has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
code_zombie has joined #ruby
donofrio has quit [Ping timeout: 240 seconds]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
<hays>
phaul: good video
<phaul>
it's a bit dated now, but concepts are still the same. prepend did not exist back then
sgen has joined #ruby
sonofentropy has quit [Quit: sonofentropy]
sonofentropy has joined #ruby
sgen has quit [Ping timeout: 250 seconds]
Inline has quit [Read error: Connection reset by peer]
spacesui_ has joined #ruby
spacesui_ has quit [Client Quit]
spacesuitdiver has quit [Ping timeout: 250 seconds]
Inline has joined #ruby
<hays>
i'll read about prepend
<hays>
what about design? e.g. how to use these concepts with coherence
spacesuitdiver has joined #ruby
Exuma has joined #ruby
donofrio has joined #ruby
laaron has quit [Remote host closed the connection]
donofrio has quit [Ping timeout: 250 seconds]
<phaul>
there are books on the subject especially Sandy Metz wrote about Ruby and OOP and she did presentations on various rubyconfs about design. but to me it's always a bit foggy how you reach a design from a specification. For me it's usually trial and error
laaron has joined #ruby
<phaul>
tbh it's also foggy to me how to write a specification. I don't beleive anyone actually does a formal spec anywhere. but if they did rspec would be a tool, maybe.
<hays>
well in an agile environment the spec changes and can be a result of a bit amorphous set of features
<hays>
but i suppose you look at the backlog and do your best to think ahead about it
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<phaul>
yeah, I think this is the part that you can't learn from books, or formulate how to do. You do it a lot and at some point you are better in it :)
<hays>
the code i write tends to start as a script with a bunch of stuff i guess in main
<hays>
i get tripped up transisioning this into reusable code
<hays>
i guess i can put functions in modules and then in my main use extend
arand has quit [Ping timeout: 272 seconds]
tfitts has joined #ruby
<phaul>
I think if you deepen your understanding of these language tools, it will become easier to move code around
arand has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarink has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dellavg_ has quit [Ping timeout: 250 seconds]
masterasia has joined #ruby
Exuma has joined #ruby
sarink has quit [Remote host closed the connection]
elphe has joined #ruby
<hays>
i agree
ur5us has quit [Read error: Connection reset by peer]
sonofentropy has quit [Quit: sonofentropy]
cthu| has joined #ruby
sonofentropy has joined #ruby
<uplime>
is it possible to make classes private to a module?
cthulchu_ has quit [Ping timeout: 252 seconds]
<lupine>
maybe you want private_constant. I wouldnt though
<al2o3-cr>
&>> module Foo class Bar def bar() 42 end end; private_constant :Bar end; Foo::Bar.new
<lupine>
you really need a process boundary to protect anything from malicious users with eval rights in ruby
tdy has joined #ruby
<phaul>
I don't know about any language where visibility scopes mean actual protection in security sense. I don't think there is one, but could be wrong.
<phaul>
c++ you just get to the address and cast
zapata has quit [Ping timeout: 252 seconds]
Exuma has joined #ruby
<phaul>
maybe some domain languages like SQL stored procedures etc