abaines

Joined 14 years ago

Karma
41
Submissions
15
Member since
Dec 24
alex @ <username> .me.uk
View on Hacker News

Recent submissions

Comment · 2 years ago
Aren't the two examples I mentioned new features?
Comment · 2 years ago
Comment · 4 years ago
Comment · 4 years ago
I feel as though they should change the name of the paper, because this must be one of the most complex takes on 'defer' that I have seen.

They make a classic mistake of trying to solve a problem by adding more complexity. They cannot decide on by-value or by-reference, so they take the convoluted C++ syntax to allow specifying one (as well as other semantics?).

It does not fit with C in my opinion. It will also hurt third party tools that wish to understand C source code, because they must inherit this complexity.

I would prefer a solution where they simply pick one (by ref / by value) and issue a compiler warning if the programmer has misunderstood. For example, pick by-value and issue a warning if a variable used inside the defer is reassigned later in the scope.

Comment · 5 years ago
Comment · 5 years ago
I've always used

  cdrdao read-cd --read-raw
to backup CD/DVDs, along with toc2cue and bchunk to convert to .iso.

I have no idea if the resulting iso is "more accurate" than using dd - but they've always worked, even from CDs with copy protection and obscure file systems (old mac CDs).

Comment · 6 years ago
How come y is z.cross(x) and not up?

Edit: I think it has been answered by others - up is in world-space, and the camera is not necessarily aligned horizontally.

Comment · 6 years ago
The article doesn't mention SECCOMP_RET_TRAP which was an existing way to inspect syscall pointer arguments during interception (when combined with a SIGSYS signal handler).

I'm curious how the two approaches compare - does USER_NOTIF give a greater range of possibilities, or is it mostly just a different interface?

In a small application that forks once and uses seccomp on the child process, would there be much benefit in moving from RET_TRAP to USER_NOTIF?

Comment · 6 years ago
These are my results on an (admittedly old) Intel i3-2120 CPU @ 3.30GHz. Compiling both programs with -O3:

    ojc_parse_str    1000000 entries in 3607.615 msecs. (  277 iterations/msec)
    simdjson_parse   1000000 entries in  418.997 msecs. ( 2386 iterations/msec)
and might as well throw in my own parser...

    uj_parse   1000000 entries in 1959.731 msecs. (  510 iterations/msec)
The -O3 seems to make a large difference for simdjson.
Comment · 6 years ago
You may want to add -z noexecstack or linking the object will give your program an executable stack.

e.g: ld -r -b binary -z noexecstack input.bin -o output.o

Comment · 6 years ago
I was initially surprised that all the lexers treat "[01]" as four tokens, but it makes sense from the state diagram.

In the past I've encountered JSON lexing that only considers token boundaries on "special" characters i.e. ",}]:" and whitespace. This will return a lexing error when it sees "01" (equivalently "truefalse").

Comment · 8 years ago
The table in [1] has 0 in the carry flag for the SRA instructions, is that correct? I thought they shifted the lowest bit into the carry same as SRL.
Comment · 10 years ago
Comment · 11 years ago
Comment · 11 years ago
You can subscribe via email without any google account by sending a message to <groupname>+subscribe @ googlegroups.com, then it acts just like any other mailing list.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton