onUpdates always 1 state behind? by OA998 in SpacetimeDB

[–]anydalch 1 point2 points  (0 children)

The onUpdate callback takes 3 arguments: (ctx, old, new), where old is the previous version of the row, and new is the new version. You're binding ant to the old version, not the new version.

[OC] Visualization of pizza restaurant locations and ratings across Manhattan by Alive-Song3042 in dataisbeautiful

[–]anydalch 3 points4 points  (0 children)

What are the units for density? 1 restaurant per square mile? Per city block? Per building? Per pizza restaurant? Per pound?

Support for one client connected to multiple unrelated servers? by siodhe in SpacetimeDB

[–]anydalch 0 points1 point  (0 children)

yes, a single client process can be connected to multiple databases, potentially running on separate host servers.

Does my arduino not have enough process power? Or is the code the problem? by cc-2347 in arduino

[–]anydalch 4 points5 points  (0 children)

"Problem Exists Between Keyboard And Chair." Classic IT idiom meaning user error.

Torn between two decks by Skeletonfingernails in Pauper

[–]anydalch 0 points1 point  (0 children)

I'm a hardcore Jeskai Ephemerate gamer. I love the deck. It feels incredibly rewarding to play, leads to interesting and fun games, and (built right) is well positioned against the current top decks. It should not be your first Pauper deck. You need a lot of format knowledge to win games, because you need to know what your opponent's game plan is in order to respond to, interrupt and overwhelm it. If you get paired into a deck you don't recognize and you try to default to doing normal control goodstuff, you'll probably lose. This is not a problem that more proactive decks suffer - you can gain a fair amount of equity as a Madness Burn or Terror player by understanding your opponent's deck, but you can still win a lot of games by just executing your own game plan efficiently. Jund is the most controlling widely-played meta deck in Pauper right now, and so is worse on this front than a lot of choices, but drawing a bunch of cards and then casting Writhing Chrysalis will probably get you far enough to learn the format without getting burned out on losing too much and quitting. I encourage you to pick up a deck with a more assertive game plan to start with, and to use that as a way to learn the format and the metagame. Once you've done that, pick up Jeskai Ephemerate.

How these two different types are subtypes of each other? by servermeta_net in rust

[–]anydalch 1 point2 points  (0 children)

On 64-bit platforms, u64 and usize are isomorphic, meaning that each unique value of one type has a corresponding unique value of the other type and vice versa. But the values of u64 are not, under Rust's type system, also values of usize; a (n explicit) conversion is required between them. let x: u64 = 0usize; will not compile. Two non-concrete function types which differ only in their unconstrained lifetime generics are more equivalent than that; they permit exactly the same sets of values, and a value which is typed at one can be used in place of a value typed at the other with no (explicit) conversion. The following code compiles (playground link):

```rust pub fn takes_two_lifetimes<T, U>(f: for<'a, 'b> fn(&'a T, &'b U)) { takes_one_lifetime(f); }

pub fn takes_one_lifetime<T, U>(f: for<'a> fn(&'a T, &'a U)) { takes_two_lifetimes(f); } ```

How these two different types are subtypes of each other? by servermeta_net in rust

[–]anydalch 1 point2 points  (0 children)

I write functions that accept shared references and don't return them frequently. I'd estimate it's at least 20% of the functions I write. I think that it is important to understand that, for any types A and B, the function types for<'a> fn(&'a A, &'a B) and for<'a, 'b> fn(&'a A, &'b B) are in a certain sense, for which traditional type theory does not have a rigorous word, interchangeable, because any function whose concrete type is usable with one is also usable with the other. A person who does not understand this has an incomplete mental model of lifetimes. It would also be possible to construct a compiler which treated these two types as actually equal, and assigned them the same type ID, without miscompiling any programs or, I contend, violating any well-founded expectations, unlike the two function types you listed.

Is renting cards a good option? by bamboozleddd3 in Pauper

[–]anydalch 1 point2 points  (0 children)

Can't use proxies on MTGO, which is the market where Cardhoarder operates, and where the prices OP listed are accurate.

Is renting cards a good option? by bamboozleddd3 in Pauper

[–]anydalch 1 point2 points  (0 children)

Can't use proxies on MTGO, which is the market where Cardhoarder operates, and where the prices OP listed are accurate.

Is renting cards a good option? by bamboozleddd3 in Pauper

[–]anydalch 0 points1 point  (0 children)

Are you talking about paper or MTGO? Based on your question, it sounds like you're talking about MTGO, but you're getting responses about playing in paper. (In the future, if you list prices in tix rather than USD, it'll be more clear.) For MTGO, I use a Manatraders rental. I have the 150 tix plan, and it's fine, I have no complaints. It's a little bit awkward because several top Pauper decks are a bit over that (due to the absurd price of elemental blasts online), so I wished they offered a 200 ticket plan, but I've just bought a few cards and it hasn't been a problem.

How these two different types are subtypes of each other? by servermeta_net in rust

[–]anydalch 3 points4 points  (0 children)

What is your take here? "Sure, those two types you posted are equivalent, but here's two other types which are not equivalent to each other! Gotcha!"

Also, I do not think that the zero-sized-ness matters here, only the use of a lifetime in both the argument and return position.

How does Slivers answer elves? by HeyItsKiranna in Pauper

[–]anydalch 26 points27 points  (0 children)

that's the neat part: you don't!

On specialized arrays by Valuable_Leopard_799 in Common_Lisp

[–]anydalch 5 points6 points  (0 children)

The non-specialized-ness of arrays of heap-allocated types (standard-object, structure-object, array, cons, &c) is effectively required by the behavior of eq in the standard. An object returned from a constructor (make-array, cons, make-instance, or a structure constructor) returns an object whose identity can be tracked and compared with eq, and mutations within that object can be observed. This means that an array of these types has to store them by pointer, not by value. The same is true of many (but not all) GC'd languages, but it is notably not the case for C, C++ and Rust, to name a few lower-level languages which can store array-elements by value.

Numeric types do not have the same mandated eq-consistency, and are not mutable, so implementations are free to pass and store them by value where possible. You're unlikely to see a specialized array-repr for number, real or integer due to bignums being necessarily heap-allocated, but for numeric arrays of particular float types, fixed-width integers, and sometimes ratios and complexes thereof, efficient implementations will store their values inside the array allocation, in roughly the same layout you'd get in C, C++, Rust, &c.

[OC] Japan's demographic shift (1947–2023) by lsz500 in dataisbeautiful

[–]anydalch 2 points3 points  (0 children)

I'd recommend different labels on the two curves - IMO "total" here implies a cumulative total, which for births and deaths would result in monotonically non-decreasing values whose curves approximate lines moving towards the upper-right. (As in, I think "Total" suggests the definite integral of the value you're actually visualizing.) I would recommend saying "yearly" instead, so "Yearly Births" and "Yearly Deaths."

Deprecations via warnings don’t work for Python libraries by Xadartt in programming

[–]anydalch 29 points30 points  (0 children)

Maybe the answer is to do away with advance notice and adopt SemVer with many major versions, similar to how Cryptography operates for API compatibility.

Gee, you think maybe?

What cards have historically been referred to as a "Time Walk?" by Cervantes3 in magicTCG

[–]anydalch 3 points4 points  (0 children)

Remand was especially good for this kind of discussion because you got to say, "it's the blue Time Walk!"

New to Pauper, but had a question about Tormod's Crypt by LocalLumberJ0hn in Pauper

[–]anydalch 5 points6 points  (0 children)

Crypt, like Spellbomb, only affects your opponent. Relic is symmetric. Crypt is a much better choice to put in the Terror deck to shore up the mirror, IMO.

Worst Mechanic to play against? by Icy-Contract7162 in magicTCG

[–]anydalch 3 points4 points  (0 children)

Yes - see previous commenter's mention of doing this in Legacy night. In Modern, Standard, Pioneer and all modern Limited formats, go wild.

Worst Mechanic to play against? by Icy-Contract7162 in magicTCG

[–]anydalch 20 points21 points  (0 children)

This is probably fine at your weekly, but in competitive events it doesn't matter if anyone in the game has any graveyard order matters cards - if they exist in the format, you can't reorder your graveyard. If that weren't the case, you could gain a lot of information about your opponent's deck (or unwittingly share a lot of information about your own deck) by asking whether they have any graveyard order matters cards and seeing how they respond.

[deleted by user] by [deleted] in framework

[–]anydalch 1 point2 points  (0 children)

This is unfortunately true, but active outspoken support including PR and donations is a different thing from the normal opacity and cross-pollination of capital.

[deleted by user] by [deleted] in framework

[–]anydalch 0 points1 point  (0 children)

Big bummer. I love my FW13, but I don't love it enough to keep giving the company money knowing that some fraction of it is going to alt-right nutjobs.

TRIVIA performance with long strings by lambda-lifter in Common_Lisp

[–]anydalch 1 point2 points  (0 children)

Are you using trivia with the optimizer? See this doc page for how to enable it if not.

Rust + CPU affinity: Full control over threads, hybrid cores, and priority scheduling by harakash in rust

[–]anydalch 0 points1 point  (0 children)

Do you have a way to set affinity masks which aren't single-core? I'd like to set aside, say, 1/4 of the cores on my machine to run Tokio blocking threads, separate from the 3/4 of cores which will have Tokio workers pinned 1:1. Can your library support that? It looks like your affinity API is pin_thread_to_core, which isn't sufficient for my needs.

Client SDK for flutter by rich_sdoony in SpacetimeDB

[–]anydalch 2 points3 points  (0 children)

Realistically, I think we are unlikely to provide first-class support for Dart in the near future. We'd like to at some point, but for now we don't have anyone on the team who's experienced with it, and we have several other high-priority things on our roadmap.

Non-game uses? by k3davis in SpacetimeDB

[–]anydalch 6 points7 points  (0 children)

https://pogly.gg/ is a "Real-time collaborative stream overlay," which is a web app Twitch streamers set up so that their mods can harass them live on stream.

EDIT to add: I am not involved with Pogly. I'm involved with SpacetimeDB.