HNHacker News
TopNewBestAskShowJobs

GabrielTFS

97 karma · joined May 8, 2022

submissionscomments
GabrielTFS··on C Strings and my slow descent to madness
These functions are in the current POSIX draft - though not published, it's quite unlikely to be removed (someone actually specifically filed an issue against POSIX to try and get it removed, basically on the basis of "it's not perfect so it should be removed", and the issue got rejected on the basis that there's no consensus for removal, and it seems unlikely this will change), and as a result, the functions are getting added to glibc: https://sourceware.org/pipermail/libc-alpha/2023-April/14696...
GabrielTFS··on I was banned because of a security flaw in Facebook’s password recovery system
It is also, from what I know, the legal approach. The EU perhaps doesn't have jurisdiction over a service, but what they can do is ask all the ISPs in Europe to block access to it, for example.
GabrielTFS··on Elon Musk owns Twitter: The story so far
In Specht v. Netscape, the court declined to hold Netscape’s browsewrap (i.e. "putting a link to the ToS somewhere in the web page") enforceable because the hyperlink’s placement at the bottom of the screen failed to put users on notice of Netscape’s terms.

In Hines v. Overstock.com, the court found Overstock.com’s browsewrap unenforceable because the website failed to prominently display the link to the online agreement in a way that would put users on notice of the website’s terms and conditions.

And if you think it's all because "you have to scroll to see the hyperlink" and that Twitter's one is valid because there's always a "Terms and Services" hyperlink in small text on the screen at all times, I can tell you of Nguyen v. Barnes & Noble, in which the court held that Barnes & Noble’s browsewrap was unenforceable despite the fact that the hyperlink was prominently placed next to the buttons users must click in order to complete online purchases.

Van Tassell v. United Marketing Group also states:

> Because no affirmative action is required by the website user to agree to the terms of a contract other than his or her use of the website, the determination of the validity of a browsewrap contract depends on whether the user has actual or constructive knowledge of a website's terms and conditions.

In other words, w.r.t. the enforceability of Twitter's ToS on users that have never agreed to it explicitly, they have the burden of proof and have to give the court convincing proof that you knew about their ToS when you broke it.

This is all based on a rather obvious common law standard:

> An offeree, regardless of apparent manifestation of his consent, is not bound by inconspicuous contractual provisions of which he is unaware, contained in a document whose contractual nature is not obvious. - Specht v. Netscape

So yes, I have seen cases not enforcing this paradigm.

Sources:

Specht v. Netscape: https://scholar.google.com/scholar_case?case=958708515918483...

Hines v. Overstock.com: https://scholar.google.com/scholar_case?case=163224540731670...

Nguyen v. Barnes & Noble: https://scholar.google.com/scholar_case?case=110038111392175...

Van Tassell v. United Marketing Group: https://scholar.google.com/scholar_case?case=174994243217056...

GabrielTFS··on C99 doesn't need function bodies, or 'VLAs are Turing complete'
> 2. The problem with that is that you may have infinite recursion, but you can only pass finite amounts of memory between recursion steps. This has also been addressed by https://cs.stackexchange.com/a/60978.

If I have two stacks (by spawning another thread), don't I have two PDAs ? That's what that stackoverflow post indicates, and IIRC two PDAs are equivalent to a Turing machine.

GabrielTFS··on C99 doesn't need function bodies, or 'VLAs are Turing complete'
I'd argue you could use non-standard integers that are unable to be reached in a finite amount of steps but aren't infinity and are still "integers".
GabrielTFS··on C99 doesn't need function bodies, or 'VLAs are Turing complete'
If you want to talk about this kind of technicality, here are three other avenues through which I believe Turing completeness of C can be achieved:

1. As https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_260.htm helpfully points out, "If two objects have identical bit-pattern representations and their types are the same they may still compare as unequal", and "[implementations] may also treat pointers based on different origins as distinct even though they are bitwise identical". It can thus be argued that, with a rather strict definition of provenance (i.e. how pointer values may be constructed), one could construct an implementation where every byte of every pointer is tagged with additional unbounded data that lets the whole pointer be properly dereferenced (I say every byte so that you're able to convert the pointer to an integer and convert it back to the same valid pointer), and where, as allowed by DR 260, pointers that have identical observable bit-pattern representations might not compare equal if they point to different objects. Thus, that implementation could create an unbounded amount of pointers.

2. Spawning off another thread and using infinite recursion (C has no defined recursion depth limit, and if you want to argue about automatic variables needing addresses or whatever and that the as-if rule doesn't cover that, there's `register` which makes address-less variables) to have two pushdown automatas that can together work as a Turing Machine.

3. Using variadic arguments. With `va_copy`, one can iterate through variadic arguments multiple times, and thus `va_list` can be used to implement a mechanism equivalent to pointers without actual pointers (any sane implementation probably uses a pointer for `va_list` somewhere in it, but that's not a problem here) and thus make a pushdown automata with 2 stacks

GabrielTFS··on Yes, the 8086 wanted to be mechanically translatable from the 8080, but
I mean even w.r.t. Windows stuff, quite a large part of what he talks about is variations on "here's an interesting old anecdote from 1995" or "You know that thing that's totally useless now and doesn't matter ? Here's why we absolutely needed it in 1989."
GabrielTFS··on Nullptr, constexpr, embedd, safer enums, type inference approved for C23
Great idea ! Now, try to convince the 30 implementers that did the wrong choice and will tell you they'll never change it because of backwards compatibility.
GabrielTFS··on The Windows malloc() implementation from MSVCRT is slow
It should be noted that Linux generally does actually conform to UNIX standards, though, and that two actual Linux distributions (Inspur K-UX and EulerOS) have in the past obtained UNIX certification. While this doesn't make all Linux distributions UNIX certified, it puts a rather large dent in the claim that they cannot be qualified as UNIX because of some claimed divergence from the standards.

(It also seems odd from my perspective to call exactly only those two Linux distributions "UNIX" unless you're essentially using it as a legal qualification and not a practical one)

GabrielTFS··on New ultra-stealthy Linux backdoor isn’t your everyday malware discovery
Some versions of `strings` might try to parse the file as an executable, which could expose one to any vulnerabilities that may be present in the library used to do so.

However, on my Fedora 36 machine at least, it doesn't do so by default and I'd have to specify the `-d` flag for it to do this.

← PreviousPage 3 of 3