News for hackers. Stuff that matters.

andreyv

Re:Jolla Phone Pre-Order on Friday December 05, 2025 @01:18PM (#46165085)
Re:Parallel ./configure on Saturday April 26, 2025 @01:13AM (#43801123)
Autoconf can use cache files [1], which can greatly speed up repeated configures. With cache, a test is run at most once.

[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/a...

Re:History of Null Pointer Dereferences on macOS on Saturday March 22, 2025 @12:30PM (#43446882)
Here is a non-zero null pointer: https://gcc.godbolt.org/z/Po5r5Pa36
Re:Getting silly with C, part (void*)2 on Friday January 10, 2025 @01:57PM (#42658789)
It creates a compound literal [1] of type array of int, and initializes the specified array positions using designated initializers [2] with the results of calls to puts().

Using designated initializers without the = symbol is an obsolete extension.

[1] https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html [2] https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

Re:Glibc Buffer Overflow in Iconv on Sunday April 21, 2024 @06:48AM (#40104627)
Even the original version 1507 is still supported on the LTSC channel. Support for UTF-8 manifest was added only in version 1903.
Old does not mean bad. Even a decade later Wayland struggles to provide basic features that were built in the X protocol.
Re:Ubuntu 24.04 LTS will enable frame pointers by default on Wednesday December 13, 2023 @03:23PM (#38633664)
The number of registers available to the program is fixed in the instruction set. The program cannot address more registers without recompiling it to an extended instruction set.
Re:GTK: Introducing Graphics Offload on Saturday November 18, 2023 @11:47AM (#38321444)
First person shooters. Vertical synchronization causes a noticeable output delay.

For example, with a 60 Hz display and vsync, game actions might be shown up to 16 ms later than without vsync, which is ages in FPS.

The Soviet Union briefly tried 5 and 6 day weeks in the 1930s: https://en.wikipedia.org/wiki/Soviet_calendar
Re:Fcron Is the Best Cron on Sunday October 15, 2023 @09:35AM (#37889584)
You can use systemd-cron [1] to run traditional cron jobs with systemd. No need for a separate daemon anymore.

[1] https://github.com/systemd-cron/systemd-cron

Re:Exploring Linux command-line space time on Wednesday September 27, 2023 @02:36AM (#37670978)
Instead of "/usr/bin/time" you can also write "command time".
1% is still a lot for power saving. If the system is idle, it should be at 0%. If it is anything above, then it shows poor design.
Re:Bugs in Hello World on Wednesday March 09, 2022 @05:23AM (#30612922)
Right — ferror() does not set errno, and so perror() is not appropriate here. fprintf(stderr, ...) would be better.
Re:Bugs in Hello World on Wednesday March 09, 2022 @02:44AM (#30611924)
In C, and many other languages, the file stream error state is saved after each operation, so you can skip error checking on every output line and only do

  if (fflush(stdout) != 0 || ferror(stdout) != 0)
  {
    perror("stdout");
    return EXIT_FAILURE;
  }
at the end of the program. The same should be done for stderr as well.

In GNU programs you can use atexit(close_stdout) to do this automatically.

Perhaps this: https://docs.microsoft.com/en-us/windows-hardware/design/dev...

> On occasion, the system stays in the active mode (with the screen off) for a longer interval of time. These longer active intervals occur for a variety of reasons, for example, processing incoming email or downloading critical Windows updates.

> So there is no way to abort a bash script if something like <(sort nonexistent) fails.

The process ID of the last executed background command in Bash is available as $!.

  cat <(sort nonexistent)
  wait $! || echo fail
gives

  sort: cannot read: nonexistent: No such file or directory
  fail
Dell also removed trackpoint and all touchpad buttons, and made up/down arrow keys half height on the new Latitude laptops.

These are not the changes one would expect to see in a professional-grade laptop. On the other hand, the Lenovo line looks good in this regard.

Re:Surprisingly Slow on Thursday April 08, 2021 @07:14AM (#26737372)
Autoconf can use a cache file to speed up tests: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/h...
Re:The X.Org Server Is Abandonware? on Sunday October 25, 2020 @11:10AM (#24886849)
In fast-paced games it is essential to disable vertical synchronization as well, trading possible tearing for less input lag.

Does Wayland support this?

Re:Who's afraid of a big bad optimizing compiler? on Wednesday July 17, 2019 @12:29PM (#20461247)
C now has a memset_s() function to do this.
Windows unredirects full-screen games, bypassing the compositing delay. This is also what sensible compositing X11 window managers do on Linux.
Forced composition and vsync is a mistake for gaming.

The added output latency is unacceptable, especially for first-person shooters. A little tearing is nothing compared to the vsync lag.

If Wayland wants to replace X.org, then it should support also this use case. But full composition being mandatory isn't very encouraging in regard to this.

Indeed, "volatile sig_atomic_t" is the recommended official C way to change a flag from a signal handler.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) on Wednesday April 24, 2019 @01:52AM (#19735885)
There is no tearing with proper drivers and window managers. This was a problem in the past, but now is largely overstated.
Re:Linux Kernel Developers Discuss Dropping x32 Support on Wednesday December 12, 2018 @01:47PM (#18666579)
One counterargument is that for each ABI you need a different set of libraries loaded in memory.

So, if some programs in the system use the 64-bit ABI and some use x32, then memory usage may substantially increase. And, of course, this also affects CPU caches.

Re:Ask HN: First month job anxiety. Am I actually an impostor? on Saturday October 20, 2018 @02:57AM (#18262136)
What the actual hell.
Re:Flatpak – a security nightmare on Wednesday October 10, 2018 @02:10AM (#18182418)
Flatpak, Snap, container images are the new iteration of static linking.

Just like with static binaries, they make deployment easier for the developer, but introduce problems with size, duplication and library updates.

Flatpak added runtimes [1] to alleviate the problem. Does this solution look familiar? Yes, it is the same dynamic library concept. We are coming full circle.

[1] http://docs.flatpak.org/en/latest/available-runtimes.html

Older »