The best programmer is well-deserved

Linus Torvalds is a very powerful programmer, because he has two famous works: Linux and Git.

In terms of technical ability alone, there is one person who may be stronger than Linus.

When I was looking at the list of projects on his homepage, I felt my head exploded.

He developed the famous emulator QEMU and the audio and video processing library FFmpeg. These two alone surpass most programmers. He also wrote a C compiler, OpenGL implementation, LTE soft base station, and JS engine. Run it in the browser, and even set a world record for calculating pi...

In other words, this guy jumps around in the fields of operating system, simulator, multimedia, computer graphics, compiler, programming language, communication, and even mathematics, and develops a software in a year that I can't write in my entire life!

The programs he writes are always orders of magnitude smaller and faster than other programs!

Isn't this too perverted? !

I have to admit that there are really geniuses in this world.

He is the French programmer Fabrice Bellard.

a8fe1fd5ea9443c6b9fce382c230fe5a.png

 

Let's take a look at his amazing path.

compressing software

Fabrice Bellard was born in Grenoble, a small city in the southeast of France. When he was in high school at the age of 17, he found that his computer hard disk was small and expensive. He thought about how to save hard disk space, so he developed a compression program in assembly language. LZEXE.

The compression effect of LZEXE is excellent, and his friends also copied it and put it on the BBS. It became popular all of a sudden and became one of the hottest compression tools in the DOS era.

In 1996, at the age of 24, he wrote a Java virtual machine that could compile Java code into C code for execution.

 

Pi algorithm

In 1997, he became interested in the calculation of pi. By improving the Bailey–Borwein–Plouffe formula, he proposed the fastest algorithm for calculating pi, which greatly reduced the time complexity.

ff7edea1739f45d3af5f06a8b303b9bd.png

Since then he has established his reputation in the mathematics community, and the new algorithm is also named Bellard's formula.

 

TinyGL (Computer Graphics)

In 1998, when Bellard was developing a virtual reality engine project, he needed to use OpenGL, which is a cross-language and cross-platform API for rendering 2D and 3D vector graphics. The open source implementation of OpenGL is Mesa. Bellard thinks that Mesa is too It was slow, so I wrote one myself, which is TinyGL.

TinyGL implements a subset of OpenGL that is much faster than Mesa or other commercial implementations (such as Solaris OpenWin OpenGL), takes up far fewer resources, and is orders of magnitude smaller than either, Bellard once again demonstrates his ability to write efficient C Super high skills in coding.

FFmpeg (Audio Video Multimedia)

In 2000, under the pseudonym Gérard Lantau, he started one of his most important and widely recognized projects: FFmpeg.

970cce0cd05940bc8d1631aa7dd35c1c.png

 FFmpeg is a veritable "Swiss Army Knife" of digital video and audio. It is ubiquitous in video software and commercial websites: VLC, YouTube, iTunes, its power needs no introduction.

C language obfuscation contest

Shortly after creating FFmpeg, in 2000 and 2001, Bellard submitted two entries to the International C Code Confusion Contest (IOCCC), and won two consecutive awards.

You know, IOCCC is the most creative C language obfuscation competition, and it is the best stage for programmers to fully demonstrate their intelligence. It is very powerful to win once, and Bellard can easily get it done twice.

Below is Bellard's award-winning work in 2000, using the Fast Fourier Transform to calculate the largest known prime number (2^6972593-1) in a relatively short period of time

 

int m = 754974721, N, t[1 << 22], a, *p, i, e = 1 << 22, j, s, b, c, U;
f (d)
{
  for (s = 1 << 23; s; s /= 2, d = d * 1LL * d % m)
    if (s < N)
      for (p = t; p < t + N; p += s)
 for (i = s, c = 1; i; i--)
   b = *p + p[s], p[s] = (m + *p - p[s]) *
     1LL * c % m, *p++ = b % m, c = c * 1LL * d % m;
  for (j = 0; i < N - 1;)
    {
      for (s = N / 2; !((j ^= s) & s); s /= 2);
      if (++i < j)
 a = t[i], t[i] = t[j], t[j] = a;
    }
}

main ()
{
  *t = 2;
  U = N = 1;
  while (e /= 2)
    {
      N *= 2;
      U = U * 1LL * (m + 1) / 2 % m;
      f (362);
      for (p = t; p < t + N;)
 *p++ = (*p * 1LL ** p % m) * U % m;
      f (415027540);
      for (a = 0, p = t; p < t + N;)
 a += (6972593 & e ? 2 : 1) ** p, *p++ = a % 10, a /= 10;
    }
  while (!*--p);
  t[0]--;
  while (p >= t)
    printf ("%d", *p--);
}

 

TinyCC (the fastest compiler)

There was also a spin-off from the 2001 competition: TinyCC, the fastest and smallest C compiler in the world, orders of magnitude smaller than most other C compilers.

In order to prove the power of TinyCC, Bellard developed a TCCBoot with only 138K based on TinyCC, which can compile and start the Linux kernel within 15 seconds, which is really scary.

62f8d5f1d5664d44a8f2a84823e89e69.png

 

 

TinyCC (the fastest compiler)

There was also a spin-off from the 2001 competition: TinyCC, the fastest and smallest C compiler in the world, orders of magnitude smaller than most other C compilers.

In order to prove the power of TinyCC, Bellard developed a TCCBoot with only 138K based on TinyCC, which can compile and start the Linux kernel within 15 seconds, which is really scary.

457195f1a5144e09ba4d3b3a5cbe2e38.png

Create a world record for PI

In 2009, Bellard went to play mathematics again. He announced that after the 2.7 trillion decimal places of pi, he only used an ordinary PC and set a world record.

The previous world record was set by the T2K Open supercomputer, which ranks 47th in the world. Bellard’s desktop computer costs less than 2,000 euros, and its configuration is only: 2.93GHz Core i7 CPU, 6GB memory, and 7.5TB hard disk.

One person and one computer beat the supercomputer.

 

JSLinux (emulator)

In 2011, his interest turned to JavaScript again, and he actually wrote a PC emulator in JavaScript, allowing Linux and Windows to run in the browser.

This emulator emulates a 32-bit x86-compatible processor, an 8259 programmable interrupt controller, an 8254 programmable interrupt timer, and a 16450 UART.

It not only supports the command line, but also supports the graphical interface. Seeing that Windows 2000 is running in the browser, the shocking feeling can only be described as a trough!

cb59e1722caf4da8bc4480408ecd807e.png

 

LTE soft base station (communication)

In 2012, Bellard's interest shifted again. It took him 10 months to realize a very efficient LTE soft base station on a PC. Support LTE TDD/FDD, NB-IoT, eMTC, and can support up to 5-carrier 2x2 MIMO or 3-carrier 4x4 MIMO.

All this, just need a PC with i7 4 core CPU.

9eedee452cc5465193383b4cb8afdfc1.png

QuickJS (JavaScript interpreter)

In 2019, Bellard released QuickJS, an embedded JavaScript execution engine.

QuickJS supports ES2020, small and easy to embed, only a few C files, without any other external dependencies.

It runs fast, completing 69,000 ECMAScript tests in 95 seconds on a single-core CPU.

I just picked some of the software developed by Bellard. There are many more on his website bellard.org. The most shocking thing is that these software cover various fields of computer science, which are very different.

Bellard gives the impression that he can easily enter a field that he finds interesting, become an expert in this field, leave a software that others are willing to spend years maintaining, and walk away lightly, and move on to the next field.

When someone asked him why he studied so many different things, he said: I hate doing the same thing all the time, so I have to switch different projects to play...

Just for fun, this is Linus' slogan, it seems that the pursuit of all great gods is the same.

Bellard is not interested in money or fame (using a pseudonym to do open source projects is proof), he rarely accepts media interviews, and there is very little information on him on the Internet, far less famous than Linus.

But if you look at his humble profile, bellard.org, and look at the amazing depth and breadth of his projects, you'll be absolutely blown away.

Bellard must have traveled back in time, or must have been programmed in God Mode.

 

 

Guess you like

Origin blog.csdn.net/joely1/article/details/128125878