Better HN
topnewbestaskshowjobs
Log inSign up

qzzi

49 karma · joined Dec 12, 2023 (2y ago) · 18 submissions

Submissions

comment 3mo ago · link · parent

I clicked on 2 links on the main page in the Learn F* section...

comment 8mo ago · link · parent

1.1.1.1 is simply a free DNS, 1.1.1.2 blocks malware, and 1.1.1.3 blocks both malware and adult content. It's a service that does exactly what it's supposed to do.

comment 8mo ago · link · parent

Simply removing the GIL and running 10,000 threads seems very unlikely.

comment 1y ago · link · parent

I've been hacking professionally for 30 years and I know what to look for. Anthropic's report is garbage. Period.

comment 1y ago · link · parent

Compared to what? What gives you all that, and what prevents you from having it with tables?

comment 1y ago · link · parent

I'm pretty sure they're talking about reference counting that depends on the arguments, not about optional arguments or invalid argument combinations.

comment 1y ago · link · parent

C and Python automatically concatenate string literals, and Rust has the concat! macro. There's no problem just writing it in a way that works correctly with any indentation. No need for weird-strings.

  " one\n"
  "  two\n"
  "   three\n"

comment 1y ago · link · parent

They aren't comparing those crimes. You don't get to pick and choose where laws should matter based on whether you personally like the item being banned. Your "bad guys will do it anyway" argument doesn’t hold.

comment 1y ago · link · parent

The point is obviously that the counter is centralized, and it relates to the previous example where is no concurrency. The need for synchronization when sharing data across threads is mentioned just below that.

comment 1y ago · link · parent

In the right place, but maybe at the wrong time. You can expect +1 and always be right, when the value should be +10.

comment 1y ago · link · parent

No, the debugger does not get involved in preprocessing. When you write "a = __LINE__;", it expands to "a = 10;" (or whatever number) and is compiled, and the debugger has no knowledge of it. Debugging information, including the mapping of positions in the code to positions in the source, is generated by the compiler and embedded directly into the generated binary or an external file, from which the debugger reads it.

The __LINE__ macro is passed to the debugger only if the program itself outputs its value, and the "debugger" is a human reading that output :)

comment 1y ago · link · parent

The __LINE__ macro, like all other macros, is expanded during the preprocessing of the source code and is not handed to the debugger in any way.

comment 1y ago · link · parent

This is the place where the listening socket is initialized, and you can see that if the port is 0, it doesn't do anything. Are you observing different behavior?

comment 2y ago · link · parent

It is a commercial product and it is their goodwill to offer licenses for free. They don't have to do it at all, Mr. Entitled.

comment 2y ago · link · parent

> you know any actual tab character in the input is a field separator, and then you can go through the fields to put back the escaped ones

The "\t" in "split" is not a "slash-tee" but an actual tab character and then escape sequences in fields are handled by the "unescape" function.

comment 2y ago · link · parent

No.

comment 2y ago · link · parent

I don't know how they define `MAX`, but I'm guessing it's a typical "a>b?a:b". In function `elf_read_pintable` the `npins` is defined as signed int and `sysno` as unsigned int.

So this comparison will be unsigned and will allow to set `npins` to any value, even negative:

  npins = MAX(npins, syscalls[i].sysno)
Then `SYS_kbind` seems to be a signed int. So this comparison will be signed and "fix" the negative `npins` to `SYS_kbind`:

  npins = MAX(npins, SYS_kbind)
And finally the `sysno` index might be out of bounds here:

  pins[syscalls[i].sysno] = syscalls[i].offset
But maybe I'm completely wrong, I'm not interested in researching it too much.