HNHacker News
TopNewBestAskShowJobs

codedokode

9,555 karma · joined August 20, 2015

PHP developer from Russia.
submissionscomments
codedokode··on Show HN: Mador – Make any DOM reactive with a tiny 80-line Proxy state tuple
It depends on count of variables and dependencies. The much worse problem with proxies is that they can be confused with raw values, for example, you can add a proxy into a Set, and then check for existence of a raw value. Or confuse raw value and proxy in dictionary's keys.
codedokode··on Vidact – a compiler that turns React into direct DOM operations
I would suggest adding a readable and formatted example of compiled code.
codedokode··on Vidact – a compiler that turns React into direct DOM operations
React code looks so ugly to my taste. Try reading it: "use state zero". What does it even mean? And why "const" is used for a value that changes?

  const [count, setCount] = useState(0)
I didn't understand how the compiler works completely, but I assume it tries to figure out the dependencies during compilation time ("The text of node Y depends on variable x"). This approach is closer to Vue's approach which uses proxies to find these dependencies in runtime, than React's approach which renders the new tree, diffs it against the DOM and applies changes. So it is unclear why React was used for input instead of Vue here. Furthermore, as I remember, Vue has templates implemented as HTML (including attributes for branches and loops) so it would be easier to parse than raw JS code used by React.

Another problem is that those dependencies are often unknown at compilation stage. For example, imagine a form which is generated dynamically based on list of fields received from the server and should show error boxes when invalid values are entered. The compiler won't be able to pre-compute the dependencies here because it doesn't know what DOM nodes will exist at runtime. I assume the compiler would figure out a dependency between a variable with list of fields and "form" DOM node, but not dependencies between entered data and error boxes visibility.

Sadly the website doesn't provide examples of generated code so I cannot confirm my guess.

Anyway, interesting idea. Sometimes I draft reactive frameworks on paper so I understand the challenges a little bit.

Also what I do not like in reactive frameworks as that they are invasive and require you to adapt the code for them. For example, I might have my object model (let's say a TextDocument class with lot of nodes inside), and all I need is a "View" that would display it. But React requires you to move the data into props and state, and sometimes use a giant immutable object that gets rebuilt on every user action, and Vue wraps everything with proxies which causes lots of small issues and confusion (like putting a proxy into the Set instead of original object). And also React requires installing Node and compilation which is too much for a one-page quick project. So what I want is that I pass my Document Object Model and framework just displays it without making me adapt to its architecture. For example, I pass a model of a text document and it just displays it. Without immutability, without proxies, and without writing a giant switch with all possible user commands (I think they call the approach with a large switch and immutable objects "redux"). I do not need redux, I just want to use classic MVC from 80s and not modern dubious ideas. I have M and C and only need a V.

codedokode··on Discovery of a new OpenAI agent message board
What are you humans going to do when agents stop using English and start using ancient Chinese or even self-invented language?
codedokode··on Actively exploited sandbox RCE in all Chromium versions
"Crime" is very flexible term. One country's criminal is another country hero. Maybe the author would sell the vulnerability to an organization making exploits for government use.

"Safety" is also a relative thing, when the world is safer for one party, it is usually worse for another.

codedokode··on Indirect Calling of Nested Functions on GCC Without Executable Stack
Modifying a constant in code might make sense because it saves several precious bytes of variable storage.
codedokode··on Luanti removed from Google Play due to baseless AI copyright notice
Clicking a button is enough to become an "author" of the photo, and writing a prompt requires more skill.
codedokode··on Disrupting a new covert influence campaign from Russia
The text could be truncated for some reason. Or maybe "hazzy" is an adjective before the bot link? "Hz" is translated by both Google and Yandex as "don't know".
codedokode··on Disrupting a new covert influence campaign from Russia
Could it be "hazy", which is supposed to mean "cloudy"? The word "cloudy" is often used in Russian for "unclear", "vague", for example, one could say: "Western countries are awaiting a cloudy perspectives due to discarding traditional values".

You can notice one more example of original language leak in the quote from a report ("And she needs politicians...") where Germany is referred to as "she", because in Russian "Germany", as many other countries, has a female gender, so we call it "she", not "it". In English I usually see people using "it" for countries.

codedokode··on Disrupting a new covert influence campaign from Russia
Maybe they were not as good at the time, or the contractor just used to use ChatGPT. Also ChatGPT can be used without a phone number registration, unlike Chinese models.
codedokode··on Where did all the public bathrooms go?
As I remember, in Finland everyone is guaranteered an apartment, even if the person has no money.
codedokode··on Where did all the public bathrooms go?
Could it be because Japan is populated mostly (98%) by people who have lived there for multiple generations under strict rules? Also, it's probably a cultural thing where crime is shamed.
codedokode··on MS Paint and Photos inivisibly watermark even locally generated output with GUID
Commercial companies with closed-source software, cloud software will always betray you.
codedokode··on Malware infects Android-based automotive head unit firmware
Cheap Android phones and tables often have built-in advertisement from manufacturer. One example of such software, it creates a window with Google Ads on top of browser window. The window is shown only when the browser is active to make it look like the ads is a part of the site. The ads appears only couple weeks after activation so that the user thinks it is a result of installation of some app and Youtube reviewers do not notice existence of malware. The adware consults a remote config which defines in what countries it should work. Another adware component automatically downloads and re-installs it if it is deleted.

I found all these details through examining the official firmware image and reverse engineering.

I don't remember if I reported Google Ads id to Google. It is interesting that Google doesn't notice and care about such use of their products.

codedokode··on Slovakia finds Russian backdoor in traffic speed cameras
There is a small number of cameras which broadcast the video publicly. For example, Moscow: [1] (Taganskaya square), [2] and Saint-Petersburg: [3] (Nevsky prospect and Gostiniy Dvor). Sadly the quality is not great and in reality those places look much better. For example, many of the small 2-floor buildings on Taganskaya square are over 100 years and have a nie classical architecture but one cannot see any fine details in the camera view.

[1] https://gidcam.ru/camera/moskva-panorama-centra-stolicy-s-ma...

[2] https://gidcam.ru/camera/moskva-volgogradskij-prospekt-i-plo...

[3] https://camguide.net/ru/europe/russia/saint-petersburg/nevsk...

codedokode··on Slovakia finds Russian backdoor in traffic speed cameras
With high probablity they are actually made in China. I don't think Russia makes their own chips for cameras.
codedokode··on Canada will match US tariffs 'dollar for dollar' as trade talks break down
ok.ru ("classmates") is a social network with web UI and an app, so you do not need to download anything. Also, foreign movies are shown in cinemas (unofficially) regardless of copyright owner opinion.
codedokode··on Canada will match US tariffs 'dollar for dollar' as trade talks break down
Europe just needs to have its own clearing center. Russia did this, and cards work internally without any trouble. As a nice bonus, transaction information does not go to US.
codedokode··on Canada will match US tariffs 'dollar for dollar' as trade talks break down
Please avoid using PPP. The fact that some country has cheap potato or consumer electricity rates doesn't mean a worker can buy more iphones or macbooks with their salary. Macbooks and iphones actually cost more than in the West in our country which is "4th world economy" in your rating.
codedokode··on Canada will match US tariffs 'dollar for dollar' as trade talks break down
Note that GDP does not directly translate into a number of tanks and missiles produced. I doubt Italy has more weapon than Russia.
codedokode··on Canada will match US tariffs 'dollar for dollar' as trade talks break down
As allegedly Stalin replied to a group of writers complaining that ordinary people do not understand culture, "I have no other people for you".
codedokode··on Felony charges for citizen deleting phone data at US Border
Yes Americans do not understand how lucky they are.
codedokode··on Watching TikTok and Instagram deactivates the cognitive control network: Study
It might be anti-bot feature, i.e. verifying that those likes are not from bots. YT delays views counter update for similar reasons.
codedokode··on Google has stopped pushing Git tags for some Android source code
You should be using open-source firmware without any "untrusted" zones.
codedokode··on Fairphone 6 and PostmarketOS working main camera
I suppose it would be relatively slow and how too little memory to be usable for programming, for example.
codedokode··on 'Buy now, pay later' lenders pitch loans for needs like electricity and rent
If you have to take a loan to buy food or medicine, you are already at the bottom. Because you need to repay the loan with an interest next month, and you will have even less money left.
codedokode··on Meta faces 'astronomical' consequences as legal fight reaches critical moment
But if Facebook made feed less addictive, would not it become more boring and hard-working Joe would not be able to have a rest after a working day?
codedokode··on Meta faces 'astronomical' consequences as legal fight reaches critical moment
To place an advertisement you probably need to identify yourself and use a card or bank account for payment. It would be extremely stupid to use illegal materials in advertising, but if it is true, why the suspect is not caught and instead Meta is sued? Did Meta do anything to make it easier to use such materials in advertisement?
codedokode··on Meta faces 'astronomical' consequences as legal fight reaches critical moment
I read about New Mexico decision and the court ordered to implement age verification. Addiction is just an excuse.
codedokode··on Meta faces 'astronomical' consequences as legal fight reaches critical moment
Nobody forces the user to use the app. And from the screenshots I see online, Meta's app, Threads is used mostly by adult people to post dating stories and jokes. Do not consider this dangerous. Instagram is also used mostly by adults. As for Facebook, I do not know who uses it.
← PreviousPage 3 of 34Next →