Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 3y ago · link · parent

It's readelf, but it will only list libs which are declared in the ELF of the executable. It won't list libraries loaded at startup with dlopen(3), unlike ldd. I'm also not sure, if this script will recurse, but I suspect not. ldd will print libraries loaded recursively.

comment 3y ago · link · parent

If you press page down to scroll, at the end of the page you’ll typically scroll by a smaller amount than prior to that, which changes the level at which your eyeline should be after hitting page down to continue reading uninterrupted. In Emacs and Vim hitting page down works nicely, because they just scroll “past end”. Other programs, like web browsers, often stop at the end, causing this issue and making the reader look for the point where they stopped reading for maybe even 30-45 seconds. This seems to be a workaround for that.

comment 3y ago · link · parent

Young Al Pacino wasn’t conventionally attractive? In what universe?

comment 3y ago · link · parent

I don't know about Python, but this description of coroutines, the general concept, doesn't seem accurate to me. They most definitely cannot be executed in any order. They also have nothing to do with multithreading whatsoever. Lua has the most honest-to-god implementation of coroutines I know of, so I'd suggest looking at that. I've seen the word "coroutines" used in some weird way suggesting multithreading, which probably means Python used them to fake multithreading, but the idea originally has nothing to do with it. The idea actually started out as a way to better structure an assembly program in 1958: <http://melconway.com/Home/pdf/compiler.pdf>.

comment 3y ago · link · parent

Coroutines are a control-flow mechanism. They're a single-threaded pattern in as much as for loops are a single-threaded pattern. Ability to write multithreaded programs does not exclude the need for good single-threaded tools.

comment 3y ago · link · parent

> Missing from here is context switches.

Exactly. From rsc's previous post[1]:

> On my laptop, a C thread switch takes a few microseconds. A channel operation and goroutine switch is an order of magnitude cheaper: a couple hundred nanoseconds. An optimized coroutine system can reduce the cost to tens of nanoseconds or less.

[1]: <https://research.swtch.com/pcdata>

comment 3y ago · link · parent

> It's like if it was a security risk to let people know your real name.

In primary school I read Jonathan Stroud’s Bartimaeus Sequence (a children’s books trilogy) where this is part of the plot. Knowing someone’s real name allows a magician to cast spells on that person. :)

comment 3y ago · link · parent

So that it's shaped more like a page of text than a telegram.

comment 3y ago · link · parent

Needs a (1992) — time of original publication — or (1996) — time of last update.

comment 3y ago · link · parent

I’m always amused by how many of OpenBSD’s mitigations are patching over something as basic as lack of bounds checking, yet they’ll never add bounds checking. And, as you said, those are all just speed bumps, not fixes.

comment 3y ago · link · parent

Yeah. I have no idea what those images have to do with the surrounding text. Even ignoring the context, they don’t demonstrate what the font actually looks like all that well. That and, as others mentioned, it being published on medium.com instead of microsoft.com makes the whole thing look very unprofessional.

comment 3y ago · link · parent

Slide 19 doesn’t load for me.

comment 3y ago · link · parent

Yeah. It's actually funny how Pipewire and Wayland turned out. Wayland was supposed to be ready for general use "any day now" since 2011. It's 2023 and the situation looks thus: <https://community.kde.org/Plasma/Wayland_Showstoppers>. Whereas Pipewire seemed to have scarcely any marketing, instead it just happened. I remember reading about it for the first time at some point and started wondering whether Debian, a conservative distro, turned it on or whether I should change a setting to opt into it. I looked at htop and lo and behold: Pipewire was there. So it happened before I even heard about it, without a single hiccup, so smoothly that I didn't even notice the sound system changed.

comment 3y ago · link · parent

> In the US, you can probably pass calculus without writing a proof, but you can't pass mathematical analysis without at least understanding epsilon/delta proofs.

In Poland we do those in high school. :)

comment 3y ago · link · parent

Keyboard doesn’t compete with English. It competes with microphone. And I’ll be dead before anyone gets me to use a computer via voice FWIW.

comment 3y ago · link · parent

If only I could smash Outlook.

comment 3y ago · link · parent

The title on YT it autotranslated by YT. If you change UI language in your account settings on Google/YT, the title of the video will change as well. Truly horrible, but in-character for Google when it comes to localisation.

comment 3y ago · link · parent

In my experience running Firefox over X11 remotely is fine as long as you only use X11 and don’t wrap it in SSH, i.e. instead you expose your local X11 server port to the computer running Firefox and use the DISPLAY environment variable to point it at you local X11 server. Secure the connection with Wireguard and it’s fine. With SSH I’d see frame tearing all the time, regardless of compression options.

comment 3y ago · link · parent

Jump with both feet.

comment 3y ago · link · parent

In Maslov's the bottom is the most important.

comment 3y ago · link · parent

I’d say it’s an alternative to Instagram, but not Flickr. A huge distinguishing feature of Flickr is that it keeps high-quality versions of uploaded photos. Instagram and Pixelfed compress to a low quality. Pixelfed’s UI also suggests that it’s more of an Instagram replacement, i.e. more about the social media aspect than about the photos. The photos are just an excuse to do social media.

comment 3y ago · link · parent

Yes, you can. Two approaches:

1. Multiple implementations providing a unified interface, selected by the build system. Aka the Henry Spencer approach: <https://www.usenix.org/legacy/publications/library/proceedin...>

2. Less-bad macros, e.g. cond-expand: <https://weinholt.se/articles/cond-expand-and-ifdef/>

comment 3y ago · link · parent

But you probably visited a forest/a national park/swam in a sea/a lake etc. I think it’s rather unlikely for someone to live till 20 without making more distance.

comment 3y ago · link · parent

> Caffeine and alcohol both available legally, both are mind altering and addictive. Did that lead to a degeneration?

Alcohol: absolutely? How many parents beat their children/spouses under the influence of alcohol, but never sober? How many kill others under the influence while driving?

comment 3y ago · link · parent

In the EU 1 in 4 adults smoke tobacco daily[1]. It sounds pretty normal to me. In practice when I commute daily, I always need to hold my breath several times each way, just to avoid the stench.

[1]: <https://ourworldindata.org/grapher/share-of-adults-who-smoke>

comment 3y ago · link · parent

It’s also easier to spot errors in that style than in prose.

comment 3y ago · link · parent

Marxism has many religion-like qualities. It's been written about in:

Raymond Aron, The Opium of the Intellectuals

Czesław Miłosz, The Captive Mind

comment 3y ago · link · parent

I read it. I don't see your point. Sentinel values simply give you a very low performance ceiling that you can't optimise past. What I wrote only took me a couple minutes. It's far from optimal (but it already takes 2/3 the time the sentinel version takes, and 1/2 the time Lemire's range version takes). With thorough effort I bet you could get at least 10 times faster than that, provided you are given the length. With sentinels, you're just left with the original performance levels you can't improve.

comment 3y ago · link · parent

You can. Here is my version: <https://godbolt.org/z/91KecEfbM>

Results:

   N = 10000
  range 1218.1
  sentinel 937.258
  mine 672.227
  ratio 1.29964
(ratio is range/sentinel, not mine/whatever)

You can get even more crazy with SIMD. But for all that you need to know the length beforehand.

Edit: The b4 variable should actually be called b8. That's a remnant of a previous version, where I used 32-bit chunks.

1
121314
55