|
Written before compilers didn't inline one-liners unless in a .h?
Converted from some macro shite?
An optimization for when the operator is known?
Widely agreed to be swill but a culture of not deprecating and deleting?
|
|
|
|
|
This is code from the current version of LLVM--the back end to clang, julia and a few other languages.
|
|
|
|
|
I think the "page size" was more to do with getting people to think "modular" than to do with printing.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Says someone who has never had to print out a twenty page long function on greenbar tractor feed paper to figure out the convoluted logic.
Goto's including one FORWARD Goto.
C code circa 1993
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
At that time, HIPO was the "in" thing.
|
|
|
|
|
I agree with you completely, but then people also tell me my functions are too long.
Real programmers use butterflies
|
|
|
|
|
Probably because most people view code on screens that in IDE's that have maybe 12-20 lines visible.
My own preference is to see the whole function without having to scroll up/down.
|
|
|
|
|
The screen I do my coding on is a 22" portrait monitor so I can get at least vertical 66 lines at once; I also have about 100 characters width which is enough for most purposes. I despair when I see colleagues using big wide monitors in landscape mode with just 20 lines of code tucked at the left side in the first 25% of the screen and a huge swath of blank space over most of the screen.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Well- looking at the first argument of the function they all call - I would say you have a 'case' to be made here...
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
I think you should try to look at a bit bigger picture. This code by itself is rather ugly BUT it is likely to greatly simplify things downstream from it so it can work in a more uniform manner. I have had to resort to layers of ugliness like this on occasion and I only did it because the pay-off later was worth it.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
My preference is to look at a piece of code and understand the what's, why's, and how's very, very quickly.
Looking at the above LLVM code (and I see this coding style in a lot of other code nowadays) makes it very difficult to understand what is going on. Why did the author of this code feel it was necessary to write 4 lines of a function call that simply added one parameter based on the function name to another function call?
I can imagine situations where something like this might be appropriate for reliability, efficiency, clarity, etc. but in this case, these functions are called two times in the complete LLVM package. Maybe it would be appropriate if there where thousands of calls, but I don't see the need here.
|
|
|
|
|
Why? That's what I was trying to guess at in my post above.
|
|
|
|
|
The "why" is understanding why the author did something a particular way or in a particular sequence.
Example: A lookup table might be searched sequentially, hashed, keyed, b-tree'd, linked list, etc. It would make little sense to use a b-tree or hash algorithm on a table that never exceeds 10 items. Likewise, it might make sense to use a hash algorithm on a sparsely populated table.
I once wrote a an algorithm that used the first alphabetic character as an index into a 26 element table of linked lists where each major link list entry had sub-linked lists (almost a b-tree with sub-entries). This table of approximately 15,000 entries was accessed 1,000's of times per second and was dynamically updated with entries to be inserted and deleted.
The processing sequence had to be very clear and understandable.
|
|
|
|
|
Arnaud Rebotini - Pagan Dance Move[^]
This one's a suggestion by @David-ONeil on my previous SOTW.
The official video is not completely safe for the lounge so I'm going for this video showing the Baphomet on the EP cover.
The official video features quite some black metal video footage (mostly Immortal I think), some cultist rites, burning churches and mild nudity.
It's on YouTube so you can look it up yourself if you want.
Arnaud used to be in a death metal band when he was younger, so I guess that explains the (black) metal/satanic themed music video and EP cover.
Or maybe he just liked that theme on this particular release, who knows.
I certainly don't see this theme on his other works.
You also won't hear it in the music, which is techno and has no lyrics.
Banged through my speakers on regular occasion last week, so SOTW
|
|
|
|
|
Liked the official video. Can see what you are saying about the death metal influence.
// TODO: Insert something here
|
|
|
|
|
Another artist kinda in the same vein is Gesaffelstein. His 'Pursuit' vid is also a lot risque (so much so that YouTube makes you sign in to see it just for the nudity). But it has a great beat and the vid is VERY thought provoking because it touches on the ideas of what power is, and the control of the (elites).
|
|
|
|
|
|
If you know more of these types, post them. They are some of my faves - I'm not much into your black metal because it just doesn't sound that interesting to me (although the Rammstein video from a newer thread piques my interest, which brought me to 'Deutschland,' which is also fantastic!) Another one you might like is Jamie xx - Gosh. It isn't like my last posts, but I enjoy its beat, and the video is unique. I heard about it when reading a speaker review - I guess they are a good way to find music, I'll have to read more of them (but I don't have the time!)!
Have a great weekend!
|
|
|
|
|
|
Sander Rossel wrote: I think I know it from you It's been a long time! Always good to hear that one! I'd never heard of Dusky before, so Thanks! I'll check more of their work out! I had heard that Pleasurekraft song - great one! I'll also check out more of Carl Cox! Captain Hook came up in the recommendations to that, so I'll have to listen to their Bungee Jump again as well! I absolutely LOVE that song!
|
|
|
|
|
|
I can see why you'd say that, but I like Gosh tons more!
|
|
|
|
|
Ah darn - another song, just for your birthday! First time I've ever heard this, and love it: Layo & Bushwacka - Love Story. Devo sounds great with a techno layer!
|
|
|
|
|
That's nice, but not nearly as good as Gosh because that one's ing brilliant!
It's pretty much on repeat
|
|
|
|
|
That's how I was when I first heard it!
|
|
|
|