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 7y ago · link · parent

I am not really following the details, but it seems that Intel is taking a blunder after the other. Will we ever able to trust their CPUs again?

comment 7y ago · link · parent

If it is so simple, I wonder why the problem takes so much discussion to be solved...

comment 7y ago · link · parent

LineageOS is very nice, also because it gives you the same experience of different devices. You know that it will be easy to have root, you know you won't have to learn again where every menu is, you don't expect too many surprises.

I had a Fairphone 2 before and I used LineageOS on it. Then I decided to change it, got a second hand OnePlus 5, installed again LineageOS and it's just the same thing, except the phone is faster and doesn't have a few hardware bugs.

I actually choose the OnePlus also because all OnePlus models seem to be well supported by LineageOS, which is probably related to the fact the OnePlus releases quite a lot of things as open source[1] (another good reason for the choice). On top of that, it seems to have a good quality/price ratio. I am quite happy of the choice.

[1] https://github.com/OnePlusOSS

comment 7y ago · link · parent

Using this programming style requires a rather powerful type system, if you want to go past the simple examples the author shows and encode more complex validity conditions. I am still learning these things, but AFAIU the extreme edition of all this is the Calculus of Constructions used in Coq and Lean, where you can encode theorems and algorithm specifications as very complicated type; proving a theorem corresponds to showing an element of the theorem itself (seen as a type), and if you find an element of a type encoding a certain specification, Coq can work out for you a program that implements that specification.

This is what I understood, at least. Things are quite complicated!

comment 7y ago · link · parent

I tend to agree with you. But the problem exposed here is relevant; Morpheus says (speaking about a fortune teller, probably not coincidentally, that there is big difference between knowing our own path and following it: here there is kind of the same problem. A trained professional is probably more qualified to understand and respond to their patients' problems, but this works only if the patients acknowledge and accept their advices. If they do not, however good, they are lost.

I believe this is an important problem in medicine (not only psychology): there is a good difference between knowing the solution for something, and convincing the patient to abide to that solution. Each of us has their own set of beliefs about where working solutions come from: professionals, the internet, fortune tellers, friends, self help books. If professionals do not have enough strength in this set, they will not work.

I am not saying that fortune tellers are the solution; I am just saying that this problem exists and that the fact that people believe in medicine professionals cannot be taken for granted.

comment 7y ago · link · parent

I agree: I do not master C++ value categories, but I am pretty sure there are a few errors. And you don't get to understand much anyway. Does anybody know some better writeup on the subject? It is probably the biggest core C++ topic that I still have to properly digest.

307.

Metamath Zero, a bootstrapping theorem prover(arxiv.org ↗)

125 points · by giomasce · 7y ago · 36 comments

comment 7y ago · link · parent

AFAIU one of the nice thing of the SiFive IP cores is that they were distributed with some kind of free license (although they still required other non-free IPs to be actually used in a chip). Is this still (or was it ever) true?

comment 7y ago · link · parent

Nadella-era MSFT is different from Gates- or Ballmer-era, and this is very good, but, as a Linux user and free software contributor, I wouldn't say I feel "loved". I'd say I feel MSFT is trying to somehow get advantage of my work (which is fine, given that it is free software) while holding back what I would like to have from them (specifications for MSFT interfaces and file systems, if not code, so that better interoperability can be implemented). Which is also fine, of course, they do not owe me anything, but still I do not feel "loved".

(BTW, I already have more editors and code hosting platforms than I need, so they are not good points for me)

310.

Tinycc gets RISC-V support(lists.nongnu.org ↗)

2 points · by giomasce · 7y ago · discuss

comment 7y ago · link · parent

Ah, that's unfortunate. It must be very recent, though, because I'm sure I've checked the same page no earlier than a few weeks ago.

comment 7y ago · link · parent

I own a Fairphone 2 and was very proud to buy it and support the company that is behind it. Honestly I have to say that specs are not (and were not at the time) impressive, and that the phone has had quite a few hardware issues (which I mostly attribute to the fact that the Fairphone company is still rather young, and building a high quality smartphone likely requires a lot of experience). As an object, the value/cost ratio is not stellar, but if you factor in the added value given by the work for a better and fairer world, my personal balance is strongly positive. Given that Fairphone 2 was already a great improvement over the first edition, I really hope that 3 is finally a great smartphone, with a great social value. All the best to people developing it! :-)

comment 7y ago · link · parent

Isn't LineageOS what you are looking for? You can take with or without Google bloatware. It is available and regularly updated for FP2, where I use it.

comment 7y ago · link · parent

When I was in school (computers were running Win 95, I believe), I discovered a lot of nice software like NetSeven and BackOrifice, and I infected the school computers with it. Then I would play tricks to my school mates by displaying a lot of modal dialogs, or something. I never did anything nasty and that sort of programs did not autoreplicate or infect other media, but in hindsight it was quite irresponsible, especially because I did not manage to deinfect the computers when leaving the school. Fortunately nobody ever seemed to find out.

comment 7y ago · link · parent

In case someone rushed to cppreference.com to compare, I think that https://en.cppreference.com/w/cpp/utility/compare/strong_ord... is slightly wrong, in that it should not list "equivalent" as an alternative. I reported that (putative) mistake.

comment 7y ago · link · parent

Do not try too hard to compare with maths here. A programming language is different in many things from how maths is usually formalized. In C++20 there is no "strong total ordering", "weak total ordering" nor their partial counterparts. There are just "strong ordering", "weak ordering" and "partial ordering".

In a strong ordering, two objects can only by one smaller, equal or larger than the other. If they are equal, it means that they are substitutable.

In a weak ordering, two objects can only be one smaller, equivalent or larger than the other. No substitutability is implied.

In a partial ordering, two objects can be one smaller, equivalent or larger than the other, or just not comparable. Again, no substitutability is implied.

There is no point in distinguishing strict vs non-strict: depending on whether you call < or <= you will get the string or not string variant, and the same for > and >=.

comment 7y ago · link · parent

No, you're wrong. In general there is not even a concept of "side", but even if there is a positively-curved surface or manifold seen from the other side is still positively-curved. And the same with negative.

You can probably convince yourself of this if you think at the triangles mentioned in the article. Their angles do not change even when you change side.

comment 7y ago · link · parent

Not knowledgable in the topic, but https://en.wikipedia.org/wiki/Shape_of_the_universe mentions a couple of measures, both of which cannot distinguish our universe from a flat one.

comment 7y ago · link · parent

No. The terminology is different because it refers to a different concept. In C++20 "strong" vs "weak" refers to substitutability. When two elements x and y compare to strong_ordering::equal, then it is assumed that f(x) == f(y). This is not assumed if they are just weak_ordering::equivalent. Read section "A new ordering primitive: <=>" of the article for a longer explanation.

comment 7y ago · link · parent

As usual, all articles of this OpenPGP-is-bad kind keep failing acknowledging OpenPGP's most important feature: it has a way (clumsy as much as you wish, but existing) to attach identities to keys, and to verify them. I have a rather well connected OpenPGP key, and that means that anyone can verify the signed emails claiming to be from me are actually from me, even if we never met. Of course you can mention XKCD and people saying they will never check a signature, but that's their problem, not mine. If do not bother to check your keys, any encrypting/signing system is untrustworthy. If you have a lot of keys, each for any of your crypto applications, and no way to cryptographically tie them to an identity, you will eventually mess them up, especially if they have to be deployed on more than one machine.

I am perfectly fine with saying that GnuPG uses old algorithms, or that different applications should use different keys, algorithms or techniques. But, please, when designing such systems keep in mind that you want to check where your keys come from and which identity they are attached to. And TTBOMK only OpenPGP is currently able to do that. To me it would be great if all crypto applications done in the right way would have a way to tie their keys to the OpenPGP web of trust, in the same way Monkeysphere tried to do for SSL and SSH keys.

comment 7y ago · link · parent

If you are close to a window and willing to buy a receiver, install dump1090 and feed to FlightAware and FlightRadar24.

comment 7y ago · link · parent

I don't think that the base issue lies in the implementation: you can make it as scalable, parallel and document as you wish, but if what you are doing is basically receive data from whoever sends you something, store it, pass it to other server and do not offer any form of accountability over who can store such data or who can delete it, it will always be trivial to write a script that just sends lots of data and bloats your service. The problem lies in the architecture itself.

comment 7y ago · link · parent

Currently epsilon is a Linux kernel with musl and tcc. Since tcc can be used for scripting, I believe that with a non-trivial amount of work (including patching musl), musl could be built by tcc. Therefore epsilon would become just Linux and a static build of tcc.

To further reduce epsilon (or, in somewhat standard terminology, the "binary seed") I am also writing asmc (https://gitlab.com/giomasce/asmc), which is a minimal operating system with a minimal compiler, totalling less than 6 KiB binary seed. This compiler is not for C, but for G, which is a C-inspired language that I invented for this purpose (see the project README and links for more details). The target for asmc is to be able to build and boot Linux and a static copy of tcc (the latter is more or less already there; Linux is, of course, the hard part), at which point it can bootstrap nbs. I'm not there yet, though.

Also, to be fair, although asmc's seed is 6 KiB, you still need an x86 CPU (I'm not aware of free implementations), a loader and a BIOS to have a functional environment. This is not little thing, but I guess it is a reasonable target so far.

comment 7y ago · link · parent

The Heirloom project is a collection of utilities coming from open-sourced versions of Caldera and Sun code (https://en.wikipedia.org/wiki/Heirloom_Project). It's nice because it is very easy to bootstrap, even if nowadays it is unmaintained. It also features a lex and yacc that are written in plain C, without depending of themselves (well, lex depends on yacc, but at most one dependency is ok). It is not easy to use it to bootstrap flex, but it can be done. Basically you have to use an old enough version of flex (I am using 2.5.11) and modify its lexer so that it can be parsed by a simple lex that is not flex (plus some additional light patching of the C code). It is a bit tedious, but a rather mechanical task.

Flex 2.5.11 is rather old now. When I have time I will also add another stage to compile a more recent version. But I believe that flex 2.5.11 can generate the lexer of the latest flex release. Also, it seems that all flex versions can be compiled with a yacc that is not bison. This is what I recall from my experiments of a few weeks ago, that I still have not consolidated in a working script. Surprises might happen!

The other steps of the project are described in the README (where flex is not mentioned yet, but all the rest is). Later steps will be bison, as I said, and then who know. I should aim at Perl, which then would unlock autotools, but Perl itself has a lot of dependencies and I haven't yet begun unravelling them. Also bash and coreutils should be bootstrapped at some point, but for the moment dash and Heirloom can do their job without problems, so it is not a priority (although it might become at some point). Later targets will be binutils, gcc and glibc, but do not hold your breath. Eventually I would like to bootstrap Debian packaging tools and start building Debian packages. That might require that I train my offspring into programming and convince them to continue my mission.

comment 7y ago · link · parent

My project https://gitlab.com/giomasce/nbs is currently able to more or less bootstrap flex, starting from only tcc and musl (within a running Linux kernel). Terms and conditions may apply: I haven't tested much the generated binary yet, and given the tricks I have to do to get there miscompilations and introduced bugs are everything but impossible. But at least ideally it should be possible to iron them out without changing the whole path.

Bison is my next target, but I haven't been able to work much on it lately. It's true that it should be possible to bootstrap it by history, although I really hope that one does not need to many steps to get to the latest release.

comment 7y ago · link · parent

That is ok if you're just dealing with the upper layer of code, i.e., the final application. Then statically linking can very well be the best solution. But if you're building an operating system or distribution and do not want to recompile the whole of it (and let users download and reinstall the whole of it) each time you fix a bug in a core library, then static linking becomes pretty quickly a big pain.

More or less the same happens with C++ header-only libraries, which are basically uncompiled static libraries. They are very nice and possibly allow strong optimization, but are rather painful to handle in a distribution.

> Plus with a static binary, if you really care about order of loading/unloading etc (which you ideally shouldn't) its trivial to manage with a custom linker script.

Why? It seems to me rather sensible to deinitialize resources in the opposite order in which you initialized them. This way the time span of different resources are contained each within the other instead of just overlap. When using RAII in C++ (which is basically just atexit on a finer grain) it often makes sense to have this requirement.

comment 7y ago · link · parent

Yes, but it has the big disadvantage of a very irregular pronunciation. Other languages, like many southern European ones, seem to me to have much easier pronunciation. I am biased because I am Italian, but I am pretty sure that it is much easier for an Englishman with basically no Italian training to speak relatively correctly an Italian sentence than it is for me, after many years of studying and practising English, to properly pronounce English.

I would like this EU English to evolve in the direction of keeping a simple grammar and going towards a more regular pronunciation. Basically it would become a new form of Esperanto, except that differently from Esperanto it would actually have a viable path for many people to learn it.

I know I like to dream, but maybe...

comment 7y ago · link · parent

To me it looks like iodine (https://code.kryo.se/iodine/): very nice as a hacking tool to prove a point, but unlikely to be actually helpful in all but very peculiar situations. As a hacker, of course, I value a lot the first part of it!

comment 7y ago · link · parent

A few years ago I also found a backup tool that converted backups to DV videos, so that you could write them on cheap DV cassettes. It was something like more than 10 GB per cassette. Definitely not bad for a few years ago.

comment 7y ago · link · parent

https://telegram.me/scihubbot

Much more convenient than the web interface, if you ask me. And without the problem of remembering the right URL.

1
101112
15