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 2w ago · link · parent

I ran PhotoCraft in a VM and it runs like a game at 3 fps. Very laggy.

comment 2w ago · link · parent

They are slow and inefficient especially in a VM where there is no GPU. It doesn't make sense to redraw all screen if only one button has changed.

comment 2w ago · link · parent

To be fair, it doesn't take a genius to understand that killing Jews for being Jews is not ok. It is even written in the Bible which is 2000 years old.

Also, regarding slavery: Americans understood that it was not ok. This is why they replaced the word "slaves" with "other persons" when writing a Constitution:

> Representatives and direct Taxes shall be apportioned among the several States which may be included within this Union, according to their respective Numbers, which shall be determined by adding to the whole Number of free Persons, including those bound to Service for a Term of Years, and excluding Indians not taxed, three fifths of all other Persons.

> What makes people increasingly vote for racist parties since covid?

You should not assume that majority of people are good people (if they were good, they would not support slavery and fight for it in the Civil War).

comment 2w ago · link · parent

Interesting idea, but look too complicated for me. What if there are 1000 places where an element can be dropped? What if we select and drag several elements at a time?

Also this approach seems to introduce new complicated concepts like "composables" and even a DSL. Probably writing custom code for Drag-and-drop would be easier that figuring out how this works. I read the page and did not understand much. For example, this phrase is difficult to understand: "Rather than programming all that visual behavior directly, you simply say, for each element you want to make draggable, which future states of your application dragging it should lead to.". Not "simply" at all. Writing new code would be easier especially with LLM.

comment 2w ago · link · parent

How long can a phone run on a battery when playing games? A day? Or an hour? Clearly shows how "efficient" GPU is.

comment 2w ago · link · parent

Moving the mouse is an interaction because there are hover effects.

comment 2w ago · link · parent

It is a potentially unsafe app from some random person that can backdoor your computer so it doesn't make sense to run it without a VM.

comment 2w ago · link · parent

I disagree. First, not every GPU supports Vulkan and other modern standards, and not every GPU even supports executing code. Drivers are often buggy/unsupported. Even if there is a GPU, compiling shaders takes time and CPU must be used in the meantime.

Finally, for app to have access to GPU, it must run on a host unrestricted. Why would you take somebody's code from Internet and run it unrestricted, violating the principle of minimal pivileges? That does not sound smart, especially if you have a crypto wallet on the same computer. Those who do not use VM or sandboxes will sooner or later learn this.

> Did you measure anything in a real setup?

VM is a real setup. Why would I run third-party apps without a sandbox?

Also, today we have an advanced AI that is capable of solving science problems. Should not be difficult to build a GUI that works fast without graphic acceleration, right?

Finally: the modern DDR4 DRAM has approximately 40-50 Gb/s bandwidth. Updating 4K screen at 120 Hz requires 3840 × 2160 × 4 (actually should be 3) × 120 ≈ 4 Gb/s. No problem at all.

comment 2w ago · link · parent

What about namespaces, if a user creates a user namespace and becomes root inside it?

comment 2w ago · link · parent

And are those legacy filesystems disabled by default and require root to invoke the code?

comment 2w ago · link · parent

And obviously all computers have infinite capacity batteries to maintain game-level power consumption.

comment 2w ago · link · parent

Also, I looked at how dates are written in a screenshot and thought that "2 days ago" would be so much better than "Tuesday". Because you do not have to compute in your head how many days ago Tuesday was.

comment 2w ago · link · parent

To use memoization you must use immutable structures (otherwise React is unable to detect changes) which are a pain to use and are slow if not designed properly. Do not believe me, try designing for example an algorithm that accepts a huge immutable sorted list with keys, a large sorted list of bulk deletes/inserts and produces a new sorted list with minimum operations. I made 2 or 3 prototypes and they still are not good and not even working properly.

In my book, a good UI framework simply attaches to a mutable model made of arbitrary objects, detect changes and displays it with minimum number of operations. Doesn't require to use any proxies or immutable data or store data in components. Shouldn't be difficult. Why nobody made it, I do not understand.

comment 2w ago · link · parent

Egui is pretty bad idea. It uses "immediate mode" rendering which means whole window is redrawn on every mouse move. I ran PhotoCraft (built in Rust + egui) in a VM wihout a GPU and the UI felt like it was running on 3 fps. If you use egui, try running it without a GPU before releasing.

Egui is definitely not what you want to use on a 4K screen. It is only good for tiny screens of embedded devices.

Why there is no reactive UI that tracks all dependencies and redraws only what needs to be redrawn? (not React, it also re-calculates (but not redraws) everything on every change).

Also why does it visually look like bad version of Telegram? And Telegram can run without a phone present.

comment 2w ago · link · parent

Why famous scientists supported Nazi regime? Aren't scientists supposed to be smart?

comment 2w ago · link · parent

LLMs will introduce new vulnerabilities. What Linux should have done is stop using non-standard C, or better, stop using C completely in favor of Rust, support code analysers.

comment 2w ago · link · parent

So why those people using AI do not write the code from scratch without breaking the license and without vibe-copying existing code?

comment 2w ago · link · parent

For me the ugliest part of Electron is that it uses client-server model inside a program and includes both a browser and Node.JS. This is so stupid. If you love microservices so much why don't you put every React component in a separate process?

Also, browsers contain too much bloat, why do you need support for elements like "hr" or attributes like "cellpadding" in a modern app? Throw away all legacy garbage.

Also, immediate mode UIs (like Rust's egui) are even worse garbage than a browser. "Immediate mode" means that on every mouse move a function is run that re-draws whole window from scratch. I tried running PhotoCraft (uses egui) in a VM with no GPU and it felt like playing a game at 3 fps. The CPU is simply unable to redraw whole GUI with acceptable speed. It will be especially bad on 4K and 8K screens.

comment 2w ago · link · parent

Is it real estate developer's problem? He builds the building, sells out the apartments and leaves. Where the buyer will put their kids is the buyer's problem.

comment 2w ago · link · parent

Are $12K worth of token guaranteed or the company may adjust token generation speeds?

comment 2w ago · link · parent

Because without planning there would be only houses and no daycare. Apartment complexes are the most profitable type of building (everybody needs an apartment to live), at least in my country, and daycares and schools are other infrastructure are not profitable and not worth investing if investor had a choice. They are a burden. So they make investor have no choice and carry a burden.

comment 2w ago · link · parent

Browsers are too complicated and this is bad, for example, for creating more competition. And the reason they are complicated is there is too many web standards and too much legacy to support.

comment 2w ago · link · parent

At that time it was run server-side and not in the browser though.

comment 2w ago · link · parent

There are too many web standards that do not need to be built-in. Many of them can be implemented using JS or WASM library, and this would also reduce fingerprinting possibilities.

For example: base64 API, audio nodes API, canvas API, encryption etc.

And XSLT can be implemented this way as well.

12345
185