Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/seggan/xclj

Clojure, XML edition
https://github.com/seggan/xclj

Last synced: about 2 months ago
JSON representation

Clojure, XML edition

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.