{"id":13647039,"url":"https://github.com/zepto-lang/zepto","last_synced_at":"2025-04-21T21:32:18.410Z","repository":{"id":25663525,"uuid":"29099184","full_name":"zepto-lang/zepto","owner":"zepto-lang","description":"A schemy Lisp backed by Haskell","archived":true,"fork":false,"pushed_at":"2018-11-08T19:55:09.000Z","size":920,"stargazers_count":60,"open_issues_count":11,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-09T20:38:04.620Z","etag":null,"topics":["interpreter","programming-language","scheme","zepto"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zepto-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-11T17:17:20.000Z","updated_at":"2023-10-02T12:23:46.000Z","dependencies_parsed_at":"2022-07-10T13:00:21.628Z","dependency_job_id":null,"html_url":"https://github.com/zepto-lang/zepto","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zepto-lang%2Fzepto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zepto-lang%2Fzepto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zepto-lang%2Fzepto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zepto-lang%2Fzepto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zepto-lang","download_url":"https://codeload.github.com/zepto-lang/zepto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250136831,"owners_count":21380899,"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","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":["interpreter","programming-language","scheme","zepto"],"created_at":"2024-08-02T01:03:18.927Z","updated_at":"2025-04-21T21:32:14.906Z","avatar_url":"https://github.com/zepto-lang.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"![zepto banner](https://raw.githubusercontent.com/zepto-lang/logos/master/zepto_logo.png)\n![general version](http://img.shields.io/badge/version-0.9.6-yellow.svg)\n![GPL Licensed](http://img.shields.io/badge/license-GPLv2-blue.svg)\n![GHC Version](http://img.shields.io/badge/GHC_Version-8.0-grey.svg)\n[![Gitter](https://badges.gitter.im/zepto-lang/Lobby.svg)](https://gitter.im/zepto-lang/Lobby)\n\nA simple Scheme interpreter in Haskell (originally based on\n[this tutorial](http://upload.wikimedia.org/wikipedia/commons/a/aa/Write_Yourself_a_Scheme_in_48_Hours.pdf),\nextended massively, some code taken from [husk-scheme](https://github.com/justinethier/husk-scheme)).\nIt implements a good enough subset of R\u003csup\u003e5\u003c/sup\u003eRS to make real programming possible,\nbut does not strive for perfect compliance. I guess you could say it tries to\nbe relaxed enough to not get into the way of other interesting things that may\nwant to be implemented.\nFeatures included include but are not limited to the full numeric tower (with\nextensions even), macros, lazy evaluation, continuations, list comprehensions,\nuser-defined types, an extensive standard library, many native primitives, a Haskell FFI,\na native Regex datatype and help for all callables functions provided via docstrings included in\ntheir definition.\nAnd it actually has a decent shell with completion and history (written entirely in zepto itself).\n\nIt is pretty small, so the name might or might not be appropriate.\n\n## Table of Contents\n\n1. **[Maintainers](#maintainers)**\n2. **[Features](#features)**\n3. **[Installation](#installation)**\n4. **[Introduction](#introduction)**\n5. **[Libraries](#libraries)**\n6. **[Contribute](#contribute)**\n7. **[License](#license)**\n\n## Maintainers\n\n* Veit Heller (\u003cveit@veitheller.de\u003e)\n\n## Features\n\nA few of the features were already listed above, but here is a full list of the cool and unusual:\n- A full numeric tower with the addition of a hardware integer datatype\n- list and hashmap comprehensions\n- regex literals\n- macros\n- laziness\n- continuations\n- a modern, awesome package manager (get it [here](https://github.com/zeps-system/zeps))\n- prototype-based generic programming\n- a *huge* standard library, with libraries for testing, monads, parsing, CLI arguments, dates and time, and much more\n- an intuitive Haskell foreign function interface, supported by the package manager\n- #lang definitions that are somewhat similar to Racket\n\nThere is more, but those are my favorites by far.\n\n## Installation\n\nAfter cloning via git (using the `--recursive` flag to make sure you get all the\nsubmodules), building is done via invoking `cabal install` after pulling the latest\nversion of all linked submodules.\nOr `make`, because a plain old Makefile is included, too. After building you can\nrun `make test` to check your installation.\n\nA typical installation workflow through Cabal would look something like this:\n\n```bash\ngit clone --recursive git://github.com/zepto-lang/zepto.git\ncd zepto\ncabal update\nmake\nmake test\n# And then see whether none of the tests yield #f\n```\n\nAlternatively, you can use Stack (this makes it simpler if you don’t have GHC\ninstalled):\n\n```bash\ngit clone --recursive git://github.com/zepto-lang/zepto.git\ncd zepto\nstack install\nmake test\n# And then see whether none of the tests yield #f\n```\n\nThere is also a [Vim plugin](https://github.com/zepto-lang/zepto-vim) \nfor all of you terminal hackers (sorry emacs) and an [Atom plugin](https://github.com/hellerve/language-zepto).\n\n## Introduction\n\n**DISCLAIMER:** This is really only a quickstart. If you plan on going\ninto it a bit deeper, you might want to take a look into the wiki. It all\nis a work in progress, though, so the resources might not be as exhaustive\nas would be appropriate.\n\nIf you know Scheme, working in the REPL should be pretty straightforward.\nCalling it via `zepto`, you should be greeted by this:\n\n```\nzepto Version 0.9.6, compiled with GHC version 710\nCopyright (C) 2015 Veit Heller (GPL)\nThis is free software; see the accompanying LICENSE for copying conditions.\nThere is NO warranty whatsoever.\nHail Eris, all rites reversed.\n\nType ':quit' or press Ctrl-C to exit interpreter,\n':help' to get a list of commands or ':license' to get the license text\n\nzepto\u003e \n```\n\nNow you can just fiddle, maybe try something like\n\n```clojure\nzepto\u003e (pow 3 300) ; for schemers: this is a convenience alias for expt\n=\u003e 136891479058588375991326027382088315966463695625337436471480190078368997177499076593800\n206155688941388250484440597994042813512732765695774566001\n```\n\nPlease note that numerical types are promoted when they work together:\n\n```scheme\nzepto\u003e (+ 1 1.5)\n=\u003e 2.5\n```\n\nThere are a few datatypes, namely integers, floats, rationals, exact and imaginary numbers, \nstrings, lists, hashmaps and vectors. Quoted and quasi-quoted expressions are supported, too.\n\nA faster version of integers, wrapping natives, is available. Please note that\nit is only available via explicitly creating it by invoking `make-small` on a\nregular integer. They will wrap around and overflow just as you would expect from\na hardware integer. It string representation is with `s`-suffix. Whenever it comes\nin contact with other number types, expect it to be promoted. A quick demo:\n\n```clojure\nzepto\u003e (make-small 1)\n=\u003e 1s\nzepto\u003e (+ (make-small 100) 10) ; Fly away, you're an integer now!\n=\u003e 110\nzepto\u003e (make-small (pow 2 63)) ; Hardware-dependent\n=\u003e -9223372036854775808s\n```\n\n*Remember:* If you use small integers, you will have a bad time unless you know\nexactly what you are doing! They are unsafe, your mileage may vary.\n\nIf you need help with a specific primitive, invoke help on it like so:\n\n```clojure\nzepto\u003e (help +)\n=\u003e add two values\nzepto\u003e (help \"+\")\n=\u003e add two values\n```\n\nYou can also get help for normal functions:\n\n```clojure\nzepto\u003e (define (x fst snd) \"multiply two values\" (* fst snd))\n=\u003e multiply two values; source: (lambda (\"fst\" \"snd\") ...)\nzepto\u003e (help x)\n=\u003e multiply two values; source: (lambda (\"fst\" \"snd\") ...)\n```\n\nAnd it autocompletes your newly created function, too!\n\nThere are also List and Hash Comprehensions. They look like this:\n\n```clojure\nzepto\u003e ; [do-this | for-every \u003c- in, optional-check]\nzepto\u003e [(add1 x) | x \u003c- [1 2 3 4]]\n=\u003e (2 3 4 5)\nzepto\u003e [(+ x 1) | x \u003c- [1 2 3 4], (\u003e x 1)]\n=\u003e (3 4 5)\nzepto\u003e #{(+ k 1) (* v 1.0) | k v \u003c- #{1 2 3 4}}\n=\u003e #{2: 2.0, 4: 4.0, }\nzepto\u003e #{(+ k 1) v | k v \u003c- #{1 2 3 4}, (= k 1)}\n=\u003e #{2: 2, }\n```\n\nThe whitespaces matter. The thing is symbol-heavy enough as it is,\nso give it at least a bit of space.\n\nOnce you're done with the fiddling, just do:\n\n```clojure\nzepto\u003e :quit\n\nMoriturus te saluto.\n```\n\nAnd you're back to your regular shell.\n\nYou can also run files  or strings by handing them to the program \nlike that:\n\n```sh\n$ cat t.scm\n(display \"hi\")\n$ zepto t.scm\nhi\n$ zepto --single \"(display \\\"bye\\\")\"\nbye\n$ cat test_args.scm\n(display zepto:args)\n$ zepto test_args.scm hi and bye\n(hi and bye)\n```\n\nAs you can see in the last two lines, command line arguments are\navailable to Scheme via the `zepto:args` variable. It is a list of strings.\n\nIf you want to see examples of real programs, look in the `examples`\ndirectory.\n\n## Libraries\n\nThere are many libraries already imported at startup, such as\ntwo random number generators(one of which is cryptographically\nsecure) and most of the functions you know from your ordinary\nScheme. There are also a few opt-ins.\n\nThere is currently no complete, comprehensive documentation for those\nmodules, but you can find out about single commands via aforementioned\n`help` primitive.\n\n## Contribute\n\nAny contributions are welcome, be it in the form of code,\nfeature requests or bug reports. Documentation is especially welcome,\nat all times.\n\n## License\n\nLicensed under GPLv2. Copyright (c) 2014-2016, Veit Heller\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzepto-lang%2Fzepto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzepto-lang%2Fzepto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzepto-lang%2Fzepto/lists"}