David Konsumer
konsumer.bsky.social
David Konsumer
@konsumer.bsky.social
43 followers 43 following 47 posts
NERD (game-dev, open-source, musician, train-enthusiast) he/him
Posts Media Videos Starter Packs
yep, or even just like files. Regardless of language, you can't put complex objects directly in a file, and get it back, without serialization, in every case.
it also seems a bit funny to be like "because js doesn't have types" but the truth is it's the opposite prob, here. Only 1 type is allowed for localstorage, not "whatever you want"
it's worse passing things over webworker-boundry. some things work, but a lot don't (I tend to just do JSON-able + typed-arrays)
it solves a much bigger problem, like if you really allow anything, there are still lots of things that don't work (imagine storing unresolvable pointers to disk, in C, for example.) it's easy to think it's all about "js sucks" but I don't think it's the worse solution possible.
the first one's answer is "it was simpler for casual users, and stuck" and the answer to 2nd is "localstorage can't efficiently or appropriately store everything, so they just went with the easiest"
like it's really 2 complaints: "why does js coerce non-strings into string?" and "why doesn't localstorage only store strings?"
being mad about it (and you have every right to, obviously) makes me feel like "why can't I just get a complex object from a fetch or a file-read?" I mean you can, you just have to serialize/deserialze (with JSON or whatever.)
numbers-for-object-keys too, like thing[1] is really thing['1'], so if you ask for thing[1] it still works, because it coerces it both times to string.
much like keys of an object like thing[some-complex-object] it will just coerce to string ([object Object]) it gets even weirder when things are inconsistant, though, like passing types across web-worker boundary. some things are cool, but others are not.
There are quite a few other ways to store stuff on web if you hate it, but yes localstorage is strings-only. It has to do with consistency (cookies are also string-only) and there is already a pretty standard serialization format that works well, if you need more types (JSON.)
There have been lots of things like meshtastic for a while, but this works easily over anything, not just lora. I have a radio (about $15) hooked to my computer, which connects that to a much wider TCP/IP connection (over the internet.) I get a range of around 5 miles, on very cheap devices.
The key differentiator of reticulum and other similar things, in my mind, is that the address is your key, so "if you can open it, it's yours" but no physical addresses or anything like that, and also no sender-info, unless you can read it.
This gives us basic access to reticulum in javascript. Also check out demo/interfaces/WebsocketClientInterface.py which is an interface you can use in any reticulum client to connect over websockets. My next goal is filling in this library's functionality and making a complete web demo.
GitHub - konsumer/nomadnet-js: Nomadnet library for JS
Nomadnet library for JS. Contribute to konsumer/nomadnet-js development by creating an account on GitHub.
github.com
I have been going deep on reticuluum/lxmf/nomadnet.

If you aren't familiar, reticulum is a cool protocol that uses your pubkey as your address. It's used over cheap p2p lora radio, but easy to also route over internet. lxmf is a protocol for routing/messaging over that.
I got my own rudimentary Interface transport for websockets, in the hope of being able to make browser-only clients. I don't think it's quite working right, but tests look good. github.com/konsumer/ret...
There are a bunch of test interfaces, so you can connect to a big net of nodes, but you can run your own, too. Totally P2P, and decentralized, doesn't even need internet. I can setup some cheap lora things to participate in the network. It also has dynamic pages (basically a shell-script.)
Micron Playground
rfnexus.github.io
For those unfamiliar, you setup "interfaces" on each node which are entry-points to sub-networks over internet or lora (or other things.) Using these, you can connect a bunch of nodes in a mesh. It also has a kind of lofi-web: fe6cb7cebb0b91de51ab716a324ddb27:/page/index.mu
I have been playing with non-internet digital comm this weekend. Really excited about Reticulum and nomadnet! If anyone wants to chat, I am at 5d8ccebf24acd91266e86653d42e970d
Obviously, you can do whatever you want in those tag-things, but often I just want plain strings.
This is one of those lil features that makes me so happy using Zed: sub-type syntax-highlighting. I am dyslexic, and embedding strings in JS is super-annoying, in other editors. Zed handles it with grace, and I started using this for everything.
I've been working on this programmable midi controller/instrument/macropad thing: youtu.be/3DC8_nlmCxc
mechmidi
YouTube video by David Konsumer
youtu.be
Saddened by the news about David Lynch. RIP, you brilliant weirdo. "A filmmaker doesn’t have to suffer to show suffering. You just have to understand it. You don’t have to die to shoot a death scene."
Here is the start of some of that. I think I could also make a lil wrapper header that lets you define a null-unit as it is now, and it connects up to ladspa API, but they do have some nice features (even if it's a bit more complicated) that would be lost.
GitHub - konsumer/wasm_ladspa: Null-units from nice LADSPA plugins
Null-units from nice LADSPA plugins. Contribute to konsumer/wasm_ladspa development by creating an account on GitHub.
github.com
Deps is always the annoying part of building huge ladspa collections, but I could prebuild common ones (like fftw3) for wasm, and it'd be much easier...