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

I wish they added some simple form of generics so that one could, for example, create types like "list of files", "list of processes" without duplicating the code.

Also, something for RAII, so that one could automatically deallocate allocated memory.

comment 1mo ago · link · parent

I think it didn't work out well, because "int" being different size makes programming difficult. For example, a system must manage up to 100 000 records. Can I use int for record number? What if it is 16 bits? What if I need to send data between machines, how can I use "int" if it can be different size?

Probably someone noticed that it is inconvenient, and on 64-bit machine ints are still 32-bit and not 64.

The computers with 16-bit ints or 9-bit bytes are long gone, but the language still has to carry that legacy.

comment 1mo ago · link · parent

Better not to say, I think.

comment 1mo ago · link · parent

I am not from US and with that money I could rent a tiny apartment for 2-3 days. However, I prefer cheaper accomodation. $80 is super expensive if you have no other place to live.

comment 1mo ago · link · parent

So $80 is considered a "cheap room"? How is a person supposed to earn $80 a day to pay for it and have something left?

Also, cells can have scales? Amazing.

comment 1mo ago · link · parent

And also you can masquerade political ads as ads for a newspaper article, for example: "Governor A opens a new school" or "Party A declares amazing plans for next 5 years" (actually done here by ruling party, to work around election ad laws and limitations).

comment 1mo ago · link · parent

It is weird how they use the letter Я ("ya") as a "Russian" version of R. The Russian (actually Cyrillic) version of R is "P". So I read the name with flipped "R" as "Tetyais" and it makes no sense.

Also I wonder how Vadim Gerasimov managed to obtain an IBM PC-compatible computer: where he got the money and what store would be selling that. This shows how unequal and unfair the society became when reforms began at the late USSR. In earlier USSR, everybody would equally and fairly have no computer.

comment 1mo ago · link · parent

What I do not like about Android is how difficult it is to unlock the bootloader without ever connecting the device to Internet. Any device with flash memory should be re-programmable and it should be illegal to prevent user from doing this or adding measures (like locking components to CPU via cryptography or adding anti-reverse engineering measures) that make it difficult.

comment 2mo ago · link · parent

Antivirus is not a bad thing. Imagine running a company where there are 100 employees that click every link and open every attachment. Definitely safer with an antivirus.

comment 2mo ago · link · parent

No, it is unfit for this purpose. The reason is:

- you need to specify the rules before starting an application. How one is supposed to guess what application will do? Figuring out the correct rules may take lot of time and is impossible for non-programmers. Imagine I want to install 10 apps per day and they should work perfectly, how much time will I be spending writing rules?

- the rules cannot be changed in runtime, for example, giving access to a camera for 1 minute

- the rules are too limited. You can restrict access to a file, but can you restrict access to a DBUS bus? Can you restrict access to audio, video, GPU etc? To /proc filesystem? To a DNS domain? The rules feel like they were written for computers with teletypes from 70s and not for modern machines.

- they do not allow providing fake data, for example, a fake list of WiFi points so that the app thinks it has the access to your geolocation while in reality is doesn't.

So it is some outdated technology unfit for modern day.

What does a user want? The user wants to be able to run anything without any risk and without writing any config files. Obviously it takes a skill to write such OS, and there is definitely a lack of people with this skill among Linux distribution creators.

A system where installation is done using "curl + sudo bash" is the opposite of a safe OS.

comment 2mo ago · link · parent

Didn't Meta make the glasses in question?

comment 2mo ago · link · parent

> I can't wait for smart glasses with facial recognition and a name tag that hovers over everyone.

What stops you from using a notepad? I do not want my face uploaded to Facebook.

comment 2mo ago · link · parent

They made the glasses for filming people without permission?

comment 2mo ago · link · parent

A person is being treated disrespectfully and your point is that they should do nothing with it. Filming without permission is no different than harassing or bullying. A weak person would bear with it, a strong one would punch in the face.

comment 2mo ago · link · parent

There is not only law but respect and politeness. If you disrespect other people do not expect being treated respectfully.

comment 2mo ago · link · parent

That would be the right thing. You want to film something, you don't use people passing by as a free extra and don't publish the details where and with whom they were going online. Is is just some American thing that they do not care about feelings of other people.

If you have any respect, don't film other people or at least blur them.

comment 2mo ago · link · parent

Yes but isn't that what those glasses were made for by those Meta employees?

comment 2mo ago · link · parent

Interesting, the government can demand creating a backdoor and doesn't let anyone tell about it. Basically, outlawing E2EE.

comment 2mo ago · link · parent

> I mostly want to note that swap files can complicate hibernate.

Only in Linux - Windows has no problem with swap in a file. Swap partition is an awful idea because you cannot easily resize it.

Zram is also a bad idea, when it is filled, the system starts swapping to a disk, and old pages nobody needs are kept in RAM forever. Zswap is better in this aspect - old pages are pushed to the disk and newer ones kept in memory. But Linux distributions use zram by default.

Also, it seems that many distributions now place /tmp in RAM (tmpfs). Whoever made such decision is not very bright. When you place a large file in /tmp (for example, viewing a large compressed archive which is automatically unpacked into a temporary location), it fills the memory and the systems locks up completely, including mouse and GUI - because bright people developing Linux cannot think of reserving resources for desktop environment to prevent exactly this situation. Why reserve memory for GUI? Obviously files placed into /tmp are more important. Who needs GUI nowadays when you can easily connect over SSH from another machine and kill the misbehaving program.

If you are making a Linux distribution, do not place /tmp into memory. Or at least check how much RAM user has, and add a limit on tmpfs after which files are pushed onto the disk. Also, do reserve memory for window manager with high priority.

comment 2mo ago · link · parent

> We are likely to see LLMs integrated into every part of computing as infrastructure, not just as a product, in the next year or two.

Of course, for collecting better telemetry using local AI for analyzing video from camera and audio from a microphone.

comment 2mo ago · link · parent

The problem with those free OS is that they usually work on top models which cost like 4 ordinary smartphones. It is experimental software that doesn't work perfectly, and it makes no sense to pay that much for it. So with high prices they are push away potential users.

Also, I would like no DRM, no serial id, no support for device verification, no trusted environments, re-programmable IMEI, no locked bootloaders, no proprietary code and no telemetry in any form or shape.

comment 2mo ago · link · parent

For another comparison, Moscow Central Diameters system (electric trains traveling from Moscow to nearby small towns) has 4 lines, 137 stations, 188 miles total length. It uses united fare payment system with buses and subway and transfer from a train to the subway is free of charge. Fare is about $1-$3 depending on the route. To be fair, it goes through Moscow at a slow speed and takes an eternity to get anywhere, and its range is limited [1].

Moscow subway [2] has 17 lines and 309 stations. In newer cars, 2 USB-A sockets are available near every seat, ready for robots.

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

[2] https://en.wikipedia.org/wiki/Moscow_Metro

comment 2mo ago · link · parent

There are other LLMs including open-weight ones. They cannot put your ID into the image.

comment 2mo ago · link · parent

Yes if you search anything in Google, you typically get sites that have a cookie panel, ask to allow notifications, show "Login With Google" popover taking the keyboard focus, and lot of ads before you can even read the content. No wonder people do not want to use Google anymore.

comment 2mo ago · link · parent

What about asking LLM to re-draw the image from scratch? Or pass through AI editor?

comment 2mo ago · link · parent

How can you prove that the photo is taken by real person and not brought by men in black suits and signed by Apple?
1
789
185