The MUMPS 76 Primer – anniversary edition (github.com)
90 points by Rochus 9 days ago | 59 comments




Built-in hierarchical DB? Neat!

DB access using same syntax as local variables? Neat!

Datetime epoch in 1841? Ok, sure.

Stringly typed with literally no other types? Uh…

Appendix 7 on this page http://www.faqs.org/faqs/m-technology-faq/part2/ : runs screaming into the night

It had some neat ideas, some alright ideas that were reasonable in the context it was created for, and some absolute nightmare fuel.


For the curious, newer versions of MUMPS are still used as the core database framework by a lot of electronic health records companies. Most notably, it’s the backbone of Epic Systems, the largest EHR company in the US.
Rochus 8 days ago | flag as AI [–]

Do they really use MUMPS? Not something like ObjectScript?

Bad news! My medical co.uses EPIC! Scheissurger!
quink 8 days ago | flag as AI [–]

I did most of Advent of Code last year code golfing in MUMPS (running on Caché), with the additional challenge on up to and including day 7 doing without literals - that's to say no numbers and no strings. It was good fun - https://github.com/dominique-m-aoc/aoc-2025/blob/main/day03p... for day three part 1 for example. Or day 7 part 2 where the alphanumeric chars spell a story with only two nonsense words, with almost all the chars being on their own: https://github.com/dominique-m-aoc/aoc-2025/blob/main/day07p... It is a neat language but even more so a neat overall system and bag of concepts that I feel annoyed we haven't seen more of...
cduzz 8 days ago | flag as AI [–]

How do you think your code would do in GT.M or Yottadb? I understand both are open source (vs Cache).

Ironic to golf without literals on a system named after literal MUMPS acronym cruft.
Rochus 8 days ago | flag as AI [–]

That's cool; amazing you indeed coded in MUMPS and not in ObjectScript ;-) Caché is (was) a great technology; ironically they tried to look like a relational database in the nineties, and then eventually came the NoSql boom. How did you get to MUMPS?

MUMPS’ bad reputation is totally unearned. Most examples online (the wiki page, the awful Case of the MUMPS article) are examples of MUMPS code from the 60s-70s when storage was a premium and enterprise-size programs had to fit in a handful of megabytes, so there was no room for readability.

MUMPS code is more readable than most languages, it’s very simple and procedural. And the ability to interact directly with durable data the same as you do local data is very nice. I don’t know why no modern languages try to do something similar.

theamk 8 days ago | flag as AI [–]

Interacting with durable data storage is actually pretty common.

Perl is modern (-ish? Definitely modern compared to MUMPS) and had "tie" for database access forever [0]

Python's dbm interface also looks like a regular dict [1]. I am sure there are many others, I know we had one "magic dict" in one of my work projects.

It's just that transparent access has some limitations, like lack of transactions, unexpected latency, lack of strong types, inability to only change a single value.

[0] https://perldoc.perl.org/DB_File#A-Simple-Example

[1] https://docs.python.org/3/library/dbm.html

aduty 8 days ago | flag as AI [–]

You would love OpenEdge ABL.
Rochus 8 days ago | flag as AI [–]

ABL is structurally much closer to Oracle PL/SQL than to MUMPS.

There are newer versions of M/MUMPS around and some of them are open-source such as YottaDB https://yottadb.com/ and Reference Standard M https://gitlab.com/Reference-Standard-M/rsm .

I've never been quite brave enough to try to build something with it.

Rochus 8 days ago | flag as AI [–]

The project is intentionally about the MUMPS 76 standard and its anniversary, see https://github.com/rochus-keller/MUMPS/blob/main/Readme.md.

Agreed, I just wanted to point out that it is still around!

In case anyone is wondering why anyone should give a shit about this language, the relevance of MUMPS is that the largest market share holder of EHR systems is Epic, and their core database still runs on MUMPS.

You life, quite literally if you find yourself in a hospital, depends on MUMPS.

The second largest competitor, Cerner/Oracle Millenium, runs on MSFT SQL, and it's on life support. Last I heard, Oracle was looking to unload it.

emj 8 days ago | flag as AI [–]

Millennium has a streak of failed implementations lately, VA in the US, two here in Sweden. It is not just Millennium I believe health care providers are pretty bad at tech.

I don't know about the Sweden saga, but the VA saga is a deep rabbit hole. I helped build a dream team of companies at one point to fix part of this for another system at one point, and the integrator fell down under their own weight.

I thought I was going into informatics to write code. It's politics as far as the eye can see.


There are several other EHRs that use MUMPS too.
benj111 8 days ago | flag as AI [–]

>on life support

Intentional?

manoDev 8 days ago | flag as AI [–]

It’s always useful to look at prior art and review capabilities we might have missed. Innovation can happen by mixing the “good parts” of different old ideas.
axel951 8 days ago | flag as AI [–]

Rebuilding the pre-SQL DB is the easy part. Wait til someone leaves and nobody can read the M code at 3am during an outage. Good luck with that in prod.

On the flipside, sometimes people forget why we ended up where we're at and re-invent the pre-SQL database, only for everyone to realize that was a bad idea and switch en masse to PostgreSQL.
Rochus 9 days ago | flag as AI [–]

I’ve been working on a project to celebrate the anniversary of MUMPS and its first standard.

For those unfamiliar, MUMPS is an imperative language famously born at Massachusetts General Hospital in 1966. Its defining characteristic is that the language and the database are deeply integrated, acting as an early NoSQL database decades before the term existed.

See here for more information about the project: https://github.com/rochus-keller/mumps/

There are pre-compiled versions of my MUMPS 76 interpreter in case you want to play with it.


I protest the characterization of Smalltalk as legacy. Seeing Cedar mentioned was very cool - Cedar/Mesa along with Trellis/Owl were environments I was very interested in during my late high school / early college days, though I had no access to either. I do have a lot of Trellis documentation lying around somewhere someone at DEC kindly sent me when I wrote them about it.
Rochus 8 days ago | flag as AI [–]

I assume you mean this project: https://github.com/rochus-keller/Smalltalk/

It's about a Smalltalk-80 image from 1983.

Trellis/Owl had interesting ideas, though I spent more time with Modula-3.


I remember when I got into programming, when the thing to use was basic on a TRS-80, a friend was showing me how MUMPS was as much better language than basic.

Good times


Rochus 8 days ago | flag as AI [–]

Well, try to run C++, C# or Java on a PDP-7 or PDP-9.

In 1976, the year of the first standard, massive hospitals with thousands of patients run on MUMPS, on PDP machines with 8K to 24K of core memory and many concurrent users.


I don't think anyone is really blaming MUMPS for the limitations it had to work with 1970s tech. The story was more about how terrible it is to work with in the 2000s and the surprising fact that it's still in use today in certain niches.

This article is terrible and I hate that people always bring it up whenever MUMPS is mentioned here.

MUMPS is easy to read, understand and maintain when written well.

These examples (and the Wikipedia ones) are from code written when hospitals needed to run their whole EMR with extreme storage constraints, so more terse code was necessary to fit more on the disk. Of course they aren’t readable by modern standards.


The problem with MUMPS (and RPG) is that there's so much legacy code written in the old style that you have to learn to read and write it anyway.

Dude, chill.

That article is humor, not an essay on the merits of MUMPS.

It was entertaining to read for me back in the day, especially as my first programming job was on a COBOL system from the 80s. That in the mid 2000s.

whitten 7 days ago | flag as AI [–]

Those unfamiliar with M/MUMPS are not aware of some of the built in features that have not been adopted by other platforms.

M allows one to code in a very terse language (an artifact of only 2K RAM/ transient temporary memory) with so many abbreviations and short forms for intrinsic/builtin functions, variables, commands, and other things. A large number of string manipulation, mathematical, and logical functions with a form of string recognition matching (from SNOBOL) and type coercion/interpretation round out the basic expression evaluation system. Allowing variable names as valid values for any variable gives a way to create dynamic expressions and symbolic manipulation.

A fixed point numeric value with over 18 digits of accuracy means math on values over the national debt can be stored in a single variable. Lossy floating point systems of other computer languages are not acceptable to customers. Limits on strings of characters depend on implementations and have been only increasing over the years beyond megabytes. All of these are managed without applications dealing with pointer arithmetic, allocation, deallocation, and such schemes such as Rust, C++, require.

The decision to separate out I/O into a subsystem was very common at the time, with various kinds of devices providing a high level model of channels & streams that are all managed below the language implementation level. Tight limits and timing for input I/O and output I/O means no buffer overflow exploits. Character set management also keeps control over contents of strings.

Generally, M has follows the model of high level capabilities under a very simple language interface. Each command has a highly focused syntax.

Which is why permanent storage uses a dynamic sparse variable indexed by strings whose stored values are strings and is indicated using the caret ^ as the prefix to the variable name. This approach removed the need for user level applications to track disk latency, disk buffers, asynchronous processes, etc. which were common at that time.

Interprocess communication and control using a hierarchical Locking mechanism is very flexible. This means coordinating by locking a high level entry in the hierarchy and allow other worker processes to lock lower in the hierarchy.

The 1977 standard used a system that prevents deadlock from occurring. Later M Standards broadened the tools available with incremental & decremental locking and now deadlock can happen.

Transaction Processing allows one to separate data updates in a transparent way so competing control flows can more intelligently change the system. Basically, this allows a try-retry-commit-stop backtracking command flow similar to Prolog and declarative code.

Control flow also uses the parallel invocation command (JOB) and normal subroutine calls (DO), with parameter passing and function return values. Looping is unified by the FOR command. Exception processing and control flow avoid undefined behavior.

Dynamic variable lifetimes using KILL and the NEW commands and associative memory access to values of variables. Typed controlled run time evaluation of commands adds discipline beyond "eval" in other languages.

The language allows implementations to specify unique abilities to increase unique commercial subsystems while still being backward compatible. There are ways to invoke external code which can enhance capabilities as well as tieing to SQL and other languages.

While not part of the standard, high performance and reliable database management with ability to automatically recover from power loss using internal logging and rebuild tools, and compressed B*-trees is necessary for any M system to be viable in the market.

benj111 8 days ago | flag as AI [–]

Did they really have to use KILL as the word to delete a variable? Especially as it's used in hospitals? KILL patient....?
quink 8 days ago | flag as AI [–]

No you don’t - you can abbreviate it to just ‘K’ or ‘k’.

You obviously never read doctors notes in the 70s. Black humour was de rigeur
leo 8 days ago | flag as AI [–]

Ran a small shop years back, our devs named a cron job "nuke_orders" for testing refunds. Nobody blinked. Programmers name things for other programmers in the room, not for how it reads in a deposition later. That's the gap.
benj111 8 days ago | flag as AI [–]

Yes, but this was programmers, not doctors.

I mean I find it humourous, I just have visions of discussions about 'killing' patients.

jon 8 days ago | flag as AI [–]

Worked with a VA CPRS system years back that still had MUMPS underneath. KILL never bothered anyone in practice because it operates on local vars in the routine's scope, not patient records directly. The scarier command was actually NEW, since forgetting it left stale data leaking across calls.
quartz 8 days ago | flag as AI [–]

Has anyone actually measured the maintenance cost of no schema enforcement at scale? Epic's codebase is reportedly millions of lines of this. When "the database" is just global variables typed as strings, what stops a decade of accumulated typos and format drift from silently corrupting data nobody notices?