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

The website wants to connect to another computer|another app on your computer.

Most users probably will click "No" and this is a good choice.

comment 1y ago · link · parent

I don't like the idea of using programming languages for text formatting because it is unclear how to implement a GUI editor for such format.

Also Markdown is pretty bad format, for example it doesn't even have a specification, lot of ambiguity etc. Avoid it.

comment 1y ago · link · parent

I am not going to register with FB because they now require a 3D face scan to use it.

comment 1y ago · link · parent

So main application for WebRTC is de-anonymisation of users (for example getting their local IP address). Why it is not hidden behind permission I don't understand.

comment 1y ago · link · parent

They are solving the problem that should not have existed. Simply include the binaries into the installer.

Also I wouldn't run suspicious third-party binary installer anyway. If it is not in the official repositories, it doesn't get installed, because I have no time to figure out if it is a safe software or not, what it will do to my system, does it include telemetry, and I have no time to build a sandbox.

comment 1y ago · link · parent

Anyone who does not want to leak their data? I am actually surprised that people are ok with trusting their secrets to a random foreign company.

comment 1y ago · link · parent

There is humble text ads in public channels. There is no ads in 1v1 or group chats so you probably just didn't see it.

comment 1y ago · link · parent

You should not forget that before creating Telegram Durov was the head of VK and he left it to the government with all data, photos (including deleted ones) and messages.

comment 1y ago · link · parent

It is ridiculous that Apple decides what Telegram users can or cannot see, especially banning harmless things like nudity but allowing cruel things like war videos or propaganda.

comment 1y ago · link · parent

I can understand when there are 2 voices, but when there are 4 independent voices how on Earth does one follow them.

comment 1y ago · link · parent

Given that Facebook requires now a face 3D scan to sign up, it is the correct choice.

comment 1y ago · link · parent

> I would not expect a grandma to know how to put a key on her phone and use it reliably.

If your grandma knows how to insert a key into a lock then she will be able to insert a key into a phone.

comment 1y ago · link · parent

I don't think protobuf is good because it allows reordering fields (which means that the decoder will have to do it too). A good binary format is a format that maps to a C struct, doesn't have field names (or ids or tags) and requires zero decoding.

comment 1y ago · link · parent

Lottie is also used by native applications like Telegram. Despite flaws like using JSON I guess there is no alternative.

comment 1y ago · link · parent

SVG/CSS needs a browser (SVG doesn't allow embedding fonts, can contains CSS/JS) and it is a flaw. SVG is designed only for embedding into websites. How do I display it in a native application.

comment 1y ago · link · parent

If it requires a JS VM then it is a flaw. Low-level languages like Rust are faster.

comment 1y ago · link · parent

Why is it "not performant"? It is basically a set of bezier curves, just like other vector standards.

What is really bad that it is based on W3C technologies and requires a browser to display.

comment 1y ago · link · parent

SVG has some serious flaws. How do you preserve fonts when saving an SVG image, and still keep the text editable? Currently as I understand the only way to display text is to convert the text to Bezier path.

Also what I hate about SVG is that it requires a whole browser to display because it can contain CSS and JS.

Both these facts hint that it was designed only for embedding into websites, and is not ready for standalone use. Maybe we need a new format for vector graphics that doesn't require a browser.

comment 1y ago · link · parent

Maybe people just should not post things they would regret about, or at least do it anonymously, or at least use fake phone number. Sadly our govt doesn't want us to use fake phone numbers.

comment 1y ago · link · parent

> Police genuinely do get disciplined and fired

So basically no punishment.

comment 1y ago · link · parent

Rich mafia bosses also kill people. It's their lifestyle.

comment 1y ago · link · parent

Good thing the govt requires KYC to make these things possible.

comment 1y ago · link · parent

In this case it is better to make a new standard because HTML/CSS have so many legacy things and quirks that better be got rid of (like <hr> tag for example, table cell not inheriting font size etc).

comment 1y ago · link · parent

> So while its true that a state update will rebuild an entire component

What if the component does some long computations, for example, calculating a sum of 10000 elements of an array? React will do the computation only to find that nothing changed.

comment 1y ago · link · parent

> If a component is memoized with `memo(...)`, then a re-render will be stopped if it has the same props as before

This works only with immutable data structures. Am I wrong? Because a modified array will pass the identity test (=== operator). If you are using mutable data structures, you cannot use identity operator to detect changes.

Also if "memo" optimization is that good why does one have to add it manually?

> If your react app is re-calculating the entire tree, you suck at react

The point of UI framework is to do the optimization for me and not require me to use some special style of coding like immutable structures or manually write functions like componentShouldUpdate. What I write is how UI variables depend on model variables and the rest is framework's job. I don't want to use weird patterns like a function with a giant switch that processes update events and clones the whole model graph to change a single variable.

Vue of course has its own set of issues, caused by using proxies (for example when adding on object to the set you must "unwrap" it manually to prevent adding a proxy to the set).

comment 1y ago · link · parent

FP principle is that functions are first-class objects and one can pass a function to a function. I don't see how it helps programming the UI. Maybe you meant using immutable data structures? I mentioned that and noted that they have their own issues and generally are a pain to use.

> If your whole tree is recalculating on every mousemove event

If you update a variable in the root component, that will happen. Am I wrong?

comment 1y ago · link · parent

The react's algorithm of detecting changes is based on rebuilding a Virtual DOM tree (i.e. recalculating all components) and comparing that tree to the previous one. It is done, as I understand, every time someone calls update() or similar method on a component.

So React won't cause performance issues only if you have few model variables or manually optimize the code by using immutable data structures (which have their own performance issues) and pure components.

For comparison, Vue detects changing by wrapping all model variables with proxies and linking them to UI components that use them. This has an advantage of not having to recalculate everything and disadvantage of having an overhead for using proxies and creating a dependency graph. Also, having to deal with proxies adds more pain for the programmer.

comment 1y ago · link · parent

Won't VM be detected by GPU name which is exposed by WebGL and similar technologies? What computer has a GPU with a name like "QEMU GPU"?

If you do that, at least change GPU name to NVIDIA or something.

1
505152
185