Draft Version Of Template Generator Complete on Github Pages

Happy Easter weekend for those who adhere/tolerate Easter.

I have been working away on a template generator that will use Whiptail and Bash to make Daml smart contracts, albeit initially, basic ones. The framework is quite straightforward, it’s encoding the existing Daml code into the generator that is time consuming.

… guess I could write a generator to populate the generator? :crazy_face:

This is to help me learn more about the language itself, and to brush up my rusty coding skills (cough* cough*)

… not that I claim to be a ‘coder’ :joy:

On my Github Pages site, I have a long post about my rationale for it, with a small example at the bottom, in Bash code, and a screenshot of the output. The token contract is used to show the concept, and the real generator already is far larger than I expected, once I get it working reliably and looking halfway reasonable, I’ll make that available.

Please excuse the non-styling of the blog, the theme plugin is currently non-functional however I will fix that soon.

Draft Version Of Template Generator Complete

If anyone has any suggestions, or critiques, please reply here.

2 Likes

A minor nit is that Daml doesn’t stand for “Digital Asset Markup Language” or anything else, it’s just “Daml” which I know is confusing because it used to be “DAML” and we’re trying to fix that :slight_smile:

Submitting a PR :slight_smile:

1 Like

Hi @quidagis,

Nice post! Not to throw you into another rabbit hole, but are you aware of the Vim “snippet” plugins? From reading the motivation part of your blog, it looks like snippets might be a better solution to your problem than full-blown templates. Here’s a fairly short introductory page on one Vim snippet plugin.

2 Likes

Thank you, I will check this out now.

1 Like

I had a good go at configuring it however it seems that the combination of CocVim-LSP and SirVer/snippets causes a conflict.

Several users have also report bugs or misperformance. I’ll submit a bug report but the core developer is time-restricted, so any fix will not be soon.

Pity, looks like a great tool.