1,119 karma · joined January 8, 2014
> compilers will never auto-vectorize loops with an early loop break afaik.
I think this is changing. https://godbolt.org/z/ea1E7dx9v. GCC 14 won't try to vectorize this because of the break statement. But GCC 15 does vectorize it. This got a callout in the "General Improvements" section of the release notes: https://gcc.gnu.org/gcc-15/changes.html
I don't think there's any equivalent in clang/LLVM.
If they had extra pins that they had no use for, I'm sure this would have seemed like a very easy and cheap addition. You take 4 unused pins and add 4 pulldown resistors. Then when you go to draw the background, instead of using index 0, you take the value for the index from those pins.
Maybe they planned to use this in arcade hardware, where you'd have a bigger budget than a home console and could afford two PPUs. Then you'd get more colors, and you could scroll the background layer independently from the foreground layer. I believe they later added support for independent layers on the SNES hardware so this type of thing was probably already in demand from game designers.
Both `echo -ne 'weird\xffname\0' > list0` and `printf 'weird\xffname\0' > list0` seem to work fine for me on Linux. Is this macOS-specific?
In Figure 3 you somehow have 101% wall time. :)
GCC trunk seems to like using `bool` so we may eventually be able to retire the hack of using `int`.
Though not the same thing, you may be interested in https://en.wikipedia.org/wiki/Laser_Interferometer_Space_Ant...
Or you could install and old copy of Cygwin or MinGW.
Do you want to run a modern Visual Studio and target XP? Maybe you can make that work if you install an old platform SDK and set WINVER and _WIN32_VERSION and work around all the warnings and compatibility problems that you'll run into. It is fighting an uphill battle and it will continue to get worse with each new version of VS that you want use.
For rust there is Rust9x https://seri.tools/blog/announcing-rust9x/. But I think this is the effort of handful of people. It is behind the upstream rust and it could go away at any time. If you want to write a toy program in Rust then it is fine, but if you want something that's going to be supported long-term you're rolling the dice.
Python 3.4.4 is the last version of Python that will run on Windows XP. That's 10 years old and many things on PyPI now require newer versions of Python so you'd be stuck with old, unsupported versions of those modules, possibly containing security issues.
I feel like it is unfair to blame the compiler when you've explicitly asked for `/O1`. If you change this to `/O2` or `/Ox` then MSVC will optimize this into a constant 5, proving that it does "know" that strlen will return 5 in this case.
Interestingly, it is comparing against a different 32-bit value than `bar` does. I think this is because you accidentally got the order backwards in `bar`.
The code in `bar` is probably not a good idea on targets that don't like unaligned loads.
"Perfboards", perhaps?
long_fn() {
echo "$1"
sleep "$2"
}
to 1s long_fn "This has spaces in it" 5I'm using x86_64-15.1.0-release-win32-seh-msvcrt-rt_v12-rev0.7z from https://github.com/niXman/mingw-builds-binaries/releases/tag... as the toolchain. This produces a 102 KB .exe file. Right off the bat we are doing much better than the claimed 278 KB. Maybe the author is using a different toolchain or different settings? Exact steps to reproduce would be welcome.
We can improve this by passing some switches to GCC.
gcc -Os => 100 KB
gcc -Oz => 99 KB
gcc -flto => 101 KB
gcc -s => 51 KB
gcc -s -Oz -flto => 47 KB
If all you are interested in is a small .exe size, there is plenty of room for improvement here.clang-tidy's `modernize-use-emplace` check warns for both the original version that uses `push_back` (as quoted in the article) and for the modified version that uses `emplace_back`:
warning: unnecessary temporary object created while calling emplace_back [modernize-use-emplace]
13 | widgets.emplace_back(Widget(foo, bar, baz));
| ^~~~~~~ ~
https://godbolt.org/z/sE7jWacTfIt appears that this check was improved to add this warning at some point between clang v14 and now. At least things have improved since the article was written.
javascript:void(addEventListener('keydown',e=>e.keyCode==32&&e.stopPropagation(),true)
I'm not sure, but is this statement implying that `REM` is a British invention? The original Darthmouth BASIC had a REM statement. https://en.wikipedia.org/wiki/Dartmouth_BASIC#First_Edition
Most people don't want to learn a whole new shell. They just want the Explorer shell to have the features that it has had since Windows 7. Features that Microsoft inexplicably chose to remove in Windows 11 and that they are only now belatedly adding back.