everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Trivial fixes for setup.rb usage.
@ 2019-12-01 20:03 James Rowe
  2019-12-01 20:03 ` [PATCH 1/2] setup: update to use RbConfig James Rowe
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: James Rowe @ 2019-12-01 20:03 UTC (permalink / raw)
  To: dtas-all; +Cc: James Rowe

Having decided to update my dtas installation, I noticed a couple of
problems with installation using the included `setup.rb`.

Given that the `Config` name was removed so long ago, an alternative fix
might be to remove `setup.rb` altogether?

Thanks,

James

James Rowe (2):
  setup: update to use RbConfig
  setup: fix duplicate variable warning

 setup.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] setup: update to use RbConfig
  2019-12-01 20:03 [PATCH 0/2] Trivial fixes for setup.rb usage James Rowe
@ 2019-12-01 20:03 ` James Rowe
  2019-12-01 20:03 ` [PATCH 2/2] setup: fix duplicate variable warning James Rowe
  2019-12-02  8:23 ` [PATCH 0/2] Trivial fixes for setup.rb usage Eric Wong
  2 siblings, 0 replies; 5+ messages in thread
From: James Rowe @ 2019-12-01 20:03 UTC (permalink / raw)
  To: dtas-all; +Cc: James Rowe

`Config` was removed years ago¹, and is not supported in any Ruby release
that dtas supports.

1. https://bugs.ruby-lang.org/issues/6809
---
 setup.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.rb b/setup.rb
index 9f0c826..65380f4 100644
--- a/setup.rb
+++ b/setup.rb
@@ -785,7 +785,7 @@ def ToplevelInstaller.load_rbconfig
     else
       require 'rbconfig'
     end
-    ::Config::CONFIG
+    ::RbConfig::CONFIG
   end
 
   def initialize(ardir_root, config)
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] setup: fix duplicate variable warning
  2019-12-01 20:03 [PATCH 0/2] Trivial fixes for setup.rb usage James Rowe
  2019-12-01 20:03 ` [PATCH 1/2] setup: update to use RbConfig James Rowe
@ 2019-12-01 20:03 ` James Rowe
  2019-12-02  8:23 ` [PATCH 0/2] Trivial fixes for setup.rb usage Eric Wong
  2 siblings, 0 replies; 5+ messages in thread
From: James Rowe @ 2019-12-01 20:03 UTC (permalink / raw)
  To: dtas-all; +Cc: James Rowe

---
 setup.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/setup.rb b/setup.rb
index 65380f4..4fe301d 100644
--- a/setup.rb
+++ b/setup.rb
@@ -281,7 +281,6 @@ def multipackage_entries
     'site-ruby-common' => 'siteruby',     # For backward compatibility
     'site-ruby'        => 'siterubyver',  # For backward compatibility
     'bin-dir'          => 'bindir',
-    'bin-dir'          => 'bindir',
     'rb-dir'           => 'rbdir',
     'so-dir'           => 'sodir',
     'data-dir'         => 'datadir',
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Trivial fixes for setup.rb usage.
  2019-12-01 20:03 [PATCH 0/2] Trivial fixes for setup.rb usage James Rowe
  2019-12-01 20:03 ` [PATCH 1/2] setup: update to use RbConfig James Rowe
  2019-12-01 20:03 ` [PATCH 2/2] setup: fix duplicate variable warning James Rowe
@ 2019-12-02  8:23 ` Eric Wong
  2019-12-02 13:27   ` James Rowe
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2019-12-02  8:23 UTC (permalink / raw)
  To: James Rowe; +Cc: dtas-all

James Rowe <jnrowe@gmail.com> wrote:
> Having decided to update my dtas installation, I noticed a couple of
> problems with installation using the included `setup.rb`.

Thanks!  Applied and pushed.

> Given that the `Config` name was removed so long ago, an alternative fix
> might be to remove `setup.rb` altogether?

RubyGems is a huge barrier to startup performance; so users
should be able to opt-out of using gems.  A painful thing is
just having more gems installed (and even not using them)
slows down startup.

Removing use of sleepy_penguin is also going to help in that
area a small bit, at least (if users uninstall it).

I might rewrite shebangs and load paths via "make install" or
similar, and allow the shebang to use "--disable=gems", too...
(but yeah, also brainstorming some ideas around creating a new
 scripting language because I've been hugely frustrated with
 the incompatibilities/warnings Ruby is introducing for 2.7..)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Trivial fixes for setup.rb usage.
  2019-12-02  8:23 ` [PATCH 0/2] Trivial fixes for setup.rb usage Eric Wong
@ 2019-12-02 13:27   ` James Rowe
  0 siblings, 0 replies; 5+ messages in thread
From: James Rowe @ 2019-12-02 13:27 UTC (permalink / raw)
  To: Eric Wong; +Cc: dtas-all

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

* Eric Wong (e@80x24.org) wrote:
> James Rowe <jnrowe@gmail.com> wrote:
> > Given that the `Config` name was removed so long ago, an alternative fix
> > might be to remove `setup.rb` altogether?
>
> RubyGems is a huge barrier to startup performance; so users
> should be able to opt-out of using gems.  A painful thing is
> just having more gems installed (and even not using them)
> slows down startup.

  Wow, I hadn’t realised how costly that was.  As another data point for
your thoughts, my low-energy mobile Athlon reports:

▪ ~/P/dtas ψ:(master) ▶hyperfine --warmup 10 'dtas-ctl current'
Benchmark #1: dtas-ctl current
  Time (mean ± σ):     236.0 ms ±  17.0 ms    [User: 185.8 ms, System: 24.8 ms]
  Range (min … max):   226.1 ms … 282.0 ms    11 runs
▪ ~/P/dtas ψ:(master) ▶hyperfine --warmup 10 'ruby --disable=g -Ilib ./bin/dtas-ctl current'
Benchmark #1: ruby --disable=g -Ilib ./bin/dtas-ctl current
  Time (mean ± σ):      30.6 ms ±   6.3 ms    [User: 21.1 ms, System: 4.6 ms]
  Range (min … max):    27.0 ms …  63.9 ms    65 runs

  On my system it makes little difference if you bypass gem’s script
wrapper unless you forcibly disable gems support like you suggest.

Thanks,

James

--

☒ Vote to destroy email signatures today!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-02 13:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 20:03 [PATCH 0/2] Trivial fixes for setup.rb usage James Rowe
2019-12-01 20:03 ` [PATCH 1/2] setup: update to use RbConfig James Rowe
2019-12-01 20:03 ` [PATCH 2/2] setup: fix duplicate variable warning James Rowe
2019-12-02  8:23 ` [PATCH 0/2] Trivial fixes for setup.rb usage Eric Wong
2019-12-02 13:27   ` James Rowe

Code repositories for project(s) associated with this public inbox

	http://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).