character sets
notes:
• ascii compatibility is assumed
• this is just the mandatory set of formatting characters and the alphabetic ones; i’m still working on punctuation and symbols
• this is a variable-width-compatible encoding, so each codepoint has 80–9F or E0–FF as its first byte and A0–DF as its second
@coriander i don’t think Game Freak should stop caring about competitive pokémon but i do think Game Freak should make more pokémon noncompetitive
electrode shouldn’t learn electric-type moves. ledian shouldn’t learn bug- or flying-type moves. they are cowards for not sticking to this bit
@wallhackio listen to SPECTRA by CHIPZEL https://chipzelmusic.bandcamp.com/album/spectra
horror story
@catalina getting into an argument with a computer about whether genderbent harry/louis counts as femslash
meta poll boosts appreciated
@noracodes it still wouldn't reach instances that didn't have my followers on them, but that's acceptable to me
meta poll boosts appreciated
@noracodes oh i might be conflating two things with my reply
what i personally care most about is letting post authors remove replys from appearing alongside the post. there's no reason why one couldn't federate that removal
that's different from implicitly only allowing replies from certain people. but you could, i suppose, automatically federate a removal of replies from anyone you didn't want to allow
meta poll boosts appreciated
@noracodes if the limit federates to servers my friends are on, and they respect it, i really don't care about the servers my friends aren’t on showing other posts
re: the thing about javascript
@noracodes so the thing is that a javascript literal like :—
{
a: "value",
get b () {},
set b (x) {}
}
—: is actually creating a data structure like
{
[[Prototype]]: %Object.prototype%,
"a": {
[[Configurable]]: true,
[[Enumerable]]: true,
[[Writable]]: true,
[[Value]]: "value",
},
"b": {
[[Configurable]]: true,
[[Enumerable]]: true,
[[Get]]: function () {},
[[Set]]: function (x) {},
}
}
a bit of code like :—
a.b = c.d(e)
—: is actually performing something like
a.[[Set]]("b", (
c.[[Get]]("d", c).[[Call]](c, e)
), a)
the more easily you can translate the javascript syntax into the actual underlying thing it is saying to the javascript runtime, the more flexibility you have in actually doing interesting things in the language. because that underlying thing is what the javascript runtime is actually running! and it’s generally a really flexible and powerful model (if you like the specific mix of functional and object‐oriented paradigms that JS rolls with).
but it takes a lot of time and kind of difficult work to gain that understanding. most people come to javascript bringing their own models of what the syntax is saying (usually simpler ones influenced by whatever other languages they know), and that works pretty well to start, but eventually people hit a wall where they are only writing the parts of javascript which are shared with other languages, and not writing the parts of javascript which are unique to javascript (because they don’t understand the underlying model of javascript to really grok the parts that are unique to javascript). gaining that understanding at that point can be really difficult because then you have a whole history of assumptions to unlearn.
i really wish that people spent more time teaching people what JS code was actually saying earlier, so that the models in people’s heads better matched the model actually being used by the runtime and in the specification.
@noracodes (but if you have
class A {}
A.prototype.value = "etaoin"
const a = new A()
a.value // "etaoin"
a.value = "shrdlu"
a.value // "shrdlu"
this creates a new data property on `a` instead of modifying the existing data property on `A.prototype`. this is more information than you were asking for tho haha)
@noracodes (actually, i think what is easy is shadowing data properties with other data properties, i think shadowing accessor properties is intentionally hard precisely so that things like Object.assign don’t accidentally do it)
@noracodes yeah, getters and setters are applied at a very low level in JS/TS
technically the way to understand it is that there are two kinds of properties, “data properties” and “accessor properties”. data properties have values. accessor properties do not have values, they only have accessor methods. so *anything which tries to modify that property will go through that method
(* of course, because things aren’t quite that simple, it is possible [altho hard] to overwrite an accessor property with a data property, and also possible [and somewhat easier] to shadow it further down in the prototype chain. but most JS methods do not do this)
@noracodes (if you copy and paste this code there is an invisible character after the hashes to prevent them from becoming hashtags)
@noracodes i’m wondering if this is broadly the pattern you’re looking for or if there’s more here that i am missing?
class Pokémon {
#type
constructor(data) {
Object.assign(this, data)
}
get type() { return this.#type }
set type(x) {
if (!["Normal", "Fighting", "Flying", "Poison", "Ground", "Rock", "Bug", "Ghost", "Steel", "Fire", "Grass", "Water", "Electric", "Psychic", "Ice", "Dragon", "Dark", "Fairy"].includes(x)) throw new RangeError("Invalid type");
else this.#type = x;
}
}
new Pokémon({type: "Fire"});
new Pokémon(JSON.parse("{\"type\": \"Fire\"}"));
new Pokémon({type: "Bird"}); // error
@noracodes by deserialize directly into a class, is Object.assign(struct, { field: "my_data" }) what you mean / are looking for?
Administrator / Public Relations for GlitchCat. Not actually glitchy, nor a cat. I wrote the rules for this instance.
“Constitutionally incapable of not going hard” — @aescling
“Fedi Cassandra” – @Satsuma
I HAVE EXPERIENCE IN THINGS. YOU CAN JUST @ ME.
I work for a library but I post about Zelda fanfiction.