|
I imagine MUMPS is edited with something a lot like TECO given the era from which it comes MUMPS is literally the sort of system that kicked off the crusade for structured programming in the late 1960s
|
# ? Oct 15, 2015 07:49 |
|
|
# ? May 27, 2024 18:46 |
|
keep posting
|
# ? Oct 15, 2015 11:22 |
|
christ and here I complain about verilog like it's so bad
|
# ? Oct 15, 2015 13:38 |
|
gonadic io posted:What are your editing tools like? We have an in house team who maintain a full I DE with intellisense, go to declaration, attached debugging, etc. No refactoring tools, mostly because you can't trust that no one's assuming a variable in the code downstream.
|
# ? Oct 15, 2015 14:59 |
|
Alright, here's a fun program I wrote that demonstrates a few "features" of MUMPS. It's the 99 bottles of beer song, printed 99 down to 0.code:
The MUMPSorceress fucked around with this message at 16:21 on Oct 7, 2016 |
# ? Oct 15, 2015 16:00 |
jesus loving christ
|
|
# ? Oct 15, 2015 16:17 |
|
LeftistMuslimObama posted:Alright, here's a fun program I wrote that demonstrates a few "features" of MUMPS. It's the 99 bottles of beer song, printed 99 down to 0. that is terrible
|
# ? Oct 15, 2015 16:19 |
|
Yeah, there's a reason they pay all the developers 6 figures and give us the best health insurance. Like I said though, the pain is significantly lessened by strict code reviews that prevent people from using most of this dumbass bullshit in real code. Just about the only place you'll see "x" used is in situations where you'd use a function pointer in another language. It's strictly forbidden if there's any other way to accomplish what you want to do, and variable names are required to be descriptive so you're never going to see someone actually naming variables after functions. anymore. but boy have I seen wonders in old code. We actually have one function left in our entire codebase that was written by the founder/CEO. We can't remove it because nobody knows what it does. It's 17 characters, nearly each of which is an assumed variable or an operation on an assumed variable, and it shows up in many, many stack traces. The only comment in the file is her last name and the date it was created, and nobody's ever traced a bug back to it so it just hasn't been worth the effort to work out what it's for.
|
# ? Oct 15, 2015 16:26 |
stay safe mumps ghost
|
|
# ? Oct 15, 2015 16:33 |
|
kalstrams posted:stay safe mumps ghost you will live a long and happy life safe from dated ecosystems
|
# ? Oct 15, 2015 16:34 |
|
i hope i never have to write mumps in my life but these posts are really cool and good, thanks obama.
|
# ? Oct 15, 2015 16:57 |
|
i feel like i shouldn't complain about javascript anymore
|
# ? Oct 15, 2015 17:30 |
|
LeftistMuslimObama posted:Maybe with a bit more experience. The 75k job only lasts for a year and then at the end my work is evaluated and I get promoted to the big-boy 6-figure job. I'm the equivalent of a junior dev or whatever you'd call it right now. ah, very well. it sounds more reasonable then, especially since madison has a pretty low cost of living. if you enjoy your job, and it sounds like you do, then keep it up, because it also sounds like you're good at it! i'm just saying, don't sell yourself short either, because i would hire you based on the contents of the post i'm quoting, and i'm pretty sure others in this thread would too
|
# ? Oct 15, 2015 17:40 |
|
LeftistMuslimObama posted:but boy have I seen wonders in old code. We actually have one function left in our entire codebase that was written by the founder/CEO. We can't remove it because nobody knows what it does. It's 17 characters, nearly each of which is an assumed variable or an operation on an assumed variable, and it shows up in many, many stack traces. The only comment in the file is her last name and the date it was created, and nobody's ever traced a bug back to it so it just hasn't been worth the effort to work out what it's for. something something server in a closet wall built in front of the door
|
# ? Oct 15, 2015 17:42 |
|
JewKiller 3000 posted:ah, very well. it sounds more reasonable then, especially since madison has a pretty low cost of living. if you enjoy your job, and it sounds like you do, then keep it up, because it also sounds like you're good at it! i'm just saying, don't sell yourself short either, because i would hire you based on the contents of the post i'm quoting, and i'm pretty sure others in this thread would too I'll keep that in mind. The one big downside to madison is that I just don't drink that much anymore (ironically), and there's loving 0 else to do for a grown adult. I really appreciate the props, though! I have such severe impostor syndrome going on half the time, so it's nice to hear affirmation from someone not in the mumps trenches.
|
# ? Oct 15, 2015 17:42 |
|
Dessert Rose posted:something something server in a closet wall built in front of the door lol, if only there was an easy way to change the routine's name to FORTUNATO
|
# ? Oct 15, 2015 17:43 |
|
serious tho you sound like you rly know what you're doing tbh one of the signs of a good programmer is the interest you've shown in doing the best you can with the tools you have and making the tools less painful for others to use
|
# ? Oct 15, 2015 17:44 |
|
Dessert Rose posted:serious tho you sound like you rly know what you're doing I'd say "should a carpenter not know his tools?", but really all I have is hammers, so I say "should a carpenter not know his hammers?"
|
# ? Oct 15, 2015 17:48 |
|
LeftistMuslimObama posted:but boy have I seen wonders in old code. We actually have one function left in our entire codebase that was written by the founder/CEO. We can't remove it because nobody knows what it does. It's 17 characters, nearly each of which is an assumed variable or an operation on an assumed variable, and it shows up in many, many stack traces. The only comment in the file is her last name and the date it was created, and nobody's ever traced a bug back to it so it just hasn't been worth the effort to work out what it's for. 'whenever we ask her what it did, she just smiles and doesn't say anything'
|
# ? Oct 15, 2015 17:50 |
|
LeftistMuslimObama posted:I'd say "should a carpenter not know his tools?", but really all I have is hammers, so I say "should a carpenter not know his hammers?"
|
# ? Oct 15, 2015 17:50 |
|
This is perfect because we actually have cows on-campus. We have a farm that produces a lot of the dairy and veg that our cafeterias use to cook lunch. Did I forget to mention that our office buildings look like farm buildings, dragons lairs, harry potter castles, and other poo poo like that? It's ridiculous. I'll make an imgur gallery at some point if people are curious. This was today's menu in cafe #2 (which looks like the harry potter train station):
|
# ? Oct 15, 2015 17:54 |
|
kalstrams posted:stay safe mumps ghost
|
# ? Oct 15, 2015 18:04 |
|
kalstrams posted:jesus loving christ
|
# ? Oct 15, 2015 18:13 |
|
i am very glad i don't have to deal with any of that but am also very glad you are posting about it
|
# ? Oct 15, 2015 20:35 |
|
JewKiller 3000 posted:ah, very well. it sounds more reasonable then, especially since madison has a pretty low cost of living. if you enjoy your job, and it sounds like you do, then keep it up, because it also sounds like you're good at it! i'm just saying, don't sell yourself short either, because i would hire you based on the contents of the post i'm quoting, and i'm pretty sure others in this thread would too yeah, based on what you've said so far and how you've been able to deal with something as crazypants as MUMPS, you could probably get mainstream work pretty easily that also sticks a 1 in front of your current salary be sure to keep an eye on the Chicago market: it's a great area, still quite close by (assuming you or your wife have family near Madison), and it has a wide variety of interesting tech work. the downside would be that your commute would be about 45 minutes each way in the Chicago area. doesn't matter where you live and work, it'd be around 45 minutes. it's like a law of nature. (if you wind up in the Chicago area Mac/iOS scene, I can introduce you to a few people)
|
# ? Oct 15, 2015 20:43 |
|
LeftistMuslimObama posted:Alright, here's a fun program I wrote that demonstrates a few "features" of MUMPS. It's the 99 bottles of beer song, printed 99 down to 0. Is there any movement to write readable mumps, like using full-length variables and function names, and skipping lines here and there?
|
# ? Oct 15, 2015 21:04 |
|
MononcQc posted:Is there any movement to write readable mumps, like using full-length variables and function names, and skipping lines here and there? I showed my coworker who worked at Epic long ago the 99 bottles code, and he chuckled and said he never wrote it like that, he insisted on always spelling out everything
|
# ? Oct 15, 2015 21:09 |
|
MononcQc posted:Is there any movement to write readable mumps, like using full-length variables and function names, and skipping lines here and there? That's just code golf though, I imagine normal (code reviewed) mumps is much better
|
# ? Oct 15, 2015 21:11 |
|
My VM is busy loving up, so have some more MUMPS lessons. Let's talk loops. MUMPS doesn't have a WHILE loop. While the most popular implementation, Caché, has its own language extensions that add lots of curly-brace language stuff (it's seriously like bad Java), they don't exist if you need to be vendor neutral. Fortunately, the FOR loop does everything a while loop does. Let's talk about the most common ways to loop in MUMPS. There's the standard for loop: code:
code:
code:
In MUMPS, there are only the following ways to store/retrieve data: 1) A variable. Variables can have one value assigned to them and are always strings. When you do math operations on a variable, MUMPS dynamically turns it into a number of the appropriate precision. This can, of course, lead to gross things like "123AAAAA" being turned into 123 when you do a math operation on it. This can be terrible (and led to many missing penny errors in the very early years of our software). There are also some clever use cases for this behavior, but those are kinda proprietary so I can't share 2)Arrays/globals. Arrays and globals exhibit identical behavior except that an array is stored in local memory and a global is stored to disk (and is persistent in the database). You make something a global by prefixing its name with a "^". If you're clever, you'll notice that the routine names I've been posting also start with "^". This is because in MUMPS all code is literally stored in the database and run from there. Yeah, I know. We had to do some really clever hacking to hide the source code when we started selling overseas because it's hard to enforce IP overseas. So, how do arrays and globals work? They do not behave like a []=style array. I hesitate to even really call them arrays. They are, basically, B+ trees with their nodes (called "subscripts") indexed by any valid string (up to some long character limit I can't remember off the top of my head. It's a few thousand). What does that look like? Let's see: code:
Now, one interesting property of these globals is that the subscripts are always stored in ASCII collation order (or special locale-specific collation orders. We utilize alternate collations for Dutch and Danish locales currently). You traverse these subscripts using the $ORDER function. You can use the $ORDER function inside of a for loop to "walk" a subscript level of a global. For example, this code will visit all subscripts of the THANKS subscript: code:
There's other stuff you can do with this. The @ operator allows indirection. You can store part of a global's name in a variable, then access it using the indirection operator. The following code has identical output to the last code: code:
So, between the natural sorting of globals and the $O function it's pretty painless to create quickly traversable indexes and create well-structured data models. Of course, you also end up with jerks using globals with a zillion subscript levels as ghetto configuration arrays and they slowly become eye-stabbingly hard to traverse. Now, if you go back and look at the sorting algorithm I posted before, you'll see $q used. $q is so rarely used that we don't really even bother to teach people about it internally. What $q does is traverse the "physical structure" of the global. This basically means that you loop over every node and leaf in the global that has a value assigned to it. Each call returns the $na of the next path. $q on our example global would return in this order: ^OBAMA ^OBAMA("THANKS") ^OBAMA("THANKS","OBAMA") ^OBAMA("THANKS","TED CRUZ") As you can imagine, there's very few cases for needing to be able to traverse every arbitrary subscript, as generally you're going to know which subscript contains the data you want. My sorting algorithm takes advantage of this, though to get a natural sort. How does that work? Well, if all of the subscripts of a global are numbers, they get stored in numerical order instead of ASCII order. The algorithm I posted traverses all the values of an array and puts them into a global where each character is its own subscript but runs of numbers are "clumped" into a subscript. This results in a natural sort. Then you "walk" it with $q and just cat everything back together and store those in an array with purely numeric subscripts so the order doesn't change. Fun!
|
# ? Oct 15, 2015 21:38 |
|
MononcQc posted:Is there any movement to write readable mumps, like using full-length variables and function names, and skipping lines here and there? Yeah. The 99 bottles code was horrible on purpose. I wrote it for fun. Our actual code review processes emphasize routine and variable names that are descriptive. MUMPS doesn't allow skipping lines, so if you want spacing in your code you have to have empty comments basically. A lot of people are averse to that because back in the day there was a hard linecount limit on routines and comments actually caused performance problems. Both of those issues are resolved, but people are slow to change. There also used to be a hard 31-character limit on "tag^ROUTINE" names, so we used to enforce an 8-character limit on routine names. Also not so anymore, but you have to remember that this language dates back to a time when OSes only supported 8.3 for filenames and it was possible that a process would only have a few kb of memory.
|
# ? Oct 15, 2015 21:41 |
|
mumps is amazing
|
# ? Oct 15, 2015 21:45 |
|
LeftistMuslimObama posted:the mumps trenches mods?
|
# ? Oct 15, 2015 21:49 |
|
i dont say this lightly in teh pos... but dude... your are posts are pretty drat good
|
# ? Oct 15, 2015 22:40 |
|
I'm doing elixir and it feels too much like ruby for me to trust it very much
|
# ? Oct 16, 2015 01:09 |
|
really cool posts about crazy language i'll never try to use. thanks. (not making fun) your posts do inspire me want to try my hand at haskell. since it's another language i'll likely never use in practice, but likely (or just probably?) make me learn a lot about good programing practices in languages i do know just by banging my head against the wall. thankfully a good number of people in this thread and others have shared decent links to math problems and small projects for any new language enthusiast.
|
# ? Oct 16, 2015 01:22 |
|
LeftistMuslimObama posted:I'll keep that in mind. The one big downside to madison is that I just don't drink that much anymore (ironically), and there's loving 0 else to do for a grown adult. I really appreciate the props, though! I have such severe impostor syndrome going on half the time, so it's nice to hear affirmation from someone not in the mumps trenches. i was going to say the same thing. how long have you been at epic? im assuming not long since you mentioned still sorta being under evaluation. anyhow rh really likes me and when i get hired i think im gonna tell them that ill only come on full time if they let me work remote
|
# ? Oct 16, 2015 01:31 |
|
pepito sanchez posted:really cool posts about crazy language i'll never try to use. thanks. (not making fun) I've never been able to wrap my head around functional languages, but I'm also not a math guy so maybe some of the appeal is lost on me. I tried to learn prolog briefly after the TA in our Compilers class made a big deal about how cool it was, but ultimately it seemed pretty useless for anything but making toy queries against small datasets. All his demos involved hard coding some statements to query against, and he really floundered if I asked if you could hook it up to a big SQL database or something. And if you've got a big SQL database, chances are you have a more mature platform for querying it than playing with it in prolog anyway. I think I'm going to start writing a cruddy OS in C or something. That class was fun, and I need to maintain those skills, but I can't contribute to most of the big open source projects because my contract states I can't work for any other business interests and if anyone makes money on my work that counts, meaning stuff like Linux or any of the open source libraries people actually use are out of the question.
|
# ? Oct 16, 2015 01:34 |
|
MALE SHOEGAZE posted:i was going to say the same thing. how long have you been at epic? im assuming not long since you mentioned still sorta being under evaluation. nearly 4 years. Like I said, I started in a different role (which I won't state because it will become super easy to identify me irl then) and have been taking classes at UW in the evenings for the last 2.5 years to pass Epic's requirements for a transition into development roles. This has been a major long-term investment in myself. In the meantime, I had most of my (much more boring) work automated with various utilities I've written. I handed the keys to all that poo poo to my successor in my old job, so he gets to work 2 hour days for the rest of his life pretty much.
|
# ? Oct 16, 2015 01:36 |
|
epic as in ue4?
|
# ? Oct 16, 2015 01:42 |
|
|
# ? May 27, 2024 18:46 |
|
i'm not a math guy either. i don't think of solving common math problems in a new programming language as "math guy" challenges. oddly i've always loved math and i've always been terrible at it. i am not an engineering student. but i like thinking of myself as something of an academic, and learning new things related to something you like is always good. it's why i like reading your posts. obviously you're more into the math than i ever was. personally i just want to start making my own little minimum-graphics game from scratch to learn the most i can (language/structure/algortihm/design-wise) from a personal project. something like youtube's handmadehero, but truly just my own. the problem for me is getting something of an original idea. i've played dwarf fortress about twice, yet i love its idea and what effort goes behind it. maybe when i get more time.
|
# ? Oct 16, 2015 01:44 |