1,209 karma · joined Feb 10, 2016 (10y ago) · 426 submissions
comment 4y ago · link · parent
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
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
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
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
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
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
(yes, I know I am oversimplifying something, take this at the "philosophical" level)
comment 4y ago · link · parent
comment 4y ago · link · parent
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
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
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
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
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
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