9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 4y ago · link · parent
Note that the linked document applies only to eCall In Vehicle System. Nothing prevent manufacturer to install a second system, using the same or separate modem, and track user's location and actions continuously. If the law requires you to install a GPS receiver and a modem, it would be uncapitalistic not to try to gain some profits from the data.
comment 4y ago · link · parent
What I dislike here most is that the explanation is probably a lie. If someone violated the rules then how providing a phone number can fix this? You are allowed to violate the rules if you leave a phone number?
I remember a similar case. I registered email at outlook.com and after I tried to log in from slightly different IP (because my ISP uses dynamic addresses) there was a message that there was a "suspicious" activity, someone might be trying to log into my account and I must provide and confirm a phone number to access my account. I don't understand though how this can help if someone indeed had stolen my password. They could just provide their number and get access to an account.
Also, Microsoft promised that they won't store my phone number. This is also strange. What's the point of asking for a phone number if you aren't going to store it? I think this also was a lie, and in fact they were storing something like a hash of a phone number and thought that this can be considered as "not storing a phone number".
So basically what I don't like is the deceiving language that they use instead of being frank: we want to know your identity. They behave just like those Indian scammers who persuade people to buy gift cards.
comment 4y ago · link · parent
Of course, browser should use its own font rendering library instead of using a system one.
Of course, for browsers that target a single platform (like Safari which is available only on MacOs) this is not an issue, but Chrome or Firefox might be used on many platforms, like Windows 8, Windows 10, Windows 11, Debian, Ubuntu, FreeBSD, Plan 9, Chrome OS and so on.
comment 4y ago · link · parent
Therefore I would prefer that every major browser (Safari, Chrome and Firefox) ships its own reasonably chosen set of fonts and doesn't access system fonts (however the user may grant access to system fonts if they are fine with fingerprinting).
This could also simplify web design because now there will be a somewhat standartized set of fonts.
comment 4y ago · link · parent
Also, if you start a function with a word 'const' then it is less obvious that this is a function and not just a constant. In contrast, if you use a word 'function', then you understand what it is from the first word.
comment 4y ago · link · parent
Its creators probably tried their best to write it, gave functions good names, left comments sometimes, but still it was bad. Running several subprocesses to split a string into parts. Parsing text output of subprocesses. Creating unnecessary temporary files.
This style of programming leads to extremely fragile systems. If the command slightly changes its output, scripts will break. If the command output depends on locale, scripts will break.
Futhermore, there is no sane options for error handling in shell scripts. There is only a relatively sane option - crash on any error and an insane option - ignore any erros and continue. For example, we failed to backup a file, but ignore this error and delete the original. No way one can write something reliable using such tools.
So if you want to write an init system, I think there are better languages that a shell script. It is difficult to build a graph of services and find an optimal sequence to start them using shell scripts. Or implement lazy startup of non-critical services.
Init system is not only a program to boot the system, but it should provide some runtime services, like management of background processes, logins and other things. Again, a properly written daemon with an API is better than a bunch of shell scripts.
Regarding languages, I am not sure if C is good for this purpose, it's pretty awful too. To illustrate this, consider a C function declaration:
int set_working_directory(char *new_directory, char **error);
You cannot figure out how to call this function properly without documentation or examining the code.
Instead of C I would choose something like Swift, D, Go (but it has pointers), maybe Rust (but writing in Rust for me is mostly struggling against borrow checker). I would choose something that's easy to read, test and verify and has a package manager.
So if you don't like systemd, consider writing your init system using one of the languages above. But please don't use shell scripts anymore.
comment 4y ago · link · parent
What I don't like though is when all those options are hidden behind two-stars keyword argument and it is difficult to understand what options are allowed, what they mean, what type they have and so on:
def example(**options): ...
comment 4y ago · link · parent
For example, compare these two functions:
function (a, b) { return a + b; }
function create_adder(a) { return function(b) { return a + b;}}
The purpose of first function is easier to understand. And if you rewrite last function according to modern trends, it can become even less readable:
const create_adder = (a) => (b) => a + b;
comment 4y ago · link · parent
comment 4y ago · link · parent
1) named arguments:
createFoo(barness: "bar", bazness: True)
2) struct with default values:
createFoo(FooConfig{barness = "bar"})
Go might not have these features, but I guess it is easier to add them than to invent weird "function returns function" tricks.
With functional options the code needs to be duplicated: first, you need to define a field in a struct and then a functional option that sets that field to a given value. With ideas above no duplication is necessary.