mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.9K
active users

#signals

2 posts2 participants0 posts today

The next release of #swad will probably bring not a single new feature, but focus on improvements, especially regarding #performance. Support for using #kqueue (#FreeBSD et al) to handle #signals is a part of it (which is done and works). Still unsure whether I'll also add support for #Linux' #signalfd. Using kqueue also as a better backend for #timers is on the list.

Another hopefully quite relevant change is here:

github.com/Zirias/poser/commit

In short, so far my #poser lib was always awaiting readiness notification (from kqueue, or #epoll on Linux, or select/poll for other platforms) before doing any read or write on a socket. This is the ideal approach for reads, because in the common case, a socket is NOT ready for reading ... our kernel must have received something from the remote end first. But for writes, it's not so ideal. The common case is that a socket IS ready to write (because there's space left in the kernel's send buffers). So, just try it, and only register for notifications if it ever fails, makes more sense. Avoids pointless waiting and pointless events, and e.g. with epoll, even unnecessary syscalls. 😉

Continued thread

Of course, this new credentials checker in #swad needs a #tool to edit these #password files, that's currently work in progress.

I just implemented the class for reading a password, pretty simple thing from a pipe, but an "interesting" job from a #terminal. Turns out doing that portably, reliably and secure needs quite some code. 🙈

There's #getpass, but that's deprecated for good reasons (global state and not perfectly clear how it deals with #signals that could interrupt the input). And there's the sane replacement #readpassphrase in *some* systems (e.g. #FreeBSD), but that's not portable. 🙃

So, plain old #tcsetattr it is, with some signal handling on top:
github.com/Zirias/swad/commit/

Academic consensus question on #Signals safety

TL,DR: YES 100% ✅

Signal, a messaging protocol known for its end-to-end encryption, is widely regarded as secure. It is used by popular applications like WhatsApp and Facebook Messenger, serving over a billion users. The protocol includes advanced security features such as "future secrecy" and "post-compromise security," achieved through a technique called ratcheting, which updates session keys with every message sent" #thread (1/4)

The Fourier Transform is a mathematical operation that transforms a function of time (or space) into a function of frequency. It decomposes a complex signal into its constituent sinusoidal components, each with a specific frequency, amplitude, and phase. This is particularly useful in many fields, such as signal processing, physics, and engineering, because it allows for analysing the frequency characteristics of signals. The Fourier Transform provides a bridge between the time and frequency domains, enabling the analysis and manipulation of signals in more intuitive and computationally efficient ways. The result of applying a Fourier Transform is often represented as a spectrum, showing how much of each frequency is present in the original signal.

\[\Large\boxed{\boxed{\widehat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\ e^{-i 2\pi \xi x}\,\mathrm dx, \quad \forall\xi \in \mathbb{R}.}}\]

Inverse Fourier Transform:
\[\Large\boxed{\boxed{ f(x) = \int_{-\infty}^{\infty} \widehat f(\xi)\ e^{i 2 \pi \xi x}\,\mathrm d\xi,\quad \forall x \in \mathbb R.}}\]

The equation allows us to listen to mp3s today. Digital Music Couldn’t Exist Without the Fourier Transform: bit.ly/22kbNfi

Gizmodo · Digital Music Couldn't Exist Without the Fourier TransformThis is the Fourier Transform. You can thank it for providing the music you stream every day, squeezing down the images you see on the Internet into tiny