1. 9

    No, you don’t need C aliasing to obtain vector optimization for this sort of code. You can do it with standards-conforming code via memcpy(): https://godbolt.org/g/55pxUS

    1. 2

      Wow, it’s actually completely optimizing out the memcpy()? While awesome, that’s the kind of optimization I hate to depend on. One little seemingly inconsequential nudge and the optimizer might not be able to prove that’s safe, and suddenly there’s an additional O(n) copy silently going on.

      1. 2

        memset/memcpy get optimized out a lot, hence libraries making things like this: https://monocypher.org/manual/wipe

        1. 1

          Actually it’s not optimizing it out, it’s simply allocating the auto array into SIMD registers. You always must copy data into SIMD registers first before performing SIMD operations. The memcpy() code resembles a SIMD implementation more than the aliasing version.

        2. 1

          You can - and thanks for the illustration - but the memcpy is antethical to the C design paradigm in my always humble opinion. And my point was not that you needed aliasing to get the vector optimization, but that aliasing does not interfere with the vector optimization.

          1. 8

            I’m sorry but the justifications for your opinion no longer hold. memcpy() is the only unambiguous and well-defined way to do this. It also works across all architectures and input pointer values without having to worry about crashes due to misaligned accesses, while your code doesn’t. Both gcc and clang are now able to optimize away memcpy() and auto vars. An opinion here is simply not relevant, invoking undefined behavior when it increases risk for no benefit is irrational.

            1. -2

              Au contraire. As I showed, C standard does not need to graft on a clumsy and painful anti-alias mechanism and programmers don’t need to go though stupid contortions with allocation of buffers that disappear under optimization , because the compiler does not need it. My code does’t have alignment problems. The justification for pointer alias rules is false. The end.

              1. 10

                There are plenty of structs that only contain shorts and char, and in those cases employing aliasing as a rule would have alignment problems while the well-defined version wouldn’t. It’s not the end, you’re just in denial.

                1. -2

                  In those cases, you need to use an alignment modifier or sizeof. No magic needed. There is a reason that both gcc and clang have been forced to support -fnostrict_alias and now both support may_alias. The memcpy trick is a stupid hack that can easily go wrong - e.g one is not guaranteed that the compiler will optimize away the buffer, and a large buffer could overflow stack. You’re solving a non-problem by introducing complexity and opacity.

                  1. 10

                    In what world is memcpy() magic and alignment modifiers aren’t? memcpy() is an old standard library function, alignment modifiers are compiler-specific syntax extensions.

                    memcpy() isn’t a hack, it’s always well-defined while aliasing can never be well-defined in all cases. Promoting aliasing as a rule is like promoting using the equality operator between floats – it can never work in all cases, though it may be possible to define meaningful behavior in specific cases. Promoting aliasing as a rule is promoting the false idea that C is a thin layer above contemporary architectures, it isn’t. Struct memory is not necessarily the same as array memory, not every machine that C supports can deference an int32 inside of an int64, not every machine can deference an int32 at any offset. Do you want C to die with x86_64 or do you want C to live?

                    Optimizations don’t need to be guaranteed when the code isn’t even correct in the first place. First make sure your code is correct, then worry about optimizing. You talk about alignment modifiers but they are rarely used, and usually they are used after a bug has already occurred. Code should be correct first, and memcpy() is the rule we should be promoting since it is always correct. Optimizers can meticulously add aliasing for specific cases once a bottleneck has been demonstrated. You’re solving a non-problem by indulging in premature optimization.

                    1.  

                      Do you want C to die with x86_64 or do you want C to live?

                      Heh I bet you’d get quite varied answers to this one here

                      1. -1

                        The memcpy hack is a hack because the programmer is supposed to write a copy of A to B and then back to A and rely on the optimizer to skip the copy and delete the buffer. So unoptimized the code may fault on stack overflows for data structures that exist only to make the compiler writers happier. And with a novel architecture, if the programmer wants to take advantage of a new capability - say 512 bit simd instructions , she can wait until the compiler has added it to its toolset and be happy with how it is used.

                        As for this not working in all cases: Big deal. C is not supposed to hide those things. In fact, the compiler has no idea if the memory is device memory with restrictions on how it can be addressed or memory with a copy on write semantics or …. You want C to be Pascal or Java and then announce that making C look like Pascal or Java can only be solved at the expense of making C unusable for low level programming. Which programming communities are asking for such insulation? None. C works fine on many architectures. C programmers know the difference between portable and non-portable constructs. C compilers can take advantage of SIMD instructions without requiring C programmers to give up low level memory access - one of the key advantages of programming in C. Basically, people who don’t like C are trying to turn C into something else and are offended that few are grateful.

                        1. 4

                          You aren’t writing a copy of a buffer back and forth. In your example, you are reducing an encoding of a buffer into a checksum. You are only copying one way, and that is for the sake of normalization. All SIMD code works that way, you always must copy into SIMD registers first before doing SIMD operations. In your example, the aliasing code doesn’t resemble SIMD code both syntactically and semantically as much the memcpy() code does and in fact requires a smarter compiler to transform.

                          The chance of overflowing the stack is remote, since stacks now automatically grow and structs tend to be < 512 bytes, but if that is a legitimate concern you can do what you already do to avoid that situation, either use a static buffer (jeopardizing reentrancy) or use malloc().

                          By liberally using aliasing, you are assuming a specific implementation or underlying architecture. My point is that in general you cannot assume arbitrary internal addresses of a struct can always be dereferenced as int32s, so in general that should not be practiced. In specific cases you can alias, but those are the exceptions not the rule.

                          1.  

                            The chance of overflowing the stack is remote, since stacks now automatically grow and structs tend to be < 512 bytes, but if that is a legitimate concern you can

                            … just copy the ints out one at a time :) https://godbolt.org/g/g8s1vQ

                            The compiler largely sees this as a (legal) version of the OP’s code, so there’s basically zero chance it won’t be optimised in exactly the same way.

                            1.  

                              All copies on some architectures reduce to: load into register, store from register. So what? That is why we have a high level language which can translate *x = *y efficiently. The pointer alias code directly shows programmer intent. The memcpy code does not. The “sake of normalization” is just another way of saying “in order to cooperate with the fiction that the inconsistency in the standard produces”.

                              In many contexts, stacks do NOT automatically grow.Again, C is not Java. OS code, drivers, embedded code, even many applications for large systems - all need control over stack size. Triggering stack growth may even turn out to be a security failure for encryption which is almost universally written in C because in C you can assure time invariance (or you could until the language lawyers decided to improve it). Your proposal that programmers not only use a buffer, but use a malloced buffer, in order to allow the optimizer (they hope) not to use it, is ridiculous and is a direct violation of the C model.

                              “3. C code can be non-portable. Although it strove to give programmers the opportunity to write truly portable programs, the Committee did not want to force programmers into writing portably, to preclude the use of C as a “high-level assembler;” the ability to write machine-specific code is one of the strengths of C. It is this principle which largely motivates drawing the distinction between strictly conforming program and conforming program.” ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2021.htm)

                              Give me an example of an architecture where a properly aligned structure where sizeof(struct x)%sizeof(int32) == 0 cannot be accessed by int32s ? Maybe the itanium, but I doubt it. Again: every major OS turns off strict alias in the compilers and they seem to work. Furthermore, the standard itself permits aliasing via char* (as another hack). In practice, more architectures have trouble addressing individual bytes than addressing int32s.

                              I’d really like to see more alias analysis optimization in C code (and more optimization from static analysis) but this poorly designed, badly thought through approach we have currently is not going to get us there. To solve any software engineering problem, you have to first understand the use cases instead of imposing some synthetic design.

                              Anyways off the airport. Later. vy

                              1.  

                                I’m willing to agree with you that the aliasing version more clearly shows intent in this specific case but then I ask, what do you do when the code aliases a struct that isn’t properly aligned? There are a lot of solutions but in the spirit of C, I think the right answer is that it is undefined.

                                So I think what you want is the standard to define one specific instance of previously undefined behavior. I think in this specific case, it’s fair to ask for locally aliasing an int32-aligned struct pointer to an int32 pointer to be explicitly defined by the standards committee. What I think you’re ignoring, however, is all the work the standards committee has already done to weigh the implications of defining behavior like that. At the very least, it’s not unlikely that there will be machines in the future where implementing the behavior you want will be non-trivial. Couple that with the burden of a more complex standard. So maybe the right answer to maximize global utility is to leave it undefined and to let optimization-focused coders use implementation-defined behavior when it matters but, as I’m arguing, use memcpy() by default. I tend to defer to the standards committees because I have read many of their feature proposals and accompanying rationales and they are usually pretty thorough and rarely miss things that I don’t miss.

                                Everybody arguing here loves C. You shouldn’t assume the standards committee is dumb or that anyone here wants C to be something it’s not. As much as you may think otherwise, I think C is good as it is and I don’t want it to be like other languages. I want C to be a maximally portable implementation language. We are all arguing in good faith and want the best for C, we just have different ideas about how that should happen.

                                1.  

                                  what do you do when the code aliases a struct that isn’t properly aligned? There are a lot of solutions but in the spirit of C, I think the right answer is that it is undefined.

                                  Implementation dependent.

                                  Couple that with the burden of a more complex standard.

                                  The current standard on when an lvalue works is complex and murky. Wg14 discussion on how it applies shows that it’s not even clear to them. The exception for char pointers was hurriedly added when they realized they had made memcpy impossible to implement. It seems as if malloc can’t be implemented in conforming c ( there is no method of changing storage type to reallocate it)

                                  C would benefit from more clarity on many issues. I am very sympathetic to making pointer validity more transparent and well defined. I just think the current approach has failed and the c89 error has not been fixed but made worse. Also restrict has been fumbled away.

                        2.  

                          You don’t need a large buffer. You can memcpy the integers used for the calculation out one at a time, rather than memcpy’ing the entire struct at once.

                          Your designation of using memcpy as a “stupid hack” is pretty biased. The code you posted can go wrong, legitimately, because of course it invokes undefined behaviour, and is more of a hack than using memcpy is. You’ve made it clear that you think the aliasing rules should be changed (or shouldn’t exist) but this “evidence” you’ve given has clearly been debunked.

                          1.  

                            Funny use of “debunked”. You are using circular logic. My point was that this aliasing method is clearly amenable to optimization and vectorization - as seen. Therefore the argument for strict alias in the standard seems even weaker than it might. Your point seems to be that the standard makes aliasing undefined so aliasing is bad. Ok. I like your hack around the hack. The question is: why should C programmers have to jump through hoops to avoid triggering dangerous “optimizations”? The answer: because it’s in the standard, is not an answer.

                            1.  

                              Funny use of “debunked”. You are using circular logic. My point was that this aliasing method is clearly amenable to optimization and vectorization - as seen

                              You have shown a case where, if the strict aliasing rule did not exist, some code could [edit] still [/edit] be optimised and vectorised. That I agree with, though nobody claimed that the existence of the strict aliasing rule was necessary for all optimisation and vectorisation, so it’s not clear what you do think this proves. Your title says that the optimisation is BECAUSE of aliasing, which is demonstrably false. Hence, debunked. Why is that “funny”? And how is your logic any less circular then mine?

                              The question is: why should C programmers have to jump through hoops to avoid triggering dangerous “optimizations”?

                              Characterising optimisations as “dangerous” already implies that the code was correct before the optimisation was applied and that the optimisation can somehow make it incorrect. The logic you are using relies on the code (such as what you’ve posted) being correct - which it isn’t, according to the rules of the language (which, yes, are written in a standard). But why is using memcpy “jumping through hoops” whereas casting a pointer to a different type of pointer and then de-referencing it not? The answer is, as far as I can see, because you like doing the latter but you don’t like doing the former.

                      2.  

                        The end.

                        The internet has no end.

                  1. 10

                    It turns out that vaporware is so much better than any actual program! But this reminds me of Olin Shivers brilliant contribution to the UNIX-haters list.

                    1. 1

                      What I don’t get about UB in these discussions: isn’t it possible to get the tooling to bail on optimizations that cross a UB barrier?

                      Like OK you might dereference a null pointer here, this is UB, but don’t take that as a “well let’s just infer that anything’s doable here”. Instead take a “the result is unknowable, so don’t bother optimizing”.

                      Is there some sort of reason UB-ness can’t be taken into account in these optimization paths? Is there some… fundamental thing about C optimization that requires this tradeoff?

                      1. 2

                        I think the problem with this idea is that many optimisations rely on something being undefined behaviour.

                        In any case, the result is not just “unknowable” - there is no result. If I have two signed integer values for which the sum exceeds the largest possible signed integer value, and I add them together, there is not some unknown value that is the result. There is in fact a known value which is the result but which cannot be represented by the type which the result of the operation needs to be expressed in. What does it mean to “not bother optimising” here? Yes, the compiler could decide that the result of such an operation should be an indeterminate value, rather than undefined behaviour, but that will inhibit certain optimisations that could be possible even in cases where the compiler cannot be sure that the indeterminate value will actually ever result.

                        1. 1

                          People keep saying this, but I still have not seen a well worked out example of how UB produces real optimizations let alone a respectable study.

                          But do “optimizations” actually produce speedups for benchmarks? Despite frequent claims by compiler maintainers that they do, they rarely present numbers to support these claims. E.g., Chris Lattner (from Clang) wrote a three-part blog posting8 about undefined behaviour, with most of the first part devoted to “optimizations”, yet does not provide any speedup numbers. On the GCC side, when asked for numbers, one developer presented numbers he had from some unnamed source from IBM’s XLC compiler, not GCC; these numbers show a speedup factor 1.24 for SPECint from assuming that signed overflow does not happen (i.e., corresponding to the difference between -fwrapv and the default on GCC and Clang). Fortunately, Wang et al. [WCC+12] performed their own experiments compiling SPECint 2006 for AMD64 with both gcc-4.7 and clang-3.1 with default “optimizations” and with those “optimizations” disabled that they could identify, and running the results on a on a Core i7-980. They found speed differences on two out of the twelve SPECint benchmarks: 456.hmmer exhibits a speedup by 1.072 (GCC) or 1.09 (Clang) from assuming that signed overflow does not happen. For 462.libquantum there is a speedup by 1.063 (GCC) or 1.118 (Clang) from assuming that pointers to different types don’t alias. If the other benchmarks don’t show a speed difference, this is an overall SPECint improvement by a factor 1.011 (GCC) or 1.017 (Clang) from “optimizations”. http://www.complang.tuwien.ac.at/kps2015/proceedings/KPS_2015_submission_29.pdf

                          1. 3

                            I still have not seen a well worked out example of how UB produces real optimizations

                            Some examples here (found by a search just now): https://kristerw.blogspot.com/2016/02/how-undefined-signed-overflow-enables.html

                            SPECint isn’t necessarily a good way to assess the affect of these particular optimisations.

                            1. -1

                              OMG! You find those compelling?

                              1. 3

                                OMG! You find those compelling?

                                Compelling for what? They are examples of how UB produces real optimisations, something that you said you hadn’t seen.

                                1. 0

                                  They don’t show any real optimization at all. They are micro-optimizations that produce incorrectly operating code.
                                  When the compiler assumes multiplication is commutative and at the same time produces code that has non-commutative multiplication, it’s just terrible engineering. There’s no excuse for that.

                                  As steveklabnik says above “UB has a cost, in that it’s a footgun. If you don’t get much optimization benefit, then you’re introducing a footgun for no benefit.”

                                  1. 3

                                    They don’t show any real optimization at all. They are micro-optimizations

                                    This is self-contradictory, unless by “real optimization” you mean “not-micro-optimization”, in which case you are just moving the goal posts.

                                    that produce incorrectly operating code.

                                    This is plainly false, except if you you mean that the code doesn’t behave as you personally think it should behave in certain cases, even though the language standard clearly says that the behaviour is undefined in those cases. In which case, sure, though I’m not sure why you think your own opinion of what the language semantics should be somehow trumps that of the committee responsible for actually deciding them.

                                    1. 2

                                      Real optimization means substantive. Micro-optimizations like “ we take this arithmetic calculation and replace it with a faster one that produces the wrong answer” are ridiculous.

                                      I’m totally uninterested in this legalist chopping or this absurd deference to a committee which is constantly debating and revisiting its own decisions. It is just absurd for people to argue that the C Standard wording can’t be criticized.

                                      1. 5

                                        “ we take this arithmetic calculation and replace it with a faster one that produces the wrong answer”

                                        And there you have the core of the problem.

                                        You say “wrong answer” implying there is A Right One, as defined by the current C standard sometimes there are no Right Answers to certain operations, only “undefined”.

                                        So Define your Right One, proclaim your New Standard, implement a Conforming compiler and everybody is happy.

                                        I’m entirely on board with you saying the C committee lacks guts to abandon ancient marginal CPU’s and just define things…..

                                        So I look forward to programming in VyoDaiken C.

                                        Alas… I warn you though… you will either end up with something that just isn’t C as we know, or you will still have large areas “undefined”.

                                        1. -1

                                          There is a right answer. That is the nice thing about arithmetic.

                                          1. 5

                                            Machine integers are not a field. Anything we call “arithmetic” on them is defined arbitrarily (usually to be kind of like arithmetic on the mathematical integers, if you ignore the fact that they’re finite), so in fact there’s not a right answer—rather, there are several reasonable ones.

                                            You could define them to behave however the machine behaves; but this is obviously not consistent from machine to machine. You could define them in a particular way (two’s-complement with signaling overflow, perhaps), but if this definition doesn’t match up to what the target machine actually does, you have potentially expensive checks and special-casing to shore up the mismatch, and you picked it arbitrarily anyway. (Case in point: did you agree with my suggestion? Do you think you could convince all of a room full of C programmers to?)

                                            There’s a reasonable argument to be made that C should have said integer overflow is implementation-defined rather than undefined, but it’s hard to claim there’s a single obviously correct implementation-independent definition it should have adopted.

                                            1. 0

                                              My suggestion is that when you feel like you should tell me something I obviously already know, you should think about what point you are trying to make.

                                              C has a great deal of room for machine and implementation dependent behavior - necessarily. Implementation defined would have prevented surprises.

                                            2. 1

                                              arithmetic.

                                              Sounds like you’ll love Scheme and Ruby then ;-)

                                              They have this Numeric Tower concept that does The Right Thing by arithmetic.

                                              ps: Have a look at this, the ultimate Good News, Bad News story and cry…

                                              https://lobste.rs/s/azj8ka/proposal_signed_integers_are_two_s#c_xo9ebu

                                              …if we ever meet in person, we can drown our sorrows together and weep.

                                          2. 3

                                            It is just absurd for people to argue that the C Standard wording can’t be criticized.

                                            Just to be clear, I’m not arguing that (and I don’t think anybody here is doing so). However if you continue to dismiss logical arguments as “legalist chopping”, and suggest that we all defer to you instead of the language committee, I think the discussion will have to end here.

                                            1. 1

                                              This is plainly false, except if you you mean that the code doesn’t behave as you personally think it should behave in certain cases, even though the language standard clearly says that the behaviour is undefined in those cases

                                              I have no idea how to interpret that except as an argument that one is not permitted to question the wisdom of either the standard or the interpretation chosen by compiler writers. As several people on the standards bodies have pointed out, there is certainly no requirement in the standard that compiler developers pick some atrocious meaning. “Optimizing” code that produces a correct result to produce code that does not, produces incorrectly operating code. You can claim that the unoptimized code was in violation of the standard, but it worked.

                                              Specifically, the example you pointed to starts off by “optimizing” C code that calculates according the mathematical rules and replaces it with code that computes the wrong answer. 2s complement fixed length multiplication is not commutative. Pretending that it is commutative is wrong.

                                              1. 4

                                                I have no idea how to interpret that except as an argument that one is not permitted to question the wisdom of either the standard or the interpretation chosen by compiler writers.

                                                I do not see how pointing out what the language standard does say is the same as saying that you are not permitted to question the wording of the standard. Good day.

                            2. 2

                              No. There is nothing about C that requires compilers behave irrationally. The problem is that (1) the standard as written provides a loophole that can be interpreted as permitting irrational compilation and (2) the dominant free software compilers are badly managed ( as someone pointed out, it’s not as if they have paying customers who will select another product). There’s a great example: a GCC UB “optimization” was introduced that broke a lot of code by assuming an out of bound access to an array could not happen. It also broke a benchmark - creating an infinite loop. The GCC developers specifically disabled the optimization for the benchmark but not for other programs. The standard does not require this kind of horrible engineering, but it doesn’t forbid it.

                              1. 4

                                There’s a great example: a GCC UB “optimization” was introduced that broke a lot of code by assuming an out of bound access to an array could not happen

                                You know, I’m quite happy with that.

                                Every new gcc release comes out with a lot of new optimizations and a lot of new warnings.

                                Every time I go through our code base cleaning up the warnings, often fixing bugs as I go, I’m ok with that.

                                Sometimes we only find the borken code on the unit tests or test racks. I’m OK with that. That code was fragile and was going to bite us in the bum sooner or later.

                                Old working code maybe working, but as soon as you’re into undefined behaviour it’s fragile, and changes in optimization are only one of many ways which can make it break.

                                In my view, the sooner I find it and fix it the better.

                                I deliberately wiggle the optimization settings and run tests. If working code breaks… I fix.

                                I run stuff on CPU’s with different number of cores… that’s a really good one for knocking loose undefined behaviour bugs.

                                Sure my code “Works for Me” on my desk.

                                But I don’t control the systems where other people run my code. Thus I want the behaviour of my code to always be defined.

                                1. 1

                                  I run stuff on CPU’s with different number of cores… that’s a really good one for knocking loose undefined behaviour bugs.

                                  What do you mean by that? Just something like 2 vs 4 or as different as vs a 3 or 6 core that’s not a multiple of 2? Now that you mention it, I wonder if other interaction bugs could show up in SoC’s with mix of high-power and low-energy cores running things interacting. Maybe running on them could expose more bugs, too.

                                  1. 3

                                    The C standard as a bunch of fine grained wording around volatile and atomic and sequence points with undefined behaviour if you understand them wrong.

                                    Threading is dead easy…. any fool can (and many fools do) knock up a multithreaded program in a few minutes.

                                    Getting threading perfectly right seems to be extra-ordinarily hard and I haven’t met anybody who can, nor seen anybodies code that is perfect.

                                    So any fools code will “Work For Them” on their desk… now deploy it on a different CPU with a different number of cores, with a different load ….

                                    ….and the bugs come crawling out in all directions.

                                  2. 1

                                    But of course, there is often no warning.

                                    1. 1

                                      Actually gcc has been remarkably good about this… The last few releases I have dealt with there has a been a pairing of new warnings with new optimization passes.

                                      Which makes sense, because a new optimization pass tends to mean the compiler has learn more about the structure of your code.

                                      Where they have been gravely deficient is with function attribute…. there be dragons and unlikely to get a warning if you screw up.

                                      Curiously enough they will suggest attributes if you haven’t got one… but won;t warn you if you have the wrong one. :-(

                                      Bottom line. Beware of gcc function attributes. They are tricksy and easy to screw up.

                                      1. 0

                                        Are you reading any of the critiques of UB or even the defenses? The core issue is silent transformations of code - e.g. a silent deletion of a null pointer check because UB “can’t happen”.

                                2. 1

                                  There is no fundamental reason. It’s just a lot of work and no optimizing compiler is implemented that way right now.

                                  1. 0

                                    It looks like part of the problem is an engineering flaw in the compilers where there are multiple optimization passes that can produce errors in combination.

                                1. 4

                                  This whole area has been exercising my brain recently.

                                  As much as I hate the C standard committee’s lack of courage in defining behaviour, as often a simple decision, even if controversial will resolve it.

                                  However, here is one that is sort of unresolvable.

                                  What behaviour should a program have that indexes beyond the bounds of an array?

                                  There is no way a standard can prescribe what the result will be.

                                  It must be undefined.

                                  So the obvious thing to do, as Pascal did, is do bounds checking and have a defined behaviour.

                                  That imposes substantial runtime costs in CPU and memory, so users do switch it off…..

                                  So what should the behaviour be?

                                  One reasonable assumption a compiler writer can make is that there is no way the programmer can intend to index out of bounds, so I can assume that the index is less than the bound and generate machine code accordingly.

                                  You might say, these newfangled optimizations are the problem… no they aren’t.

                                  Compilers have been relaying out data in memory according what they think best for decades.

                                  Where this whole thing is driving me nuts is around asserts. See this thread I started here… https://readlist.com/lists/gcc.gnu.org/gcc-help/7/39051.html

                                  Asserts, if they are compiled in, tell the compiler (without getting involved in UB optimizations) that if expression is false, then everything down stream is not reachable…. so it analyzes under the assumption the expression is true.

                                  However it doesn’t attempt to warn you if it finds a code path where the expression is false, and completely redoes it’s optimization without that assumption if you compile the assert out.

                                  1. 4

                                    What behaviour should a program have that indexes beyond the bounds of an array?

                                    There is no way a standard can prescribe what the result will be.

                                    It must be undefined.

                                    This gets to the heart of the matter, I think. Part of the issue is people confuse “the language standard” with “what compilers do”. The language says it is undefined behaviour for an out-of-bounds array access to occur, or for signed integers to have their value range exceeded, but there’s no reason why compilers can’t generate code which will explicitly detect these situations and throw out an error message (and terminate).

                                    So why don’t compilers generally do that by default? Because C is used in performance critical code where these checks have a cost which is considered significant. And, despite the claims in this article, there are cases where trivial optimisations such as assuming that signed integer arithmetic operations won’t overflow can lead to significant speedups (it’s just that these cases are not something as trivial as a single isolated loop).

                                    If you do value deterministic behaviour on program error and are willing to sacrifice some performance to get it, the obvious solution is to use a language which provides that, i.e. don’t use C. But that’s not a justification to criticise the whole concept of undefined behaviour in C.

                                    1. 4

                                      There is a false choice between inefficient code with run time bounds checking and compiler “optimizations” that break working code. I love the example in http://www.complang.tuwien.ac.at/kps2015/proceedings/KPS_2015_submission_29.pdf where the GCC developers introduce a really stupid UB based “optimization” that broke working code and then found, to their horror, that it broke a benchmark. So they disabled it for the benchmark.

                                      And, despite the claims in this article, there are cases where trivial optimisations such as assuming that signed integer arithmetic operations won’t overflow can lead to significant speedups (it’s just that these cases are not something as trivial as a single isolated loop).

                                      Great. Let’s see an example.

                                      But that’s not a justification to criticise the whole concept of undefined behaviour in C.

                                      I think this attitude comes from a fundamental antipathy to the design of C or a basic misunderstanding of how it is used. C is not Java or Swift - and not because its designers were stupid or mired in archaic technology.

                                      1. 4

                                        There is a false choice between inefficient code with run time bounds checking and compiler “optimizations” that break working code

                                        Optimisations don’t break working code. They cause broken code to have different observable behaviour.

                                        And, despite the claims in this article, there are cases where trivial optimisations such as assuming that signed integer arithmetic operations won’t overflow can lead to significant speedups (it’s just that these cases are not something as trivial as a single isolated loop).

                                        Great. Let’s see an example.

                                        I don’t have a code example to hand, and as I said they’re not trivial, but that doesn’t mean it’s not true. Since it can eliminate whole code paths, it can affect the efficacy of for example value range propagation, affect inlining decisions, and have other flow-on effects.

                                        I think this attitude comes from a fundamental antipathy to the design of C or a basic misunderstanding of how it is used

                                        I disagree.

                                        1. -1

                                          Optimisations don’t break working code. They cause broken code to have different observable behaviour.

                                          That’s a legalistic answer. The code worked as expected and produced the correct result. The “optimization” caused it to misfunction.

                                          I don’t have a code example to hand

                                          Apparently nobody does. So the claimed benefit is just hand waving.

                                          I disagree.

                                          The thinking of Lattner is indicative. He agrees that compiler behavior using the UB loophole makes C a minefield. His solution is to advocate Swift. People who are hostile to the use of C should not be making these decisions.

                                          1. 5

                                            That’s a legalistic answer.

                                            Alas, in absence of “legalistic answers”, the only definition of C is either…

                                            • An implementation of C is a valid implementation iff every program in a Blessed Set of programs compile and runs successfully and outputs exactly the same values.

                                              or

                                            • An implementation of C is a valid implementation iff, every program that compiles and runs successfully on The One True Blessed C Compiler, compiles and runs and outputs exactly the same values AND every program that fails to compile on The One True Blessed Compiler, fails to compile on the candidate compiler.

                                            What sort of C are you envisioning?

                                            Those may be appropriate ways to progress, but that is a different language and probably should be called something other than C.

                                            1. 3

                                              Apparently nobody does. So the claimed benefit is just hand waving

                                              Again, I don’t agree.

                                              1. 1

                                                You can disagree all you want, but you also seem to be unable to produce any evidence.

                                                1. 3

                                                  You can disagree all you want, but you also seem to be unable to produce any evidence.

                                                  I have high confidence that I could produce, given some time, an example of code which compiled to say 20 instructions if integer overflow were defined and just 1 or 2 otherwise, and probably more by abusing the same technique repeatedly, but you might then claim it wasn’t representative of “real code”. And then if I really wanted to satisfy you I would have to find some way to trawl through repositories to identify some piece of code that exhibited similar properties. It’s more work than I care to undertake to prove my point here, and so I suppose you have a right to remain skeptical.

                                                  On the other hand, I have at least explained (even if only very briefly) how small optimisations such as assuming that integer arithmetic operations won’t overflow could lead to significant differences in code generation, beyond simple exchanging of instructions. You’ve given no argument as to why this couldn’t be the case. So, I don’t think there’s any clearly stronger argument on either side.

                                                  1. 0

                                                    I have high confidence that I could produce, given some time, an example of code which compiled to say 20 instructions if integer overflow were defined and just 1 or 2 otherwise

                                                    I have no confidence of this, and it would be a completely uninteresting optimization in any case.

                                                    On the other hand, I have at least explained (even if only very briefly) how small optimisations such as assuming that integer arithmetic operations won’t overflow could lead to significant differences in code generation, beyond simple exchanging of instructions.

                                                    Not really. You are omitting a single instruction that almost certainly costs no cycles at all in a modern pipelined processor. Balance that against putting minefields into the code - and note there is no way in C to check for this condition. The tradeoff is super unappealing.

                                                    1. 2

                                                      Not really. You are omitting a single instruction

                                                      No, I was not talking about omitting a single instruction.

                                      2. 2

                                        With assert(), you are telling the compiler that at this point, this is true. The compiler is trusting your assertion of the truth at that point.

                                        Also, if you compile with -DNDEBUG -O3 you will get the warning:

                                        [spc]saltmine:/tmp>gcc -std=c99 -Wall -Wextra -pedantic -DNDEBUG -O3 c.c
                                        c.c: In function ‘main’:
                                        c.c:7:20: warning: ‘*((void *)&a+10)’ is used uninitialized in this function [-Wuninitialized]
                                        c.c:13:8: note: ‘a’ was declared here
                                        [spc]saltmine:/tmp>gcc -std=c99 -Wall -Wextra -pedantic -O3 c.c
                                        [spc]saltmine:/tmp>
                                        
                                        1. 2

                                          No, that is a meaningless statement.

                                          The compiler doesn’t even see an assert statement, let alone “trust it”.

                                          It is a macro that gets expanded to “plain old code” at preprocessor time, so depending on NDEBUG settings it expands either to something like if(!(exp))abort() or nothing.

                                          What the compiler does trust is the __attribute_((__noreturn__)) on the abort() function.

                                          1. 1

                                            My file:

                                            #include <assert.h>
                                            
                                            int foo(int x)
                                            {
                                              assert(x >= 0);
                                              return x + 5;
                                            }
                                            

                                            My file after running it through the C preprocessor:

                                            # 1 "x.c"
                                            # 1 "/usr/include/assert.h"
                                             
                                             
                                            
                                             
                                             
                                             
                                            
                                             
                                            # 12
                                            
                                            # 15
                                            
                                            #ident      "@(#)assert.h   1.10    04/05/18 SMI"
                                            
                                            # 21
                                            
                                            # 26
                                            extern void __assert(const char *, const char *, int);
                                            # 31
                                            
                                            # 35
                                            
                                            # 37
                                            
                                             
                                            # 44
                                            
                                            # 46
                                            
                                            # 52
                                            
                                            # 63
                                            
                                            # 2 "x.c"
                                            
                                            int foo(int x)
                                            {
                                               ( void ) ( ( x >= 0 ) || ( __assert ( "x >= 0" , "x.c" , 5 ) , 0 ) );
                                              return x + 5;
                                            }
                                            #ident "acomp: Sun C 5.12 SunOS_sparc 2011/11/16"
                                            

                                            Not an __atttribute__ to be found. This C compiler can now generate code as if x is never a negative value.

                                            1. 1

                                              #include <assert.h> int foo(int x) { assert(x >= 0); return x + 5; }

                                              Can you copy paste the assembly output? (I read sparc asm as part of my day job….)

                                              I’d be interested to see is it is treating __assert() as anything other than a common or garden function.

                                              1. 1

                                                I’m not sure what it’ll prove, but okay:

                                                    cmp     %i0,0
                                                    bge     .L18
                                                    nop
                                                
                                                .L19:
                                                    sethi   %hi(.L20),%o0
                                                    or      %o0,%lo(.L20),%o0
                                                    add     %o0,8,%o1
                                                    call    __assert
                                                    mov     6,%o2
                                                    ba      .L17
                                                    nop
                                                
                                                    ! block 3
                                                .L18:
                                                    ba      .L22
                                                    mov     1,%i5
                                                
                                                    ! block 4
                                                .L17:
                                                    mov     %g0,%i5
                                                
                                                    ! block 5
                                                .L22:
                                                
                                                !    7    return x + 5;
                                                
                                                    add     %i0,5,%l0
                                                    st      %l0,[%fp-4]
                                                    mov     %l0,%i0
                                                    jmp     %i7+8
                                                    restore
                                                
                                                    ! block 6
                                                .L12:
                                                    mov     %l0,%i0
                                                    jmp     %i7+8
                                                    restore
                                                

                                                I did not specify any optimizations, and from what I can tell, it calls a function called __assert().

                                                1. 1

                                                  TL;DR; The optimiser for this compiler is crap. And it isn’t treating __assert() as special / noreturn.

                                                  int foo(int x)
                                                  {
                                                     ( void ) ( ( x >= 0 ) || ( __assert ( "x >= 0" , "x.c" , 5 ) , 0 ) );
                                                    return x + 5;
                                                  }
                                                  
                                                      ;; x is register %i0
                                                      cmp     %i0,0               ; Compare x with 0
                                                      bge     .L18                ; If it is large branch to .L18
                                                      nop                         ; Delay slot. Sigh sparc pipelining is makes debugging hard.
                                                  
                                                  ;;; This is the "call assert" branch. gcc has function __attribute__((cold)) or
                                                  ;;; __builtin_expect() to mark this as the unlikely path.
                                                  .L19:
                                                      sethi   %hi(.L20),%o0       
                                                      or      %o0,%lo(.L20),%o0
                                                      add     %o0,8,%o1
                                                      call    __assert
                                                      mov     6,%o2               ;Delay slot again
                                                      ba      .L17                ; Branch absolute to .L17
                                                      nop                         ;Delay slot
                                                  
                                                      ;; Really? Is this optimized at all?
                                                      ! block 3
                                                  .L18:
                                                      ba      .L22                ; Branch absolute to .L22!
                                                      mov     1,%i5               ; put 1 in %i5
                                                  
                                                  ;;; Seriously? Is this thing trying to do it the hard way?
                                                  ;;; The assert branch sets %i5 to zero.
                                                      ! block 4
                                                      .L17:
                                                      ;; Fun fact. %g0 is the sparc "bit bucket" reads as zero, ignores anything written to it.
                                                      mov     %g0,%i5             
                                                  
                                                      ! block 5
                                                      ;; Falls through. ie. Expected to come 
                                                      ;; out of __assert() *hasn't treated __assert as noreturn!*
                                                  
                                                      ;; Joins with the x>=0 branch
                                                  .L22:
                                                  
                                                  !    7    return x + 5;
                                                      ;; Local register %l0 is x + 5
                                                      add     %i0,5,%l0
                                                      st      %l0,[%fp-4]         ;WTF? Has this been inlined into a larger block of code?
                                                      mov     %l0,%i0             ;WTF? as above?
                                                      jmp     %i7+8               ;Return to calling addres.
                                                      restore                     ;Unwind sparc register windowing.
                                                  
                                                      ;; WTF? No reference to label .L12
                                                      ! block 6
                                                  .L12:
                                                      mov     %l0,%i0
                                                      jmp     %i7+8
                                                      restore
                                                  
                                          2. 1

                                            Actually, that isn’t quite what happens….

                                            Actually, it’s “Just Another Macro” which, very approximately, expands to …

                                             if( !(exp)) abort();
                                            

                                            …where abort() is marked __attribute__((noreturn));

                                            Which is almost, but not quite what one would want….

                                            As the compiler uses the noreturn attribute to infer that if !exp, then rest of code is unreachable, therefore for rest of code exp is true.

                                            Alas, I have found that it doesn’t, if it finds a path for which exp is false, warn you that you will abort!

                                            I certainly feel there is room for compiler and optimizer writers work with design by contract style programmers to have a “mutually beneficial” two way conversation with the programmers when they write asserts.

                                            1. 0

                                              Which is almost, but not quite what one would want….

                                              I’m not sure I understand you. assert() will abort if the expression given is false. That’s what it does. It also prints where the expression was (it’s part of the standard). If you don’t want to abort, don’t call assert(). If you expect that assert() is a compile-time check, well, it’s not.

                                              I certainly feel there is room for compiler and optimizer writers work with design by contract style programmers to have a “mutually beneficial” two way conversation with the programmers when they write asserts.

                                              There’s only so far that can go though. Put your foo() function in another file, and no C compiler can warn you.

                                              assert() is also a standard C function, which means the compiler can have built-in knowledge of its semantics (much like a C compiler can replace a call to memmove() with inline assembly). The fact that GCC uses its __attribute__ extension for this doesn’t apply to all other compilers.

                                              1. 2

                                                That’s the other bit of Joy about C.

                                                There are two entirely separate things….

                                                The compiler.

                                                And the standard library.

                                                gcc works quite happily with several entirely different libc’s.

                                                assert.h is part of libc, not the compiler.

                                                How assert() is implemented is the domain of the libc implementer not the compiler writer.

                                                I have poked at quite a few different compilers and even more libc’s…. as I have summarised is how all I have looked at are doing things. (Although some don’t have a concept of “noreturn” so can’t optimize based on that)

                                                Which compiler / libc are you looking at?

                                                1. 3

                                                  The compiler that comes with Solaris right now.

                                                  You can’t have a standard C compiler without the standard C library. I can get a compiler that understands, say, C99 syntax, but unless it comes with the standard C library, it can’t be called a compliant C99 compiler. The standard covers both the language and the library. I’m reading the C99 standard right now, and here’s an interesting bit:

                                                  Each library function is declared, with a type that includes a prototype, in a header, (182) whose contents are made available by the #include preprocessing directive.

                                                  And footnote 182 states:

                                                  (182) A header is not necessarily a source file, nor are the < and > delimited sequences in header names necessarily valid source file names.

                                                  To me, that says the compiler can have knowledge of the standard functions. Furthermore:

                                                  Any function declared in a header may be additionally implemented as a function-like macro defined in the header … Likewise, those function-like macros described in the following subclauses may be invoked in an expression anywhere a function with a compatible return type could be called.(187)

                                                  (187) Because external identifiers and some macro names beginning with an underscore are reserved, implementations may provide special semantics for such names. For example, the identifier _BUILTIN_abs could be used to indicate generation of in-line code for the abs function. Thus, the appropriate header could specify #define abs(x) _BUILTIN_abs(x) for a compiler whose code generator will accept it. In this manner, a user desiring to guarantee that a given library function such as abs will be a genuine function may write #undef abs whether the implementation’s header provides a macro implementation of abs or a built-in implementation. The prototype for the function, which precedes and is hidden by any macro definition, is thereby revealed also.

                                                  So the compiler can absolutely understand the semantics of standard C calls and treat them specially. Whether a C compiler does so is implementation defined. And good luck writing offsetof() of setjmp()/longjmp() portably (spoiler: you can’t—they’re tied to both the compiler and architecture).

                                                  So, getting back to assert() and your issues with it. Like I said, the compilers knows (whether it’s via GCC’s __attribute__(__noreturn__) or because the compiler has built-in knowledge of the semantics of assert()) that the expression used must be true and can thus optimize based on that information, much like it can remove the if statement and related code:

                                                  const int debug = 0;
                                                  
                                                  {
                                                    int x = debug;
                                                  
                                                    if (x)
                                                    {
                                                      fprintf(stderr,"here we are!\n");
                                                      exit(33);
                                                    }
                                                    // ...
                                                  }
                                                  

                                                  even through x, because debug is constant, x is loaded with a constant, and not modified prior to the if statement. Your wanting a warning about an invalid index to an array whose index is used in assert() is laudable, but to the compiler, you are telling it “yes, this is fine. No complaints please.” Compile the same code with NDEBUG defined, the assert() goes away (from the point of view of the compiler phase) and the diagnostic can be issued.

                                                  Yes, it sucks. But that’s the rational.

                                                  The intent is you run the code, you get the assert, you fix the code (otherwise, why use assert() in the first place?) or remove the assert() because the assumption made is no longer valid (this has happened to me but not often and usually after code has changed, which is something you want, no?).

                                          3. 2

                                            You can do #define assert(p) if (!(p)) __builtin_unreachable() to keep the optimisation benefits! And MSVC has __assume which behaves similarly.

                                            1. 1

                                              Hmm… Interesting….

                                              Does it then elide the expression !(p)?

                                              Or does it impose the run time cost of evaluating !(p) and not the benefit of invoking abort()?

                                              1. 1

                                                Since __builtin_unreachable only exists to guide the compiler, p has to be an expression with no side effects, and then the compiler can optimise it out because you don’t use its result.

                                            2. 1

                                              I think this is an incorrectly framed question. C says that it’s not the compiler’s problem. You index past an array bound, perhaps you know what you are doing or perhaps not. The compiler is just supposed to do what you said. If you have indexed into another data structure by mistake or past the bound of allocated memory - that’s on the programmer ( BTW: I think opt-in bounds checked arrays would be great). It is unreasonable for the compiler to assume things that may be false. For example, if the programmer cautiously adds a check for overflow, I don’t want the compiler to assume that the index must be in bounds so the check can be discarded.

                                              1. 6

                                                C says that it’s not the compiler’s problem

                                                Actually the C standard says it’s not the compilers problem, it’s undefined behaviour and completely your problem.

                                                If you want it to have some weird arsed, but well defined behaviour, you need a different language standard.

                                                In C standardese, things that are “the compilers problem” are labelled clearly as “implementation defined”, things that are your problem are labelled “undefined behaviour”.

                                                perhaps you know what you are doing or perhaps not.

                                                Well, actually, you provably don’t know what you’re doing…. as the compiler and linker lays out the data structures in ram pretty much as they damn well feel like.

                                                Part of that for, example, like the struct padding and alignment is part of the ABI for that particular system, which is not part of the C standard, and most of that will change as you add or remove other data items and/or change their types. If you need to rely on such things, there are other (some non-standard) mechanisms, eg. unions types and packing pragmas.

                                                BTW: I think opt-in bounds checked arrays would be great

                                                gcc and clang now does have sanitizers to check that.

                                                However the C standard is sufficiently wishy-washy on a number of fronts, there are several corner cases that are uncheckable, and valgrind is then your best hope. Valgrind won’t help you, for example, if you index into another valid memory region or alignment padding.

                                                For example, if the programmer cautiously adds a check for overflow, I don’t want the compiler to assume that the index must be in bounds so the check can be discarded.

                                                How ever, if the compiler can prove that the check always succeeds, then the check is useless and the programmer has written useless code and the compiler rightly elides it.

                                                Modern versions of gcc will (if you have the warnings dialled up high enough, and annotated function attributes correctly) will warn you about tautologies and unreachable code.

                                                1. 1

                                                  The C standard is not the C language. It is a committee report attempting to codify the language. It is not made up of laws of physics - it can be wrong and can change. My argument is that the standard is wrong. Feel free to disagree, but please don’t treat the current instance of the standard as if they were beyond discussion.

                                                  In fact, I do want a different standard: one that is closer to my idea what the rules of the language should be in order to make the language useful, beautiful, and closer to the spirit of the design.

                                                  The compiler and linker don’t have total freedom to change layouts even in the current standard - otherwise, for example, memcpy would not work. Note: “Except for bit-fields, objects are composed of contiguous sequences of one or more bytes, the number, order, and encoding of which are either explicitly specified or implementation-defined.”

                                                  struct a{ int x[100];}; char *b = malloc(sizeof(int)*101; struct a *y = (struct a *)b; if(sizeof(struct a)) != sizeof(int)*100 ) panic(“this implementation of C won’t work for us\n”); …. do stuff … y->x[100] = checksum(y);

                                                  But worse,

                                                  message = readsocket(); for(i = 0; i < message->numberbytes; i++) if( i > MAX)use(m->payload[i]))

                                                  if the compiler can assume the index is never greater than the array size and MAX is greater than array size, according to you it should be able to “optimize” away the check.

                                                  How ever, if the compiler can prove that the check always succeeds, then the check is useless and the programmer has written useless code and the compiler rightly elides it.

                                                  This is one of the key problems with UB. The compiler can assume there is no UB. Therefore the check is assumed unnecessary. Compilers don’t do this right now, but that’s the interpretation that is claimed to be correct. In fact, in many cases the compiler assumes that the code will not behave the way that the generated code does behave. This is nutty.

                                                  1. 8

                                                    The C standard is not the C language.

                                                    Hmm. So what is The C Language?

                                                    In the absence of the standard, there is no “C Language”, merely a collection of competing implementations of different languages, confusingly all named “C”.

                                                    I don’t think calling a standard “Wrong” isn’t very helpful, as that would imply there exists some definition of Right.

                                                    I rather call it “differing from all known implementations” or “unimplementable” or “undesirable” or “just plain bloody silly”.

                                                    There is no One True Pure Abstract Universal C out there like an ancient Greek concept of Numbers.

                                                    There are only the standard(s) and the implementations.

                                                    In fact, I do want a different standard: one that is closer to my idea what the rules of the language should be in order to make the language useful, beautiful, and closer to the spirit of the design.

                                                    Ah, the Joys of Standards! They are so useful, everybody wants their own one! ;-)

                                                    Except for bit-fields, objects are composed of contiguous sequences of one or more bytes, the number, order, and encoding of which are either explicitly specified or implementation-defined.”

                                                    Umm. So, yes, an array is a contiguous sequence, but we’re talking about indexing out of bounds of an array. So what is contiguous beyond that array?

                                                    Answer 1 : Possibly empty padding to align the next object at the appropriate alignment boundary.

                                                    Answer 2: Which is the next object? That is determined by the field order within a struct…. (with the alignment padding determined by the ABI), but if the array is not in a struct…. it’s all bets off as to which object the compiler linker chooses to place next.

                                                    Hmm. Your example didn’t format nicely (nor was it valid syntax (missing parenthesis) so let me see if I can unravel that to see what you mean…

                                                    struct a { 
                                                       int x[100];
                                                    }; 
                                                    char *b = malloc(sizeof(int)*101); 
                                                    struct a *y = (struct a *)b; 
                                                    
                                                    if(sizeof(struct a)) != sizeof(int)*100 ) 
                                                        panic(“this implementation of C won’t work for us\n”); 
                                                    
                                                    …. do stuff … 
                                                    
                                                     y->x[100] = checksum(y);
                                                    

                                                    Hmm. Not sure what you’re trying to say, but try this one….

                                                    #include <stdio.h>
                                                    #include <stdint.h>
                                                    
                                                    struct {
                                                        char c[5];
                                                        uint32_t i;
                                                    } s;
                                                    
                                                    uint64_t l;
                                                    
                                                    int main(void)
                                                    {
                                                       printf( "sizeof(s)=%lu\n sizeof(c)=%lu\n sizeof(i)=%lu\n", sizeof(s),sizeof(s.c),sizeof(s.i));
                                                       printf( "address of s=%08lx\n address of l=%08lx\n diff = %ld\n", (uintptr_t)&s, (uintptr_t)&l, ((intptr_t)&s-(intptr_t)&l));
                                                       return 0;
                                                    }
                                                    

                                                    Outputs…

                                                    sizeof(s)=12                                                                                                                                                                                 
                                                    sizeof(c)=5                                                                                                                                                                                 
                                                    sizeof(i)=4                                                                                                                                                                                 
                                                    address of s=00601050                                                                                                                                                                        
                                                    address of l=00601048                                                                                                                                                                       
                                                    diff = 8                                                                                                                                                                                    
                                                    

                                                    https://onlinegdb.com/B1Ut3031m

                                                    1. 3

                                                      In the absence of the standard, there is no “C Language”, merely a collection of competing implementations of different languages, confusingly all named “C”.

                                                      What a weird idea. So much of the core code of the internet and infrastructure was written in an impossible language prior to the first ANSI standard. And it even worked!

                                                      Ah, the Joys of Standards! They are so useful, everybody wants their own one! ;-)

                                                      There is a standards process. It involves people presenting proposals for modifications and discussing their merits. There are changes ! That’s totally normal and expected.

                                                      The moment C compilers began padding, every compiler added a “packed” attribute. The reason is that many C applications require that capability. Imagine ethernet packets with artisanal compiler innovative ordering. And those attributes are not in the standard - yet they exist all the same.

                                                      Your example is not my example.

                                                      1. 2

                                                        So much of the core code of the internet and infrastructure was written in an impossible language prior to the first ANSI standard. And it even worked!

                                                        Were actually written in whatever dialect was available on the day and worked for that machine, that compiler on that day.

                                                        And porting to a different machine, different compiler, different version of the compiler, was a huge pain in the ass.

                                                        I know.

                                                        I’ve done a hell of a lot of that over the decades.

                                                        Role on tighter standards please.

                                                        Yup, and most of them added a subtly different packed attribute, and since it was not terribly well documented and defined, I’ve had a fair amount of pain from libraries written (LWIP comes to mind), where at various points in their history got the packed attribute wrong, so it wasn’t portable from 32 to 64 bit.

                                                        Your example is not my example.

                                                        You example wasn’t formatted, and I didn’t quite understand the point of it. Can you format it properly and expand a bit on what you were sayign with that example?

                                            1. 3

                                              Does anyone know why this needed to be in a PDF image? Looks like it would make a great article!

                                              1. 18

                                                I find it easier to write in latex. Don’t judge me.

                                                1. 4

                                                  Have you tried pandoc to convert LaTeX source into HTML (or any other format you want)? Would seem to be a compromise, unless you use some esoteric LaTeX commands.

                                                  But at the same time I can’t really understand how a typesetting macro set would be easier to use than something like markdown…

                                                  1. 3

                                                    I can’t really understand how a typesetting macro set would be easier to use than something like markdown…

                                                    Why not both? (I wish it were easier to run this locally.)

                                                    1. 3

                                                      That in turn reminds me of Org-mode, since it too can embed LaTeX codes, source code and has multiple export facilities. But you have to be an Emacs user to get it’s full potential.

                                                      1. 2

                                                        Oh, I didn’t know that; I’ve been meaning to try it, since I’m evaluating Spacemacs/evil-mode anyway. Thanks!

                                                      2. 1

                                                        Interesting program and Koka language is really interesting. Thanks

                                                      3. 1

                                                        my experiments with pandoc did not produce good results.

                                                        My preference for xelatex is not defensible. It’s just a habit.

                                                      4. 2

                                                        I don’t know enough about latex to judge it, but if your output was a document instead of an image, it would be a lot easier to read on reader devices (like tablets)!

                                                    1. 7

                                                      I always laugh when people come up with convoluted defenses for C and the effort that goes into that (even writing papers). Their attachment to this language has caused billions if not trillions worth of damages to society.

                                                      All of the defenses that I’ve seen, including this one, boil down to nonsense. Like others, the author calls for “improved C implementations”. Well, we have those already, and they’re called Rust, Swift, and, for the things C is not needed for, yes, even JavaScript is better than C (if you’re not doing systems-programming).

                                                      1. 31

                                                        Their attachment to this language has caused billions if not trillions worth of damages to society.

                                                        Their attachment to a language with known but manageable defects has created trillions if not more in value for society. Don’t be absurd.

                                                        1. 4

                                                          [citation needed] on the defects of memory unsafety being manageable. To a first approximation every large C/C++ codebase overfloweth with exploitable vulnerabilities, even after decades of attempting to resolve them (Windows, Linux, Firefox, Chrome, Edge, to take a few examples.)

                                                          1. 2

                                                            Compared to the widely used large codebase in which language for which application that accepts and parses external data and yet has no exploitable vulnerabilities? BTW: http://cr.yp.to/qmail/guarantee.html

                                                            1. 6

                                                              Your counter example is a smaller, low-featured, mail server written by a math and coding genius. I could cite Dean Karnazes doing ultramarathons on how far people can run. That doesn’t change that almost all runners would drop before 50 miles, esp before 300. Likewise with C code, citing the best of the secure coders doesn’t change what most will do or have done. I took author’s statement “to first approximation every” to mean “almost all” but not “every one.” It’s still true.

                                                              Whereas, Ada and Rust code have done a lot better on memory-safety even when non-experts are using them. Might be something to that.

                                                              1. 2

                                                                I’m still asking for the non C widely used large scale system with significant parsing that has no errors.

                                                                1. 3

                                                                  That’s cheating saying “non-c” and “widely used.” Most of the no-error parsing systems I’ve seen use a formal grammar with autogeneration. They usually extract to Ocaml. Some also generate C just to plug into the ecosystem since it’s a C/C++-based ecosystem. It’s incidental in those cases: could be any language since the real programming is in the grammar and generator. An example of that is the parser in Mongrel server which was doing a solid job when I was following it. I’m not sure if they found vulnerabilities in it later.

                                                              2. 5

                                                                At the bottom of the page you linked:

                                                                I’ve mostly given up on the standard C library. Many of its facilities, particularly stdio, seem designed to encourage bugs.

                                                                Not great support for your claim.

                                                                1. 2

                                                                  There was an integer overflow reported in qmail in 2005. Bernstein does not consider this a vulnerability.

                                                              3. 3

                                                                That’s not what I meant by attachment. Their interest in C certainly created much value.

                                                              4. 9

                                                                Their attachment to this language has caused billions if not trillions worth of damages to society.

                                                                Inflammatory much? I’m highly skeptical that the damages have reached trillions, especially when you consider what wouldn’t have been built without C.

                                                                1. 12

                                                                  Tony Hoare, null’s creator, regrets its invention and says that just inserting the one idea has cost billions. He mentions it in talks. It’s interesting to think that language creators even think of the mistakes they’ve made have caused billions in damages.

                                                                  “I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.

                                                                  If the billion dollar mistake was the null pointer, the C gets function is a multi-billion dollar mistake that created the opportunity for malware and viruses to thrive.

                                                                  1. 2

                                                                    He’s deluded. You want a billion dollar mistake: try CSP/Occam plus Hoare Logic. Null is a necessary byproduct of implementing total functions that approximate partial ones. See, for example, McCarthy in 1958 defining a LISP search function with a null return on failure. http://www.softwarepreservation.org/projects/LISP/MIT/AIM-001.pdf

                                                                    1. 3

                                                                      “ try CSP/Occam plus Hoare Logic”

                                                                      I think you meant formal verification, which is arguable. They could’ve wasted a hundred million easily on the useless stuff. Two out of three are bad examples, though.

                                                                      Spin has had a ton of industrial success easily knocking out problems in protocols and hardware that are hard to find via other methods. With hardware, the defects could’ve caused recalls like the Pentium bug. Likewise, Hoare-style logic has been doing its job in Design-by-Contract which knocks time off debugging and maintenance phases. The most expensive. If anything, not using tech like this can add up to a billion dollar mistake over time.

                                                                      Occam looks like it was a large waste of money, esp in the Transputer.

                                                                      1. 1

                                                                        No. I meant what I wrote. I like spin.

                                                                    2. 1

                                                                      Note what he does not claim is that the net result of C’s continued existence is negative. Something can have massive defects and still be an improvement over the alternatives.

                                                                    3. 7

                                                                      “especially when you consider what wouldn’t have been built without C.”

                                                                      I just countered that. The language didn’t have to be built the way it was or persist that way. We could be building new stuff in a C-compatible language with many benefits of HLL’s like Smalltalk, LISP, Ada, or Rust with the legacy C getting gradually rewritten over time. If that started in the 90’s, we could have equivalent of a LISP machine for C code, OS, and browser by now.

                                                                      1. 1

                                                                        It didn’t have to, but it was, and it was then used to create tremendous value. Although I concur with the numerous shortcomings of C, and it’s past time to move on, I also prefer the concrete over the hypothetical.

                                                                        The world is a messy place, and what actually happens is more interesting (and more realistic, obviously) than what people think could have happened. There are plenty of examples of this inside and outside of engineering.

                                                                        1. 3

                                                                          The major problem I see with this “concrete” winners-take-all mindset is that it encourages whig history which can’t distinguish the merely victorious from the inevitable. In order to learn from the past, we need to understand what alternatives were present before we can hope to discern what may have caused some to succeed and others to fail.

                                                                          1. 2

                                                                            Imagine if someone created Car2 which crashed 10% of the time that Car did, but Car just happened to win. Sure, Car created tremendous value. Do you really think people you’re arguing with think that most systems software, which is written in C, is not extremely valuable?

                                                                            It would be valuable even if C was twice as bad. Because no one is arguing about absolute value, that’s a silly thing to impute. This is about opportunity cost.

                                                                            Now we can debate whether this opportunity cost is an issue. Whether C is really comparatively bad. But that’s a different discussion, one where it doesn’t matter that C created value absolutely.

                                                                      2. 8

                                                                        C is still much more widely used than those safer alternatives, I don’t see how laughing off a fact is better than researching its causes.

                                                                        1. 10

                                                                          Billions of lines of COBOL run mission-critical services of the top 500 companies in America. Better to research the causes of this than laughing it off. Are you ready to give up C for COBOL on mainframes or you think both of them’s popularity were caused by historical events/contexts with inertia taking over? Im in latter camp.

                                                                          1. 7

                                                                            Are you ready to give up C for COBOL on mainframes or you think both of them’s popularity were caused by historical events/contexts with inertia taking over? Im in latter camp.

                                                                            Researching the causes of something doesn’t imply taking a stance on it, if anything, taking a stance on something should hopefully imply you’ve researched it. Even with your comment I still don’t see how laughing off a fact is better than researching its causes.

                                                                            You might be interested in laughing about all the cobol still in use, or in research that looks into the causes of that. I’m in the latter camp.

                                                                            1. 5

                                                                              I think you might be confused at what I’m laughing at. If someone wrote up a paper about how we should continue to use COBOL for reasons X, Y, Z, I would laugh at that too.

                                                                              1. 3

                                                                                Cobol has some interesting features(!) that make it very “safe”. Referring to the 85 standard:

                                                                                X. No runtime stack, no stack overflow vulnerabilities
                                                                                Y. No dynamic memory allocation, impossible to consume heap
                                                                                Z. All memory statically allocated (see Y); no buffer overflows
                                                                                
                                                                                1. 3

                                                                                  We should use COBOL with contracts for transactions on the blockchains. The reasons are:

                                                                                  X. It’s already got compilers big businesses are willing to bet their future on.

                                                                                  Y. It supports decimal math instead of floating point. No real-world to fake, computer-math conversions needed.

                                                                                  Z. It’s been used in transaction-processing systems that have run for decades with no major downtime or financial losses disclosed to investors.

                                                                                  λ. It can be mathematically verified by some people who understand the letter on the left.

                                                                                  You can laugh. You’d still be missing out on a potentially $25+ million opportunity for IBM. Your call.

                                                                                  1. 1

                                                                                    Your call.

                                                                                    I believe you just made it your call, Nick. $25+ million opportunity, according to you. What are you waiting for?

                                                                                    1. 4

                                                                                      You’re right! I’ll pitch IBM’s senior executives on it the first chance I get. I’ll even put on a $600 suit so they know I have more business acumen than most coin pitchers. I’ll use phrases like vertical integration of the coin stack. Haha.

                                                                                2. 4

                                                                                  That makes sense. I did do the C research. Ill be posting about that in a reply later tonight.

                                                                                  1. 10

                                                                                    Ill be posting about that in a reply later tonight.

                                                                                    Good god man, get a blog already.

                                                                                    Like, seriously, do we need to pass a hat around or something? :P

                                                                                    1. 5

                                                                                      Haha. Someone actually built me a prototype a while back. Makes me feel guilty that I dont have one instead of the usual lazy or overloaded.

                                                                                        1. 2

                                                                                          That’s cool. Setting one up isn’t the hard part. The hard part is doing a presentable design, organizing the complex activities I do, moving my write-ups into it adding metadata, and so on. I’m still not sure how much I should worry about the design. One’s site can be considered a marketing tool for people that might offer jobs and such. I’d go into more detail but you’d tell me “that might be a better fit for Barnacles.” :P

                                                                                          1. 3

                                                                                            Skip the presentable design. Dan Luu’s blog does pretty well it’s not working hard to be easy on the eyes. The rest of that stuff you can add as you go - remember, perfect is the enemy of good.

                                                                                            1. 0

                                                                                              This.

                                                                                              Hell, Charles Bloom’s blog is basically an append-only textfile.

                                                                                            2. 1

                                                                                              ugh okay next Christmas I’ll add all the metadata, how does that sound

                                                                                              1. 1

                                                                                                Making me feel guilty again. Nah, I’ll build it myself likely on a VPS.

                                                                                                And damn time has been flying. Doesnt feel like several months have passed on my end.

                                                                                      1. 1

                                                                                        looking forward to read it:)

                                                                                3. 4

                                                                                  Well, we have those already, and they’re called Rust, Swift, ….

                                                                                  And D maybe too. D’s “better-c” is pretty interesting, in my mind.

                                                                                  1. 3

                                                                                    Last i checked, D’s “better-c” was a prototype.

                                                                                  2. 5

                                                                                    If you had actually made a serious effort at understanding the article, you might have come away with an understanding of what Rust, Swift, etc. are lacking to be a better C. By laughing at it, you learned nothing.

                                                                                    1. 2

                                                                                      the author calls for “improved C implementations”. Well, we have those already, and they’re called Rust, Swift

                                                                                      Those (and Ada, and others) don’t translate to assembly well. And they’re harder to implement than, say, C90.

                                                                                      1. 3

                                                                                        Is there a reason why you believe that other languages don’t translate to assembly well?

                                                                                        It’s true those other languages are harder to implement, but it seems to be a moot point to me when compilers for them already exist.

                                                                                        1. 1

                                                                                          Some users of C need an assembly-level understanding of what their code does. With most other languages that isn’t really achievable. It is also increasingly less possible with modern C compilers, and said users aren’t very happy about it (see various rants by Torvalds about braindamaged compilers etc.)

                                                                                          1. 4

                                                                                            “Some users of C need an assembly-level understanding of what their code does.”

                                                                                            Which C doesnt give them due to compiler differences and effects of optimization. Aside from spotting errors, it’s why folks in safety- critical are required to check the assembly against the code. The C language is certainly closer to assembly behavior but doesnt by itself gives assembly-level understanding.

                                                                                      2. 2

                                                                                        So true. Every time I use the internet, the solid engineering of the Java/Jscript components just blows me away.

                                                                                        1. 1

                                                                                          Everyone prefers the smell of their own … software stack. I can only judge by what I can use now based on the merits I can measure. I don’t write new services in C, but the best operating systems are still written in it.

                                                                                          1. 5

                                                                                            “but the best operating systems are still written in it.”

                                                                                            That’s an incidental part of history, though. People who are writing, say, a new x86 OS with a language balancing safety, maintenance, performance, and so on might not choose C. At least three chose Rust, one Ada, one SPARK, several Java, several C#, one LISP, one Haskell, one Go, and many C++. Plenty of choices being explored including languages C coders might say arent good for OS’s.

                                                                                            Additionally, many choosing C or C++ say it’s for existing tooling, tutorials, talent, or libraries. Those are also incidental to its history rather than advantages of its language design. Definitely worthwhile reasons to choose a language for a project but they shift the language argument itself implying they had better things in mind that werent usable yet for that project.

                                                                                            1. 4

                                                                                              I think you misinterpreted what I meant. I don’t think the best operating systems are written in C because of C. I am just stating that the best current operating system I can run a website from is written in C, I’ll switch as soon as it is practical and beneficial to switch.

                                                                                              1. 2

                                                                                                Oh OK. My bad. That’s a reasonable position.

                                                                                                1. 3

                                                                                                  I worded it poorly, I won’t edit though for context.

                                                                                        1. 26

                                                                                          Something clearly got this author’s goat; this rebuttal feels less like a reasoned response and more like someone yelling “NO U” into Wordpress.

                                                                                          Out of order execution is used to hide the latency from talking to other components of the system that aren’t the current CPU, not “to make C run faster”.

                                                                                          Also, attacking academics as people living in ivory towers is an obvious ad hominem. It doesn’t serve any purpose in this article and, if anything, weakens it. Tremendous amounts of practical CS come from academia and professional researchers. That doesn’t mean it should be thrown out.

                                                                                          1. 10

                                                                                            So, in context, the bit you quote is:

                                                                                            The author criticizes things like “out-of-order” execution which has lead to the Spectre sidechannel vulnerabilities. Out-of-order execution is necessary to make C run faster.

                                                                                            The author was completely correct here, and substituting in JS/C++/D/Rust/Fortan/Ada would’ve still resulted in a correct statement.

                                                                                            The academic software preference (assuming that such a thing exists) is clearly for parallelism, for “dumb” chips (because computer science and PLT is cooler than computer/electrical engineering, one supposes), for “smart” compilers and PL tricks, and against “dumb” languages like C. That appears to be the assertion the author here would make, and I don’t think it’s particularly wrong.

                                                                                            Here’s thing though: none of that has been borne out in mainstream usage. In fact, the big failure the author mentioned here (the Sparc Tx line) was not alone! The other big offender of this you may have heard of is the Itanic, from the folks at Intel. A similar example of the philosophy not really getting traction is the (very neat and clever) Parallax Propeller line. Or the relative failure of the Adapteva Parallela boards and their Epiphany processors.

                                                                                            For completeness sake, the only chips with massive core counts and simple execution models are GPUs, and those are only really showing their talent in number crunching and hashing–and even then, for the last decade, somehow limping along with C variants!

                                                                                            1. 2

                                                                                              One problem with the original article was that it located the requirement for ILP in the imagined defects of the C language. that’s just false.

                                                                                              Weird how nobody seems to remember the Terra.

                                                                                              1. 3

                                                                                                In order to remember you would have to have learned about it first. My experience is that no one who isn’t studying computer architecture or compilers in graduate school will be exposed to more exotic architectures. For most technology professionals, working on anything other than x86 is way out of the mainstream. We can thank the iPhone for at least making “normal” software people aware of ARM.

                                                                                                1. 4

                                                                                                  I am so old, that I remember reading about the Tomasula algorithm in Computer Architecture class and wondering why anyone would need that on a modern computer with a fast cache - like a VAX.

                                                                                                2. 1

                                                                                                  For those of us who don’t, what’s Terra?

                                                                                                  1. 2

                                                                                                    Of course, I spelled it wrong.

                                                                                                    https://en.wikipedia.org/wiki/Cray_MTA

                                                                                              2. 9

                                                                                                The purpose of out of order execution is to increase instruction-level parallelism (ILP). And while it’s frequently the case that covering the latency of off chip access is one way out of order execution helps, the other (more common) reason is that non-dependent instructions that use independent ALUs can issue immediately and retire in whatever order instead of stalling the whole pipeline to maintain instruction ordering. When you mix this with good branch prediction and complex fetch and issue logic, then you get, in effect, unrolled, parallelized loops with vanilla C code.

                                                                                                Whether it’s fair to say the reasoning was “to make C run faster” is certainly debatable, but the first mainstream out of order processor was the Pentium Pro (1996). Back then, the vast majority of software was written in C, and Intel was hellbent on making each generation of Pentium run single-threaded code faster until they hit the inevitable power wall at the end of the NetBurst life. We only saw the proliferation of highly parallel programming languages and libraries in the mainstream consciousness after that, when multicores became the norm to keep the marketing materials full of speed gainz despite the roadblock on clockspeed and, relatedly, single-threaded performance.

                                                                                                1. 1

                                                                                                  the first mainstream out of order processor was the Pentium Pro (1996).

                                                                                                  Nope.

                                                                                              1. 4

                                                                                                I somewhat disagree with the basic premise of this website.

                                                                                                The idea of merit is in fact never clearly defined; rather, it seems to be a form of recognition, an acknowledgement that “this person is valuable insofar as they are like me.” […] It is time that we as an industry abandon the notion that merit is something that can be measured, can be pursued on equal terms by every individual, and can ever be distributed fairly.

                                                                                                Let me quote dictionary.com;

                                                                                                meritocracy, noun:

                                                                                                1. an elite group of people whose progress is based on ability and talent rather than on class privilege or wealth.
                                                                                                2. a system in which such persons are rewarded and advanced
                                                                                                3. leadership by able and talented persons.

                                                                                                I think that quite clearly runs contra to these points. Usually you cannot simply put merit, talent and ability in numbers but you can usually make a subjective evaluation and decide based on that. It has little to do with “privilege” or “excluding of underpresented people in technology”. If the person evaluating is fair, there is no reason to believe they will be deciding on Person A over B because B was jewish or of a certain ethnicity. Atleast that is my opinion on the matter. Many corporations will be happy to measure your merit by lines of code written per day.

                                                                                                Our professions do not define us; we are more than the work we do.

                                                                                                Yes, that is indeed quite a nice sentiment but I do think that when you’re working on a project, your position on that project should be somewhat defined by what you can do. Otherwise we’d be putting our UI designer on the server team.

                                                                                                We believe that interpersonal skills are at least as important as technical skills.

                                                                                                Agreed there but this doesn’t disagree with meritocracy at all and probably runs orthogonal to it.

                                                                                                Homogeneity is an antipattern.

                                                                                                Usually yes, but you’ll have to acknowledge all kinds of homogeneity there. If you have 20 people of all kinds of color, sexual orientation, sex, gender, ethnicity, etc. but they all studied CS at Harvard, I don’t think we have a heterogenic group, atleast not as heterogenic as it can be.

                                                                                                Homo- and heterogenity of groups are a spectrum, it isn’t a hard yes/no question. Plus, you will have to check which measurements you take to calculate the homogenity of a group. And which not.

                                                                                                [… a few points that have little to nothing to do with meritocracy or being against it …]


                                                                                                We understand that working in our field is a privilege, not a right. The negative impact of toxic people in the workplace or the larger community is not offset by their technical contributions.

                                                                                                Hypothetical scenario. The cure against cancer, aids and death in general is found. The inventor is a homophobe. Should we deny ourselves the cure?

                                                                                                I’m all for excluding toxic people from the community but we should still accept code from anyone because the code they contribute in the right projects could save lives or significantly improve the lives of others.

                                                                                                Being meritocratic also means recognizing the contributions of people you don’t like, regardless of whether you’re homophobe or anti-homophobe. You don’t have to like them nor let them communicate or integrate/interact with the community.

                                                                                                [… another few points that have little to nothing to do with meritocracy or being against it …]


                                                                                                I don’t really see the point in any of this as the webpage seems to be largely against discrimination, not meritocracy. A lot of these points aren’t against meritocracy but rather about enabling everyone, especially underrepresented people, to participate to their fullest extend in this meritocracy and thusly also being able to show their merit, so to speak.

                                                                                                I think the page should be updated to reflect that they aren’t against meritocracy per-se, just in favor of making it more fair. (“from each according to their ability, to each according to their needs”, I think is a fitting quote if I don’t misunderstand the english context)

                                                                                                1. 3

                                                                                                  if the person evaluating is fair, there is no reason to believe they will be deciding on Person A over B because B was jewish or of a certain ethnicity. Atleast that is my opinion on the matter.

                                                                                                  However data shows that people can and do believe themselves to be fair and objective when they are not. And many times, people who do evaluation are openly unfair.

                                                                                                  1. 3

                                                                                                    Well, the considerations on the webpage don’t make that disappear, worse, pointing out that people will be unfair when the believe to be the opposite, means the website itself can also fall under this category.

                                                                                                    What’s important is that we try as best as we can.

                                                                                                1. 7

                                                                                                  Massive kudos to this guy for not putting up with this SJW madness. I wish him all the best!

                                                                                                  We at suckless are heavily opposed to code of conducts and discriminatory organizations of any shape or form.

                                                                                                  1. 11

                                                                                                    Suckless takes a similarly principled stand against runtime config files.

                                                                                                    1. 8

                                                                                                      How does suckless oppose discrimination?

                                                                                                      1. 13

                                                                                                        It’s very simple. Any non-technological matters during software development move the software away from its ideal form. Thus, to make your software suck less, you only take the best developers no matter what race, gender, heritage, etc. these persons have.

                                                                                                        We do not believe in equal status (i.e. e.g. forcibly obtaining a 50/50 gender ratio), as this immediately leads to discrimination. We do however strongly believe in equal rights, naturally. You also naturally cannot have both.

                                                                                                        1. 94

                                                                                                          Any non-technological matters during software development move the software away from its ideal form.

                                                                                                          Suckless makes a window manager: a part of a computer that human beings, with all their rich and varying abilities and perspectives, interact with constantly. Your choices of defaults and customization options have direct impact on those humans.

                                                                                                          For example, color schemes determine whether color-blind people are able to quickly scan active vs inactive options and understand information hierarchy. Font sizes and contrast ratios can make the interface readable, difficult, or completely unusable for visually impaired people. The sizes of click targets, double-click timeouts, and drag thresholds impact usability for those with motor difficulties. Default choices of interface, configuration, and documentation language embed the project in a particular English-speaking context, and the extent to which your team supports internationalization can limit, or expand, your user base.

                                                                                                          With limited time and resources, you will have to make tradeoffs in your code, documentation, and community about which people your software is supportive and hostile towards. These are inherently political decisions which cannot be avoided. This is not to say that your particular choices are wrong. It’s just you are already engaged in “non-technical”, political work, because you, like everyone else here, are making a tool for human beings. The choice to minimize the thought you put into those decisions does not erase the decisions themselves.

                                                                                                          At the community development level, your intentional and forced choices around language, schedule, pronouns, and even technical terminology can make contributors from varying backgrounds feel welcome or unwelcome, or render the community inaccessible entirely. These too are political choices. Your post above is one of them.

                                                                                                          There is, unfortunately, no such thing as a truly neutral stance on inclusion. Consider: you wish to take only the best developers, and yet your post has already discouraged good engineers from working on your project. Doubtless it has encouraged other engineers (who may be quite skilled!) with a similar political view to your own; those who believe, for instance, that current minority representation in tech is justified, representing the best engineers available, and that efforts to change those ratios are inherently discriminatory and unjust.

                                                                                                          Policies have impact. Consider yours.

                                                                                                          1. 7

                                                                                                            I don’t know if that was your goal, but this is one of the best arguments for positive discrimination I’ve read. Thanks for posting it, and also thanks for noting that all decisions have some inherent politics whether we like it or not.

                                                                                                            Unfortunately there is simply no solution: positive discrimination is opposed to meritocracy. Forced ratios are definitely an unethical tool, as they are a form of discrimination. However, this unethical tool brings us to a greater good, which is a final product that incorporates diversity on its design and accommodates more users, which is a desirable goal on itself, for the reasons you explained.

                                                                                                            1. 4

                                                                                                              color schemes determine whether color-blind people are able to quickly scan active vs inactive options and understand information hierarchy. Font sizes and contrast ratios can make the interface readable, difficult, or completely unusable for visually impaired people. The sizes of click targets, double-click timeouts, and drag thresholds

                                                                                                              Let me see if I understand what you’re saying. Are you claiming that when color schemes, font sizes and drag thresholds are chosen that that is a political decision? I think that many people would find that quite a remarkable claim.

                                                                                                              1. 3

                                                                                                                It’s impossible to not be political. You can be “the status quo is great and I don’t want to discuss it”, but that’s political. The open source “movement” started off political - with a strong point of view on how software economics should be changed. In particular, if you say a CoC that bans people from being abusive is unacceptable, you are making a political statement and a moral statement.

                                                                                                                1. 3

                                                                                                                  It’s impossible to not be political

                                                                                                                  Could I ask you to clarify in what sense you are using the word “political”?

                                                                                                                  Merriam-Webster (for example) suggests several different meanings that capture ranges of activity of quite different sizes. For example, I’m sure it’s possible to act in a way which does not impinge upon “the art or science of government” but perhaps every (public) action impinges upon “the total complex of relations between people living in society”.

                                                                                                                  In what sense did you use that term?

                                                                                                                  1. 4

                                                                                                                    Let’s start off with a note about honesty. FRIGN begins by telling us “We do not believe in equal status (i.e. e.g. forcibly obtaining a 50/50 gender ratio)” as if someone was proposing the use of force to produce a 50/50 gender ratio - and we all know that wasn’t proposed by anyone. There’s no way to discuss this properly if people are going to raise false issues like that. What comment’s like FRIGN’s indicate is an unwillingness to have an open and honest conversation. The same bogus rhetoric is at the heart of Damore’s memo: he claims to be in favor of equal rights and just against mythical demand for 50/50 gender equality so that he can oppose obviously ineffective affirmative action programs at Google where 80% of technical staff are male (Damore’s misappropriation of science is similarly based on an objection to a position that nobody ever argued.).

                                                                                                                    The next point is that some people are objecting that a CoC and a minority outreach program are “political”. That’s true, but it involves the use of the more general meaning of “political” which the Collins dictionary provides as “the complex or aggregate of relationships of people in society, esp those relationships involving authority or power”. If we are using that definition, of course a CoC and a minority outreach program are political, but opposition to a CoC and a minority outreach program fits the definition as well. If you have an opinion one way or another, your opinion is political. You can’t sensibly use this wide definition of political to label the effort to adopt a CoC and to recruit more minorities and then turn around and claim your opposition to those is somehow not political. So that’s what I mean by “it is impossible to not be political”. The question is a political question and those who try to claim the high ground of being objective, disinterested, non-political for their side of the question are not being straightforward (perhaps it’s just that they are not being straightforward with themselves).

                                                                                                                    1. 3

                                                                                                                      I agree that a CoC, a minority outreach program, and opposition to a CoC all impinge upon “the complex or aggregate of relationships of people in society, esp those relationships involving authority or power”.

                                                                                                                      Would you also agree that there is a popular ideological political movement in favour of CoCs (some combination of the feminist, civil rights and social justice movements)? Perhaps there is also a popular ideological movement against CoCs (some combination of MRAs and the alt right). Are you also claiming that if one claims a “neutral” stance on CoCs one is de facto supporting one of these ideologies?

                                                                                                                      1. 3

                                                                                                                        I’m not sure it is possible to have a neutral stance. In fact, I doubt it.

                                                                                                                        1. 1

                                                                                                                          Interesting! Do you also doubt it is possible to take any action that is neutral with regard to a political ideology?

                                                                                                                          1. 3

                                                                                                                            You are introducing something different. I don’t think you have to line up with one “side” or another, but you can’t avoid being a participant.

                                                                                                                            1. 1

                                                                                                                              You said “It’s impossible to not be political” so I’m trying to understand what you mean by that. So far I’m not clear whether you think every action is political. I’d appreciate it if you’d clarify your position.

                                                                                                                              1. 2

                                                                                                                                I’m making a very concrete assertion, which I sense does not fit into your schema. My assertion is that there is no neutrality on workplace equality and inclusion for anyone involved in the workplace. Anyone who, for example, participates in an open source development effort has a position on whether efforts should be made to make it more inclusive even if that position is “this is not important enough for me to express an opinion.”

                                                                                                                                1. 1

                                                                                                                                  Thank you for clarifying. When you originally said “It’s impossible to not be political” I got the wrong impression.

                                                                                                                                  Do you also hold the same point of view when it comes to roughly comparable statements in other spheres? For example ‘Anyone who eats has a position on vegetarianism even if that position is “this is not important enough for me to express an opinion.”’?

                                                                                                              2. 1

                                                                                                                You’ve been quoted by LWN: https://lwn.net/Articles/753709/

                                                                                                              3. 11

                                                                                                                AKA shut up and hack? :)

                                                                                                                1. 1

                                                                                                                  The suckless development process has no non-technical discussions?

                                                                                                                  How are the best developers identified?

                                                                                                                  1. 8

                                                                                                                    just curious, why would you need to identify the best developers? Wouldn’t the quality of their code speak for that?

                                                                                                                    1. 5

                                                                                                                      I also fail to see what the reasoning is. Just send your code, get the non technical discussions out.

                                                                                                                      1. -1

                                                                                                                        Apparently, quoting @FRIGN from above, “to make your software suck less.”

                                                                                                                      2. 8

                                                                                                                        How are the best developers identified?

                                                                                                                        I think this is a totally reasonable question, and one I’d like to see the answer too–if for no other reason than it might help those of us on other projects find more objective metrics to help track progress with.

                                                                                                                        Do you all at suckless use something like:

                                                                                                                        • defect rate
                                                                                                                        • lines of code/feature shipped
                                                                                                                        • execution time
                                                                                                                        • space in memory, space in storage

                                                                                                                        Like, what metrics do you use?

                                                                                                                        1. 7

                                                                                                                          You know, suckless is not a big company and the metrics that can be applied are more of a heuristic. A good developer is somebody who e.g. supplies a patch with a bug report, provides feedback to commits, makes contributions to the projects, thinks his commits through and doesn’t break stuff too often and does not personally identify with their code (i.e. is not butthurt when it’s not merged).

                                                                                                                          What needs to be stressed here is that the metric “lines of code” is completely off. There are horrible programmers who spit out lots of code and excellent ones who over time drop more lines than they add. Especially the latter group is very present among us and thus the LOC-metric will only give false results. Same with execution time, you find that when not enough time is spent on a problem you end up solving it wrong, in the worst case having to start all over.

                                                                                                                    2. 5

                                                                                                                      By being very diverse and doing fackelmärsche of course. https://suckless.org/conferences/2017/

                                                                                                                      1. 3

                                                                                                                        @FRIGN What’s the purpose of this “torchlight hike” in the context of producing code that sucks less? Don’t you see that the activities you choose to have during your conferences are a cultural stance, and because of that, can be perceived as exclusive by programmers that don’t recognize themselves in these activities?

                                                                                                                        1. 0

                                                                                                                          I get your point, but must honestly say that your argument sadly aligns with the ever-excluding and self-segregating destructful nature of cultural marxism. By eating food together at the conferences, do we exclude anorexics that might otherwise be willing to attend such a conference? I don’t drink any alcohol and never have. Still, it was not a problem when we went to a local Braukeller and some people drank alcohol and others like myself didn’t.

                                                                                                                          The fundamental point I think is that one can never fully and analytically claim that a certain process is completely unaffected by something else. If we dive down into these details we would then move on and say that the different choice of clothings, hairstyle, means of travel and means of accomodation all affect the coding process at suckless. This can be taken further and further with no limit, as we all know about the butterfly effect. At some point it is just not measurable any more.

                                                                                                                          If you ask me, this is a gross overstretching of what I said. There are quite a lot of people who do not attend the conferences but still work together with us on projects during that time. What really matters is that we e.g. do not ignore patches from these people or give them less relevance than those of others. To pick the example up: The torchlight hike did not affect any coding decision in a direct way, but it really bonded the team further together and was a very nice memory of this conference that I and the others are very fond of from what I’ve heard. On top of that, during the hike we were able to philosophize about some new projects of which some have become a reality. The net-gain of this event thus was positive.

                                                                                                                          In classical philosophy, there are two main trains of thought when it comes to evaluating actions: Deontology and Teleology. Deontology measures the action itself and its ethical value, completely ignoring the higher goal in the process. Teleology is the opposite, evaluating actions only by their means to reach a goal, completely ignoring the value of the action itself. The best approach obviously should be inbetween. However, there is a much more important lesson that can be taken from here: When evaluating a decision, one needs to realize what they are measuring and what is unimportant for a decision. What I meant is that to reach the goal of software perfection, the gender and other factors of the submitters do not matter. So even though we here at suckless have a goal, we are not teleologists, as we just ignore the factors that do not matter for coding.

                                                                                                                          It is an ethical question which norms you apply to a decision.

                                                                                                                          If we look at organizations like Outreachy, one might be mistaken to think that they are deontologists, striving to improve processes. However, after closer inspection it becomes clear that this is not the case and they are actually working towards a certain goal, increasing the number of trans and minority people in such communities. No matter how you think about this goal, it makes one thing clear: When you are working towards such a goal and also do not ignore irrelevant factors in your norms (and they in fact do by not ignoring e.g. race and gender), you quickly end up discriminating against people.

                                                                                                                          I hope this clears this up a bit, but as a short sentence, what can be taken from here is: When discussing ethical matters, it’s always important to make clear which norms are applied.

                                                                                                                          1. 2

                                                                                                                            fackelmärsche

                                                                                                                            I’m not going to wade into anything else on this, but I’d like to just take a second and let you know that, while you may not mean it in this way the phrase “cultural marxism” is very, very often used as a stand in for “jews”. Some links for the record:

                                                                                                                            https://www.splcenter.org/fighting-hate/intelligence-report/2003/cultural-marxism-catching

                                                                                                                            https://newrepublic.com/article/144317/trumps-racism-myth-cultural-marxism https://www.smh.com.au/world/cultural-marxism--the-ultimate-postfactual-dog-whistle-20171102-gzd7lq.html

                                                                                                                            1. 3

                                                                                                                              It’s not my fault that some idiots don’t understand this term or it’s critical analysis. Cultural marxism, as the term implies, is the classical theory of marxism applied to culture. It has nothing to do with jews directly, it’s just an idea. If you know any better term to describe it, please let me know.

                                                                                                                              Anyway, in the philosophical realms it’s known as ‘Critical Theory’, which originated in the Frankfurt School. However, nobody knows this term.

                                                                                                                              Unless a better term is found, I disregard your argument and won’t accept your attempt to limit language of perfectly acceptable words to describe an idea. At the end of the day, terminology must be found that adequately describes what a certain idea is, and I see no reason why this should be wrong.

                                                                                                                              Regarding the torch hike: Yes, marching with torches was abused by the NSDAP as a means of political rallying. However, at least in Germany, it is a much older and deeper-reaching tradition that dates back hundreds of years.

                                                                                                                              1. -1

                                                                                                                                You have amply demonstrated that you don’t know anything about the topic. You could start with the decent Wikipedia article. https://en.wikipedia.org/wiki/Frankfurt_School

                                                                                                                              2. 2

                                                                                                                                wow, uh, kind of a weird red flag that pointing this out is getting seriously downvoted. I picked these links pretty quickly, and anybody who comes behind and reads this and wonders how serious this is, do yourself a favor and image search and see how many memes have the star of david, greedy merchant, world strangling octopus or any of a number of openly anti-semitic imagery. Its not hidden, its not coy. If you’re tossing “cultural marxism” around you’re either willfully ignoring this or blatantly playing along. Its not a thing in the world. There are no leftists (at all) who call themselves “cultural marxists”, and in fact there is a sizeable faction of marxists who are openly disdainful of any marxism that eschews political struggle. The new republic article linked above goes into this, Perry Andersons “Considerations on Western Marxism”, a well known, well regarded text across a number of marxist subsects, is explicitly based on this. Anyway, enjoy contributing to a climate of increasing hostility toward jews. good stuff.

                                                                                                                                edit: have some fun with this https://www.google.com/search?q=cultural+marxism&client=firefox-b&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjz2tWrhvnaAhUJ7YMKHVgcCccQ_AUIDCgD&biw=1247&bih=510#imgrc=_

                                                                                                                                1. 1

                                                                                                                                  The term ‘Cultural Marxism’ describes very well what it is, and not all leftists are cultural marxists. The classical theory of marxism, roughly spoken, is to think of society as being split in two camps, the Proletariat and the Bourgeoisie, eternally involved in a struggle, where the former is discriminated against and oppresed by the latter.

                                                                                                                                  Cultural Marxism applies these ideas to society. In the Frankfurt School it was called ‘Critical Theory’, calling people out to question everything that was deemed a cultural norm. What is essentially lead to was to find oppressors and oppressed, and we reached the point where e.g. the patriarchy oppressed against women, white people against minorities, christians against muslims and other religions and so forth. You get the idea. Before you go again rallying about how I target jews or something please take a note that up to this point in this comment, I have just described what cultural marxism is and have not evaluated or criticized it in any way, because this here is the wrong platform for that.

                                                                                                                                  What you should keep in mind is that the nature of cultural marxism is to never be in a stable position. There will always be the hunt for the next oppressor and oppressed, which in the long run will destroy this entire movement from the inside. It was a friendly advice from my side to you not to endulge in this separatory logic, but of course I understand your reasoning to the fullest.

                                                                                                                                  Just as a side note: I did not see you getting ‘seriously’ downvoted. What do you mean?

                                                                                                                                  1. 2

                                                                                                                                    It’s uncommon to find such a well-put explanation; thanks for that.

                                                                                                                                    There will always be the hunt for the next oppressor and oppressed, which in the long run will destroy this entire movement from the inside.

                                                                                                                                    If the movement runs out of good targets (and falls apart because they can’t agree on new ones), wouldn’t that imply that it will self-destruct only after it succeeds in its goals? That doesn’t sound like a bad thing.

                                                                                                                                    1. 1

                                                                                                                                      I’m glad you liked my explanation. :)

                                                                                                                                      That is a very interesting idea, thanks for bringing this thought up! It’s a matter dependent on many different factors, I suppose. It might fall apart due to not being able to agree on new targets or when everybody has become a target, but it is a very theoretical question which one of these outcomes applies here.

                                                                                                                                    2. 1

                                                                                                                                      Generally people who use “cultural marxism” as a pejorative are sloganeering. The idea of an “eternal struggle” is completely foreign to any kind of marxism which is based on a theory that classes come out of the historical process and disappear due the historical process. Marxism claims that the proletariat and bourgeosie are temporary divisions that arise from a certain type of economic organization. Whatever one thinks of that idea, your characterization of Marxism is like describing baseball as a game involving pucks and ice. Your summary of “cultural marxism” is even worse. Maybe take a class or read a decent book.

                                                                                                                                      1. 0

                                                                                                                                        Did you actually read any of the links I posted? Specifically the New Republic and SPLC links? I don’t know how else to say this and you pretty much side stepped what I said the first time so I’ll try to reiterate it: There is no such thing as “Cultural Marxism”. At all. Its not a descriptive category that any marxist actually self applies or applies to other marxists. I’m fully aware of the Frankfurt School, Adorno, Horkheimer, etc. I’ve read some of them and many, many of their contemporaries from Germany, people like Karl Mannheim. I read marxist publications everyday, from here in the states and from Europe. I’m a member of an explicitly marxist political party here in the states. I can’t emphasize this enough, “cultural marxism” isn’t real and is roughly on par with “FEMA camps”, “HARRP rays” and shape shifting lizard jews, meaning; its a far far right wing paranoid fantasy used to wall off people from other people and an actual understanding of the material conditions of their world. I also didn’t say, specifically in fact pointing out that I wasn’t saying this, that you were “targeting jews”. That being said, if you use a phrase that has its origins in anti-semitic polemics, is used explicitly and over-whelmingly by anti-semites, than that is on you. (Did you take a look at the linked image search? Does that sort of thing not give you pause?) To say that you “just described what cultural marxism is” is also inaccurate, you absolutely used it in a descriptive way

                                                                                                                                        I get your point, but must honestly say that your argument sadly aligns with the ever-excluding and self->segregating destructful nature of cultural marxism.

                                                                                                                                        White supremacist organizing is experiencing an enormous upsurge, not only here in the states but in Europe as well. From Le Pen to AfD to SVO in Austria and on and on. These people are not interested in polite conversation and they’re not using “cultural marxism” as a category to illuminate political opponents, its meant to denigrate and isolate, ironically given thats exactly what Neo Nazis and white supremacists here in the states accuse left wingers and “SJWs” of doing.

                                                                                                                                        I appreciate that you’re discussing this peacefully but I’m going to bow out of this thread unless you’re interested enough to take some time and read the links

                                                                                                                                        FWIW these also dismantle the trope and point out pretty much exactly what I’m saying around anti-semitism: https://www.vice.com/en_us/article/78mnny/unwrapping-the-conspiracy-theory-that-drives-the-alt-right https://www.theguardian.com/commentisfree/2016/feb/22/chris-uhlmann-should-mind-his-language-on-cultural-marxism

                                                                                                                                        1. 2

                                                                                                                                          I took some more time to read it up and from what I could see, I found that indeed cultural marxism has become more of a political slogan rather than a normal theoretical term in the USA.

                                                                                                                                          Here in Germany the term “Kulturmarxismus” is much less politically charged from what I can see and thus I was surprised to get this response after I just had “translated” this term into English. It might be a lesson to first get some background on how this might be perceived internationally, however, it is a gigantic task for every term that might come around to you.

                                                                                                                                          So to reiterate my question, what term could be better used instead? :)

                                                                                                                                          1. 1

                                                                                                                                            interesting that it has a different grounding/connotation in Germany, but then again I’m not surprised since thats where its supposed to have originated from. I’ll reread your other posts and come up with a response thats fair. Thanks for taking the time to read those links.

                                                                                                                          2. 17

                                                                                                                            I’m not going to remove this because you’re making a public statement for suckless, but please don’t characterize positions you disagree with as madness. That kind of hyperbole generally just leads to unproductive fights.

                                                                                                                            1. 9

                                                                                                                              Please don’t remove anything unless it’s particularly vulgar…

                                                                                                                              1. [Comment removed by author]

                                                                                                                                1. 3

                                                                                                                                  hey that’s my account you’re talking about!

                                                                                                                              2. -1

                                                                                                                                Removing differing viewpoints? It is precisely this kind of behavior that maddens people who complain about SJW, who (the SJW) seem unable to take any discussion beyond calling their opponent’s position “evil”, “alt-right”, “neo-nazi”, or, if they are exceptionally well-spoken, “mad”.

                                                                                                                                1. 14

                                                                                                                                  No, removing abuse and hyperbole that acts as flamebait regardless of the political opinions expressed. So far I’ve removed one post and hope not to remove more.

                                                                                                                                  1. 2

                                                                                                                                    It’s hard for me to see a reason to remove things when we have the voting system in place, neither are perfect but one is at your sole discretion whereas the other is the aggregate opinion of the users.

                                                                                                                                    1. 21

                                                                                                                                      Voting isn’t a replacement of moderation. It helps highlight and reward good comments and it can punish bad comments, but it’s not sufficient for running a community. I’m trying to head off places where people give up on argument and just try to hurt or tar the people they disagree with because it doesn’t lead to a good community. Lobsters is a very good place for discussing computing and I haven’t seen that in communities this size with hands-off moderation (but I’d love counter-examples to learn from!) From a quick query, we’ve had comments from 727 unique users in the last 30 days and there’s around 15k unique IPs in the logs per weekday, so people are constantly interacting with the others who don’t know their background, don’t share history, can’t recognize in-jokes, simply don’t have reason to trust when messages are ambiguous, let alone provocative. Friendly teasing like “ah yeah, you would think that” or “lol php sucks” that’s rewarding bonding in a small, familiar group hurts in a big one because even if the recipient gets the joke and laughs along or brushes it off as harmless, it’s read by thousands of people who don’t or can’t.

                                                                                                                                      1. 2

                                                                                                                                        Lobsters is a very good place for discussing computing and I haven’t seen that in communities this size with hands-off moderation

                                                                                                                                        I support your position on sub-topic but even my Trial you linked to shows a bit otherwise on just this point. This site has more flexible, hands-off moderation than many I’ve seen with this much political dispute. Even in that link, we saw an amount of honest, civility, and compromise I don’t usually see. There’s been quite a bit better results in this thread than usual elsewhere. There seems to be enough community closeness despite our size that people are recognizing each others positions a bit. Instead of comments, you can actually see it by what’s not said more since it’s prior ground we’ve covered. The others are learning as discussion furthers. Then, there’s the stuff we don’t want which seems to be basically what those individuals are intending in a way that has nothing to do with site’s size.

                                                                                                                                        So, I support you getting rid of just pure abuse, trolling, sockpuppeting, etc. I don’t think we’ve hit the full weaknesses and limited vision of large sites yet despite our increase in comments and views. We’re still doing a lot better than average. We’re still doing it with minimal intervention on things like politics relative to what I’ve seen elsewhere. I think we can keep at current moderation strategy for now because of that. For now.

                                                                                                                                        Just wanted to say that in the middle of all this.

                                                                                                                                        1. 0

                                                                                                                                          Voting isn’t a replacement of moderation. It helps highlight and reward good comments and it can punish bad comments, but it’s not sufficient for running a community.

                                                                                                                                          I’m not sure if I see why it’s not a good replacement. To me, I see voting as distributed moderation and the “real” moderation is automatically hiding (not removing) comments when they fall below a threshold.

                                                                                                                                          I’m trying to head off places where people give up on argument and just try to hurt or tar the people they disagree with because it doesn’t lead to a good community.

                                                                                                                                          I think this method relies on an accurate crystal ball where you can foresee people’s actions and to an extent, the reactions of the people reading the comments.

                                                                                                                                          I’d have to question what you mean by “a good community”, it seems like it’s just a place where everyone agrees with what you agree with and those that disagree aren’t heard because it risks offending those that do agree.

                                                                                                                                          I think the best discussions on here are because we have many people with wide and varied opinions and backgrounds. The good comes from understanding what someone else is saying, not excluding them from the discussion. The only places I see that warranted is where someone has said something purposely and undeniably vile.

                                                                                                                                          1. 8

                                                                                                                                            The automatic hiding of low-scoring comments is also a “sole discretion” thing; jcs added it and I tweaked it a few months ago. The codebase enforces a lot of one moderator’s ideas of what’s good for a community in a hands-off way and the desire to do that motivated its creation.

                                                                                                                                            I strongly agree that a community where everyone agrees with the moderator would be bad one, even if I am that moderator. It’s tremendously rewarding to understand why other people see things differently, if for no other reason than the selfish reason that one can’t correct learn or correct mistakes if one never sees things one doesn’t already agree with.

                                                                                                                                            I think the crystal ball for foreseeing problems is experience, from many years of reading and participating in communities as they thrive or fail. I think it’s possible to recognize and intervene earlier than the really vile stuff because I’ve seen it work and I’ve seen its absence fail. I keep asking for examples of excellent large communities without active moderators because I haven’t seen those, and after a couple decades and a few hundred communities I see the anthropic principle at work: they don’t exist because they self-destruct, sink into constant vileness, or add moderation. At best they have maintain with signal-to-noise ratios far below that of Lobsters where the thoughtful commentary is crowded out by trolling, running jokes, ignorance, and plan low-quality comments because it doesn’t seem worth anyone’s while to care when posting.

                                                                                                                                            But moderation is not a panacea in and of itself. Without good experience, judgment, and temper a bad moderator swiftly destroys a community, and this is a very common way communities fail. If it helps any, the author of the comment I removed agrees that it wasn’t done to suppress their opinion.

                                                                                                                                            1. 1

                                                                                                                                              The benefit I see from moderation being part of the codebase is that it’s public, predictable and repeatable (it terms of reliability). When you take moderation decisions into your own discretion many of these virtues are lost.

                                                                                                                                              As for experience, I think that’s tricky because it can easily lead you to making the same mistake twice. It’s also made of your personal experiences and you’re using that to curate the discussion of other people, I would caution that it’s another method of controlling dialog (perhaps subconsciously) to what you find acceptable, not necessarily what’s best for everyone.

                                                                                                                                              1. 3

                                                                                                                                                The benefit I see from moderation being part of the codebase is that it’s public, predictable and repeatable (it terms of reliability). When you take moderation decisions into your own discretion many of these virtues are lost.

                                                                                                                                                Most of them go into the Moderation Log. I’ve been watching it since the jcs days since it’s what folks are supposed to do in a transparent, accountable system. Gotta put effort in. I haven’t seen much of anything that bothered me. The bans and deletes I’ve been able to follow @pushcx doing were trolling, alleged sockpuppeting, and vicious flamewaring. Some I couldn’t see where I’d rather the resource go off the front page rather getting deleted so someone looking at logs could see it for whatever it was. Nonetheless, his actions in the thread about me, the general admining, and what I’ve seen in moderation have been mostly good. A few really good like highlighting the best examples of good character on the site. I think he’s the only one I’ve seen do that on a forum in a while.

                                                                                                                                                You have little to worry about with him in my opinion at the moment. Do keep an eye on the comments and log if you’re concerned. Scrape them into version storage if concerned about deletions. What goes on here is pretty public. Relax or worry as much as you want. I’m more relaxed than worried. :)

                                                                                                                                                1. 3

                                                                                                                                                  Yeah, I agree on the pitfalls of experience. As SeanTAllen noted in a separate branch of this thread a minute ago, there’s “but you didn’t say” and other wiggle room; I think that’s where automatic moderation falls down and human judgment is required. Voting has its own downsides like fads, groupthink, using them to disagree (which is all over this thread), in-jokes, a drifting definition of topicality, all the parallels to the behaviors of political rhetoric, etc. Lobsters has never been voting only and I don’t see a compelling reason to change that. jcs’s involvement in the site was steadily declining so I’m certainly more actively moderating, but I don’t see that as a change in character. I guess what it comes down to is that I agree with you about what successful communities do and don’t look like, but I haven’t seen one that works on the model you’ve outlined and I don’t see that kind of fundamental change as a risk worth taking.

                                                                                                                                      2. 1

                                                                                                                                        So FRIGN writes to oppose “SWJ madness”, and you chime in to complain that “SWJ” calls opponents “mad”. Are you calling FRIGN “SWJ” or what? It’s kind of hard to discern your point in that cloud of grievance.

                                                                                                                                        1. 1

                                                                                                                                          “SJW” for “social justice warrior.”

                                                                                                                                          @COCK is sarcastically non-replying because you typo’ed.

                                                                                                                                          1. 2

                                                                                                                                            Not exactly, I was sarcastically non-replying because I assumed he was intentionally misunderstanding me. I assumed this because I didn’t see any ambiguity in my answer. On later inspection I noticed the ambiguity so I gave an actual reply:

                                                                                                                                            https://lobste.rs/s/nf3xgg/i_am_leaving_llvm#c_yzwuux

                                                                                                                                            1. 1

                                                                                                                                              The interesting thing is how people agreeing with Mr. cock pile on the insults against the people who they complain are insulting them by forcing them to sign on to codes of conduct which prohibit insults. It’s almost as if there was a good reason for those codes.

                                                                                                                                              1. 1

                                                                                                                                                I doubt the irony is lost on anyone supporting a CoC.

                                                                                                                                            2. -1

                                                                                                                                              Yes, I’m calling FRIGN a “SWJ”.

                                                                                                                                              1. -1

                                                                                                                                                Yes, well, one sympathizes with your plight.

                                                                                                                                                1. 2

                                                                                                                                                  Ah now I see the ambiguity: “people who complain about SJW, who…” the “who” referred to the “SJW”, not the “people”

                                                                                                                                            3. 1

                                                                                                                                              The only comment that was removed was against FRIGN point of view. Nobody is removing differing point of view, just enforcing civil discussion.

                                                                                                                                          2. [Comment removed by author]

                                                                                                                                            1. 4

                                                                                                                                              “We at suckless are heavily opposed to code of conducts and discriminatory organizations of any shape or form.”

                                                                                                                                            2. 4

                                                                                                                                              It’s responses like yours that really make the case for codes of conduct.

                                                                                                                                              1. 2

                                                                                                                                                Are you speaking for the group or is that your own opinion? Knowing that the group aligns itself with that position would certainly make me not interested in working with it or contributing.

                                                                                                                                                1. 6

                                                                                                                                                  To be fair, suckless is not well-organised enough to be a group that can have a single opinion to be spoken for.

                                                                                                                                                  That said, FRIGN is a prominent contributor and I from what I’ve seen most contributors are heavily on the side of “the code will speak for itself”.

                                                                                                                                              1. 8

                                                                                                                                                It’s not really fair to blame the original authors basic ignorance of processor architecture and language design on him being an “academic”. Hennessy and Patterson are academics. They wrote an undergrad academic text that the author apparently never read.

                                                                                                                                                1. 11

                                                                                                                                                  overreaching Code of Conducts.

                                                                                                                                                  The author realizes that you don’t have to follow the code of conduct to use the software? Also 80% of the items on the freebsd code of conduct are illegal. the four that stick out to me that aren’t are these.

                                                                                                                                                  Comments that reinforce systemic oppression related to gender, gender identity and expression, sexual orientation, disability, mental illness, neurodiversity, physical appearance, body size, age, race, or religion.

                                                                                                                                                  Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment.

                                                                                                                                                  Deliberate misgendering.

                                                                                                                                                  Deliberate use of “dead” or rejected names.

                                                                                                                                                  Author basically feels that if the developers can’t get intimately involved with another developer’s personal life without consent then the author does not want to use the software. Frankly it seems like you could just create a code of conduct with the line “Thinking code of conducts are bad” and you’d filter out everyone who apparently wants to get in your grill.

                                                                                                                                                  The other rules are okayish but would rule out basically everything if applied strictly.

                                                                                                                                                  1. 11

                                                                                                                                                    Also 80% of the items on the freebsd code of conduct are illegal.

                                                                                                                                                    Code’s of conduct don’t have anything to do with law, though. An organization can block your participation in it for any reason they see fit. There are restrictions for businesses and employers, but they don’t apply to open source projects.

                                                                                                                                                    1. 17

                                                                                                                                                      Right and if you don’t agree with those reasons you don’t have to contribute or you can create your own organization. I was saying 80% of them are illegal to do as an individual. Sexual harassment? Stalking? Threatening? A lot of the CoC is basically just “We won’t enable your criminal behavior and allow you to use the organization as a way to find targets”. The 4 here are basically, “Don’t purposely be an asshole to other members, here are four ways of being an asshole that are explicitly not allowed.”. If you think Open Source means “I get to be a dick to other people and get away with it because it’s not a job” then you’re honestly doing more harm than good and should do something else with your life.

                                                                                                                                                      1. 6

                                                                                                                                                        Oh sorry, I misunderstood what you mean by illegal. I thought you were saying much of the CoC was illegal.

                                                                                                                                                        1. 14

                                                                                                                                                          The 4 here are basically, “Don’t purposely be an asshole to other members, here are four ways of being an asshole that are explicitly not allowed.”.

                                                                                                                                                          That kind of playing with definitions is one of reasons I fight broad Codes of Conduct. It’s not how they play out. Instead, those promoting or enforcing will be specific groups of people having specific, political views on everything from words to identity to societal structures, expecting the entire world to comply with those views, and punishing anyone in their immediate setting who doesn’t using whatever methods are available. Those methods range from shaming to exclusion to removing their ability to pay bills.

                                                                                                                                                          To me, that sounds like being assholes that shove their politics down others’ throats telling them to get lost if they don’t like it. Even more so when I see plenty of people be civil without going that far in mischaracterizing or banning other groups’ means of expressing themselves. Then, a person supporting such politics shows up saying it’s just about not being an asshole. People reading that get a different impression than “no political disagreement or differences are allowed in this list of categories whose reach increases whenever we say.” I don’t expect more honesty from most promoters about the goals since subterfuge and “end justifies the means” is the norm in that group.

                                                                                                                                                          1. 12

                                                                                                                                                            What about it shoves politics? I would think all the points I mentioned are basically apolitical. There’s no rule against “political disagreement” within the CoC. You can be super hard line conservative and still follow these rules. I’m specifically talking about the FreeBSD CoC.

                                                                                                                                                            1. 7

                                                                                                                                                              It’s not really based on “politics”, but on basic respect. If you’re a conservative who is respectful of people’s preferred names and doesn’t shit all over people because of their lifestyles, you won’t have a problem. If you’re a liberal or Leftist who is super racist, anti-Semitic (hello, tankies) or constantly judges poor people overly harshly (of which there are many), you will have one.

                                                                                                                                                              That said, if you feel that trans people asserting that we should be called by the names we choose for ourselves is somehow a political act, then yes, the purpose of the CoC is to “shove politics down your throat”.

                                                                                                                                                              1. 1

                                                                                                                                                                if you feel that trans people asserting that we should be called by the names we choose for ourselves is somehow a political act

                                                                                                                                                                Isn’t it? I have no problem with calling you as you like, really.

                                                                                                                                                                And I’d like it would be the common ground of our international culture.

                                                                                                                                                                But it is Politics. I’d argue that it’s the best expression of politics at all, as it establish a kind environment where we can confront on.

                                                                                                                                                                On the other hand, “keep the discourse on topic or you will be banned” should be a pretty good CoC, everywhere.

                                                                                                                                                                Now, if we can go off-topic, and you tell on a public space (say IRC or a mailing list) you do something I consider bad, you are engadging a discourse. You can’t say “I like eating people, cannibalism improve my health” and than invoke the CoC if anyone object.

                                                                                                                                                                People should understanding that speaking in public implies a will to listen.
                                                                                                                                                                More exactly, speaking implies a will to challenge own opinions, putting them at stake in the conversation.

                                                                                                                                                                If you don’t want to listen any objection, if you don’t want to change your mind, why speak in the first place?
                                                                                                                                                                Are you doing propaganda? Marketing? If so, you are the problem, not who engage with you.

                                                                                                                                                                Also, if we can go off-topic, and you tell you like to hurt your children, I’ll comment on that, whatever the CoC. After the denounce obviously, with all the reference I can get to find you (including your email, ip, os, whatever I can get through my technical knowledge and tools).

                                                                                                                                                                So in general, the CoC is a political tool. It could be used for good or evil.

                                                                                                                                                                But it doesn’t fix the lack of a democratic culture of dialoge in a community.

                                                                                                                                                              2. 1

                                                                                                                                                                Without a CoC you are at the mercy of the hidden political views of the project owners. Their decisions to ban start looking arbitrary. Either way, you deal with political views. Wouldn’t you prefer to know what they are before engaging? Worst would be spending a lot of your time on a project only to find out you get banned because you said something that was in disagreement with the owners of the project.

                                                                                                                                                          2. 14

                                                                                                                                                            They are too broad (e.g. large swaths of the population would violate it by with their daily interactions), which puts selective enforcement at charge. If its selective enforcement, then its just an power instrument with the rule makers at the power end, even if the contents of the CoC are all well-meaned and good in their intentions.

                                                                                                                                                            Its not directly about the contents of the CoC, its about taking peoples moral autonomy.

                                                                                                                                                            1. 12

                                                                                                                                                              I think it’s reasonable to treat open source work within an organization with the same level of respect and dignity that you would expect from a job. You could get fired at a job for nearly every one of these. Using dead names even, if an employee asks you to stop and you don’t and they file a complaint against HR, HR might decide that you’re creating a hostile work environment for basically no reason. Most people don’t get fired for misconduct, so I’m going to actually say that you can’t possibly be right about that claim.

                                                                                                                                                              Keep in mind that the responses are

                                                                                                                                                              A private reprimand from the working group to the individual(s) involved.

                                                                                                                                                              A public reprimand.

                                                                                                                                                              An imposed vacation from FreeBSD Project controlled spaces (e.g. asking someone to “take a week off” from a mailing list or IRC).

                                                                                                                                                              A permanent or temporary ban from some or all FreeBSD Project controlled spaces (events, meetings, mailing lists, IRC, etc.)

                                                                                                                                                              A request for a public or private apology.

                                                                                                                                                              A request to engage in mediation and/or an accountability plan.

                                                                                                                                                              These aren’t that extreme. Sure you can be banned but that can happen in any OSS project where they can say “We won’t accept pull requests from dirt bags like you.”. In this case the things you can do wrong are at least actually laid out so that you know what behaviors to avoid and which ones to follow.

                                                                                                                                                              1. 16

                                                                                                                                                                Still, the CoC assumes moral authority over me, which is an no-go for freedom lovers and hackers like me. That people like you don’t exercise their own moral autonomy and fail to understand that others do (with different results) is the reason why CoC create unnecessary controversy and drama.

                                                                                                                                                                And yes, the FreeBSD CoC makes me feel violated in my moral autonomy, and yes, the FreeBSD CoC embodies political views i do not share.

                                                                                                                                                                1. 9

                                                                                                                                                                  A CoC has no moral authority and frankly morality isn’t even a real thing. It’s merely a set of rules that people who work together have agreed to follow while working together. You don’t have to work with them and you don’t have to use their software, but since you wanted to be on record disagreeing, I wanted to be on record agreeing with CoC and why I feel the way I do.

                                                                                                                                                                  1. 4

                                                                                                                                                                    Again, this is a strong pro-CoC statement. If they are successful in excluding people like you, they are working as intended.

                                                                                                                                                                    1. 10

                                                                                                                                                                      I was hoping to keep things civil. Perhaps there’s a more generous way you could phrase this?

                                                                                                                                                                      1. 5

                                                                                                                                                                        Not really, given that the author has emphatically stated their disagreement with either the values motivating the rules, or the rules themselves. Regardless, such a person is a real risk to the health of the community, and it’s nice that there’s such an effective repellent.

                                                                                                                                                                        1. 18

                                                                                                                                                                          I’m honest about not being a feminist. I consider the concept of gender harmful (from an philosophical standpoint), but people like you seem seem convinced that not sharing your point on that makes me an bad person.

                                                                                                                                                                          But thanks for determining i’m a hazard to community, it surely helped me to recognize the superiority of your standpoint.

                                                                                                                                                                          1. 7

                                                                                                                                                                            By “considering the concept of gender harmful” you are willfully ignorant to the way that society works and by effect you are a part of the problem creating inequality and fostering an environment where harassment and hate crimes can thrive.

                                                                                                                                                                            You don’t get to invent your own reality and pretend this one doesn’t exist.

                                                                                                                                                                            1. 16

                                                                                                                                                                              Yeah also you can consider gender harmful without refusing to respect how other people would like to be referred to. For example I will now out of respect for your disdain for the concept of gender refer to you strictly in non-gendered nouns. Notice how I disagreed with your viewpoint but didn’t invalidate your identity.

                                                                                                                                                                            2. 1

                                                                                                                                                                              I don’t care about your honesty. I don’t care to have you recognize the superiority of my viewpoint; I know nothing I can say will sway you. I care to prevent you from contaminating the spaces I care about.

                                                                                                                                                                              1. 22

                                                                                                                                                                                You’ve and @liwakura have both explained well how you differ fundamentally, and I appreciate that. This comment is pulling that discussion into a dark place, please don’t continue on this theme casting someone as an unredeemable danger who must be eradicated. Lobsters is not good at being “Tinder, but for finding a nemesis”.

                                                                                                                                                                              2. 2

                                                                                                                                                                                You don’t fight the concept of gender by standing on the sidelines watching those that do have the concept of gender dominate half the population. Just because you believe there isn’t gender, doesn’t mean people who consider themselves women aren’t getting the short end of the stick in our society.

                                                                                                                                                                              3. 3

                                                                                                                                                                                thanks, that’s much clearer. :)

                                                                                                                                                                        2. 6

                                                                                                                                                                          You could get fired at a job for nearly every one of these.

                                                                                                                                                                          Depends on the job. Many employers won’t punish people who have political differences. Especially in Mid-South where we’re quite a diverse bunch of liberals, conservatives, white, black, latino, etc. The rule is that we either avoid those topics entirely to keep things civil or you better be able to take the kind of discussion you were dishing out. Essentially, we recognize those claiming disagreement is “offensive” to just be silencing their opposition. They’re trying to attack and control the other person. People still try that but don’t get far.

                                                                                                                                                                          So, in such a truly, inclusive environment, people will be saying things that bother others since there’s conflict on a deep level. My relatives and I have worked in many such places. They’ll have heated arguments sometimes. It almost always ends up “agree to disagree” with them making up for it being nice to each other later. Sometimes people figure out who each other are underneath, permanently dislike each other, work together just enough to get the job done, and avoid one another otherwise.

                                                                                                                                                                          People almost never quit over this sort of thing. It’s also not what most gripe about. Those griping or quitting over assholes bring up people who folks in every group agree are assholes. We wouldn’t need a CoC to deal with them. Just decent managers or owners that respond to employee complaints. If managers or owners aren’t decent, then no policies or CoC’s are going to make the work environment better.

                                                                                                                                                                          1. 13

                                                                                                                                                                            I really don’t understand how you got this from the CoC mentioned. There is no rule in the CoC that you must conform politically. I would be very shocked to hear that the entire FreeBSD team is not conservative. The rule is merely that you treat other people with dignity. I live in the south and every single one of my workplaces would fit this CoC save for maybe the rules around transgendered folks. Frankly even when I was a deeply religious and hardline conservative I would have no trouble following these rules. I never treated anyone less than human because they had different views than me. Furthermore that “rule” you gave is a kind of CoC and CoC’s matter once the size of the organization grows. Its very easy to fall into a tyranny of structurelessness as an organization gets larger. This is because nobody can agree on what is right or wrong or what the response should be to a problem. By having a CoC you can agree as an org what actions are against the group and what a good response looks like. If you don’t have any response strategy mob mentality kicks in and things can escalate to threats and violence. After all if someone is a huge asshole and nobody is doing anything about it it would seem natural to find a way to make them stop.

                                                                                                                                                                            Frankly there’s nothing in this CoC that has any bias against conservatives whatsoever. Nothing in the CoC says you have to be a liberal, and it specifically protects people from false claims. Your micro-CoC actually fails to protect individuals from false claims.

                                                                                                                                                                            Publication of non-harassing private communication without consent.

                                                                                                                                                                            Publication of non-harassing private communication with consent but in a way that intentionally misrepresents the communication (e.g., removes context that changes the meaning).

                                                                                                                                                                            Knowingly making harmful false claims about a person.

                                                                                                                                                                            1. 11

                                                                                                                                                                              Depends on the job. Many employers won’t punish people who have political differences.

                                                                                                                                                                              This is such a disingenuous frame shift of the issue that it invalidates everything else about your argument. Being respectful is not political. Enforcing consent in interactions is not political. Being gay or tolerant of same is not political. Asserting that any effort to shift culture away from the status quo is an out-of-bounds “political” act is a cowardly way to attempt to silence those that you disagree with. You are personally guilty, to an incredibly advanced degree, of every evil thing you claim to be against.

                                                                                                                                                                              “Politics” is the process by which humans come to consensus for shared interests. Shitting on the less powerful and providing moral or intellectual cover for those that seek to do the same is not politics; it’s craven thuggery disguised as keeping things peaceful.

                                                                                                                                                                              1. 0

                                                                                                                                                                                Politics is whatever action affects the polis, and by extension any group of humans.

                                                                                                                                                                                Thus being respectful is political.
                                                                                                                                                                                Enforcing consent in interactions is political.
                                                                                                                                                                                Being tolerant of anything is political.

                                                                                                                                                                                In Italy we have the same kind of differences that @nickpsecurity describes, and we are used to joke about our differences a lot. And we debate harshly about many things, but usually these debates grow our relations.

                                                                                                                                                                                As an example, I had a girlfriend that was a deeply religious Catholic when I was atheist (and rather angry at Church). And we talked a lot about religion and politics back then, without that affecting negatively the relation.

                                                                                                                                                                                One of the best engineer I worked with voted for the worst political party we had in Italy for decades. I had the opposite view. We debated a lot. We debated so much about politics that when we had to design a framework together to under a huge pressure, we keep debating with the same style. And after 10 years in production, the framework still rocks the customers are satisfied and we can’t find anything remotely on par with it around.
                                                                                                                                                                                Why? Because we were used to listen deeply and respectfully the other’s opinion.

                                                                                                                                                                                1. 2

                                                                                                                                                                                  I grant that being tolerant is political, and so it follows that everything is political. Which means that my point is still relevant: it’s disingenuous to dismiss concerns about behavior as “political”, as though that made it irrelevant.

                                                                                                                                                                                  In Italy, you are allowed to have those debates because the stakes are much lower: you’re less likely to die from poverty, your livelihood is less contingent upon social approval, etc.

                                                                                                                                                                                  In the United States, it’s not like that. If you lose your job, you could die. If you are systematically excluded from high-paying industries, like digital technology, your quality of life massively suffers in comparison to those who are welcomed by that industry. All policies must be considered in the context of an entrenched and reactionary old guard that dominates all other effects. Any overt attempt to improve the lives of the marginalized is treated as a threat to the old order, and rightfully so. The stakes are literally life and death.

                                                                                                                                                                                  Mr. P. Security doesn’t work in the the industry, and largely speaks from a position of willful ignorance about these issues.

                                                                                                                                                                                  1. 0

                                                                                                                                                                                    In Italy, you are allowed to have those debates because the stakes are much lower

                                                                                                                                                                                    I do not know United States enough for a comparison, but sadly we have poverty here too. Our livelihood is not based on social approval, but it’s often strongly based on social relationships.

                                                                                                                                                                                    We just know we are all on the same boat.

                                                                                                                                                                                    So I don’t know if we are free to talk because we have lower stakes, or we have lower stakes because we are free to talk.

                                                                                                                                                                                    In any case, an international project should not be ruled according to the issues of a single country.

                                                                                                                                                                                    1. 1

                                                                                                                                                                                      In any case, an international project should not be ruled according to the issues of a single country.

                                                                                                                                                                                      I don’t understand what this is in reference to, or what it could possibly mean in terms of what kind of governance structure or details. I was pointing out that there are cultural differences that make it easier or harder for people who are forced together to have disagreements about their values, or be able to set aside those differences in order to do something together.

                                                                                                                                                                              2. 10

                                                                                                                                                                                The CoC is about civility, not politics. And I can’t believe you don’t know that. So what is your purpose? Are you standing up for the right to humiliate people or be rude to them? That’s a principle for you?

                                                                                                                                                                                1. 0

                                                                                                                                                                                  Just decent managers or owners that respond to employee complaints…

                                                                                                                                                                                  Poor employees, at the mercy of their benevolent dictators.

                                                                                                                                                                              3. 3

                                                                                                                                                                                Wait, you believe without a CoC, owners of a project have less power? An owner of a project already has views of what kind of behavior they think is good and what they think is bad. If they don’t write it down in CoC, you are still at their mercy, but now you have to guess what the hell they are thinking.

                                                                                                                                                                                I’m not sure how a CoC increases any power they already have. You still don’t have moral agency because we live in a society where there are owners and non-owners. There is still a power differential. If you want democratic rule, then you need to fight against ownership by paper.

                                                                                                                                                                                1. 2

                                                                                                                                                                                  Even without a CoC the project owners selectively enforce hidden rules. I’m not sure how making the rules hidden is better than making them explicit.

                                                                                                                                                                              1. 1

                                                                                                                                                                                If failure to build indicates a GPL violation …

                                                                                                                                                                                1. 4

                                                                                                                                                                                  It very much does. And with GPLv3, so does failure to install

                                                                                                                                                                                  1. 1

                                                                                                                                                                                    I apologize for my bad joke.

                                                                                                                                                                                1. 7

                                                                                                                                                                                  This article cites as a fact that Facebook suppressed conservative news sources without bothering to even go to the trouble of reading Snopes. https://www.snopes.com/fact-check/is-facebook-censoring-conservative-news/

                                                                                                                                                                                  1. 11

                                                                                                                                                                                    The handling of the Damore memo and related science should tell us everything we need to know about to what degree we can trust both data and the people who criticize it.

                                                                                                                                                                                    The problem with claiming “mathwashing” is that it’s dangerously close to creating a culture that ignores studies if they don’t feel right. This is not scientific governance.

                                                                                                                                                                                    1. 6

                                                                                                                                                                                      You mean the method of citing a number of irrelevant and/or dubious scientific studies in a ideological rant based on logical fallacies and then claiming these cites bolster the credibility of the rant and indicate that anyone who objects is anti-science? Yep!

                                                                                                                                                                                      1. 0

                                                                                                                                                                                        The handling of Galileo’s studies should tell us everything we need to know about how science always triumphs over obtuseness.

                                                                                                                                                                                        Now, do you know what’s funny?

                                                                                                                                                                                        We call “scientific researchers” incompetent people arguing that neural networks’ models are too deep for humans to understand.
                                                                                                                                                                                        I mean these people not only rationalize their failures, they sell them as features!

                                                                                                                                                                                        This is not scientific governance.

                                                                                                                                                                                        1. 7

                                                                                                                                                                                          Galileo’s heliocentric theories had reasonable scientific counterobjections based on the observational evidence available at the time, and other contemporary figures (such as Copernicus and Kepler) with heliocentric models of the universe had no particular trouble with the authorities. Galileo’s persecution by the Church was mostly about political and personal conflict between him and the pope, which has been ahistorically re-contextualized as a story about the Catholic church (or Religion in general) persecuting inconvenient scientific truths, by certain modern scientists generally studying different things than Galileo did and offending different authorities than the Catholic church.

                                                                                                                                                                                          1. 1

                                                                                                                                                                                            I don’t understand what you’re saying here, could you please rephrase it?

                                                                                                                                                                                            1. 4

                                                                                                                                                                                              Let’s try (but I’m not sure what is not clear… my English simply sucks, sorry…)

                                                                                                                                                                                              I understand the concerns of @friendlysock, but the fact that we now teach an heliocentric model in the elementary schools show that good science always wins against censorship.
                                                                                                                                                                                              We won’t ignore disturbing studies that “don’t feel right”.
                                                                                                                                                                                              On the contrary, we will verify them carefully, as we should do with anything that is qualified as “Science”. (and we should not qualify as “Science” any unverified claim: it’s just an hypothesis until several independent experiments confirm it!)

                                                                                                                                                                                              However, today in IT there is another issue that is much more dangerous.
                                                                                                                                                                                              Several powerful companies are lobbying to spread the myth of machine intelligence. Not just to collect money or data, but to delegate to machines the responsibility of their errors.

                                                                                                                                                                                              Now, if you tell me that a software you wrote cannot be debugged, I think that you are not competent to develop any software at all. But if you boldly state that your software is not broken, but too smart for me (and even you) to understand its internal working, I would remove you from any responsibility role in IT.

                                                                                                                                                                                              For some strange reason, this is not what happens in AI.

                                                                                                                                                                                              Developers happily admit that they cannot explain their own neural network’s computation.
                                                                                                                                                                                              But they rationalize such failure as if it was not their fault, but it’s the neural network that is “too smart” (they usually mumble that it takes into account too many variables, it finds unintuitive correlations and so on).
                                                                                                                                                                                              So they are not just incompetent developers: they are rationalizing their failures.

                                                                                                                                                                                              And they sell such opacity as if it’s an inherent aspect of neural networks, but an advantage!

                                                                                                                                                                                              They do not say “this software is shitty mess”, they say “this software is too smart for humans!”.

                                                                                                                                                                                              Is this a scientific approach?

                                                                                                                                                                                        1. 19

                                                                                                                                                                                          I’m sad after reading these comments.

                                                                                                                                                                                          I understand and respect his decision, and these comments themselves are the very evidence why he is right. How about having OpenSource simply about openness and source? Why do politics and ideologies have to always appear?

                                                                                                                                                                                          Maybe a new manifesto is needed, much like the Agile manifesto:

                                                                                                                                                                                          • Individuals and interactions over group identities and categories of people
                                                                                                                                                                                          • Working software over ideologies and codes of conduct
                                                                                                                                                                                          • Respecting each other regardless anything
                                                                                                                                                                                          1. 21

                                                                                                                                                                                            Why do politics and ideologies have to always appear?

                                                                                                                                                                                            Ideologies are always there. You only notice them when they’re different from your own.

                                                                                                                                                                                            1. 20

                                                                                                                                                                                              Perhaps the point is that some people would like a safe space for focusing on technical matters rather than every single open source and free software community getting politically co-opted into a culture war.

                                                                                                                                                                                              Wanting a community focused on technical work and otherwise treating people equitably isn’t “apolitical”, you’re right, but that doesn’t make it invalid.

                                                                                                                                                                                              I choose to focus on helping people who came from a similarly disadvantaged background as myself but that’s something I do on my own time and money. I don’t impose it on the software communities I participate in.

                                                                                                                                                                                              I think we need the diversity of participants in free software represented in the communities and organizations. Were that the case, I think I would see more diversity in organizational structures, conduct standards, explicit goals, etc. What I perceive is a corporate-funded monoculture that is getting a bit creepy in the demands placed on others that don’t want to participate.

                                                                                                                                                                                              I’m also starting to notice a social intelligence / neurotypical punching-down in these threads where someone who is less adept at adopting the politically convenient argot of the day gets excoriated for trying to express their discomfort in their own words. It makes me deeply uncomfortable how the members of this community conduct themselves in these threads.

                                                                                                                                                                                              Some of my favorite communities are very engaged with the issues of access in ways that are in keeping with the zeitgeist (e.g. Rust) and do great work in part because of that. Some of my other favorite communities have a different emphasis or approach. I’d like them to co-exist peaceably and for people to do what they are most passionate about, whatever form that takes.

                                                                                                                                                                                              1. 8

                                                                                                                                                                                                You may be right. But what I wanted to express is: I have my ideologies, just like anybody else does, but I believe that open source should only have one ideology, which is about software, collaboration, and not people, or other ideologies. For my taste even the GNU project is too political in many aspects, but on the other hand they have some great pieces of software and those are often governed and built in a great atmosphere. (I can recall a single notable “scandal” that reached me, but the community was generally welcoming, as it is for most software projects.)

                                                                                                                                                                                                Edit: Or to rephrase it even more: ideology is a system of thought covering most aspects of (human) life. I beleive everyone has a personal world view, that is closer to some pre-canned ideology than to others. Yet software projects should have ideologies of software lifecycle, not of human lifecycle, and those can be very well separated, as my personal life and life at my work can also be separated.

                                                                                                                                                                                                The etiquette of the global human civilization should be enough to cover the human-human interaction part of the collaboration, as it is for professional interaction in my experience with colleagues from all over the world. We share our vision about software, quality, and work together, while we may disagree on plenty of things, which have no place in the discussion about a software project.

                                                                                                                                                                                                1. 1

                                                                                                                                                                                                  Ideologies are always there. You only notice them when they’re different from your own.

                                                                                                                                                                                                  This is a really interesting claim that I’m seeing more and more! I’d love to find some sources that explain the justification for it.

                                                                                                                                                                                                2. 6

                                                                                                                                                                                                  I’m genuinely sorry about that. :(

                                                                                                                                                                                                  Unfortunately, some topics always bring out discussion that highlights the leaky abstraction of other lobsters as purely technical beings.

                                                                                                                                                                                                  It’s the strongest argument against certain forms of content here.

                                                                                                                                                                                                  1. 3

                                                                                                                                                                                                    One of the goals of open source movements is bringing in new people. I don’t think that’s a particularly contentious goal.

                                                                                                                                                                                                    Outreachy is one organization that embodies particular ideas about how best to do that. It’s true those ideas are politically charged, but they’re in service of a goal that is agreed upon. So you can’t effectively pursue the goal of getting new people into open source without taking some kind of stance on the political questions.

                                                                                                                                                                                                    Some political questions (what is the optimal US tax policy) are more or less irrelevant to open source. But others are so pervasive that they can’t be ignored, except by creating a tacit consensus. Even the idea that we should respect each other creates conflicts where people have sufficiently different ideas about what respect means.

                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                      These goals promote the production of “high quality programs” as well as “working cooperatively with other similarly minded people” to improve open-source technology.

                                                                                                                                                                                                      source: https://en.wikipedia.org/wiki/Open-source_software_movement

                                                                                                                                                                                                      Bringing a specific political agenda to an open source project violates the similarly minded people, or can have the effect of pushing away differently minded people. This is not what respect means in my opinion. I have worked a lot wit differently minded people, and we got along, as we were focusing on the goals. The goals were creating software, not changing society or a community. This moving goalposts is what is bad for OpenSource in my opinion.

                                                                                                                                                                                                      1. 10

                                                                                                                                                                                                        “Apolitical” open source has turned out to be overwhelmingly white and male - significantly more than even the broader software industry. Reference.

                                                                                                                                                                                                        I don’t think there’s any evidence that this demographic skew is deliberate. However once a group is dominated by a certain demographic then it’s easy for people to get the message that this is “not for them”, even if noone says this (and especially if some “bad apples” do).

                                                                                                                                                                                                        I believe that there’s nothing about being white and male that makes the best possible open source software developers, so this demographic skew is a bug not a feature. I believe that the best possible open source community is the one with the biggest group of committed (to creating open source) people involved.

                                                                                                                                                                                                        With this in mind, what can be done to encourage more diversity and bring more people in? There’s no evidence that the status quo (“focus on tech”, etc) will change by itself.

                                                                                                                                                                                                        pushing away differently minded people

                                                                                                                                                                                                        The only people the LLVM CoC will push out is people who repeatedly violate it (and by doing so that person is pushing out other people). Outreachy is bringing people in, it doesn’t push anyone out.

                                                                                                                                                                                                        Someone decided to leave because aspects of the project no longer meshed with their political world view. You see this as “pushed out”, but I don’t really see who is pushing them here (unless there are some CoC violations we don’t know about or something, but AFAIK there aren’t).

                                                                                                                                                                                                        1. 1

                                                                                                                                                                                                          Open source is an explicitly political idea to start.

                                                                                                                                                                                                    1. 4

                                                                                                                                                                                                      This article is yet another indication that the Clang/LLVM developer culture is seriously broken. The level of reasoning and technical accuracy would be noticeably bad in an HN rant. The basic premise is nutty: nobody invested billions of dollars and huge amounts of effort and ingenuity to cater to the delusions of C programmers. Processor development is extensively data driven by benchmarks and simulations that include code written in multiple languages. Just to mention one claim that caught my eye, caches are not a recent invention.

                                                                                                                                                                                                      Consider another core part of the C abstract machine’s memory model: flat memory. This hasn’t been true for more than two decades. A modern processor often has three levels of cache in between registers and main memory, which attempt to hide latency.

                                                                                                                                                                                                      Wow! “More than two decades” is right. In fact caches were even present on the PDP-11s and - they were not a new idea back in 1980. Poor Dennis and Ken, developing a programming language in ignorance of the effects of cache memory. The rest of it is scarcely better.

                                                                                                                                                                                                      The root cause of the Spectre and Meltdown vulnerabilities was that processor architects were trying to build not just fast processors, but fast processors that expose the same abstract machine as a PDP-11. This is essential because it allows C programmers to continue in the belief that their language is close to the underlying hardware.

                                                                                                                                                                                                      WTF? Where is the editorial function on ACM Queue? Or consider this explanation of ILP in processor design.

                                                                                                                                                                                                      so processors wishing to keep their execution units busy running C code rely on ILP (instruction-level parallelism). They inspect adjacent operations and issue independent ones in parallel. This adds a significant amount of complexity (and power consumption) to allow programmers to write mostly sequential code. In contrast, GPUs achieve very high performance without any of this logic, at the expense of requiring explicitly parallel programs.

                                                                                                                                                                                                      Who knew that pipelining was introduced to spare the feelings of C coders who lack the insight to do GPU coding?

                                                                                                                                                                                                      1. 4

                                                                                                                                                                                                        nobody invested billions of dollars and huge amounts of effort and ingenuity to cater to the delusions of C programmers

                                                                                                                                                                                                        People that worked in hardware often said the opposite was true. Mostly due to historical circumstances combined with demand. We had Windows and the UNIX’s in C. Mission-critical code went into legacy mode more often than it was highly-optimized. Then, optimization-oriented workloads like HPC and especially gaming demanded improvements for their code. In games, that was largely in C/C++ with HPC a mix of it and Fortran. Processor vendors responded by making their CPU’s really good at running those things with speed doubling every 18 months without work by software folks. Compiler vendors were doing the same thing for the same reasons.

                                                                                                                                                                                                        So yeah, just because people were using C for whatever reasons they optimized for those workloads and C’s style. Weren’t the benchmarks apps in C/C++, too, in most cases? That would just further encourage improving C/C++ style along with what patterns were in those workloads.

                                                                                                                                                                                                        “Who knew that pipelining was introduced to spare the feelings of C coders who lack the insight to do GPU coding?”

                                                                                                                                                                                                        There were a lot of models tried. The big bets by CPU vendors on alternatives were disasters because nobody wanted to rewrite the code or learn new approaches. Intel lost a fortune on stuff like BiiN. Backward compatibility with existing languages and libraries over everything else. Those are written in C/C++ that people are mostly not optimizing: just adding new features. So, they introduced other ways to speed up those kind of applications without their developers using alternative methods. This didn’t stop companies from trying all kinds of things that did boost numbers. They just remained fighting bankruptcy despite technical successes (Ambric), niche scraping by (Moore’s chips), or priced too high to recover NRE (eg FPGA’s w/ HLS or Venray CPU’s). Just reinforced why people keep boosting legacy and high demand systems written in stuff like C.

                                                                                                                                                                                                        1. 4

                                                                                                                                                                                                          You are not going to find anyone who does processor design who says that.

                                                                                                                                                                                                          1. Processors are highly optimized for existing commercial work loads - which include significant C and Java - true
                                                                                                                                                                                                          2. “processor architects were trying to build not just fast processors, but fast processors that expose the same abstract machine as a PDP-11. This is essential because it allows C programmers to continue in the belief that their language is close to the underlying hardware.” - not even close.

                                                                                                                                                                                                          First is a true statement (obvious too). Second is a mix of false (PDP-11??) and absurd - I’m 100% sure that nobody designing processors cares about the feelings of C programmers and it’s also clear that the author doesn’t know the slightest thing about the PDP-11 architecture (which utilized caches a not very flat memory model, ILP etc. etc. )

                                                                                                                                                                                                          Caches, ILP, pipelining, oo execution - all those pre-date C. Spec benchmarks have included measurements of Java workloads for decades, fortran workloads forever. The claim “so processors wishing to keep their execution units busy running C code rely on ILP (instruction-level parallelism). “ is comprehensively ignorant. ILP works with the processor instruction set fundamentals, not at the language level. To keep a 3GHz conventional processor busy on pure Erlang, Rust, Swift, Java, Javascript loads, you’d need ILP, branch prediction, etc etc as well. It’s also clear that processor designers have been happy to mutate the instruction set to expose parallelism whenever they could.

                                                                                                                                                                                                          “The key idea behind these designs is that with enough high-level parallelism, you can suspend the threads that are waiting for data from memory and fill your execution units with instructions from others. The problem with such designs is that C programs tend to have few busy threads.”

                                                                                                                                                                                                          Erlang’s not going to make your thread switching processor magically work. The problem is at the algorithmic level, not the programming language level. Which is why, on workloads suited for GPUs, people have no problem writing C code or compiling C code.

                                                                                                                                                                                                          Caches are large, but their size isn’t the only reason for their complexity. The cache coherency protocol is one of the hardest parts of a modern CPU to make both fast and correct. Most of the complexity involved comes from supporting a language in which data is expected to be both shared and mutable as a matter of course.

                                                                                                                                                                                                          Again, the author is blaming the poor C language for a difficult algorithm design issue. C doesn’t say much at all about concurrency. Only in the C11 standard is there an introduction of atomic variables and threading (it’s not very good either) but this has had zero effect on processor design. It’s correct that large coherent caches are design bottleneck, but that has nothing to do with C. In fact, shared memory multi thread java applications are super common.

                                                                                                                                                                                                          etc. etc. He doesn’t understand algorithms or processor design, but has a kind of trendy psycho-babble hostility to C.

                                                                                                                                                                                                          1. 3

                                                                                                                                                                                                            Good counterpoints. :)

                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                              The article argues that modern CPU architecture spends vast amounts of die space supporting a model of sequential execution and flat memory. Near as I can tell, he’s absolutely correct. You, otoh, seems to have not understood that, and moved straight to ad hominem. “He doesn’t understand algorithms or processor design”; please.

                                                                                                                                                                                                              1. 3
                                                                                                                                                                                                                1. The claim that “that modern CPU architecture spends vast amounts of die space supporting a model of sequential execution and flat memory” is totally uncontroversial - if you have sensible definitions of both sequential execution and flat memory.

                                                                                                                                                                                                                2. The claim that “The features that led to these vulnerabilities [Spectre and Meltdown] , along with several others, were added to let C programmers continue to believe they were programming in a low-level language,” is absurd and indicates a lack of knowledge about processor design and a offers a nutty theory about the motivations of processor architects.

                                                                                                                                                                                                                3. The claim “The root cause of the Spectre and Meltdown vulnerabilities was that processor architects were trying to build not just fast processors, but fast processors that expose the same abstract machine as a PDP-11.” is similarly absurd and further comments indicate that the author believes the PDP-11 architecture predated the use of features such as caches and instruction level parallelism which is a elementary and egregious error.

                                                                                                                                                                                                                4. The claim “Creating a new thread [in C] is a library operation known to be expensive, so processors wishing to keep their execution units busy running C code rely on ILP (instruction-level parallelism)” - involves both a basic error about C programming and a basic misunderstanding of the motivations for ILP in computer architecure. It precedes a claim that shows that the author doesn’t understand that C based code is widely used in GPU programming which is another elementary and egregious error.

                                                                                                                                                                                                                5. Those are not the only errors in the essay.

                                                                                                                                                                                                                6. “Ad hominem” involves attempting to dismiss an argument based on claims about the character of the person making the argument. If I had argued that Dave Chisnall’s personal attributes invalidate his arguments, that would be ad hominem. I did the opposite: I argued that the gross technical errors in Chisnalls argument indicate that he does not understand computer architecture. That’s not use of ad hominem, but is ad argumentum - directed at the argument, not the person.

                                                                                                                                                                                                                Thanks.

                                                                                                                                                                                                                vy

                                                                                                                                                                                                                1. 2

                                                                                                                                                                                                                  The claim that “The features that led to these vulnerabilities [Spectre and Meltdown] , along with several others, were added to let C programmers continue to believe they were programming in a low-level language,”

                                                                                                                                                                                                                  Of course, only the author could say that for sure, but my interpretation of this, and other similar sentences, in the article is not to make the point about modern processors somehow trying to satisfy a bunch of mentally unstable programmers, but rather than they are implementing an API that hides a vast amount of complexity and heuristics. As far as I understand, this claim is out of question in this thread.

                                                                                                                                                                                                                  The second point, which in my opinion is a bit too hidden in somewhat confusing prose, is that a lower level of programming could be possible, by allowing programs to control things like branch prediction and cache placement for example. That could also simplify processors by freeing them from implementing heuristics without having the full context of what the application may be trying to achieve, and grant full control to the software layer so that better optimisation levels could be reached. I think that is a valid point to make.

                                                                                                                                                                                                                  I don’t really like the connection to spectre, which I think is purely anecdotal, and I think that the exposition as a discussion about whether C is or is not low level programmer and what C programmers believe muddies what I think is the underlying idea of this article. Most of the article would be equally valid if it talked about assembly code.

                                                                                                                                                                                                                  1. 1

                                                                                                                                                                                                                    I think it would be a really good idea for processor designers to allow lower level programming, but if that’s what the author is attempting to argue, I missed it. In fact, his lauding of Erlang kind of points the other way. What I got out of it is the sort of generic hostility to C that seems common in the LLVM community.

                                                                                                                                                                                                                    1. 1

                                                                                                                                                                                                                      I think (one of) his point(s) is that if CPU designers abandoned the C abstract machine/x86 semantics straightjacket, they could build devices that utilizes the silicon much more effectively. The reason they don’t do that is ofc not that they are afraid of C programmers with pichforks, but that such a device would not be marketable (because existing software would not run on it). I don’t understand your erlang remark though. I believe a CPU that did not do speculative execution, branch prediction, etc, but instead, say, exposed thousands of sequential processing units, would be ideal for erlang.

                                                                                                                                                                                                                      1. 3

                                                                                                                                                                                                                        This was a very interesting machine https://en.wikipedia.org/wiki/Cray_MTA it did a thread switch on every memory load

                                                                                                                                                                                                                        The success of GPUs shows that: 1) if there are compelling applications that fit a non-orthodox processor design, software will be developed to take advantage of it and 2) for many parallel computer designs, C can easily be adapted to the environment - in fact, C is very widely used in GPUs. Also, both AMD and Intel are rushing to extend vector processing in their processors. It is curious that Erlang has had so little uptake in GPUs. I find it super awkward, but maybe that’s just me.

                                                                                                                                                                                                                        Obviously, there are annoying limitations to both current processor designs ( see https://lobste.rs/s/cnw9ta/synchronous_processors ) and to C. My objection to this essay was that it it confirmed my feeling that there are many people working on LLVM who just dislike C for not very coherent reasons. This is a problem because LLVM/Clang keep making “optimizations” that make C even more difficult to use.

                                                                                                                                                                                                        1. 1

                                                                                                                                                                                                          Dear Lord: the link time optimizations are a scary prospect.

                                                                                                                                                                                                          1. 1

                                                                                                                                                                                                            Do you mean LTO in general, or something new in gcc 8.1?

                                                                                                                                                                                                            My experience with LTO (only on microcontrollers) has been that it can be very hard figuring out the corresponding source in a debugger, so this announcement about better DWARF information is very welcome!

                                                                                                                                                                                                            1. 1

                                                                                                                                                                                                              I fear that LTO will enable further GCC use of UB based “optimizations”. Pre-LTO, the compiler has to treat separately compiled modules as black boxes.

                                                                                                                                                                                                          1. 3

                                                                                                                                                                                                            This is a dreadful article. There is nothing in the design of C, for example, that requires thread creation to be a big deal. The register renaming operations of CPUs has nothing to do with C semantics. etc.

                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                              Far as thread creation, I thought C didnt address concurrency at all with it left to library authors or maybe a later standard. If true, that would mean concurrency had to be bolted on to a PDP-11 abstract machine run by hardware that was nothing like that. That’s two layers of indirection.

                                                                                                                                                                                                              Other systems languages like Ada, Modula-3, and Active Oberon did address concurrency. Still not low-level but at least a concept in those languages.

                                                                                                                                                                                                              1. 1

                                                                                                                                                                                                                The abstract machine that the later C standard has come up with is pretty stupid and does not fit with the design of the language. Essentially they have come up with all sorts of useless and complex constraints . But there is no reason why thread creation has to be hard - this is an advantage that comes from the language not providing any concurrency semantics at all. You could arrange outside the language for multiple threads to run the same code and come up with a data sharing/control strategy that is a good fit for the machine. Or you could follow DJBs example, and directly program vector operation. What you can’t do is have a compiler automatically adapt to different concurrency regimes, but the compiler often doesn’t know anything useful about these either.

                                                                                                                                                                                                            1. 4

                                                                                                                                                                                                              I feel like I read far too much about how C interacts with processors just to get to the main point,

                                                                                                                                                                                                              It’s more accurate to say that parallel programming in a language with a C-like abstract machine is difficult, and given the prevalence of parallel hardware, from multicore CPUs to many-core GPUs, that’s just another way of saying that C doesn’t map to modern hardware very well.

                                                                                                                                                                                                              1. 2

                                                                                                                                                                                                                Yeah, it doesn’t match what the machine is actually doing. Therefore, it’s more a high-level language than a low-level one even if it’s low-level in some ways. That’s true for high-performance CPU’s but it might still fit for MCU’s or simple CPU’s. For the former, Cilk is probably closer than C to what the combos of compilers and CPU’s are doing.

                                                                                                                                                                                                                1. 2

                                                                                                                                                                                                                  It does seem like a decent fit for MCUs. In that world, you’re typically without an OS and threads, so you’re dealing with memory directly (so it’s a giant array) and the operations the CPU probably doesn’t have much in the way of pipelining or caching. The only gotcha is interrupts since they’re the main source of input. Oddly enough, an MCU is mostly an event driven device so parallelism is still a huge concern.

                                                                                                                                                                                                                  The low-level connection can fool you too. If you’re working with an 8-bit MCU, things you’re used to in C can be really slow, such as anything related to floating point or using a short int.

                                                                                                                                                                                                                  1. 1

                                                                                                                                                                                                                    Compared to what?

                                                                                                                                                                                                                  2. -1

                                                                                                                                                                                                                    It’s part of the degradation of C under dumb standards and awful compilers. None of this is essential.