Better HN
topnewbestaskshowjobs
Log inSign up

MHordecki

359 karma · joined May 1, 2009 (17y ago) · 87 submissions

Submissions

comment 2mo ago · link · parent

This is a simulated map based on published transit schedules. As I’m typing this I sit on a bus that’s nowhere to be seen on the map.

comment 9mo ago · link · parent

I’ve found this article lacking. Like some other articles in this space, it introduces isolation levels through the lens of the phenomena described in the SQL standard, but I find that there’s a different, more intuitive approach.

I think it’s more tractable to define this problem space starting from the concept of (strict) serializability, which is really a generalization of the concept of thread safety. Every software engineer has an intuitive understanding of it. Lack of serializability can lead to execution-dependent behavior, which usually results in hard-to-diagnose bugs. Thus, all systems should strive towards serializability, and the database can be a tool in achieving it.

Various non-serializable levels of database transaction isolation are relaxations of the serializability guarantee, where the database no longer enforces the guarantee and it’s up to the database user to ensure it through other means.

The isolation phenomena are a useful tool for visualizing various corner cases of non-serializability, but they are not inherently tied to it. It's possible to achieve serializability while observing all of the SQL phenomena. For example, a Kubernetes cluster with carefully-written controllers can be serializable.

3.

Patagonia's Restructuring Has Led to Employee Fallout(businessinsider.com ↗)

4 points · by MHordecki · 1y ago · 2 comments

comment 3y ago · link · parent

Here: http://spritesmods.com/?art=hddhack&page=1

comment 5y ago · link · parent

> (...) separate from the package deliveries for which UPS is known, is primarily a business-to-business enterprise hauling large industrial cargo in big trucks.

comment 5y ago · link · parent

> Is it just me or is the screen not vertically centered on this device?

It's a 3D render. The actual display seems to be more or less centered[0].

> Also the wake up button is on the left instead of the right

One could presumably flip the device and the rotate the screen rendering by 180 degrees. This is how Apple Watch handles right wrist use.

[0]: https://pine64.com/wp-content/uploads/2020/09/PineTive-DevKi...

comment 5y ago · link · parent

> There has been no drop in productivity.

As in, your output is the same as with a 5 day work week? So essentially a 20% pay cut per unit of work performed?

comment 5y ago · link · parent

This specific problem was already dealt with during the introduction of arrow functions[1]. It makes sense to keep the same parsing semantics.

[1]: https://www.ecma-international.org/ecma-262/11.0/index.html#...

comment 6y ago · link · parent

Java got them in the most recent version 15: https://openjdk.java.net/jeps/378

comment 6y ago · link · parent

Wouldn't "Alchemists" fit even better?

comment 6y ago · link · parent

> they have yearly CPU instruction limits

This sounded too ridiculous to me, so I started digging. Lo and behold, [1]. Appendix 8, sections 2 and 3.

The entire thing is a fun read, with pearls such as:

    in the case of an Intel CPU with either the Sandybridge or Ivybridge
    chipset where the competitor chooses not to exploit the AVX feature; the
    competitor must explicitly declare and be able to demonstrate that they are
    not using the AVX feature in the CFD solve process. If the non‐usage of the
    AVX feature is proven to the auditor, the Intel Sandybridge and Ivybridge
    chipset cores can be rated as 4 FLOP/cycle/core rather than as 8
    FLOP/cycle/core.
[1]: https://www.fia.com/sites/default/files/2019_sporting_regula...

comment 6y ago · link · parent

Each company C_n would own 51% of the company C_{n-1} (with C_1 being the actual company). At every point each company owns a sizable chunk of equity.

comment 6y ago · link · parent

Why would the rice cooker need to be programmed for it, though? For any given quantity of rice, the two variables during cooking is the amount of water and the power of the heating element[1].

It is known that brown rice requires a different ratio of water, but this is something that can be replicated with any method. Does the special brown rice setting change the heat output of the rice cooker?

[1]: Fancy rice cookers use non-constant power, or so I've heard. Not sure how much it influences the taste, though.

comment 6y ago · link · parent

> With the exception of Singapore (which put an Australian in charge of its response)

Both Lawrence Wong and Gan Kim Yong are Singaporeans.

https://en.wikipedia.org/wiki/COVID-19_pandemic_in_Singapore

comment 6y ago · link · parent

What is the grammar rule?

I've always assumed that you use "an" whenever a noun starts with a vowel sound, which "Nvidia" does ("n" being pronounced as "en"), thus making "an Nvidia" the grammatically correct one.

comment 6y ago · link · parent

The moment they start doing this, other countries will restart their mines and the Chinese leverage (and profits) will evaporate. Rare earth minerals aren't that rare.

comment 6y ago · link · parent

> You can ignore the error case on a result / the None case on an option as easily as you ignore the `err` today.

The point of a result type is that you _cannot_ ignore the None case. Any method that would provide you with the value will also check that the error is not present.

In comparison, you can happily ignore `err` in Golang and continue with an invalid `value`.

comment 6y ago · link · parent

The vocabulary from that language spec is not even followed consistently in the language's own standard library.

The `strings.Compare`[1] function is used to establish ordering, in the spec sense. You'd think they would name it "Order".

Similarly, the popular go-cmp[2] library provides `Equal` for equality, instead of `Compare`.

[1]: https://godoc.org/strings#Compare [2]: https://github.com/google/go-cmp

comment 6y ago · link · parent

The linked LWN article[1] mentions context-sensitive keywords, ie. a way to treat certain words as language keywords only in specific contexts. For example, a new match statement that wouldn't require reserving the `match` word as a language keyword, which would require a breaking change and break all existing code that uses `match` as a variable name.

Such a feature requires support from the parser.

[1]: https://lwn.net/Articles/816922/

comment 6y ago · link · parent

> Would the Go runtime lock you to that specific thread and block it or sleep that goroutine and move it to another thread when its no longer sleeping?

By default, the Go runtime does not guarantee any affinity between Go-level threads (goroutines) and OS threads. There's a way to forcibly pin a goroutine to a specific thread[1], but it limits your concurrency.

The Go approach does indeed cause problems wrt. OS-thread-affine state. It's a tradeoff. For RPC-oriented network services, the Go niche, OS thread state is very rare.

[1]: https://golang.org/pkg/runtime/#LockOSThread

comment 6y ago · link · parent

An exception that proves the rule.

comment 7y ago · link · parent

This code block doesn't actually work the way the Kotlin one does. Async functions are mere pull-based state machines, so both `one` and `two` will compute serially, without concurrency.

What you need is:

    use futures::join;

    let result = executor::block_on({
        let one = async { do_something_useful_one() };
        let two = async { do_something_useful_two() };
        let (one, two) = join!(one, two);
        one + two
    }); 
I feel like this might be a common stumbling block and hope there will be a Clippy check for this or something.

comment 7y ago · link · parent

> Is there a Swiss version of what they consider cheap fast-food, and is that place still $20 for a basic meal?

Döner joints. They are about ~15 CHF for a meal including a drink.

comment 7y ago · link · parent

Bandwidth is between 9x and 5x more expensive compared to B2, though.

comment 7y ago · link · parent

Note that 150k is just the salary. I don’t know about Japanese compensation structure, but you can easily get >200k including bonus + equity at FAANG in a junior position.

comment 7y ago · link · parent

How do you run umatrix with Safari? I’ve thought it’s not available.

comment 7y ago · link · parent

Looks like this website blocks access from Europe, presumably due to GDPR.

comment 7y ago · link · parent

Note that it's quite possible for a trait to have infinitely many implementations in any given program. For example, Debug is implemented by u64, Box<u64>, Box<Box<u64>>, ..., and so on. While these happen to have the same size, it's not hard to imagine a situation where this is not the case.

comment 8y ago · link · parent

#3 is a thread-local allocation buffer, which is what HotSpot is using. https://shipilev.net/jvm-anatomy-park/4-tlab-allocation/
123