{"id":20405972,"url":"https://github.com/coldnew/emacs-module-test","last_synced_at":"2025-08-30T10:39:58.985Z","repository":{"id":66658843,"uuid":"48642857","full_name":"coldnew/emacs-module-test","owner":"coldnew","description":"Test emacs-25's dynamic module feature","archived":false,"fork":false,"pushed_at":"2016-01-09T14:54:56.000Z","size":20,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-05T02:18:58.858Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldnew.png","metadata":{"files":{"readme":"README.org","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":"2015-12-27T11:38:35.000Z","updated_at":"2017-04-26T02:09:39.000Z","dependencies_parsed_at":"2023-03-21T13:34:09.305Z","dependency_job_id":null,"html_url":"https://github.com/coldnew/emacs-module-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coldnew/emacs-module-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Femacs-module-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Femacs-module-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Femacs-module-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Femacs-module-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldnew","download_url":"https://codeload.github.com/coldnew/emacs-module-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Femacs-module-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839665,"owners_count":25001862,"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-30T02:00:09.474Z","response_time":77,"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-11-15T05:14:10.869Z","updated_at":"2025-08-30T10:39:58.961Z","avatar_url":"https://github.com/coldnew.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: emacs dynamic modules test\n\n# Badge\n[[http://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg?dummy]]\n[[https://travis-ci.org/coldnew/emacs-module-test][https://travis-ci.org/coldnew/emacs-module-test.svg?branch=master]]\n\nThis is my test area for upcomming emacs25's =dynamic module= feature.\n\n* C\n\nThe easist way to implement the emacs module is use C language.\n\n** hello\n\n[[file:c/hello/hello-core.c][hello-core.c]] is a really simple implement for dynamie module,\n\nit just implement a C version of follwoing function.\n\n#+BEGIN_SRC emacs-lisp\n  (defun hello-c ()\n    \"Hello Emacs\")\n#+END_SRC\n\n** fib\n\n[[file:c/fib/fib-core.c][fib-core.c]] implement recursive and loop version of fibonacci\nfunction, I also add the emacs-lisp version to compare the benchmark.\n\nYou can use\n\n: make benchmark\n\nto get the result.\n\nFollowin are the benchmark test under my computer (Macbook Pro 2015, Early)\n\n#+BEGIN_EXAMPLE\ncalculating: fib-c\nElapsed time: 1.389031s\n\ncalculating: fib-loop-c\nElapsed time: 0.000081s\n\ncalculating: fib-elisp\nElapsed time: 199.269212s\n\ncalculating: fib-loop-elisp\nElapsed time: 0.002424s\n#+END_EXAMPLE\n\n* C++\n\nWe also can use C++ to create emacs module.\n\n** sc\n\n [[file:cpp/sc/sc-core.cpp][sc-core.cpp]] implements simple trim function like [[https://github.com/magnars/s.el][s.el]] does,\n currently I only implement following function\n\n - sc-trim-left\n - sc-trim-right\n - sc-trim\n\n The benchmark is worse than [[https://github.com/magnars/s.el][s.el]].\n\n #+BEGIN_EXAMPLE\n calculating: s-trim-left\n Elapsed time: 0.000780s\n\n calculating: sc-trim-left\n Elapsed time: 0.044819s\n\n calculating: s-trim-right\n Elapsed time: 0.008290s\n\n calculating: sc-trim-right\n Elapsed time: 0.120419s (0.022611s in 1 GCs)\n\n calculating: s-trim\n Elapsed time: 0.007935s\n\n calculating: sc-trim\n Elapsed time: 0.127986s\n #+END_EXAMPLE\n\n* Guile\n\n  Calling guile code from dynamic modules.\n\n** hello\n\n[[file:guile/hello/hello-core.c][hello-core.c]] implement to call guile's hello function like\n\n#+BEGIN_SRC scheme\n  (define (hello)\n    \"Hi\")\n#+END_SRC\n\n* Reference\n\n~[1]~ [[https://github.com/jwiegley/emacs/blob/54617ada51e49af04f0c3f609e724aafcaf0df16/modules/mod-test/mod-test.c][emacs/modules/mod-test/mod-test.c]]\n\n~[2]~ https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html\n\n~[3]~ [[http://syohex.hatenablog.com/entry/2015/12/16/185458][ejectで學ぶ Dynamic module 機能]]\n\n~[4]~ [[http://qiita.com/syohex/items/fa71f1c61107b5e30c43][Emacsに mrubyを組み込んでみた]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Femacs-module-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldnew%2Femacs-module-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Femacs-module-test/lists"}