Hi, I'm Kevin Mackey

Hello, everyone.

I’m Kevin Mackey, native Irish (Dublin), studied in Salamanca, Spain for a year, worked in Ferney-Voltaire, France for two, in the San Francisco Bay Area for twenty, and coming up on eight years here in Kansas City, Missouri.

I’ve built code generators since about 2008 because, as someone mentioned in their introduction, there is a LOT of repetition in programming (and I think it’s getting worse!) and I get bored doing the same thing more than twice.

Fell in love with ANTLR (weird, I know, but that’s how it is) and even managed to learn how to use Terence Parr’s StringTemplate language for some of my work.

Last year I put together a language to capture data structures (because we don’t have enough of them, right? :slight_smile: ), but also to allow a developer capture additional information that a generator could use to build, say, REST services that might need authentication, or…whatever.

I borrowed concepts from uast · pkg.go.dev to form the AST, and used what I’d learned in that exercise to build an ANTLR parser in order to transpile a scripting language used in a 3270 terminal emulator to a Windows script (AutoHotkey) for driving Windows version of the same programs that used to run on a mainframe.

I’ve been known to speak on code generation at various SQL Saturday events around the US, during which @laurent.guer1 and Telosys are mentioned more than once.

I’m here to learn, if I can. I find the idea of DSLs very powerful.

  • KjM
8 Likes

Hello, Kevin.

Welcome to the forum!

I would bet that you enjoyed your time as a student in Salamanca, because it is a city with a lot of university atmosphere.

I live in Gijón, on the north coast of Spain.

1 Like

Thank you. Years after I had been there I saw an ad in National Geographic, when Spain was doing its “Everything under the sun” campaign. It was a two-page spread of the Plaza Mayor in Salamanca. I SO wanted to be back there!

1 Like

Hi Kevin (albeit, nearly a year later!),

Have you been exposed to the OpenAPI 3.0 specification? It seems like there is an overlap between the metadat associated with your language and the aims of OpenAPI 3.0.

–jb

Hi,

Up to your message I hadn’t been exposed to the OpenAPI 3.0 spec. I now have. Wow! How very complete.

My thought is that the metadata language I put together (which I named OSCAR…just because) is a shade more abstract, somewhat more terse, and thus may be easier to capture the necessary elements than the OpenAPI version. In addition, my thought was to generate more than RESTful services, part of the “…REST services…or…whatever” of my statement above. Specifically the “…whatever.”

I’ve generated SQL DDL and DML code, C# XML shredders for known XML message structures, Java classes…and also REST services.

I imagine, with the correct templates, I could build an OpenAPI 3.0 server/services description from a more terse description in OSCAR, which might be no bad thing. The OpenAPI spec seems more API-centered (not a surprise, I suppose, it’s there in the name!) whereas OSCAR is more “Schema Object” centered, to use the term from the OpenAPI spec.

I can even see it might not be a huge task to build a code generator to operate on an OpenAPI 3.0 spec for a set of services and produce those services, and (at least the basics of) clients to invoke those services.

Thanks to the pointer to the specification. As I wrote in my intro, I’m here hoping to learn. You’ve contributed to that.

Thank you.

You are quite welcome!

I imagined that an “adapter” between OpenAPI 3.0 and OSCAR might be quite valuable. I hope it proves to be true.

I’ll also quite appreciative of your gratitude for the information to enhance your knowledge. It’s one of my personal passions to enhance my own knowledge; unfortunately it doesn’t seem to be as important of priority for most folks I deal with.

1 Like