The docs model for R packages is really interesting. Every package has docs as a PDF file, and the package server supports 'vignettes' (standalone tutorials) as a first class artifact!
E.g.
miniblog.
I like the concept of a REPL: an interactive environment where you can redefine code and evaluate snippets to see the result.
I try to avoid the term "REPL" though. Most languages don't use "read" for parsing (the R) and it's confusing. Are there good alternatives?
What's your preferred granularity of docs?
(a) A whole module on one page, e.g. https://pkg.go.dev/time, making search easy?
(b) A function per page, e.g. https://www.php.net/manual/en/function.time.php, giving more space for examples and See Also sections?
I'm torn, and I've seen both done well.
Interpreters versus compilers as a spectrum, and a fun worked example of optimising Brainfuck:
https://www.youtube.com/watch?v=0DLdQ6yb7h8 is a really accessible introduction to programming workflows with Sly for Common Lisp.
The notion of 'stickers' is novel to me: you mark places in the code where you want to remember values (essentially tracing) or pop to a debugger (breakpoints).
As shortform video grows in popularity, will we start seeing it in docs?
I can imagine a docs page that starts with a 30-60 second video as being popular for some users.
What defines the *feel* of a programming language?
I've heard JS described as "composing lego blocks" due to npm, and Common Lisp with Sly feels like a place you explore (e.g. docs from the REPL).
All PLs have tools though. Which ones set the vibe?
Today I read the term "negative bus factor" to describe the situation where multiple libraries have the same single maintainer.
Perhaps people measure bus factor logarithmically?
A function with three arguments of the same type is way easier to screw up than a function with ten arguments of different types. It's weird.
I've released difftastic 0.41 with a ton of quality of life improvements!
* Better highlighting of words in comments and fallback textual mode
* Better support of tabs (handy for Makefiles)
* Support for nested syntax in HTML files (courtesy of Sesse)
Today I learnt that Cell<T> has the size of a pointer (i.e. probably 64 bits) in Rust, regardless of the size of T.
It's a common pattern for making struct fields mutable, but the T isn't actually stored inside the struct.
A survey of parser generator usage in major language implementationss: https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-survey-2021.html
Most have a handwritten parser. GCC and Go moved from generated to handwritten. SQLite and Python <3.10 built their own parser generators!
The next version of difftastic will support parsing CSS and JS syntax inside HTML! This makes a huge difference to HTML files.
This support for tree-sitter sub-parsers was contributed by Sesse :)
Writing a programming language? Challenge the design status quo:
Zig has moved to a compiler bootstrap approach that uses webassembly: https://ziglang.org/news/goodbye-cpp/
They check in the wasm artifact and provide their own wasm compiler. wasm is the most portable backend supported by LLVM.
OCaml does something similar! It includes a minimal VM.
Showing 226-240 of 245 posts






