Re: CloudFormation template generation with Clojure

2013-11-27 Thread Kevin Bell
Cool, thanks Marshall! I do think it would be nice to have an option to more or less compile/decompile between Clojure and CloudFormation templates. That would help lower the barrier to entry for people currently heavily using CF but not so much Clojure. (I'm kind of trying to use this project

Re: CloudFormation template generation with Clojure

2013-11-27 Thread Marshall Brekka
I recently wrote a CF template building tool for my company. its part of a larger project that we want to eventually open source, but the CF template stuff is small enough that I can put most of it into a gist. https://gist.github.com/marshallbrekka/7686151 This was basically copied and pasted f

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
Hey Gary, Thanks for the references. Those videos were awesome! I think Cristophe definitely hit the nail on the head with this slide about the challenges of binding. Though, I'm not sure I fully get what he meant by "binding specs" and "capturi

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Gary Verhaegen
Before you decide on the question of macros/dsl versus data api, I would recommend watching the "(not= DSL macro)" talk from a few years ago. It nicely illustrates the tradeoffs involved, and hints at the reasons why the Clojure community, as opposed to traditional lisps, tends to gravitate more to

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
Hey Craig and Jeroen, Jeroen: Can you elaborate on what kind of features you would like to support? Are you just deciding on DSL syntax or do you have already some kind of Clojure layer working? -My main goals are to create as "pretty" of a format for defining CF templates within Clojure synt

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Craig
Kevin, Typical advice is to not use macros (implicitly used in the gists to build a CF DSL) when functions or data will suffice. Sometimes however the syntactic sugar is quite tasty and hard to overlook. I do not have enough knowledge of the domain to suggest what might be the correct approach

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Jeroen van Dijk
Hi Kevin, I've created some kind of wrapper around CF templates too. It is too immature (and ugly) to open source it, but I think it has some nice features, like Ref checking, templating for userdata and schema validation of the CF resources via Prismatic Schema. Can you elaborate on what kind of

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
Hey Craig, Thanks for the input. Forgive my naiveté, but I gather you're implying that the DSL-ishness is desirable? That makes sense, and it seems to be inline with what I'm learning about the lisp mindset. You're suggestion is actually a lot more like an option that I was considering but di

Re: CloudFormation template generation with Clojure

2013-11-25 Thread Craig
I don't know much about CF templates, but stripping some detail from your middle fragment moves further from data and to a DSL: (deftemplate my-template :aws-template-format-version "2010-09-09" :description "My description" (param my-parameter :type :string :description "My string para

CloudFormation template generation with Clojure

2013-11-25 Thread Kevin Bell
Hey folks, I'm working on a tool to enable the generation of AWS CloudFormation templates using a Clojure-based syntax kind of like leiningen's project.clj. I'm working on how the syntax should look to be most clojurey, and I wonder if anyone has some input: https://gist.github.com/bellkev/7653