Better HN
topnewbestaskshowjobs
Log inSign up

giomasce

1,209 karma · joined Feb 10, 2016 (10y ago) · 426 submissions

Mathematician, computer scientist, programmer. Currently Wine hacker @CodeWeavers and developer @Debian.
Submissions

comment 4y ago · link · parent

There might be some sampling bias here.

comment 4y ago · link · parent

My problem with that question is that it seems to imply that of something has a very small probability to happen, then it cannot really happen. This is false. The probability of me generating my precise GPG or writing this exact comment were ridiculously small before these events happened, and still they happened.

Or, from another point of view, it's worthless to ask what is the probability of something that has already happened. Once something has happened (i.e., if you constrain to that thing having happened) its probability is one, full stop. You have to ask a question before running the experiment.

comment 4y ago · link · parent

Reference for this?

comment 5y ago · link · parent

* Autoconf builds can (in theory always, in practice usually) be done out of tree, like cmake; when it works, I would suggest it that way: mkdir build; cd build; ../configure; make.

* When autoconf files are ancient and do not work, running autoreconf (this time in the source directory) can help.

* I don't like installing stuff in system-wide directories either. Ideally system-wide directories should be touched only by your package manager, so that stale files don't stay there forever. But sometimes files in the object tree are not ready to be used, you really have to install them somewhere. There are two possible ways (with autoconf, at least): either use ../configure --prefix=/install/dir or make install DESTDIR=/destination/dir. They do not do the same exact thing, so in particular with DESTDIR you might still need some tweaking before everything works. But it's a good tool to have in your belt.

comment 5y ago · link · parent

I suppose vfork might help with that (though I don't understand why they don't directly add fork_and_execve, it would seem much easier).

Also, the problem with Linux is not having overcommit, but notv being able to choose when to overcommit and when not. Windows makes that easier, AFAIU.

comment 5y ago · link · parent

And what about the beamer replicating the screen content focused on the hacker's face?

comment 5y ago · link · parent

Ctrl+Shift+C, click it and Del.

(my wife was very happy when I taught her this trick, though at first she was scared she might permanently damage the website; I mean, that it would remove the block also for the other visitors)

comment 5y ago · link · parent

Agree. One of the features of my current choice (Fira Code, but I've been with Inconsolata for a lot of time) is that it has ligatures for common groups like "!=" or "<<=", and CSS doesn't have them.

comment 5y ago · link · parent

See also the Natural Number Game.

comment 5y ago · link · parent

Math trivia: there are cases on which it is sensible, in sufficiently advanced mathematics, to define pi as 3 (or whatever other number).

I don't use tabs, but if I'd say that the biggest advantage of using tabs is that everybody can configure their own editor to make them as large as they wish.

comment 5y ago · link · parent

Me too. I don't know a thing about COBOL, but my aunt does and I'm sure she will teach me. I'm willing to learn for that salary.

comment 5y ago · link · parent

Precisely what I wanted to say. Have a child and you won't complain about not knowing what to do with your time any more.

But it's true that the rest is pretty cool too.

comment 5y ago · link · parent

Satispay is nice, though I don't understand why it has that funny mechanism with a weekly limit. Sometimes it is quite inconvenient.

comment 5y ago · link · parent

This.

No tradition or culture can claim to be purely from one place. Everything has mixed in the world by now. All of us are immigrants.

comment 5y ago · link · parent

My somehow similar space predominance fiction would about one smaller country, unable to directly make use of space, but unwilling to leave it to other nations, intentionally causing the Kessler cascade by sending and detonating a few bombs in space.

comment 5y ago · link · parent

Basically affiliate cracking! That's an idea!

comment 5y ago · link · parent

It doesn't say anything about doubles, which is a rather important element in Italian pronunciation.

What I've been told is that for non-Italians the best trick is to try to shorten the vowel before the double. This will naturally make the double longer, as it should be.

comment 5y ago · link · parent

I never tried that: is it comfortable to use mouse and keyboard while walking? To me it feels quite weird.

comment 5y ago · link · parent

Nice!

comment 5y ago · link · parent

Are you sure? Isn't it UB to modify a const object? It will probably end up in a non-writable memory page.

EDIT: gcc seems to agree with me: you can see the optimized version here[1] and the unoptimzed version if you remove "const".

[1] https://godbolt.org/z/KWrW45rK8

comment 5y ago · link · parent

My comment seems to have sparked a lot of reaction about safety, but that wasn't the main point. The main point (and the one OP talks about) was about conciseness, and I can't really see how C can be considered a concise language.

comment 5y ago · link · parent

The problem is not even just safety. You can write safe C, if you are careful (and you need to be careful also for C++, smart pointers do not just magically make everything right). The point is that OP makes the point that C requires to write less code, and this doesn't even seem true: you have to remember, each time some non-trivial object goes out of scope, to call its destructor/deallocator, which results in a lot of code (which can at times hard to read, especially if you have not completely linear control flow). Looking at just the declaration is a small part of the issue.

comment 5y ago · link · parent

"From the new Start button and taskbar to each sound, font and icon, everything was done intentionally to put you in control and bring a sense of calm and ease".

It is important to carefully polish icons to put users in control.

comment 5y ago · link · parent

The thing I really like of Git is the simplicity and transparency of its structure: a Git repository is a DAG of commits, each of which is a tree of blobs and directories, all of them linked by their hashes. On top of that there are tags and branches, which are labels for some of these hashes. That's all, essentially. This makes it very easy to understand what's happening in my repositories. It makes it easy to address data: if two repositories have the same commit hash, they have exactly the same history, nothing else to check.

To me understanding the data structure is more important that understanding how that data is to be manipulated. Manipulation follows from the structure, not the other way around for me. So it's true that git's interface can be a bit confusing, but if you know what you want to get, eventually you find out how to do it. Much worse would be to understand if you did the right thing with a repository whose internal structure is opaque to you.

Also, manipulation tools can be fixed, enhanced, redesigned, developed, and git's user interface has definitely progressed since its beginning. Data at rest is more difficult to fix if you laid it out wrong (as the transition away from SHA1 proves: that's one thing that was not engineered well enough at the beginning and it has a price now). So having a solid data layout is more important that having an easy interface.

These are the reasons for my love at first sight with git.

comment 5y ago · link · parent

Please, do not assume there is just one nation in the world, and write "United States" instead of "nation".

comment 5y ago · link · parent

I don't really understand why RAII is related to many small memory allocations. Is memory leaking less of a problem if it is in just a few big allocations? The proposed solution of using handles instead of pointers is a tradeoff that can make a lot of sense in some situations (it basically trades slower access to objects for better safety and defensive programming), but it is rather independent of RAII. Handles or not radically different from pointers: they still need an allocator (and you can say that your custom one is better tailored to your problem, but writing an allocator is not easy, and it's all to be seen if yours is better than the standard ones) and you still need to remember to invalidate handles, which is what RAII is really for.

So using handles can be a good idea, both in C and in C++, but it's really orthogonal to RAII. It can partially compoensate the lack of copy constructors and destructors, but if you need to keep a reference count to a handle you're still short of a good solution, and your code must be ready at any place to cope with a expired handle.

comment 5y ago · link · parent

Yes, if a key is or might be compromised it is a good idea to rotate it. Though, since you mention you're novice, you might not be aware that in the case of OpenPGP that doesn't necessarily mean to revoke the primary key, if you set up things properly in the first place.

In OpenPGP the thing you call a "key" is actually many keys: there is a primary one and whatever number of subkeys. Subkeys are those that are actually used in day-to-day encryption and signing activity, and that you need on your computer. Primary keys are used to sign subkeys and other people's keys, but you don't need them for day-to-day activities, so you can keep them in a separate storage that is not normally attached to your computer.

If your computer gets compromised you have to revoke subkeys, but you can keep the primary key (unless you attached the cold storage to your computer while it was compromised). This makes the rotation much less painful than if you have to revoke your primary key, which implies also re-establishing signatures and trust with other people.

If you search for "gpg subkeys" you will find a few tutorials.

Even more secure is to keep the primary key offline and the subkeys in a security module, like Yubikey, Gnuk or Nitrokey Start. That makes everything much more secure, and you can easily carry your keys to other computers, knowing that when you detach your security module that computer won't have access to your keys any more.

comment 5y ago · link · parent

Same with Google and AGPL.

Also, court cases are not just decided by the amount of money you pour in them. You need money to prepare correctly the case and work a good strategy, but in the end facts are considered, and if someone violates copyright, they're going to be found guilty, be them a small company or a FAANG.

comment 5y ago · link · parent

Your family members might be wiser than you in believing that data owned by large monopolistic operators are not safe at all, and that Google is far from being above suspects of shadiness.

Little operators cannot do more then some harm: they are little, they possess relatively little data, they don't have the ability to capture a significant share of the aspects of my life. Google can, and can escape regulations on how such data can be used. This is what is really dangerous.

comment 5y ago · link · parent

Still, he does not provide any evidence.
1
567
15