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

In my country you usually need to confirm payments with SMS OTP, except for trusted merchants (but they take the risk of fraud by opting out from confirmation). So simply stealing a bank card doesn't get you far. And pretending that you did not pay is also more difficult. Is US different? Do banks and clients trust each other in US and do not require OTP?

comment 6mo ago · link · parent

> Adult content purchases have another problem where purchasers often deny having made the purchase when their significant other finds it on the credit card statement. Shaggy's "It wasn't me" defense.

Ridiculous. People who consume adult content could at least behave like adults.

comment 6mo ago · link · parent

Well that is fair point, but cannot they just increase the commission to cover them? Also I think it is weird that when someone steals a bank card, they use it to buy adult games instead of buying an iPhone or MacBook and shipping it to the third world country.

comment 6mo ago · link · parent

Why payment processors do it? Why people in America do not want to earn more money from commissions? Strong church lobby? Legal risks? I think its mostly religious groups who who are against adult content and sex, or there are other groups?

Also this is why we should work to increase circulation of cryptocurrency. No stupid religious restrictions and stupid political sanctions.

Also why PornHub and OnlyFans are immune to religious lobby?

comment 6mo ago · link · parent

This seems to have similar or less features than bubblewrap, but requires Docker which loads huge images and wastes disk space. No Wayland, DBus, Pipewire, proc, sys filtering. Furthermore, Docker docs explicitly says that it cannot be used for security sandboxing. Also, Docker is a huge binary, run as root, with lot of APIs and wide attack surface.

comment 6mo ago · link · parent

I think that you can execute JIT code using an interpreter?

comment 6mo ago · link · parent

I was always curious, how do translators handle indirect jumps? When analyzing a binary we can discover only segments of code connected with direct jumps, where the destination address is known. So it means that whenever indirect jump happens, we need to find the target function, optionally translate it and jump back to translated code. Isn't it slow? Are there faster methods? Can we make translated function addresses match original functions? Or do we place jumps to translated code at original addresses?

comment 6mo ago · link · parent

I think this is not an application responsibility. Do you also check which Wayland extensions the system has, and install your own if some are missing?

comment 6mo ago · link · parent

Bubblewrap doesn't help with protecting DBus bus (and you can do a lot with unrestricted access to DBus), accessing the GPU, Wayland and audio daemon. It cannot protect /proc and /sys filesystems. So it works only for simplest CLI programs.

As I remember, some Node.js utility (maybe npm) had a bug where it hang if there were no /proc filesystem because it couldn't figure out how many CPUs are available. Telegram crashes because of Apple's Grand Central Dispatch library if run in a sandbox without /proc. That's how bad things are.

Also, Chrome and Electron apps use SUID binaries to build their own sandbox. How would you sandbox an Electron app (obviously running an untrusted SUID binary is not an option)?

comment 6mo ago · link · parent

All of this happens because Linux doesn't have sandboxing built-in, and sandboxes on Linux are extremely difficult to build (if you want to have graphics and GPU access, sound, file access from sandbox and prevent access to hardware identifiers and serial numbers). Linux has sandboxes like flatpak, but they are leaky (flatpak grants access to /proc and /sys) and buggy (software like Steam inside flatpak sandbox has multiple bugs).

It is bad that Linux users simply run whatever they downloaded from Github with full privileges, it is like an invitation for the hackers. And if you look at installation guides for commercial software, many of them suggest that you run curl + sudo or add a new repository source into a package manager, both of which are bad security practices. Except for flatpacks, Linux has no friendly and secure methods to install commercial software. Despite the fact that users buy computers to run software and not to merely stare at desktop background.

Compare this to Android where you can run malware and it cannot do anything except for annoying you with notifications.

comment 6mo ago · link · parent

The idea that every application should ship their own glyphs because some proprietary systems do not have normal fonts, is not great. Fix the terminal instead.

Also, if you want advanced GUI with icons, maybe you should just write a GUI app.

As for shipping custom icons, this is not very bright idea as well. If you switch between several applications on one terminal, then one application can redefine glyphs from another application. Also, when the application terminates, nobody cleans up its glyphs. Also, this increases attack surface because font standards are pretty complicated and one will be able to attack the system by just providing a glyph. We already have programs that can break the terminal, which should never happen.

Also, as for icons, I find emoji characters too distracting (and too large). They stand out too much and take away user's attention, breaking any visual hierarchy. The icons in terminal should be monochrome, and with thin lines, so that they do not distract you from the text and its structure.

comment 6mo ago · link · parent

The code mentions "autocorrelation" method: this is a method where you multiply the signal with delayed version of itself: result = sum(x[i] * x[i - delay] for i in some range). You vary the "delay" and pick the value that maximizes the result. This is based on the idea, that the sequential periods of the signal should be similar to each other.

Not a very good method, prone to octave errors (showing pitch one octave lower than the correct one). Furthermore, the "delay" is an integer which limits the precision, so you need to use some form of interpolation. Also it doesn't allow to recognize multiple notes sounding together. Also, slow.

You can read the paper on the "YIN" pitch estimation algorithm which describes the method in details.

I think FFT-based methods are more reliable. I did little experimentation and when measuring a pure sine wave, the frequency can be determined with high precision (tenths-hundredths of a Herz). Not so good in presence of a noise or multiple instruments - I tried to use descending from the hill optimization to figure out the pitch of each harmonic, but it didn't work out.

comment 6mo ago · link · parent

Interesting, the map author marked Crimea as part of Russia, but for some reason doesn't mark 4 other Ukranian regions as Russian. Cannot choose the right side?

comment 6mo ago · link · parent

It's interesting that sanctioned Russian banks still find the ways to push their apps into Apple repository by disguising them as a different app. They get removed several months later, but I assume it is done only because someone complains.

comment 6mo ago · link · parent

I meant "corporations do not trust users who register from a web browser and not from a mobile app". Without a mobile app (which allows to collect more hardware identifiers and spam you with notifications) you are not welcome.

comment 6mo ago · link · parent

The price is about $2-3 so you are not risking much, there are reviews and ratings. Of course there are scam sites, but once you buy several accounts you quickly figure out which ones are scam and which are not.

Re: stolen accounts, you can examine account details, history and activity after purchase, check for emails from social networks and return stolen account to the owner. The posting usually also mentions registration period (new accounts are unlikely to be stolen). But it seems that registering new accounts is cheaper than stealing - old accounts are much more expensive.

I didn't use the account for any illegal activity, there are just sites that use Google Account as a "verification" that you are not a bot, and to issue bans. And I am not interested in jumping through the hoops of searching a locked smartphone with Google Services and filing a visa application to register the account. I strongly dislike proprietary software and locked smartphones.

comment 6mo ago · link · parent

That's what Russian underground hackers do to create so called "anti-detect" browsers, which can emulate different browser fingerprints. But they are commercial and closed-source.

comment 6mo ago · link · parent

No. You seem to not understand how government works. It will never be anonymized so it's an awful idea, you basically suggest to link accounts to a passport.

comment 6mo ago · link · parent

Because the site can compare the user agent with navigator.platform, which your browser fills with great care.

comment 6mo ago · link · parent

To be fair, there are already apps that require a mobile phone to sign up, for example, VK, Telegram. And I think Google requires to scan a QR code to register account, so it is easier just to buy a Google account on a black market if you need it for some purpose.

Nobody trusts web browsers nowadays.

comment 6mo ago · link · parent

Interesting, the text says "reCAPTCHA doesn't share your details with this site", but it says nothing about sharing your details with Google. Which means yes?

comment 6mo ago · link · parent

In Russia they tried to use bluetooth after being sanctioned from using NFC.

comment 6mo ago · link · parent

Wow. So you will need a mobile device in future to browse the web, and Google will use mobile device identifier to de-anonymize you. And I assume they also carefully designed this to make life little harder for alternative search engines, their competitors. And probably they will not provide collected user data to competing advertising platforms to make them less competitive as well.

Also the example is ridiculous, that you need to scan a QR code to place an order. Maybe they should require filing a visa application as well.

comment 6mo ago · link · parent

You don't even need to be a violinist to hear that.

comment 6mo ago · link · parent

I never held a violin, but the demo sounds like some keyboard instrument, as if there were a hammer striking a metal bar or something like this. (I even checked the sound of violin on Youtube to be sure).

comment 6mo ago · link · parent

Then it won't be unblocked.

comment 6mo ago · link · parent

"Must heve"?
1
222324
185