Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
DougBTX
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
57 ms
·
391.
▲
by
DougBTX
7y ago
> Typically governments are not expected to build things efficiently and with quality I suspect a large source of that sentiment is just marketing, companies need to go out and sell their accomplishments, whereas a civil servant can stop
392.
▲
by
DougBTX
7y ago
They always keep 31, but skip past it: var fdate = (d.getDate() - 1.0) + fhours / 24.0; document.getElementById('date').setAttribute("transform", "rotate(" + fdate / 31.0 * -360.0 +
393.
▲
by
DougBTX
7y ago
> to make every resulting program worse. That's the crux of the issue though, isn't it. I'd like to think that the compiler developers are not programming at random, and that the optimisations do improve the compilation of
394.
▲
by
DougBTX
7y ago
It depends on what constraints apply to the data. Any bit pattern could be used for an int, but to guarantee a UTF-8 string it would need to be validated.
395.
▲
by
DougBTX
7y ago
> I could be wrong or could just have not seen the right code bases, but there is very little C style byte level ‘data structure’ layout design and then the allocation of those sorts of data using multiple allocation strategies. My exper
396.
▲
by
DougBTX
7y ago
Some of these JPEG features are great for optimising JPEG resizing, which can be significantly faster than fully decoding the image then resizing. https://github.com/mattes/epeg
397.
▲
by
DougBTX
7y ago
I'm a native English speaker, I don't think I would ever say "two times bigger", sounds like bad grammar. I would read "2x the size" as "twice the size" or "two times the size", but not &quo
398.
▲
by
DougBTX
7y ago
It isn't a shortcut, but the UK GDS has some comprehensive material on this: https://www.gov.uk/service-manual/helping-people-to-use-your...
399.
▲
by
DougBTX
7y ago
They did get one benefit from this choice: > the version number alone should be enough to unambiguously differentiate between APIv1 and APIv2. ...which is how version numbers normally work. They've made a big breaking change in a 1.
400.
▲
by
DougBTX
7y ago
> However, the fact that he got "bored" with this solution That's a horrible mischaracterisation. There's a clear ecosystem-wide shift to async/await instead of nested callbacks, putting a project that depends he
401.
▲
by
DougBTX
7y ago
There would probably be a much longer list of issues if ESR had converted to Rust instead, but the syntax for error returns is quite interesting. Rust and Go both opt not to have exceptions, instead they use error return values. The origina
402.
▲
by
DougBTX
7y ago
You seem to be demonstrating how miscommunication is very easy in the example shown! In the example, the idea is that there is one new drug that was shown to be unsafe, but that there is a risk that the results will be misinterpreted to sug
403.
▲
by
DougBTX
7y ago
Similar to pigeonhole sort too: https://en.wikipedia.org/wiki/Pigeonhole_sort
404.
▲
by
DougBTX
7y ago
FTA: > The reason this works is because the backing stores of array buffers are allocated using PartitionAlloc (I’m not entirely sure if this is still the case, but this was the case approximately 3-4 years ago, and I haven’t seen anythi
405.
▲
by
DougBTX
7y ago
Agreed, if the attacker can modify string constants is, printf("Hello, World!\n"); really any safer than this? printf("%s\n", "Hello, World!");
406.
▲
by
DougBTX
7y ago
There's a nice Kevlin Henney talk where he lays out this diagram: | non-shared mutable state | shared mutable state | ----------------------------+------
407.
▲
by
DougBTX
7y ago
I recon it is similar to the desire for header-only C libs, package management isn’t great, so single files are easier to deal with. I wonder if anyone has made a Python package manager based on the idea of bundling up all the files in a Py
408.
▲
by
DougBTX
7y ago
Type systems and static checks in general are great. What do you think of the example type in the post above? It seems like the type system might not be expressive enough to handle existing APIs, that’s something which was hard for TypeScri
409.
▲
by
DougBTX
7y ago
Thanks, that seems like a much better term. With Rust-style interior mutability, any code accessing the value will see that it was mutated, but here the caller still sees a purely functional call, since the mutation is hidden.
410.
▲
by
DougBTX
7y ago
This is (at least partially) why other people's code often looks like a mess, or rephrased, it is illegible. Until you understand the organising principles, it will appear unorganised.
411.
▲
by
DougBTX
7y ago
> Sea-thru is a physics-based algorithm using the Akkaynak-Treibitz underwater image formation model (CVPR 2018). It does not use neural networks and was not trained on any dataset. It works without a color chart, or any information abou
412.
▲
by
DougBTX
7y ago
I like to think about what a test of `Model.where(:x => "y").where(:y => "z").limit(3)` is supposed to be testing. If the test is that the correct query gets generated, then a simple check to ensure that the `where
413.
▲
by
DougBTX
7y ago
In a way this supports the argument for the "Do not communicate by sharing memory; instead, share memory by communicating" mantra, as in a language with no compile-time checks for incorrect use of shared memory, it is very easy to
414.
▲
by
DougBTX
7y ago
Yes, something else. Linus is pointing out that sched_yield doesn’t allow specifying where to yield control to, so it is a bad way to transfer control to a particular task.
415.
▲
by
DougBTX
7y ago
Agreed, Rust can certainly handle lazy evaluation. All the iterator types for example are lazy, hence the .collect() method which eagerly evaluates a lazy collection. Hiding the fact that a lazy value needs to be mutated to initialise it is
416.
▲
by
DougBTX
7y ago
The page isn’t loading at all for me
417.
▲
by
DougBTX
7y ago
> I really don't think this is the meaning of 'type-safety' in common parlance. The bulk of the article is a call for more accurate use of terminology, so in a sense you’re noting the same thing: people using “type safe” w
418.
▲
by
DougBTX
7y ago
Good starting point: https://en.wikipedia.org/wiki/Homomorphic_encryption
419.
▲
by
DougBTX
7y ago
I’d say that “standard procedure” would be to do it the same way as it would be done in C: define a struct, allocate one somewhere, then pass a pointer to it as the data pointer. Using the anonymous struct which represents the closure itsel
420.
▲
by
DougBTX
7y ago
That process assumes nothing gets merged during the integration test run. The script could check to see if the target branch has changed in the mean time, and fail the merge if it has, then I think it would be the same.
More ›