In Rust, using the Option and Result types make the general flow of the application much easier to organize, make modular, and reuse.
In Rust, using the Option and Result types make the general flow of the application much easier to organize, make modular, and reuse.
This was a good blog post. I particularly appreciated the statement about the validate and parse function comparison: “Both of these functions check the same thing, but parseNonEmpty
gives the caller access to the information it learned, while validateNonEmpty
just throws it away.”
In what scenario could the first character be a newline character? I think that if-statement may be unnecessary, but I never use raw user input like you are here.
I’m not sure that you need a range when pulling the character from the input
variable. Simply input[i]
and input[input.len() - i - 1]
should work.
Boo, just missed it.
Is this already in a crate? I’d be happy to change over from rusqlite to limbo, at least for the async functionality.
Do you happen to know of a few situations where bloom filters are super useful? I need to identify when to use them.
I understand that the macro only affects compile time but I’m talking about the extra function that’s included in the resulting source code when the macro is expanded during compile. Based on other feedback, it looks like the unused function is optimized away.
This was a great post, but is the last state of the macro actually bad for performance in any way? I get that it’s ugly (and we should only choose to make code less readable like this when there’s actually an issue) but is it worse for runtime performance?
After watching Pocahontas for the first time in many years, it shocked me that anyone could value personal wealth over coexisting. The antagonist only cares about mining out gold, looking at the hills as having potential as opposed to perceiving them as implicitly valuable as they are. Nature is worth protecting.
Oh, okay. Thank you for clarifying. So doesn’t that mean we should never have a compiler written in the same language that it compiles? Why would we ever choose to make the mistake of using the same language? Is it ever not a mistake?
Why would a Rust compiler written in C be more trustworthy than one written in Rust?
If the idea is that, in an ideal world, we would compile each layer of compilers from assembly-up-to-Rust for each build, that seems even more risky as then you have to trust each compiler instead of just one.
I’m still lost on why they’re doing it.
The idea that someone would introduce the verbiage “garbage collection” in the context of Rust is crazy to me. I hope they change that to “file cleanup” or… anything else.
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?
AI is surprisingly helpful with providing a starting point. When you want a helloworld app, an example of how to use some part of a crate, or a code snippet showing how to take what you have and do something unusual with it, AI is super useful.
I would love to be able to get the same quality of AI locally as I do from ChatGPT. If that’s possible, please let me know. I’ve got two 3090s ready to go.
But for now, I’m just enjoying the fact that ChatGPT is free. Once they put up a pay wall, it’s back to suffering (or maybe/probably trying out some open-source models).
This comment would make sense if he hadn’t stated that the PR was politically biased but had instead said that it was unnecessary or that it would be inconsistent with the vast majority of the documentation. I’m just reading what he said. He claimed it was a PR based on politics, not language norms or historical norms. Only certain kinds of conservatives view gender-inclusive language as a political issue.
I appreciate that you don’t want to see this person as a hateful bigot and I don’t think he is either. Most people I’ve encountered that share the same reaction as him have basically been tainted by conservative influences, like media or parents, but they don’t have any real hate for trans people in their hearts. They’ve associated the idea of gender-inclusivity as being political and moved on with their lives, accepting the framing and narratives around the topic.
It’s a reference to this: https://github.com/SerenityOS/serenity/pull/6814#issuecomment-830793992
They have a phobia of making changes that are valid if they perceive the change to be motivated by politics. In the example above, the PR is denied because they have been convinced that the PR is about accommodating trans people. The existence of trans people and accommodating them via grammar is political for certain kinds of conservatives. The irony is that their own political beliefs are affecting their ability to distinguish a valid change from a politically-motivated one.
After many years of using SO, I’ve started using ChatGPT for all of my programming questions and have not looked back once. For my usual “I know X is possible, but how do I do that in Y language” questions, it’s been a dream using ChatGPT.