Better HN
topnewbestaskshowjobs
Log inSign up

devit

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

Submissions

comment 6y ago · link · parent

> VkFFT is able to match and outperform cuFFT on the whole tested range from 2^7 to 2^28 in single precision

What is your explanation for this?

Is the VkFFT algorithm better? Is SPIR-V fundamentally more expressive than PTX? Are nVidia drivers better at compiling SPIR-V than PTX?

Have you compared the generated GPU assembly from both?

comment 6y ago · link · parent

The actual advantage of working on something like WSL1 is that it would ensure that the NT kernel is as capable as the Linux kernel (Linux is of course the best designed and implemented among the non-realtime, not provably correct and not secure kernels).

For instance, the complaints about I/O performance are because the NT kernel has a worse implementation, so they should have improved it for both Win32 and Linux apps instead of giving up.

(your reasoning about the dentry cache makes no sense though since such a cache would be implemented by the NT kernel and certainly not by WSL1, so there's no difference between Linux and Windows programs)

comment 6y ago · link · parent

You can use the kcmp system call with KCMP_FILE argument to find out if two fds point to the same files structure (of course you must use this as the custom comparison function of a sort algorithm so you don't end up with quadratic run time).

Linux has a project called CRIU that can save and restore processes to disk without needing additional kernel modules, so pretty much all state is already gettable and settable from user space.

comment 6y ago · link · parent

You can do most or all of that by reading /proc/<pid>/fdinfo/<fd> and /proc/<pid>/fd/<fd> or by making system calls on the affected fds (which you can do e.g. by injecting code with LD_PRELOAD or ptrace or with nsenter with fd namespace or equivalent C code).

Even if you write a kernel driver, iterating over all tasks in the system is a terrible design (there may be millions), not to mention "determining if a task belongs to a C playground program" in the kernel (obviously the kernel should have no knowledge about such specifics).

Of course, if a developer cannot even produce a reasonable overall design, it's not surprising that they aren't capable of writing correct code.

comment 6y ago · link · parent

That doesn't work with non-copyable types.

comment 6y ago · link · parent

It's wrong because it's useless: you can use inline styles instead (and if you gzip the html it's probably going to be smaller as long as you factor in the framework, since essentially you are using numeric LZ backreferences instead of useless long class names).

The whole point of CSS classes is that they don't map to fixed styles, so they offer a useful abstraction, allowing you to change the CSS class definition once and effect all elements it applies to.

comment 6y ago · link · parent

The "absolute risk reduction" and NNT numbers seem pretty useless, since they are in a context where people are trying their best to avoid getting infected with isolation, masks, distancing, etc.

Once the vaccine rolls out, people will return to previous habits and without the vaccine a large percentage of the population would be infected, so these numbers look completely different (i.e. absolute risk reduction of at least 45% from 50% to 0-5%, and NNT of something like 3-to-1 to 10-to-1).

comment 6y ago · link · parent

Nice, maybe we can start embracing more sensible ways of feeding people that the ridiculously inefficient restaurant model with cooks, servers, individual food choice and individual tables.

comment 6y ago · link · parent

How about making a browser in addition to a "rendering engine for embedding in other applications", in the form of a standalone program and/or a Firefox (desktop and mobile) fork that can use Servo as well as Gecko?

You could also go for the more ambitious plan of creating a brand that can take over Mozilla as a "trusted browser maker", which seems feasible given the falling reputation of Mozilla and the technical security advantages of Servo.

comment 6y ago · link · parent

It might be time to introduce a protocol that allows networks to display authentication prompts without needing to MITM HTTP connections.

It's not even hard, all that's needed is to add an "authentication URL" field to DHCP and IPv6 router advertisements.

comment 6y ago · link · parent

You can use Firefox mobile and the "Video Background Play Fix" addon to disable the browser APIs that allow the background play blocking antifeature.

Alternatively, the NewPipe app available on F-Droid can be used to both play videos in the background and download them.

comment 6y ago · link · parent

The alternative is a high chance of becoming ill with COVID, which according to the data available so far is much riskier than the vaccine (1-2% hospitalization risk even for healthy young adults, evidence of long term issues at least in some people).

Unless of course your alternative plan is full isolation for years, in which case not taking the vaccine is the correct choice, but such isolation is only reasonable if you don't care about going outside anyway at all.

comment 6y ago · link · parent

This seems like a feature, not a bug.

comment 6y ago · link · parent

I would expect vaccination to be fully booked for a while, since it's going to be the most important thing in life to do for anyone not suffering from other serious issues and without anti-vaccination beliefs.

comment 6y ago · link · parent

If the author is the sole contributor or asks contributors for copyright assignments, then they can offer a paid license as well for "commercial use".

comment 6y ago · link · parent

The proper solution is using well-designed GraphQL-to-PostgreSQL software like Hasura or PostGraphile.

There's no reason to use Rails for that (or, well, use it for anything at all, given the terrible language it's based on and its outdated architecture).

comment 6y ago · link · parent

Do you know of any ANC solution that works well (i.e. should be much better than foam earplugs, and preferably remove all sound no matter what) and is usable for sleeping?

comment 6y ago · link · parent

Classical computers can emulate quantum computers, so the title is obviously false.

comment 6y ago · link · parent

The simplest would be to weight one's vote by some non-decreasing function of the number of people who live in the same conurbation.

That would partially achieve the outcome and also makes sense, because if someone wants to live in isolation, then they probably don't care and aren't affected very much by society's policies, and they don't have enough social experience to be correctly informed.

comment 6y ago · link · parent

It's pretty remarkable though that almost half of the US voted for someone who is clearly unsuitable to be president based on his first term.

It might be time to consider letting go of the democratic ideal that every person's vote has the same weight, and figure out some criteria for either voting eligibity or vote weight that would mostly exclude or give little weight to the votes of people who voted for a clearly unsuitable candidate.

comment 6y ago · link · parent

That doesn't work because async functions need to be compiled for minimal stack usage (i.e. segmented stacks, packed variables), while non-async functions need to be compiled for minimal CPU usage (i.e. no stack checking or allocation, no variable packing, only one stack adjustment per function).

If you compile both for the same goal the system will have suboptimal memory usage or performance, and in general you don't know whether a function will be interrupted in advance if you don't have colored functions (also you can't move the stack if you have references unless you have a GC, which is terrible).

comment 6y ago · link · parent

The real issue is the lack of dependent types in Haskell (and unfortunately Rust and all languages with a vast ecosystem).

With dependent types, you can just include a type-level proof that x <= 5 in the integer wrapper type, which then allows to statically check that the default case in the match is impossible.

A newtype including such a dependently-typed proof is the correct solution to this problem, since it can be generalized to any range, unlike the enum with 5 variants.

comment 6y ago · link · parent

This is just a tooling problem that can be solved trivially by having release builds build multiple binaries by default, for all the major extension profiles.

comment 6y ago · link · parent

Yes, except for array bounds checking when it cannot be elided by compiler optimizations.

comment 6y ago · link · parent

The best choice is Rust: as fast and efficient as C++, and more expressive than Java.

comment 6y ago · link · parent

The basic difference is that free software is made by people who strive to write perfect software, while non-free software is made by people who strive to continue receiving a wire transfer at the end of the month by people who strive to be authorized to charge credit cards.

comment 6y ago · link · parent

If you have to drive despite this, you probably should ensure to have a supply of caffeine in the car (e.g. caffeine gums, instant coffee, maybe energy drinks) and take a sufficient dose before driving [https://www.psychologicalscience.org/news/motr/can-a-caffein...]

You might also be able to get a prescription for modafinil, which might be even more effective.

comment 6y ago · link · parent

Pretty sure that either the user is not aware at all of the scraping, or anyway the scraping is not done in the user's interest and the user is not in a position to fully understand the implications, so it is a clearly malicious operation.

In other words, they are abusing the user's trust to access the user's private data for their own profit, hence defrauding the user, and engaging in unauthorized access to the data shared between the user and Facebook without either party's full informed consent.

comment 6y ago · link · parent

No, Visual Basic 6 can only place controls by X/Y position, has no databinding and no VDOM or way to create controls other than placing them in the designer or manually creating and destroying them in code.

It's pretty terrible unless you want to make UIs with a fixed size and set of controls.

1
202122
51