havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.1, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
hd1 has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4.1]
perrierjouet has joined #ruby
fef has quit [Ping timeout: 240 seconds]
hd1 has quit [Quit: Connection closed]
fef has joined #ruby
fef has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Quit: WeeChat 3.4.1]
eddof13 has joined #ruby
perrierjouet has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
hd1 has joined #ruby
hd1 has left #ruby [#ruby]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
ur5us has joined #ruby
tuxcrafter16 has joined #ruby
Rounin has quit [Ping timeout: 272 seconds]
tuxcrafter has quit [Ping timeout: 256 seconds]
perrierjouet has quit [Quit: WeeChat 3.4.1]
erts has quit [Quit: .]
ua_ has quit [Ping timeout: 256 seconds]
ua_ has joined #ruby
roadie has joined #ruby
wand has quit [Remote host closed the connection]
wand has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
roadie has quit [Ping timeout: 252 seconds]
o|||||o has quit [Remote host closed the connection]
o|||||o has joined #ruby
polishdub has joined #ruby
roadie has joined #ruby
RedNifre2 has quit [Ping timeout: 250 seconds]
whysthatso12507 has quit [Read error: Connection reset by peer]
whysthatso12507 has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
RedNifre2 has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex3 has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
_ht has joined #ruby
roadie has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
tuxcrafter1673 has joined #ruby
tuxcrafter16 has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #ruby
teclator has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
taupiqueur has joined #ruby
dionysus69 has joined #ruby
oxfuxxx has joined #ruby
gproto23 has joined #ruby
a7tism has joined #ruby
_ht has quit [Remote host closed the connection]
Rounin has joined #ruby
d-s has quit [Remote host closed the connection]
DEac- has quit [Ping timeout: 240 seconds]
DEac- has joined #ruby
tuxcrafter1673 has quit [Quit: Ping timeout (120 seconds)]
tuxcrafter1673 has joined #ruby
reset has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
o|||||o has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
<Synthead> I have some unused params in a method, like my_method(use_this, use_that, _unused). I am documenting this with yardoc. Does it matter what I say what type of object these params are documented as? Can I put void there or something?
oxfuxxx has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
weaksauce has quit [Ping timeout: 252 seconds]
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
oxfuxxx has quit [Ping timeout: 250 seconds]
Thanzex3 has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has joined #ruby
TCZ has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
<jhass[m]> why would you have unused arguments in a public API?
oxfuxxx has quit [Ping timeout: 272 seconds]
Synthead has quit [Quit: Leaving]
o|||||o has joined #ruby
<ox1eef> or any API for that matter
tuxcrafter1673 has quit [Quit: Client closed]
tuxcrafter1673 has joined #ruby
_axx has left #ruby [The Lounge - https://thelounge.chat]
ivanf has quit [Quit: Textual IRC Client: www.textualapp.com]
dionysus69 has quit [Ping timeout: 272 seconds]
markong has joined #ruby
tuxcrafter1673 has quit [Quit: Client closed]
tuxcrafter1673 has joined #ruby
tuxcrafter1673 has quit [Quit: Client closed]
tuxcrafter1673 has joined #ruby
perrierjouet has joined #ruby
ivanf has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
Tomte has joined #ruby
taupiqueur has joined #ruby
TCZ has quit [Quit: Leaving]
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
dionysus70 is now known as dionysus69
<adam12> morning
<jhass[m]> ox1eef: it happens when you implement some hook method or override something in a child class. Just that being documentation points would be weird
<ox1eef> i see, so there could be a method in the ancestry tree using the argument, and the child doesn't want to break the signature. that makes sense, but id still question doing it at all - i'd try to do it another way.
<ox1eef> good morning adam12
<adam12> ox1eef: happy friday!
<ox1eef> same to you :)
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 250 seconds]
roadie has quit [Ping timeout: 240 seconds]
taupiqueur_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 256 seconds]
taupiqueur has quit [Ping timeout: 268 seconds]
moldorcoder7 has joined #ruby
cahoots has joined #ruby
<cahoots> hi, what's the easiest way to pass a block given to my function to a helper function? sth like def my_func_that_takes_a_block(array) ; array.sort_by(block_that_was_passed_in) ; ...
gr33n7007h has joined #ruby
<jhass[m]> cahoots: def outer(&block); inner(&block); end; block is just a common variable name for this, could be anything
<cahoots> jhass[m], ty
cahoots has quit [Quit: leaving]
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
roadie has joined #ruby
taupiqueur_ has quit [Ping timeout: 260 seconds]
taupiqueur has joined #ruby
taupiqueur has quit [Remote host closed the connection]
<adam12> Ruby 3.1 supports anonymous block forwarding. def outer(&); inner(&)... I'm presuming this might be a performance optimization of some sort, because for readability it's a meh from me.
taupiqueur has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
taupiqueur has quit [Ping timeout: 256 seconds]
<jhass[m]> pretty sure explicit forwarding was already heavily optimized
<adam12> I wonder if & avoids an allocation (or two)...
<mooff> i wondered if storing a block necessarily prevents all local variables in its scope from being GCd, even if it doesn't appear to use them
taupiqueur has joined #ruby
<mooff> because for instance, it could run send('b'.+('inding')).local_variable_get('cool_local'.to_sym) at any point in future
taupiqueur has quit [Ping timeout: 272 seconds]
<ox1eef> yeah, some of these recent syntax changes feel like embracing perlism
roadie has joined #ruby
<jhass[m]> that's what I mean with heavily optimized, I wouldn't be surprised to learn there's a little of escape analysis done to avoid storing the block when it's just forwarded
taupiqueur has joined #ruby
<ox1eef> there's two things i think python got right: one way to do it, and be explicit (aka obvious)
<jhass[m]> hum, Ruby indeed is quite the counter thesis to that. If Ruby would follow those same principles I don't think it'd look significantly different to python. Which makes me wonder what you're doing in this channel then :D
<ox1eef> i made that choice like a decade ago, i dont see a benefit to moving to python because theyre very similar in some ways, python just has a more vibrant ecosystem
oxfuxxx has joined #ruby
taupiqueur has quit [Ping timeout: 252 seconds]
<adam12> It would be nice for them to slow down on syntax changes. A lot of 3rd party software is suffering because of it.
roadie has quit [Ping timeout: 252 seconds]
<adam12> Especially without a great story for parsing Ruby outside of Ruby (ie Ripper). And Ripper itself is a bit of an opaque box in itself.
<adam12> There was talks from kddnewton about normalizing a Ruby parser as a library, not built on Bison, which is interesting. And the peeps at Natalie are working on extracting their parser.
<adam12> If we had an official parser we could build as a .so, I think more interesting options would develop.
taupiqueur has joined #ruby
<ox1eef> agreed
John_Ivan_ has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
John_Ivan__ has joined #ruby
John_Ivan_ has quit [Ping timeout: 260 seconds]
moldorcoder7 has quit [Ping timeout: 256 seconds]
moldorcoder7 has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
oxfuxxx has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 260 seconds]
taupiqueur has quit [Remote host closed the connection]
roadie has joined #ruby
taupiqueur has joined #ruby
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
weaksauce has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 240 seconds]
Tomte has quit [Ping timeout: 245 seconds]
gr33n7007h has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
roadie has joined #ruby
howdoi has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
taupiqueur_ has quit [Ping timeout: 256 seconds]
taupiqueur has joined #ruby
roadie has joined #ruby
quintasan has quit []
pgib has joined #ruby
quintasan has joined #ruby
markong has quit [Ping timeout: 260 seconds]
perrierjouet has quit [Quit: WeeChat 3.4.1]
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
justOkay has quit [Read error: Connection reset by peer]
justOkay has joined #ruby
Tomte has joined #ruby
roadie has joined #ruby
taupiqueur has quit [Quit: taupiqueur]
lunarkitty has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
ur5us has quit [Ping timeout: 240 seconds]
gproto23 has quit [Quit: Leaving]
Tomte has quit [Read error: Connection reset by peer]
o|||||o has quit [Ping timeout: 260 seconds]
o|||||o has joined #ruby
perrierjouet has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
oxfuxxx has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
oxfuxxx has joined #ruby
___nick___ has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
oxfuxxx has quit [Ping timeout: 252 seconds]
a1eaiactaest has joined #ruby
<a1eaiactaest> hello, anyone has experience in writing homebrew formulas?
<weaksauce> a1eaiactaest just ask and if someone knows they will help you
<a1eaiactaest> ok, so im trying to write home brew formula but it's downloading all files from tor, and my question is it possible by ruby to launch tor browser in background (it enables sock5 proxy) and then download it as
jmcgnh has quit [Ping timeout: 256 seconds]
<a1eaiactaest> shit missclick
<a1eaiactaest> gonna finish now
<a1eaiactaest> and download from .onion site zip file, rest is trivial
<a1eaiactaest> short: homebrew formula but get files from .onion site
<weaksauce> should be able to since it's just ruby
<ox1eef> i suggest checking if tor service is enabled, and if it is not tell the user to connect to the tor network / enable the tor service. there is no easy way to do it with the browser, youd have to try control it remotely. so the easiest way is to bail and inform.
o|||||o has quit [Ping timeout: 256 seconds]
jmcgnh has joined #ruby
<a1eaiactaest> so if user doesnt have tor enabled just print something like: run tor browser in background for example and then do the rest?
<ox1eef> does the tor browser have to be used? because that is enabling tor for one process, the tor service would be better
<a1eaiactaest> well, something that enables socks5 proxy. I know tor browser does. don't know about tor service tho.
<a1eaiactaest> what about https://formulae.brew.sh/formula/tor
<a1eaiactaest> it's not tor-browser
<a1eaiactaest> contacted a friend, he says that only running a tor service would technicaly work.
lunarkitty has quit [Quit: Connection closed for inactivity]
<ox1eef> i dont know homebrew, but it probably has some way to check if another package service is running or not
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<a1eaiactaest> if not there could be a way to do it in ruby. new to ruby so i don't know much about it. gonna learn a lot in next few days for sure
<ox1eef> if you want to go that route then id look into remote debugging options on FF.
<a1eaiactaest> what is FF?
<ox1eef> chrome has something similar, and on top of it chrome-driver was built, which you can use to control the browser from code.
<ox1eef> FF means FireFox
<a1eaiactaest> ok
<a1eaiactaest> no i just want it to run in the background so proxy is enabled
<ox1eef> sounds like firefox would have something similar
<ox1eef> seems over the top for a homebrew formula though
<weaksauce> you could use applescript to figure out if tor is around
<weaksauce> and tell it to open
<weaksauce> write a custom function that does the checking and opening. firefox probably has headless too but not sure
<weaksauce> applescript is pretty awful though
<a1eaiactaest> ox1eef mantioned it eariler: browser could be unnecessary, tor service could make a job
<a1eaiactaest> wait a minute i'll test it
<ox1eef> apple script was a cool idea
<a1eaiactaest> oh i think i figured it out
<a1eaiactaest> is there a way in ruby to call curl?
<a1eaiactaest> something like system()
<weaksauce> sure you can use system or `` i imagine or even popen if you need something stronger
<a1eaiactaest> great
<weaksauce> osascript is what you'd want to use for scripting
<weaksauce> if you go that route
<weaksauce> guess it depends on how robust you are trying to make it
<a1eaiactaest> if everything goes as planned i'll send you PR link tomorrow or day after
<a1eaiactaest> thanks for help!
<weaksauce> good luck
<a1eaiactaest> thank you
moldorcoder7 has quit [Ping timeout: 256 seconds]
moldorcoder7 has joined #ruby
atille has quit [Quit: Bye]
ur5us has joined #ruby
a1eaiactaest has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 240 seconds]
o|||||o has joined #ruby
mdemo has quit [Quit: The Lounge - https://thelounge.github.io]
finsternis has quit [Read error: Connection reset by peer]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby