HNHacker News
TopNewBestAskShowJobs

snorremd

648 karma · joined April 21, 2016

[ my public key: https://keybase.io/snorremd; my proof: https://keybase.io/snorremd/sigs/RMlpyZzus8WnfpnjPjplPvhTa_TxyyAk1mx7lGDFo1Y ]
submissionscomments
snorremd··on Show HN: htmgo - build simple and scalable systems with golang + htmx
As a developer who has worked extensively with React and Reagent (a ClojureScript wrapper around React) I actually enjoy this kind of syntax. Better that then some custom HTML templating syntax I need to learn in addition to the language.

It doesn't look too bad if one also break the code into multiple functions to make "layouts" and "components".

I have had lots of fun building with Bun, ElysiaJS, and HTMX. Might test your go library out as well. Looks pretty neat.

snorremd··on NIST to forbid requirement of specific passwords character composition
This! Required frequent changes just makes people who don't use password managers choose weaker passwords to be able to remember them easily. And they'll almost guaranteed just choose the same password as before with a new post or prefix. "mychildhoodteacher1", "mychildhoodteacher2", etc.

It would be better to encourage users to use a single random four word passphrase and stick to that forever. Add 2FA and you are golden. But legacy systems gonna legacy. I still see systems with max password lengths of 12 characters in the wild, and no 2FA to boot. It's been a while since I got my password back in clear text though, so perhaps we're moving in the right direction.

snorremd··on Why is F# code robust and reliable?
This is the number one thing that made Clojure work for me despite being dynamically typed. Having confidence that values did not change under my feet after sending them into functions or across thread boundaries was so refreshing. In immutably valued languages even if you technically might be sending a reference to an immutable value type, you can at least practically think about it as pass by value instead.

I never really got into F# or Haskell (more than some tutorials) so can't really comment on the type safety part.

snorremd··on Eyechat
I mean, if a website claims to have tens if not close to a hundred "legitimate interest" cookies I'm reasonably sure they are living of wildly invasive ad tracking. I immediately close these websites just as you do.

It would be swell if more of the web was made by passionate people to share knowledge for free. I know this is a privileged attitude as creating content takes time which is not free. But some of the best web sites are the ones without monetisation. We need a better monetisation system for the web that is based on people paying for content instead of people being sold as user data.

snorremd··on Storing UTC is not a silver bullet (2019)
Exactly.

What I've found is that if you save the UTC timestamp + an IANA time zone (e.g. Europe/Paris) you are good. How you convert time for a given IANA time zone at a given UTC time should be consistent. For example in 2024-07-23T10:00:00Z, Europe/Paris should use the offset for the CEST timezone (UTC +02:00 hours).

If at a later point EU gets rid of daylight savings time and France decides to stay on CET year around, date libraries can account for this when you parse the UTC date string and convert it to the provided IANA time zone.

So UTC + IANA time zone gives you an accurate point in local time as long as your date libraries handles IANA time zones correctly.

snorremd··on Cloudflare Connectivity Issues in Eastern US and Central Europe
Hey now. I'm sure Cloudflare can deliver 502 Bad Gateway pages with less latency than any other cloud provider. ;)
snorremd··on Cloudflare Connectivity Issues in Eastern US and Central Europe
Mine are offline as well (502 Bad Gateway). I'm in one of the affected regions, Europe West.
snorremd··on What You Get After Running an SSH Honeypot for 30 Days
You end up sharing signals (IPs) to their crowd-sourced bad IP databases, but only get 3 free IP lists on the free plan. To get some of the bigger IP lists you need an enterprise plan at $2500 a month.

Essentially they use the free customers to build the lists that drive their enterprise sales, which is fair enough as you get to use their free dashboard and open source software. But to me it seems they're really only targeting enterprise customers as a business.

snorremd··on AI headphones let wearer listen to a single person in a crowd by looking at them
In the same boat. I have some tinnitus (low frequency, radio static like noise) and struggle with conversation in loud places with lots of background noise and conversation. If I sit in a loud bar it is hopeless hearing what anyone but the closest two persons are saying. Conversation in normal settings are mostly no issue.

So something that would enhance the speech of whomever I'm looking at would be super cool. Apple AirPods already have some sound shaping abilities to react to environment and mode. They also support specific voice enhancement if you put your phone down in front of the person speaking. If they ever support directional voice enhancement, like in this research, directly in the AirPods it would help me so much with social interactions in loud places.

snorremd··on Tantivy – full-text search engine library inspired by Apache Lucene
It is a very nice library. I’m using it for a very work in progress incremental email backup CLI tool for email providers using JMAP.

I wanted users to be able to search their backups. As I’m using Rust Tantivy looked like just the right thing for the job. Indexing happens so fast for an email I did not bother to move the work to a separate thread. And search across thousands of emails seems to be no problem.

If anyone wants search for their Rust application they should take a look at Tantivy.

snorremd··on Google Search Is Now a Giant Hallucination
I can empathize with this. If not for my decent salary by European standards, I’m not sure I would prioritize paying for search when there are free options available.

It would be nice if more services used purchasing parity based pricing so more people could benefit.

snorremd··on Google Search Is Now a Giant Hallucination
And this is why I subscribe to Kagi. They also have AI based summary, but you have to invoke it manually on a specific search result (in which case you know where the info is coming from).

I feel like we're on a race to the bottom. All of Silicon Valley and beyond have big FOMO on the AI hype train and any and all use of AI pleases investors. I guess we'll see how it all pans out in a few years.

One thing is for sure, generative AI and LLMs open up a whole can of worms in terms of disinformation and information noise on the Internet. The signal to noise ratio will greatly shift with these new initiatives.

snorremd··on Bluesky is rolling out Hashtags
Considering the entire protocol design I don't think DMs will be that easy to implement. They'd need some form of asymmetric key encryption scheme for personal data servers and messages would then need to be read directly from the relevant personal data servers as the app view servers would not have the necessary user private keys to decrypt stuff. Will be interesting to see how they solve it for sure. But as you point out, probably far down the road map.
snorremd··on Sparkle: A software update framework for macOS
Exactly. It is so simple to do `brew install figma` or whatever App you want. Most bigger apps have ready casks to install. Then I have a startup job that does `brew bundle dump --file=- > $ICLOUD/Brewfile`. That way I get a backup list of all software installed with brew so it is simple to install again if I migrate to a new machine (without restoring a Time Machine backup).

Edit: Obviously for users not familiar with command line programs brew isn't that "easy". But for command line people this setup is quite nice.

snorremd··on Bluesky social network drops invite-only sign ups
In Bluesky you create an account on a specific PDS (personal data server) and need to authenticate yourself against that server to write content (posts, likes, follows, etc) to your user repository. Content in this user repository is signed and discoverable by relay servers, and app view services. Currently you can't move your user repository to another PDS, so your user is tied to that server for the time being. When posting content you post to the specific server your user repository is hosted in.

With Nostr your identity is truly decentralized. You create a user meaning a private and public key. You then choose which set of relay servers you want to post content to and which servers to pull content from. If you post content to servers A, B, and C users that pull from those servers see your posts. All posts are signed with your private key so the other users can verify that they were in fact posted by you. It does not matter which relay servers you post to, they will happily store your content unless they've specifically blocked you or require some form of white-listing.

So in that way your Nostr identity is not connected to any specific server, you can always choose to post to a different relay. As of today I don't think Nostr relays federate/distribute content to other relays, but this seems to be a possibility for the future.

Edit: Specified that Nostr relay servers don't have to be open by default.

snorremd··on Bluesky social network drops invite-only sign ups
AP server admins will likely de-federate the largest ActivityPub servers, like Threads and possibly Mastodon.Social if they start generating a lot of inbound traffic on their instances. I predict the AP network will split into the network run by commercial/big entities and the network run by small hobbyists/idealists. Running an AP server that scales to the traffic generated by Threads will be no easy job and not cheap.

Running a Personal Data Service (PDS) on the ATProto network should be much more doable for hobbyists. The relay and app view servers handle search, discovery, and caching to alleviate traffic. So a typical PDS should not see too much traffic. Now just waiting for the Bluesky ATProto network to actually go federated, but I don't think we are too far off from that happening as they've already federated their own PDS into multiple PDSs.

snorremd··on ORMs are nice but they are the wrong abstraction
My best experience integrating with a Postgres database was using Clojure with the Honey SQL library [1]. Essentially Honey SQL operated solely as a query builder library allowing me to express queries as regular Clojure EDN maps and vectors (comparable to objects and arrays in JavaScript), or nested function calls returning the same kind of data. In essence SQL queries were expressed in a Clojure native data format which finally could be transformed into SQL syntax.

The huge win was that I could use the Clojure REPL to run my SQL-generating functions and see that the SQL actually matched what I was aiming for. Caching the query-building was as simple as memoizing the query building functions as queries are parameterised in any case, so can be reused.

There is something really nice about having the full power of SQL at your fingertips. The only drawback compared to ORMs of course is that it outputs the resulting query result in a flat structure. So any aggregation you'd need to handle in code or use something like Postgres JSON aggregation.

[1] https://github.com/seancorfield/honeysql

snorremd··on Mail-in-a-Box: a mail server in a box
Also Stalwart Mail supports JMAP which is a nice protocol. Not sure how many email clients support it yet though. If I were to host my own mail I'd probably go with Stalwart as it provides a single binary/service for running imap, jmap, smtp, etc. No need to fiddle around with Postfix, Dovecot, etc.
snorremd··on How Wikipedia became the last good place on the internet
Yes. I've used them for a few years now and never had any serious issues. Their delivery rate seems good, I don't get much spam, and so far as I know I have not missed legitimate emails.

They have a fast web client where you can perform actions on your entire inbox. So far as I remember gmail only allowed you to do actions on the current page of mails. If you don't want to use their official clients you can always connect via standard IMAP and SMTP.

Also they support plus-addressing like gmail, but also subdomain addressing. I.e. instead of name+alias@yourdomain.com you can use alias@name.yourdomain.com. You can also set up nice email filters quite easily, and their server supports the JMAP protocol [1], which they made. So if you want to interface with your mailbox programmatically they have a more modern protocol to use.

The years I've used them I only remember them having actual noticeable downtime once. Other than that rock solid. Their first line support isn't super technical, but I've only tried to contact them once.

Edit: Essentially if you want good olf-fashioned mail, Fastmail is about as good as it gets. It does not have the smart inbox concepts that Google Mail and Hey do. And not so much in terms of other fancy stuff either. But it makes up for it by using open protocols for mail, calendar, and contact lists. So no danger of lock-in.

[1] https://jmap.io/index.html

snorremd··on How Wikipedia became the last good place on the internet
This is my approach. I've almost completely de-Googled my private life. For email I use Fastmail. I've migrated most my mail over there, but some remains on my old Google address. So many accounts to port.

For search I now mainly use Kagi. Sometimes I drop into Google if I can't find what I'm looking for on Kagi. The nice thing about Kagi is I can manually block or de-prioritize SEO spam domains so I get more relevant results. Takes a bit of time to build these lists, but it does work.

I use primarily Firefox and Safari as browsers. I also support Mozilla via my Pocket subscription.

Edit:

I also have my own website where I post content without any ads or tracking. The content is even licensed under a CC attribute and share-alike license so people can re-post and remix my content as long as they give proper attribution.

snorremd··on Hexagonal Grids (2013)
I used that page so much when I was implementing my hexagonal grid AI game for a workshop at work.[1] It was such an amazing resource for the grid coordinate systems and distance algorithms. It also showed how to map between grid and regular Cartesian coordinates.

[1] https://github.com/go-fjords/astroficial-intelligence

snorremd··on Skyvew – View and share Bluesky threads without needing a Bluesky account
In that both are "microblogging" social networks, yes. The official app feels much like the Twitter app. And all the important user facing concepts are the same. Posts, reposts, quote posts and replies all work the same.

Then you also have custom feeds in addition to the built in feeds. So people will make things like language specific feeds, feeds to follow a group of people (e.g. politicians), etc.

Then there is a whole federated protocol, ATProto [1], underneath that has some interesting properties that also solves some of the issue faced with scalability and portability in the Fediverse protocol.

[1] https://atproto.com/

snorremd··on Framework 13 AMD 7040 Series: A Developer's First Impressions
But it is 2023. Things like GTK on Wayland should support fractional scaling. In fact it is already supported by Wayland and is in GTK project's pipeline, but open source software obviously have limited resources. So I think it is fair that people would complain this does not work, but I also understand why it does not.

Framework delivering a HiDPI display makes it more future proof. HiDPI displays aren't just a gimmick. HiDPI displays is super helpful when you are short sighted for example as the increased font clarity from a HiDPI display will help you read small text better.

The HiDPI display on MacOS and the excellent support for fractional scaling is one of my favourite features of a MacBook and why I wouldn't consider purchasing a "Linux laptop" (e.g. Lenovo or whatever else) before they support this.

Different people, different priorities I guess.

snorremd··on Cloudflare Intermittent API Failures for Cloudflare Pages, Workers and Images
They have supposedly rolled out a fix a little under half an hour ago, but I'm still getting 503 errors.
snorremd··on Show HN: A JavaScript function that looks and behaves like a pipe operator
For those that don't know. In Clojure it is also perfectly valid to drop the parantheses for each subsequent call in a threading macro if you don't want to pass in any additional arguments:

  (-> x f g h)
If you need to pass an additional argument to g you can always do:

  (-> x f (g foo) h)
There are thread first ->, thread last ->>, and even a thread as "as->" depending on where you want to place the argument when you pipe the result through the thread of functions.
snorremd··on Famed animator Hayao Miyazaki might not be done making films, says Ghibli exec
Two decades and counting. The man is nothing if not passionate about film making and animation. Whatever he, Joe Hisaishi (composer) and Studio Ghibli work on together is instant magic for me. The direction, stories, art, and music come together to create beautiful worlds and people living in them. I'm looking forward to The Boy and the Heron being released in Europe.
snorremd··on Things you forgot (or never knew) because of React
Good point. You'd have to pass the stuff to be rendered as a function that would be run if the conditional is true. In any case you just add another allocation, scope (the anonymous function), etc. But some people might like the "syntax" a bit better.
snorremd··on Things you forgot (or never knew) because of React
This. Most of the value-proposition of JSX is that it is just JavaScript and as such you just write code logic like you would normally do. Need to filter some items? You can do that with the Array.prototype.filter method you already know. Do you need to return a list of components based on some list of object values? Just use Array.prototype.map.

I never really understood those that see this as a weakness and would rather learn a more limited set of template string functions that work kind of like, but not entirely like, the native JavaScript collection functions.

Yes, using a ternary operator in JSX to conditionally render components/values looks a bit ugly, but nothing is stopping you from making a wrapper component like:

<If cond={...}><div>Conditional content</div></If>.

Also with JSX/TSX scopes behave exactly like they do in regular JavaScript, because it is regular JavaScript. Templating languages often invent their own form of scoping mechanism.

snorremd··on Fastmail Experiencing Degraded Performance
Same. I've been with them for a few years now and this is the first serious outage I've experienced. They have been rock solid so far, so I'll forgive them a bit of problems.

Friday outage problems are never fun.

snorremd··on Don't Use Mocks
I feel that if most of your tests relies on mocks it is a symptom of a very side-effected programming style. If you cannot unit test most your business logic then you are probably mixing up your business level code with side-effecting code (like calling APIs or DBs).

Personally I've found it better to split pure business logic and side-effecting logic as close to the edge (API endpoint handler) as possible. Then it is trivial to see where side-effects happen and you get to easily write unit tests for the business logic that matter.

Mocking is mostly always a pain and I would rather not mock at all and do proper end-to-end for integration code if possible.

← PreviousPage 2 of 6Next →