HNHacker News
TopNewBestAskShowJobs

twicetwice

815 karma · joined April 21, 2020

submissionscomments
twicetwice··on Matrix: Third Room Tech Preview [video]
That's great to hear! Thanks for all your work on Matrix/Element.
twicetwice··on Matrix: Third Room Tech Preview [video]
I'd add actually encrypting all events in so-called "end-to-end encrypted rooms" to that list :/

I don't mean to be snarky, it's just frustrating to be told that it's common sense that this wouldn't be the case, when it's come as a huge surprise to everyone I've mentioned it to.

That said, I love Matrix, big supporter of the project and of the team, etc etc. Just, there's a lot of work still to do!

twicetwice··on Named element IDs can be referenced as JavaScript globals
iirc this doesn't work in Firefox? or at least it doesn't work the same way as in Chrome. I developed a tiny home-cooked app[0] that depended on this behavior using desktop Chrome which then broke when I tried to use it on mobile Firefox. I then switched it to using

  document.getElementById
like I should have and everything worked fine. Like others in this thread, I recommend not relying on this behavior.

[0]: https://www.robinsloan.com/notes/home-cooked-app/

twicetwice··on Outdated vs. Complete: In defense of apps that don’t need updates
maybe commit to a log indicating that the test suite has run correctly as of <today's date>?this assumes you have a useful test suite but also at least indicates that you're still paying attention & trying to ensure your library works
twicetwice··on H.R.2184 – End Oil and Gas Tax Subsidies Act
Which would mean that only people/companies who can afford to weather huge losses (potentially for several consecutive years) are able to enter capital-intensive sectors, providing massive moats to incumbents in those sectors and even more advantages to people who are already wealthy.
twicetwice··on Using a Raspberry Pi as a Bluetooth Speaker with PipeWire
Better yet would be to use spotifyd[0] for this. I tried to set this up with my RPi a while ago but was defeated by Linux audio. Instead I just bought a Sonos. Oh, well.

[0]: https://github.com/Spotifyd/spotifyd

twicetwice··on Slack’s free plan change is causing an exodus
Element [0] is the main/most popular client. FluffyChat [1] is also good. They both have web, Android, iOS, and desktop (Electron) apps. There are at least a dozen other clients but those are the only two I've tried so far.

For hosting, I believe the flagship host is Element Matrix Services [2]. It's made by the same organization that leads development (it is all FOSS) of Element and the reference server Synapse.

You can also self-host. Synapse is pretty slow and memory-hungry (it's written in Python), but for a small group it still fits pretty comfortably on a $5 DigitalOcean VPS. That's what I'm doing. It took less than an afternoon to set up (`apt install synapse` and then setting some config, mainly—there are a bunch of good guides online) and has been happily running ever since. Matrix is federated, so as long as you set up federation properly, you can seamlessly message anyone on any federated Matrix server. (Federation is opt-in.)

There's also Dendrite and Conduit, Matrix servers written in Go and Rust respectively, which are much leaner and faster. Both are still in beta and missing some features, but are definitely usable.

If you want to mess around with bots, I've had a lot of fun with both the Matrix Rust SDK [3] and JavaScript bot SDK [4]. Both are quite easy to get started with, and as of a few months ago both support E2EE pretty painlessly too (not totally pain-free though lol), which is cool.

Overall, the ecosystem is still maturing imo, but I've been using self-hosted Synapse and Element "in production"—it's me and my girlfriend's primary method of communication—for over a year now with only some minor UX hiccups (mostly issues decrypting E2EE messages in Element). I definitely encourage giving it a shot as long as you're willing to tolerate a few remaining growing pains.

[0]: https://fluffychat.im/

[1]: https://element.io/get-started

[2]: https://element.io/matrix-services

[3]: https://github.com/matrix-org/matrix-rust-sdk

[4]: https://github.com/turt2live/matrix-bot-sdk

twicetwice··on The coming tsunami of fakery
Anyone can run Stable Diffusion on their laptop as long as their GPU has enough VRAM, so the cat's out of the bag on this one.
twicetwice··on _hyperscript – a small scripting language for the web
Third example only works if aJavascriptFunction is sync. If it's async you'd have to do

  <div onclick="aJavascriptFunction().then(r => setTimeout(anotherJavascriptFunction, 10000)">Do some stuff</div>
but if you don't know ahead of time whether or not it's async (or don't want to have to care, like hyperscript allows), then you'd need

  <div onclick="(async () => { await aJavascriptFunction(); setTimeout(anotherJavascriptFunction, 10000) })()">Do some stuff</div>
twicetwice··on Why we're sticking with Ruby on Rails
Why do you hate Postgres? I think that's the first time I've ever heard someone say that.
twicetwice··on I analyzed hospital price lists so you didn't have to
Yes, the fact that literally all health care goes through insurance is a big part of the problem. As my dad says, if you had to get all car maintenance done through your car insurance, changing your oil would cost $5,000.
twicetwice··on I analyzed hospital price lists so you didn't have to
Yeah. A lot of flamewars have happened: "regulation bad!" vs "no, regulation good!".

But in reality, good regulation is good, and bad regulation is bad.

It sounds silly written out because it's a tautology, but if more people internalized it we could have much more productive conversations. Instead of going back and forth on whether regulation is good or bad, we should try to figure out which regulations are good and which are bad, and then try to get rid of the bad ones and pass more of the good ones.

twicetwice··on Billion-record stolen Chinese database for sale on breach forum
nitter link, since Twitter put up what seems to be a timed login gate when I was halfway through reading the thread: https://nitter.net/_KarenHao/status/1543949945614393344
twicetwice··on Pirate Library Mirror: Preserving 7TB of books (that are not in Libgen)
This well-written article, "Torching the Modern-Day Library of Alexandria"[0], might change your mind on that. I found it to be a compelling and tragic story.

Edit: actually, I think this would make a good submission. Looks like it hasn't been posted since 2017.

[0]: https://www.theatlantic.com/technology/archive/2017/04/the-t...

twicetwice··on WeatherKit
Oops, that's what I get for not reading closely enough! In my defense, my eyes glazed over after the fourth Apple-product-OS version number ;) but yes, my bad on that

Looks like it's 500k calls per month per Apple Developer Program account, so essentially $99/yr. Not totally unreasonable pricing, although I wish I could buy it a la carte. It's a bit out of my price range for hobby projects. If I ever start developing apps for my family members (who mostly have iPhones at this point) though this will be a nice freebie to come with that. Ah well.

twicetwice··on WeatherKit
Looks like this is what they did with DarkSky after they acquired it. It looks awesome. It's a shame it's only available to Apple developers and users

Edit: my bad for skimming too fast, I'm glad there's a REST API, that's unexpected and cool!

twicetwice··on Rare ‘triple’ La Niña climate event looks likely
For Americans (and others?) who are OOTL, rocket == arugula. It has a bunch of other names too, apparently.
twicetwice··on Redbean 2.0 turned into more than a hobby project
I ran into the same issue on Xfinity, why is it broken there? Some nonsense Comcast gets up to?
twicetwice··on Redbean 2.0 turned into more than a hobby project
This is standard at least across Chrome and Firefox on Linux and MacOS— (ctrl|cmd)+R does a normal page refresh, (ctrl|cmd)+shift+R does a "hard refresh" where it reloads every resource on the page without caching.

Also, in Chrome, if and only if you have the dev tools open, right clicking the reload button will give you a menu with the options "Normal Reload", "Hard Reload", and "Empty Cache and Hard Reload". The third option will ensure that requests initiated by JS or that otherwise weren't part of the page load also won't be served from cache.

twicetwice··on What should you do with stock options during a recession?
I do interesting stuff in my free time. I make money in my work time.

Not quite really—I do enjoy my work and my time at my job, and I would sacrifice some compensation to work at a more interesting/meaningful/fun company. I don't price the enjoyment of 50% of my waking hours at zero, of course. But my primary purpose in working a job is making money, and I don't think that's anything to be ashamed about. I want to buy a house one day.

twicetwice··on Investing in lighting did great things for my mental and physical health
No, I'm just a satisfied customer.
twicetwice··on Investing in lighting did great things for my mental and physical health
I won't link them because I don't want to get flagged for spam, but I really like the bulbs from cloudfree[dot]shop. They come pre-flashed with Tasmota and take <5 minutes to set up, then they can be controlled directly over wifi, or can easily be connected with HomeAssistant, etc. (Tasmota is open source local-only firmware, so there's no cloud or anything to worry about.) My only complaint is that they're not super duper bright. Other than that, I'm a big fan! Big fan of products from that site generally, and the guy behind it seems solid.
twicetwice··on How “latency numbers everybody should know” decreased from 1990–2020
Starlink will get us there for at least long-distance connections once they have the laser inter-sat links fully connected.
twicetwice··on Boyfriend-alert – A light based alert system
I got some Aqara buttons and switches from cloudfree.shop, they're closed-source but local network (Zigbee) only—combined with Home Assistant, which is open source, I think this is what you want!
twicetwice··on In 2022 a Moonrush will begin in earnest
I don't really understand why this is the case. Nukes don't defend against nukes—MAD defends against WMDs. Why do new and fancier WMDs make MAD no longer effective?
twicetwice··on A Guide to Twitter
don't use twitter to follow Important People and keep up with the daily outrage; use twitter to make friends through meaningful/interesting/fun interactions and good reply game.

how to go about doing that is the meat of the article, and is worth reading if that sounds like something you would want to do.

twicetwice··on How did LastPass master passwords get compromised?
I simply use a 40ish character passphrase. My primary attack vectors are keyloggers/local malware and browser/extension vulnerabilities, which also apply to a local ciphertext.
twicetwice··on Consider SQLite
This adds another service you now need to deploy and maintain. For small personal projects, I definitely would like to avoid that if I can!
twicetwice··on Consider SQLite
For a recent project I picked a similar approach, but a directory full of JSON files, where the filename is the key and the value is the contents of the file. This gets me two improvements over the single massive object persisted to disk in a single file: ACIDish for free from the filesystem, and a large reduction in bytes (potentially) written to disk since you don't have to rewrite a large file every time a single key changes, and this service potentially has frequent writes to a subset of keys.

This latter point matters a lot to me since the disk in question is a Raspberry Pi's SD card, which I've heard have a tendency to wear out quickly, so I wanted to avoid writing to it unnecessarily. And yeah, this system is fragile, not actually ACID, etc etc… but I'm the only one who relies on it (it's not even accessible on the public internet, only over my Wireguard VPN), so it doesn't matter if it breaks!

I will probably rewrite this service later, backed by either SQLite or Postgres, but writing it this way saved me a fair bit of thinking and lines of code, which was great for getting it off the ground and usable to me in like two hours.

twicetwice··on Consider SQLite
Interesting. So I would ordinarily want to put a foreign key constraint on the user_id column of a UserSessions table (or similar). In general, presumably you have relationships across the tables that are in those discrete databases. Do you just enforce these constraints/do joins in code? It seems like splitting related tables across multiple databases loses some (possibly a lot?) of the benefits of relational DBs, so I'm curious how you handle/manage that.

That said, I love the idea this architecture. Might use it for whatever next dumb little web service I cook up! I love how this simplifies a lot of dev/deployment ops, perfect for a side project.

← PreviousPage 2 of 6Next →