HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
combinatorylogic
mbase
Perl2014–2024
combinatorylogic / mbase

mbase

Metaprogramming framework for .net

3Distinct people
25Mentions
1Explicit recommenders
91GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Metaprogramming framework for .net

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

LISP is so powerful you can embed an ML in it while still getting its benefits for your use case. Incremental, per-function compilation, easy macros, and live updates were my…

nickpsecurity used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

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

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

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 year25 dated mentions

Observed mentions: 2014-09-09 06:45:58 UTC to 2024-03-07 12:38:57 UTC.

02468102014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-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 comments20192020-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 comments2022-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): 1 mentions; 0 submissions, 1 comments2024

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
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC1019
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC606
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC606
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
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 UTC101

What Hacker News says

25 sources
The section on macros notes that they can do the transforms but don't have access to compiler information. The compiler toolkits section doesn't have any LISP examples. It's worth noting that sklogic's tool (2005) is a compiler/analysis toolkit in LISP w/ DSL's and I think he said it facilitates accessing compile-time information. I know he does that somehow. There's also tons of existing DSL's that can be used interchangeable to aid expressing complex systems. The company whose name is on it uses it for design of static analyzers. https://github.com/combinatorylogic/mbase Might send it to rsc given it he probably missed it or might have some insight after glancing at it.
In An Extension-Oriented Compiler (2008) [pdf]
All the arguments against the CL-style macros are stemming from the fact that it's far too easy to get into a total mess with them, simply because of their infinite flexibility. Yet, if you follow some very simple rules, you'll get the opposite. Firstly, macros must be simple and must essentially correspond to compiler passes. E.g., if you're implementing an embedded DSL for regular expressions, one macro expansion pass should lower your DSL down to a syntax-expanded regular expression, the second macro would lower it into an NFA, another one would construct an optimised DFA, and then the next one (or more) would generate the actual automaton code in Lisp out of the DFA. The best possible case is when your macro pass can be expressed as a set of simple term rewriting rules. And most of the transforms you'd find in DSL compilers can actual
Read the rest
ly be represented as such. Of course, there is also an alternative style, which may be preferable if you have debugging tools for designing your compiler passes at least equivalent to the Lisp macro expansion debugging. You can simply write your entire DSL compiler as a single function, and then wrap it into a macro, as `(defmacro mydsl (&rest args) (mydsl-compiler args))`. This way, the same compiler infrastructure can be reused for an interpreted or partially interpreted version of your DSL, if you need it. Still, all the same rules apply to how the passes are implemented in that compiler function. Another very useful trick is to make your DSLs composable, which is easy if you split your compilation pipeline into separate macro expansion passes. Multiple DSLs may easily share features of their internal IRs or even front-end languages, so any new DSL would simply cherry-pick features from a number of existing DSLs and wrap them into a simple front-end. This degree of composability is simply impossible with the function-based interpreted eDSLs. A can recommend taking a look at the Nanopass [1] framework, which is built around this very ideology, or at my own DSL construction framework [2]. [1] http://andykeep.com/pubs/np-preprint.pdf And some examples: https://github.com/cisco/ChezScheme https://github.com/eholk/harlan [2] https://github.com/combinatorylogic/mbase
In Rebol vs. Lisp Macros
"I can't seem to find anything directly related to the software part - is SML/NJ a verified implementation of ML'97?" The page says it's included in SML/NJ distribution. Probably one of the tarballs. SML/NJ is just an old compiler for SML 1997. FLINT is techniques and code needed to certify compilation. They're different things but apparently bundled. "probably because more people actually write real software in OCaml than in SML?)" That's what I've gathered. The SML people have strong academic focus with Ocaml people having more practical focus. A big community built up around it. "As for Racket and SML, I came across" That's neat but they both have no type checking. I'll skip to next question as it's relevant here. " Curious about your line of thinking there." LISP is easy to parse, easy to interpret, has robust compilers, supports incr
Read the rest
emental compilation of individual functions, modify/debug a running program, and especially extension with macros. Racket is a batteries-included LISP with IDE, active community, and strong support for DSL's. Now, ML's strengths are strong typing, type inference, easily integrated into formal verification, lots of prior work/tools in that (incl compilers), and easy to model w/ macros. Embedding ML in a LISP gives me the best of both worlds. I once did this in a 4GL to have rapid development with extraction to C/C++ with safety, portability, etc stuff auto-inserted. Easy parsing also lets you extract to a number of ML's or LISP's to use their tooling to catch extra errors in yours. I've only run into two tools outside of Racket doing this sort of thing: https://github.com/combinatorylogic/mbase http://julialang.org/ Mbase is used in commercial tools for static analysis, etc. It's a LISP and toolset custom designed for easily making things like compilers that comes with many DSL's for specific tasks, including ML. Julia raises the bar for 3GL language experience via a compiler written in LISP (femtolisp) that immediately translates the AST's into LISP expressions and works from there. It's more advanced than, but similar advantages to, the 4GL I wrote as it combines best properties of static typing, dynamic productivity, macros, and C support. Underlying LISP that enables that is only about 1,000loc to implement IIRC. So, that's my thinking. I also thought of implementing the tool in MLton, too, but such things are even easier when your tooling and language makes extractions trivial. ;)
In CakeML: A verified implementation of ML
Actually I do have a such a framework [1], but this is not my point here. My point was that it's relatively trivial to implement such a collection of DSLs on top of pretty much any sufficiently powerful (i.e., CL-like macros) meta-language. If you don't have a ready to use language construction framework targeting your meta-language, just build one. Easy. As for typing specifically, the approach is rather fun and simple. Firstly, you'd need something like Prolog. It's really not that much, you can quickly build a passable implementation in just a couple of dozens of lines of code in pretty much any language. See miniKanren [2] for example. Then, any kind of typing is done easily: write a simple pass over your AST (may require some preparation passes, like resolving the lexical scope - but this is useful for all other things too), that wil
Read the rest
l spit out Prolog equations for each expression node that needs typing. Then execute your Prolog code and get your types back. An implementation won't look any more complicated than a formal specification of a type system in a paper, using the type equations (as in [3]). [1] https://github.com/combinatorylogic/mbase [2] http://minikanren.org/ [3] http://stackoverflow.com/questions/12532552/what-part-of-mil...
In The Lisp Curse (2011)
nickpsecurity·Jan 22, 2016Recommendation phrase
LISP is so powerful you can embed an ML in it while still getting its benefits for your use case. Incremental, per-function compilation, easy macros, and live updates were my favorite features. There's also been a ton of work running LISP's fast. Subsets even compiled to hardware in the past, including SHard (still around) and DDD. Example from sklogic that embeds ML in LISP https://github.com/combinatorylogic/mbase
In Why do we need a new OS?
Any language that allows compile-time metaprogramming (and not as restricted as TH) should allow to implement all the components I want. One example of such a system is the Nanopass framework [1], used alongside with cKanren [2]. Another example is my own system [3]. [1] https://github.com/akeep/nanopass-framework http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf [2] http://scheme2011.ucombinator.org/papers/Alvis2011.pdf [3] https://github.com/combinatorylogic/mbase
In State of the Haskell ecosystem
That's exactly the approach I'm preaching. I've built entire layers of languages above Lisp using this kind of eDSLs: https://github.com/combinatorylogic/mbase So, yes, as long as you have a sufficiently powerful meta-language, eDSL is almost always better than a library. But yet, if your language is not powerful at all, DSLs (standalone) are still better then the libraries, they're just a bit more complicated to implement.
In Buzz: An Extensible Programming Language for Self-Organizing Robot Swarms

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

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.