{"id":27168381,"url":"https://github.com/inconvergent/cl-veq","last_synced_at":"2026-01-20T09:01:25.909Z","repository":{"id":53706026,"uuid":"385010390","full_name":"inconvergent/cl-veq","owner":"inconvergent","description":"DSL and utilities for vector mathematics in Common Lisp","archived":false,"fork":false,"pushed_at":"2025-10-02T08:14:36.000Z","size":679,"stargazers_count":51,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T10:13:48.700Z","etag":null,"topics":["common-lisp","domain-specific-language","dsl","library","lisp","macros","mathematics","vector"],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","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/inconvergent.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-11T17:21:42.000Z","updated_at":"2025-10-02T08:14:39.000Z","dependencies_parsed_at":"2023-02-10T17:15:48.058Z","dependency_job_id":"2922f5f9-0d36-45e1-847f-7c8104a6b7c6","html_url":"https://github.com/inconvergent/cl-veq","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/inconvergent/cl-veq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inconvergent%2Fcl-veq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inconvergent%2Fcl-veq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inconvergent%2Fcl-veq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inconvergent%2Fcl-veq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inconvergent","download_url":"https://codeload.github.com/inconvergent/cl-veq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inconvergent%2Fcl-veq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"last_error":"SSL_read: 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":["common-lisp","domain-specific-language","dsl","library","lisp","macros","mathematics","vector"],"created_at":"2025-04-09T05:31:05.684Z","updated_at":"2026-01-20T09:01:25.901Z","avatar_url":"https://github.com/inconvergent.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VEQ\n\nVEQ is a DSL and a set of utilities for doing dealing with (primarily)\n1d/2d/3d/nd point vectors and arrays of point vectors. It includes some\ngeometry and graphics programming utilities like intersection tests and matrix\ntransforms.\n\nVEQ was written to be the vector library used in my graph data structure,\n[cl-grph](https://github.com/inconvergent/cl-grph), and utilities for\ngenerative art: [auxin](https://github.com/inconvergent/auxin).\n\n\n## Symbol Docs \u0026 Example\n\nSee [docs](/docs/00-intro.md) for documentation and symbols.\n\nFor more examples go to [examples](examples/ex.lisp).\n\n```lisp\n(in-package :veq)\n\n; fvprogn is a compiler for the veq DSL, and and environment that cointains\n; many of the vector tools. among other things it handles the !@ triggers for\n; common nd point vector operations such as f2!@+ for 2d single float point\n; vector addition, and so on\n\n; here are some examples:\n\n(fvprogn\n  ; xlet makes it convenient to declare typed value packs (\"veqs\") with the\n  ; trigger [t][d]![var], eg. f2!varname. the variable will the be replaced by\n  ; the n values inside the scope.\n  (xlet ((f2!a (f2 1 2))                                      ; (values 1f0 2f0)\n         (f3!varname 0)                                       ; (values 0.0 0.0 0.0)\n         (f2!b (f2 3 100))                                    ; (values 3f0 100f0)\n         (line (f2$line 3f0 40f0 7f0 3f0))                    ; #(3f0 40f0 7f0 3f0)\n         (xx :s)                                              ; just :s, as you expect\n         (i3!integervar) (values 1 7 3)                       ; (values 1 7 3)\n         (va (f$_ (loop for v from 0 below 6                  ; #(0.0 1.0 1.0\n                        collect (list (ff v) (ff (1+ v))))))) ;   2.0 2.0 3.0\n                                                              ;   3.0 4.0 4.0\n                                                              ;   5.0 5.0 6.0)\n    ; vp pretty prints input code and output values\n    (vp (f2len (f2!@*. (f2!@+ a b) 0.1)))\n    ; f2!@*. scales the vector by 0.1 by broadcasting [.] the value over the veq\n\n    ; convenience function to print arrays of vectors:\n    (2$print line) ; returns line\n\n    (vp (f2!@$+ vb 3f0 100f0))\n\n    ; only return vb from index to below 5\n    (vp (f2!@$+ (?@ va 2 5) 3f0 100f0))\n\n    (vp (f2dot (f2$ va) (f2$ line 1)))   ; dot product\n    ; can also be written as:\n    (f!@+ (f2!@* (f2$ va) (f2$ line 1))\n    ; where (f2$ va) is the first veq in va, and (f2$ line 1) is the second\n    ; veq in line\n\n    (vp (f2cross (f2$ line 0 1))) ; cross product\n    ; equivalent to:\n    (vp (f2cross (f2$ line 0) (f2$ line 1)))\n\n    (vp (f2!@$+ (f2$zero 3) 3f0 1f0))\n\n    (vp (f21_@$f2len (f2!@$+ (f2$zero 3) 3f0 1f0)))\n\n    (vp (f21_@$+ vb))\n\n    ; TODO, improve example for new features\n    )))\n```\n\n## Since v3.0.0 (Nov 2024)\n\n`veq` now tentatively includes packages `rnd` and `srnd` for random number\ngeneration. `rnd` uses native random number generator and `srnd` is for very\nfast (low quality) random number generation with explicit state. Eg. for use in\nthreads for 3d rendering.\n\nBoth packages currently only support single floats. and they lack the `f` prefix\nused in `veq`. This might change in the future.\n\nSee [rnd](/docs/rnd.md) and [srnd](/docs/srnd.md) in the documentation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finconvergent%2Fcl-veq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finconvergent%2Fcl-veq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finconvergent%2Fcl-veq/lists"}