{"id":24488201,"url":"https://github.com/codiepp/prolog-utilities","last_synced_at":"2025-08-13T18:06:08.337Z","repository":{"id":53418107,"uuid":"166594925","full_name":"CodiePP/prolog-utilities","owner":"CodiePP","description":"a collection of utilities in Prolog","archived":false,"fork":false,"pushed_at":"2023-12-21T22:14:41.000Z","size":120,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-11T07:59:05.743Z","etag":null,"topics":["cgi","math","postgres","prolog","regexp","stream","string","utilities","vectors"],"latest_commit_sha":null,"homepage":"","language":"Prolog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodiePP.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}},"created_at":"2019-01-19T21:22:20.000Z","updated_at":"2025-02-10T21:11:04.000Z","dependencies_parsed_at":"2023-12-22T02:00:34.688Z","dependency_job_id":null,"html_url":"https://github.com/CodiePP/prolog-utilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodiePP/prolog-utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fprolog-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fprolog-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fprolog-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fprolog-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodiePP","download_url":"https://codeload.github.com/CodiePP/prolog-utilities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fprolog-utilities/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270286600,"owners_count":24558611,"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-13T02:00:09.904Z","response_time":66,"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":["cgi","math","postgres","prolog","regexp","stream","string","utilities","vectors"],"created_at":"2025-01-21T16:18:50.255Z","updated_at":"2025-08-13T18:06:07.264Z","avatar_url":"https://github.com/CodiePP.png","language":"Prolog","readme":"\nProlog utilities\n================\n\n\n[pl_toolbox](pl_toolbox)\n----------\n\n```\n ?- toolbox:info_math.\nProlog Toolbox, Mathematical Functors\npi(X)                       X is 3.14169....\ne(X)                        X is 2.71828....\ndet([[X1,X2][Y1,Y2]],D)     D is the determinant\nrad2grad(R,G)               G=R/180*PI\ngrad2rad(G,R)               R=G*180/PI\n```\n\n```\n ?- toolbox:info_vector.\nProlog Toolbox, Vector Arithmetic\nvrand(N,V)                  vector containing N random numbers\nvzero(N,V)                  vector containing N dimensions, all zero\nvnorm(V,Vnorm)              Vnorm = V / |V|\nvval(V,Value)               Value = |V|\nvsum(V,Value)               Value = Sigma(V)\nvadd(V1,V2,Vres)            Vres = V1 + V2\nvsub(V1,V2,Vres)            Vres = V2 - V1\nvmul(Konst,V,Vres)          Vres = Konst * V\nvdiv(Konst,V,Vres)          Vres = V / Konst\nvdist(V1,V2,Distance)       Distance = |V1 - V2|\nvscal(V1,V2,Product)        Product = V1 * V2\nvprod(V1,V2,Vres)           Vres = V1 x V2\nvmix(V1,V2,V3,Res)          Res = (V1 x V2) * V3\n```\n\n```\n ?- toolbox:info_string.\nProlog Toolbox, String handling\nremovesublist(ListIn,SubL,ListOut) Removes all occurencies of SubL in ListIn\nsub_string(Str,From,To,Res)        extracts substring From position To from Str\nlist2string(List,String)           makes a string from a list separated by \" \"\nlist2string(List,Sep,String)       makes a string from a list separated by Sep\nstring2list(String,Lres)           makes a list of tokens from string by \" \"\nstring2list(String,Sep,Lres)       makes a list of tokens from string by Sep\nsplit(Str,Char,Res1,Res2)          splits at first Char into Res1 and rest to Res2\nremove_leading(Str,Char,Res)       removes leading Chars from Str, always true\nremove_trailing(Str,Char,Res)      removes trailing Chars from Str, always true\nskip(Str,Num,Res)                  skips Num chars in Str and returns as Res\nalign_left(Str,Width,Res)          aligns Str to the left, appends spaces\nalign_right(Str,Width,Res)         aligns Str to the right, fills with spaces\nlower_case(Str,LowerS)             changes Str to lowercase\nupper_case(Str,UpperS)             changes Str to uppercase\n```\n\n```\n ?- toolbox:info_stream.\nProlog Toolbox, Stream handling\nread_txtline(String)             reads a line from the current text Stream into String\nread_txtline(Stream,String)      reads a line from a text Stream into String\nread_binline(Stream,String)      reads a line from a binary Stream into String\nread_txtuntil(Sep,String)        reads a line from the current text Stream into String until Sep occurs\nread_txtuntil(Stream,Sep,String) reads a line from a text Stream into String until Sep occurs\nread_binuntil(Stream,Sep,String) reads a line from a text Stream into String until Sep occurs\nwrite_txtline(String)            writes a string to the current text stream.\nwrite_txtline(Stream,String)     writes a string to the text stream.\nwrite_binline(Stream,String)     writes a string to the binary stream.\nread_n_bytes(Stream,N,Res)       reads up to N bytes from the binary Stream.\nread_n_chars(Stream,N,Res)       reads up to N chars from the text Stream.\nread_int_[BE|LE](Stream,Int)     reads a 32 bit integer from the binary Stream.\nread_short_[BE|LE](Stream,Int)   reads a 16 bit integer from the binary Stream.\nread_double_[BE|LE](Stream,Res)  reads a double in ieee extended format from the binary Stream.\n```\n\n[pl_regexp](pl_regexp)\n---------\n\n\n[pl_cgi](pl_cgi)\n------\n\n\n[pl_postgresql](pl_postgresql/)\n-------------\n\n\n\n\nLicensed under [GPL v3](LICENSE)\n\nLICENSE\n-------\n\nCopyright (C) 1999-2023  Alexander Diemand\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodiepp%2Fprolog-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodiepp%2Fprolog-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodiepp%2Fprolog-utilities/lists"}