Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seggan/xclj
Clojure, XML edition
https://github.com/seggan/xclj
Last synced: about 2 months ago
JSON representation
Clojure, XML edition
- Host: GitHub
- URL: https://github.com/seggan/xclj
- Owner: Seggan
- License: apache-2.0
- Created: 2024-01-08T20:27:27.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-08T22:20:31.000Z (about 1 year ago)
- Last Synced: 2024-01-09T22:28:21.850Z (about 1 year ago)
- Language: Clojure
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XCLJ
Clojure, XML edition.
```xml
x [a]
a
main [arg]
arg arg
```
## Semantics Bootcamp
Instead of using parentheses to denote function application, we use XML tags. The tag name is the function name,
and the tag contents are the function arguments. For example, the following Clojure code:```clojure
(println (add 1 2))
```would be written in XCLJ as:
```xml
1 2
```
Should you need to use a function that cannot be expressed as a valid XML tag name, you can use the `` tag:
```xml
1 2
````` also literally inserts its contents.
## Usage
```bash
$ java -jar xclj-uber.jar args...
```The input file must have an `` root tag. The function called must be called `main`.
All arguments are passed to the `main` function as a vector of evaluated strings.This is a joke project, but if you happen to somehow find it useful, I'd love to hear about it.