Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dthul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
MiniRust
(ralfj.de)
284 points
by
dthul
4y ago
|
147 comments
32.
▲
by
dthul
4y ago
I tried getting an interview for one of those LinkedIn posts and even though I had a really good starting point (successful internship within the last few months plus an internal referral from someone working in the group I applied for plus
33.
▲
by
dthul
4y ago
To chime in with my personal experience, I did actually lose almost two days on hunting down an unintended copy constructor call. The method expected a "const B&" but was called with a "const A&". It also happene
34.
▲
by
dthul
4y ago
That's a great point! If you can guarantee that the threads don't outlive the Mutex an Arc is not even necessary.
35.
▲
by
dthul
4y ago
It's very cool that mutexes on Linux don't require an allocation anymore! A very common pattern is to use an Arc<Mutex<T>> for sharing ownership across threads and as far as I can tell this will now only require one al
36.
▲
by
dthul
4y ago
Thanks for the explanation, I will definitely check out the docs on algebraic effects!
37.
▲
by
dthul
4y ago
Looks very cool! Can somebody enlighten me what's happening in the Algebraic Effects example? Specifically this part: handle f () | flip () -> (resume true + resume false) / 2.0 Does `handle f ()` call `calculation
38.
▲
by
dthul
4y ago
OT: sqlx tip: you can compile without a DB connection by either using the non-macro version of the queries (at the cost of losing compile time query checking) or you "bake" the query checks using sqlx-cli which produces files that
39.
▲
by
dthul
4y ago
> please read at least your article Please refrain from accusations of someone not having read the article, it's unconstructive and against site guidelines. I don't know how you come up with a different reading of the nau.ch ar
40.
▲
by
dthul
4y ago
So what it boils down to: The old (1st generation) vaccine is still being held in storage but currently not available to the general public (says https://www.bag.admin.ch/bag/de/home/krankheiten/krankheit
41.
▲
by
dthul
4y ago
Because the article talks about the theoretical effectiveness of smallpox vaccines against monkeypox but that no vaccine (smallpox or monkeypox) is currently approved in Switzerland (the smallpox vaccine was approved in the past but is not
42.
▲
by
dthul
4y ago
afaik no smallpox vaccine is currently approved in Switzerland (according to https://www.nau.ch/politik/bundeshaus/affenpocken-swissmedic... )
43.
▲
by
dthul
4y ago
Yes, I think it boils down to whether creating a derived pointer from a restrict pointer and then using both is allowed. I just had a look at the C standard and I think it is allowed if the derived pointer is (what the standard calls) "
44.
▲
by
dthul
4y ago
But it's never modified using y?
45.
▲
by
dthul
4y ago
> and then promptly uses pointer arithmetic to create an alias. It violated the promise. afaik not creating aliased pointers is not a promise you make when marking a pointer as restrict. Only when using that aliased pointer for accesses
46.
▲
by
dthul
4y ago
> The author clearly states that restrict is a promise, and then immediately violates that promise Which part of the program do you believe violates the restrict promise? I think it's not obvious that it is violated. The question is
47.
▲
by
dthul
4y ago
Indeed I don't think C cares about how the pointers you mark as "restrict" were constructed, it just cares about how you actually use the pointers and in the example code they are never used in an "overlapping" way.
48.
▲
by
dthul
5y ago
Such non-constructive comments are not appreciated here.
49.
▲
by
dthul
5y ago
This document describes the smart contract for an NFT: https://eips.ethereum.org/EIPS/eip-721 The base contract does not contain any info about the asset the NFT applies to and the metadata extension only allows you to
50.
▲
by
dthul
5y ago
Just want to mention that Cargo (don't know about others like NPM) handles it a bit differently. You are quite flexible in specifying the versions of your direct dependencies and you can fix major, minor or patch versions or do even mo
51.
▲
by
dthul
5y ago
It looks like Namecheap has 1700 employees in Ukraine and an office in Kharkiv: https://www.namecheap.com/careers/ukraine
52.
▲
by
dthul
5y ago
I was wondering whether the Rust compiler could treat Result enums specially and implement them as panics under the hood. But I guess such optimizations are not really feasible because they might change behavior when unwinding through FFI f
53.
▲
by
dthul
5y ago
Thanks! I didn't realize that it required curly braces and only went off of the red squiggly line my IDE put there instead of reading the helpful compiler output.
54.
▲
by
dthul
5y ago
Really looking forward to const generics becoming more and more useful in the future! A current limitation I hit yesterday is that you can't use a (non-literal) expression as a const generic parameter yet. I wanted to specify 32KiB as
55.
▲
by
dthul
5y ago
Does anybody know what happens when the bid is not equal to but higher than the ask? What is the price that will be used? Or will this not lead to a transaction at all?
56.
▲
by
dthul
5y ago
I went with a hybrid approach in university: I didn't take any notes in class so I could actually focus on the lecture and actively think along. Later, in preparation for the exam, I would go through all slides again and turn them into
57.
▲
by
dthul
5y ago
I wonder if this mechanism could also be used for bounds checking when accessing dynamically sized collections. That would be a boon for C/C++ as well as safe languages. But I guess it can not because while the underlying allocation ma
58.
▲
by
dthul
5y ago
Did that behavior change at some point? I'm on Big Sur and clicking on an unfocused window will focus it and trigger whatever button your mouse landed on. Edit: it seems to depend on the kind of button(?)
59.
▲
by
dthul
5y ago
I guess it would depend on how that NFT was marketed at the time of purchase. If a piece of digital artwork was displayed on the NFT's web page and the buyer believed that they would get ownership of that artwork in return for their mo
60.
▲
by
dthul
5y ago
Good to know! I don't know much about the blockchain space and have only looked more closely at Ethereum so far.
More ›