Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dureuill
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
dureuill
4y ago
Ah interesting approach, thx for the answer. 1. Doesn't that risk introducing accidental breaking changes by adding a new error to the set in the implementation, since the set of errors is inferred from the implementation? Having a com
92.
▲
by
dureuill
4y ago
i'm curious, how do you specify the error type in the zig version?
93.
▲
Safety Profiles: Type-and-resource Safe programming in ISO Standard C++ [pdf]
(open-std.org)
4 points
by
dureuill
4y ago
|
0 comments
94.
▲
by
dureuill
4y ago
"variable" seems untypical for rust. We have "bindings", which are not 100% the same as "variables" (hence maybe GP's feeling of something odd). Value is OK.
95.
▲
by
dureuill
4y ago
Hello! > A quick question, are there any limits around number of separate indexes we can have with meilisearch? Yes! In v1.0, about 180 indexes under Linux in the same instance[1]. The good news is that I'm personally working on lif
96.
▲
by
dureuill
4y ago
I don't follow. What should one use to have safe and efficient dynamically growable arrays in modern C++ if `std::vector` is not considered as modern?
97.
▲
by
dureuill
4y ago
You could maybe use something equivalent to the "index hot swap"[1] feature we have at the Meilisearch level at startup, so that you make the reindexing in a another index at startup, and then atomatically swap this fresh index wi
98.
▲
by
dureuill
4y ago
Hello from a Meilisearch team member, wow your project looks very interesting. How do you handle things like the filesystem changing while your indexer is offline? Do you reindex from scratch at startup? Regarding typeahead, is this what we
99.
▲
by
dureuill
4y ago
I guess a raw pointer is good enough an approximation in that case, it is just annoying that suddenly you can no longer use an optional because your type is a reference
100.
▲
by
dureuill
4y ago
Other languages allow to return `Option<&T>`. That's what I'm using these days. I suppose a raw ptr is what I would use on C++ to model that case though, yes.
101.
▲
by
dureuill
4y ago
I had more bugs pop up from people calling front() on an empty vector than from direct out of range bounds. I guess people are more cautious when they are manipulating indices than when calling a method that takes 0 arguments? Debug asserts
102.
▲
by
dureuill
4y ago
i suspect most of that time is link time. Possibly the linker in use is not very parallel, and so linking one big executable with cargo build takes longer than many smaller test executable whose linking can actually be made parallel?
103.
▲
by
dureuill
4y ago
Yes, security researchers got quite a lot of work exploiting the antiquated tools of C coders [1]: https://www.opencve.io/cve?cwe=CWE-134
104.
▲
by
dureuill
4y ago
> For many languages, print is special and the implementation is provided as part of the language implementation. what's the point of not having print provided as part of the language implementation, though?
105.
▲
by
dureuill
4y ago
^ this. there's a lot i like from Austral, but I think I disagree on some fundamental level with the "simplicity" goal. I simply don't think it is necessarily conductive to less errors, and expressivity of a language mat
106.
▲
by
dureuill
4y ago
> Exceptions actually do that, except hidden and unsignaled. Which IMO is good in exactly one situation: when raising the exception means that the program contains a bug. Using panics (ah sorry... exceptions) in this case is justified as
107.
▲
by
dureuill
4y ago
> You wouldn't say C "has exceptions" would you? Maybe that's just me, but I wish more people would say that C "has exceptions", if only because longjmp/setjmp[0] interacts with exception systems of oth
108.
▲
by
dureuill
4y ago
C++ jobs are not going anywhere, quite the contrary. A lot of systems won't be rewritten. Besides, at least at the moment "C++ expert" is a perfect background for becoming a Rust expert should the want arise. Rust *is* much m
109.
▲
by
dureuill
4y ago
how do you observe data you don't own if you never use a raw pointer or reference? if you use shared ptr for this: 1. shared ptrs aren't made for this use case, they're for shared ownership 2. why using C++ at all if it means
110.
▲
by
dureuill
4y ago
The reality is that leveraging closed networks to gain effective monopolies (with all their known harmful effects) is a winning strategy with little counter strategies. Users cannot switch to another OS because if they do they won't be
111.
▲
by
dureuill
4y ago
This is the only correct answer. Although give it 10 years and that issue should be resolved.
112.
▲
by
dureuill
4y ago
this really speaks to the urgent need of making interoperability legally mandatory for the bigger actors so one isn't socially forced to use one or two applications that are provided by a private actor
113.
▲
by
dureuill
4y ago
This simplicity translates to afternoons of work lost to CMake. cargo just works, and isn't really complex in design. just less anticated.
114.
▲
by
dureuill
4y ago
in case you don't know and it would be useful to you, there's tooling out there to generate license files from the Cargo.toml. cargo lichking is an example, and I think cargo deny has similar functionality?
115.
▲
by
dureuill
4y ago
This runs contrary to my experience. 1. Coming from C++, my productivity is x2-x3 in Rust, making Rust a middle point between C++ and Python (about x8 productivity). What's more, if we factor maintenance time in, the lower costs of mai
116.
▲
by
dureuill
4y ago
> Things like "kernel error reporting" doesn't exist as discrete element. I'm not familiar with kernel development in general or Linux in particular. I would have expected there to be an error reporting subsystem, so
117.
▲
by
dureuill
4y ago
Glad to be of service. Note that the idiomatic error handling in rust is still Result based rather than panic/catch_unwind based. Nevertheless a long living application like, e.g., a webserver will catch panics coming from its subtasks
118.
▲
by
dureuill
4y ago
But panics in rust are pretty much exceptions though? The differences are they are actually meant to be used for exceptional situations ("assert violated => there's a bug in this program" or "out of memory, catastroph
119.
▲
by
dureuill
4y ago
Hmmm, the linked email is not providing a lot of context, so surely I'm missing something, but there's something I definitely don't understand: is there not a third option between stopping the whole kernel on an error or allo
120.
▲
by
dureuill
4y ago
I don't know about Java, but in Python, 99% of the modules I create respect the 1:1 mapping between modules and filesystem. Same in Rust, the overwhelming majority of modules I create is in the standard filesystem <-> modules map
More ›