Avatar
Matt Nelson
94530f2a7f9a02d4115394de3261af4d69f230e37cab484980c377010b0fea36
Navy -> NASA -> Sphinx Chat -> Strike -> FLOSS PGP: 0x61471B8AB3890961 Kotlin Multiplatform and C are the way

I've been going back and forth on making one, but it looks like quite the undertaking.

What were some of the learned lessons you had from iteration to iteration?

Only idea I have had is to use templates for PRs and Issues with a required check box to tick "AI was not utilized in the generation of this PR/Issue".

If it's not checked, auto-close that shit. If they lied, block them.

I never knew how much I would need something... Buffered streaming of UTF-8 encoded bytes is OP.

https://encoding.matthewnelson.io/library/core/io.matthewnelson.encoding.core/-decoder/-companion/decode-buffered.html

The fog will wear off eventually, but you'll come back to us eventually.

Nothing beats black dark roast coffee and a cigarette for locking in to conquer the day. Nothing.

I think today is going to be release day... Tons of new features, lots of bug fixes, several deprecations, and many many performance improvements.

Has been a fruitful couple of months, but now I must #shipcode

I assume this is to open a file?

Personally, I took the approach of splitting into 3 separate functions; openRead, openWrite, openReadWrite.

This allows for different return types which inherit from a single common one, and makes clear the contract for which that thing (interface) can and cannot do. Eliminates nearly all API confusion and/or misuse.

openRead doesn't need to take parameters as it must always exist.

openWrite and openReadWrite take an exclusivity enum MaybeCreate, MustCreate, MustExist. This also allows a mode to be expressed for applying appropriate permissions immediately on creation when MaybyCreate and MustCreate are expressed.

openWrite also takes an append boolean parameter, constraining appending/truncation behavior to that function only.

I spent a lot of time playing with my API, bumping into and figuring out workarounds for several platform specific limitations (such as pwrite with O_APPEND being broken on Linux/FreeBSD).

https://github.com/05nelsonm/kmp-file/blob/master/library/file/src/commonMain/kotlin/io/matthewnelson/kmp/file/OpenExcl.kt

https://github.com/05nelsonm/kmp-file/blob/master/library/file/src/commonMain/kotlin/io/matthewnelson/kmp/file/FileStream.kt

Anyone else find that writing documentation is more mentally draining than writing the actual code 😂?

They are gonna print so much money over the next 5 years. Buckle up.

Anyone know of a *native desktop Nostr client for Linux?

*native: as in NOT an electron app

Vivaldi has been the most stable non-Google Chromium based browser for me thus far; have been using it as my primary for 3+ years now. I use Brave and Vanilla Chromium, as well as Mullvad Browser, for some things, Brave being the most finicky.

Is this supposed to be a slight?

Full retardation is the ultimate superpower; you're unstoppable with it...

> Wow no I wasn't aware that's crazy. Does it need migrations?

Unsure what you mean by migrations. The OS will install the new version over the old one. If you have defined in your manifest a broadcast receiver for `android.intent.action.ACTION_PACKAGE_REPLACED`, you'll receive the Intent upon completion and can restart your services and what not.

> Do you wanna help dev with bitchat btw? I could use a pro to show me the way.

I'm no pro 😂, just have been around the block once or twice. I'd love to, but have my plate full with a grant from nostr:nprofile1qqs8suecw4luyht9ekff89x4uacneapk8r5dyk0gmn6uwwurf6u9ruspzpmhxue69uhkumewwd68ytnrwghszrnhwden5te0dehhxtnvdakz7d8grcu working on kmp-tor for the next 3 months, then back to my other project.

See: https://developer.android.com/reference/android/content/Intent#ACTION_PACKAGE_REPLACED

It can be done in a decentralized manner; that is exactly what I'm building now... Device to device. No centralized server. Can ping any app on my phone (as long as it's registered with my app) from my laptop using terminal, curl and tor.

Server is embedded in the application that other apps on the device can register with. Http calls hit the server and get routed to the registered app.

It's a one click install for users. All overhead is pushed to developers to setup the client library for IPC, and then me to maintain the app & client library. UX is dead simple consumer wise, unlike other products that may require users to run a server at home or something.

Signal uses the socket-io library to maintain an open socket with their backend; it's incredibly resource intensive.

Tutanota uses the SSE API for their push noticication service and does a pretty good job on their end as it relates to battery consumption.

That said, if every app were to implement their own push notification service, 5+ apps doing on a device that turns a "mobile" phone into something that always needs to be plugged in. It does not scale.

I ran a test on Android using kmp-tor and a ktor server exposed as a hidden service, pinging it every 5 min via cronjob from my server at home. Over 24h, battery consumption was about 5%-7% depending on the test device.

Working on a product right now for drop in replacement to google/apple services, but it's far from ready.

Never going to work based on the sole fact of it being manufactured in Spain 😂.

I find it more likely that the redcoats will keep taking it in their awful teeth, and continue to cry about it with 0 action.

#noballs

FED hasn't even turned on their monopoly money printers yet...

Looking forward to my weekly dose of nostr:nprofile1qqs879mhq6kkuzh2wk57xdzanl76uem8d7hlyjd7v4a4jcm4u88d8ygprpmhxue69uhhqun9d45h2mfwwpexjmtpdshxuet5qydhwumn8ghj7un9d3shjtnzd96xxmmfdecxzunt9e3k7mgxzfkn5 today