Better HN
topnewbestaskshowjobs
Log inSign up

devit

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

Submissions

comment 7y ago · link · parent

Not necessarily. Websites should use CSS media queries to work at all aspect ratios and sizes without needing server-side code or JavaScript.

comment 7y ago · link · parent

My guess is that either no registers will be callee-saved or one group of 8 registers will be callee-saved (in the current draft, you can group 1, 2, 4 or 8 sequential registers, but only starting on a multiple of the group size, so register groups are always going to be contained within one of the four 8-register maximum-size groups); this will require dynamic stack allocation since the vector length is not fixed.

The saving sequence would be something like this (after setting up a frame pointer if needed): "vsetvl t0, x0, e8, m8; sub sp, sp, t0; vse.v v16, (sp)".

comment 7y ago · link · parent

Looks like the author is going to enjoy RISC-V SIMD (once it is finalized).

comment 7y ago · link · parent

1. That situation is equivalent to the one where the text is different and longer, and generally web pages are designed to layout properly regardless of the content of multiline text sections, so probably not an issue in practice

2. One could just determine the height of the float ceiling with the greedy algorithm and run the optimization algorithm with that constraint

comment 7y ago · link · parent

In Rust you can probably get away with not speculating and thus having "imprecise exceptions" for overflow and maybe array reads (if you don't care about side channels), since panic essentially destroys all non-Mutex-protected accessible memory anyway and Mutex-protected memory is made inaccessible via poisoning (as long as they don't get moved through things like library calls and atomic ops).

It would require a minor compatibility break, significant checking work and changes to unsafe code to make it work, but it should be doable.

Array writes do need precise checking though, since otherwise you can write to arbitrary memory.

comment 7y ago · link · parent

The "wealth" created is that there is a new house up for rent, and thus more options for those who want to rent.

The advantage of renting compared to buying is that you can occupy an house for a limited amount of time without being financially exposed to changes in the value of the house, without having to find a new buyer when you move out and without needing upfront capital or credit to buy it (there are of course also disadvantages to renting, so some prefer to buy instead).

comment 7y ago · link · parent

The things Rust wants more than other languages are support for fast array bounds checks and fast integer overflow checks.

Unfortunately none of the current popular architectures seem to have either.

comment 7y ago · link · parent

There's the major difference that you can't "pirate" a single-player game that is only available remotely, and that you can access such games remotely from any hardware.

So it could result in a renaissance of the classic AAA 3D single-player games, perhaps.

comment 7y ago · link · parent

You are supposed to use the Web Notifications API and let the browser/OS choose whether it should play a sound.

comment 7y ago · link · parent

Why not use serde instead of rolling your own "Savable"?

Also you should use Rc/Arc and Weak (along with RefCell/Mutex if needed) instead of the unsafe pointers. Even better, if possible, move the functions that access multiple components to the object that holds them all, and don't use any "smart pointers". Another possible design is to pass borrowed references explicitly to the methods, and add them to the trait signatures where needed.

Regarding memory access, it's probably fastest to have an hardcoded fast path for RAM and ROM, and then process the rest like now. Lookup tables might help as well (as long as all the data including them fits in cache, of course).

comment 7y ago · link · parent

Borosilicate glass (and some aluminosilicate glass-ceramic) is transparent, doesn't leech iron or nickel into the food, is easier to clean since limescale doesn't bind easily to it, doesn't rust when exposed to salty water, can be used in a microwave oven, unlike cast iron and stainless steel.

The only disadvantage is that it shatters if you drop it or hit it with enough force.

comment 7y ago · link · parent

Maybe they could have a reasonably efficient setup instead?

Not sure how you can possibly pay 0.14$ in computing for a single ride (if that's accurate). That's more than 3 hours of a t3.medium instance for example...

comment 7y ago · link · parent

The same reasoning does indeed apply to Garmin watches, smart fridges and car dashboards since people are only going to wear one watch and own one fridge and one car.

I don't see the downside of requiring everyone in your examples that already allows third party apps to do so for free (other than passing through payment processing fees) and without delay and censorship: the costs are minor or insignificant and can be included in the purchase price of the device.

The advantage is that it leads to a fair playing field for app makers, lower prices for consumers (since the money that goes to the platform maker is all visible upfront in the device price and thus easier to compete on) and doesn't stifle niches that the platform owner doesn't like for whatever reason.

comment 7y ago · link · parent

Apple has a monopoly on selling phone apps to the percentage of smartphone users that have an iPhone in their pocket.

It should thus be regarded as a monopoly regardless of how many people are affected, and forbidden.

comment 7y ago · link · parent

You can use R packages from Python and viceversa with rpy2 or reticulate.

comment 7y ago · link · parent

Any more in-depth treatment on the properties of the system and how it resists various attacks?

comment 7y ago · link · parent

In the case of logos, it also signals that you are attempting to signal "wealth" (more appropriately, a somewhat elevated clothing budget), which is generally detrimental.

comment 7y ago · link · parent

Just find any decent programmer and have them learn Delphi as needed?

I mean, a lot of people program in a language they aren't familiar with because it has the best ecosystem for a given job or because the open source project they are modifying is written in that language.

comment 7y ago · link · parent

You could have the compiler produce a fully explicit version (I'm not sure if Rust can do that out of the box at the moment)

comment 7y ago · link · parent

Keyboards are only faster if you have spent the time learning the shortcuts for a specific application.

With a mouse, you can use any application right away with no learning curve, and also interact with the content itself better than with a keyboard.

comment 7y ago · link · parent

That seems to miss the fact that if you buy a fridge on Amazon and decide to return it, you are most likely going to look for another fridge on Amazon regardless of whether Amazon puts fridges in the recommendation section or not, since you already know you need a fridge and that Amazon sells fridges.

My only explanations are that that kind of thing happens when they can't figure out anything good to recommend.

comment 7y ago · link · parent

I think it ultimately depends on how much ARM/RISC-V's price/performance ends up being better than x86.

If it's not much better then people will not switch due to these small annoyances, and there doesn't seem to be any fundamental reason for it being much better (Intel and AMD are perfectly capable of producing top-performing x86 CPUs, and the architecture should not matter much).

comment 7y ago · link · parent

You can just search on the client after decrypting.

comment 7y ago · link · parent

I wonder if trademark licensing could be a viable business model for some open source projects?

comment 7y ago · link · parent

How about the obvious solution to all timing attacks of sending a network response after a timer set to 2^K milliseconds expires rather than when the data is ready? (with K adaptively incremented and decremented only rarely, outliers managed by starting the timer again so that the time is rounded up to 2^K)

This way, the only timing signal available would be which requests take an outlier amount of time, and I doubt that's enough to break anything unless you can remotely cause the peer to hit slow disks or make network requests depending on secret data (which is a far more explicit programming choice than CPU timing differences).

comment 7y ago · link · parent

Are hooks being accepted as a good design by the community?

It seems to me that the lack of a parameter explicitly indicating the component and the reliance on hook ordering to match them across calls of the component function make them a bad design, but I might very well wrong and would be happy to be convinced otherwise.

comment 7y ago · link · parent

For personal development, social behavior and relationships these two sets of books are the best theory available, and significantly better and more fundamental than anything else I found written on the topic.

- Models: Attract Women through Honesty + The Subtle Art of not Giving a Fuck by Mark Manson

- The Ethical Slut by Dossie Easton and Janet Hardy + More than Two by Franklin Veaux and Eve Rickert + Opening Up by Tristan Taormino

comment 7y ago · link · parent

Why write the transaction ids in the tuples at all?

In most production cases, transactions in flight are going to affect a small amount of rows overall, so you can just keep the data in memory, and store it to disk in a separate table if it gets large.

comment 7y ago · link · parent

The thing is that if you are an established "alpha male" either in the hierarchical sense or in the sense that you are self-sufficient, there is little need to engage in intra-group aggression, and in fact that would likely be detrimental as others are more likely to want to strip you of leadership roles if you are violent to them.

So it's quite possible (but uncertain) that women are attracted to dominance and leadership but not so much to physical violence itself, especially if the women does not think it serves any purpose, or if it shows weakness ("can't get any respect, so resorts to physical violence").

comment 7y ago · link · parent

Isn't most or all of this avoided by explicitly using Bayes' theorem along with a correct formalization of the domain?

E.g. for the mammogram:

P(cancer) = 0.8%

P(~cancer) = 1 - P(cancer) = 99.2%

P(positive_mammogram | cancer) = 90%

P(positive_mammogram | ~cancer) = 7%

P(cancer | positive_mammogram) = P(positive_mammogram | cancer) P(cancer) / (P(positive_mammogram | cancer) P(cancer) + P(positive_mammogram | ~cancer) (1 - P(cancer))) = 90% * 0.8% / (90% * 0.8% + 7% * 99.2%) = 9.39457%

1
353637
51