Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregors/princeton_standard_libs-ruby
A ruby port of the Princeton standard libraries
https://github.com/gregors/princeton_standard_libs-ruby
Last synced: 25 days ago
JSON representation
A ruby port of the Princeton standard libraries
- Host: GitHub
- URL: https://github.com/gregors/princeton_standard_libs-ruby
- Owner: gregors
- License: gpl-3.0
- Created: 2018-12-28T04:02:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T04:06:38.000Z (over 4 years ago)
- Last Synced: 2024-11-28T11:06:33.019Z (about 1 month ago)
- Language: Ruby
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Princeton Standard Libs
I was going through the [Algorithms 4th edition](https://algs4.cs.princeton.edu/home/) and wanted to write the algorithms in ruby instead of the default java. The book uses the [Princeton Standard Libraries](https://introcs.cs.princeton.edu/java/stdlib/) to help clarify the code. This is a pure ruby port of that library.
I plan to include everything except for the Standard Draw library - due to the complexity I am breaking that out into it's own gem [Standard Draw TK](https://github.com/gregors/standard_draw_tk) which uses Tck/Tk for the gui layer. I may add other toolkits in the future.
Until this port is complete - For those willing to use Jruby can make use of the [jruby wrapper gem](https://rubygems.org/gems/princeton_standard_libraries) that lets you call the original java code with minimal pain.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'princeton_standard_libs-ruby'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install princeton_standard_libs-ruby
## Usage
TODO: Write usage instructions here
## Development
* [ ] StdIn.java read numbers and text from standard input
* [ ] StdOut.java write numbers and text to standard output
* [X] StdDraw.java draw geometric shapes in a window -- see [Standard Draw TK Gem](https://github.com/gregors/standard_draw_tk)
* [ ] StdAudio.java create, play, and manipulate sound
* [ ] StdRandom.java generate random numbers
* [ ] StdStats.java compute statistics
* [ ] StdArrayIO.java read and write 1D and 2D arrays
* [ ] In.java read numbers and text from files and URLs
* [ ] Out.java write numbers and text to files
* [ ] Draw.java draw geometric shapes
* [ ] Picture.java process color images
* [ ] GrayscalePicture.java process grayscale images
* [ ] Stopwatch.java measure running time
* [ ] BinaryStdIn.java read bits from standard input
* [ ] BinaryStdOut.java write bits to standard output
* [ ] BinaryIn.java read bits from files and URLs
* [ ] BinaryOut.java write bits to filesAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/gregors/princeton_standard_libs-ruby.
## License
The gem is available as open source under the terms of the [GNU General Public License, version 3 (GPLv3)](http://www.gnu.org/copyleft/gpl.html).