{"id":20020486,"url":"https://github.com/shakfu/pd-gsl","last_synced_at":"2026-06-11T05:31:32.228Z","repository":{"id":113536978,"uuid":"442009866","full_name":"shakfu/pd-gsl","owner":"shakfu","description":"puredata external which wraps a subset of the gnu scientific library (gsl)","archived":false,"fork":false,"pushed_at":"2022-04-22T00:02:19.000Z","size":1685,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T03:34:19.994Z","etag":null,"topics":["c","gsl","puredata"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakfu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T00:19:09.000Z","updated_at":"2023-02-14T10:03:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cc1beb5-cde8-4983-9042-ed44505de01f","html_url":"https://github.com/shakfu/pd-gsl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shakfu/pd-gsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fpd-gsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fpd-gsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fpd-gsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fpd-gsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakfu","download_url":"https://codeload.github.com/shakfu/pd-gsl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fpd-gsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34184779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["c","gsl","puredata"],"created_at":"2024-11-13T08:32:35.670Z","updated_at":"2026-06-11T05:31:32.214Z","avatar_url":"https://github.com/shakfu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puredata scientific library (psl)\n\n## Summary\n\nWraps some [gsl](https://www.gnu.org/software/gsl/) functions for puredata as\nwe as the [tinyexpr](https://github.com/codeplea/tinyexpr) library for\nexpression parsing.\n\nDev-Note: using the name `psl` instead of `gsl` for namespace prefixing of code to prevent namespace collisions (which would have occurred otherwise).\n\n## Rationale\n\n- Make some `gsl` functions accessible to puredata.\n- See how far this can be done.\n- Learn something new along the way.\n\n## Usage\n\nThe external is a single statically linked puredata external with the name `[psl]` or `[gsl]` and which has a single inlet and a single outlet.\n\n### Without Arguments\n\nBasic usage is without arguments, where the object is sent messages to obtain a calculation:\n\n```\n[\u003cfunc_name\u003e \u003cf1\u003e \u003cf2\u003e .. \u003cfN\u003e(\n```\n\nIn this case, `\u003cfunc_name\u003e` is an abbreviated name of a `gsl` function following by its arguments. The result of the calculation is sent out the outlet.\n\nThe result can be a single float value or a list of floats depending on the function.\n\n### With Function Name\n\nAnother usage variation is to include the name of a function as an argument during object creation, such as `[gsl bessel_j0]`. In this case, the following options apply:\n\n- The # of inlets grow to the number of arguments so you can feed them directly with floatss via the number object.\n\n\n- The function can be be fed arguments using a `list` message to the leftmost inlet with a length equal to its number of arguments:\n\n```\n[1.5 2.1 3.2(\n```\n\nPlease see the file `help-psl.pd` for examples.\n\n\n## To build\n\n\n```\nmake\n```\n\nNote that the the static libraries included in this project are currently MACOS only. This is a development conveniance during the early stage of this project and not required per se. To make it work with other platforms just use the platform specific static libs instead.\n\n\n## Development\n\nBecause quite a bit of the mapping work from `gsl` to `pd` external is quite repetitive, I have resorted to code-generation via a python script to make it more manageable.\n\nThis python3 script is in the `scripts` directory and has a dependency on the [mako](https://www.makotemplates.org) template library which is found to be quite suitable for code generation. The python3 `render.py` script uses a single `mako` template, `scripts/psl.c.mako`, and generates `psl.c` file directly in the project directory.\n\nEffectively, this means that current development entails that changes are made to `scripts/psl.c.mako` rather than the generated `psl.c` file as per the following dev cycle:\n\n1. modify `scripts/psl.c.mako`\n2. run `scripts/render.py` to generate `psl.c`\n3. make\n\ntypically running the following with each change:\n\n```\n./script/render.py \u0026\u0026 make\n```\n\n## TODO\n\n- [ ] more functions!!\n\n- [x] inlets-on-demand: proxy inlets to have the number of inlets dynamically grow with as per the selected functions (and its number of arguments).\n\n- [ ] checkout [exprtk](http://www.partow.net/programming/exprtk/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakfu%2Fpd-gsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakfu%2Fpd-gsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakfu%2Fpd-gsl/lists"}