# grep search the current directory
function lg() {
ls -alt | grep $1
}
# grep search the current directory
function lg() {
ls -alt | grep $1
}
Can anyone explain what this means to me like I’m 5?
When I learned Python I thought that not having a statically typed language was the way to go, but then it just became an issue when I was trying to ensure that everything was at least something like what I was expecting. Going back to statically typed languages even harder with Rust has been a dream. I love it.
I hate that it came to this, after so many Rust devs left, but all I can say is “Good.”
Is that a water dispenser? I need something like that.
That’s something I haven’t heard before about the memory safety. In what ways is it not memory-safe?
At first I was disappointed to see this, but after looking into it it looks like they weren’t using hyper as a means to migrate the project to Rust. If they’re not going to move away from C, it seems like a fair decision.
There is a market for a game engine that uses algebraic variables and geometry to guarantee purely accurate collision detection. That said, a bit of searching shows that it’s going to be much slower then current approximate approaches.
Even if you were using the builder pattern, this maintains the immutable variable in the parent scope while you use the mutable variable’s builder pattern methods (basically exactly as my example demonstrates) in the inner scope.
edit: Oh, I think you mean you would chain the builder pattern calls and assign it to an immutable variable. Sure, that makes sense if you own the struct.
I prefer to encapsulate a mutable reference to the instance in a scope.
let post_form = {
let mut post_form = PostInsertForm::new(
// your constructor arguments
);
post_form.some_mutating_method(
// mutation arguments
);
post_form
};
This way you’re left with an immutable instance and you encapsulate all of the logic needed to setup the instance in one place.
I save “template” SQL queries in a special directory so that I don’t have to google how to do specific things. It’s basically my own personal “examples” folder.
Who is writing SQL in the terminal?
The bit of Clean Code that I read was unimpressive, but Clean Architecture was amazing. I view that book as required reading for anyone who wants to write code professionally. If Uncle Bob hasn’t realized that his coding style is worse than alternatives, I do not see how a second version of the same bad ideas is going to do well.
Oh, yeah, vim motions are wonderful. I started using them when I installed Linux on my Chromebook due to the lack of a good keyboard setup (I still don’t know where the Delete key is on that thing).
vim (or better yet vim bindings) is great. I’ll never go back.
Neovim. I tried to use it a year ago, but I felt like I was fighting it every time I just wanted to make progress on my project. VSCode doesn’t get in my way. I’m going to give it another shot in a few years.
What if instead we utilized an algorithm, some code, that would ultimately generate the file? I could imagine a program that generates a number which ultimately is more dense than the program. For example, if we just-so-happened to need a million digits of Pi the program would be shorter than the number. Is there a way to tailor an algorithm to collapse down to any number? As an example, what if we needed a million digits of Pi but the last 10 digits need to be all 9s?
Do you happen to know of any good algorithms or numbers? Pi gets harder to calculate with each digit, so it’s not a great candidate.
“Cleaning up…”
# Copy pwd into clipboard using pbcopy alias cpwd="pwd | tr -d '\n' | pbcopy && echo 'pwd copied into clipboard'"