sites

mirror of git://git.suckless.org/sites
Log | Files | Refs

index.md (7062B)


      1 Stuff that sucks
      2 ================
      3 See the [philosophy](//suckless.org/philosophy) page about what
      4 applies to this page.
      5 
      6 Bigger topics that suck:
      7 [systemd](//suckless.org/sucks/systemd), [the
      8 web](//suckless.org/sucks/web)
      9 
     10 Libraries
     11 ---------
     12 These libraries are broken/considered harmful and should not be used if it's
     13 possible to avoid them. If you use them, consider looking for alternatives.
     14 
     15 * [glib][1] - implements C++ STL on top of C (because C++ sucks so much, let's
     16   reinvent it!), adding lots of useless data types for
     17   ["portability" and "readability" reasons][2].
     18   even worse, it is not possible to write robust applications using glib,
     19   since it [aborts in out-of-memory situations][8].
     20   glib usage is required to write gtk+ and gnome applications, but is also used
     21   when common functionality is needed (e.g. hashlists, base64 decoder, etc).
     22   it is not suited at all for static linking due to its huge size and the
     23   authors explicitly state that ["static linking is not supported"][19].
     24 
     25   Alternatives: [libmowgli][9], [libulz][10]
     26 
     27 * [GMP][3] - GNU's bignum/arbitrary precision library. Quite bloated, slow and
     28   [calls abort() on failed malloc][4]
     29 
     30   Alternatives: [libtommath][5], [TomsFastMath][6], [imath][7], [libzahl][11] (WIP), [hebimath][12] (WIP)
     31 
     32 
     33 [1]: http://library.gnome.org/devel/glib/
     34 [2]: http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html (glib Basic Types)
     35 [3]: http://gmplib.org/ (The GNU Multiple Precision Arithmetic Library)
     36 [4]: https://gmplib.org/repo/gmp/file/tip/memory.c#l105 "GMP calls abort() on failed malloc()"
     37 [5]: http://www.libtom.org/LibTomMath/
     38 [6]: http://www.libtom.org/TomsFastMath/
     39 [7]: https://github.com/creachadair/imath
     40 [8]: https://bugzilla.gnome.org/show_bug.cgi?id=674446
     41 [9]: https://github.com/atheme/libmowgli-2
     42 [10]: https://github.com/rofl0r/libulz
     43 [11]: //libs.suckless.org/libzahl
     44 [12]: https://github.com/suiginsoft/hebimath
     45 [19]: https://bugzilla.gnome.org/show_bug.cgi?id=768215#c16
     46 
     47 Build Systems
     48 -------------
     49 
     50 * [cmake][13] (written in C++) - so huge and bloated, compilation takes longer
     51   than compiling GCC (!).
     52   It's not even possible to create freestanding Makefiles, since the generated
     53   Makefiles call back into the cmake binary itself.
     54   Usage of cmake requires learning a new custom scripting language with very
     55   limited expressiveness. Its major selling point is the existence of a
     56   clicky-click GUI for windows users.
     57 
     58 * [waf][14] and [scons][15] (both written in Python) - waf code is dropped
     59   into the compilee's build tree, so it does not benefit from updated versions
     60   and bugfixes.
     61 
     62 As these build systems are often used to compile C programs, one has to set up a
     63 C++ compiler or Python interpreter respectively just in order to be able to build
     64 some C code.
     65 
     66 Alternatives: [mk][16], [make][17]
     67 
     68 [13]: http://www.cmake.org/
     69 [14]: https://code.google.com/p/waf/
     70 [15]: http://www.scons.org/
     71 [16]: http://doc.cat-v.org/plan_9/4th_edition/papers/mk
     72 [17]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
     73 
     74 Version Control Systems
     75 -----------------------
     76 * [subversion][18] (Teaches developers to think of version control in a harmful
     77   and terrible way, centralized, ugly code, conceptionally broken in a lot of
     78   terms. "Centralized" is said to be one of the main benefits for "enterprise"
     79   applications, however, there is no benefit at all compared to decentralized
     80   version control systems like git. There is no copy-on-write, branching
     81   essentially will create a 1:1 copy of the full tree you have under version
     82   control, making feature-branches and temporary changes to your code a painful
     83   mess. It is slow, encourages people to come up with weird workarounds just to
     84   get their work done, and the only thing enterprisey about it is that it just
     85   sucks.
     86 
     87 [18]: https://subversion.apache.org/
     88 
     89 Programs
     90 --------
     91 There are many broken X programs. Go bug the developers of these broken
     92 programs to fix them. Here are some of the main causes of this brokenness:
     93 
     94 * The program **assumes a specific window management model**, e.g.
     95   assumes you are using a WIMP-window manager like those
     96   found in KDE or Gnome. This assumption breaks the
     97   [ICCCM conventions][icccm].
     98 * The application uses a **fixed size** - this limitation does not fit
     99   into the world of tiling window managers very well, and can also be
    100   seen as breaking the ICCCM conventions, because a fixed sized window
    101   assumes a specific window management model as well (though the ICCCM
    102   does not forbid fixed-size windows). In any case, the ICCCM requests
    103   that clients accept any size the window manager proposes to them.
    104 * The program is based on strange **non-standard window manager
    105   hints** that only work properly with a window manager supporting these
    106   extensions - this simply breaks the ICCCM as well. E.g. trash icon
    107   programs.
    108 * The program does not conform to ICCCM due to some **missing or
    109   improperly set hints**.
    110 
    111 The following programs are broken (see [rocking stuff](/rocks) for saner alternatives):
    112 
    113 * [Firefox](http://www.mozilla.org/products/firefox) (doesn't set the TRANSIENT\_FOR
    114   hint correctly on its download dialog)
    115 * mplayer with GUI (assumes special window management model. It works without the GUI)
    116 * xine (assumes fixed size, doesn't set TRANSIENT\_FOR hint properly)
    117 
    118 If you still need some program which expects a floating WM, use it in
    119 floating mode.
    120 
    121 Documentation
    122 -------------
    123 Somewhen GNU tried to make the world a bit more miserable by inventing
    124 [texinfo][texinfo]. The result is that in 2016 man pages are still used and
    125 the documentation of GNU tools requires you to run `info $application`. The
    126 info browser is awkward and unintuitive and the reason why noone gets further
    127 than finding 'q' to quit it.
    128 
    129 Look at GNU tools how to not handle documentation.
    130 
    131 Talking about the suck in enforced HTML documentation, which forces you to open
    132 up a 1 Gb of RAM wasting web browser, just to see some eye-candy, which could
    133 have been described in the source with some easy way to jump to that line in
    134 the source code, is not worth the time.
    135 
    136 The suckless way is to have a short usage and a descriptive manpage. The
    137 complete details are in the source.
    138 
    139 C Compilers
    140 ---------
    141 * [GCC][gcc] is the virus which has spread into nearly every Linux
    142   distribution and has added its language extensions to be not easily
    143   replacable. As of 2016 it is now written in C++ and so complete suck. Why
    144   can't a compiler just be a simple binary doing its work instead of adding
    145   path dependencies deep into the system?
    146 * [Clang][clang] is written in C++. If you don't believe that it sucks, try to
    147   build clang by hand.
    148 
    149 See also
    150 --------
    151 
    152 The [list of harmful software](http://harmful.cat-v.org/software/) at [cat-v.org](http://cat-v.org).
    153 
    154 [aterm-ml-post]: //lists.suckless.org/dev/1102/7141.html
    155 [st]:     //st.suckless.org/
    156 [uuterm]: http://etalabs.net/uuterm.html
    157 [icccm]:  http://tronche.com/gui/x/icccm/
    158 [texinfo]: https://www.gnu.org/software/texinfo/
    159 [gcc]:    http://gcc.gnu.org/
    160 [clang]:  http://clang.llvm.org/
    161