{"id":46065103,"url":"https://github.com/cadebrown/kscript","last_synced_at":"2026-03-01T12:09:00.965Z","repository":{"id":110895827,"uuid":"322361035","full_name":"cadebrown/kscript","owner":"cadebrown","description":"kscript is an easy to use, general purpose, multi-paradigm programming language meant to provide cross-platform APIs. The standard library of kscript includes most features required for development tasks, including maths (m, nx), networking (net, net.http), GUI programming, and more.","archived":false,"fork":false,"pushed_at":"2025-04-26T17:02:46.000Z","size":5518,"stargazers_count":7,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T18:19:09.678Z","etag":null,"topics":["c","graph","graphs","http","http-server","language","languages"],"latest_commit_sha":null,"homepage":"https://kscript.org","language":"C","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/cadebrown.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}},"created_at":"2020-12-17T17:07:30.000Z","updated_at":"2025-04-26T17:02:51.000Z","dependencies_parsed_at":"2025-04-26T18:29:02.999Z","dependency_job_id":null,"html_url":"https://github.com/cadebrown/kscript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cadebrown/kscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadebrown%2Fkscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadebrown%2Fkscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadebrown%2Fkscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadebrown%2Fkscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadebrown","download_url":"https://codeload.github.com/cadebrown/kscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadebrown%2Fkscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"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":["c","graph","graphs","http","http-server","language","languages"],"created_at":"2026-03-01T12:09:00.428Z","updated_at":"2026-03-01T12:09:00.958Z","avatar_url":"https://github.com/cadebrown.png","language":"C","readme":"# kscript (ks) - ARCHIVED\n\n**NOTE: This project is no longer being actively developed or maintained, and has been archived. A spiritual successor is planned...**\n\nkscript ([ks.cade.io](https://ks.cade.io)) is a dynamic programming language with expressive syntax, cross platform support, and a rich standard library. It's like Python, but better 😉.\n\nI wrote kscript mainly as a learning experience, to see if I could write a full programming language from scratch in C99. I did, but at what cost?\n\n* [ks.cade.io/repl](https://ks.cade.io/repl) - online REPL with WASM\n  * Run kscript in your browser!\n* [ks.cade.io](https://ks.cade.io) - online documentation\n  * A full documentation of the language and standard library, including examples\n\n## Usage\n\n### Online REPL via WASM\n\nTo quickly test out kscript, run it online at [ks.cade.io](https://ks.cade.io). This is a REPL (Read-Eval-Print Loop) that runs locally in your browser using [WebAssembly (WASM)](https://webassembly.org/).\n\n### Running Locally\n\nTo run kscript locally, download a pre-built binary from the [releases page](https://github.com/cadebrown/kscript/releases) for your platform.\n\nWhen you unarchive it, you should see a `bin/` folder with the `ks` executable inside. You can run it like so:\n\n```shell\n$ ./bin/ks -c 'print(1+2+3+4)'\n10\n```\n\n## Setup\n\nIf you want to build it yourself, or check out how development works, follow these instructions for your platform:\n\n### Setup: Linux\n\nFirst, install the required dependencies for your system:\n\n```shell\n# on Debian/Ubuntu/apt-based Linux systems\n$ sudo apt install libpthread-stubs0-dev libgmp-dev libreadline-dev libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libffi-dev\n\n# others: figure it out!\n```\n\nNow, configure the build system to find these dependencies:\n\n```shell\n# run with --help for more options\n$ ./configure --with-readline --with-ffi --with-pthreads --with-libav --with-opengl --with-glfw --prefix $PWD/install\n```\n\nAnd finally, build the entire project with:\n\n```shell\n# use -j\u003cN\u003e to parallelize the build with N jobs\n$ make -j16\n```\n\nOptionally, you can also \"install\" it to the location specified with `--prefix` above:\n\n```shell\n$ make install\n```\n\n### Setup: MacOS\n\nFirst, install the required dependencies for your system using [Homebrew](https://brew.sh/) (install Homebrew if you haven't already):\n\n```shell\n$ brew install libffi ffmpeg glfw\n```\n\nNext, we need to add these libraries to our path, so they are found by our configuration system:\n\n```shell\n# add the library path, where dynamic libraries are found\n$ export LIBRARY_PATH=\"$LIBRARY_PATH:/opt/homebrew/lib:/opt/homebrew/opt/libffi/lib\"\n\n# add the include path, where C/C++ header files are found\n$ export C_INCLUDE_PATH=\"$C_INCLUDE_PATH:/opt/homebrew/include:/opt/homebrew/opt/libffi/include\"\n```\n\nWith those set, we can now configure kscript to find these libraries:\n\n```shell\n$ ./configure --with-readline --with-ffi --with-pthreads --with-libav --with-opengl --with-glfw\n```\n\nAnd finally, build the entire project with:\n\n```shell\n# use -j\u003cN\u003e to parallelize the build with N jobs\n$ make -j16\n```\n\nOptionally, you can also \"install\" it to the location specified with `--prefix` above:\n\n```shell\n$ make install\n```\n\n### Setup: Emscripten (WASM)\n\nYou can also build WASM binaries using [Emscripten](https://emscripten.org/) (a great project, BTW). This allows you to run kscript in the browser, or anywhere that supports WebAssembly.\n\nFirst, install Emscripten by following their instructions: [Emscripten: Getting Started](https://emscripten.org/docs/getting_started/downloads.html). You should install and activate their SDK.\n\nFor example, to install v4.0.15 (which is comfirmed to work with kscript), you can run:\n\n```shell\n$ git clone https://github.com/emscripten-core/emsdk.git\n$ cd emsdk\n$ ./emsdk install 4.0.15\n$ ./emsdk activate 4.0.15\n$ source ./emsdk_env.sh\n```\n\n\nNow, configure the build system to use Emscripten, which requires manually overriding some environment variables:\n\n```shell\n$ CC=emcc CFLAGS=\"-O3 -Wno-ignored-attributes -sASSERTIONS=1\" LDFLAGS='-O3 -sWASM=1 -sASSERTIONS=1 -sERROR_ON_UNDEFINED_SYMBOLS=0 -sEXPORTED_RUNTIME_METHODS=[\"cwrap\",\"ccall\",\"stringToUTF8\",\"UTF8ToString\"]' PLATFORM=\"web\" ./configure\n\n\nFinally, you can build the same way as native builds:\n\n```shell\n# use -j\u003cN\u003e to parallelize the build with N jobs\n$ make -j16\n```\n\n\n### Setup: Windows\n\nWindows was never really fully supported, but can be built with the Visual Studio solution project in the [./winbuild](./winbuild) folder.\n\nGood luck!\n\n## Running\n\n```shell\n\n# the most basic program\n$ ./bin/ks examples/greet.ks\nhello, \u003cuser\u003e\n\n# compute a Fibonacci number (the 10th in this example)\n$ ./bin/ks examples/fib.ks 10\n55\n\n```\n\n## Making Documentation\n\nInside the `docs/` folder, you can run:\n\n```shell\n$ pandoc DOCS.md -o index.html --template template.html -s --toc --number-sections --lua-filter=pandoc/anchors.lua --syntax-highlighting=none\n```\n\nAnd, to generate a PDF copy:\n\n```shell\n$ pandoc DOCS.md -o kscript.pdf -s --toc --number-sections --pdf-engine=xelatex -V geometry:a4paper -V geometry:margin=2cm -V fontsize=12pt\n```\n\n## TODO for final release\n\n* implement sum/min/max functions\n* implement display in REPL with backslash-escaped printing\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadebrown%2Fkscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadebrown%2Fkscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadebrown%2Fkscript/lists"}