<FromGitter>
<kolyaio> I'm trying to install amber on manjaro and when I'm trying to compile amber I get syntax errors :O ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ The same happens when I trying to use the AUR [https://gitter.im/amberframework/amber?at=5b7ade16e026575f0f9cdea7]
<pracabor>
@kolyaio, latest amber release is not yet compatible with crystal 0.26. if you switch to Amber branch master, that is the release candidate for compatibility with crystal 0.26
<FromGitter>
<kolyaio> Oh :O
<FromGitter>
<sclee15> Is there a way to reduce the compile time for amberframework?
<pracabor>
@sclee15, compile time for amber (and crystal at large) is a known issue that we hope to address in the long term. As of now, there is no way to shorten it. Sorry :<
<FromGitter>
<sclee15> @pracabor thanks.
<pracabor>
@sclee15, part of the reason it compiles slowly is that it parses and assembles templates at compile time, which means runtime is much faster. Unfortunately it does slow down the devevlopment cycle a bit.
<FromGitter>
<rishavs> pracabor, how does amber compile templates for dynamic pages at compile time? I am assuming this way of doing things only benefit static sites...
<pracabor>
it's part of the language, but essentially the templates are read at compile time and converted to StringBuilders, which are compacted into the binary. The weird side effect is that it takes longer for Crystal web applications to serve regular files stored on disk (javascript, etc) than it does a templated view
<pracabor>
I should say, it's part of Kilt.cr, the template library used most everywhere
<pracabor>
all of the syntax rules of slim, ecr, etc, are enforced at compile time and converted to StringBuilders
<FromGitter>
<rishavs> yes, but it should only work for static pages. dynmic pages will need to be genrated based on the route and data and I think there is no way to do them at compile time
<FromGitter>
<rishavs> So at least for that specific usecase, this compile time buiding of templates is not efficient
<pracabor>
how to explain
<pracabor>
the static portions of a view template are allocated on the stack, as fixed strings, so no IO read is necessary
<FromGitter>
<rishavs> actually, ater rereading your comment a few times, i got it
<pracabor>
the dynamic portions are inserted at runtime, for sure, but that's also already on the stack