News for hackers. Stuff that matters.

MHordecki

Re:Live map of public transport in Belgium on Monday September 07, 2026 @10:15AM (#49598729)
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.
Re:What Is a Database Transaction? on Sunday February 22, 2026 @08:44AM (#47110947)
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.

Re:UPS sells trucking unit on Tuesday January 26, 2021 @08:46AM (#25915690)
> (...) separate from the package deliveries for which UPS is known, is primarily a business-to-business enterprise hauling large industrial cargo in big trucks.
Re:Open Source Smartwatch on Saturday January 02, 2021 @08:58AM (#25612855)
> 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...

Re:Four-day week means 'I don't waste holidays on chores' on Wednesday December 30, 2020 @01:01PM (#25584095)
> 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?

Re:A case study on strict null checks on Thursday December 17, 2020 @04:00PM (#25460353)
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#...

Re:Java Verbal Expressions on Wednesday November 25, 2020 @01:13PM (#25212291)
Java got them in the most recent version 15: https://openjdk.java.net/jeps/378
Re:Rust from a Gopher – Lessons 7, 8 and 9 on Wednesday November 18, 2020 @06:23AM (#25135551)
Wouldn't "Alchemists" fit even better?
Re:Honda quits F1, invests in carbon-free tech instead on Sunday October 04, 2020 @08:01PM (#24683259)
> 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...
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.
Re:The battle to invent the automatic rice cooker on Saturday August 01, 2020 @12:10PM (#24021532)
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.

> 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

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.

Re:The Coming Chip Wars on Thursday June 18, 2020 @12:11PM (#23564490)
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.
Re:Go generics draft design: building a hashtable on Wednesday June 17, 2020 @04:44PM (#23556504)
> 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`.

Re:The Next Step for Generics on Tuesday June 16, 2020 @05:58PM (#23544764)
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

Re:The PEPs of Python 3.9 on Thursday May 28, 2020 @01:14PM (#23339816)
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/

Re:What Color Is Your Function? (2015) on Tuesday May 19, 2020 @07:37AM (#23233717)
> 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

Re:TOML for Modern C++ on Friday February 28, 2020 @01:15AM (#22440880)
An exception that proves the rule.
Re:Await in Rust on Monday August 12, 2019 @08:44PM (#20681703)
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.
Re:Tesla Model 3 becomes best-selling car in Switzerland on Wednesday April 10, 2019 @11:11AM (#19625462)
> 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.

Re:New Amazon S3 Storage Class – Glacier Deep Archive on Thursday March 28, 2019 @01:03AM (#19509412)
Bandwidth is between 9x and 5x more expensive compared to B2, though.
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.
How do you run umatrix with Safari? I’ve thought it’s not available.
Re:Chinese censors go low-tech to clamp down on Twitter on Saturday January 05, 2019 @06:04PM (#18834909)
Looks like this website blocks access from Europe, presumably due to GDPR.
Re:Storing unboxed trait objects in Rust on Saturday December 15, 2018 @07:10PM (#18691032)
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.
#3 is a thread-local allocation buffer, which is what HotSpot is using. https://shipilev.net/jvm-anatomy-park/4-tlab-allocation/
Re:How Rust Gets Polymorphism Right [video] on Monday November 13, 2017 @03:09AM (#15685020)
There are other imperative languages in the ML family too, right? OCaml has an imperative mode.

I don't think Rust is that much different from other functional languages. The main critical difference is the manual memory management feature - the way it's acknowledged and used throughout the language and the ecosystem means that the functional patterns commonly used in garbage collected languages don't look nearly as natural in Rust.

Older »