Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jjnoakes
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
631.
▲
by
jjnoakes
8y ago
I would love to see zig compile to C so I can use it on platforms which clang/llvm do not support.
632.
▲
by
jjnoakes
8y ago
> The way it currently works is arguably the way it should work, irrespective of the spec. The spec is how it should work, regardless of developer's opinions. > Why should [a] evaluate differently than [b]? In my opinion (and I&#
633.
▲
by
jjnoakes
8y ago
If you need CSRF tokens for forms, etc, then what does CORS give you above CSRF tokens?
634.
▲
by
jjnoakes
8y ago
Don't buyers pay the sales tax?
635.
▲
by
jjnoakes
8y ago
RAII isn't only about exceptions (although it helps greatly); see Rust for example. RAII is about any scope exit automatically cleaning up resources. Exceptions is a big one, but so is return, break, etc. Having it happen automatically
636.
▲
by
jjnoakes
9y ago
17/10
637.
▲
by
jjnoakes
9y ago
No argument here, I'm just trying to keep the facts straight; I have no opinion on right/wrong/good/bad/easy/hard (at least, not in this forum).
638.
▲
by
jjnoakes
9y ago
> I never said they could. I almost missed this one! Here's some choice quotes for you: From https://news.ycombinator.com/item?id=16917162 > "Undefined behavior anywhere in the program can legally make any p
639.
▲
by
jjnoakes
9y ago
Thanks for coming clean.
640.
▲
by
jjnoakes
9y ago
I would wager quite a bit (I wager my career on things like this daily), but based on the ability for you to communicate effectively and based on facts thus far, I'm not entirely convinced that when you end up being wrong, you'd a
641.
▲
by
jjnoakes
9y ago
> UB licenses a program to do anything Only if it is reachable under the given inputs. We've gone over this, and you were on the right track a few comments up. Why revert now? > Writing a non-trivial C program that contain no UB
642.
▲
by
jjnoakes
9y ago
No wager necessary, feel free to point out my mistake, if I made one. It won't prove that you know what you are talking about in general (since, as we've seen, programs really can't "do anything" if they have UB any
643.
▲
by
jjnoakes
9y ago
> Not for all inputs Which proves my point: a program can't "do anything" just because some part of it may contain UB. Only the UB paths are allowed to "do anything". > There is at least one other input value
644.
▲
by
jjnoakes
9y ago
UB only licenses the program to do anything if it is reachable. Unreachable, unexecuted, cant-be-executed UB simply can't change a program's behavior. I'm not sure why you think it can. Do you think this program can "do
645.
▲
by
jjnoakes
9y ago
That article agrees with me, not you. Even in the time travel examples, the code paths unrelated to the ub can't be touched. In other words, it can travel backward, but not sideways (which is what you originally claimed).
646.
▲
by
jjnoakes
9y ago
> Undefined behavior anywhere in the program can legally make any part of the program do anything at any time. This is only true if the undefined behavior is guaranteed to be reachable. This is not true in general. Putting "if (0) 1
647.
▲
by
jjnoakes
9y ago
Reference values are part of the Java language. It's the reason "==" doesn't do what you'd expect it to, and why "a = ..." inside a method (assuming "a" was a parameter) doesn't affect the c
648.
▲
by
jjnoakes
9y ago
I disagree. If I write a routine which walks an array one element at a time, in order, up to some max index N, and also stops early when it reaches some other condition (like an element equal to zero), then I am allowed to pass in memory wh
649.
▲
by
jjnoakes
9y ago
> Cryptocurrencies are most certainly divisible The parent asked "what happens when a piece of bread is worth less than 1 satoshi?" - as far as I know, one satoshi is not divisible; am I mistaken?
650.
▲
by
jjnoakes
9y ago
> The OP is saying, correctly, that certain data structures are inexpressible in safe Rust The op didn't say "safe rust", that's my point.
651.
▲
by
jjnoakes
9y ago
> whole data structures and algorithms are disallowed Nothing is disallowed in rust. You may need a specialized crate or a small 'unsafe' block to work beyond the compiler's ability to prove your code meets rust's gua
652.
▲
by
jjnoakes
9y ago
> If you use conda-build it will do rpath fixups for you. Interesting. I'm not a big fan of magic like that, but I'll check it out anyway.
653.
▲
by
jjnoakes
9y ago
You still have to pay attention to what version of C++ your dependencies compiled with, unless you are compiling them all. And on Linux you can install newer compilers too. The problems are still there; the root cause is C++ having no ABI,
654.
▲
by
jjnoakes
9y ago
> your friends can take your tarball and unzip it in any directory of their choosing. The whole prefix (environment) is self contained How does this work if you are using ${PREFIX} with -rpath? I thought one had to use '$ORIGIN'
655.
▲
by
jjnoakes
9y ago
You are probably also getting downvotes because, as this comment of yours demonstrates, you don't know enough about Rust to hold an opinion worth discussing.
656.
▲
by
jjnoakes
9y ago
> it is really sad that you get downvoted based on your opinion That's not really what is happening. I'm guessing you are getting downvoted for a few specific things: * "If you want [...] small binaries, rust is just w
657.
▲
by
jjnoakes
9y ago
Because the product being bought isn't software.
658.
▲
by
jjnoakes
9y ago
If you have urgent care near you, that is a good situation for it.
659.
▲
by
jjnoakes
9y ago
One can use the C ABI with C++.
660.
▲
by
jjnoakes
9y ago
Don't forget the human time to debug the code (especially the rare or only-happens-under-load issues, which can be related to resource exhaustion, among other things). Also, some of your examples (like altering or reviewing code) can b
More ›