5 ms·
Kind of reminds me of MUMPS, which is a real bunch of crazy that I had to use for a time. https://en.wikipedia.org/wiki/MUMPS https://en.wikipedia.org/wiki/MUM
by rwmj 13y ago
Kind of reminds me of MUMPS, which is a real bunch of crazy that I had to use for a time.
https://en.wikipedia.org/wiki/MUMPS https://en.wikipedia.org/wiki/MUMPS
Edit: The examples on the wikipedia page make it look less crazy than it is. For example every keyword can be abbreviated to a single letter, and was abbreviated to a single letter in the code I had to read. Also, each variable is connected to a global database which (in 1990) had no ACID properties or staging system, so better hope your undebugged program didn't delete any patient data (or worse, randomly modify it).
- ams6110 13y agoA lot of BASIC variants back in the early personal computer days had that feature too.. you only needed to enter as much of a keyword as necessary to make it unique. Or they had other abbreviations, like '?' for 'PRINT'. Anything to save a byte.
- Someone 13y agoThat did not save a byte. Commodore Basic did not store source code; it stored tokenized source code, with 'print' taking a single byte (http://www.c64-wiki.com/index.php/BASIC_token http://www.c64-wiki.com/index.php/BASIC_token)
- mgkimsal 13y ago? was still handy because on the C64 there was a 2 screen line max when entering a program line. So you could get a longer line in by using 10 ?"hello whatever..." which would be expanded to 10 PRINT "hello whatever..." Line numbers counted too, IIRC, so it was more important when you had 4 and 5 digit line numbers. But it's been 25 years since I did any commodore basic - my memory might be a bit wrong on this...
- chipotle_coyote 13y agoWhile it's been a long long time since I've used it, I think that was not the case for TRS-80 Level I BASIC -- it didn't tokenize, so shorthand saved actual memory. And not using spaces saved bytes. Apropos of the conversation on variables, Level I BASIC only allowed one-character variable names: you had 26 integer variables named A-Z, two (yes, two) string variables, A$ and B$, and only one array variable, A(). It also had only three error messages: "WHAT?" (any syntax-related problem), "HOW?" (any execution error that wasn't syntax-related, like division by zero), and "SORRY" (out of memory).
- seclorum 13y agoC64 wasn't the only basic. GW-BASIC on the Oric-1/Atmos machines, for example, did save a byte if you used ? instead of PRINT.
- IvyMike 13y agoThe Daily WTF had a series on MUMPS that's worth reading. http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx and http://thedailywtf.com/Articles/MUMPS-Madness.aspx http://thedailywtf.com/Articles/MUMPS-Madness.aspx
- perturbation 13y agoEvery time they have an "X language is terrible" link, people slag off MUMPS. I program in a modern variant of MUMPS almost every day. It can be obfuscated as in the examples, but with proper programming practice (conventions for declaring variables, function names, not using goto where not appropriate, etc.) it's really not all that bad. What I miss the most from other programming languages are features like public/private variables/methods, objects/classes + inheritance, type-checking, first-class functions, etc. (It does support try-catch and exception handling, however.) Even the above gripes aren't entirely 100%, as Intersystems extended MUMPS to have object-oriented features with Cache Objectscript, however, no one uses these so as not to be locked in to one vendor's non-standard implementation of the lagnguage. When comparing to say, Fortran-77, there's just no contest in my mind- out of everything I've programmed in, including VB, I hate Fortran by far the most.
- michaelcampbell 13y ago> Every time they have an "X language is terrible" link, people slag off MUMPS Yes. There's a reason for that.
- chris_wot 13y agolol - I love how he defends it then writes "What I miss the most from other programming languages are features like public/private variables/methods, objects/classes + inheritance, type-checking, first-class functions, etc." The etc. is the killer for me :-)
- perturbation 13y agoI think it's over-criticized as a language, but I'm not going to be dishonest in describing what features I think it lacks or where I think it is actually, legitimately bad.
- chris_wot 13y agoSorry, that was indeed a little snarky. I could have phrased that better.
- x0x0 13y agooh, and if we're discussing a certain emr company in madison... in the beginning, in the 70s or so, ram was very tight and the source was interpreted, not compiled; variable names were shortened to save memory. So the oldest core routines have single letter variable names variables aren't declared; when you use a name, the interpreter just travels up the call stack looking for somewhere that variable is defined. so if you accidentally use the wrong name, especially with the strong bias to very short variable names, in nested enough code you will find that variable. This led to some amazing bugs the prefix of the command to delete a node in the internal db (really just global sparse arrays) deleted everything. A coworker fat fingered that in a customer's prod systems and took down a hospital chain you've heard of. I just heard him wail, "Oh SHIT" and sprint out of our office; I later found out he ran for the recovery team. they also had 15mm lines of vb6 oh, and they love h1b slave labor. Bring them over, abuse them, threaten to fire them if they don't work their asses off, and leave them with no transferable job skills. I presume the ceo uses her billions to salve her conscience.
- sillysaurus2 13y agoI never understood h1b slave labor. I had personal experience seeing just how hard corporations will work foreigners, and casually fire them if they daren't.
- rjzzleep 13y agoFirst hand experienced it here I got my own stories to tell. An interesting story about government cheating on each other, and people wanting you to take the blame on it.
- aaronbrethorst 13y agoThat same company refused to even consider me for a job after I graduated from the University of Minnesota because they thought my GPA was too low. So instead, I ended up in Seattle at Microsoft where I managed a good chunk of the Visual Studio IDE. It wasn't until years later that I realized I'd totally dodged a bullet.
- michaelcampbell 13y agoA friend of mine programmed in MUMPS years ago - he gets calls from headhunters about it to this day.
- seanwoods 13y agoYou're referring to legacy MUMPS code. It's possible to write it more expressively (why do you think the examples on Wikipedia are like that?) People don't usually capture that nuance, sadly because many people don't care. Yes, it's a bear to sift through poorly written MUMPS code. Yes, the language gives you more than enough rope to hang yourself. However, it's also possible to write code legibly and take advantage of abstractions that MUMPS provides (chiefly persistent arrays -- which are now ACID). https://robtweed.wordpress.com/2013/05/24/making-mumps-acceptable-to-the-mainstream/ https://robtweed.wordpress.com/2013/05/24/making-mumps-accep...
- perturbation 13y agoI'll second the above with a link to dlwicksell's node.js binding to M and the Intersystems version (Rob Tweed discussed the open source version by dlwicksell in the presentation): https://github.com/dlwicksell/nodem https://github.com/dlwicksell/nodem The Intersystems version: http://docs.intersystems.com/cache20122/csp/docbook/DocBook.UI.Page.cls?KEY=BXJS_methods http://docs.intersystems.com/cache20122/csp/docbook/DocBook.... There could be some very interesting things done with this, using M as a NoSQL DB with javascript jquery-style abstractions for interacting with the DB.
- robtweed 13y agoIndeed so - see http://gradvs1.mgateway.com/download/EWDLite.pdf http://gradvs1.mgateway.com/download/EWDLite.pdf
- brazzy 13y agoThe question is: if you're going to work with MUMPS, what are your chances of getting to write new MUMPS code rather than maintaining legacy code? And even if you write new code, how much of it is going to have to interface with legacy code. I'm pretty sure the answers are "really slim" and "all of it".
- seanwoods 13y agoAt my company, we write new MUMPS code all the time. Some of this is sanely written ANSI standard MUMPS, some uses the Caché extensions. There are techniques and strategies for containing legacy code which are pretty well known in the community. At minimum, this would involve wrapping it in a sane interface. You'd want to isolate global variable state too. Alternatively in Caché you can wrap it in classes (whose semantics are close to Java/.NET) It's on our list to rewrite the legacy code "some day."
- mdpye 13y agoOut of interest, were you working for EMIS by any chance? I had the joy of having to work with MUMPS systems for which the source was not available, so the first step was to find (and complete, as it was not complete) a decompiler. Fun times!
- rwmj 13y agoYes, although I wasn't an employee of EMIS. I was working for a clinic with a MUMPS system supplied by them. It ran on some old [edit: not "old" at the time] Digital minicomputer IIRC.
- mdpye 13y agoAah, I'd love to share more war stories on this subject, but given how identifiable this account is it probably wouldn't be prudent.
- quink 13y agoI work with MUMPS near enough every day, and I actually kind of enjoy it. Ask me anything! https://news.ycombinator.com/item?id=6312391 https://news.ycombinator.com/item?id=6312391 Also, this here thing is orders of magnitude worse than anything MUMPS and the comparison is very, very unfair.
- rwmj 13y agoThanks ... However now I drink to forget it!
- bliker 13y agosomehow that ugly MUMPS code reminds me of regexes...
- TazeTSchnitzel 13y agoRegexes are very readable, so long as you know what the symbols mean /[a-z0-9]+/ means "match one or more characters in the range a-z or 0-9"
- bliker 13y agoBut they can escalade into stuff like https://github.com/evilstreak/markdown-js/blob/master/lib/markdown.js#L388 https://github.com/evilstreak/markdown-js/blob/master/lib/ma...
- TazeTSchnitzel 13y agoIt seems unwieldy at first, but if you look at it carefully, its intent is quite clear. The real problem with regexes is that in many languages, they can't have whitespace or comments, so documenting them is a problem.
- dscrd 13y agoThe new IT slum of the world, Finland, is buying a new system that is based on MUMPS. It's almost amusing to think that only a decade ago we were thought of being pioneers of IT. sigh In a sane society, this would mean that there're lots of business opportunities in Finland to fix this. Alas, the widespread stealthy corruption prevents that.