-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish a new release to rubygems #67
Comments
In the meantime, you can get commit with the #66 merge by inserting into your Gemfile Note that the gem name to use is I tried the updated code with |
I am wondering how to "push" a new rubygems version. For anybody struggling with the lack of GitHub credentials, including the https url in my
|
**Background:** The slow step of LSI is the SVD (singular value decomposition) of a matrix. With even a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation it too slow to be usable. To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. This performs at least an order of magnitude faster than the ruby-only matrix decomposition, and is fast enough that using LSI with Jekyll finishes in a reasonable amount of time. Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform the singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn the same way they would use it with GSL. That is, the user should install `numo-narray` and `numo-linalg` gems, and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is the SVD (singular value decomposition) of a matrix. With even a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation it too slow to be usable. To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. This performs at least an order of magnitude faster than the ruby-only matrix decomposition, and is fast enough that using LSI with Jekyll finishes in a reasonable amount of time. Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 Notably, `rb-gsl` depends on [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray). `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform the singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn the same way they would use it with GSL. That is, the user should install `numo-narray` and `numo-linalg` gems, and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is the SVD (singular value decomposition) of a matrix. With even a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation it too slow to be usable. To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. This performs at least an order of magnitude faster than the ruby-only matrix decomposition, and is fast enough that using LSI with Jekyll finishes in a reasonable amount of time. Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 Notably, `rb-gsl` depends on [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray). `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform the singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn the same way they would use it with GSL. That is, the user should install `numo-narray` and `numo-linalg` gems, and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is the SVD (singular value decomposition) of a matrix. With even a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation it too slow to be usable. To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. This performs at least an order of magnitude faster than the ruby-only matrix decomposition, and is fast enough that using LSI with Jekyll finishes in a reasonable amount of time. Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 Notably, `rb-gsl` depends on [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray). `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform the singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn the same way they would use it with GSL. That is, the user should install `numo-narray` and `numo-linalg` gems, and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is the SVD (singular value decomposition) of a matrix. With even a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation it too slow to be usable. To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. This performs at least an order of magnitude faster than the ruby-only matrix decomposition, and is fast enough that using LSI with Jekyll finishes in a reasonable amount of time. Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 Notably, `rb-gsl` depends on [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray). `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform the singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn the same way they would use it with GSL. That is, the user should install `numo-narray` and `numo-linalg` gems, and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- luckily, there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67 Notably, `rb-gsl` depends on [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray). `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will allow classifier-reborn to be used with Ruby 3 without depending on the unmaintained/unreleased GSL gem. Options for ruby matrix libraries are somewhat limited, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67. This will be increasingly problematic because Ruby 2.7 is now in [security maintenance](https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-7-6-released/) and will become end of life in less than a year. Notably, `rb-gsl` depends on the [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray) gem. `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will make classifier-reborn compatible with Ruby 3 without depending on the unmaintained/unreleased gsl gem. There aren't many gems that provide fast matrix support for ruby, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition, which is exactly what we need. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67. This will be increasingly problematic because Ruby 2.7 is now in [security maintenance](https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-7-6-released/) and will become end of life in less than a year. Notably, `rb-gsl` depends on the [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray) gem. `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will make classifier-reborn compatible with Ruby 3 without depending on the unmaintained/unreleased gsl gem. There aren't many gems that provide fast matrix support for ruby, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition, which is exactly what we need. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67. This will be increasingly problematic because Ruby 2.7 is now in [security maintenance](https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-7-6-released/) and will become end of life in less than a year. Notably, `rb-gsl` depends on the [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray) gem. `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will make classifier-reborn compatible with Ruby 3 without depending on the unmaintained/unreleased gsl gem. There aren't many gems that provide fast matrix support for ruby, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition, which is exactly what we need. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67. This will be increasingly problematic because Ruby 2.7 is now in [security maintenance](https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-7-6-released/) and will become end of life in less than a year. Notably, `rb-gsl` depends on the [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray) gem. `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will make classifier-reborn compatible with Ruby 3 without depending on the unmaintained/unreleased gsl gem. There aren't many gems that provide fast matrix support for ruby, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition, which is exactly what we need. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
**Background:** The slow step of LSI is computing the SVD (singular value decomposition) of a matrix. Even with a relatively small collection of documents (say, about 20 blog posts), the native ruby implementation is too slow to be usable (taking hours to complete). To work around this problem, classifier-reborn allows you to optionally use the `gsl` gem to make use of the [Gnu Scientific Library](https://www.gnu.org/software/gsl/) when performing matrix calculations. Computations with this gem perform orders of magnitude faster than the ruby-only matrix implementation, and they're fast enough that using LSI with Jekyll finishes in a reasonable amount of time (seconds). Unfortunately, [rb-gsl](https://github.com/SciRuby/rb-gsl) is unmaintained -- there's a commit on main that makes it compatible with Ruby 3, but nobody has released the gem so the only way to use rb-gsl with Ruby 3 right now is to specify the git hash in your Gemfile. See SciRuby/rb-gsl#67. This will be increasingly problematic because Ruby 2.7 is now in [security maintenance](https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-7-6-released/) and will become end of life in less than a year. Notably, `rb-gsl` depends on the [narray](https://github.com/masa16/narray#new-version-is-under-development---rubynumonarray) gem. `narray` is deprecated, and the readme suggests using `Numo::NArray` instead. **Changes:** In this PR, my goal is to provide an alternative matrix implementation that can perform singular value decomposition quickly and works with Ruby 3. Doing so will make classifier-reborn compatible with Ruby 3 without depending on the unmaintained/unreleased gsl gem. There aren't many gems that provide fast matrix support for ruby, but [Numo](https://github.com/ruby-numo) seems to be more actively maintained than rb-gsl, and Numo has a working Ruby 3 implementation that can perform a singular value decomposition, which is exactly what we need. This requires [numo-narray](https://github.com/ruby-numo/numo-narray) and [numo-linalg](https://github.com/ruby-numo/numo-linalg). My goal is to allow users to (optionally) use classifier-reborn with Numo/Lapack the same way they'd use it with GSL. That is, the user should install the `numo-narray` and `numo-linalg` gems (with their required C libraries), and classifier-reborn will detect and use these if they are found.
For those who are still not using bundler, gemfiles, etc, here's how to install this version globally:
This pulls the git repository, goes to katafract's fixed version (thank you!), builds the gem locally, and then installs. This works on Mac OS X 14.2 (Sonoma). |
This approach was working for me running on macos Sonoma - but some update (Xcode? gcc? bundler?) has caused this this gem to stop working, and I can't reinstall it:
Anybody else have a similar issue? |
I'm also running onto this issue on macOS Sonoma 14.4.1 (23E224); but in my case, I was just trying to use the existing published version of Initially I had just done a
Which unfortunately no longer works:
Digging a little deeper, I found these issues:
It seems it's only compatible with gsl 2.1 as well:
I wonder, does using There are some instructions for building
We can see the latest version of the homebrew formula here: And it's history here:
Though the first 2.x version listed there seems to be Since the only thing that changed from the class GslAT21 < Formula
desc "Numerical library for C and C++"
homepage "https://www.gnu.org/software/gsl/"
url "https://ftp.gnu.org/gnu/gsl/gsl-2.1.tar.gz"
mirror "https://ftpmirror.gnu.org/gsl/gsl-2.1.tar.gz"
sha256 "59ad06837397617f698975c494fe7b2b698739a59e2fcf830b776428938a0c66"
license "GPL-3.0-or-later"
def install
ENV.deparallelize
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make" # A GNU tool which doesn't support just make install! Shameful!
system "make", "install"
end
test do
system bin/"gsl-randist", "0", "20", "cauchy", "30"
end
end Saved in:
Then we could install it like this:
After which we could go back and see if Exploring this issue more:
|
@0xdevalias thank you, your technique worked for me on MacOS Ventura. I had to remove the currently upgraded gsl version by homebrew :
After creating the local recipe as you did (in
Then relinked gsl :
Then, from my project environment (which uses rvm to activate ruby 2.7.1), I uninstalled the precedent gem version :
And reinstalled it with bundler from within the project dir :
The gem then accepted to build, using the local [email protected] library version installed with homebrew. |
@BenTalagan Awesome! Glad it was helpful!
@BenTalagan Oh true.. I wonder if that was the reason why it didn't work for me:
I can't remember exactly what I did, but skimming my notes above, it looks like I didn't link |
#66 was merged a few months ago adding Ruby 3 compatibility, but it's not available in rubygems.
Can you publish a new release? Thanks!
The text was updated successfully, but these errors were encountered: