32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions
comment 1y ago · link · parent
Also, using a better shell language can be a huge productivity (and maintenance and sanity) boon, making it much less “write once, read never”. Here’s a repo where I have a mix of fish-shell scripts with some converted to rust scripts [1].
comment 1y ago · link · parent
But if you have to run n processes, much better to run them in a single pipeline like that.
(Source: I’m a shell developer. Fish-shell ftw!)
comment 1y ago · link · parent
But that doesn’t make it embeddable, of course.
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
Plus you can update tests, code, and comments in one go, with visibility into them at all times.
comment 1y ago · link · parent
C# has the concept of “Sequences” which is basically a generalization of a deque with associated classes and apis such as ReadOnlySequence and SequenceReader to encourage reduced allocations, reuse of existing buffers/slices even for composition, etc
Knowing the rust community, I wouldn’t be surprised if there’s already an RFC for something like this.
comment 1y ago · link · parent
Also, not what you asked but certainly related, some lower-language levels (not just jit languages) can and do automatically re-arrange struct members (when not optionally fixed); e.g. by default rust will rearrange members as needed to optimize padding.
comment 1y ago · link · parent
(the dead xfree86 project was probably the closest attempt to making this "just work" though it had a long way to go; this approach was not preserved in the Xorg fork)
comment 1y ago · link · parent
Compatibility has also come a long way in recent releases; you should give it a try.