{"id":16318602,"url":"https://github.com/vic/rouge","last_synced_at":"2025-10-25T18:30:19.025Z","repository":{"id":5034789,"uuid":"6193908","full_name":"vic/rouge","owner":"vic","description":"Ruby + Clojure = Rouge","archived":false,"fork":false,"pushed_at":"2012-10-12T11:39:14.000Z","size":405,"stargazers_count":10,"open_issues_count":0,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T10:03:53.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CyanogenMod/android_packages_apps_Stk","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-12T17:38:41.000Z","updated_at":"2022-07-18T11:20:34.000Z","dependencies_parsed_at":"2022-09-21T14:12:16.653Z","dependency_job_id":null,"html_url":"https://github.com/vic/rouge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Frouge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Frouge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Frouge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Frouge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/rouge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238191673,"owners_count":19431465,"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","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-10T22:24:04.829Z","updated_at":"2025-10-25T18:30:18.516Z","avatar_url":"https://github.com/vic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rouge\n\nRuby + Clojure = Rouge.\n\n## quickstart\n\nRouge is not yet mature enough to have an installer or distributions.  Just\nclone the source and run the `rouge` script to start:\n\n    git clone git://github.com/unnali/rouge\n    cd rouge\n    bundle install\n    bin/rouge\n\nYou'll see the `user=\u003e` prompt.  Enjoy!\n\n## example\n\nSee [boot.rg](https://github.com/unnali/rouge/blob/master/lib/boot.rg),\n[em-rg](https://github.com/unnali/em-rg), but to demonstrate salient features:\n\n    ; define a macro\n    (defmacro defn [name args \u0026 body]\n      `(def ~name (fn ~name ~args ~@body)))\n\n    ; call a Ruby method on Kernel (if the ruby namespace is referred)\n    (defn require [lib]\n      (.require Kernel lib))\n\n    ; call a Ruby method on an Array with a block argument\n    (defn reduce [f coll]\n      (.inject coll | f))\n\n    ; using Ruby's AMQP gem with an inline block\n    (.subscribe queue {:ack true} | [metadata payload]\n      (puts (str \"got a message: \" payload))\n      (.ack metadata))\n\n    ; copied from core.clj and modified to work with our currently smaller core\n    (defmacro binding [bindings \u0026 body]\n      (let [var-ize (fn [var-vals]\n                      (.flatten\n                        (map\n                          (fn [pair]\n                            (let [key (first pair)\n                                  val (second pair)]\n                              [`(.name (var ~key)) val]))\n                          (.each_slice var-vals 2))\n                        1))]\n      `(try\n         (push-thread-bindings (hash-map ~@(var-ize bindings)))\n         ~@body\n         (finally\n           (pop-thread-bindings)))))\n\nWhat about in Rails?\n\n    $ r c -- -I../rouge/lib -rrouge\n    Loading development environment (Rails 3.2.6)\n    1.9.3p194 :002 \u003e Rouge::REPL.repl []\n    user=\u003e (.where ruby/Content {:id 1})\n      Content Load (0.7ms)  SELECT \"contents\".* FROM \"contents\" WHERE \"contents\".\"id\" = 1\n    [#\u003cContent id: 1, content_group_id: 1, name: \"welcome\", content: \"blah blah\", created_at: \"2012-08-26 11:30:50\", updated_at: \"2012-08-26 11:50:27\", order: nil\u003e]\n    user=\u003e\n\n## TODO\n\nSee [TODO](https://github.com/unnali/rouge/blob/master/TODO), but big ones\ninclude:\n\n* seqs\n* persistent datastructures everywhere\n* defprotocol\n\n## contributions\n\nYes, please!  The usual dance would be:\n\n* Fork.\n* Check that tests are passing.  (`master` should always be 100%, but currently\n  this is not the case.)\n* Make a topic branch.\n* Do your tests, do your thing.\n* Make sure you didn't break anything!\n* Pull request!\n\nNote that I've yet to work out copyright or license (will ask on\n`clojure-dev`), but promise that they won't be anything stupid.\n\n## authorship\n\nOriginal author: Arlen Cuss \u0026mdash; [ar@len.me](mailto:ar@len.me).\n\nInspiration: 100% [Clojure](https://github.com/clojure/clojure).  Thanks be to\nRich Hickey.\n\n## copyright and licensing\n\nYet to be determined; likely EPL due to the entire concept and some code taken\ndirect from Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Frouge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Frouge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Frouge/lists"}