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

There is the info manual.

C-h i

comment 3y ago · link · parent

That jest means it decays into a pointer after being passed as a function argument. In the example given however it’s not a pointer. Just like it wouldn’t be inside a struct.

comment 3y ago · link · parent

Not only that. Its UI is more legible. With standard Twitter UI I often do not notice where those "threads" end, and where Twitter's algorithmic suggestions begin; and that I should have stopped in between and clicked a little link to see more of the thread. With Nitter, a larger portion of thread is shown from the start, and just shows a clearly visible link at the bottom to another page, if there's more. It doesn't try to hook you on its algorithmic suggestions to boost engagement.

comment 3y ago · link · parent

They’re not pointers. sizeof a == 4*sizeof(int), not sizeof(int*).

comment 3y ago · link · parent

int, as all other integer types except char, is indeed signed by default.

Aside: signedness semantics of char is implementation-defined. However, the type char itself is always distinct from both signed char and unsigned char.

comment 3y ago · link · parent

I have Sublime Text and Sublime Merge installed on my Mac. Trying to launch them through Spotlight is an exercise in frustration. Each successive letter typed in Spotlight alternates the selection between Sublime Text and Sublime Merge, so when I press Enter to launch, it’s almost certainly the wrong one of the two.

comment 3y ago · link · parent

That’s why I mentioned reviewed code. The original FreeBSD code which sparked the drama wasn’t reviewed.

And honestly some of the issues that were there are not something preventable by limiting oneself to even 50 LOC. I don’t want to speculate how they came to be though. It’s really baffling.

comment 3y ago · link · parent

All these predictions of imminent technical downfall of Twitter read to me like predictions that in the next release Python will get slow. It's surreal.

As for the non-technical aspects: Mastodon is social media, just like any other, with all the associated faults. Don’t expect miracles.

comment 3y ago · link · parent

If I were to associate asking for the $6 back with level of wealth, I'd associate it with someone who grew up poor, not rich. To people born middle class and up this is not a notable expense. If anything, the number which isn't worth thinking about should go up with the level of wealth.

However, that's a big if. I really wouldn't ascribe it to level of wealth. If they wanted to split the bill, they should have made it clear earlier, certainly not after paying the bill. It's not class, it's just being a dick.

Which is to say I agree with you. :)

comment 3y ago · link · parent

My bad. I was fooled by it using OpenSSL/LibreSSL.

comment 3y ago · link · parent

It has orders of magnitude less code (which has been reviewed by many people), its configuration is a lot simpler, and it doesn’t allow password authentication, so… probably yes?

Edit: deleted false information about TLS.

comment 3y ago · link · parent

I’ve watched half of it and there was nothing insightful, to be honest.

comment 3y ago · link · parent

I vouched for your comment here. But looking at your comment history, your comments seem to be killed due to spamming (too many in a short time, especially for a new account). Maybe you could avoid it, if you turned it down a bit.

comment 4y ago · link · parent

That works in Emacs compilation buffers. You can also define custom patterns to match the output formats of different compilers.

comment 4y ago · link · parent

A Debian Slim Docker image is 20MiB, and in my experience by the time you install all the dependencies of your app in an Alpine image, it’s bigger than the equivalent based on Debian Slim.

comment 4y ago · link · parent

Debuggers. A GUI debugger can show you a watch window with some variables and you can see it change in real time as you step through code, without you having to explicitly run the print command on each step for each variable, and without leaving a mess of historical values on your screen. Thanks to that, observing state as it changes costs less effort. Instead of manually asking all the time, you passively observe. It means greater productivity for the user of the debugger. And it goes beyond the watch window: source preview, disassembly, registers, hexdump of memory…

And obviously: editors. Unless you’re using ed, everybody’s using GUI or TUI editors. And TUI is just a poor man’s GUI. All the benefits of CLIs are gone, while the things GUIs are good at are degraded.

Not to mention anything related to graphics, photography, video…

comment 4y ago · link · parent

If you mean the European Dark Ages, then I’m curious what mathematical theorems you know from that period. Several centuries of nothing. Quite an anti-achievement.

comment 4y ago · link · parent

My guess is one way it could break, if it was otherwise, would be if T relied on thread local state.

comment 4y ago · link · parent

Why would “globalist” be an anti-Semitic whistle?

comment 4y ago · link · parent

But that’s caused by changing the clock all the time, the opposite of what PeterisP proposed. When it comes to constant offsets[1], there are countries whose political time zones are shifted from their geographical time zones by 1h (Spain, Iceland) or even 2h (Western China). It doesn’t seem to be causing problems.

[1]: Because allowing the time to drift microscopically from human perception is indistinguishable from not changing it, only that after a sufficiently long time you live in a time zone shifted by a constant, only there was never really a big event to shift it. It’s like getting old - you don’t notice it, until it’s already happened.

comment 4y ago · link · parent

Which is 1-2 full-sized photos from a 30Mpx camera. More if it’s just thumbnails.

comment 4y ago · link · parent

Casey Muratori's blog (everything stuff): <https://www.computerenhance.com/>

Max Bernstein's blog (compiler stuff): <https://bernsteinbear.com/blog/>

Michael Stapelberg's blog (Linux stuff): <https://michael.stapelberg.ch/posts/>

Göran Weinholt's blog (Scheme stuff): <https://weinholt.se/>

comment 4y ago · link · parent

Versatility of the standard library and ability to write terse programs which achieve a lot. Even if C++ compiled always in under 0.1s, I wouldn’t call it a scripting language, because its standard library is anemic and basic stuff, like finding things in containers, copying things from one container to another, basically anything involving iterators requires such elaborate code that it’s on the opposite side of the spectrum from a scripting language. A scripting language is a tool for quickly performing one-off tasks. Terseness and a rich stdlib are virtues here.

comment 4y ago · link · parent

See also the fastest FizzBuzz written in x86-64+AVX2 Assemby, running at 45GiB/s:

<https://codegolf.stackexchange.com/questions/215216/high-thr...>

<https://github.com/orent/htfizzbuzz/blob/master/fizzbuzz.S>

comment 4y ago · link · parent

I’d classify runtime reflection as an unsafe language feature, to be honest.

comment 4y ago · link · parent

You need to get rid of the space between “??” and “(“.

comment 4y ago · link · parent

This example doesn’t involve digraphs. Trigraphs also preceded digraphs, so their semantics couldn’t have been motivated by digraphs. In fact digraphs were added as a better-thought-out alternative to trigraphs. Digraphs were added in C99, whereas trigraphs were added in C89.

comment 4y ago · link · parent

They’re not difficult to implement. It’s a sed pass running before any preprocessor or even lexer, which is the horrifying thing. They replace characters in source code, they’re not normal tokens like digraphs. And so e.g. the following program won’t print what a mere mortal would expect:

  #include <stdio.h>

  int main() {
    puts(“What??(Really.)”);
  }
Try running that. Only change the quote marks to the ones on a normal keyboard (I’m on my phone.)

Edit: Oh, and remember to compile with -std=c11 e.g. gnu11 has trigraphs disabled by default.

comment 4y ago · link · parent

> Trigraphs are removed from the language.

Finally! My joy knows no bounds.

1
222324
55