Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 4y ago · link · parent

Then this feaure should be disabled so that nobody relies on it.

comment 4y ago · link · parent

If it is enabled in standard configuration of major browsers, it is not optional anymore. Sites become dependent on it.

comment 4y ago · link · parent

Instead of changing window size, a browser could display site with a fixed with (e.g. 1280 pixels) centered inside a window. This way you can have your window fullscreen or any reasonable size but the site will "see" standard 1280 pixel wide screen.

Of course, 1280 pixels should not be hardcoded, there could be a choice between several popular sizes.

comment 4y ago · link · parent

I am not sure that it would work because it is unlikely that you can test your application with all existing videocards (and yet to be released cards). And even if you do that the performance might depend on other factors (OS, CPU model, RAM type and size, driver version).

Instead game developers should provide an option to select graphic settings: more textures, less textures, more shaders, less shaders and so on, and display a FPS counter so that the user is able to decide what is better for them. Or automatically switch to lower settings if fps falls below cetrain threshold.

comment 4y ago · link · parent

The sandbox provided by Javascript (or WASM) engine is already like a virtual machine. The problem is that browser vendors leak important information into this sandbox.

comment 4y ago · link · parent

Indeed, the WebGL extension that leaks videocard and driver name [1] is written by Google's employee.

[1] https://www.khronos.org/registry/webgl/extensions/WEBGL_debu...

comment 4y ago · link · parent

Also what I don't like that enabling this feature disables page zoom. This is inconvenient because you have to choose between using zoom and fingerprint protection.

Actually I think that when zoom is less than 100% (i.e. the page is made smaller) it is possible to report to the page original window size rather than scaled up size. Many sites today use gigantic font sizes and they are difficult to read without zoom or high-DPI display.

comment 4y ago · link · parent

That's an awesome feature, although it doesn't seem to be complete.

I did some research whether it is possible to stop fingerprinting using a browser extension that patches JS environment before loading the page, and it turns out that it is difficult or impossible. Because first of all, there is no API for patching a JS environment from an extension.

I think that many of new HTML standards are poorly designed in regards to privacy. For example, WebGL reports the video card that you use. Who needs that? Well, maybe there is a tiny percentage of sites that use this information to detect bugs but main use of this feature is a reliable unforgeable signal for fingerprinting a device. Most of sites do not need WebGL at all.

It seems that browser vendors hurry to push forward as many features as possible without much thinking about user's privacy.

So basically today we have lots of standards that provide signals for fingerprinting (Web Audio, WebGL, Canvas API, WebRTC, port scanning via fetch or websocket, probing extensions list) and zero APIs or settings that allow to control it or block (unless you are ready to patch a browser).

comment 4y ago · link · parent

In my opinion "the best" would be to support only one, fixed, largest vector size and emulate legacy instructions for smaller sizes using microcode (this is slow, but requires minimum transistor count). There is no need to optimize for legacy software; instead it should be recompiled and compiler should generate versions of code for all existing generations of CPUs.

This way the CPU design can be simplified and all the complexity moved into compilers.

comment 4y ago · link · parent

I have read about ideas to make forward-compatible vector instructions, but personally I don't see much value in such features.

If there appears a new CPU with different vector size then you can just recompile the program and let compiler use new instructions. Therefore it doesn't make sense to sacrifice chip area or performance for this feature.

Regarding backward compatibility (running old software on a next generation CPU), I think that newer CPUs do not need to support obsolete instructions from previous generations. Instead they could just include a decoder that would (using microcode and therefore slowly) emulate old instructions. This allows user run their package manager or recompile their software and switch to new instructions. It is totally fine to completely redesign the ISA provided that there is a minimal converter for old instructions or at least support for software-based translator like qemu.

comment 4y ago · link · parent

My imaginary investcoin [1] is not a scam though. It is backed by stocks and its value comes from the growth of stock market and from being usable as a decentralized mean of payment.

[1] https://news.ycombinator.com/item?id=31463825

comment 4y ago · link · parent

By the way, here is an idea about new type of coin, that I would call "investcoin". Do you see any potential problems with it?

This would be a coin that is backed by stocks. When you buy my investcoin, you can choose any kind of stock from a preapproved list and I will buy them for your money. If you decide to cash out, I will sell stocks of my choice to repay you. The stocks are managed in a public account, so anyone can ensure that the amount of stocks matches the amount of coins. You are guaranteed a share of stocks proportional to amount of coins that you own.

Of course, hard work of thinking out a hypothetical cryptocurrency must be rewarded, so I will take a reasonable fee from every transaction involving buying or selling stocks.

To make things more interesting, we could manage those stocks by voting of coin holders.

Why this is much better than stablecoins:

- first, in contrast to existing stablecoins, anyone can easily check that I hold the amount of stocks matching the amount of coins

- second, unlike existing stablecoins, the value of my investcoin is going to grow as on average stock markets grow over time

- third, the money that you have invested is improving world economy instead of just burning electricity

- fourth, you can use this investcoin as a mean of payment

- fifth, there will be no promises of ridiculous yield. The stocks are meant to back the value of coin, not to be a source of a significant profit.

Looks like a perfect business plan, or am I missing something?

comment 4y ago · link · parent

After I read about this Terra ecosystem, it looks very suspicious: first, you buy UST tokens, investing real money. You are promised a yield up to 20% (suspicious point 1). Then, you deposit your UST so that other people can lend it. But the terms look weird to me (suspicious point 2): first, the loans are "overcollateralized", so, for example, you need to put down equivalent of $100 to get a loan of $70. Second, the interest rate on the loan is ridiculously high - in the range of 30%. Who would take such a loan?

They seemed to have a third kind of token, that you could get as a reward for taking a loan (or depositing UST). But I don't think that by juggling three related tokens around one can generate any value. The only source of money was from people buying any of these tokens.

The support page at Stablegains site says [1]:

> They [Digital finance protocols] are more efficient than traditional finance

I can't see how 30% interest rate overcollateralized loans are "more efficient" than traditional bank loans with rates below 10% per year.

[1] https://stablegains.zendesk.com/hc/en-us/articles/4402680375...

comment 4y ago · link · parent

This is a bad idea. ISPs will use this to force users to send queries in plain text. There is no need for this feature.

One might say that a corporation might need this. But why should we care about corporations? Let them use Internet Explorer that sends everything in plain text. Or they could configure using unencrypted DNS in group policy.

Encrypted DNS should be indistinguishable from any other HTTPS traffic.

comment 4y ago · link · parent

The problem with computers is that they can point you at a mistake, but they cannot understand why you made this mistake and explain the part that you didn't know.

comment 4y ago · link · parent

What if you put batteries into a container filled with sand? They probably would be safe there.

comment 4y ago · link · parent

You cannot talk to your friends or girlfriend using radio though.

comment 4y ago · link · parent

This shows that people generally don't understand client-server architecture and think that the app stores data on their phone and not somewhere in cloud.

comment 4y ago · link · parent

By the way, I remember a similar case in Russia. A telco company published a heat map created from GSM location data that reflected where in the city yound people spend their time. One of the "hot" spots on the map was in a remote forest area with nobody living around. Most probably it was a military object.

comment 4y ago · link · parent

As I understood, people were taking loans at exorbitant interest rates because they could invest it back into some Anchor or UST related tokens and get even more profit. This is not a realistic business model.

Here is a quote from a random article:

> A popular strategy that many have used was the recursive lending strategy, this involved:

> 1. Depositing bLUNA as collateral on Anchor

> 2. Borrowing UST to buy LUNA

> 3. Swap LUNA to bLUNA to repeat Step 1

Regarding this:

> The other half was from Luna Foundation dumping money into Anchor's reserves.

And where do those money ultimately come from? I guess from unlucky investors who bought UST/LUNA and were left with useless tokens? Then this resembles a classic Ponzi scheme.

[1] https://medium.com/qi-capital/lessons-learned-from-the-may-c...

comment 4y ago · link · parent

As I understand, the value of Bitcoin is in an expectation that in future it will become a widespread payment method, and you can buy it cheap (well, relatively cheap) today in order to sell it later to those who will want to use it for transactions.

If my understanding is correct, then as soon as it becomes clear that there are better alternatives or Bticoin is unfit for this purpose, the price will drop.

comment 4y ago · link · parent

Thank you for clarification, but I still don't get this part:

> and from interest on loans people took out against the collateral they deposited

To be able to pay out 20% interest rate on deposits you need to issue loans at higher rate. But who would take such a loan when they can go to a traditional bank? Furthermore, the borrower needs to provide a collateral.

Money cannot appear out of nowhere. There should be somebody buying something, like products or services (not just cryptotokens). Or at least a reasonable expectation of someone buying them.

comment 4y ago · link · parent

But do you need regulation? Promises to produce 20% interest out of thin air when banks don't offer a single percent are suspicious enough in my opinion.

It doesn't make sense. If there was a risk-free way to get 20% income without doing anything then people could stop working and live just from their savings.

comment 4y ago · link · parent

General idea of having two balanced cryptocurrencies doesn't look bad by itself. But the promises to pay 20% of interest per year are super suspicious. Where would that money come from? What kind of goods or services do they produce? Do developers of cryptocurrency expect to receive exorbitant fees from users?

If there is no valid business model explaining where that 20% come from then it is just a Ponzi scheme.

comment 4y ago · link · parent

They can use black microdots, I guess? Or some kind of stenography in the printed image.

comment 4y ago · link · parent

The fact that there are several directories with binaries is not a problem by itself. The problem is that many applications use hardcoded paths instead of searching for these binaries using PATH.

It means that if someone decides to get away from this legacy structure and move OS into something like /system/debian-11.1.2/ all those programs would break.

Examples: [1], [2]. I assume that developers have hardcoded those paths because /sbin is often not included into PATH.

[1] https://github.com/blueman-project/blueman/blob/fcef83a01c80...

[2] https://github.com/blueman-project/blueman/blob/fcef83a01c80...

comment 4y ago · link · parent

Then why is /sbin missing from PATH in Debian? Does that mean that only root can run statically linked binaries?

comment 4y ago · link · parent

This is bad. This, for example, allows sites to accept only government-approved hardware keys with backdoors and do not accept self-made secure keys.

comment 4y ago · link · parent

I don't think that Rust is good for a typical web app (for example, a newsfeed with likeable images or an online store). Rust is very low-level language and doesn't have a garbage collector, so development with it will be slower than using JS.

It is good if you need to do maths or process videos, but doesn't give much advantage in processing JSON trees.

Also, I don't think it is necessary to make a SPA for a simple web store. Looks like overengineering to me. If you don't like that pages are reloading then use any library that automagically replaces the page content on link click. You can turn any "classic" server-side rendered site into something that feels like a SPA but without writing any JS code.

Regarding languages that are best for developers' performance, I guess it is Python? Are there languages that allow to solve typical web tasks using less tokens?

1
111112113
185