Yarn.social Online Meetup 25th May (See: #fcghsma for details)

@aral@mastodon.ar.al 

feeds.twtxt.net

Public posts from @aral@mastodon.ar.al

Recent twts from @aral@mastodon.ar.al

Tusks is a little indie app by @bardi that lets you see just your posts and compose new ones (with a focus on making it easy to compose threads).

Just bought myself a lifetime license.

Check it out at: https://thirdculture.app/tusks

Love to see indie devs making useful little tools that do what they say on the tin and nothing more (check out the privacy policy in the attached screenshot).

#tusks [#fediverse](https://mast … ⌘ Read more

⤋ Read More

To really drive home the above 👆 point that 100% test coverage does not mean ‘bug free’, just found a bug in JSDB¹ 5.0.0 where running JSON.stringify() on a complex custom object (actually: the automatic Proxy of the custom object created by JSDB) results in an error.

Already have a failing test for it and about to implement the fix.

¹ https://codeberg.org/small-tech/jsdb

#JavaScriptDatabase [#JavaScript](https://mastodon.ar.al … ⌘ Read more

⤋ Read More

Heads up anyone playing with Kitten at the moment (yes, both of you):

I’m in the process of upgrading Kitten’s version of JSDB from 4 to 5.

*This is a breaking change.*

This will affect you if you’re persisting custom objects (instances of your custom model classes) in your databases.

Please see the details in this JSDB announcement post and the linked-to details page to prepare:

https://mastodon.ar.al/@aral/112361559531645603

(I should have the update out this … ⌘ Read more

⤋ Read More

If you use a parameter object in JavaScript, even if you specify its shape using JSDoc, you’ll only get errors if required properties are missing; not if there are extra properties provided.

e.g.,

```js

class A {

/**

@param {{

id:string

}} params

*/

constructor (params) {

Object.assign(this, params)

}

}

// Error:

new A({})

// No error:

new A({id: ‘x’, foo:‘bar’})

```

According to this thread, it’s a fact-of-life:

[https://stackoverflow.com/questions/49580725/is-it-possible-to-restrict-typesc … ⌘ Read more

⤋ Read More

Philosophically, JSDB – which writes out to native JavaScript logs – is very much the JavaScript version of SWX, the native data format for Flash that I released around 2007 (where data was written out in native SWF format). I have to say that I’m glad I didn’t have to reverse engineer SWF bytecode this time around :)

Here’s a video of a younger me doing an impromptu demo of SWX at some conference or other from 16 years ago.

https://m.youtube.com/watch?v=OM9qOADsO3w

[#JSD … ⌘ Read more

⤋ Read More

JSDB 5.0.0 published 🎉

• Custom classes must have a `constructor` that accepts a parameter object as its only argument. Constructors are run during deserialisation.

• Custom classes can now safely extend other classes (e.g., `EventEmitter`).

• Properties that begin with an underscore (`_`) are treated as private and ignored.

• Objects with null prototypes are supported. i.e., objects created with `Object.create(null, …)`.

Full details: [https://codeberg.org/small-tech/jsdb#migrating-from-earlier-versions- … ⌘ Read more

⤋ Read More

100% test coverage doesn’t mean your code’s bug free but it did just lead me to find and fix an issue in JavaScript Database (JSDB)¹ with a code path that wasn’t being hit that I would have otherwise missed because it was causing the relevant test to pass.

¹ JSDB is a zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log (an append-only log).

https://codeberg.org/small-tech/jsdb

[# … ⌘ Read more

⤋ Read More

I’ve thought a bit more on this and decided:

1. Persisting custom classes _is_ an advanced feature.

2. Implementing these changes would mean that custom classes can extend base classes (e.g., EventEmitter, so we can, for example, listen for events on sessions in Kitten)

3. The con of dictating the constructor signature for custom classes is outweighed by the pros.

So I just implemented this, plus pseudo-private property support, etc., and will be releasing a new major version of JSDB soon. ⌘ Read more

⤋ Read More

“They don’t know what’s best for themselves anymore, much less what’s good for our civilization. They’re just panicking, hoarding money, and then panicking some more. That’s why they’re all building mega yachts and moving to island bunkers. They know they’ve screwed us all, and they’re deeply terrified.”

https://www.okdoomer.io/im-a-professor-heres-why-im-walking-away-from-my-tenure/

2/2 ⌘ Read more

⤋ Read More

Had knives in my throat (not Covid, probably… at least tests were/are negative) so went to see my new GP and we ended up chatting about the OneWheel I rode in on (he took up skating later on in life and tried one in France apparently), the shit factory that is Silicon Valley (he used be a software dev there before he became a doctor), the Small Web (he digs the idea), and, yes even my sore throat (I’m on antibiotics now). Needless to say, I like my new GP :) ⌘ Read more

⤋ Read More

Just a quick update on this: after some experimentation and further thought, I feel the way JSDB works currently is the right trade-off.

While it could run the constructor of persisted custom objects when loading them back in, that would impose a rigid authoring flow that would sacrifice ease of use for simple use cases. I find the latter more important in this case.

(I’m off to document this ‘feature’ now as it is currently undocumented and that’s not good.) :)

More: [https://codeberg.org/small-tech/jsdb/issues/12] … ⌘ Read more

⤋ Read More

It’s amazing to me that folks have such a hard time with the very basic concept of “follow the money.”

This isn’t rocket science, people. Where/who you get your money from matters. The people who you surround yourself with matter. The success criteria you adopt matter. ⌘ Read more

⤋ Read More