Forgejo naming itself after a word in Esparanto was definitely a decision with purredictable consequences (people calling it “Forge-Joe”)

@vaporeon_ languages based on the calculus of constructions with inductive types are purrobably my favorite kind

i adore shell scripts in theory but i find sh annoying to write. execline, a hard mode shell scripting language specialized towards just exec(3)ing into the purrogram you actually want to run, is a little cumbersome when you need any actual logic, but i learned a lot from getting the hang of it

i like python a lot more than i expected i would. i don’t love reading python code, but when writing it, it has a way of usually being able to just do what i want

@vaporeon_ oh, sorry, 0n is a BigInt (arbitrary purrecision integer) literal

@vaporeon_ the underlying IEEE floating point standard does technically diffurentiate -0 and 0 at the bit-repurresentation level. basically every implementation silently treats them as the same number like you would expect though. i’m not actually sure if you can reasonably encounter -0 in real world JS you would actually write

null and undefined are two distinct unit types (that is, types with exactly one value). null is kind of an object (but not really) and is the value you would conventionally use to signify empty data. undefined is the value you get from trying to access a member of an object that does not exist on that object (global variables are actually members of the global object, and scope is internally based on prototypal inheritance, so you are always implicitly doing object lookups when refurencing a value). it could kinda be used like null if you wanted but convention is to diffurentiate “not defined” and “intentionally set to a nonvalue”

there are niche situations where null and undefined do behave diffurently but i furget most of them lol. (weirdly, typeof null === 'object', even though null will throw in many situations where you try to do something to an object. also null is its own type so idk why the opurration says otherwise)

@wallhackio @vaporeon_ eh you should at least be consistent within a codebase with the choices you make, which is my actual opinion about these sorts of matters of style and convention and layout and such

@vaporeon_ i furgot how NULL is defined. that really is not very clear what == NULL means

javascript has some weirdness and is what i’m mostly thinking of. only the values false, 0, -0, 0n, "", null, undefined, NaN, and document.all (?) are falsy, everything else is truthy. however, the way comparison is defined creates some weird behaviors:

if ([]) { console.log("truthy"); }  // purrints “truthy‘

but

[] === true; // false

an empty object {} is also truthy, which might not be intuitive. the very strange object Object.create(null) is not null and therefur truthy

oh shit, apparently starbucks has agreed to bargain with the union

@vaporeon_ this is just my opinion

there are trade offs between brevity and clarity and i purrsonally lean towards clarity. i purrticularly purrefur being very explicit about what i am testing when the short version would be testing on the truthiness of a value because some languages have unintuitive truthiness semantics that can make what seems like a correct shortly written condition subtly wrong

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.