{"id":17872572,"url":"https://github.com/gregors/princeton_standard_libs-ruby","last_synced_at":"2025-08-11T23:06:38.331Z","repository":{"id":56888780,"uuid":"163364074","full_name":"gregors/princeton_standard_libs-ruby","owner":"gregors","description":"A ruby port of the Princeton standard libraries","archived":false,"fork":false,"pushed_at":"2020-07-18T04:06:38.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T08:58:58.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregors.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-28T04:02:48.000Z","updated_at":"2020-07-18T04:06:37.000Z","dependencies_parsed_at":"2022-08-20T23:10:38.796Z","dependency_job_id":null,"html_url":"https://github.com/gregors/princeton_standard_libs-ruby","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gregors/princeton_standard_libs-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregors%2Fprinceton_standard_libs-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregors%2Fprinceton_standard_libs-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregors%2Fprinceton_standard_libs-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregors%2Fprinceton_standard_libs-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregors","download_url":"https://codeload.github.com/gregors/princeton_standard_libs-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregors%2Fprinceton_standard_libs-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269970120,"owners_count":24505466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T10:43:26.441Z","updated_at":"2025-08-11T23:06:38.307Z","avatar_url":"https://github.com/gregors.png","language":"Ruby","readme":"# Princeton Standard Libs\n\nI 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.\n\nI 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. \n\nUntil 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.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'princeton_standard_libs-ruby'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install princeton_standard_libs-ruby\n\n## Usage\n\nTODO: Write usage instructions here\n\n## Development\n\n* [ ]\tStdIn.java \tread numbers and text from standard input\n* [ ] StdOut.java \twrite numbers and text to standard output\n* [X] StdDraw.java \tdraw geometric shapes in a window -- see [Standard Draw TK Gem](https://github.com/gregors/standard_draw_tk)\n* [ ] StdAudio.java \tcreate, play, and manipulate sound\n* [ ] StdRandom.java \tgenerate random numbers\n* [ ] StdStats.java \tcompute statistics\n* [ ] StdArrayIO.java \tread and write 1D and 2D arrays\n* [ ] In.java \tread numbers and text from files and URLs\n* [ ] Out.java \twrite numbers and text to files\n* [ ] Draw.java \tdraw geometric shapes\n* [ ] Picture.java \tprocess color images\n* [ ] GrayscalePicture.java \tprocess grayscale images\n* [ ] Stopwatch.java \tmeasure running time\n* [ ] BinaryStdIn.java \tread bits from standard input\n* [ ] BinaryStdOut.java \twrite bits to standard output\n* [ ] BinaryIn.java \tread bits from files and URLs\n* [ ] BinaryOut.java \twrite bits to files\n\nAfter 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.\n\nTo 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).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/gregors/princeton_standard_libs-ruby.\n\n## License\n\nThe 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).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregors%2Fprinceton_standard_libs-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregors%2Fprinceton_standard_libs-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregors%2Fprinceton_standard_libs-ruby/lists"}