4,687 karma · joined Dec 4, 2021 (4y ago) · 1,693 submissions
comment 4y ago · link · parent
How? It just costs money now.
Entities that want to spam and fake reviews, usually have money.
In fact, the more money someone is willing to throw at it, the more reviews they get to post. In fact, with enough resources, genuine reviews (which I would be reluctant to give as a user, as they cost additional money) can be comlpetely drowned out in this scenario.
comment 4y ago · link · parent
Sweeping changes with hundreds of LOC across multiple components, with a one-liner commit message that tells me absolutely zero about what was changed, why it was changed, and what issue it was about.
comment 4y ago · link · parent
The language absolutely is a generalpurpose language, and making great GUI libs with it is certainly possible, as shown by Fyne (yes, I know it's still new, give it time).
That being said, most people using Go build server side code and frameworks with it, aka. things that live as daemons in some rack or in a docker swarm. If there is an front-end to these kinds of applications, it's usually web based.
comment 4y ago · link · parent
Difference 2: If something happens to these keys, the CA can simply revoke the validity of the public key. This is a major pain in the _ for everyone involved, especially since all downstream certs needs to be re-issued and signed, but it's manageable. A built-in key that is somehow algorithmically included in every encryption mechanism, cannot easily be changed when it's leaked.
Difference 3: There is no single "highest Certificate Authority", so there is no single key to compromise the whole system.
Difference 4: These keys are ordinary asymmetric keys. They are not built-in backdoors into the system.
comment 4y ago · link · parent
Because it's too risky, simple as that.
Let's say there is a single, super-secret-key, for government use only, that can decrypt any encrypted message on the planet.
What happens if this key is leaked? What if it's found out? What if the implementation of that key turns out to be buggy and is cracked? Remember, once there is such a key, it won't just be some criminals in godknowswherecountry trying to get it, it will be state-level actors with unlimited funds, resources and manpower.
If a single one of them gets their hands on this key, even ONCE, it's game over. Our modern society relies on encryption. If this key gets out, the results could be catastrophic; eg. Airplane navigational data manipulated in flight, stock market data manipulated in transit, financial transfers wide open for everyone to read and manipulate at will, control data for electrical grids, hydroelectric dams, nuclear power plants out in the open...it would be anarchy.
comment 4y ago · link · parent
All payment processing (ATMs, credit cards, online shops) generate encrypted traffic. Sending legal documents, technical data, company internals, contracts, etc. generated encrypted traffic. Sending sensible personal information like medical, indurance or financial records generates encrypted traffic.
Most of these cannot be sent unencrypted, without breaking fundamental processes in our society.
And there simply is no reliable way to differentiate between encryption used for legal or illegal reasons.
comment 4y ago · link · parent
And how shall "goverment sanctioned encryption" be distinguished from "non sanctioned encryption"? The point of (good) encryption is to make the result look like stochastically random bytes.
comment 4y ago · link · parent
https://en.wikipedia.org/wiki/List_of_countries_by_firearm-r...
It works when implemented country-wide. Countries like Germany have much stricter gun laws, and as a result lower gun violence.
Obviously, the method doesn't work, when someone who wants a gun can just drive a couple hours and get one at some gun show without even leaving the country.
comment 4y ago · link · parent
Criminals, by definition, don't follow the law.
Now, in some cases, that isn't a problem: Guns are an obvious example, because they take resources and knowledge to manufacture, and are physical objects that can be tracked. Taking these away by law works.
But encryption isn't a physical object or something that needs to be manufactured. It's math and algorithms. It can be copied infinitely. So, if the law takes that away, law abiding people will no longer have access to the benefits, while criminals will just ... well, as criminals by definition do, ignore the law, and still use encryption.
comment 4y ago · link · parent
https://askubuntu.com/questions/172982/what-is-the-differenc...
comment 4y ago · link · parent
I said if a software doesn't have a spec, the code IS the spec.
If I hand out a sheet of paper saying "the program returns X", but running it returns Y instead, the program is buggy.
If I hand out a piece of code which says "return X", and someone runs it expecting it to return Y, thats not the codes problem.
comment 4y ago · link · parent
The question is, how much of a taste? We could also include structs, manual memory management, pointers, macros, #ifdef guards; because these are all so very common to C programs, they are definitely part of the languages flavour.
Also, which of the error handling techniques in C should be included, because the language doesn't have a standard one, there are no exceptions or multiple returns. Even within the most basic libraries we have everything from checking global error states, inbound messenger variables, magic number returns, errorflags, ...
Again, hello.c is supposed to be simple. As simple as possible. Yes, that excludes a lot of things. These things are what all the other chapters of "The C Programming Language" are about.
As a starter, hello.c is great.
comment 4y ago · link · parent
$ cat main.c
#include <stdio.h>
int main(void) {
int n = printf("Hello, World!\n");
return n < 0 ? 1 : 0;
}
$ cc main.c
$ a.out
Hello, World!
$ echo $?
0
$ a.out > /dev/full
$ echo $?
0
Problem is, printf is buffered. When redirecting to /dev/full writing to the buffer works. The problem only manifests when the buffer is flushed.This works, as write is not buffered;
#include <unistd.h>
int main(void) {
int n = write(1, "Hello, World!\n", 14);
return n < 0 ? 1 : 0;
}
But even then, to find out what exactly went wrong, we would have to check errno.It's easier in Go, because fmt functions do have an error return which will report such errors;
func main() {
_, err := fmt.Println("Hello, World!")
if err != nil {
os.Exit(1)
}
}comment 4y ago · link · parent
Problem is, the error condition is not even that obvious. I tried it, and printf() will happily return the number of bytes written, even when redirecting stdout to /dev/full.
I am not 100% sure, but I think this has to do with the fact that printf uses buffered io, and writing the bytes to the buffer will work. It's only when the buffer is flushed that this will become a problem, but this would need to be handled in the code to show an error message.
comment 4y ago · link · parent
Sure, we could update it:
// hello_v2.0.c
#include <stdio.h>
#include <string.h>
#include <errno.h>
int main(void) {
printf("Hello, World!\n");
fflush(stdout);
if (errno != 0) {
fprintf(stderr, "error: %s\n", strerror(errno));
return errno;
}
}
But now we have different libraries, a multitude of external identifiers, control structures, blocks, return values, the concept of buffered streams, the concept of file-descriptors, the printf formatting language, program return values, boolean logic & conditionals,...To someone who is already experienced in another language, that may not seem like a big deal, and isn't, but to someone who encounters the language for the first time, this is heavy stuff.
comment 4y ago · link · parent
IMHO, it doesn't.
hello.c is written in a way that makes it very clear that the program doesn't care about error conditions in any way shape or form; the return value of printf is ignored, the output isn't flushed, the return of flushing isn't checked, noone looks at errno; ...so anything happening that could go wrong will go unreported, unless its something the OS can see (segfault, permission, etc.)
If I expect a program to do something (eg. handle IO errors) that its code says very clearly that it doesn't, that's not the programs fault.
comment 4y ago · link · parent
printf("Hello, World!\n")
Is me saying: "Do a write syscall to stdout. I don't care what the return value is, I don't care if the flush is successfull if stdout happens to be buffered." If that is what I want to do, aka. what the program is specified to do, then it didn't fail.