
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Fastsort is a Ruby gem that provides an efficient sorting algorithm for arrays.
Add this line to your application's Gemfile:
$ gem install 'fastsort'
$ bundle install
Add more efficient sorting algorithms for arrays and arrays of objects...
require 'fastsort'
arr = [
75, 79, 21, 30, 12, 85, 24, 6, 66, 69,
92, 98, 18, 57, 40, 71, 92, 14, 1, 79,
15, 21, 55, 83, 45, 34, 25, 67, 9, 75,
83, 75, 99, 10, 41, 63, 79, 22, 80, 7,
38, 87, 31, 93, 60, 53, 39, 59, 67, 97
]
bucket_size = 10
sorter001 = Fastsort::Quicksort.new(arr)
sorter002 = Fastsort::Mergesort.new(arr)
sorter003 = Fastsort::Sonicsort.new(arr)
sorter004 = Fastsort::SelectionSort.new(arr)
sorter004 = Fastsort::BubbleSort.new(arr)
sorter006 = Fastsort::BucketSort.new(arr, bucket_size)
sorter007 = Fastsort::InsertionSort.new(arr)
sorter001.sort_array
sorter002.sort_array
sorter003.sort_quick_and_merge
sorter004.sort_array
sorter005.sort_array
sorter006.sort_array
sorter007.sort_array
puts "Sorted Array Quicksort: #{sorter_001.array}"
puts "Sorted Array Mergesort: #{sorter_002.array}"
puts "Sorted Array Sonicsort: #{sorter_003.array}"
puts "Sorted Array SelectionSort: #{sorter_004.array}"
puts "Sorted Array BubbleSort: #{sorter_005.array}"
puts "Sorted Array BucketSort: #{sorter_006.array}"
puts "Sorted Array InsertionSort: #{sorter_007.array}"
After 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.
Bug reports and pull requests are welcome on GitHub at https://github.com/dants0/fastsort.
FAQs
Unknown package
We found that fastsort demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.