JS

JStachio a type-safe Mustache engine that is incredible fast

Hacker News

JStachio a type-safe Mustache engine that is incredible fast

Hi HN, I have been working on a Java template engine that is type-safe and uses Mustache for syntax. I developed it because my company has been using Mustache (and handlebars) heavily for a decade now and I always wished there was a type-safe version. It is fully compliant to the v1.3 Mustache spec which had some unique challenges given that JStachio is not late binding like most Mustache implementations as well as templates cannot be dynamically changed like most implementations. After almost a year it is ready for 1.0.0 which I hope to do this week. It has been production ready for some time but I took extra time on documentation, getting the API right and real world benchmarking. It generates readable Java code once the templates are compiled and thus very Graal VM Native friendly. It is the fastest templating engine for Java. I know that is a bold statement but unlike others I not only tested with JMH doing String output but also with TechEmpower's Framework benchmarks. https://github.com/agentgt/template-benchmark Speaking of TechEmpower If you have a framework on TechEmpower that is Java performing the Fortune benchmark I recommend picking JStachio. It was not my intention to be the fastest but I did benchmarking to make sure my 1.0.0 API would be future proof (always good to make sure the API does not prevent going fast). Anyway I have some really exciting future plans on dealing with polymorphic data with Mustache's dynamic name/partial support. In Javascript this is accomplished with String fields being the name of the template. In JStachio this will be done with annotated sealed classes (yes Java is slowly getting sort of ADT/sum types) which is safer and will exhaust all sub types. https://github.com/jstachio/jstachio/issues/140 Check it out and let me know what you think!

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
87%87% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: agent, using, code · Missing: mac, agents, macos
61%61% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
49%49% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: friendly · Missing: plus, platform, intuitive
41%41% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
39%39% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: real world · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

I
I made type-safe Firestore ORM and call it Typesaurus52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I made type-safe Firestore ORM and call it Typesaurus

Hacker News3
C8
C8x type safe K8s deployments42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

C8x type safe K8s deployments

Hacker News2
Ne
Newzly-phantom – Asynchronous type-safe Scala DSL for Cassandra49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Newzly-phantom – Asynchronous type-safe Scala DSL for Cassandra

Hacker News16
NextStd
NextStd51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Type-Safe alternative to stdio.h for C

Product Hunt+1
Pr
Promises – Type safe promise library for go41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Promises – Type safe promise library for go

Hacker News7
Am
AmanithVG, blazing fast OpenVG engine61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AmanithVG, blazing fast OpenVG engine

Hacker News3
Ty
Type-safe metaprogramming for Java (and other killer lang features)29%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Type-safe metaprogramming for Java (and other killer lang features)

Hacker News3
Ty
Type-Safe and Promisified API for Web Worker and Iframe43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Type-Safe and Promisified API for Web Worker and Iframe

Hacker News2
Re
Rescue – type-safe exceptions for Python38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rescue – type-safe exceptions for Python

Hacker News7
Po
Pocketstore – Type-safe session/localStorage with expiry23%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pocketstore – Type-safe session/localStorage with expiry

Hacker News1