I've open sourced and published my InfluxDB-to-MySQL protocol converter to https://github.com/philip-wernersbach/influx-mysql. It is written in Nim, and is being used in production to power a big data solution. This is a great example of production software written in Nim.
Haha, yep, it's a pretty comprehensive project and is bigger than a lot of Nim projects. The code makes use of Nim features such as async and macros. Imagine how large the program would be if Nim didn't have those features!
@pwernersbach - That's a really cool project, and I'm glad that you shared it! I love that you use the 'not nil' annotations for your argument types and type definitions, and I've enjoyed reading through it, even though I'm not currently using InfluxDB.
I hope you don't mind a few questions, but I'd really like to learn more about how Nim is used "in the wild"since I'm using it for my own projects and would love to learn more best practices.
Could you talk a bit about the useDBmacro? I can see that it's a try-with-resources for the DB connection, but could this be done as a template (like the 'withFile' example in the manual?) Is using the immediate pragma needed so that you don't have to mark all of the parameters as 'untyped', or are you doing that for the overloading resolution?
How did using nimprofwork for you? Is that why / how you have the GC_disableand GC_enablein critical parts?
The problem you point to with refcounting and long link lists seems bad and I definitely see the rationale for reflists - it looks like you're using finalizers with ReadLinesFutureContext and its 'super' to manage cleanup - have you had any problems with finalizers? I'm not sure I've seen another project using Nim finalizers in production, and the manualtalks about using destructors differently, so I'm not sure if the new(foo, destructor)is here to stay or not.
In your splitIndividualStatementsiterator, you're checking for 'SELECT' character-by-character - could you do something like
ifstmts[pos+1..pos+6]=="SELECT":# Do whatever work herediscard
or was there a performance difference in doing character-at-a-time approach?