HackerTrans
TopNewTrendsCommentsPastAskShowJobs

benburwell

no profile record

comments

benburwell
·letztes Jahr·discuss
Some examples of flights without schedules:

- A private pilot who departs their local airport without filing a flight plan and flies around for a while.

- A charter jet that departs whenever the passengers show up.

- A medevac helicopter departs a hospital to return to its base. While en route, it is rerouted by dispatch to pick up a patient at a different hospital.
benburwell
·letztes Jahr·discuss
This is still very much the case. Although most new code is written in other languages, Tcl still has a substantial presence.
benburwell
·vor 3 Jahren·discuss
In general, this is actually done: there are defect detectors that are installed along tracks that monitor for several conditions as trains pass over/through them. Once the train has passed, a voice radio message is sent to the train crew.

Here's an example of one working: https://www.youtube.com/watch?v=R7BGg82uQ1U

I'm not sure whether similar equipment was a factor in the East Palestine incident.
benburwell
·vor 3 Jahren·discuss
I wrote about how I decrypt TLS streams in Wireshark for debugging purposes here: https://www.benburwell.com/posts/intercepting-golang-tls-wit...

It won't apply to every situation, but might provide some building blocks you can adapt to your environment.
benburwell
·vor 4 Jahren·discuss
The article mentions a takedown notice they received from GitHub instructing them on how to remove certain content from their repo. I'm guessing maybe this PR contains some of that content they were asked to remove, and there's a bug in GitHub when rendering a pull request page that references deleted content?
benburwell
·vor 4 Jahren·discuss
How useful is this in practice though?

I'd guess that far greater than 99% of the people using (most) products do not have perfectly color calibrated monitors. If it doesn't look good on the developer's "kinda close" monitors, that seems like a decent indication that the design needs to be updated to allow for "rougher tolerances" so to speak.
benburwell
·vor 4 Jahren·discuss
I really want to like GitHub Actions. But it feels like every time I'm trying to get something done, they are broken.
benburwell
·vor 5 Jahren·discuss
I also made something similar for Boston: https://mbta.benburwell.com

Mine doesn't show the routes. Originally it did, but it was too visually busy. I like the way you did it where the route shows up when you select a vehicle!
benburwell
·vor 5 Jahren·discuss
Your "state of the art" Go code is not really a good example of how that functionality would be written.

If you want to check for a specific error condition, then just define a value for that error and use `errors.Is` to check for it. This works as you'd expect with wrapping: https://go.dev/play/p/rJIlKKSYn9Q

> With the current go error handling, you need to add the informations yourself in the string, not as a real data structure.

This is completely false! If you want to provide a structured error, then you just need to define a type for it. In your example, a Go programmer might use errors.Is(err, fs.ErrNotExist) and errors.As if they wanted to retrieve the specific file path that does not exist in a strongly-typed way, something like https://go.dev/play/p/hdHPLAVbQuW.

> Delegating error handling to a try/catch block with a typed data structure allows the caller to care for certain type of errors and delegate the others to its own caller. With the current error type in Go, what would you do? parse the error message?

Certainly not! I think there is a misconception that "an error is a string" -- in Go, an error is actually any type that satisfies the error interface, i.e. has an `Error() string` method. It can be any type at all, and have as many other methods as you like in order to provide the functionality you need.

> what if the function is defined in a dependency you have no control over?

There's nothing stopping you from writing `throw new Exception(String.format("file not found: %s", filename))` in languages with exceptions either. In both cases, it would be recognized as poor API design.

Regarding stack traces, Go makes a strong distinction between errors (generally a deviation from the happy path) and panics (a true programming error, e.g. nil pointer dereference, where the program must exit). Errors do not provide stack traces since there is no need for them in a flow control context, panics do provide stack traces for useful debugging information.