7 comments

  • epage7 hours ago
    Huh, of all of my projects, I never expected this to make it to HN. Not the original author but the maintainer, so ask away.<p>Unfortunately, I&#x27;ve not had as much time to devote to this for a while. There are also a lot of weird cases that aren&#x27;t too well defined or that the Ruby implementation shines through that also have me dissatisfied with Liquid. That and wanting to make it easier to extend with an embedded language. A way to solve this and my annoyance is to create a template language using an existing embedded language. I&#x27;m tempted by koto because it already has something like `|` operator (`-&gt;`) and isn&#x27;t just &quot;Rust, but embeddable&quot; (Rust is an implementation detail; it shouldn&#x27;t bleed through).<p>[0] <a href="https:&#x2F;&#x2F;koto.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;koto.dev&#x2F;</a>
  • hkalbasi7 hours ago
    I like <a href="https:&#x2F;&#x2F;github.com&#x2F;rust-sailfish&#x2F;sailfish" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rust-sailfish&#x2F;sailfish</a> more. It accepts arbitrary Rust code in the template so you don&#x27;t need to learn another syntax.
    • transpute7 hours ago
      For ~100K authors with content on Github Pages, Liquid conformance avoids learning new template syntax or a programming language.<p>For a greenfield site where Jekyll&#x2F;Liquid compatibility is not beneficial, Zola may be an option, <a href="https:&#x2F;&#x2F;github.com&#x2F;getzola&#x2F;zola" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;getzola&#x2F;zola</a>
    • skrebbel7 hours ago
      One key feature of Liquid is that you can safely run customer-written code on your servers without worrying about security. It&#x27;s a very underpowered language by design. This means that it&#x27;s rather easy to be confident that its sandbox isn&#x27;t leaky.
    • epage6 hours ago
      Looks like this does compile time templating. There are reasons to explore using those over runtime templating but they don&#x27;t cover all of the use cases.
  • transpute8 hours ago
    <p><pre><code> Conformant: Incompatibilities with strict shopify&#x2F;liquid are bugs to be fixed. Flexible: Liquid embraces variants for different domains and we want to follow in that spirit. Performant: Do the best we can within what is conformant. </code></pre> This has potential to replace Github Pages ruby-based Jekyll+Liquid, which is unusably slow on iOS without JIT.<p>Compiled cobalt with liquid-rust on iSH is fast enough for static blog publishing and browser-based offline site preview on iOS&#x2F;iPadOS, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=46220227">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=46220227</a>
  • tigranbs7 hours ago
    Ah nice! I should integrate this into <a href="https:&#x2F;&#x2F;github.com&#x2F;SaynaAI&#x2F;sayna" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SaynaAI&#x2F;sayna</a><p>``` Performant. Do the best we can within what is conformant. ```<p>Would be great to have benchmarks like ops&#x2F;second
  • nesarkvechnep8 hours ago
    I thought it is something like Liquid Haskell...
    • zokier7 hours ago
      That would be LiquidRust without the hyphen <a href="https:&#x2F;&#x2F;publikationen.bibliothek.kit.edu&#x2F;1000152005" rel="nofollow">https:&#x2F;&#x2F;publikationen.bibliothek.kit.edu&#x2F;1000152005</a><p>or flux <a href="https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;10.1145&#x2F;3591283" rel="nofollow">https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;10.1145&#x2F;3591283</a>
  • Blackarea7 hours ago
    Why they call pipes filter? And if... endif? Not for me
    • epage6 hours ago
      This is a Rust port of the Ruby implementation which was popularized by Jekyll, so it just does whatever was done in the Ruby implementation.<p>For an overview of liquid itself, see <a href="https:&#x2F;&#x2F;shopify.github.io&#x2F;liquid&#x2F;" rel="nofollow">https:&#x2F;&#x2F;shopify.github.io&#x2F;liquid&#x2F;</a>
  • toprerules6 hours ago
    Ah, I thought this was adding refinement types to Rust based on Liquid Haskell. Disappointed.