Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dthul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
30 ms
·
91.
▲
by
dthul
5y ago
Bootstrapping and language safety are orthogonal. C is unsafe and still you can't bootstrap it if you don't already have a compiler which can compile your C compiler. According to that logic even assembly is not low level enough b
92.
▲
by
dthul
5y ago
Storage on the blockchain is too limited and too expensive to put the actual media files there. Afaik that's because the verification nodes need to have a copy of the current state of the VM, which contains everything ever stored on th
93.
▲
by
dthul
5y ago
My guess is that the parent poster meant something more like: it's hard to tell whether A=B will deep copy, shallow copy or move the right hand side and which operator=() will actually be called. First you need to figure out the types
94.
▲
by
dthul
5y ago
Whether you should learn it or not I can't answer, but I want to mention that I personally don't feel anything in Rust is very esoteric. Python's metaclasses or JavaScript's prototype object model feel more unusual to me
95.
▲
by
dthul
5y ago
So much this. After having encountered ADTs for the first time in Haskell and later on in Rust and other languages, any language without sum types (like Rust's enums) feels wholly incomplete. And the destructuring pattern matching is t
96.
▲
by
dthul
5y ago
Interestingly enough, last time I opened Instagram it offered me to completely hide the number of likes on all posts (others' and your own as far as I understood).
97.
▲
by
dthul
5y ago
That's also my favorite way of making coffee. Add to that a manual grinder and you can't get much better.
98.
▲
by
dthul
5y ago
I agree. `crop_to_cat(img)` now has to be concerned with handling a possibly invalid image even though this method doesn't make sense for an invalid image. It muddies the type signature of the method and instead of `Image -> Image`
99.
▲
by
dthul
5y ago
Component level schematics should be freely available for all products. It's not like there are no schematics available for e.g. Macbooks. Third party repair shops use them all the time. It's just that they are not legally availab
100.
▲
by
dthul
6y ago
But Adobe doesn't make it easy to pay for it one month and don't pay for it the next. Their site uses dark patterns which make you choose yearly subscriptions instead of monthly (happened to me even though I thought I had a monthl
101.
▲
by
dthul
6y ago
I haven't heard that name in quite some time! I remember receiving a relatively pissed off email from him in response to an interview request quite a few years ago. I guess the lasting negative impression I got of him from that exchang
102.
▲
by
dthul
6y ago
I was seriously impressed when a few days ago I accidentally pushed my secret Discord bot token to Github and literally one second later I received a Discord message and an email letting me know that I leaked my token and that they deactiva
103.
▲
by
dthul
6y ago
Linking to a page that shows that the Rust version is faster than the C version in almost every case?
104.
▲
by
dthul
6y ago
Note that you don't need a closure in Rust to start a thread. You can just specify a function to be called (because functions implement FnOnce).
105.
▲
by
dthul
6y ago
I just finished binging that show! I really liked it but would have wished that each episode were longer. As it stands there was not enough time to really show off the work, especially in the early episodes that had a lot of glass blowers.
106.
▲
by
dthul
6y ago
The setup.py that I saw doesn't do anything with the response of the HTTP request so if it were indeed a targeted attack it would need to exploit some kind of weakness in the network stack. I guess that makes a targeted attack quite un
107.
▲
by
dthul
6y ago
Oh, nice catch! Strange setup.
108.
▲
by
dthul
6y ago
That surprised me too (the IP lookup I used said "domain: tencent.com") but I don't understand enough about IP to tell whether that's unusual or not. Unrelated tidbit: tencent.com returns an empty reply for me at the mom
109.
▲
by
dthul
6y ago
"Sends a request to a malicious URL". Malicious is relative of course. The code reads: url = "http://101.32.99.28/name?<package_name>" requests.get(url, timeout=30) So it looks like the a
110.
▲
by
dthul
6y ago
I guess it depends on the language and library you are using but I have the feeling that in most cases one would probably need to replace the usage of the old data type with the new one.
111.
▲
by
dthul
6y ago
Yes, I absolutely see the reasoning and I think if one does go the route of encapsulating the more efficient array logic one can have the best of both options.
112.
▲
by
dthul
6y ago
I'm not sure I would prefer the second version in a code review. I find the first version is conceptually nicer because it's easy to see that you will always get the correct count. In the second version you have to enforce that in
113.
▲
by
dthul
6y ago
I haven't heard of it before! Do you know what sets it apart from chrono? It doesn't mention anything in the readme as far as I can tell.
114.
▲
by
dthul
6y ago
If I'm not mistaken "chrono"[1] behaves almost the same. It calls Local[Date|Time|DateTime] Naive[Date|Time|DateTime]. ZonedDateTime is just called DateTime. It doesn't have a separate type for Instants but can convert (
115.
▲
by
dthul
6y ago
Depending on how the defer implementation looks like the same could be achieved with block-level defer by having the defer's "owner" (e.g. some object with RAII semantics) in the outer scope.
116.
▲
by
dthul
6y ago
It's 120$ for 2TB of cloud storage which now happens to have password management. Bitwarden is a password manager with 1GB(?) of storage, so it's not a comparable offering.
117.
▲
by
dthul
6y ago
What's the difference to C++? Building with (the equivalent of) -Os, using LTO and stripping binaries are common approaches for reducing binary size, I don't see how this is absurd.
118.
▲
by
dthul
6y ago
It seems like this blog post is not very well thought out. At least the Rust version was compiled in debug mode, binaries were not stripped, the size-optimizing compiler profile was not used and neither was LTO. This repository contains inf
119.
▲
by
dthul
6y ago
In Python 3, 1/0 is floating point division. 1//0 would be integer division.
120.
▲
by
dthul
6y ago
Yes, I believe it was TrustArc.
More ›