2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions
comment 3y ago · link · parent
unix, linux, git, perl, python, c++, javascript, clojure, grep, winamp, ...
If software is constrained to resemble the communication structure of the organization that produced it, well then programmer politics are _boring_, while an individual's mind is _novel_.
comment 3y ago · link · parent
Seems like CMake configurations just kind of "happen" by trial and error, perhaps starting with a configuration copied from another project. It's not a language, it's a thing that you hack on to get the job done.
Another gripe is often when I look up "how to do X in CMake," the docs refer me to a feature that is more recent than the CMake packaged in common distros and for which there are few (no?) real world examples.
If somebody has a more constructivist approach to CMake, I'd like to try it.
comment 3y ago · link · parent
If only there were a way to write new code in a new language, mostly unconstrained by the long history of C++, but let the two languages share a toolchain, and maintain a logical interface compatibility layer. Not just linking the same ABI, but compatible types, functions, meta-functions (templates), etc.
Then you could implement all of the features and static checks of your dreams, and modify the language and its implementation to make those features/checks more powerful and easy to implement.
My guess is that's the idea. If you weren't a huge company with zillions invested in countless lines of C++, you wouldn't need to consider this. And, regardless, it's a neat idea.
comment 3y ago · link · parent
Agreed.
> So what about streams? Functions? Closures? Call/cc structures?
Those are interesting examples. They are all data structures in a sense (especially streams and closures), but to me they are more like functions than data (yes, yes, functions are values, blah, blah). Call/cc is a reification of execution control; thinking of it in terms of data stretches my brain.
comment 3y ago · link · parent
I can buy that. Think about a system thread. It's pretty much its own process that shares an address space with others. Its interface is syscalls and memory. A user thread (coroutine, goroutine, greenlet, whatever) is... whatever you want it to be. It can be small and special-purpose.
comment 3y ago · link · parent
I'll restate what at least one other commenter pointed out. If I, a consumer, say "I want transparent pricing," and then given transparent pricing I'm less likely to buy your product, that doesn't mean I was mistaken. It means the truth is that I don't want to buy your product, and you would have to lie to me in order to make a purchase more likely.
comment 3y ago · link · parent
It's an interesting idea to pull bits of the browser back into the system, or alternatively to write a desktop environment that's also a web browser (ChromeOS?).
A former coworker used Plan9 at a previous job, and he said it was cool how you could draw a rectangle on part of a terminal, and pipe that text (as it changes) to another process. Maybe rethinking GUI (and web in particular) from a unixy/plan9y perspective is a worthwhile exercise.
I grew up on Windows, and then there was the browser, and now everything is just the browser.
comment 3y ago · link · parent
Racket, a scheme-based language, extended the syntax so that any symbol appearing between two periods and not at the end of a list gets moved to the head of the list, so (a . b . c) becomes (b a c), which some people use so that (a . + . b) becomes (+ a b).
The D syntax you describe is what schemes call the "threading macro," or the thrush combinator in non-macro contexts.
comment 3y ago · link · parent
- array: not a singly-linked list.
- hash table: often an array of singly-linked lists, so not a list.
- red-black or AVL tree: can be built with cons cells.
- doubly-linked list: not a singly-linked list
- double-ended queue: array of double-ended queues, so not a list. Could also be implemented as a doubly-linked list.