Better HN
topnewbestaskshowjobs
Log inSign up

debugnik

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

Submissions

comment 3y ago · link · parent

They mean AsyncLocal<T>, which ties its storage to the current thread-local ExecutionContext. When await schedules a continuation, the ExecutionContext flows with it and is set before resuming, so the AsyncLocal values flow through async methods even if the task switches threads.

comment 3y ago · link · parent

> I can't believe they thought this was a good idea

I don't think they originally intended to make players minmax entire teams, but to give an edge to those who spent some time training and breeding the right way.

Anyway, most people I've met who played at tournaments either admitted (privately) to using hacked Pokémon or denied it while blatantly using a full perfect IV team with some shiny. (I've think they're cracking down on hacked teams harder now, though.) So I think anyone still grinding for their dream team is actually doing it for fun.

comment 3y ago · link · parent

Maybe their scrapper is so bad it actually captured "mailto:example@..."

comment 3y ago · link · parent

The "star" in A* means optimal (as in actually proven to be optimal, so they could stop publishing A^[whatever] algorithms). I assume either Q* is considered optimal in a way regular Q-learning isn't, or they're mixing Q-learning with some A*-like search algorithm. (Or someone picked an undeserving name.)

comment 3y ago · link · parent

No spoilers then, but the ending of Alyx does retcon the old cliffhanger.

comment 3y ago · link · parent

> it also creates some new issues (screen sharing, hot key apps, etc), but they're being actively worked on and are very close to being completely solved.

I swear I've been reading this for a decade.

comment 3y ago · link · parent

I doubt he would've, half the point of Turing's paper was to stop people from debating what is or isn't "thinking" and to focus on the actual capabilities instead (like passing the test). He specifically wrote:

> "Can machines think?" I believe to be too meaningless to deserve discussion.

So I don't think he would've appreciated such a fuzzy concept as AGI.

comment 3y ago · link · parent

Nice, although I'm mostly concerned about the fact that they didn't bother to mention it. I know it isn't too popular, but it's still a part of the toolchain and not in maintenance mode like VB.NET is.

comment 3y ago · link · parent

They link to "Announcing C# 12", but not a single mention of F# and "Announcing F# 8"[1], huh? (Edit: At least there's a link now.)

It actually addresses several warts (finally span pinning!), brings some new shortands, makes the syntax more uniform and comes with some performance improvements as well.

[1]: https://devblogs.microsoft.com/dotnet/announcing-fsharp-8/

comment 3y ago · link · parent

Just to be clear, MonoGame has existed and been open source for a really long time now, and it's a mostly compatible successor to Microsoft's XNA; it's more of a platform abstraction library than a game engine, although it fills a really sweet spot between using engine and starting from scratch, IMO.

There's also FNA, which is more focused on being an accurate reimplementation of the original XNA on top of exclusively OSS libraries and open APIs, although you can use it to make new games as well. Some games have actually used both to target different platforms in the past, as MonoGame is arguably buggier.

comment 3y ago · link · parent

That's not it, I mean the "declare" statements that aren't even listed in the grammar, but are needed to give the type checker information about C API exports; I had to discover them by digging through source code. The analyzer even hardcodes a bunch of them.

luau-lsp for example ships this globalTypes.d.lua file[1] for Roblox development and lets you configure your own.

[1]: https://github.com/JohnnyMorganz/luau-lsp/blob/4b7872349d9b8...

comment 3y ago · link · parent

Yet another team that switches to Luau for scripting; they even made their own VS Code extension.

I gave Luau a try recently but the syntax for external type declarations is undocumented and unstable, which made it awkward to test properly, and the available VS Code extensions default to a Roblox environment until you mess with their settings.

So mixed feelings for now, I guess this is why they built their own tooling for it.

comment 3y ago · link · parent

I don't think so, OCaml consistently calls them "variant types". I don't know who wrote that page, but that wiki didn't even exist before September and it isn't endorsed by ocaml.org, so I suggest you don't consider it authoritative.

comment 3y ago · link · parent

Or take the SQLite route, if you don't need to reject strictly invalid JSON5. When they extended SQLite's JSON parser to support JSON5, they specifically relaxed the definition of unquoted keys (in a compatible way) to avoid Unicode tables[1]:

> Strict JSON5 requires that unquoted object keys must be ECMAScript 5.1 IdentifierNames. But large unicode tables and lots of code is required in order to determine whether or not a key is an ECMAScript 5.1 IdentifierName. For this reason, SQLite allows object keys to include any unicode characters greater than U+007f that are not whitespace characters. This relaxed definition of "identifier" greatly simplifies the implementation and allows the JSON parser to be smaller and run faster.

[1]: https://www.sqlite.org/json1.html

comment 3y ago · link · parent

Tay was presumably the English version of XiaoIce, which apparently has its own paper[1]. It states that they combined a Markov decision process to select between conversation modes, a retrieval-based response generator for curated answers and a GRU-RNN[2] response generator for free-form ones.

[1]: https://arxiv.org/pdf/1812.08989.pdf

[2]: https://en.wikipedia.org/wiki/Gated_recurrent_unit

comment 3y ago · link · parent

That discussion must have been really long ago, otherwise you missed the point. Since Lua 5.0 (2003) tables are implemented as a pair of an array and a hashmap, and the array part can even handle small nil gaps. So tables used as arrays are implemented as arrays as well.

comment 3y ago · link · parent

If only the CLR had followed CLR footsteps as well, but they didn't even try after the DLR. Most non-Roslyn languages can barely interact with modern C# or the newer build configurations; even F# is playing catch-up and they're part of the official toolchain.

comment 3y ago · link · parent

You talk as if an AI was its own lifeform that just happened look like her. (AI rights at this stage, really?) But this is just a company blatantly using her image to promote an app, the AI is irrelevant:

> The ad, reviewed by Variety, begins with an old clip of Johansson behind the scenes of Marvel’s “Black Widow.” Johansson says, “What’s up guys? It’s Scarlett and I want you to come with me…” before a graphic covers her mouth and the screen transitions into AI-generated photos that resemble the actor. A fake voice imitating Johansson then continues speaking, promoting the AI app.

comment 3y ago · link · parent

> 2. If a major state-level CA was discovered to have issued a mitm cert, would browser vendors really take the commercial hit of removing or distrusting their root cert?

Pretty much every browser distrusted the root certificate from Spain's FNMT-RCM for a decade, so I think the answer's yes.

comment 3y ago · link · parent

I don't think so. Rather than removing the global lock and breaking existing code, OCaml 5 introduces a new primitive called a "domain" which manages one or more threads with a shared lock.

So the existing threads API spawns threads in the current domain, which lets you isolate code that expects to take the lock, while new code can spawn new domains starting with one thread instead. You can also use both deliberately as a form of scheduling.

Python instead is trying to make the lock entirely optional, globally and outside the control of library writers. However, I think the Python lock is only guaranteed to protect the runtime itself, so most code depending on it is probably buggy anyway, so I think their plan is viable.

The only thing they may have in common is having to scan the entire codebase of their runtimes for unexpected shared state and fix that, as well as revising their C ABIs.

comment 3y ago · link · parent

Oh, noted. I guess Rust uploaded old releases to GitHub at some point during 2020, then.

comment 3y ago · link · parent

try! was added in 0.10 (2014), and ? was stabilized in 1.13 (2020), according to my quick check on GitHub releases. Note that the underlying traits to implement ? on custom types are still unstable.

comment 3y ago · link · parent

You used quotation marks but searching for this text only links back to this HN page. Is there more context to that quote or did you just write it?

comment 3y ago · link · parent

MonoGame is a rather shallow abstraction over DX9/10 era APIs, I don't think it's fair to say it "takes care" of much beyond wrapping some platform dependent code. The content pipeline in particular ranges from painful to unusable.

comment 3y ago · link · parent

Most of those screens below 1080 aren't old monitors, they're budget laptop screens, specially 1366x768.

comment 3y ago · link · parent

Reminds me of a mistake in Spanish in a TomTom device I have around: "AP" stands for autopista (motorway) but it reads "AP" aloud as apartado postal (PO box).

comment 3y ago · link · parent

Except these kind of guides have been available for over 15 years. Maybe now it'll be harder to find the genuine ones, though.

comment 3y ago · link · parent

> Also the first person to invent Ctrl+F for video will be a billionaire.

At least YouTube (desktop web) lets you open the (often auto-generated) captions as a transcript on the side.

comment 3y ago · link · parent

Oh, right, on the readme! That's so weird, because it kinda contradicts the "general conditions for use" document. I guess they mean the source code is ok to use but you must alter the design first? The UK's doesn't have such a dumb limitation.
1
353637
43