Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MaulingMonkey
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
MaulingMonkey
1y ago
As a Rust fan, I 100% agree. I already know plenty of nice, "safe", "efficient" languages. I know only one language with a borrow checker, and that feature has honestly driven me to use it in excess . Most of my small
62.
▲
by
MaulingMonkey
1y ago
> How long are you realistically "waiting for the compiler and linker"? 3 seconds? I've worked on projects where incremental linking after touching the wrong .cpp file will take several minutes... and this is after I'
63.
▲
by
MaulingMonkey
1y ago
Spelling mistake in the "about us" section of your continuously deployed website? Production or pre-production matters little if it's a developer catching the bug. Maybe if it's caught by a customer, you have some over
64.
▲
by
MaulingMonkey
1y ago
> Is this so inefficient? It can be. If you have large buffers (tuned for throughput) that end up fulfilling lots of small requests for whatever reason, for example. And there's always the occasional article when someone rediscove
65.
▲
by
MaulingMonkey
2y ago
My starting point would be Chromium's documentation, as - presumably - chrome is one of the most widely used and battle tested, user-facing, third party sandboxes running on end user machines. Windows: https://chromium.googl
66.
▲
by
MaulingMonkey
2y ago
I certainly spent most (95%+?) of my "fighting the borrow checker" time writing code I would never try to write in C++. A simple example is strings: I'd spend a lot of time trying to get a &str to work instead of a St
67.
▲
by
MaulingMonkey
2y ago
> toolchains Are what cargo, rustc, etc. are expected to run on . You probably meant target. > i686-unknown-none Is admittedly a missing target. `x86_64-unknown-none` specifies stuff like `extern "C"`'s ABI (per htt
68.
▲
by
MaulingMonkey
2y ago
> but aside from the Linux kernel I've never encountered developers who put the blame on the compiler. I encounter them frequently . 99.99% of the time it's undefined behavior and they're "wrong". Frequently nov
69.
▲
by
MaulingMonkey
2y ago
error: could not convert 'true' from 'bool' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} I don't think anyone's claiming C nor C++'s dumpster fires have sig
70.
▲
by
MaulingMonkey
2y ago
> I want to have fine-grained and full control over memory management. Rust's global allocator is easy enough to replace on stable: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html Per standard c
71.
▲
by
MaulingMonkey
2y ago
+1 Just this month I saw yet another sufferer of the consequences of disparate build systems. This resulted in a mixture of GCC and LLVM, which disagreed on the basic ABI for C enums for unknown/none-platform ARM. (ARM's ABI giv
72.
▲
by
MaulingMonkey
2y ago
> Do you mean "any change to whitespace in HTML or XML results in a semantically inequivalent document"? In the strictest sense? Yes. Of course, we can build tools that make... call it "unsound assumptions"... and I&
73.
▲
by
MaulingMonkey
2y ago
Your process can be started in a paused state by a debugger, have new libraries and threads injected into it, and then resumed before a single instruction of your own binary has been executed... and debuggers are far from the only thing tha
74.
▲
by
MaulingMonkey
2y ago
> TLDR: If your job is to write code all day [...], buy an 8K TV instead of a multi-monitor setup. Counterpoints: • All my keyboard muscle memory is setup for multi-monitor setups. Theoretically fixable with the right tiling window mana
75.
▲
by
MaulingMonkey
2y ago
Some people are still dealing with DSPs. https://thephd.dev/conformance-should-mean-something-fputc-a... Me? I just dabble with documenting an unimplemented "50% more bits per byte than the competition!" 12-bit f
76.
▲
by
MaulingMonkey
2y ago
> would technically be on the wrong side of the GDPR, but I think it's very unlikely that anyone would complain about it, legally speaking. The American in me says that sounds like "someone will definitely complain about it, ev
77.
▲
by
MaulingMonkey
2y ago
>> According to the RCA, the essence of what happened was an index out of bounds While Rust's behavior of panicing is saner than C++'s behavior of undefined behavior for a typical index out of bounds bug (`slice[index]`), I
78.
▲
by
MaulingMonkey
2y ago
> There are subjective things we'll never able to compare It's certainly difficult to perfectly compare qualia in absolute terms across minds. It's less difficult to compare qualia within the same mind. And if one pe
79.
▲
by
MaulingMonkey
2y ago
They usually do not mix decimal seperators in the same sentence however, and as leading zeros are generally avoided on integers, "0.046" is pretty clearly using a period as the decimal seperator.
80.
▲
by
MaulingMonkey
2y ago
`-fsanitize=undefined` enables some runtime warnings/checks, `-Wundefined-behaviour` would presumably enable some kind of compile time warnings/checks.
81.
▲
by
MaulingMonkey
2y ago
This approach can lead to issues like `apt-get upgrade` launching dwarf fortress: https://askubuntu.com/questions/938606/dwarf-fortress-starti...
82.
▲
by
MaulingMonkey
2y ago
> I don't see the "footgun". a / b "Never" means "integer division" in regular math, so programming languages overloading it to sometimes mean integer division is a common suprise to newbi
83.
▲
by
MaulingMonkey
3y ago
> Didn't 16-bit Windows and classic Mac OS do something similar? I assume this is what `{Local,Global}{Lock,Unlock}` were for when combined with `{Local,Global}Alloc({L,G}MEM_MOVEABLE)` Similar idioms occasionally persist in modern
84.
▲
by
MaulingMonkey
3y ago
> entry points I was curious where this was from, so I looked at https://gitlab.com/esr/autodafe/-/blob/master/de-autoconfisc... As someone who targets clang/gcc/msvc/icc, I don&#x
85.
▲
by
MaulingMonkey
3y ago
> "commit your halfway feature work/.../come back to the feature and amend/squash/soft reset" ...this is just by-hand stashing with alternative commands and extra "WIP" commit messages. Which, uh,
86.
▲
by
MaulingMonkey
3y ago
> Why couldn't you, like, create another branch off of main, switch to that, and fix the bug there, then resume working on your feature branch? I mean, that's option 2 of what you're quoting, and is generally my preferre
87.
▲
by
MaulingMonkey
3y ago
People can and have added extra annotations to C and C++ code for such things. Static analyzers can catch some use-after-free and iterator invalidation bugs at compile time. Problem is: • They're opt-in instead of opt-out (meaning none
88.
▲
by
MaulingMonkey
3y ago
Vtables are pretty solved as well. I do a lot of Windows COM interop. Using the `windows` crate, vtables for COM interfaces are relegated to an implementation detail - instead you simply implement a (typically safe!) trait: https:/
89.
▲
by
MaulingMonkey
3y ago
> I am writing a single abstract declaration (I suppose I should have used `extern "C" {...}` to be clear) that one can only use safely. Your abstract declaration still wouldn't be safe. Remaining unsafety includes: • pos
90.
▲
by
MaulingMonkey
3y ago
To be clear, my playground link is calling libc's qsort. The FFI definition: extern "C" { fn qsort(ptr: *mut c_void, count: size_t, size: size_t, comp: extern "C" fn(*const c_void, *const c_void) -> c_in
More ›