havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.0, 2.5.3, 2.4.5: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
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]
evdubs has joined #ruby
ur5us has joined #ruby
elphe has joined #ruby
C-o has quit [Quit: ZNC - http://znc.in]
laaron has joined #ruby
cruzo66342 has joined #ruby
Calinou has joined #ruby
cruzo66342 has quit [Ping timeout: 272 seconds]
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
masterasia has joined #ruby
<Calinou> that's the code I'm using for testing: https://dpaste.de/r23m
laaron has joined #ruby
<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
<Calinou> like this: https://dpaste.de/8tBq
tdy has quit [Ping timeout: 245 seconds]
cthu| has quit [Ping timeout: 268 seconds]
<phaul> weird. Assuming that String#== is not overriden eqaul strings should be equal
<phaul> &>> @a = 'text'; @a == 'text'
<rubydoc> # => true (https://carc.in/#/r/5uuv)
tdy has joined #ruby
<phaul> Calinou: print their .encoding
<phaul> maybe that's different
<Calinou> they're both in UTF-8
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
yqrashawn has joined #ruby
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
yqrashaw_ has quit [Ping timeout: 245 seconds]
laaron has joined #ruby
ur5us has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
laaron 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
paranoicsan has quit [Quit: paranoicsan]
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 272 seconds]
<Calinou> phaul: I solved my problem by using an include file as a Liquid function of sorts :) this will do for now
<phaul> cool. I don't get what that means but important thing is that it works :)
tdy has quit [Ping timeout: 240 seconds]
yqrashawn has joined #ruby
cthu| has joined #ruby
yqrashaw_ has quit [Ping timeout: 250 seconds]
cthulchu_ has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
aonemd has joined #ruby
reber has joined #ruby
r3m has joined #ruby
cthulchu_ has joined #ruby
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
yqrashaw_ has joined #ruby
yqrashawn has quit [Ping timeout: 240 seconds]
n13z has quit [Quit: leaving]
AJA4350 has joined #ruby
cow[moo] has joined #ruby
yqrashawn has joined #ruby
yqrashaw_ has quit [Ping timeout: 250 seconds]
kapil____ has joined #ruby
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
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
<marz_d`ghostman> Sorry, mispasted it, I meant: https://gist.github.com/marzdgzmn/37ef33a17716fae30db86446b4d8b769
<marz_d`ghostman> Doesn't seem to work
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…]
gnarmis has quit [Quit: Mutter: www.mutterirc.com]
donofrio has joined #ruby
raulp has joined #ruby
agent_white has joined #ruby
donofrio has quit [Ping timeout: 272 seconds]
laaron has joined #ruby
sgen has quit [Ping timeout: 246 seconds]
hutch has quit [Ping timeout: 250 seconds]
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
<rubydoc> # => private constant Foo::Bar referenced (NameError) (https://carc.in/#/r/5uzx)
agent_white has quit [Quit: gettingpurty]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
planigan has quit [Ping timeout: 250 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
<uplime> hm, ok
_whitelogger has joined #ruby
planigan has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
<phaul> &>> module Foo class Bar def bar; 42 end; end; def self.x; Bar; end; private_constant :Bar; end; Foo.x.new
<rubydoc> # => #<Foo::Bar:0x0000564a92c83218> (https://carc.in/#/r/5v05)
<phaul> so it's really just the constant
<al2o3-cr> sure, nothing is really private.
<al2o3-cr> &>> module Foo class Bar def bar() 42 end end; private_constant :Bar end; Foo.const_get(:Bar).new.bar
<rubydoc> # => 42 (https://carc.in/#/r/5v09)
<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
tiff has joined #ruby
elphe has quit [Ping timeout: 244 seconds]
polishdub has quit [Quit: leaving]
<baweaver> I bring fun and more Ruby hackery! Rejoice! - https://medium.com/@baweaver/mf-abusing-rubys-operator-precedence-ccf3f071bad8
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> baweaver: there is also >> for inverse order.
<baweaver> Yep. I should probably note that.
<al2o3-cr> aye, nice write up also.
<baweaver> al2o3-cr: 26 articles down so far this year
hutch has joined #ruby
<baweaver> Wonder if I can get up to 30 by end of year.
<al2o3-cr> 4 articles in 5 days no problem hehe ;)
<baweaver> Technically I have a few articles in half-state I just haven't finished, so there's three
<baweaver> then one more RubyConf recap probably
reber has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 245 seconds]
<al2o3-cr> it'll be close tbh ;)
laaron has quit [Ping timeout: 256 seconds]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron- has joined #ruby
<al2o3-cr> but should be doable.
<al2o3-cr> hey, baweaver; def up(s) s.upcase end; def re(s) s.reverse end; ["foo", "bar", "baz"].map &method(:up) << method(:re)
<al2o3-cr> also works on Method too.
<baweaver> Yep, and I'll likely do an entire writeup on that part of it
<al2o3-cr> only just really looking through 2.6 new features myself.
<baweaver> Was really hoping that .: got into 2.6, so I'll have to rewrite that section of it.
<al2o3-cr> yeah Enumarable#chain is pretty cool.
<al2o3-cr> (1..10).each.+([*?a..?f]) { ... }
<lupine> oh very nice
<al2o3-cr> Enumerator#chain sorry
<baweaver> Still need to finish that one out
<al2o3-cr> i quite like this one: ((1..20).%(4)).to_a #=> [1, 5, 9, 13, 17]
<al2o3-cr> chain is aliased to + & step is aliased to %
<baweaver> I'm still convinced that's just so Mame could code golf more cleanly :P
<al2o3-cr> hehe ;)
<phaul> but why is it .% ? why the . if % is an operator?
<al2o3-cr> ((1..)%(4)).take(10) phaul this is valid.
<phaul> ah. cool.
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> as is (1..10).each+[23..33]
agent_white has joined #ruby
<al2o3-cr> baweaver: is this is intended? .then(&JSON.:parse)
<baweaver> I was hoping that 2.6 had the method shorthand
<baweaver> but it doesn't and that article isn't published so I intended to fix it ltaer.
<baweaver> later*
<al2o3-cr> ah.. i see.
hiroaki has quit [Ping timeout: 252 seconds]
<baweaver> Eh, why not, let's finish it off right quick
<al2o3-cr> nifty example at the end there baweaver
<phaul> random pondering.. would ((1..).each + (1..).each).take(10) run for ever or work..
<baweaver> brb, 30m or so, need to think of some contrived examples
<al2o3-cr> phaul: you don't need the last each
<al2o3-cr> and it works
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul> i havent looked at any of 2.6 in any detail yet, but as soon as arch releases the new packages Im updating :)
Exuma has joined #ruby
<al2o3-cr> phaul: that'll be next year then.
<al2o3-cr> always seems forever before it comes out of testing.
<phaul> especially if its a new ruby release ;)
<al2o3-cr> aye for ruby, python is generally within a day or so.
hutch has quit [Ping timeout: 245 seconds]
<al2o3-cr> actually i think they had a problem merging 2.5 last year, can't remember the details now though.
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tfitts has quit [Quit: Connection closed for inactivity]
<al2o3-cr> i got it wrong twice; Enumerable#chain & Enumerator#+ (that better be right ;)
bga57 has joined #ruby
<phaul> I guess because Array#+ and such would collide
<phaul> have you tried --jit yet?
<al2o3-cr> phaul: no, not really. i don't write anything big enough to probably take advantage of it.
tdy has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
elphe has joined #ruby
<al2o3-cr> phaul: you can now do this too: (?a..?e).to_h { |v| [v, v.ord] } # without using map and then an extra method call to to_h
<al2o3-cr> which i think is pretty handy tbh.
<phaul> yeah I saw that on the channel few days back, but until one starts using these things in practise one forgets.. :)
<al2o3-cr> true
<phaul> &>> "you have to learn new stuff, rubydoc"..
<rubydoc> # => (https://carc.in/#/r/5v0m)
tdy has quit [Ping timeout: 250 seconds]
prestorium has quit [Quit: prestorium]
<baweaver> 27