i wrote a Grantlee alternative in 100 LOC...

Tomaz Canabrava tcanabrava at kde.org
Wed Oct 28 08:03:45 PDT 2015


On Wed, Oct 28, 2015 at 11:59 AM, Lubomir I. Ivanov <neolit123 at gmail.com>
wrote:

> ...for fun.
>
> not much to prove here other than what we need for the printing
> templates is quite simple and Grantlee is an overkill.
>
> unfortunately, it's already tightly integrated in the source tree as
> Gehad did well implementing it.
> i have no plans to change that anytime soon.
>
> a couple of years ago i suggested to write a simple parser for HTML
> input with variable replacement (i was planning C, even), but i didn't
> have a good idea how to approach the printing templates business.
> instead, Tomaz suggested Grantlee and we agreed it's the way to go.
>

oh well, it's already stable and used by quite a lot of projects. We can
also talk to the maintainer and show your version to see if he is
interested in simplyfing grantlee. :)
or rip off grantlee's code from subsurface if that makes the code easier /
faster. I'm always in favor of refactoring something to make it better.



>
> here is the Qt version of such a POC parser that uses QHash and QString.
>
> - fast, can be even faster
> - no meta compilers
> - direct control of which variables are special (e.g. the dive notes
> support LF)
> - direct control of template loading
>
> sometimes reinventing the wheel makes life easier. ;-)
>
> lubomir
> --
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151028/5b758547/attachment.html>


More information about the subsurface mailing list