Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dwattttt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
871.
▲
by
dwattttt
3y ago
Yes? The combination of "historic, political, and performance" is a particular choice. Our attitudes to all of these are different to when C was maturing, particularly where reliability and security are involved. And not least of
872.
▲
by
dwattttt
3y ago
Undefined Behaviour in C is the opposite of a gap in the standard. It's behaviour that's addressed in the standard that for historic, political, and performance reasons is allowed to be inconsistent. That's the reason it suck
873.
▲
by
dwattttt
3y ago
As a Rust fan, it sounds remarkably similar to "if you still need unsafe somewhere, why bother trying to limit unsafe at all"
874.
▲
by
dwattttt
3y ago
1st approach) you don't 2nd approach for when you ignore the first) you use a type that doesn't "own" the pointer, and have the FFI side that allocated it free it 3rd approach for when you find out you can't do the
875.
▲
by
dwattttt
3y ago
That would get you to the assembly generated, but not the behavior of the CPU in the question, which goes to show it's a pretty silly position to hold.
876.
▲
by
dwattttt
3y ago
> Rust Quiz > > What is the output of this Rust program? > > > // JavaScript is required (sorry) Tears is the output of that Rust program. EDIT: I will never understand HN comment newlines.
877.
▲
by
dwattttt
3y ago
By corollary does that mean that if there isn't a formal proof of how C compiles to assembly, and how those opcodes are interpreted by a particular CPU model, that C formally isn't specified to have any meaning to a CPU?
878.
▲
by
dwattttt
3y ago
Not as different as we'd like; "we deployed our C to the platforms we need" works until the minute you change compiler/version/flags, and find out you were relying on something not guaranteed at all. My personal got
879.
▲
by
dwattttt
3y ago
> "Congratulations, all the kids love this creative, high quality playground! Unfortunately they're all at the hospital." The company even optimised the number of children who can experience it! A child in the hospital is
880.
▲
by
dwattttt
3y ago
Integral windup is the term for this issue, there's a few ways to deal with the windup if you need to keep the integral component (e.g. for tracking a moving set point, or to overcome a stable error). https://en.wikipedia.or
881.
▲
by
dwattttt
3y ago
Sounds like a job for name mangling
882.
▲
by
dwattttt
3y ago
It's not strictly impossible to avoid panicing in Rust, but it's pretty painful. The approaches typically involve forcing a linker error if a panic is linked ( https://docs.rs/no-panic ). Yes, you'll be (re)wri
883.
▲
by
dwattttt
3y ago
The major tracing library in Rust suggests a consumer that prints to stdout, but it's at the end of the introductory documentation; https://docs.rs/tracing/latest/tracing/ EDIT: it's what I've
884.
▲
by
dwattttt
3y ago
For those curious about the Windows equivalent, procmon is a system-wide strace tool; filtering mandatory.
885.
▲
by
dwattttt
3y ago
Ah, because while systemd is divisive, couldn't it be _more_ divisive?
886.
▲
by
dwattttt
3y ago
It's been a while since I've seen HPC code, but there's more people who can write average code that need HPC than there are specialists to do it well.
887.
▲
by
dwattttt
3y ago
I was careful to try read what was said; the language might be a bit loose because it's a transcript of a live talk. That said, the example they gave, and their motivating problem of the qsort API in C don't show anything about us
888.
▲
by
dwattttt
3y ago
Go's nominal interface feature is definitely interesting, but that section doesn't talk about how amazing it was to implement interfaces implicitly: > That notion quickly grew into the idea that value types had behaviors, defin
889.
▲
by
dwattttt
3y ago
I came away with the impression they were saying they'd invented interfaces, so I reread it: > That idea was exciting for us, and the possibility that this could become a foundational programming construct was intoxicating. Talking
890.
▲
by
dwattttt
3y ago
Java has had interfaces for a _long_ time, and it definitely meets the popularity requirement. EDIT: Since its 1.0 release in 1996
891.
▲
by
dwattttt
3y ago
Even as a fan of Microsoft, rephrasing that as "the entirely legal thing they did that drove a competitor out of business" doesn't make me feel better about the outcome.
892.
▲
by
dwattttt
3y ago
You can get it all done by 3pm on the dot, just never do the safe thing
893.
▲
by
dwattttt
3y ago
Everything is cheap when you aren't the one paying for it.
894.
▲
by
dwattttt
3y ago
In the post PATA days the available data connectors all map to disks 1:1, it knows how many power connectors would be needed for them. Expansion cards could probably supply power as well as data? I suppose other uses for those connectors wo
895.
▲
by
dwattttt
3y ago
There's a lot to be said for when dynamic analysis is possible; it doesn't have to be perfect in order to eliminate code that isn't involved in an interaction (worst case you cause that code to die horribly & observe the
896.
▲
by
dwattttt
3y ago
Legal process, discovery, and corporate records.
897.
▲
by
dwattttt
3y ago
I don't specifically know, but typical NAT can use stateful flow information, i.e. "a UDP packet originated from inside the NAT to external IP/port X, packets from that external IP/port should be routed to the originatin
898.
▲
by
dwattttt
3y ago
I'd also add that I appreciate a good maths joke, but that's far outweighed by an irrational (in degree) anger at APIs where the error case is a member of the success cases type
899.
▲
by
dwattttt
3y ago
I mean, they should default to an out of band error; these days, especially for something as high level as mapping, there's no good reason to need to fold "this is an error case" in with "this is a set of valid coordinat
900.
▲
by
dwattttt
3y ago
If the lifetime of the allocation works out this can end up with a nice pattern of "try to use a cheap stack buffer, and fall back to a more expensive heap allocation when that fails"
More ›