Better HN
topnewbestaskshowjobs
Log inSign up

devit

4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions

Submissions

comment 3y ago · link · parent

You could wear an FFP2 or FFP3 mask with a valve.

comment 3y ago · link · parent

The whole point of this attack is to be able to make a lot of requests for each IP address.

If you are making one or few requests per IP you don't need this attack, and also aren't likely to have any effect on a Google-sized entity.

comment 3y ago · link · parent

Isn't this trivially mitigated by throttling?

And the throttling seems even simple: give each IP address an initial allowance of A requests, then increase the allowance every T time up to a maximum of B. Perhaps A=B=10, T=150ms.

comment 3y ago · link · parent

If you have a reversible connector, then you might be entangled in a dilemma of which way is the "better" or "optimal" or "canonical" way, while with a non-reversible one there is only one way and thus no dilemma.

And in fact USB-C is not really physically reversible, because the hardware detects which way it's plugged in and permutes the signals, as opposed to mirroring all the wires, so there is indeed a "right" way of inserting an USB-C plug, except it's impossible to tell which it is without a dedicated hardware tester.

comment 3y ago · link · parent

The sort function has no reason to ask for all three comparisons.

Rather, it can ask for two comparisons and act according to the results (e.g. it learns that 1 < 2 and 2 < 3 and returns [1, 2, 3]).

This makes the output unspecified in general, but it will be consistent with the information received and the calls made even if the comparator doesn't form an ordering, which is what one would expect.

comment 3y ago · link · parent

"Unspecified order" seems a poor guarantee.

I think a sort implementation should return elements in an order consistent with a subset of the comparison calls it makes, and that subset should be such that it fully determines the order.

An even better guarantee is that the subset should be the whole set of comparison calls.

comment 3y ago · link · parent

In my experience most of the flagship phones are slippery enough that it's not a rare event to drop them if you don't use a case made out of a higher friction material.

Of course that's an incredibly dumb design, but unfortunately they are made like that.

comment 3y ago · link · parent

"I think this is a consequence of variables being sent to a channel effectively having their address taken, disabling register allocation for them."

Looks like the Go code generator and optimizer is absolutely terrible, since any reasonable optimizer has standard optimizations that prevent this.

Apparently they wrote their own rather than using something established like LLVM, and this is the result.

comment 3y ago · link · parent

Getting non-native games to run on emulators can sometimes give a similar experience.

You can also do things like having a Linux machine with a powerful GPU but no GUI installed.

comment 3y ago · link · parent

They could drop Gecko and switch to Blink/Chromium.

Then Firefox would be guaranteed to be strictly better than Chrome, since the baseline is the same and they can put in all the features that Google doesn't want because they would reduce their ad income, such as great ad-blocking support.

This might result in losing Google's search engine deal, but they can probably make a similar deal with an LLM-based search engine and even if the money might be less they don't need that much if they are only maintaining a fork and not the whole engine.

comment 3y ago · link · parent

It seems that the problem is that the Onewheel is a fundamentally flawed design that should perhaps not even be legal to sell.

Basically the issue is that the only control available is turning the wheel, but an unstable scooter actually needs two controls: one to balance the board and one to control the speed.

Having a single control means that they are tied and thus that, discounting air resistance, if the user continuously leans forward, then the board has to continuously accelerate up to arbitrary speeds since turning the wheel to balance also results in acceleration.

Furthermore, it seems that they don't even have a motor powerful enough to always be able to balance the user along with air resistance, so if the rider continuously leans forward eventually the motor is no longer powerful enough, the board loses balance and the rider probably falls down and dies.

Not sure how they could even think of selling a design like that or how they are surviving the lawsuits.

The simplest fix seems to be using four wheels instead of one, which also removes the need of active balancing and is a normal proper design. If "leaning to accelerate" is desired instead of a more normal handle with a throttle control, then it should be achievable by adding suspension springs and detecting their extension.

Not sure if it's possible to have a proper design with one wheel; a thing that comes to mind is having a sort of "landing gear" that can come down and make the board stable on demand. An alternative could perhaps be an internal reaction flywheel, but not sure if that works and is feasible.

comment 3y ago · link · parent

Buy something comfortable instead, such as an Exped Megamat 15 LXW plus a memory foam topper and maybe a foldable cot.

comment 3y ago · link · parent

Seems very uncomfortable and only useful if someone really can't afford the $100-300 for a normal camping air or self-inflating pad, which seems miles better than this.

And if you are OK with uncomfortable then a simple closed-cell foam mat, while possibly a bit more expensive, seems far more reliable, durable and cleanable than this.

comment 3y ago · link · parent

I think it would be very useful for scouting in woodland/backcountry use including search&rescue.

At 50 km/h, it moves 10-20 times faster than a hiker, and at <1000$ it's more than 100x cheaper than a plane or helicopter.

But requiring line of sight is a strong limitation because it means that you need to fly over the tree canopy and might not see under it, and you need to fly really high if target is on the other side of a mountain or hill and again you might not see well.

And of course cell phone coverage is not guaranteed so you can't use the easiest solution of putting a cell modem on it.

comment 3y ago · link · parent

Is there any system that works for at least 10-20km without line of sight, supporting a video feed usable for guidance, without cell phone network coverage?

Maybe something where there are two drones, and one flies high with line of sight to both the user and the low-flying drone so that it can act as a relay like a satellite would?

Or something that uses radio frequencies that bounce over the atmosphere, and if bandwidth is not enough uses an automated pilot plus the ability to send photos every few seconds so the user can tell it in which general direction it should fly?

Or something that uses Starlink/Iridium/etc. to relay data?

comment 3y ago · link · parent

And note that it's a good thing that crates are async, because async-in-sync using block_on has only some potential small CPU time overhead, while sync-in-async requires having a thread for each concurrent usage and has potentially catastrophic memory overhead since a user and kernel mode stacks and thread data structures could in some cases be 100-1000x bigger than the future; hence, an async-only create is much better than a sync-only crate (although of course a crate that supports both is ideal from the user's point of view).

comment 3y ago · link · parent

You can use `block_on` from the futures-lite crate (or from other crates) to synchronously call async functions.

Not using async or async crates is not recommended since most new or updated high quality crates now use async.

comment 3y ago · link · parent

Most CPUs don't have BCD math instructions, so you need multiple instructions, with probably around a 10-100x slowdown in math.

comment 3y ago · link · parent

It looks like the Godot problem is that Chrome on Apple systems by default uses the native Apple OpenGL driver, which are broken, and can be worked around by passing --use-angle=metal to Chrome to tell it to use the new experimental Metal backend.

So in practice it's probably going to be fixed by the time a new game is released, and otherwise you can tell users to start the browser with the proper command line, or contribute a workaround to Godot yourself.

comment 3y ago · link · parent

There's a simple trick to encode it: if there are less than 32 pieces, invert the bitboard (easily decoded since boards can't have more than 32), while if there are 32 pieces flip the board vertically (easily decoded because white pawns can't be after black pawns with no captures).

comment 3y ago · link · parent

Seems really bad to me.

There's a lot of distracting glitches like the K and Q having small gaps where strokes come together, and even glyphs like the N, M, Y and Z have weird little gaps at the joints, the F and B have a bizarre overhang at the upper horizontal stroke, the 1 and 6 have a weird cut in their strokes.

There are lots of weird confusing choices like the parenthesis being a round rect instead of a bow shape, the @ having a "complex a" inside, the 3 and 5 using a "cute" diagonal layout instead of the normal "rounded-and-rect layout".

Seems horrible for something that should be as simple as possible. The default system UI fonts like DejaVu Sans, Segoe UI, Roboto, etc. are far better.

comment 3y ago · link · parent

Well, unless you absentmindedly type in your mail address, name or any other real credentials.

comment 3y ago · link · parent

Presumably generated lots of variations of that sentence. It's 28 bits, so you only need to have around 14 places where 4 variations are possible.

For instance, it could start with "Was", "I was", "verifying" could be "checking" or "computing" or "testing", etc.

A bit tight, but it seems feasible with some work.

comment 3y ago · link · parent

It says that it's actor-based, and sending messages to an actor is equivalent to running the actor function under a mutex, and thus reduces parallelism (in other words, you have N threads sending messages, but only 1 thread running the actor code, so it's just as serialized as a mutex), so while it may technically be "fully lock-free", using actors means that there is no parallelization improvement.

comment 3y ago · link · parent

That's because the author apparently neglected to parse the resulting page to ensure that the submission succeeded.

If you terminate the system right after sending a form there is no guarantee that the data even left the local buffers for the network.

comment 3y ago · link · parent

You can use impl Borrow<T> for that if the choice is static.

If it's dynamic, you can use Cow or the supercow/bos/... crates if you want Arc/Rc to be options as well.

comment 3y ago · link · parent

Rust is designed like this because it seeks to achieve zero-cost abstractions and safety.

Or in other words, the goal is that you can think in abstract what the natural optimal machine code would be for a program, and you can write a Rust program that, in principle, can compile to that machine code, with as little constraints as possible on what that machine code looks like.

Unlike C, that also has this property, Rust additionally seeks to guarantee that any code will satisfy a bunch of invariants (such as that a variable of a data type actually always holds a valid value of that data type) provided the unsafe code part satisfies a bunch of invariants.

If you use Go or Haskell, that's not possible.

For example, Go requires a GC (and thus requires to waste CPU cycles uselessly scanning memory), and Haskell requires to use memory to store thunks rather than the actual data and has limited mutation (meaning you waste CPU cycles uselessly handling lazy computations and copying data). Obviously neither of this are required for the vast majority of programs, so choosing such a language means your program is unfixably handicapped in term of efficiency, and has no chance to compile to the machine code that any reasonable programmer would conceive as the best solution to the problem.

comment 3y ago · link · parent

Do they really not do live migration or at least auto-restart (if configured) in those cases?

comment 3y ago · link · parent

It's not clear, but my interpretation is that they contacted every account holder, somehow convinced them to migrate (perhaps with discounts and/or threats of termination) and then shut down once everyone migrated.

Would be very interesting to learn how that was possible, it seems surprising to me that there wasn't even one instance that the owner forgot about or just was unwilling to do any work on.

It's possible that credit card expiration was the key, as that may have automatically disabled almost all forgotten accounts.

comment 3y ago · link · parent

OsmAnd, while a bit harder to use (but not that much), is much better than Organic Maps: it can show satellite imagery from both Google and Microsoft (and download it for offline use!), has a 3D map view, supports coloring slopes, has a bunch of specialized functionality for hiking, cycling, skiing, maritime navigation, can record trails, can route according to vehicle dimensions and in general can do everything (except for things that require access to Google's data like routing based on live traffic data and showing data like opening hours that businesses put in Google Maps).
1
8910
51