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

I'm surprised Bezos is not writing on setting decent wages for his workers...

comment 4y ago · link · parent

It's unfortunate there is no an equality decision procedure. If two numbers are equal you will see that the difference is zero no matter how much precision you request, but of you always see zero difference you will never know if the numbers are equal or you just have to keep searching.

I know that such a decision procedure exists for algebraic number (i.e., you can allow roots of any orders and general polynomial root extraction), but I don't know about transcendental functions like exponential and logarithm. And frankly it smells a lot of undecidability. Computational things tend to become undecidable just a little bit after they become interesting, and sometimes even before.

comment 4y ago · link · parent

First: you don't necessarily need an alternative chroot, Debian allows installing packages of foreign architectures in the same main tree. It has some hiccups, but it should mostly work.

Second: of you like playing with foreign architectures, I have a collection of ready to boot Debian images of many architectures, that you can promptly boot with QEMU. Command line included. It is mostly aimed at full system emulation, though (but if you look through the cogs you can also download chroots). https://people.debian.org/~gio/dqib/

comment 4y ago · link · parent

I don't think it is. I don't know if the peculiarities of x86 were considered when Microsoft's engineers decided to do SEH the way it is, but there is no hard reason why they couldn't decide to make it table based.

comment 4y ago · link · parent

That's not an x86 weirdness, it's just a choice by Microsoft. It's Windows-on-x86 weirdness.

comment 4y ago · link · parent

I did it once with GIMP, and apply it every time with xournal. In my experience people do not really require that the PDF looks printed and scanned, so I never cared about that aspect.

comment 4y ago · link · parent

An option I would like is for when you push to a repository that doesn't exist, in which case GL creates a new private one for you. I'd like to be able to set it public.

comment 4y ago · link · parent

The combination of this and RFC 8962 is going to create a lot of trouble...

comment 4y ago · link · parent

Letting a part of the population die, perhaps entire species or groups of species, is one of the way nature "rights itself".

comment 4y ago · link · parent

Me too, though not entirely by luck: when I was looking for a job I specifically went for smallish, open source friendly, remote friendly companies. Then I started contributing to the projects they worked on in my free time, met the people at FOSDEM and chatted with them. This made the hiring process much smoother.

So, maybe I was lucky the plan worked, but it was not just a coincidence.

BTW, that company is still in full hiring attitude, in case you like working on free software.

comment 4y ago · link · parent

I managed to do something useful with iodine (IP over DNS), a couple of times. Performance is abysmal, but a simple SSH session might have some hope. Most web applications are impossible, and for email you must be lucky.

comment 4y ago · link · parent

But what is the point of this flex activation scheme?

comment 4y ago · link · parent

If there's a programmers' hell, I picture it as a place where you are always working on interesting programs, but instead of writing something like

    printf("The result is %d\n", result);
you have to reach for a menu and navigate until you find printing functions, then write "The result is ", then right click at the end to insert a placeholder and select the variable in the variables combo box, then toggle the "newline after print" checkbox.

OTOH, my wife (a classicist teaching Latin over the internet) uses a few services like IFTTT, and likes it.

comment 4y ago · link · parent

If you've already tried, you probably already came across this explanation, so there are good chances it won't help, but let me just try: I think a monad as a computation, meaning the act of computing something. A box with a button, that will do something (and possibly return a value) when you press the button. Before the button is pressed, you can't know what value is going to be generated, because none has yet.

The "return" monad operation does a very simple thing: given a value, constructs a box that is going to generate that value once you press the button. Not very useful in itself, but the point is that that value can be used for further computation. The "bind" operation precisely takes another monad and a function, so now we have two monads: the first one is provided by you and the second one is the result of the "bind" operation. Think the first monad as being "embedded" in the second one. When you press the button on the outer monad, first the button on the inner monad is pressed and a value is generated; then the value is mapped through the function; and then the result of the function is the value generated by the outer monad. In practice you extended the inner monad, doing some more computation (the function) after it had executed.

In the case of the Haskell IO monad, you can't really press the button inside your program: there is no way to extract values that were put in a IO monad. Still, on object of the IO monad encodes what you want the program to do. Basically the Haskell interpreter/compiler gives you the opportunity the press just once the button of a single IO monad, precisely of the one that is given by the main symbol (which has type "IO ()"). By composing monads in the right way, you can arrange your program to do what you want.

In other words, a monad like IO, where you can't press the button yourself, allows you to express precisely what a program with side-effects should be: something for which you cannot know the result (you cannot press the button and see the generated value in the program) unless you really execute it and commit to the side effects (which is what happen when main returns something and the single allowed button press is executed on that thing).

comment 4y ago · link · parent

One thing I like of iostreams is that the standard syntax supports passing the file object in depth. If you have a custom type and want to print it, you just implement operator<<(), get a reference to the std::ostream and do what you want with it. Using printf you either have to first write to a temporary string and then print it (which requires more memory and more time to go through it, if the representation of the object is big) or break the flow anyway with something like:

    printf("The object is ");
    print_object(object, stdout);
    printf("\n");
Does fmt support printing a custom type without breaking the format string and without using a temporary string?

comment 4y ago · link · parent

Why should arithmetic be more or less context free than anything else? It's defined by axioms and definitions as much as the rest.

comment 4y ago · link · parent

I'd put that in a different way: the point of maths is not really being context-independent, but to make it very clear what is the context. So, let us consider a statement A which is true provided that a certain set of hypotheses B is true. You might either consider that "A is true in the context of B" (what is commonly written as "B |- A"), so you have a context (but it is very clearly stated what it is). Or you can (often) write it as an implication: "B -> A". The whole sentence "B -> A" is an absolute, it has no context any more, because the context has been absorbed in the antecedent.

(yes, I know I am oversimplifying something, take this at the "philosophical" level)

comment 4y ago · link · parent

That's not a corner case. Either you defined "triangle" and "angles" to mean a plane triangle and angles, or that is not a theorem. Within the theory you're looking at, the definitions are not part of the context, they are part of the theory itself. So you're not depending on the context.

comment 4y ago · link · parent

If you can extract methane from the atmosphere at scale you don't need rockets to solve the carbon problem.

comment 4y ago · link · parent

Right. And you don't have do depend on yet another external service for a simple task.

comment 4y ago · link · parent

There's not DOM outright: each command is just a macro that is designed to expand to "the right thing". More or less.

More in general, I tend to hate all macro languages, like LaTeX, M4 and the C/C++ preprocessor (fortunately in the latter case the impact is usually more limited, because the C/C++ preprocessor layer is thinner than, e.g., a LaTeX document). They tend to require a lot of shenanigans even to make easy things, so the source quickly become a tangled unmaintainable mess, when each time you touch something, you make seemingly unrelated errors appear.

For a trivial example, consider in C:

    #define IDENTITY(x) x
In any reasonable language you would expect that if you see `IDENTITY(y)` you could replace it with `y`. Of course not with macro languages.

comment 4y ago · link · parent

Shameless plug: my wife produces Latin content for beginners on YouTube (https://www.youtube.com/c/SaturaLanx).

Fun fact: during 2021 she earned quite more with her Latin teaching business than me as a full time software engineer. Not bad!

comment 4y ago · link · parent

You can't do that yet, but it is a step in that direction. The general idea is that Wine is getting organized on two layers: the PE .dll libraries, which are similar to a Windows userspace, and the Unix libraries, which act as a sort of "kernel". The interface between the two is standardized and is kind of close to a system call interface (we actually call those "syscalls", even though what I can "kernel" is still a bunch of userspace .so libraries, so the processor is not really switched to kernel mode, and there is no hard enforcement of boundaries; also, many of these syscalls are much higher level than what you'd usually expect from a real kernel-userspace boundary).

Once all modules are converted (there are still a few missing, unfortunately the hard ones, but people are working on those), the PE world interact with the external system only through this "syscall" interface. The Unix world is required to be compiled for the external system's architecture, but the PE world can be whatever you want, provided that you do the appropriate things at the syscall interface.

For example, you can have 32 PE libraries and 64 bit Unix libraries, and at the syscall interface you switch the processor back and forth between 32 and 64. Or you can have x86 PE and ARM (or whatever) Unix, and you enable/disable an emulator at syscalls.

comment 4y ago · link · parent

All computers in the house backup regularly with borgbackup on a small servers (a 2010 Macbook with an attached USB drive). This is done by hand, but there is a script that periodically checks that no backup is falling behind.

Then I have a custom script that encrypts and replicates all the borgbackup repositories on Google Drive (where I have unlimited space because my previous university still hasn't deleted my account).

Ideally I would also replicate everything on a drive at some relative's house, but I haven't had time to set up this yet.

Overall I am rather pleased with this setup. This is for general backup of everything. Specifically for photos, I have a script on both my and my wife's Android phone that copies all photos and videos to a shared directory on the MacBook, and she periodically organizes all the photos there. Then they fall in the main backup.

comment 4y ago · link · parent

Totally true. More in general, it is a relatively simple mathematical fact that a sphere without a point is homeomorphic (even conformally!) to a plane. Therefore, it is impossible to prove that the Earth is spherical unless you either do measurements and run numbers (like you propose) or visit every single location of it (including all the seas and both poles; particularly the south pole, which for some reason flat earthers tend to assume it is missing). The only way to do the latter, as far as I can tell, is to be in a sufficiently polar orbit for enough time (or at least have a satellite in orbit), and few people are able to do that (directly, i.e., without trusting somebody else).

It is interesting that is not uncommon for flat earthers to be more "scientific" that many spherical earthers in recognizing that many spherical Earth arguments are not sufficient by themselves. Of course the spherical earthers happen to be right, while the flat earthers then proceed to invent completely implausible theories to support their beliefs, but they deserve some recognition for the first stage.

comment 4y ago · link · parent

Very nice tool! However, I think it is not always correct. For example, lake Trasimeno, in Italy, is endorheic (or maybe cryptorheic), but seems to discharge into river Arno from this website: https://river-runner-global.samlearner.com/?lng=12.098864773....

I am pretty sure that path is not possible: it seems that the water would flow out of Trasimeno through the Anguillara torrent, but according to the Italian Wikipedia the torrent flows into the Trasimeno (https://it.wikipedia.org/wiki/Anguillara_(torrente)). According to the English Wikipedia it might be that Trasimeno has an outflowing canal, but that should flow into river Tevere (https://en.wikipedia.org/wiki/Lake_Trasimeno), so their data is wrong anyway.

comment 4y ago · link · parent

It doesn't look very well hidden if there are blog posts about it...

comment 4y ago · link · parent

As somebody doing web development for a small business (run by my wife) selling courses online and using Stripe for payment processing, I am a bit concerned by this and other similar posts. So far Stripe has always run smoothly for us (FWIW, we never had a single dispute), but I'd like to have an exit strategy. What other other payment processors similar to Stripe you would suggest? So far I basically only care about credit cards (not other payment methods).

comment 4y ago · link · parent

It means inefficient market on my book. Bad, veeery bad.

comment 4y ago · link · parent

Not that different...
1
456
15