65 karma · joined Jun 25, 2019 (7y ago) · 15 submissions
comment 1y ago · link · parent
Say I'm messing around with the commit that introduced a bug, somewhere deep in the history. With git, it's basically impossible to mess up the repo state. Even if I commit, or commit --amend, my downstream refs still point to the old history. This kind of sucks for making stacked PRs (hello git rebase -i --autosquash --update-refs) but gives me a lot of confidence to mess around in a repo.
With jj, it seems like all I would have to do is forget to "jj new" before some mass find+replace, and now my repo is unfixable. How does jj deal with this scenario?
comment 3y ago · link · parent
I disagree. Interfaces in C need to carefully document their expectations and do exactly that amount of checking, not more. Documentation should replace a strong type system, not runtime checks. Code filled with NULL checks and other defensive maneuvers is far less readable. You could argue for more defensive checking at a library boundary, and this is exactly what the article pushes for: push these checks up.
Security-critical code may be different, but in most cases an accidental NULL dereference is fine and will be caught by tests, sanitizers, or fuzzing.
comment 5y ago · link · parent
Poetry.
Then, to be fair:
> We have a back-up means of updating the Service Health Dashboard that has minimal service dependencies. While this worked as expected, we encountered several delays during the earlier part of the event in posting to the Service Health Dashboard with this tool, as it is a more manual and less familiar tool for our support operators. To ensure customers were getting timely updates, the support team used the Personal Health Dashboard to notify impacted customers if they were impacted by the service issues.
I'm curious if anyone here actually got one of these.
comment 6y ago · link · parent
It resolved itself for me recently in all apps except Slack. I have no idea why. I'm fairly sure I didn't update anything.
While it was still reproducing, I tested a purported fix in the upcoming Chromium 87 (or 88?) and it was resolved. So just wait a bit or try Canary. More specific info in the bug thread of course.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=111304...
comment 6y ago · link · parent
[1] https://crystal-lang.org/reference/syntax_and_semantics/macr...
[2] https://doc.rust-lang.org/reference/procedural-macros.html
[3] https://doc.rust-lang.org/reference/macros-by-example.html
comment 6y ago · link · parent
[0] https://play.rust-lang.org/?version=stable&mode=release&edit...
comment 6y ago · link · parent
[1] "NAR" in the upper left, and https://forums.vrsimulations.com/support/index.php/A/A_Forwa...
comment 6y ago · link · parent
https://youtu.be/tISy7EJQPzI?t=2209
I remember watching another talk where they propose something similar for the language itself, but I can't find it at the moment.
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
There might be a way around this limitation, but it makes figuring out who is supposed to free a resource hard to do.
The rust solution is to have different traits for different levels of ownership. For example, if I want to iterate over a vector of strings, I can get a Iterator<&str> without destroying the vector. If I'm willing to destroy it, I can get an Iterator<String>.
Or, you can actually implement a trait on a reference type[0] to convert a `self` argument to effectively `&self`. This is the recommended way to implement some conversions, using AsRef and/or Into[1].
[0] https://play.rust-lang.org/?version=stable&mode=debug&editio... [1] https://doc.rust-lang.org/std/convert/trait.AsRef.html
14.
Shift and Scale: Revisiting Confusing High School Math(lytigas.netlify.com ↗)
2 points · by lytigas · 7y ago · discuss