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

Regulated banks and currencies have similar issues, for example:

- the government can print more money and devaluate your savings (it's like a form of tax one cannot avoid). But it is difficult to "print" more cryptocurrency.

- the government can put limits on amount of money one can withdraw from a bank account. So you legally have the money but cannot use it.

- the bank can refuse to deal with you under AML acts without need to prove anything. But nobody will ban you from mining and exchanging crypto.

- the bank can go bankrupt

The most reliable way to keep your savings safe seems to be to store it as gold. However, there are usually high taxes for buying/selling gold (because why let people store their savings safely) and often governments outright ban gold (folks from US are probably familiar with such situations [1]).

[1] https://en.wikipedia.org/wiki/Executive_Order_6102

comment 4y ago · link · parent

Does it mean that emulators like qemu are illegal? They are using instruction sets without permission.

comment 4y ago · link · parent

> A majority of what an ORM provides can be solved by a view or a function.

If you want to get a single number or column of numbers - then yes, you can go with an SQL query. But if you need to get data about products in a store, you'll have to fetch the data and create objects for every product. Wow, you have just written an ORM.

comment 4y ago · link · parent

If the query selects a small number of rows and columns, and uses an index, it typically takes less than 1 ms on modern hardware. At least with MySQL.

ORM however might be slow. For example, taking 100 rows from SQLite with SQLAlchemy takes 1ms, but getting them as ORM objects takes 8 ms.

comment 4y ago · link · parent

Why are instruction sets copyrighted?

comment 4y ago · link · parent

Because VPN doesn't connect to any servers and runs locally, just filtering the traffic between apps and Internet. "VPN" here is not a real VPN client, but an application that can capture traffic created by apps. As I understand, Android doesn't provide other means to implement a firewall.

comment 4y ago · link · parent

As I understand, VPN acts as a firewall replacement.

comment 4y ago · link · parent

Does content-blocking API works for apps? Or only for browser?

comment 4y ago · link · parent

> what's the threat model here?

By installing signal-desktop you give Signal not only access to your messages (which is fine), but root access to the whole system which allows reading and modifying any file. Even if Signal doesn't have malicious intents, they might have vulnerabilities in their installation or configuration scripts.

comment 4y ago · link · parent

Yes, I made a mistake about the key. Adding a key is safe by itself. However by adding third-party repository you are granting Signal a permission to replace packages on your system (unless you manually whitelist package names in apt preferences), and by installing a package from Signal repository you grant it root access to your system.

Sadly debian-based distributions do not respect the principle of least privileges and grant unnecessary permissions to installation scripts.

comment 4y ago · link · parent

What are memory and CPU costs of using this in web pages? For example, when a page with 100 images loads, won't decompressing hashes into 100 canvases take lot of resources and block the page or entire system for several seconds?

The placeholders are blurred and I assume that creating blurred images is pretty expensive and takes O(N^2*M) where N is size of the image and M is number of points.

Wouldn't it be cheaper to use blocky placeholders that take only O(N^2) time to paint?

comment 4y ago · link · parent

This is not secure at all because you just gave Signal root access to your system. By adding their keys you also have granted a permission for Signal to replace any packages on your system.

I would instead manually download and unpack the app, create separate user for it, and run it in chroot. Much safer than your method.

comment 4y ago · link · parent

Adding third-party repositories is actually dangerous because they can replace packages on your system (for example, bash) and run scripts with root privileges during installation.

Sadly many Linux distributions do not have user-friendly ways to install third-party applications and as a result we see instructions on running curl via sudo bash.

comment 4y ago · link · parent

Great, by I would prefer to avoid YAML because it is very complicated and difficult to parse.

comment 4y ago · link · parent

On the other hand, if machine-readable format is adopted, it will be used for many years or even decades. So instead of making a quick hack that everybody will regret later it might be better to spend some time comparing different options.

comment 4y ago · link · parent

For me there are too many quotes and brackets. My proposed format can also be converted to JSON if necessary.

comment 4y ago · link · parent

I think that JSON is a bad choice here.

It is obvious that CLI commands should produce machine-readable output because they are often used in scripts, and accept machine-readable input as well. Using arbitrary text output was a mistake because it is difficult to parse, especially when spaces and non-ASCII characters are present.

A good choice would be a format that is easily parsed by programs but still readable by the user. JSON is a bad choice here because it is hard to read.

In my opinion, something formatted with pipes, quotes and spaces would be better:

    eth0:
      ip: 127.15.34.23
      flags: BROADCAST|UNICAST
      mtu: 1500
      name: """"Gigabit" by Network Interfaces Inc."""
Note that the format I have proposed here is machine-readable, somewhat human-readable and somewhat parseable by line-oriented tools like grep. Therefore there might be no need for switches to choose output format. It is also relatively easy to produce without any libraries.

Regarding idea to output data in /proc or /sys in JSON format, I think this is wrong as well. This would mean that reading data about multiple processes would require lot of formatting and parsing JSON. Instead or parsing /proc and /sys directly, applications should use libraries distributed with kernel, and reading the data directly should be discouraged. Because currently /proc and /sys are just a kind of undocumented API.

Also, I wanted to note that I dislike jq utility. Instead of using JSONPath it uses some proprietary query format that I constantly fail to remember.

comment 4y ago · link · parent

And western equipment is totally not backdoored, and has open source hardware and firmware so that anyone can verify it?

comment 4y ago · link · parent

There is also a constant named "DISALLOW_FUN" [1]. Probably intended for corporate devices.

[1] https://developer.android.com/reference/android/os/UserManag...

comment 4y ago · link · parent

They will be able to do it only for their citizens and they can do it already.

comment 4y ago · link · parent

So basically the data center took the side of the criminals.

comment 4y ago · link · parent

> but I'm not aware how big a customer you have to be for your ISP to care about such notices

So basically ISP don't want to do anything to prevent misuse of their infrastructure because it is more profitable this way.

> It also creates a nice DoS vector: if I want to not take an exam today, I'll just do a little ping flood from the school network and get banned for a while.

The idea is that you can only block traffic going from school network to your site, but not any other traffic from that network.

comment 4y ago · link · parent

Does KYC help to prosecute Microsoft support scammers?

KYC's purpose is to prevent you from transferring money anonymously. However there still are methods to do this (for example, gift cards or betting on sports).

comment 4y ago · link · parent

That article is completely wrong. Misconfigured servers that amplify traffic are not a problem at all. Blacklisting all of them would take no morethan several hours.

The problem is that there is no protocol for rejecting traffic. That's why DDOS is so easy and successful. If you are a website you cannot send a message to uplink saying "I don't want traffic from this network". So small and large ISPs do nothing to help protect victims and make it easy for criminals to extort money.

comment 4y ago · link · parent

No, giving a card looks like you are giving your wallet to the waiter and hope that they are honest.

comment 4y ago · link · parent

How do car manufacturers prevent their cars from being used by terrorists?

comment 4y ago · link · parent

It is very difficult to find a backdoor even in the open source code, in megabytes of closed source code it is nearly impossible.

> That would be putting their reputation

Does Facebook have any reputation left?

comment 4y ago · link · parent

Then you can use bytewise comparison instead of alphabetic comparison.

comment 4y ago · link · parent

There is not much good in making the data public. For example, information about salary helps scammers to pick "fat" victims. A perfect victim is someone in their 60s-70s who had a good salary once and probably has savings. The crime rate might be low in Sweden but this information can be used by foreign scammers.

Also this information can be useful for foreign spies (for example to find employees of companies doing work for defence).

1
104105106
185