312 karma · joined December 20, 2017
:nonzero-int (* (range "19") (any (range "09")))
:int (+ "0" :nonzero-int)
:decimal (cmt (* (? (<- :int)) "." (<- (some (range "09")))) ,parse-decimal)
:fraction (cmt (\* (? (\* (number :nonzero-int) :s+)) (number :nonzero-int)
"/" (number :nonzero-int)) ,parse-fraction)
:integer (cmt (number :nonzero-int) ,parse-integer)
:num (+ :decimal :fraction :integer)However, there is a bug: it seems to insert a newline after every punctuation, including after "Dr." (the persona was "Dr. Thomas").
At the time I made it a 32-bit system since LFS didn't (doesn't?) support multilib and I knew I would need some 32-bit libraries.
I used that as my main system for quite a long time, upgrading software or installing based on BLFS or my own intuition as necessary. It worked pretty well! It was an invaluable experience in the development of my Linux expertise.
After about 5 years I got frustrated with the 32-bit system so I did an in-place upgrade to 64-bit. It was thrilling to come out the other end of that, to say the least (seriously). The training wheels were definitely off, but LFS had educated me enough to be confident in doing it. Also I kept around all the 32-bit stuff of course, so I could incrementally upgrade things.
After a few more years (maybe 2018ish?) I grew weary and changed to Arch (now I use void) :)
All that being said, I highly recommend LFS!
For those unaware, the abi_stable crate makes stable ABIs (even with complex features like trait objects) pretty easy and, importantly, verifiable. It is primarily useful for rust-to-rust abi stability (for instance when creating a plugin system).
And coincidentally, the times I've wanted to reach for GATs have been when dealing with Futures (specifically dealing with lifetimes of Futures produced by Fns; basically what gates async functions in traits). I'm excited to be able to finally use them in my APIs!
That being said, I've never used Copilot myself, so I can't speak very confidently about it. But from what I've seen, it kind of allows you to incorporate every library that's ever been made open source into your project, but in a more granular fashion. Which naturally would save you some typing :)
P.S. I realize Copilot isn't necessarily copying other code verbatim, though I assume pretty often it basically ends up doing that, at least in pieces.
[0]: https://dwheeler.com/readable/readable-s-expressions.html
I agree discoverability is not great; to be honest I can't remember how I discovered the plethora of commands I use, though I do have a habit of reading the help a decent amount. That's how I discovered "g?" (Rot13) :D
If you read the specification of std::endl, it simply sends a "\n" and flushes.
I'm currently using ropey to keep the server side state of documents in an LSP server. I recommend you add at least a slice type, as that's typically desirable. But looks great otherwise!
Of course one place I don't cache is in function application because the language is not pure (so we want side effects to occur again), but this makes me think it might be really good to derive which functions/subexpressions are pure and allow the cache to be retained through function calls for those.
I'm gonna keep a close watch on this. I should probably read more white papers :)
If a language has fexpr semantics, you can for instance implement both macros and "normal" functions (among many other things) in very similar ways, since the only difference is that a normal function will first evaluate its arguments and then use the results of evaluation, whereas a macro may not do that (or may conditionally evaluate them!).
Hope that helps a little...