Skip to main content

Build small applications from Hy source files

Project description

WIP

Hypo

MIT License python PyPI
Hy is a LISP dialect running on a Python virtual machine. Hypo allows you to build small applications from Hy source files. Similar to Python’s zipapp, Hypo creates executable archives. Since the Hy source files will be compiled into .pyc files, the executable archive will run faster than on interpreter.

Requirements

  • Python >= (2.6, 3.5)

  • Hy >= 0.12.1

Installation

$ pip install hypo

Usage

$ hypo --help
usage: hypo [options] <targets>

options:
  -o [file]  output name
  --version  show program's version number and exit
  --help     show this message and exit

Example

You can build these source files as follows:

$ hypo -o app main.hy iota.hy

And you can execute the application as follows:

$ ./app
(0L 1L 2L 3L 4L 5L 6L 7L 8L 9L)

or

$ python app
(0L 1L 2L 3L 4L 5L 6L 7L 8L 9L)

Source files

  • iota.hy

(defn iota [m &optional [n 0] [step 1]]
  (if (>= n m)
    None
    (cons n (iota m (+ n step) step))))
  • main.hy

(import [iota [iota]])

(defmain [&rest args]
  (print (iota 10)))

License

Distributed under MIT License.

Author

Kojiro TANI (kojiro0531@gmail.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypo-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file hypo-0.1.0.tar.gz.

File metadata

  • Download URL: hypo-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hypo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5fbf7f1e8b7cda6082ea4a908eb113c73c8399d2ca47c15308b4310ac602238
MD5 19308ab670b336f3f2dc14a981a6ef32
BLAKE2b-256 55df20159e82d433f1812b0306d5a9782278ec3139dd3a4cbc8e220447239a6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page