It feels like rename is by far the most important refactoring operation. If I had an IDE with only one refactoring, I think I'd want rename.
miniblog.
@krinkle A surprising number of PL design workarounds are "just add another equals sign" 🙃
I really like the MELPA model of packaging directly from git. It solves the problem of forgetting to release something -- just merge a PR and you're done.
It also makes version number bumps much less important.
I really like the MELPA model of packaging directly from git. It solves the problem of forgetting to release something -- just merge a PR and you're done.
It also makes version number bumps much less important.
You could go even further in a statically typed language and also figure out when breaking changes occur.
TIL Tcl has a notion of 'safe interpreters', a mode where you can run untrusted code in a sandbox: https://www.tcl.tk/man/tcl8.4/TclCmd/safe.htm
Not many programming languages have this, but it's way safer to include in the implementation than try to build as a userland library.
I'm adding a += operator to my programming language, because writing `x = x + 1` is tedious.
This opens the tricky design question of which operators should support this. Is += and -= sufficient, or do you expect things like >>= and **= to be available?
I would *love* a terminal emulator that treated each command as an atomic unit, so I can efficiently scroll between them.
Line-based scrolling is annoying when you've just run a command that output 1,000 lines.
Do any such tools exist?
I travelled recently with six electronic devices, and every single one used USB-C for charging. It was wonderful, and not an experience I've had before.
Assertions are a surprisingly nuanced design space. In a test, if I assert `x < y`, I really want to see the values of x and y when it fails.
Do you define an API for every possible predicate (Python's assertLess, expect.js) or try to support the native syntax (c.f. pytest)?
It's odd that games often show the hours played, but I've not seen this in other apps.
"You've spent 20 hours talking to this person." Would this be a usage deterrent? If so, why do many games offer it by default?
I'm intrigued to see that Google has quantified that new code is generally buggier and less secure than code that has existed in your codebase for longer:
JSON is too small (no comments) and YAML is too big (many string syntaxes, relatively few implementations).
TOML is in the sweet spot for complexity, but I agree this syntax is by far the most confusing part.
TOML 1.1 improves it at least:
C++ no longer considers trivial infinite loops to be undefined behaviour! https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2809r3.html
Spotted in the release notes for the latest clang.
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.
I'm not a fan of the mastodon web UI behaviour where moving down with cursor keys 'snaps' to the next toot.
Is it possible to disable this, so my cursor keys always move the page by a consistent visual amount?
I've poked in the settings and didn't see anything obvious.
Showing 166-180 of 7,549 posts