HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mattbierner
Template-Assembly
C++2017–2025
mattbierner / Template-Assembly

Template-Assembly

Embedding x86 assembly code in C++ with metaprogramming using a domain specific language.

2Distinct people
2Mentions
0Explicit recommenders
190GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Embedding x86 assembly code in C++ with metaprogramming using a domain specific language.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year2 dated mentions

Observed mentions: 2017-09-09 04:17:13 UTC to 2025-04-16 02:22:47 UTC.

012017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

2 sources
Super fun site! Did you get inspiration from other assemblers or macro processors? You have it running on a TRS-80, how does that work? I had no idea Rust could target a TRS-80. I am getting hints of Forth, Lisp and TCL. How would you go about laying out structs in memory? I am sure you considered an internal DSL, what caused you go with something stand alone? Any thoughts on adding a constraint solver, like Z3 and allowing end users to set constraints on things like the size of a jump. I could see taking this an growing it into a compiler by making macro(macro(macros txt))) Is there an internal IR? Projects for inspiration https://github.com/mattbierner/Template-Assembly Specifying representations of machine instructions https://dl.acm.org/doi/pdf/10.1145/256167.256225 https://www.semanticscholar.org/paper/Specifying-representat... Typed
Read the rest
Assembly Language (TAL) https://www.cs.cornell.edu/talc/ And you haven't come across it, you are in for a treat https://en.wikipedia.org/wiki/META_II has spawned a whole trove of clones https://en.wikipedia.org/wiki/OMeta https://github.com/DalekBaldwin/clometa
In Show HN: Torque – A lightweight meta-assembler for any processor
I once (ab)used this approach to express x86 assembly directly in C++: https://github.com/mattbierner/Template-Assembly The library uses standard C++ syntax to build up complex templated types that represent the assembly code. These types are then passed through a simple templated "assembler" at compile time, which spits out a c string of machine code which you can invoke at runtime. Now if only someone would write a compiletime C compiler in C++ templates...
In Executing an array as a function

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.