240 karma · joined May 5, 2022
If Leetcode is just a means to an end for you you're probably not going to have a good time.
I'm sure Google could (and probably should) do even more to help, but FFMPEG directing social media rage at a company for contributing to their project is a bone-headed move. There are countless non-Google companies relying on FFMPEG that do much less for the project, and a shit show like this is certainly not going to encourage them to get involved.
For a business it's often fine to stop at a local maximum, they can keep using old versions of coreutils however long they want, and they can still make lots of money there! However we are not talking about a business but a fundamental open source building block that will be around for a very long time. In this setting continuous long term improvement is much more valuable than short term stability. Obviously you don't want to knowingly break stability either, and in this regard I do think Ubuntu's timeline for actually replacing the default coreutils implementation is too ambitious, but that's beside the point—the rewrite itself is valuable regardless of what Ubuntu is doing!
The best solution for automatically cd'ing into the repo is to wrap git clone in a shell function or alias. Unfortunately I don't think there's any way to make git clone print the path a repository was cloned to, so I had to do some hacky string processing that tries to handle the most common usage (ignore the "gh:" in the URL regex, my git config just expands it to "git@github.com:"):
https://github.com/Andriamanitra/dotfiles/blob/d1aecb8c37f09...
state = "inactive"
if_func(condition) {
state = "active"
activate_button.disabled = true
deactivate_button.disabled = false
}
In many languages you would need to wrap `state` in something that can be passed by reference, and make the function take multiple parameters. For example in JavaScript it would turn into something like this mess: let state = ["inactive"];
if_func(condition, ({state, activate_button, deactivate_button}) => {
state[0] = "active";
activate_button.disabled = true;
deactivate_button.disabled = false;
}, {state, activate_button, deactivate_button});Even when files are enumerated it's pretty rare to have more than 9 parts and no zero-padding, whereas there are almost always multiple consecutive digits in the use cases for which "natural" sort is not a good fit for. It just feels like a bad default, at least for a programmer's workload.
I'm also excited about `rv tool` because I've been having to re-install rubocop and ruby-lsp gems every time the minor version of the system Ruby is updated. It's just a few commands every year (and I'm sure it's a skill issue) but having things "just work" with a single `rvx rubocop` command will be sweet.
* manage dependencies
* format and lint code
* publish package on crates.io
* open the project documentation
* install binaries
* build/run the project
* run tests
* run benchmarks
Uv/rv don't (yet?) do all of that but they also manage Ruby/Python versions (which is done separately by rustup in Rust).
That's a tradeoff you should carefully consider because there are also downsides to disallowing non-ASCII characters. The downsides of allowing non-ASCII mostly stem from assigning semantic significance to upper/lowercase (which is itself a tradeoff you should consider when designing a language). The other issue I can think of is homographs but it seems to be more of a theoretical concern than a problem you'd run into in practice.
When I first learned programming I used my native language (Finnish, which uses 3 non-ASCII letters: åäö) not only for strings and comments but also identifiers. Back then UTF-8 was not yet universally adopted (ISO 8859-1 character set was still relatively common) so I occasionally encountered issues that I had no means to understand at the time. As programming is being taught to younger and younger audiences it's not reasonable to expect kids from (insert your favorite non-English speaking country) to know enough English to use it for naming. Naming and, to an extent, thinking in English requires a vocabulary orders of magnitude larger than knowing the keywords.
By restricting source code to ASCII only you also lose the ability to use domain-specific notation like mathematical symbols/operators and Greek letters. For example in Julia you may use some mathematical operators (eg. ÷ for Euclidean division, ⊻ for exclusive or, ∈/∉/∋ for checking set membership) and I find it really makes code more pleasant to read.
Like others have pointed out making road speeds faster barely makes a dent in travel times. The absolute best way to reduce travel times is to build denser cities, which incidentally means less parking, narrower roads, and, most importantly, fewer cars. In a densely populated area it's impossible to match the throughput of even a small bike path with anything built for cars. Safety is just a bonus you get for designing better, more efficient, more livable cities.
Most importantly location matters. Space and buildings are not something that you can easily ship from one market to another to balance supply and demand. Space is inherently limited and replacing existing buildings with new more efficient ones is also problematic when you have people happily living in those old buildings, especially in high demand areas. Construction work takes time and in the meanwhile the displaced families will create even more demand.
There are practical limits on how densely you can pack floor space before it becomes prohibitively expensive, unsafe, or simply impractical. As you build higher the costs grow exponentially while the livable space per floor keeps decreasing due to the tapered shape of the building and need for larger structural core and more elevators. Above certain height you will be forced to target wealthier residents which means either offices or large luxury apartments that are anything but space efficient.
Construction is extremely capital intensive. A building takes a large upfront investment, and it takes a long time for it to pay off. With cars the cost of making more is marginal once you have an assembly line in place so it's significantly easier to re-invest profits into ramping up production.
Renting real estate makes more sense than renting automobiles because real estate is more expensive, less liquid, and better at holding its value over time. Owning a house is more difficult even when it would make financial sense to do so (not everyone can get a mortgage, or commit to living in the same city for an extended period of time).
> for better or worse we have chosen to place almost no limits on the quantity and density of cars
Even worse, most places have chosen to place a lower limit on the quantity and density of cars through parking mandates. It is absolutely insane that we are still wasting space on parking even in densely populated urban centers where it's impossible to accommodate everyone commuting by car.
I think it's probably a good thing to explore a wider range of ideas, even if many of the ideas suck and end up being scrapped.
I agree that "AI" can be useful as an umbrella term, but using it when referring specifically to the "LLM" subset of AI technologies is not useful. A ton of information about the capabilities and limitations of the system is lost when making that substitution. I understand why marketing departments are pushing everything as "AI" to sell a product but as consumers we should be fighting against that.
But I assume the comment you were replying to was not referring to the conditional syntax from C-like languages, instead referring to a concept of an if "function", like the `ifelse` function in Julia [1] or the `if` form in Lisps (which shares the syntax of a function/macro call but is actually a special form) [2], neither of which would make sense as one argument function.
[1] https://docs.julialang.org/en/v1/base/base/#Base.ifelse
[2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Co...
PS. I don't think it's a coincidence that both of your examples of creating wealth are typical "poor people" jobs. Obnoxiously wealthy people rarely create anything because they can simply pay someone else to do it, usually for a fraction of the value of their output.