Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
weberc2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
121.
▲
by
weberc2
7y ago
Any resources (blogs, podcasts) suitable for laypeople?
122.
▲
by
weberc2
7y ago
While true, the distractedness (on the part of the pedestrian or the driver) doesn't absolve the driver of their responsibility to yield in this scenario. A driver who hits a pedestrian in this scenario will be subject to criminal and
123.
▲
by
weberc2
7y ago
> In the US, many drivers will ignore the existence of pedestrians altogether. This is pretty limited to urban areas, in my experience. In more suburban and rural parts of the country, people are much more cautious and obedient to traffi
124.
▲
by
weberc2
7y ago
> Cars almost always have a green in the same direction, meaning they can turn into you. This is where you are mistaken. In the US, cars are obligated to yield to pedestrians in the crosswalk while turning, even with a green light. The p
125.
▲
by
weberc2
7y ago
I do the same, but I do worry about the security aspect. I don’t like the idea of having a bunch of devices on my network. I put the IoT things on a guest network, but I still feel iffy about it. I’m sure there are better solutions, but all
126.
▲
by
weberc2
7y ago
If I’m understanding you correctly, I think you want CloudFormation?
127.
▲
by
weberc2
7y ago
When I was doing Qt development, getting CMake to build Qt projects properly was absurdly difficult. CMake had added some half-baked first class functions for building Qt (it's insane that a build system has first class knowledge of ce
128.
▲
by
weberc2
7y ago
I misunderstood your question. I don't know of the specific reasons; presumably they're the same reasons that intermediate C programmers can't reliably write secure C.
129.
▲
by
weberc2
7y ago
I think that’s what I meant as well, but I’m not sure what you mean by “service orchestration”. If Kubernetes is an example of a service orchestrator, then I think something like EC2 would be the unikernel analog.
130.
▲
by
weberc2
7y ago
“Container” and “OS” don’t mean anything in the context of unikernels. Unikernels are applications with everything they need to run (on bare metal or a hypervisor) baked into the application. So there is no OS to speak of, and the “orchestr
131.
▲
by
weberc2
7y ago
Fair point. Perhaps my issue was less about the visibility of the annotation and more that the types in functional languages tend to be more abstract or complex (e.g., monads, functors, etc) and harder (for me) to reason about despite the c
132.
▲
by
weberc2
7y ago
I actually find that excessive type inference is much harder to understand. It’s almost like the worst of dynamic and static types. You have no idea what the types are, but you know it won’t compile because of a cryptic error message.
133.
▲
by
weberc2
7y ago
The readable/properly-formatted version: The data was originally forked from rosettacode.org on 2019-10-22. In comparison to Rosetta Code, in RosettaGit all code is stored and hosted in a repository on GitHub instead of a MediaWiki. Th
134.
▲
by
weberc2
7y ago
Here’s one from memory: https://robert.ocallahan.org/2017/07/confession-of-cc-progra...
135.
▲
by
weberc2
7y ago
I don’t think I’m the one missing the point. You seem to be rebutting points I didn’t make, like other languages (or magic bullets) afford a bug count of zero. You also seem to be ignoring my point, which is that C is in a different ballpar
136.
▲
by
weberc2
7y ago
Virtually no one can write secure C code. This is different than “other languages allow some people to write insecure code occasionally”.
137.
▲
by
weberc2
7y ago
Many of the most expert C programmers have reported an inability to write secure C code. But you’re right that my understanding of the language is incorrect; that’s largely my point. There are so many oddities and exceptions and surprises t
138.
▲
by
weberc2
7y ago
It’s roughly JSON = Union[Dict[str, JSON], List[JSON], str, bool, int, NoneType] TypedDict isn’t for arbitrary JSON, but it is really cool.
139.
▲
by
weberc2
7y ago
Ah, I see. Yes, that’s true. You would need to return a bool alongside it or similar, but the best practice is to use an interface for sure.
140.
▲
by
weberc2
7y ago
Linting for WithStack seems like it might be tough since you want to make sure the error was annotated exactly once (I think that’s the intended use, anyway?). The linter would need to know whether or not a fallible function call has annota
141.
▲
by
weberc2
7y ago
I’m not talking about being clever, I’m talking about writing code that meets some baseline standard for security, correctness, and cross platform functionality. The issue with C is that standard, “unsurprising” code often behaves unexpecte
142.
▲
by
weberc2
7y ago
Also the circular imports was the least of the problems I’ve run into with mypy. They still can’t model a JSON type because it is recursive.
143.
▲
by
weberc2
7y ago
As far as I know, name mangling only exists because linkers don’t have a notion of namespaces. If you fix linkers, then there is no need to mangle.
144.
▲
by
weberc2
7y ago
I love writing C when I haven’t written C in several years. It feels nostalgic and simple and elegant in my mind, and then I remember all of the issues I run into and how none of them have good, clear solutions. Things like writing cross pl
145.
▲
by
weberc2
7y ago
> Yes, it does. Whenever you call a function that can possibly fail, you are supposed to add: if err != nil { return err } I don’t think that’s what the parent meant by his question. He was asking if you have to add runtime che
146.
▲
by
weberc2
7y ago
You can abstract over a struct as easily as a pointer, and structs work fine for satisfying interfaces. Specifically, structs make it a little harder for someone to inadvertently mutate things (passed by copy) and because they can’t be nil
147.
▲
by
weberc2
7y ago
I don’t know man. I have scarcely seen bugs like these and most of them seem pretty conspicuous to me (maybe I’ve just been writing Go long enough), but I see loooads of uncaught Python (and Java) exceptions internally and from high-profile
148.
▲
by
weberc2
7y ago
It doesn’t require it. Instead it could just generate the same error handling boilerplate. But I think it would be a mistake versus general purpose (generic) sum types a la Rust.
149.
▲
by
weberc2
7y ago
I don’t buy the “huge pain” argument. I write lots of Python and Go, and the error boilerplate is a non-issue. I also appreciate that it’s explicit instead of implicit.
150.
▲
by
weberc2
7y ago
It appears to be specific to Java. Other languages don’t seem to exhibit high memory usage with the same frequency or severity as Java, and that’s not because developers of other languages spend more time optimizing. If indeed this observed
More ›