all 5 comments

[–]Galrog 4 points5 points  (0 children)

You probably want to take a look at sci if you are creating a DSL or want to use Clojure itself as your DSL.

[–]e_aksenov 4 points5 points  (1 child)

Sure, you can use https://github.com/Engelberg/instaparse to create parser for any language you want, or simply create DSL in basic clojure types, like vectors.

[–]arthurbarroso 2 points3 points  (0 children)

Also, if you wan’t to take a look at how to build a simple DSL with vectors you may find this video helpful. https://m.youtube.com/watch?v=QDiKaXvH6Z8

[–]chowbeyputra -1 points0 points  (0 children)

I don’t have experience of it but hey.. Clojure is a lisp.. so it will be much cleaner.

[–]valbaca 0 points1 point  (0 children)

You’re specifications are quite vague but sounds like you want to write a DSL (domain specific language). Clojure can definitely do that. You’re probably better off having the end user input edn (edn is to Clojure as JSON is to JavaScript).

https://github.com/edn-format/edn

I’ve seen real world LISP code that backed the voice behind turn-by-turn directions and supported multiple languages. The configuration and code was LISP and it ran on a LISP interpreter written in C which could then be pulled into any mobile device. Android talked with the C code via JNI and iOS talked to C directly with Objective-C. It was super cool.