{"id":19515106,"url":"https://github.com/jusleg/looop","last_synced_at":"2026-02-28T14:31:06.043Z","repository":{"id":56882241,"uuid":"257743017","full_name":"jusleg/looop","owner":"jusleg","description":"A slower way to generate for loops in Ruby with a funky java-like syntax","archived":false,"fork":false,"pushed_at":"2020-04-23T17:20:58.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T22:43:15.697Z","etag":null,"topics":["gem","java","loop","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jusleg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-21T23:50:26.000Z","updated_at":"2020-04-23T17:21:01.000Z","dependencies_parsed_at":"2022-08-20T23:10:52.785Z","dependency_job_id":null,"html_url":"https://github.com/jusleg/looop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jusleg/looop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jusleg%2Flooop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jusleg%2Flooop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jusleg%2Flooop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jusleg%2Flooop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jusleg","download_url":"https://codeload.github.com/jusleg/looop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jusleg%2Flooop/sbom","scorecard":{"id":543390,"data":{"date":"2025-08-11","repo":{"name":"github.com/jusleg/looop","commit":"306b391f2db2b2aee029a8fc0df5c735882db53b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T08:48:07.154Z","repository_id":56882241,"created_at":"2025-08-20T08:48:07.154Z","updated_at":"2025-08-20T08:48:07.154Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29937391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gem","java","loop","ruby"],"created_at":"2024-11-10T23:38:38.479Z","updated_at":"2026-02-28T14:31:05.478Z","avatar_url":"https://github.com/jusleg.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Looop ♻  [![Gem Version](https://badge.fury.io/rb/looop.svg)](https://badge.fury.io/rb/looop) ![tests badge](https://img.shields.io/badge/Tests-none-brightgreen) ![loop badge](https://img.shields.io/badge/loop-for-brightgreen) [![license badge](https://img.shields.io/badge/License-MIT-blue)](https://github.com/jusleg/looop/blob/master/LICENSE)\nGone are the days where you convert your entire project to Java just to get the nice `for` loop. You can now build similar looking loops that run much slower than your average loop.\n\n## Get started\n\n`gem install looop`\n\n`require 'looop'`\n\n## How to use Looop\n\nLooop was built with simplicity as its core value. For this reason, we only offer one method: `Looop.for`.\n\nLet's say you are [DJ Khaled](https://en.wikipedia.org/wiki/DJ_Khaled), a typical Java developer, and you wish to craft a tweet with your signature catchphrase \"Another one.\" repeated **5** times\n\n```ruby\n# tweet.rb\nrequire 'looop'\n\nCATCHPHRASE = 'ANOTHER ONE.'\ntweet = ''\nLooop.for(index = 1, -\u003e{index \u003c= 5}, -\u003e{index += 1}) do\n  tweet.concat(CATCHPHRASE)\nend\n\nputs tweet\n\n#=\u003e ANOTHER ONE.ANOTHER ONE.ANOTHER ONE.ANOTHER ONE.ANOTHER ONE.\n```\n\n## I'm intrigued, what are these -\u003e{} things?\n\nI'm glad you asked, those are [Procs](https://ruby-doc.org/core-2.6/Proc.html). We'll call these procs while running the loop. This is one of the main reasons that make looop a tad bit slower.\n\n## Do U even Big-O ?!1\n\nI guess, you can run nested loops if that's what you are asking.\n\n```ruby\nheight = 5\nLooop.for(i = 1, -\u003e{ i \u003c= height }, -\u003e {i += 1}) do\n  Looop.for(h = height - i, -\u003e {h \u003e 0 }, -\u003e {h -= 1}) do\n    print \" \"\n  end\n  Looop.for(j = 1, -\u003e {j \u003c= i}, -\u003e {j += 1}) do\n    print \"* \"\n  end\n  print \"\\n\"\nend\n```\n\nwill print:\n\n```console\n    * \n   * * \n  * * * \n * * * * \n* * * * * \n```\n\n## Is this leetcode ready? Can I pass a technical interview with this?\n\n\u003e Is this leetcode ready?\n\nIt depends, you might be able to solve the base case, but I'd be surprised if you didn't time out during the evaluation of the secret cases.\n\n\u003e Can I pass a technical interview with this?\n\nMeh, as long as they don't ask for it to be optimized for performance. \n\n**TL;DR:** don't.\n\n## Is it fast\n\nno\n\n```ruby\nLooop.for(i=0, -\u003e {i\u003c1000}, -\u003e {i+=1}) do\n  Looop.for(j=0, -\u003e {j\u003c1000}, -\u003e {j+=1}) do\n    #noop\n  end\nend\n```\n\nwas 6 times slower than\n\n```ruby\ni = 0\nwhile i\u003c1000 do\n  j = 0\n  while j\u003c1000 do\n    #noop\n    j += 1\n  end\n  i += 1\nend\n```\n\n## I don't want to setup a small script to test it but I'm really interested to try it, can you make a repl.it?\n\nSure. [here](https://repl.it/@jusleg/looop).\n\n## Copyright and License\nCopyright (c) 2020, Famingo Inc.\n\nThis project is licensed under the [MIT License](https://github.com/jusleg/looop/blob/master/LICENSE).\n\n## Do you have a soundcloud I can follow?\n\nNo, but you can follow me on [twitter](https://twitter.com/jusleg). I'll announce it there if I end up creating one.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjusleg%2Flooop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjusleg%2Flooop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjusleg%2Flooop/lists"}