9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 5y ago · link · parent
It is wrong to rely on everyone using a latest version of a browser. Every site should support at least 5 years old browsers and a good site will be usable in 10 years old browser including builtin browser of Windows.
Sadly, in reality most sites are made so poorly that they don't open on 5-years old smartphone. It shows how low qualified became modern web developers.
comment 5y ago · link · parent
Other OS like Windows, Android or MacOS implement such an API. Therefore it is possible. I think that truly open source drivers should be available for everyone, not only to the users of one specific kernel.
comment 5y ago · link · parent
> One of those officials said he was briefed on a spring 2017 meeting in which the president asked whether the CIA could assassinate Assange and provide him “options” for how to do so.
I don't understand how this can be legal. Cannot such a request be considered a conspiracy to commit a murder? Or some people are "more equal" and the law doesn't apply to them?
comment 5y ago · link · parent
I don't think that installing your bank's app is a good idea. First, banks are interested in collecting as much data about their customers as possible so the app will be used as a spyware. Second, installing an app eliminates second factor for authorization - now if your phone gets hacked, the criminals will be able to steal all your savings.
It is better to use only bank's website from desktop computer and use a phone only as a second factor to confirm transactions.
comment 5y ago · link · parent
Languages like C (or Rust) allocate variables on the stack because it is cheap with modern CPUs, but 8-bit CPUs don't have addressing modes to access them easily. (by the way, some modern CPUs like ARM also cannot add a register to a variable on the stack).
The solution is not to use the stack for variables and instead use zero-page locations. As there are only 256 zero-page bytes, same locations should be reused for variables in different functions. This cannot be used with recursive functions, but such code is ineffecient anyway so it is better not to use them at all and use loops instead.
Another thing is heap and closures (that allocate variables on the heap). Instead of heap the code for 8-bit CPUs should use static allocation.
The article contains an example of 6502 code compiled from Rust and this code is inefficient. It uses too much locations for variables (rc6-rc39) and it wastes time saving and restoring those locations in prologue/epilogue.
No wonder that programs run slowly. It would be much better to compile CHIP-8 directly to 6502 assembly.
comment 5y ago · link · parent
For example, when government tried to block Telegram, it used push notifications to send addresses of new (not yet blocked) servers to the app (of course, you can send different addresses to different devices). It helped Telegram to evade blocking and it worked.
As I understand, you cannot do it with PWA, especially if the browser doesn't encrypt DNS requests.
So with native apps the only way to block them is either block App Store completely or push on Apple to remove the app.
If the browser supports encrypted DNS and hiding SNI (which needs TLS >= 1.3) then there are chances to evade blocking with PWA. But as I understand, Safari doesn't use encrypted DNS by default (I wonder why).
comment 5y ago · link · parent
The main way to control elections now is not letting opposition candidates to get into the ballot. For example, on this elections many candidates were rejected because they are "linked" to Navalny's organisation that was admitted as an extremist organization by the court. Some people are rejected because the signatures they have collected are deemed invalid. Obviously you cannot win if you cannot get into the ballot.
There also is electronic voting (voting over Internet) which is difficult to monitor. It is also worth noting that while you can vote over Internet, you cannot collect more than 50% of required signatures for being added to a ballot this way.
comment 5y ago · link · parent
comment 5y ago · link · parent
Wouldn't it be better if daemons like PulseAudio or PipeWire gave control of an audio card to an application that wants exclusive access?
For example, Windows API can provide exclusive access to an audio card.
comment 5y ago · link · parent
[1] https://bottosson.github.io/img/colorpicker/hsv-picker.png
comment 5y ago · link · parent
1) rule that does not apply to any element on the page. Such rules only inflate CSS file and waste traffic and CPU cycles to process them
2) rule that is overriden by another rule. Again, it doesn't have any effect on the page and only wastes CPU cycles.
The case 1 happens when styles for all pages are merged into a single file instead of making different bundles for different pages. Both cases happen when using bloated CSS frameworks.
comment 5y ago · link · parent
I think that average quality websites made for public Internet should use only features that have been supported at least for 5 years in major browsers including mobile. And a high quality site must be usable in 10-years old browser.
comment 5y ago · link · parent
comment 5y ago · link · parent
Also, such leaks can be dangerous. If someone is hiding from authoritarian government then the stolen data can be used to track and assasinate them.
comment 5y ago · link · parent
But keyboard manufacturers do not want to make better keyboards for non-latin countries, they just overlay foreign characters on standard 26-key keyboard because it is cheaper.