havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: 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!
stdedos has quit [Quit: Connection closed]
darkstardev13 has joined #ruby
seaef has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
mikecmpbll has quit [Quit: inabit. zz.]
banisterfiend has joined #ruby
seaef has quit [Quit: I am functioning within established parameters.]
ElFerna has joined #ruby
ElFerna has quit [Remote host closed the connection]
jinmiaoluo has quit [Remote host closed the connection]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jinmiaoluo has joined #ruby
ChmEarl has quit [Quit: Leaving]
nofxx has joined #ruby
banisterfiend has quit [Quit: banisterfiend]
Esa__ has quit [Ping timeout: 260 seconds]
goepsilongo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has joined #ruby
gix has quit [Disconnected by services]
wymillerlinux_ has joined #ruby
wymillerlinux has quit [Ping timeout: 256 seconds]
wymillerlinux_ is now known as wymillerlinux
_whitelogger has joined #ruby
chalkmonster has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby
dviola has quit [Quit: WeeChat 2.8]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
jinmiaoluo has quit [Ping timeout: 256 seconds]
lunarkitty has quit [Ping timeout: 260 seconds]
lunarkitty has joined #ruby
wymillerlinux has quit [Ping timeout: 265 seconds]
idiocrash has joined #ruby
cd has quit [Quit: cd]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
charon77 has joined #ruby
idiocrash has quit [Ping timeout: 272 seconds]
idiocrash has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
mibr has joined #ruby
stdedos has joined #ruby
_whitelogger has joined #ruby
jingjinghack has joined #ruby
cnsvc has quit [Quit: WeeChat 2.8]
cnsvc has joined #ruby
charon77 has quit [Quit: WeeChat 2.8]
jingjinghack has quit [Quit: WeeChat 2.1]
dhollinger has quit [Ping timeout: 256 seconds]
dhollinger has joined #ruby
jinmiaoluo has joined #ruby
conta has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
imode has quit [Ping timeout: 256 seconds]
kristian_on_linu has joined #ruby
cnsvc_ has joined #ruby
dviola has quit [Quit: WeeChat 2.8]
cnsvc has quit [Remote host closed the connection]
universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
cnsvc_ has quit [Ping timeout: 240 seconds]
universa1 has joined #ruby
ur5us has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem_ has joined #ruby
akem has quit [Ping timeout: 264 seconds]
leah2 has quit [Ping timeout: 260 seconds]
idiocrash has quit [Quit: Textual IRC Client: www.textualapp.com]
volix has joined #ruby
goepsilongo has joined #ruby
conta has quit [Quit: conta]
leah2 has joined #ruby
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
cnsvc_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc_ has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
goepsilongo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc_ has joined #ruby
schne1der has joined #ruby
goepsilongo has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
BH23 has quit [Remote host closed the connection]
jinmiaoluo has quit [Ping timeout: 264 seconds]
BH23 has joined #ruby
deathwishdave has joined #ruby
jinmiaoluo has joined #ruby
cnsvc_ has joined #ruby
stdedos has quit [Quit: Connection closed]
gfawcett has joined #ruby
deathwishdave has quit [Ping timeout: 265 seconds]
goepsilongo has quit [Quit: Textual IRC Client: www.textualapp.com]
schne1der has quit [Ping timeout: 258 seconds]
chalkmonster has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
mnemon has quit [Ping timeout: 252 seconds]
mnemon has joined #ruby
cnsvc_ has joined #ruby
peteretep has quit [Ping timeout: 260 seconds]
JayDoubleu has quit [Ping timeout: 260 seconds]
jinmiaoluo has quit [Ping timeout: 265 seconds]
rann has quit [Ping timeout: 272 seconds]
Argorok has quit [Read error: Connection reset by peer]
cnsvc_ has quit [Ping timeout: 240 seconds]
maxmanders has quit [Ping timeout: 240 seconds]
sorah has quit [Ping timeout: 260 seconds]
KnownSyntax has quit [Ping timeout: 265 seconds]
coffeejunk has quit [Ping timeout: 265 seconds]
graphicsv has quit [Ping timeout: 260 seconds]
peteretep has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Max SendQ exceeded]
lipoqil has quit [Ping timeout: 272 seconds]
peteretep has quit [Max SendQ exceeded]
deathwishdave has joined #ruby
lipoqil has joined #ruby
NODE has quit [Excess Flood]
Argorok has joined #ruby
rann has joined #ruby
JayDoubleu has joined #ruby
graphicsv has joined #ruby
peteretep has joined #ruby
coffeejunk has joined #ruby
NODE has joined #ruby
maxmanders has joined #ruby
KnownSyntax has joined #ruby
Pie_Mage has quit [Ping timeout: 260 seconds]
mibr has quit [Quit: mibr]
hightower4 has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
Pie_Mage has joined #ruby
FastJack has quit [Ping timeout: 256 seconds]
FastJack has joined #ruby
wymillerlinux has joined #ruby
akem_ has quit [Quit: Leaving]
cnsvc_ has joined #ruby
akemhp has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
ChmEarl has joined #ruby
alexherbo2 has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has quit [Ping timeout: 272 seconds]
rubydoc has quit [Ping timeout: 272 seconds]
foxxx0 has quit [Quit: foxxx0]
rubydoc has joined #ruby
phaul has joined #ruby
foxxx0 has joined #ruby
lucasb has joined #ruby
TCZ has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
akem has joined #ruby
akemhp has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
alexherbo25 has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo25 is now known as alexherbo2
conta has joined #ruby
wogi has joined #ruby
NODE has quit [Quit: changing servers]
kristian_on_linu has quit [Remote host closed the connection]
NODE has joined #ruby
morantron has joined #ruby
<morantron> hi! i'm building a CLI, and i've noticed that running ruby with --disable-gems reduces startup significantly (https://gist.github.com/Morantron/bf3ab8aa6cefc472347059a034e1889f). If I use this flag, does it means I cannot use 3rd party gems?
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
havenwood has quit [Quit: ZNC 1.7.5 - https://znc.in]
havenwood has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> morantron: No, it doesn't mean you can't use gems, but it does mean you'd have to require rubygems before doing so.
<havenwood> morantron: The modern variant of the flag is: --disable=gems
<havenwood> morantron: For example, this is slow like not disabling RubyGems: ruby --disable="gems" -r rubygems -e "0"
<morantron> but requiring rubygems incurs in those extra ~50ms right?
<havenwood> morantron: The extra time, yes.
<havenwood> morantron: You can defer it from startup, but can't eliminate it if you want RubyGems.
<havenwood> morantron: What gems are you using?
<morantron> i understand
<morantron> right now, none at the moment
<morantron> but i was considering maybe using thor, or colorize
<morantron> but startup time is important in my use case, so i might just not use them
<havenwood> morantron: Ruby ships with OptionParser. We can help with usage. Colors are easy without a gem.
<havenwood> morantron: Crystal is fast if startup time matters and comes with colors and option parsing.
<morantron> cool! thanks havenwood
<havenwood> morantron: you're welcome. happy coding!
<morantron> i considered crystal too, but in the end felt more comfortable with ruby :B
tolarz has joined #ruby
<morantron> also distribution is easier with ruby, i guess
<tolarz> I have this in Ruby: fun do // :pop! // end where // are newlines
<tolarz> Strangely, if I do fun do // :pop!(5) // end I get a syntax error telling me it's expecting end in the line of pop
<tolarz> pop! is a function
<morantron> i wonder if it's possible to not require rubygems but still distribute the cli through there lol
<havenwood> morantron: yes
<havenwood> tolarz: Show code?
<havenwood> tolarz: This appears to be a Symbol, so assuming it's psudocode? :pop!
<tolarz> havenwood: https://pastebin.com/5UqWc2UC line 33
<ruby[bot]> tolarz: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<tolarz> No, it's real code
<tolarz> but I autogenerate it from Python
<havenwood> tolarz: Yeah, it's a Symbol, not a function.
<havenwood> &>> :pop!.class
<tolarz> here's the pop method
<rubydoc> # => Symbol (https://carc.in/#/r/94yv)
<morantron> tolarz: you might need to remove that ':' from the beginning
seaef has joined #ruby
<havenwood> tolarz: Is there a #pop method available in this context?
<morantron> havenwood: any tips on how to avoid requiring rubygems but still use it for distribution?
<tolarz> wonderful, now it's valid syntax
<tolarz> but it doesn't find pop upon runtime
cnsvc_ has joined #ruby
<havenwood> tolarz: It seems there's no #pop method available on the receiver.
<havenwood> tolarz: You can check `defined? pop` to see if there's a method or local varialble.
<tolarz> my class inherits from RegexLexer and pop is a method there
<havenwood> tolarz: With an exclamation mark?
<havenwood> tolarz: #pop!
<tolarz> why the hash?
<havenwood> tolarz: That's how we reference an instance method.
<havenwood> tolarz: If so, check the receiver of the method. What's `self` where you're calling the #pop! method?
<havenwood> tolarz: You can `p self` or if you want to debug, put a `binding.irb` in the code to jump into the irb REPL at that spot.
<havenwood> morantron: Your executable shebang should determine how Ruby is used.
<morantron> thanks havenwood
<havenwood> morantron: You might have portability issues using a flag in the shebang though.
<havenwood> morantron: I haven't tried it for --disable=gems
<morantron> yeah! i saw that hahaha
<morantron> worked on my machine, but as soon as i tried on a VM with an older ubuntu version it crashed
<havenwood> morantron: I'd expect it to work on macOS, but `#!/usr/bin/env ruby --disable="gems"` might not work on Linux.
<morantron> yep, i'll need to take portability into account
<havenwood> I'd expect it to not work on Linux, to be more precise.
cnsvc_ has quit [Ping timeout: 240 seconds]
<tolarz> havenwood: got it sorted, thank you!
<havenwood> morantron: You could alternatively instruct your users how to pass the flag.
<havenwood> tolarz: any time!
<havenwood> morantron: I'm not immediately thinking of a way to add the flag without shebang support.
<morantron> my CLI is kinda weird, since it calls itself
<morantron> it's a tmux plugin, and the first time it runs when tmux.conf it's sourced ( i'm not concerned about startup time here )
<morantron> so i can just include the flag when the CLI calls itself
<havenwood> morantron: Do you need to shell out when it calls itself? Can you stay inside a single process? (I'm not clear on what you're doing.)
<morantron> it's hard to explain
alexherbo21 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo21 is now known as alexherbo2
rippa has joined #ruby
fmcs has left #ruby [#ruby]
imode has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kristian_on_linu has joined #ruby
orbyt_ has joined #ruby
xco has joined #ruby
schne1der has joined #ruby
seaef has quit [Quit: ZZZzzz…]
seaef has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mheld has joined #ruby
NODE has quit []
Benett has quit [Remote host closed the connection]
Benett has joined #ruby
cnsvc_ has joined #ruby
Manis has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<Manis> Hi. I have a deployment script that checks out a Git repository and runs "bundle install --deployment". Unfortunately the bundle install takes quite a bit of time to compile all the C dependencies. Is there a way to cache the compiled binaries?
<tolarz> havenwood: heya, I can now convert a subset of Python code to Ruby!
chalkmonster has quit [Quit: WeeChat 2.8]
<tolarz> and it works perfectly, thanks again
NODE has joined #ruby
wogi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wogi has joined #ruby
xco has joined #ruby
duderonomy has joined #ruby
conta has quit [Quit: conta]
tolarz has left #ruby ["WeeChat 2.3"]
tau has joined #ruby
tau has quit [Remote host closed the connection]
xco has quit [Read error: Connection reset by peer]
wogi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Manis has quit [Quit: WeeChat 2.3]
wogi has joined #ruby
Xiti has quit [Quit: Leaving]
ldepandis has joined #ruby
Xiti has joined #ruby
wogi has quit [Ping timeout: 272 seconds]
schne1der has quit [Ping timeout: 265 seconds]
wymillerlinux has quit [Read error: Connection reset by peer]
wymillerlinux has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
cd has joined #ruby
wogi has joined #ruby
TCZ has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
ljarvis has joined #ruby
cnsvc has joined #ruby
DTZUZU has joined #ruby
ur5us has joined #ruby
sh7d has quit [Quit: meh]
wogi has quit [Quit: Textual IRC Client: www.textualapp.com]
sh7d has joined #ruby
cnsvc_ has joined #ruby
jeromelanteri has quit [Remote host closed the connection]
deathwishdave has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
deathwishdave has quit [Ping timeout: 272 seconds]
impermanence has quit [Quit: Connection closed]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #ruby
seaef has quit [Quit: I am functioning within established parameters.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
Exuma has quit [Client Quit]
alexherbo2 has quit [Ping timeout: 272 seconds]
TCZ has quit [Quit: Leaving]
pwnd__ has quit [Quit: Leaving]
lucasb has quit [Quit: Connection closed for inactivity]
pwnd_nsfw has joined #ruby
alexherbo2 has joined #ruby
C-Keen has joined #ruby
Technodrome has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 240 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
armatechnicos has joined #ruby
armatechnicos has left #ruby [#ruby]
akem_ has joined #ruby
akem__ has joined #ruby
pwnd_nsfw` has joined #ruby
akem has quit [Ping timeout: 265 seconds]
pwnd_nsfw` has quit [Client Quit]
akem_ has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
pwnd_nsfw has quit [Ping timeout: 258 seconds]
TCZ has joined #ruby
TCZ has quit [Client Quit]