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

I remember, when DVD players were required to show mandatory, non-skippable sections of video, chinese players violated the standards and international agreements and allowed skipping those sections, and they also sometimes illegally ignored regional restrictions.

comment 1y ago · link · parent

Before buying a smartphone I tried to find an inexpensive model that supports open source OS, but I couldn't. What open OS support is ether expensive Pixels, or outdated models.

The solution, I think, would be a regulation that forbids manufacturers of any chip or device CPU from making obstacles to reprogramming the device (using fuses, digital signatures, encryption etc). So if you buy a device with CPU and writable memory, you should be able to load your own program and manufacturer may not use technical measures to stop you. The goal of regulation would be preventing of creating digital waste, vendor locks and allow reusing the hardware.

Of course, features like theft prevention won't work, so the user should be able to waive this right.

comment 1y ago · link · parent

These exorbital numbers are due to government and voters not willing to regulate the industry and rely on free market instead, correct?

comment 1y ago · link · parent

I usually use ChatGPT for such microbenchmarks (of course I design it myself and use LLM only as dumb code generator, so I don't need to remember how to measure time with nanosecond precision. I still have to add workarounds to prevent compiler over-optimizing the code). It's amazing, that when you get curious (for example, what is the fastest way to find an int in a small sorted array: using linear, binary search or branchless full scan?) you can get the answer in a couple minutes instead of spending 20-30 minutes writing the code manually.

By the way, the fastest way was branchless linear scan up to 32-64 elements, as far as I remember.

comment 1y ago · link · parent

I think LLM should not be used for discussing psychological matters, or doing counseling, or giving legal or medical advices. A responsible AI would detect such topics and redirect user to someone competent in these matters.

comment 1y ago · link · parent

Performance not great compared to nginx.

comment 1y ago · link · parent

> One misconfigured .htaccess

First, I hope nobody is using Apache anymore, second, you typically store files outside of web directory.

comment 1y ago · link · parent

Storing the data in a foreign cloud would allow foreign nation to play funny tricks on the country. What they need is not the cloud but sane backup system.

comment 1y ago · link · parent

It's probably going to be dog slow. I dealt with HDDs where just iterating through all files and directories takes hours, and network storage is going to be even slower at this scale.

comment 1y ago · link · parent

What I notice, that large companies use their own private cloud and datacenters. At their scale, it is cheaper to have their own storage. As a side business, they also sell cloud services themselves. And small companies probably don't have that much data to justify paying for a cloud instead of buying several SSDs/HDDs or creating SMB share on their Windows server.

comment 1y ago · link · parent

Especially if you have access to LLMs.

comment 1y ago · link · parent

With s3, you cannot use ls, grep and other tools.

> Save where? With what redundancy? With what access policies? With what backup strategy? With what network topology? With what storage equipment and file system and HVAC system and...

Wow that's a lot to learn before using s3... I wonder how much it costs in salaries.

> With what network topology?

You don't need to care about this when using SSDs/HDDs.

> With what access policies?

Whichever is defined in your code, no restrictions unlike in S3. No need to study complicated AWS documentation and navigate through multiple consoles (this also costs you salaries by the way). No risk of leaking files due to misconfigured cloud services.

> With what backup strategy?

Automatically backed up with rest of your server data, no need to spend time on this.

comment 1y ago · link · parent

Let me play a devil's advocate. Are you (and Orwell) unhappy that people breaking the law get punished? Even if you merely cross the road in the wrong place, you deserve a punishment to the maximum extent specified by the law, don't you? It doesn't matter if you break the law in the darkness or not.

comment 1y ago · link · parent

And I am curious how many engineer years it requires to port code to cloud services and deal with multiple issues you cannot even debug due to not having root privileges in the cloud.

Without cloud, saving a file is as simple as "with open(...) as f: f.write(data)" + adding a record to DB. And no weird network issues to debug.

comment 1y ago · link · parent

Try playing audio or displaying image on the screen using only documented syscalls. And make it work on all platforms you mentioned.

comment 1y ago · link · parent

I think using syscalls directly is a worse idea than loading shared libraries, and new kernel features, like ALSA (audio playback), DRM (graphics rendering) and other use libraries instead of documenting syscalls and ioctls. This is better because it allows intercepting and subverting the calls, adding support for features even if the kernel doesn't support it, makes it easier to port code to other OSes, support different architectures (32-bit code on 64-bit kernel), and allows changing kernel interface without breaking anything. So Windows-style approach with system libraries is better in every aspect.

comment 1y ago · link · parent

> Glibc broke certain games / Steam by removing some parts of their ELF implementation: https://sourceware.org/bugzilla/show_bug.cgi?id=32653 . They backed due to huge backlash from the community.

It would be better if you specified which part was removed: support for executable code on stack. This is used in 99% cases by malware so it is better to break 1% of broken programs and have other 99% run safer.

comment 1y ago · link · parent

Why do you need "vendor-specific userspace drivers"? I thought graphic acceleration uses OpenGL/Vulkan, and non-accelerated graphics uses DRM? And there are no "drivers" for Wayland compositors?

comment 1y ago · link · parent

Other solution would be to restrict international calls though.

comment 1y ago · link · parent

Instead of requiring a phone number, accept a small amount ($1-2) in cryptocurrency. You can charge extra if the user sends too many DMs or gives too many likes. Perfect solution against spammers.

However, personal information costs much more than $2, so the companies will continue to demand a phone number. Mobile OS developers even developed a format for automatically transferring SMS OTP to a website to help scammy companies.

comment 1y ago · link · parent

If you give your real email, almost every service starts spamming you - they think that annoying people is a "growth hack". Use temporary email whenever possible.

comment 1y ago · link · parent

I remember reading one of Peter the Great's orders regarding creating 10 new units in the army. Out of names of the commanders only 3-4 were Russian. So hiring foreign talent was also part of westernization.

comment 1y ago · link · parent

The reason why SIM boxes exist, is because in many countries you cannot buy a SIM card anonymously, and because every site now wants your phone number.

comment 1y ago · link · parent

It is also interesting that Russian army officers could talk to French without a translator, because Napoleon invasion happened in the period of "westernization", started by Peter the Great. The buildings were built in a Western style, calendar was changed to European, government, army and fleet were reformed, noblemen were required to shave their traditional beards, wear western-style clothes, used French language, and danced to classical Western music in events like balls and fought duels.

comment 1y ago · link · parent

As I remember, after French revolution, there were coalitions of foreign monarchies with the goal of punishing France [1].

Also what surprises me, after years of several revolutions and chaos in France, how could Napoleon gather such a large army.

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

1
323334
185