HaraldvonBlauzahn

joined 3 weeks ago
[–] HaraldvonBlauzahn 11 points 3 days ago* (last edited 3 days ago)

Eine sehr interessante Feststellung. Sie lässt mich schnurstracks an die Situation in den USA vor dem amerikanischen Bürgerkrieg denken, als es um die Abschaffung der Sklaverei ging und die Südstaaten bzw die machthabenden Eliten der damaligen Südstaaten einerseits ökonomisch völlig abhängig von der Sklaverei als Institution gemacht hatte, aber andererseits auch noch ihre gesamte Gesellschaft auf einer Ideologie aufgebaut hatte, dass Sklaverei rechtens sei.

Heute sehen wir scheinbar nicht nur ideologisch -ökonomische Umbrüche von ähnlicher Tragweite, sondern der Symbolismus der Konföderierten wird von Trump noch aktiv beschworen. Es geht heute um die fossile Industrie als Geld und Macht vermittelnde Institution. Die Erneuerbaren Energiequellen, Wärmepumpen, Elektroautos, Abbau des Autoverkehrs im Städten, oder allgemein Decarbonisierung lassen diese Geld- und Machtquellen gerade schmelzen.

Was dazu führt dass die alte Macht in etlichen Ecken der Welt gerade versucht, die Demokratie auszuschalten - mit Methoden des Faschismus.

 

Also hat man mit dem Traum die Förderung von wirksamen Klimaschutz mal eben um sieben Jahre verschleppt.

Und nun stelle ich die Frage: Ist die jahrelange bewußte Verschleppung von Klimaschutz, die letztlich Millionen von Menschen ganz eindeutig vorhersehbar das Leben kosten wird, nicht ebenso Gewalt wie z.B. die Entlaubung von Wäldern mit Agent Orange?

47
Weniger Autos, weniger Umsatz? (www.nationalgeographic.de)
submitted 4 days ago by HaraldvonBlauzahn to c/dach
[–] HaraldvonBlauzahn -1 points 4 days ago (1 children)

In my experience, dealing with repeated nvidia problems is not worth the hassle. Just replace it with a good AMD graphics card and sell that nvidia thing.

[–] HaraldvonBlauzahn 3 points 4 days ago* (last edited 4 days ago)

For me, this result is also not too surprising:

  1. If allowing / using Undefined Behavior (UB) would allow for systematically better optimizations, Rust programs would be systematically slower than C or C++ programs, since Rust does not allow UB. But this is not the case. Rather, sometimes Rust programs are faster, and sometimes C/CC++ programs. A good example is the Debian Benchmark Game Comparison.

  2. Now, one could argue that in the cases where C/C++ programs turned out to be faster than Rust programs, that at least im these cases exploiting UB gave an advantage. But, if you examine these programs im the Debian benchmark game (or in other places), this is not the case either. They do not rely on clever compiler optimizations based on assumptioms around UB. Instead, they make heavy use of compiler and SIMD intrinsics, manual vectorization, inline assembly, manual loop unrolling, and in general micro-managing what the CPU does. In fact, these implementations are long and complex and not at all idiomatic C/C++ code.

  3. Thirdly, one could say that while these benchmark examples are not idiomatic C code, one at times needs that specific capability to fall back to things like inline assembly, and that this is a characteristic capability of C snd C++.

Well, Rust supports inline assembly as well, though it is rarely used.

[–] HaraldvonBlauzahn 1 points 4 days ago

You can legally buy second-market OEM licenses. They are not that expensive, and do not expire. And, older versions of Windows are much slimmer and boot much faster, though it is not a good idea to connect them to the Internet - instead, one would block connections between VM and Internet. Which is anyway much better from a privacy perspective.

[–] HaraldvonBlauzahn 1 points 4 days ago (1 children)

Another big plus of that approach: If your laptop or PC breaks, you can just move the VM image with Windows exactly like any other file you have backed up (you do backups, don't you?) to the new hardware and use it as before. This esoecially breaks the problem of forced OS upgrades if the new hardware does not support the old windows version, or you do not have the installer and license keys any more, but the new Windows version does not support your old documents, media formats, or pheriperals like scanners.

Also, if you modify your Windows install and it might break, you can just make a snapshot of the VM image - which is a copy of a file - and restore it when needed.

 

cross-posted from: https://feddit.org/post/11066347

Seit mehr als einem Jahrzehnt arbeitet Paris daran, das Auto von der Innenstadt weitestgehend fernzuhalten. Ein radikaler Kurs mit bemerkenswerten Folgen für die Luftqualität, wie neue Karten jetzt zeigen.

 

A thorough examination of the performance effects of using undefined behaviour in compiler optimizations.

Method:

  1. Modifying clang to not use UB where this is possible
  2. Run a large suite of benchmarks on different architectures, compare results for modified and unmodified clang
  3. Do statistics on the results
  4. Examine performance deviations
  5. Discuss factors which could bias results.

Very good science!

Result in short:

Only on ARM and if no link-time optimization is used, a systematic small positive performance effect can be seen. For Intel and AMD CPUs, there are no systematic improvements.

Average effects are typically below 2%, which is the typical effect of system and measurement noise. Often, effects are even negative. In some cases, benchmarks show large differences, and many of these can be fixed by simple modifications to the compiler or program.

[–] HaraldvonBlauzahn 2 points 5 days ago

Great article, a pleasure to read and a fantastic work of really good science and critical thinking.

 

Undefined Behavior in C and C+- is often exploited by compilers for optimization. Therefore, it is frequently believed that permitting Undefined Behaviour makes such programs faster, even if the architectures of today's hardware are wildly different from the tiny and bare-bones CPUs these languages were once developed for, fifty years ago.

This study examines whether this is the case, by disabling many of such optimizations in clang and running a wide range of "optimized" and "unoptimized" benchmarks on Intel, AMD, and ARM architectures.

The general result is that while there are differences, the benchmarks do not run significantly faster with "optimizations". A slowdown was observed on ARM - only if no link time optimization (LTO) was used. Averaged ifferences even with all "ub-based optimizations" enabled or disabled were typically below 2%, which is at the noise threshold.

There were also many cases where "UB-optimizations" made programs perform worse.

There were exceptions found to this general summary, and the causes for this were tracked down and explained.

Considering all that, the performance impact of permitting UB appears to be... a myth?

[–] HaraldvonBlauzahn 4 points 5 days ago

A few more thoughts here:

  • for a first Distribution, Ubuntu is fine, too. Also, you could ask people arounf you what they know best und whether they like to help you. For example, Debian is a bit harder to install but is rock solid once it runs.
  • if you are concerned about security, you should practice a strict separation between trusted software installed by you, and untrusted data presented to you via web, mail or Internet. Never run untrusted code. Windows blurs that line and this is fatal.
  • In respect to hardware support: Most standard PC hardware will work very well with Linux, even old scanners that have no more Windows driver support. NVidia is the bad exception, and the bad rap is still justified because of Wayland, the new graphics display server. If you are not really poor you might consider to buy something better. The hardware support landscape is different for laptops. Here, refurbished Lenovo Thinkpad or Dell laptops are first choice, and also best value for the money.
[–] HaraldvonBlauzahn 7 points 6 days ago* (last edited 6 days ago) (2 children)

A good counter-example is Copenhagen. There, almost nobody uses ebikes in the city. (It would not be faster because there are so many bikes on the road. There is a bridge across the harbour where at rush hour times there pass more than two bikes per second, that's over 5000 vehicles a hour.)

What made the difference was good, safe bike infrastructure. And NL has this, too.

[–] HaraldvonBlauzahn 8 points 6 days ago

A very uncomfortable reading but in this time, a necessary topic.

The new development since this text was written is the Trump administration dismantling security institutions and intimidating security companies.

And, the rampant illegal data collection of US companies feels increasingly hostile. Why would a smartphone or smartphone app need my fingerprints or microphone?

[–] HaraldvonBlauzahn 7 points 6 days ago* (last edited 6 days ago)

That completely ignores the fact that a human being needs at least half an hour to one hour of light exvercise / physical movement daily to stay healthy at all. If you do not cycle or run, you'd need to go to a gym / fitness studio.

Also, if you care at all about CO2 emissions, eating vegan or vegetarian food is the way.

Also, driving 3 or 4 kilometers to a supermarket to get a veggie pizza needs way more energy and CO2 for the drive, thsn for the food itself. You can compute that from the fuel consumption of a car - about 180 Grams of CO2 per person per kilometer, so 1.4 kilograms for 4 kilometers each way.

Also, often the danger of cycling is stressed. That's rubbish because of the health effect of physical exercise - the most dangerous aspect of modern life is lack of exercise, and if you use a bike instead a car you are wayyy less likely to die of cardiovascular problems, which are the real killer, not accidents.

[–] HaraldvonBlauzahn 27 points 6 days ago (4 children)

Es ist eigentlich nicht richtig, verschiedene städtische Verkehrsmittel nach zurückgelegten Kilometern zu bewerten, denn Menschen haben nach gesichertem Ergebnis der Verlehrsforschung ein Wegezeitbudget.

Das heisst, wer ein "schnelleres" Verkehrsmittel nutzt, wird ganz automatisch weitere Wege zurück legen, die mittlere tägliche Zeit für Wege wird nach einer Anpassungsphase mehr oder weniger im Mittel dieselbe sein.

Und umgekehrt: Wer Fahrrad statt Auto fährt, verbringt deswegen im Mittel nicht mehr Zeit zum Pendeln. Statt dessen organisiert er oder sie kürzere Wege. Wer damit experimentiert, kann das gut an sich selber beobachten, denn der Zusammenhang wirkt sowohl kollektiv als auch individuell.

Die ernüchternde Erkenntnis hieraus: Das Auto spart keine Zeit.

[–] HaraldvonBlauzahn 5 points 6 days ago* (last edited 6 days ago)

I want to learn / use a functional programming language.

That's a good idea.

With over 20 years of programming in languages like C, C++, Python, Go, Pascal, Forth and so on, I think functional languages are often easier - in the same way that programming without lots of global variables is usually and objectively better. There are of course a few domains where the OOP approach works better, like defining data structures with tight invariants, Linux hardware drivers, or simulating ships.

Or sometimes, you need a bit of imperative code for a number-crunching core.

But most code can advantageously be represented and structured as:

input -> transformation -> output

and the transformation part, which is almost everything which is really interesting, is where the functional style shines.

Now if you want something beginner-friendly and practical, it depends on what you want to do. Here my ten cents:

For systems programming, signal processing and embedded stuff, I'd totally recommend Rust. It has certainly a bit of Algol syntax but that's rhe proverbial wolf in sheeps clothing: Many concepts actually come from OCaml, as well as the first Rust compiler. This would also answer the question whether functional languages are relevant and useful in industry.

If you want to do concurrent server-side programming, I believe there is nothing better than Clojure - perhaps with Babashka for scripting and ClojureScript for the Browser. Clojure is also incredibly elegant and concise, and at the same time it can use Java libraries, so it has huge library support, a battery powerhouse included.

If you learn both, you will see that Clojure and Rust have actually a lot in common in their approach to concurrency, which is preventing shared mutable state. It is great to learn both.

If you want a very practical, well-documented, and beginner-friendly language that also has great GUI support, I'd recommend Racket, a Scheme descendant. Like Clojure, it supports gradual typing.

If you want to program close to the Unix/Linux environment and want a simple as well as powerful language, a Scheme version could be a good choice. Personally, I love Guile, and use it where I previously used Python. Guile is very easy to use as a extension library for C and C++ programs or to control low-level code written in C. It also has a quite good REPL and debugger support and thus, interactive experience.

Speaking of Python, it has a great vector library which is heavily influenced by APL and functional designs, named Numpy. A C++ analogon would be Eigen. You see that functional programmers subversively introduce their filth everywhere!!

For data analysis, Scala could be an option. It is like OCaml on the JVM. Similarly, F# for .NET (but who wants to get entangled in Windows?).

If you want to keep it more multi-paradigm, you could chose Common Lisp - it will let you program in many styles and its SBCL implementation probably has the best performance after Rust. But Schemes like Guile or Racket are more geared toward a functional-preferring style. And if you want Lisp with stricter typing, there is Coalton - but I have not tried that last one.

 

If you are interested in this text, you might save not only the link, but the PDF as well - apparently there are ongoing efforts to de-publish it completely. (What again was the word we were using for this in USSR times?)

And if you are interested on many more details how "social media" and most smartphone software employs a neverending stream of "brain hacks" to capture our attention by addictive design, amplifying the campaigns of Cambridge Analytica and people behind it like Bannon or Mercer, this is a book you should look into:

"Free Your Mind from Smartphone and Social Media Stress", by Imran Rashid and Søten Kenner, Johm Wiley & Sons, ISBN (print) 978-3-527-51002-3, (epub) 978-3-527-82886-9.

  • title sounds like a self-help book but I think it is immensely political.
 

Here Meadway draws parallels between Trumps tarrifs and Volcker's interest rate shock in the 1970ies. Is this justified considering the world economy has a totally different structure today?

There is another argument that what Trump actually wants is a reactionary economic policy more similar to the 19th century where interests of small, wealthy, powerful groups were dominant over the well-being of normal people. For how much of a difference that can make, Germanys rapid economic development which was then to a large part attributed to Ludwig Erhard, Germanys minister for economic affairs from 1949 to 1963.

view more: next ›