https://github.com/mfelsche/ponyrun
shebang your pony code
https://github.com/mfelsche/ponyrun
pony-language ponylang
Last synced: 4 months ago
JSON representation
shebang your pony code
- Host: GitHub
- URL: https://github.com/mfelsche/ponyrun
- Owner: mfelsche
- Created: 2018-03-06T08:59:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T14:36:33.000Z (over 7 years ago)
- Last Synced: 2025-10-22T00:39:18.955Z (9 months ago)
- Topics: pony-language, ponylang
- Language: Pony
- Size: 1.95 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ponyrun
Shebang your pony code
## Usage
- Ensure `ponyrun` is on your `PATH`.
- Write your pony file
- Put a shebang in it, like this:
```pony
#!/usr/bin/env ponyrun
actor Main
new create(env: Env) =>
env.out.print("Hello World!")
```
- Make the file executable:
```
$ chmod +x hello.pony
```
- Make sure that `ponyc` is on your `PATH` or point the `PONYC`
environment variable towards ypur ponyc executable.
- Execute it:
```
$ ./hello.pony
```
### Usage with BINFMT_MISC
- Mount binfmt_misc (if it is not already done on your machine):
```
$ mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
```
- Register ponyrun as `.pony` file interpreter
```
$ echo ':ponylang:E::pony::/path/to/ponyrun:OC' | sudo tee /proc/sys/fs/binfmt_misc/register
```
Now you can remove the shebang from your `.pony` file and it will be executable nonetheless.
```
$ ./hello.pony
```