miniblog.

Today I learnt that null bytes are valid in UTF-8 and ASCII strings! It was a surprise -- \0 doesn't feel like text -- but it'd be even more awkward when using C-style strings.
RFC 9116 was published this year, which promotes having /.well-known/security.txt as a standard file woth contact information for security issues. It also notes that having this file does not mean you're running a CTF exercise :)
Self hosting is really nifty, but it's an additional cognitive burden. For example, I can run difftastic on its own history. I use plain git-diff just as often. My best improvements have come from using it in other codebases. It lets me think about one thing at a time
OCaml has several unusual design features that I've come to appreciate. (1) Separating integer and float addition is really clear. (2) No subtyping (everything is 'a or concrete) simplifies lots too.
Good code using regexes often has a comment giving an example of a typical string that it matches. Could this be a first class language feature? It's a great pattern.
Another nice feature of OO in Common Lisp: you initialise your class instance with the function initialize-instance. So many languages define a 'construct' as a method that has access to the current instance, which is really kinda confusing (c.f. __init__ and __new__ in Python).
Common Lisp has a function change-class that lets you change the class of instance (like reassigning __class__ in Python). http://clhs.lisp.se/Body/f_chg_cl.htm I love the note at the end: "semantic difficulties" if you call any methods whilst the class changes!
Uniform function call syntax (UFCS) is nifty: I can write foo(x, y, z) or http://x.foo(y, z). Dot syntax for calls works incredibly well for IDE completion. Are there any languages that explicitly offer UFCS so the IDE experience is better?
Smalltalk has a remarkable method named #become: that allows you to modify all pointers to a given object to point to a different object! https://gbracha.blogspot.com/2009/07/miracle-of-become.html This goes even further than updating instances when a class changes, it's changing instance references.
Suppose you have an awesome idea for a programming language. What use case do you focus on for V1? Web apps? Games? Something else? How would you choose your niche?
I feel like Rust often pushes me to use concrete types. It's a lot easier to return a Vec than an impl Iterator. It's not a big problem, but in e.g. Java I'd just say I'm returning some kind of iterator.
> We searched 3154 Twitter accounts and found 519 accounts with 527 Fediverse IDs, spread over 136 instances. https://debirdify.pruvisto.org/ seems to find more users, and it also shows some interesting stats on relevant / popular instances.
PhotoPhoto
Rust macro errors are significantly improving:
Photo
I've never seen a language add a full-featured REPL later in its life. It's incredibly hard to add "update function definition" interactively. Clojure is an interesting case. It was developed with a REPL in mind, but the JVM was not. Perhaps the VM matters less here?
https://twitodon.com/ is a neat tool for finding Mastodon people that you were already following on Twitter. It generates a CSV that Mastodon can consume. Of the 3,154 folks I follow, it found 117 Mastodon accounts. AIUI it requires other users to use the service.
Showing 676-690 of 7,652 posts