Posts by mburakov@mastodon.social
(DIR) Post #AIjXR90frNtTKB5Z2m by mburakov@mastodon.social
2022-04-23T07:17:12Z
0 likes, 0 repeats
@wolf480pl AFAIU you want these as visible chars? Just a random suggestion without knowing any details - base64?
(DIR) Post #AIjZkjVIbHnrv1siga by mburakov@mastodon.social
2022-04-23T07:33:37Z
0 likes, 0 repeats
@lanodan @wolf480pl Yes, yes. I know Drew does not like glibc :) But let’s be honest, glibc is way more performant than musl. And it’s exactly because of things like that. Note, that I also prefer musl, and always make sure that my code builds fine for it.
(DIR) Post #AIjnGKjNXWYbl2rjxg by mburakov@mastodon.social
2022-04-23T10:14:29Z
0 likes, 0 repeats
@wolf480pl @lanodan [mburakov@de-c-299 test]$ time dd if=/dev/random bs=4096 count=1M | ./musl1048576+0 records in1048576+0 records out4294967296 bytes (4,3 GB, 4,0 GiB) copied, 13,7753 s, 312 MB/sreal 0m13,782suser 0m12,872ssys 0m11,645s[mburakov@de-c-299 test]$ time dd if=/dev/random bs=4096 count=1M | ./glibc1048576+0 records in1048576+0 records out4294967296 bytes (4,3 GB, 4,0 GiB) copied, 10,5202 s, 408 MB/sreal 0m10,527suser 0m4,016ssys 0m11,984s
(DIR) Post #AIjo4ky0GlfbbdkYkq by mburakov@mastodon.social
2022-04-23T10:16:20Z
0 likes, 0 repeats
@wolf480pl @lanodan#include <ctype.h>#include <sys/types.h>#include <unistd.h>static unsigned char buffer[4096];int main(int argc, char* argv[]) { for (int counter = 0;;) { ssize_t result = read(STDIN_FILENO, buffer, sizeof(buffer)); switch (result) { case -1: return -1; case 0: return counter; default: break; } for (size_t i = 0; i < (size_t)result; i++) { if (isalnum(buffer[i])) counter++; } }}
(DIR) Post #AIjo4ldplF89hNJxxI by mburakov@mastodon.social
2022-04-23T10:16:54Z
0 likes, 0 repeats
@wolf480pl @lanodanAlso, musl - static linkage, glibc - dynamic linkage.
(DIR) Post #AIjolflxSQ9dwra0v2 by mburakov@mastodon.social
2022-04-23T10:31:02Z
0 likes, 0 repeats
@wolf480pl @lanodan This is to make sure nothing is cached. Sure this is a bottleneck, but this does not matter since the code is the same in both cases. The delta of ~3 seconds is persisten during multiple runs.
(DIR) Post #AIkIrNFaETiyri4V28 by mburakov@mastodon.social
2022-04-23T10:52:53Z
0 likes, 0 repeats
@lanodan @wolf480pl I kind of agree with that. In general I would also prefer clean code over lightning-fast but ugly-hacky code. But there are basic things in system that just have to work fast. Strings comparison, memory copy, etc. If I pay for performant hardware, I want it to perform, not crawl.
(DIR) Post #AIkJfvigLnAWFVmzUu by mburakov@mastodon.social
2022-04-23T16:17:44Z
0 likes, 0 repeats
@wolf480pl @lanodan Hello world samples I guess :) Jokes aside I find it exceptionally convenient for synchronous processing of poorly structured (as in free text) data streams. It is kind of expected, because this is what it was designed for. And also it is pretty useful for… Ehh, no, that’s actually it :)
(DIR) Post #AJ57kkKtGhaBW344o4 by mburakov@mastodon.social
2022-05-03T17:12:36Z
0 likes, 0 repeats
@wolf480pl IDK, but for myself I found out that projects that directly affect my living are executed waaay faster. I.e. if there’s a bug in some home automation, and I can’t switch a lamp, I’ll fix it asap no matter what :)
(DIR) Post #AJ8EEnjyMCoXxgOInQ by mburakov@mastodon.social
2022-05-05T04:44:03Z
2 likes, 0 repeats
@izaya Don’t worry, it was just a short episode of hypoxia XD
(DIR) Post #AJGViOmQZjGLPgnUoq by mburakov@mastodon.social
2022-05-09T05:03:23Z
0 likes, 0 repeats
@wolf480pl you mentioned it’s small ephemeral state. So I’d start with evaluating a performance impact from a global lock in a real scenario. Maybe it is a way to go…
(DIR) Post #AKiL7dQgKWMgYHGE88 by mburakov@mastodon.social
2022-06-21T13:08:39Z
0 likes, 0 repeats
@wolf480pl I am not that much into networking, but won’t simple rate-limiting help against app-level ddos?
(DIR) Post #AM9iOJHqayC355ygJk by mburakov@mastodon.social
2022-08-03T15:57:46Z
0 likes, 0 repeats
@EU_Commission Last time I had to visit the city hall, I was told that I now can provide all the requested papers as digital scans. Yay?.. But then they added “oh, and of course in addition to your digital copies you have to bring the original papers with you”. 52.9, yeah, sure…
(DIR) Post #ANG1nNdrrOa30Oe0zw by mburakov@mastodon.social
2022-09-05T14:56:32Z
0 likes, 0 repeats
@wolf480pl https://en.m.wikipedia.org/wiki/Hanlon%27s_razor
(DIR) Post #ANG2XP6ujU18sfAzrs by mburakov@mastodon.social
2022-09-05T15:04:53Z
0 likes, 0 repeats
@wolf480pl These two do not contradict, quite the opposite :)
(DIR) Post #ANG3tMkwGbklu4vxOC by mburakov@mastodon.social
2022-09-05T15:20:00Z
0 likes, 0 repeats
@wolf480pl ah, I see what do you mean. IMO you are overcomplicating here. My point is that things tend to be changed (or replaced) without any understanding why they exist in their current state in the first place. Expectedly, this does not bring any improvement. At the same time this could look like malicious activity.
(DIR) Post #ANG6Dgwh6ztyDjFh0S by mburakov@mastodon.social
2022-09-05T15:46:07Z
0 likes, 0 repeats
@wolf480pl “I like it when horrible things are there for a reason.” Me too, because most of the time there’s an interesting story behind it. But such occasions are *extremely* rare.
(DIR) Post #ANnl5qcbYz0aJI0Z72 by mburakov@mastodon.social
2022-09-21T21:29:32Z
0 likes, 0 repeats
@wolf480pl @Hyolobrika @dave@gleasonator.com Btw, in western Ukraine (i.e. Lviv/Lemberg) it was considered cool in 80s-90s to speak Russian. Especially clean Russian pronunciation without accidental Ukrainisms. The whole trend of cancelling all Russian really started at 2014th. Btw, compare that with Belarus, where you might get arrested for speaking Belarusian.
(DIR) Post #APGawFXaDUjMokbYGW by mburakov@mastodon.social
2022-11-04T16:35:01Z
0 likes, 0 repeats
@wolf480pl oh, I do… Chances are high I’ll be an old fart still waiting for the day to come…
(DIR) Post #ARxYXAMhUM6WFpqupM by mburakov@mastodon.social
2023-01-24T06:24:23Z
0 likes, 0 repeats
@wolf480pl not exactly the thing you are looking for, but somewhat related: https://asmjit.com/