Show newer

My support for xml:lang to ensure Rhapsode pronounces your language correctly I'd count as internationalization work.

As for ensuring Haphaestus can render text in your language correctly, which would probably be the bulk of the effort there. Then there's integrating clientside machinetranslation...

Internationalization comes up as a concern a lot in my browserdev work, but I rarely have to write text of my own!

2/2 Fin

Show thread

Software freedom means the tools of modern society are equally given to everyone, who must choose to use them for good or ill.

And we should soundly reject those who choose the latter.

Show thread

When it comes to internationalizing Rhapsode, I find the experience somewhat unusual compared to other projects. My focus is less on making sure my own code can speak your language (though I have been working on error messages a bit recently!), but rather making sure other software can do so! Which so happens to include mine.

Things like the fact that I send an Accept-Language header on HTTP requests! Or looking up the appropriate messages in the databases I consult. Or :lang() pseudoclass.

@be I saw a HN comment that claimed a major motivation behind the "copyleft is virus" propaganda campaign during the early 2000s was due to the fear that, if an employee ever sees copylefted code online, gets "inspired" by it, consequentially the entire company software would be at the risk of copyleft violation and source code disclosure. This anti-copyleft hysteria largely went away after people realized the risk is negligible.

Unfortunately the situation was pretty ironic in hindsight, since it's actually the entire free software community that is living constantly under the same threat caused by leaked proprietary source code, not the other way around...

Then iterates over the GC linkedlist multiple times tweaking generations, freeing all objects still left marked "white". A full collection first marks everything white before marking, propagating, & sweeping.

Additionally linkedlists are used to locate weak keys & weak values to postprocess.

The GC is split into "iterations" I'm not fully comprehending, but when you reference a formerly young-generation object the old generation they're involved.

11/11 I'll skim rest tomorrow...

Show thread

⛔ Some people think that if they just keep trying enough times to write into , the world's problems will all disappear.

🎁 Others of us know that - for everyone, yes, even our enemies - is the only proven way to guarantee can be used to protect , fight , and save the and ourselves.

:boost_requested: If you think more people should realize the difference.

"To effectively resist cooptation and expand our movement, we believe we need to build on the FOSS movement with an explicitly anticapitalist political movement which proactively collaborates with other movements for justice." cooperativetechnology.codeberg

Metatables may instruct whether to propagate marks to a table's keys and/or values. If a value for a slot's nil the corresponding key's replaced with a special tombstone value.

It propagates marks again after specially handling closures, & propagates marks for "write barriers" seperating the generations. Then handles weakkeys propaging marks to weakvalues, & considers currently currently scheduled finalizers.


Show thread

Lua's optionally-generational stop-the-world tri-colour GC is conditionally triggered upon allocating a closure, table, or concatenated string. At which point it hueristically/configurably considers whether to do a young or full collection.

Collection involves marking a couple root objects gathering an initial "graylist". Aided by a linkedlist field on tables, Lua & C closures, threads, prototypes, & some C pointers. Then it propagates these marks specially for each of those types.


Show thread
type of youtuber guy who builds his own cpu and assembly but doesn't acknowledge any OS other than windows exists

Correctly & deallocating memory is a pain, which can easily lead to security vulnerabilities, most languages (except C, Assembly, etc) want to save you from! The popular way of doing this is to have a "garbage collector" (GC), whereby the language's runtime traverses & flags all "live" references in the heap to free the rest.

Lua tracks a type-tagged singly-linkedlist of all objects in its heap, with bytes available for this flagging & tracking GC "generations" for stop-the-world GC.


Show thread

Internally Lua tables are open hashmaps conjoined with (for integral keys) an array, which cache which metatable methods are absent in a byte & references the metatable as an actual table. Thus optimizing for lack of metatable methods.

The hashmap component stores its size in log2 & tracks the lastfree slot as a hueristic for when to reshuffle existing entries. Singly-linking entries like a closed hashmap.

Reads/writes are optimized separately for each Lua type. Why strings store hashes!


Show thread

we're wasting orders of magnitude more computing power than we need

software is not immaterial, this means we are wasting rare earths, fossil fuels, chemical catalysts and other ingredients

Show thread

google has came up with something called chrome OS flex which is chrome OS for older computers apparently, they want to help you make use of your old computers granted they are..... wait for it...... granted they are....... 64bit machines with at least 4GB RAM.

and if you install it on such a computer it'll run slow as butts

this is a fucking joke right?

I once again demand that all developers and designers only be allowed to use a 2003 desktop PC for all their work

not them $100k desktop supercomputers

they've lost touch with what humings can afford

Tables are Lua's only collection type, cleverly covering all usecases! It can be an array, dictionary, (with dot-notation) object, or the result from importing/running a module! Heck I've seen it used an elegant way to represent XML elements!

Tables have "metatables" (which, yes, are stored as actual Lua tables) providing methods or tables for operator-overloading (special opcodes) & notably computing missing values upon lookup. Hence Lua has prototypal inheritance!


Show thread

As stated, Lua closures references a "prototype" parsed from the sourcecode. These track the number of:

* parameters & whether its variadic
* registers/locals
* upvalues
* constants
* opcodes
* sourcelines (2 fields)
* innerfunctions
* localvars (for debugging)

As well as first & last linenumbers, source code, & arrays for:

* Constants
* Opcodes
* Innerfunctions
* Expected closure (name, whether instack, index, & type)
* Lines (2 different compressions)
* Vars with lifetimes
* GC objects


Show thread

> When you’re a senior developer, stuff still goes wrong pretty often. You just get more efficient at identifying what, why, and how to fix it. —


Tables, closures whether C or Lua, "Up Values" they reference (one of those internal types), function "prototypes" (where the code & typesignature's actually store, the other internal type), & *some* userdata (which may also have a metatable) are garbage-collected.

If a closure (consisting of "upvalues", possibly to-be-closed) isn't attached to a C function GC & a layer of indirection can be dropped. Similar situation for C pointers, where the layer of indirection allows for metatables.


Show thread
Show older

For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).