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 1y ago · link · parent

Phone number is not an identity document, and you can rent a number cheaply on a black market. Also, there should be no verification for small amounts of money. We can use cash anonymously, why we cannot transfer money anonymously?

comment 1y ago · link · parent

They probably won't be happy if you just use the bathroom and don't order anything. Here some fastfood places near busy subway stations have a combination lock on the door to prevent random people from using the bathroom (the code is in the receipt).

comment 1y ago · link · parent

Wrong. The key point of communism is that everyone contributes to society as much work as they can and gets as much goods as they need. So money become unnecessary. In software world, I would say open source software ecosystem definitely looks like communism. When installing Linux, you install communism.

comment 1y ago · link · parent

Telegram founder Pavel Durov had to roll back his cryptocurrency project after threats from US agencies (SEC if I remember correctly).

comment 1y ago · link · parent

> And then, if we were to add a little conspiracy-theory flavor in there...Imagine a scenario where they carefully backdoor control into everything. They would be able to remotely shutdown any town, city, state, province or country.

Doesn't that apply equally to every Western product which has a CPU? Like that cars made by a billionaire who makes rockets and digs tunnels?

comment 1y ago · link · parent

They also have brands like Geely which looks English but doesn't mean anything.

comment 1y ago · link · parent

> The 88mph thing from Back to the Future is a bit of a joke on the underpowered engine in a heavy car. It’s actually quite a challenge to get that thing up to speed.

As I remember, indeed, they had to use a train.

comment 1y ago · link · parent

Probably the problem with West are high wages and unions (especially in Europe). West could still win if it had advanced manufacturing and robotic equipment which nobody else has but this doesn't seem to be the case.

comment 1y ago · link · parent

I read you can somehow buy cheap version of car for internal market and hack it to allow operating outside China (and to translate UI text from Chinese to Russian). At least there are people offering hacking/localizing services. No need to pay more!

comment 1y ago · link · parent

Today you sell a country a computer, engineering software, books, chips and industrial machines, tomorrow you have missiles pointed at you designed using that computer and manufactured using that machines.

comment 1y ago · link · parent

I think you should not sell advanced industrial equipment, electronic parts and computers to everyone willing to pay because they can be used to produce things (including things that shoot, fly and explode). Sell only what can be used for entertainment, not for manufacturing.

For example, make an export version of GPU that has very poor precision and makes mistakes in calculations. Nobody notices if the pixels in a game are colored little wrong, but you cannot do science on such a GPU.

Also restrict export of scientific data. Keep monopoly on manufacturing things.

comment 1y ago · link · parent

Some Western countries also offer subsidies or other benefits for buyers of solar panels or electric cars.

comment 1y ago · link · parent

To make modern cars you need advanced industrial equipment and machines, robots. Where does China manage to get them? Did West sell these strategic resources to a competitor to get little short-term profit? Or did they learn how to make them themselves?

comment 1y ago · link · parent

Pipelining requires inserting extra (costly) flip-flops and intuitively one might think that this would decrease the performance. It is not that easy.

comment 1y ago · link · parent

What I am interested to know is who invented pipelining? I tried googling but without much success. Does anybody know?

comment 1y ago · link · parent

Interesting note:

> For a head of a famous company, he is little known.

> Even with specialized search tools, Reuters could find only six different photos of Radvinsky online.

Instantly obvious that he is not dumb.

comment 1y ago · link · parent

One of the reasons is because telemetry and backdoors are invisible. If the phone was showing a message like "sending your data to Cupertino" then users were better aware of this. Sadly I doubt there will be a legal requirement to do this.

comment 1y ago · link · parent

This is stupid. They should amend it to ban export of less than 3 generations behind.

comment 1y ago · link · parent

Drones are dangerous. First, they can take high-quality photos, second they can jam the radio communications and GPS, third, they may contain explosives.

comment 1y ago · link · parent

Also to SSH into a VM you need to setup a second network card and to do this you need at least log into a text console.

comment 1y ago · link · parent

Because I wanted to see how a new Ubuntu looked. Not to do something useful.

comment 1y ago · link · parent

I have a traumatic experience with GPU-based GUI. Long time ago I tried to run Ubuntu in a VM, and they switched to GPU-based rendering. But as VM doesn't have a GPU, the system fell back to something called "llvmpipe". The result was that the widgets reacted approximately with 30 second lag to every action.

So what I am asking, if you are making a GPU-based rendering toolkit, please write also SIMD software fallback without shaders. Remember how fast Windows 95 was and make it a little bit faster.

comment 1y ago · link · parent

If the list contains numbers or strings, you can use

    assert sorted(x) == sorted(y)
If you want to add map, then you have to write

    assert list(sorted(i.getValue() for i in someCollection)) == [3, 4, 5]
If the list contains non-sortable values, but they are hashable and unique, you can use sets:

    assert set(x) == set(y)
If the values are not unique, but hashable, you can use a counter (like a set but with count for repeating values):

    assert Counter(x) == Counter(y)
(by the way I learned about this trick from a LLM)

And if the values are neither sortable, nor hashable, you'll have to write a helper function.

But still, pytest tests are less wordy and they don't require you to create a class.

This situation is familiar to me, I had to write such helper function when writing tests in PHP, for some reason it is not included in PHPUnit assertions.

comment 1y ago · link · parent

On Hackerone you can get money for a bug report, could that be the reason? I think that the first sentence in report is probably written by a human and the rest by AI. The report is unnecessary wordy, has typical AI formatting and several paragraphs with detailed explanation of "you are absolutely right" are signs of a LLM.

comment 1y ago · link · parent

> It's fantastically useful to know (for example) not just that two lists aren't equal, but specifically what elements differ.

Pytest shows the diff as well when using assert:

    >       assert y == x
    E       assert [1, 2, 3] == [1, 4, 3, 6]
    E         
    E          At index 1 diff: 2 != 4
    E         Right contains one more item: 6
    E         Use -v to get more diff

comment 1y ago · link · parent

Glad to read that a russian game is well known around the world and regularly gets in the news.

comment 1y ago · link · parent

I like how tests are made in Python - you don't even need classes, just functions, and use a single assert keyword for everything. Also it's easy to parametrize them using decorators.

comment 1y ago · link · parent

I wonder, what is the main obstacle in making robots for mechanical tasks, like laying bricks, paving a road or working in the shaft? It doesn't look like something that requires lot of mathematical or programming skills, just good vision and manipulators.

comment 1y ago · link · parent

What if you are typing not an English text, but a series of random letters? This gets you to 5-6 bits per letter.
1
626364
185