I'm a fan of the Software Unscripted podcast, and I particularly enjoyed this recent episode about CrowdStrike and security culture: https://www.youtube.com/watch?v=rzjaZssBEiI
The guest (Kelly Shortridge) compares attackers to lawyers trying to find loopholes. This is such a great analogy.
miniblog.
One interesting design choice in Emacs that I haven't seen in other editors: reserved shortcuts.
An Emacs extension shouldn't use F5 through F12, or Ctrl-c LETTER. This lets users configure their own shortcuts. https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html
Does it exist elsewhere? I miss it in VS Code, where e.g. all the Fn keys are already assigned.
Really cute approach to reporting type errors: when there's a type error, show an example of a runtime error that the type check has prevented!
Data-Driven Techniques for Type Error Diagnosis https://escholarship.org/uc/item/59s4h4pv
Difftastic has been cited in a paper!
Modernizing SMT-Based Type Error Localization https://arxiv.org/abs/2408.09034
The authors use difftastic to work out which parts of a buggy program have actually changed, a great use case :)
LLMs are a really accessible machine learning technique. I dabbled with text classifiers a few years ago and the APIs were way more involved.
(system_prompt: String, input: String) -> String
I can prototype with this much more easily!
Bootstrapping a language can be immensely satisfying.
I've added the ability to define stub types in the Garden stdlib and suddenly I don't need to special-case Int or String! They're just normal type declarations.
I'm a huge fan of Swift's 'Error Handling Rationale' design document: https://github.com/swiftlang/swift/blob/9315673c003875158852579bd1f33480cdec5461/docs/ErrorHandlingRationale.md#fundamentals
It carefully defines terminology and compares with other languages, so you can understand Swift's position and preference in the design space.
I'm having fun writing a simple type checker, but I'm learning firsthand why syntax-directed checking doesn't work. It prevents inference.
My checker catches real bugs, but it can't handle cases like this:
[1, 2].map(fun(x) { x + 1; })
I think I need bidirectional checking.
I've been experimenting with an 'evaluate up to cursor' mode for my PL project.
I love evaluating self-contained snippets in Lisp, this generalises the idea.
The interpreter remembers the arguments when you run tests, then can re-use them when you say 'eval up to here'.
What do you think?
Today I learnt that Emacs 28 shipped a context-menu-mode! https://oylenshpeegul.gitlab.io/blog/posts/20230129/
This seems quintessentially Emacs: deeply hackable, but building UI features in an order very different to the mainstream.
Individuals and interactions over processes and tools => Competence trumps process
Working software over comprehensive documentation => Minimize time from program launch to deployment of simplest useful functionality
I really like the DoD's phrasings of classic agile maxims: https://media.defense.gov/2018/Oct/09/2002049591/-1/-1/0/DIB_DETECTING_AGILE_BS_2018.10.05.PDF
Has anyone built a great solution to 'run all my unit tests automatically'?
It's straightforward to write a while loop in bash, but handling timeouts, syntax errors etc well is hard.
Running on save would be good, although I wonder if you could run fast tests on each keystroke.
New version of difftastic is out!
* Fixed a nasty crash that was relatively common
* Minor display and performance fixes
https://github.com/Wilfred/difftastic/releases/tag/0.60.0
I've had a new Linux laptop for several weeks and only just realised that I didn't have `man` installed!
Google is my default the vast majority of the time, and this seems to confirm it.
I'm designing a programming language and trying to decide the type of `let x = 1;`. Should it be Unit or Int?
Advantage of Int: really convenient when evaluating snippets in a REPL.
Advantage of Unit: It's much less confusing when type inference runs on an incomplete function.
`init` feels like an unhelpful name in OO. It doesn't give you an initial value, it initialises the instance that has already been created. Developers are often surprised that init doesn't return the instance, because they have a strong association with `new Foo()`.
Perhaps `finish` would have been a less confusing name?
Bril is a cute intermediate language for teaching (think simplified LLVM IR): https://www.cs.cornell.edu/~asampson/blog/bril.html
The idea of providing a standard JSON format to help students write basic passes is really elegant.
What are the most popular languages that have used an AST walker for their implementation?
I know Ruby used to do this, but there must be others.
(I'm interested in the lowest PL speed that users will tolerate if you have awesome features.)
I'm increasingly doubtful that commit messages should be entirely immutable.
I sometimes find myself editing or commenting on merged pull requests, to help future readers.
Phabricator appended a URL to commit messages, which helped. In principle PR merging could do the same thing.
I've released difftastic 0.59! In this release:
* Fixed a nasty crash on textual files
* Added F# and device tree support
* Improved comment syntax highlighting (especially for Elm)
https://github.com/Wilfred/difftastic/releases/tag/0.59.0
Showing 41-60 of 135 posts