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

Then thieves will also be able to bypass the protection.

comment 1y ago · link · parent

A worse lie is memory usage reporting, I think in every major OS it is understated and misreported. In case with Linux, I wanted to know who is using memory, and tried to add PSS values for every process, I never got back the total memory usage. In case with Windows/Mac I judge by screenshot of their tools which show unrealistically small values.

As for the article, the slowdown can be also caused by increased use of shared resources like caches, TLBs, branch predictors.

comment 1y ago · link · parent

I read about this multiple times, including authors of the channels complaining that their channel became not accessible in iOS version of Telegram. Sorry I don't have official link - Telegram seems not to tell about it on their site, as well as Apple - but if you google, you will find users sharing workarounds like [1] [2].

Also, (according to Durov, who is not very reliable source) Apple forced Telegram to remove animated eggplant and peach emojis [3].

Also, while little unrelated, Apple complied when it was requested to remove VPN apps from app store for Russian users, and if I remember correctly it complied with similar censorship requests from Chinese government.

[1] https://techspace.africa/how-to-enable-sensitive-content-on-...

[2] https://www.reddit.com/r/Telegram/comments/ejdjyg/unblock_te...

[3] https://www.reddit.com/r/Telegram/comments/r3ijtf/apple_comp...

comment 1y ago · link · parent

> Most Unix syscalls use C-style strings, which are a string of 8-bit bytes terminated with a zero byte. With many (most?) character encodings you can continue to present string data to syscalls in the same way, since they often also reserved a byte value of zero for the same purpose

That's completely wrong. If a syscall (or a function) expects text in encoding A, you should not be sending it in encoding B because it would be interpreted incorrectly, or even worse, this would become a vulnerability.

For every function, encoding must be specified as are specified the types of arguments, constraints and ownership rules. Sadly many open source libraries do not do it. How are you supposed to call a function when you don't know the expected encoding?

Also, it is better to send a pointer and a length of the string rather than potentially infinitely search for a zero byte.

> and the result is that if you want UTF-16 support in your existing C-string-based syscalls

There is no need to support multiple encodings, it only makes things complicated. The simplest solution would be to use UTF-8 for all kernel facilities as a standard.

For example, it would be better if open() syscall required valid UTF-8 string for a file name. This would leave no possibility for displaying file names as question marks.

comment 1y ago · link · parent

> Nuclear supports Youtube, Soundcloud, Bandcamp

I am not sure that Youtube supports Nuclear though...

comment 1y ago · link · parent

It makes sense because UTF-16 is a sequence of uint16_t values, so both bytes must be zero, not just one.

comment 1y ago · link · parent

I wanted to add a correction, I think that the user should be able to give up this right if it helps prevent theft for example. Today, if forums can be trusted, many Android phones protected with Google Account (FRP - Factory Reset Protection) can be unlocked in different ways, sometimes as easy as opening a keyboard (or invoking a voice input), going to settings and disabling the protection, or deleting a partition with FRP data. And for other phones there are no publicly available information, but there is software that you can rent. So (if the information on the forums is true) it seems that Google's anti-theft protection was made just for a bullet point in marketing materials and not for really preventing theft.

comment 1y ago · link · parent

Website from desktop + SMS code is used as a second factor for login and for confirmation of operations. So the attacker would need to hack a desktop to read information and both devices to actually steal money. Or they would need a phone and a card number to login without password.

I am surprised why so many people use banking apps on phones. The apps often use SMS or even push notification (because it's cheaper) for confirmation and once you got access to the phone you can do whatever you want. Also banking apps tend to spam users with distracting notifications, and they often require extended rights, for example to scan other apps, to access contact list etc. For example, one of Russian banking apps includes an antivirus.

> What about in-person banking?

Rarely. Last time I went in-person, I found that the bank switched to a model (don't remember how it's called) where the office looks like a cafe with tables and employees come between them with laptops and there was really long waiting time so I got an impression that they don't want people to come in-person. Although I had some fun overhearing an angry customer complaining that his card was blocked for receiving transfers and immediately withdrawing large sums of money. He wasn't able to explain the source of the money or provide any documents but got a promise that his card would be unblocked.

Luckily there are still banks with traditional offices.

comment 1y ago · link · parent

Any app with adult content (even text content) is not allowed. So a significant part of culture is banned from app store and iphones.

comment 1y ago · link · parent

There are countries where people would sit all day desoldering phones if they were paid $2 for each. Also even in my country minimum wage is less than $2/hr (although that is rare).

comment 1y ago · link · parent

Telegram version from app store doesn't allow to view adult channels (not only porn - you can find that elsewhere - but adult bloggers etc).

comment 1y ago · link · parent

You must be working at an AI company.

comment 1y ago · link · parent

I don't understand, you like paying $1000 and not being able to install apps?

comment 1y ago · link · parent

They may say that if they publish the code, other countries will copy it for free.

comment 1y ago · link · parent

I also meant microcontrollers. I am sure someone would remove chips from old devices and resell if they were reprogrammable. Also you could use them for your hobby for free.

comment 1y ago · link · parent

I never install banking apps (not secure - no second factor, spyware risks) so I don't think it is important to have them. What is important is a phone that no other party can remotely control.

comment 1y ago · link · parent

You couldn't - many phones do not support installing third-party OS and do not have public specifications. So your options are either become a product or do not have a phone.

comment 1y ago · link · parent

Maybe it's time for the legal requirement that every computing device or microchip more powerful than 1 MIPS and having writable storage, must support reprogramming, to prevent creating digital waste.

comment 1y ago · link · parent

Linux phones are an experimental devices for enthusiasts where lot of things are not going to work, so it would be less risk to buy a cheaper phone for experimenting. Doesn't make sense to pay iPhone's price for a phone that barely works.

comment 1y ago · link · parent

I wonder what is the case when you cannot optimize away memcpy, but can work around it with an "owning reference"?

comment 1y ago · link · parent

The drop that you mention doesn't free memory, as I understand, it is called before actually destroying object's memory.

comment 1y ago · link · parent

Interesting, it's almost like immutable data structures.

comment 1y ago · link · parent

> Borrowing happens for the duration of a function call

I don't understand this part. Cannot a function store a borrowed reference into a structure that outlives the function?

comment 1y ago · link · parent

Yes but CHERI is supposed to work for every application, not only Rust, but your favourite game from Windows 95 era as well.

comment 1y ago · link · parent

> Mozilla’s foray into phones failed because they insisted on sticking to entry level devices which were both not interesting to most of the market and not powerful enough to handle a new unoptimized OS.

I think that was not a bad idea. Other open source OSes target expensive devices like Pixel and as a result many people are not buying them because paying a premium for a non-standard phone with buggy software and lacking features doesn't make much sense.

comment 1y ago · link · parent

GTK uses a C emulation of OOP, and the code gets very verbose (and functions have names like "gtk_event_controller_get_current_event_device", so you cannotfit more than one call in a line). I do not recommend to use GTK (or anything from Glib) with C, use bindings for a better language, and you save 2x-3x in code size.

comment 1y ago · link · parent

I always read here that China gives subsidies to everyone, they must be rich to afford it.

comment 1y ago · link · parent

> Why aren’t ipads with keyboard cases able to be used exactly like laptops

Small screen - cannot fit many controls or code. Small keys - cannot type fast. No touchpad - cannot do precise clicks, therefore cannot have many controls on the screen. Try imagining something like editing lots of small notes in a music editor with your fingers...

comment 1y ago · link · parent

Were they? I think that for work or hobbies laptop is better, has better screen and keyboard and they are not that expensive now. And for watching short videos you can just use a phone.

comment 1y ago · link · parent

But it is expensive, because it does run-time checks? Or they are optimized out?
1
394041
185