Better HN
topnewbestaskshowjobs
Log inSign up

debugnik

2,570 karma · joined May 8, 2019 (7y ago) · 1,261 submissions

Submissions

comment 2y ago · link · parent

Nah the anti-copy features are a lame plugin called wp-content-copy-protector. Stupid-easy to bypass.

comment 2y ago · link · parent

It's worse than that, they're using some lame WordPress plugin called wp-content-copy-protector to hijack shorcuts to copy or view source as well. Really hostile and yet ridiculously easy to bypass.

comment 2y ago · link · parent

So your first answer to being told your initial suggestion is insufficient for bounds-checking was to share a godbolt link without elaborating on where the checking was actually coming from; and when I elaborate, for other readers' sake, not yours, on your solution and other comparable ones, you get defensive and repeatedly call me pedant. Ok, but you know, these discussion are for everyone else to read and maybe learn something too, not just us.

As for the bounds-checked accessors, I mentioned them because they already exist in current C++ for other collections, they're coming to the one you suggested using, and I thought them relevant to a discussion about C++ lacking spatial safety.

comment 2y ago · link · parent

It does, on explicitly bounds-checked accessors like .at, which span is gaining for C++26.

But you originally implied using span was sufficient, you didn't mention LLVM's libc++ hardening. (You even mentioned iterators which, I just quoted, might not be bounds-checked on fast mode either.)

comment 2y ago · link · parent

You've compiled with _LIBCPP_HARDENING_MODE_FAST, which still adds some extra checks not required by the standard.[1] You can also tell it's nonstandard because it doesn't really throw out_of_range, it just traps.

> Fast mode, which contains a set of security-critical checks that can be done with relatively little overhead in constant time and are intended to be used in production.

> Using std::span as an example, setting the hardening mode to fast will always enable the valid-element-access checks when accessing elements via a std::span object, but whether dereferencing a std::span iterator does the equivalent check depends on the ABI configuration.

1: https://libcxx.llvm.org/Hardening.html

comment 2y ago · link · parent

I think they meant Facebook switched their PHP code to Hack and HHVM, their own PHP-like language and implementation.

comment 2y ago · link · parent

I'd think so too, but a top comment mentions hundred dollar offers for the author's extensions. I guess some devs will take that over earning nothing from an extension.

comment 2y ago · link · parent

It doesn't show him, but I found warming this video [1] of his guild singing together during a video chat with him, as he couldn't join them. It was shared by a guild member under the parents' last post to his blog, which is linked in the article.

[1]: https://www.dropbox.com/s/2leimccyacl7wlg/With%20Ibelin%20DK...

comment 2y ago · link · parent

You're assuming people will create content to consume it, and not just to spam various platforms, competing for attention. Most of it might only be ever consumed by crawlers, if at all.

comment 2y ago · link · parent

> The Erlang string type is implemented as a single-linked-list

This refers just to Erlang's string() type, not BEAM strings in general; it's just a bad default. If you're not using binaries, you're doing it wrong, and that's exactly why Elixir's strings are UTF-8 binaries.

comment 2y ago · link · parent

Unlike linking to Nicholson's socials from your HN account, which would totally count as proof...

We simply aren't discussing how to prove his identity, just how to contact him (or whoever he could be impersonating) when he didn't provide contact info.

comment 2y ago · link · parent

In my experience, Rider's support for F# is much more stable and usable than Ionide, or even Visual Studio proper.

comment 2y ago · link · parent

True, but googling soufron brings up a popular lawyer with that last name, whose social media and website use the same handle, and even has a wikipedia page. So I'm assuming he knows he's easy to find.

comment 2y ago · link · parent

No way, the article consistently refers to the assembler syntax as "Plan9" throughout the text and title and they talk about "x86 Plan9" and "arm Plan9".

Considering there is no introduction at all to this beyond "I discovered it's called Plan9", I'm assuming the author really thinks this is a language widely named "Plan9".

comment 2y ago · link · parent

Mozilla refused to support it because then every implementation would have simply used SQLite, which would have promoted any implementation details to a de facto standard. (Even caniuse erroneously describes the feature as "allows SQLite database queries".)

From the latest spec [1]:

> The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path.

[1]: https://www.w3.org/TR/webdatabase/

This won't be a problem for wasm SQLite because it isn't a standard being shipped by browsers, just another dependency.

comment 2y ago · link · parent

> And the reason is “for digestion”.

This is an excuse a few use to justify drinking wine when they know it's "otherwise" unhealthy, but most people here who drink do so simply because they like it.

comment 2y ago · link · parent

That was my first thought, how did they not consider sticky keys?! It even makes a sound! The prompt triggers on the fifth press but it's easy to have had already queued two presses beforehand.

This risk is much worse than whatever layout differences and interactions with VoiceOver they observed for Control.

comment 2y ago · link · parent

I googled RKRM and this repo was the top software-related result; I had to read the PDF to realize it stands for (Amiga) ROM Kernel Reference Manual.

comment 2y ago · link · parent

If I'm reading your post correctly, I meant the opposite, he's still better off dismissing AI content even if some of it gets through.

But even the case I think you suggest, dismissing some human works because they feel AI generated, won't undermine anyone's livelihood: All audiences dismiss works based simply on their tastes, and "feels like AI" is just a new distaste to account for, independently of AI being involved or not.

comment 2y ago · link · parent

So what if his criteria has false negatives? AI or not, ignoring noticeable slop will be a net positive.

comment 2y ago · link · parent

> I am willing to entertain the idea that

You better do, literally every authoritative description of web components lists shadow DOM, custom elements, and template. And the last one is kind of a remnant of the push for HTML imports, which went nowhere, and is currently insufficient for anything you'd use React for, so its main value now is how it's being repurposed for declarative shadow DOM.

So, personally, I'd say they're about shadow DOMs and custom elements, whether that's useful or not; I'm not convinced either!

comment 2y ago · link · parent

The name of the template tag is misleading, I agree: It separates the shadow DOM elements, the "template", from the light ones, the children slots.

Different server-side instances of the same components won't necessarily render the same shadow tree, so client-side reuse was out of the question for declarative shadow DOM. But unlike client-side template, you get to paint components much sooner, during the parser, or even without JS enabled.

As for why a shadow root instead of the markup directly, well, that's kinda like asking why use web components at all, which I thought was part of the premise of this reply chain.

Even without JS, the shadow DOM gives you scoped CSS and isolates the shadow elements from outer DOM and CSS selectors. And custom elements, the other half of web components, can be used in HTML before defining them in JS, at which point you get to enhance the entire page at once, so now you can progressively enhance properly isolated components possibly written with different frameworks.

comment 2y ago · link · parent

You've ignored the part where the declarative template is immediately attached to its parent as a shadow root by the parser, and its siblings become the slot children. You don't need to instance or register anything with JS there, just copy-paste the template (admittedly lame, but kinda the same repetition as SSR today, just less involved and with a shadow root).

comment 2y ago · link · parent

What, exactly, is wrong? I need actual replies to continue a discussion.

This is a declarative shadow root [1]. The template goes next to its slot contents, so you can render both separately on the server and let the HTML parser attach the shadow root, without JS, then use JS custom elements to progressively hydrate it.

[1]: https://web.dev/articles/declarative-shadow-dom#how_to_build...

comment 2y ago · link · parent

Your link isn't showing the declarative shadow DOM, this does:

https://web.dev/articles/declarative-shadow-dom#how_to_build...

And the example below that one shows how to hydrate declarative shadow roots with JS custom elements, so the path to progressive enhancement should be clear.

I say alleged because I haven't had the chance to try it beyond a toy example.

1
313233
43