{"id":13594300,"url":"https://github.com/technomancy/grenchman","last_synced_at":"2025-04-09T07:31:29.026Z","repository":{"id":10235855,"uuid":"12338508","full_name":"technomancy/grenchman","owner":"technomancy","description":"Sorry about the name","archived":true,"fork":false,"pushed_at":"2019-01-03T06:36:33.000Z","size":11682,"stargazers_count":218,"open_issues_count":8,"forks_count":8,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-08-02T16:51:48.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Houzz/JSONCast","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technomancy.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-24T05:08:51.000Z","updated_at":"2023-09-08T16:41:37.000Z","dependencies_parsed_at":"2022-08-31T08:01:19.094Z","dependency_job_id":null,"html_url":"https://github.com/technomancy/grenchman","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technomancy%2Fgrenchman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technomancy%2Fgrenchman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technomancy%2Fgrenchman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technomancy%2Fgrenchman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technomancy","download_url":"https://codeload.github.com/technomancy/grenchman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375288,"owners_count":17135341,"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-08-01T16:01:31.479Z","updated_at":"2024-11-06T16:31:06.629Z","avatar_url":"https://github.com/technomancy.png","language":"OCaml","funding_links":[],"categories":["OCaml","Tools"],"sub_categories":[],"readme":"# Grenchman\n\nFast invocation of Clojure code over nREPL.\n\n\u003ca href=\"http://achewood.com/index.php?date=04022007\"\u003e\n  \u003cimg src=\"comic.gif\" align=\"right\"\u003e\u003c/a\u003e\n\nTo install, download the appropriate binary from\nhttps://leiningen.org/grench.html and place it on your path. If\ndownloads for your platform are not provided you can compile your own;\nsee \"Building\" below.\n\n## Usage\n\nGrenchman has five main commands:\n\n* `grench eval \"(+ 12 49)\"` - evals given form\n* `grench main my.main.ns/entry-point arg1 arg2` - runs existing defn\n* `grench repl` or `grench repl :connect $PORT` - connects a repl\n* `grench load path/to/file.clj` - load a file\n* `grench lein test` - runs a Leiningen task\n\nRunning with no arguments will read code from stdin to accomodate shebangs.\n\nThe first four commands connect to a running nREPL project server in\norder to avoid JVM startup time. The simplest way to start a project\nnREPL server is to run `lein trampoline repl :headless` from the\nproject directory in another shell. All non-lein `grench` invocations\nfrom inside the project directory will use that nREPL, but by setting\nthe `GRENCH_PORT` environment variable you can connect to it from\noutside.\n\n### Leiningen\n\nThe `grench lein` subcommand is the exception to this; it connects to\na Leiningen nREPL server rather than a project nREPL. It looks for the\nport in `~/.lein/repl-port` or `$LEIN_REPL_PORT`; you can launch this\nserver using `lein repl :headless` from outside a project directory.\n\nUsing Grenchman avoids waiting for Leiningen's JVM to start, but\nproject JVMs are still launched like normal when necessary if\nLeiningen can't find a running project nREPL server. Note that this\ngoes through Leiningen by looking for `.nrepl-port` and doesn't check\n`$GRENCH_PORT`.\n\nCurrently the Leiningen integration requires Leiningen 2.3.3 or newer.\nIf you get no output from `grench lein ...` but your Leiningen process\nemits an `java.io.FileNotFoundException: project.clj` error message,\nupgrading Leiningen should fix it.\n\n## Building\n\nBuilding grenchman typically requires compiling the whole OCaml\ntoolchain (two compilers, two standard libraries, a package manager,\nand a handful of other third-party libraries) from scratch and can\ntake up to an hour. Please use the\n[precompiled binaries](https://leiningen.org/grench.html#download) if\npossible.\n\nYou will need to\n[install opam](http://opam.ocaml.org/doc/Install.html) and\nOCaml 4.x to be able to build Grenchman. You'll also need `libffi` as\nwell as `libreadline-dev` (sometimes called `readline-devel` on RPM\nsystems).\n\nIf you're not sure whether you have 4.x installed or not, you can check with:\n\n    $ opam switch list\n    # If your system compiler is 4.x or above, you're ready to go.\n    # Otherwise, issue the following command:\n    $ opam switch 4.04.0\n    # Don't forget to add ~/.opam/4.04.0/bin/ to your $PATH\n\n    $ sudo apt install ocaml ocaml-native-compilers opam camlp4 aspcud \\\n        libreadline-dev libffi-dev\n\nTo build, run the following commands:\n\n    $ git clone git@github.com:technomancy/grenchman.git grenchman\n    $ cd grenchman\n    $ opam install ocamlfind core async ctypes ctypes-foreign\n    $ ocamlbuild -use-ocamlfind -lflags -cclib,-lreadline grench.native\n    $ ln -s $PWD/grench.native ~/bin/grench # or somewhere on your $PATH\n\n## Gotchas\n\nBy default Leiningen uses compilation settings which trade long-term\nperformance for boot speed. With Grenchman you have long-running nREPL\nprocesses which start rarely, so you should disable this by putting\n`:jvm-opts []` in your `:user` profile.\n\nTasks for all projects will share the same Leiningen instance, so\nprojects with have conflicting plugins or hooks may behave unpredictably.\n\nIf Grenchman cannot connect on the port specified, it will terminate\nwith an exit code of 111, which may be useful for scripting it.\n\n## License\n\nCopyright © 2013, 2017 Phil Hagelberg and\n[contributors](https://github.com/technomancy/grenchman/contributors). Bencode\nimplementation by Prashanth Mundkur. Licensed under the GNU General\nPublic License, version 3 or later. See COPYING for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnomancy%2Fgrenchman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnomancy%2Fgrenchman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnomancy%2Fgrenchman/lists"}