Better HN
topnewbestaskshowjobs
Log inSign up

cryptonector

11,940 karma · joined Jun 29, 2012 (14y ago) · 8,736 submissions

Submissions

comment 3mo ago · link · parent

Two problems. First, it is remarkably difficult to come up with a set of programs that it is safe to let the restricted user use. Second, it is remarkably difficult to make the restricted environment useful enough if you're really serious about allowing only safe programs to be used. Try to make it useful enough and you end up with escapes everywhere.

comment 3mo ago · link · parent

When you share YT links you should remove the `?is=...` tracker.

comment 3mo ago · link · parent

We never solved the restricted shell problem for humans.

comment 3mo ago · link · parent

And the "oh noes! our model is too intelligent!!" thing is advertising.

comment 3mo ago · link · parent

What if you tell the model that you'll be checking for cheating?

comment 3mo ago · link · parent

> If you start here, with the "Postgres will take you wherever you need to go" meme, without thinking extremely deeply about your schema and how you expect to evolve it in the future, you can easily paint yourself into a very difficult and expensive corner.

Yeah, backwards compatibility is not a thing for Java, Rust, C++, etc. :eye-roll:

Meanwhile in SQL if you need to make a backwards-incompatible change to your schema you can always use VIEWs and INSTEAD OF triggers to maintain backwards compatibility for code you've not fixed yet.

comment 3mo ago · link · parent

In two generations North Koreans will be able to walk over to South Korea and admire the ruins. The SK army will be non-existent at that point.

Of course I am referring to SK's .7 TFR.

comment 3mo ago · link · parent

> but then you'll also miss the notification about North Korea commencing artillery bombardment.

Doubt.

comment 3mo ago · link · parent

On the other hand I know how to tell if the underlying idea is good, and if it is I can decide to put up with reading through LLM outputs.

comment 3mo ago · link · parent

I almost always write my own prose, and when I have an LLM write me prose I edit it to make it my own, in my own style, and pithier than the LLM would make it.

I'm not saying everyone must do that. For me it's partly a point of pride, and partly empathy (editing for conciseness is showing empathy for others' time). But I am saying that people should consider doing it.

comment 3mo ago · link · parent

That irony is delicious. Build to WIN32 APIs to ship on Linux.

comment 3mo ago · link · parent

Exactly. I think you're doing fine. It's weird that you're using C++ here, since that brings in a lot of crap, but then your programs are probably C++ anyway, so it's not a problem.

Honestly I'm impressed by this work. It's a thankless thing to have built, it's definitely feasible to build but more work than almost anyone would have been willing to do. What would be even neater is if Musl had this builtin.

comment 3mo ago · link · parent

Perhaps Flock would say that since they were denying the journalist a pass, they should also deny them the room block discount. The hotel could just charge the journalist the difference rather than cancel their room though.

comment 3mo ago · link · parent

Arguably humans need clothing and food a lot more than we need AI.

comment 3mo ago · link · parent

I also see the same, and I suspect it is due to the lack of a precomposition for n̈.

comment 3mo ago · link · parent

Can you fill us in on this history?

My understanding is that decompositions for Latin scripts was just natural typewriter-style constructions, while precompositions for Latin scripts was also natural to simplify table-driven transcoding between Unicode and ISO-8859.

Similar considerations probably applied in the case of Hiragana (I'm guessing) and other scripts.

Besides, combining marks (decomposition) allow for creating new glyphs based on existing ones even where Unicode does not define them.

Once two or more ways existed to write any given glyph the canonical equivalence problem immediately arose, and the UC was aware of it immediately, thus we get two basic NFs (NFD, NFC).

When it comes to the semantics of glyphs, whatever the UC intended is one thing, but how natural language evolves to use those glyphs is another. So to some degree what the UC intended is a footnote, and what matters is how people use Unicode.

comment 3mo ago · link · parent

People already are, and do.

comment 3mo ago · link · parent

Consider ZK password proof protocol: at enrollment (password set / change) the server -or a third party it trusts- knows the password and computes a verifier, while at login time the server uses the verifier to validate that the client knows the password but without the client revealing the password to the server. The client could perhaps have found an alternative password that matches the same verifier, but the ZKPP's security characteristics are supposed to make that exceedingly difficult. Meanwhile, the ZKPP is also supposed to make it exceedingly difficult to recover the password from a ZKPP exchange that any eavesdropper could record.

A non-augmented ZKPP protects the password from eavesdroppers, but the server's verifier is a password-equivalent (though it isn't the password, just a one-way function of it).

A ZKPP is the simplest ZKP application, but others work similarly.

In other words: you're missing everything about ZKPs.

comment 3mo ago · link · parent

> In fact, (semantics aside, from a technical perspective) the preference should always be for modifiers rather than standalone characters [...]

Yes. But the font has to be designed to allow this.

That means that a) lower-case letters must be small enough to allow "overstrike" with diacritical marks to render correctly, b) diacritical marks must be small enough too, c) if you want capitals to also render correctly then the font must have either a set of smaller capitals, or smaller/higher diacritics, and the renderer must scale the capitals and diacritics to fit, or change line spacing, etc.

Also, the 'semantics' for the _human_ reader are the same whether you use pre-composed or decomposed codepoint sequences -- the semantics for the human are about the glyph as rendered and not the details of how that glyph was obtained.

And to be super-pedantic (sorry!), what you call 'modifiers' are called combining marks in Unicode, and what you call 'standalone characters' are called precompositions in Unicode. And it's not necessarily true that the rendering will _in practice_ work better with the former than the latter, but in theory absolutely it is, and in practice it almost always is for _browsers_.

> Difficulties in entering it or typing it out should be mitigated with client-side affordances in the UI, shortcuts, etc.

I really wish Windows would adopt X11-style compose key sequences. Those are incredibly natural for all glyphs that can notionally be constructed via 'overstriking', and historically that is exactly how people did construct those with typewriters. (I don't know, but I suspect that for typesetting it was necessary to have a type for each modified character because having decomposed movable type would probably not have been robust enough.)

comment 3mo ago · link · parent

n̈ renders fine on my browser, but there is no compose-key sequence for it on my system.

I suspect the reason it renders fine is that 'n' in the font I'm using is small enough that the combining mark can be rendered by "overstriking" a diaeresis.

comment 3mo ago · link · parent

> but only as a y with a diæresis

á (á) is also an 'a' with a diacritical acute accent. If you mean that ÿ should not have a precomposition in Unicode, well, why not, especially if it really is used in "a handful of proper nouns in French and Hungarian".

Remember, the reason we have combining marks is that that is in fact how many of these characters were composed in actual use, especially with typewriters. Heck, 1966 US-ASCII / ECMA-6 (1985), section 5, describes the use of backspace/overstrike in US-ASCII for composition of such characters! That comes from typewriter use. And that's where compose-key sequences generally come from, too.

So it's not at all surprising that given that ÿ has _some_ use, therefore a) it is a valid glyph to construct with combining diaeresis, and b) that it has a precomposed codepoint in Unicode.

comment 3mo ago · link · parent

If they are dying of hunger then the most likely cause is overfishing, far far ahead of climate change.

comment 3mo ago · link · parent

I'd rather `intmax_t` be deprecated and marked for removal. It was a terrible mistake.

comment 3mo ago · link · parent

Encrypted state cookies solve real problems (server-side storage, latency, scaling) and are not the problem. The problem is insufficient binding of some of a session's encrypted state cookies and others -- insufficient binding of some session state to other session state. Here we have HTTP encrypted state cookies for identifying authenticate user IDs and maybe for identifying sessions / chats, while the reasoning traces are also encrypted state cookies but not HTTP cookies, and the latter are somehow not sufficiently bound to the former.

The fix is to either have per-user or per-session keys for encrypting reasoning traces, or write the user ID / account ID and maybe also session ID into the plaintext of the reasoning trace _then check that that matches the ones in the HTTP cookies when decrypting the traces_.

comment 3mo ago · link · parent

A bit shocking. One would think that the encrypted reasoning traces -really, encrypted state cookies- would be bound to the session or user, not just the AI provider. That obviously is the fix.

comment 3mo ago · link · parent

Yes, of course, the tail-calling function must recognize that its continuation is a trampoline closure, pop it, then push either a new trampoline or the original closure (if no trampoline would be needed for the particular tail-call being performed).

Do it right and there should only ever be one trampoline closure on the stack for any chain of tail calls, making the scheme O(1) in space.

So the whole protocol is that when the compiler recognizes that a call is a tail call, and one that can be turned into a jump instead of call, then the compiler must emit code to

a) pop the current continuation (which will either be the original or a trampoline that embeds the original, and from which the original can be recovered),

b) pop all the previous arguments and push all the new ones (possibly some are the same, so there is room for optimization here),

and

c) push a new continuation that is either the same as the previous current continuation or else a new continuation closure that is the correct trampoline corresponding to -and embedding- the original continuation, where the original is recovered from (a).

The trampoline recovers the original continuation, fixes the stack depth to what the caller expects, and executes a return to the original continuation.

For variadic functions it has to be the case that they have used `va_start()`, consumed all variadic arguments with `va_arg()`, then called `va_end()`, leaving no active copy of the `va_list`, then the compiler can arrange to keep a hidden local variable count of stack words used by the variadic arguments that it can use to implement the above protocol correctly.

comment 3mo ago · link · parent

In particular it's that if you return the result of a function call, then it's a tail call. For example, in `return f() + g();` neither the call to f() nor the call to g() are tail calls because they return into an expression (`+`) other than `return`.

If you scroll up you'll see a discussion of how the caller does the popping of arguments it pushed, so it has to be the case that if a different number of arguments were needed for a tail call then the caller will still pop the correct number of arguments, and that is where the complexity lies: because the caller does not actually know anything about the called function's tail call details, so how does one cause the correct thing to happen? One way is by changing the calling conventions radically to ensure that either the called function cleans up the arguments before returning, or that the number of bytes to pop is effectively part of the return signature of the function (with the caller somehow being careful to check that the advertised number wouldn't destroy its frame), or just arrange to leave exactly the number of bytes on the stack that the caller expects even if one tail-calls a function that would leave a different number of bytes.

comment 3mo ago · link · parent

The trampoline must indeed be a closure, but let's say you have a chain of main() calling f() tail-calling g() tail-calling... in all cases needing a trampoline, and some being [mutually, even] recursive, and even variadic: there is only ever one live closure: the return to the main() call site to f(), so there is no unbounded stack growth due to tail-call recursion.

The trampoline would replace the {main retaddr, main fp} closure with {trampoline addr, [stack byte count to pop], main retaddr, main fp} and would pop some number of bytes, either hard-coded into the the trampoline function (so you get a bunch of them) or is part of the closure.

comment 3mo ago · link · parent

I would expect a way to interrupt super-long-running instructions would be the better option, even if it was not fully backwards-compatible (say your process executing long-running instructions gets killed).

comment 3mo ago · link · parent

Well, shit.
1
111213
292