miniblog.

A neat IDE feature from Typescript 5.2: it completes object field names even if the previous field doesn't end with a comma! Syntax recovery is super helpful sometimes. https://devblogs.microsoft.com/typescript/announcing-typescript-5-2-beta/#comma-completions-for-object-members
@aburka Interesting, today I learnt. I don't know the history of this syntax: there doesn't seem to be much precedent for ^ as a range in any PLs that I can think of.
I struggle with dependency syntax. I never remember what ^1.2.3 means or how it differs from ~1.2.3. I believe both npm and cargo assign the same meanings to this notation, but it's less obvious than e.g. 1.x. 1.2.3 isn't an exact version constraint either! https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio
One interesting technique to reduce the review burden in Home Assistant, a project with a large community: ask PR authors to review other PRs! Screenshot is from https://github.com/home-assistant/core/pull/96209
A great deep dive on building GitHub's code view, optimising React, scaling to thousands whilst supporting both Ctrl-F and syntax highlighting: https://github.blog/2023-06-21-crafting-a-better-faster-code-view/
Today I learnt about Solargraph, an LSP for Ruby which includes an impressive amount of type inference and type checking! https://solargraph.org/guides/type-checking Type signatures are parsed from doc comments, similar to JSDoc with TypeScript.
Sweep is a really impressive demo of LLMs with coding: given your source code and an issue, it will generate a PR! Example: https://github.com/edreisMD/plugnplai/issues/65 I'd want to have a really thorough test suite if I was accepting LLM PRs though.
Steve Jobs famously asked for smooth scrolling (i.e. not line-by-line) in a Smalltalk demonstration and they changed the UI live. Here's a lovely 2 minute YouTube video demonstrating that modification: https://www.youtube.com/watch?v=eEz08IlcNMg
Here's a tricky diff situation I haven't seen before: a minimal text diff can be ugly. It would be nicer to match line 6 on the left with line 3 on the right, so the removed region is contiguous. (git-diff handles this case nicely already.)
Structs are great in Rust, but sometimes I find them a bit heavyweight. There's a little more syntax than e.g. OCaml, for type definitions and usages. I end up using more structs (records) in OCaml as a result. rust-analyzer has "convert tuple to named struct", which helps.
I've realised that my favourite side projects all have fiddly bits. It's really nice to have small features that you can add or debug in a few minutes.
> If you work on PLs long enough, you will develop a finely honed skill at creating bizarre programs like this that are technically valid but likely to trip up an implementation written by someone with a less perverse imagination than you. https://craftinginterpreters.com/closures.html#flattening-upvalues
I've written CLI programs, GUIs, websites, but never a smartphone app. I suspect it would be tricky: playing with your WIP app on a laptop doesn't feel the same as loading it on a handset. Have you ever written a smartphone app to scratch an itch? How was it?
Trends in mastodon decentralisation: https://socialhub.activitypub.rocks/t/analysis-of-fediverse-diversity-in-terms-of-decentralization/3252 The fediverse is becoming more diverse.
I've just added closure support to my toy programming language: https://github.com/Wilfred/garden/commit/d1fb4566a2187dfe98fb1d2278a7a0d2acd8059e Closures are more fiddly than I expected, but I now have a much better understanding of what downward/upward funargs are :) (Downward: passing a closure, upward: returning a closure)
Microsoft is writing a PHP parser that handles error recovery well, and the internals docs are really accessible. It includes a discussion of handling trivia and even some sample parsing code. https://github.com/microsoft/tolerant-php-parser/blob/main/docs/HowItWorks.md
I like the idea of a personal LLM trained on my emails. "Summarise my upcoming flight and travel to New York" would be useful. Email is a blob of fairly unstructured text that contains useful information.
Super impressed with the Ariadne library for compiler error formatting. It handles all the messy line highlighting, underlining etc that a good error should have. Left: old, handrolled error formatting Right: Ariadne formatting
Porting my 2016 Rust project from getopts to clap, and it's amazing how far the ecosystem has come. clap gives me a nicer help, automatic value validation, and can even generate completions for shells! First screenshot is getopts, second is clap.
A surprising number of websites will reject packets if they have the evil bit set! https://blog.benjojo.co.uk/post/evil-bit-RFC3514-real-world-usage
Showing 321-340 of 7,506 posts