Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
first_amendment
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
first_amendment
9y ago
I trust the code as long as it's behaving correctly, when it encounters a bug I no longer trust it and I shut it down before it can do further harm. A modular HTTP server should do the same. The OS/process analogy doesn't hol
32.
▲
by
first_amendment
9y ago
Your proposal doesn't scale and doesn't apply in general. Neither Rust nor Python enforce high-level data structure integrity (e.g. transactionally pulling data off one queue and stuffing in another). A team of 100 programmers wil
33.
▲
by
first_amendment
9y ago
I never said it was an all or nothing. My point is that trying to handle unexpected errors due to programming error is not safe and Python allows that. It doesn't matter if throwing ValueError exceptions on sqrt(-1) is well-defined,
34.
▲
by
first_amendment
9y ago
Rust, Python and other so-called safe languages are unsafe in the same fundamental ways C/C++ are unsafe. Safety is a larger class than "memory safety" which is what you are referring to. As long as the language permits runni
35.
▲
by
first_amendment
9y ago
This is not scalable. A production server might import code from dozens, if not hundreds of modules, all of which have varying degrees of code quality and are written by different authors from different organizations. It's not practica
36.
▲
by
first_amendment
9y ago
I said unintentionally . Intentionally running code that may throw an exception and catching it predictably (in the normal EAFP fashion, which I am well aware of) doesn't apply to my argument. I'm arguing that an unintentional or
37.
▲
by
first_amendment
9y ago
GCC/Clang/VC++ represent 99% of the compiler market. In the exceedingly rare chance your vendor doesn't implement those extensions, you're probably a big enough customer of theirs that you can request it.
38.
▲
by
first_amendment
9y ago
You can always restart the process after an abort(). Continuing to run a server with persistent in-process state after an unexpected exception is dangerous and you risk corrupting data.
39.
▲
by
first_amendment
9y ago
> There isn't a way in C/C++ to request an exception or fault on integer overflow This is incorrect. See compiler options: -ftrapv, -fsanitize=undefined. See compiler builtins: __builtin_add_overflow and friends.
40.
▲
by
first_amendment
9y ago
As I said in another thread, trusting a buggy program to debug itself is futile. Effectively handling unintentional ValueError (or IndexError, TypeError) is not practically possible. For one, there's a good chance the program's pe
41.
▲
by
first_amendment
9y ago
Thanks for the clarifications. Indeed this is what I meant. Undefined behavior in particular isn't unavoidable, though the existence of meaningless statements often is. Python's philosophy of giving well-defined behavior to meanin
42.
▲
by
first_amendment
9y ago
(-1) ** 0.5 Why define something that has no meaning? Just a waste of cycles, CPU and brain.
43.
▲
by
first_amendment
9y ago
There will always be syntactically valid yet semantically invalid statements in any grammar. Undefined behavior isn't bad, it's a unavoidable consequence of all languages, programming or otherwise. Grammatical constructions that h
44.
▲
by
first_amendment
9y ago
I've used cython, swig, and boost.python. I prefer pybind11 to all of them. It requires the least extra tooling and allows you to seamlessly transition between C++ and Python using the idioms native to each language.
45.
▲
by
first_amendment
9y ago
So is sqrt(-1) but that doesn't mean sqrt() shouldn't exist. Just don't call add() with arguments that will overflow.
46.
▲
by
first_amendment
9y ago
The "free and open" discussion is happening on Reddit and on various crypto forums like bitcointalk.org. There's quite a lot of it actually