*cries in C++*
-
Surprisingly, yes:
APL (programming language) - Wikipedia[^]
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management,[82] asset management,[91] health care,[92] and DNA profiling,[93][94] and by hobbyists.[95]
I suspect APL programmers will tell you the last stable release was perfect, so it hasn't needed changing since ... they are generally an odd bunch, APL programmers ... :-D
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management,[82] asset management,[91] health care,[92] and DNA profiling,[93][94] and by hobbyists.[95]
So that's 4x no one can understand the :elephant:ing stuff well enough to port ancient legacy code, and 1x :sunshine:s playing code golf. :rolleyes:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius
-
honey the codewitch wrote:
You can produce more incomprehensible code with C++ than I think you can in any other major language
Hahahahaha ... not even close. Work this out:
⎕←(~A∊A∘.×A)/A←1↓⍳N
or this:
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
C++ can't even come close to APL for code density or incomprehensibility! :laugh: The first one is the Sieve of Eratosthenes, the second is the Game of Life.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
TECO was the same way. TECO was used to write the first version of Emacs and is a string processing language. One of the challenges TECO coders would do is write a one liner and challenge their counterparts to write the result of putting their name in the function.
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
If you've got a system that supports dc, try this:
dc -e '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x'
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
I don't have a problem converting C to C++ except when it comes to interrupt handlers, they're a bit tricky. But then again I'm not converting very complicated code...AVR devices are pretty simple.
The less you need, the more you have. Even a blind squirrel gets a nut...occasionally. JaxCoder.com
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
The Eureka moment with C++ is when you understand what features you really don't want to use because they make the code less comprehensible. like multiple inheritance from multiple classes with a common base class. That being said, I once wrote a co-operative multitasking OS for an embedded system in less than 15K of binary in Turbo C++. All the task and timer lists were automatically set up by the class initializers at startup. Just link it in and it got scheduled.
"Time flies like an arrow. Fruit flies like a banana."
-
If you've got a system that supports dc, try this:
dc -e '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x'
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
The Eureka moment with C++ is when you understand what features you really don't want to use because they make the code less comprehensible. like multiple inheritance from multiple classes with a common base class. That being said, I once wrote a co-operative multitasking OS for an embedded system in less than 15K of binary in Turbo C++. All the task and timer lists were automatically set up by the class initializers at startup. Just link it in and it got scheduled.
"Time flies like an arrow. Fruit flies like a banana."
My issue comes largely from my finicky-ness. I do a lot of C++ programming, and while I hesitate to say I'm proficient at C++, on balance I'd be lying if I said I didn't think I was. What I mean by being picky is that I don't keep C-isms in my C++ code. I port macros to ifs on constexpr values, and I use templates a lot, like for pin assignments in this case, but it means restructuring code, which means understanding it.
Real programmers use butterflies
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
C++ is my favorite language because it does not force you to do anything. That does include making it readable, which is the original author's fault not the language. Languages that force you to make your code readable will inevitably loose some (potentially very useful) features in order to make that happen, like #define for example. I admit I am guilty of intentionally making code less readable, only because I am forced to run it through a painfully awful "security" code scanner. The program is a web api in c# and the only way we can take any kind of data from the db and return it to the caller without the scanner whining is to store the data in a dictionary (dynamic) and then retrieve it back again, so that's been wrapped up in a pair of methods: return obfuscator.get(obfuscator.insert(db.runProc("ProcName", args, or, whatever)))
-
C++ is my favorite language because it does not force you to do anything. That does include making it readable, which is the original author's fault not the language. Languages that force you to make your code readable will inevitably loose some (potentially very useful) features in order to make that happen, like #define for example. I admit I am guilty of intentionally making code less readable, only because I am forced to run it through a painfully awful "security" code scanner. The program is a web api in c# and the only way we can take any kind of data from the db and return it to the caller without the scanner whining is to store the data in a dictionary (dynamic) and then retrieve it back again, so that's been wrapped up in a pair of methods: return obfuscator.get(obfuscator.insert(db.runProc("ProcName", args, or, whatever)))
I agree with you. I would say my complaint - if anything - I mean, I LOVE C++, is that it makes it easy to do The Wrong Thing(TM), and that includes hiding intent. Showing intent is everything, particularly in C++ where there are a billion ways to skin a million cats. However, that takes practice, is not always possible without comments, and is easy to ignore if you get lazy.
Real programmers use butterflies
-
I agree with you. I would say my complaint - if anything - I mean, I LOVE C++, is that it makes it easy to do The Wrong Thing(TM), and that includes hiding intent. Showing intent is everything, particularly in C++ where there are a billion ways to skin a million cats. However, that takes practice, is not always possible without comments, and is easy to ignore if you get lazy.
Real programmers use butterflies
I would say that the
PEEK
s andPOKE
s, segmented memory addressing, andgoto
s in my youthful program studies, were more intent-hiding than almost any of the C++ code I've seen since then! Some early Basic programs had me head scratching a lot!Our Forgotten Astronomy | Object Oriented Programming with C++
-
C++ is my favorite language because it does not force you to do anything. That does include making it readable, which is the original author's fault not the language. Languages that force you to make your code readable will inevitably loose some (potentially very useful) features in order to make that happen, like #define for example. I admit I am guilty of intentionally making code less readable, only because I am forced to run it through a painfully awful "security" code scanner. The program is a web api in c# and the only way we can take any kind of data from the db and return it to the caller without the scanner whining is to store the data in a dictionary (dynamic) and then retrieve it back again, so that's been wrapped up in a pair of methods: return obfuscator.get(obfuscator.insert(db.runProc("ProcName", args, or, whatever)))
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
honey the codewitch wrote:
The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent.
I am now responsible for a piece of code that's been part of our business for over thirty years. This software handles rendering our proprietary printer language into bitmaps, and then shipping those bitmaps out to be printed. It was originally written by a guy who I'll call BK. BK worked on this one code base for 25 years. It had been 'stable' (bugs are features at that point) for quite a while, and they tried to reassign BK to another project. After six months of doing absolutely nothing he decided to retire when he was confronted. When this landed in my lap, we had not even recompiled this stuff in over ten years. I looked through the source code a few times to answer questions, but hadn't needed to really understand it. Last fall we had a piece of customer-specific hardware go obsolete so we needed to design a replacement. I started looking through the code to see what would need changed. Good :elephant:ing grief. This code was written explicitly so that only a single person could maintain it. It was in C. Function prototypes weren't used. Header files didn't define the functions or data in the corresponding .C source file. There were numerous global structs, variables, and
#define
's with 3, 2, and yes even 1! character names. I think the best bit of numb:elephant:ery was a group of#define
's he'd added before#include <windows.h>
which changed the definition of a number of values in the Windows headers which his comment (one of the few) claimed "Microsoft got wrong". I spent over 100 manhours identifying precisely the changes I needed to make and where. My replacement took less than a day from the time I started writing it to when it was compiled, tested, and ready for a trial on customer equipment. This code is [in]famous for something else. I'm a vulgar man, and I swear a lot in casual conversation with people I know, including my coworkers. That said, I've never cussed or used foul language in my source code. It just didn't seem professional. Until. This. Crap. There is now a comment block in this code following my modifications which looks something like this:// ====================================================================
// USELESS SHIT LEFT OVER FROM THE ORIGINAL IMPLEMENTATION
// ======================================= -
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
C gets you rather close to the machine, but it keeps you there. Meaning there isn't really a way in C NOT to hide intent as you'd be rather busy spelling out mechanics of the "how" explicitly, burying the intent. I very much agree with you on C++ making it way easier to spell out the intent, letting the library do the how, or at least abstracting it away.
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
Quote:
I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent.
How do you hide intent in C? No overloaded operators, no overloaded functions, no implicit calls to constructors that need explicit calls to destructors, no symbols with identical names in different namespaces ... The amount of "magic happens implicitly behind the scenes" things in C is ridiculously small.
-
Quote:
I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent.
How do you hide intent in C? No overloaded operators, no overloaded functions, no implicit calls to constructors that need explicit calls to destructors, no symbols with identical names in different namespaces ... The amount of "magic happens implicitly behind the scenes" things in C is ridiculously small.
By making your code do something that is non-obvious.
Real programmers use butterflies
-
C gets you rather close to the machine, but it keeps you there. Meaning there isn't really a way in C NOT to hide intent as you'd be rather busy spelling out mechanics of the "how" explicitly, burying the intent. I very much agree with you on C++ making it way easier to spell out the intent, letting the library do the how, or at least abstracting it away.
The one line C contest is holding on line 1. It would like a word.
Real programmers use butterflies
-
TECO was the same way. TECO was used to write the first version of Emacs and is a string processing language. One of the challenges TECO coders would do is write a one liner and challenge their counterparts to write the result of putting their name in the function.
I remember TECO - had a port of it as my first desktop computer editor! Took some learning, but boy was it powerful when all you had was a line editor...
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies