Suckless - "Do one thing and do it well"


ClockworkCoder

Chaotic Neutral
Joined
Jan 21, 2016
Messages
1,718
Location
Menzoberranzan
I've recently come across suckless.org. Initially attracted by st (simple/suckless terminal), and I like the philosophy: no bloat, and if you want extra features, or to configure anything, then you have to build your own version.

They also have a windows manager (dwm) which intrigues me, and browser (surf) amongst others.

As I'm now more seriously trying to get in to c/c++, and also that I like minimalism, seems an ideal place to get to grips with hacking existing code, "best practices", etc. Part of this motivation is that I'd like to contribute, if I can, more proactively towards development/software for the Pyra (and other, Arduino-based hardware).

What's everyone opinion on suckless? Do they apply good programming principles? Are there other similar/better sets of libraries?

https://suckless.org/
 
Last edited:

Caine

Hardcore Member
Joined
Jun 5, 2008
Messages
4,138
Location
Netherlands
I have not studied their code, though I do use some of their tools in combination with Awesome Wm.

Do one thing and do it well is the Unix philosophy, which is not unreasonable.

Don't over-focus on good principles, just get started. That way you build up experience and develop a feeling of why those principles may or may not be a good idea.
 

ClockworkCoder

Chaotic Neutral
Joined
Jan 21, 2016
Messages
1,718
Location
Menzoberranzan
Do one thing and do it well is the Unix philosophy, which is not unreasonable.
Of course, you're correct. My title is a little misleading. Probably the suckless philosophy goes a bit further, as it's designed for and by programmers, and many people dislike the lack of config files.

Technically I think I'm also "cheating" by using tmux (with tmux-urlview) on top of st to add scrolling and link navigation...

Don't over-focus on good principles, just get started. That way you build up experience and develop a feeling of why those principles may or may not be a good idea.
Sound advice, thanks. I'm also well aware that Google, StackExchange, et al are enemies of well written, secure code. I'll try to avoid getting into bad habits though: spent too long retaining myself in the past with other languages to go through that again.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,270
Age
38
Location
Innsmouth, MA
Hi all :)

I stumbled upon suckless.org some time ago, and it indeed looks like an interesting project (I disagree with some of their opinions though: https://suckless.org/sucks/). I even started to port most of their tools to the Pandora at some point. If there is any interest from the community, I'll resume my work on that package ASAP.

WARNING - SELF PROMOTION: @ClockworkCoder : if you are into minimalism, you might also want to try Plan 9 and / or Inferno on the Pandora:

http://repo.openpandora.org/?page=detail&app=plan9port-magicsam
http://repo.openpandora.org/?page=detail&app=inferno-magicsam

Cheers, Magic Sam
 

JDTAY

Half Pepperoni, All Cheese
Joined
Sep 15, 2015
Messages
949
Age
33
Location
North Carolina, USA
Awww man, I've been meaning to find ways to suck less, but using C instead of C++ and finding a compiler other than GCC? Sucking less seems pretty hard. :(
 

Elw3

ƐʍlƎ
Joined
Aug 10, 2010
Messages
1,409
Awww man, I've been meaning to find ways to suck less, but using C instead of C++ and finding a compiler other than GCC? Sucking less seems pretty hard. :(
On the bright side: You cant suck more.
 

JDTAY

Half Pepperoni, All Cheese
Joined
Sep 15, 2015
Messages
949
Age
33
Location
North Carolina, USA
Okay, so um, I'm ready to try sucking less, and suckless recommends tinycc to do so. I wanna start using tinycc, but the git at http://repo.or.cz/w/tinycc.git doesn't appear to have any binaries, which brings me to a question... Would it suck to use a non-tinycc compiler to compile tinycc? >_>
 

Yori

Hi, how was your day?
Joined
Oct 9, 2016
Messages
98
Location
Venice, Florida
Tcc is wonderful and I have been using it my self for my own projects.
'-run' is one of the best features of it in my opinion :D!

You can find prebuilt binarys at: https://bellard.org/tcc/

but if you need c++ I would look at using Clang.
It's faster & a bit more user friendly than GCC.

The one thing I have to agree with suckless is that C/C++ build systems suck.
Man Cmake can be pain at times.

For smaller tools I make for my self I just write in one file and have no build system.
But if I need one I use make.
 
Last edited:

edgex004

Advanced Member
Joined
Jan 5, 2008
Messages
1,203
I use some suckless tools on the Pandora, such as dmenu. I tried compiling surf for the Pandora, but couldn't get it to work.
 

ible

professional vim user
Joined
Mar 24, 2014
Messages
2,397
Location
Seattle, WA
i wanted to build my own text editor, and sandy was a nice starting point for ideas, though i think i'm going back to building somewhat from scratch. (also a project on the backburner.)

i didn't like how they integrated it with the dmenu thing, i wanted everything to be in-terminal. in fact, i dislike almost everything about dmenu. i prefer opening up a terminal for any new commands, where i have my custom bash functions and PATH at the ready.

i like the philosophy, though, i guess...?
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
12,882
Location
Somewhere off the coast of the EU
My github repo is full of things that I took so a certain point then gave up on. I should really try to stick with one thing until it works at the very least. One of my bigger projects is stuck in merge resolution hell after I backed out of a big design change. A few are really screaming out for GUIs but at least they so something useful in the terminal. And others are just false starts that never went anywhere - I should really delete those or find some way to hide them better.
 

rygD

Nihilistic Mystic
Joined
Feb 28, 2014
Messages
7,464
Location
Everywhere
Did anyone else assume this topic was spam until they saw the posted by user name?
When I am checking for spam I first look if the avatar is a Pyra keymat. If not, certain username patterns are common. In the end I always check the post (and sometimes poll).

Plus I had come across suckless before. Also The Fuck.
 

pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,071
Would it suck to use a non-tinycc compiler to compile tinycc? >_>
This always makes me chuckle. I think I remember the Roslyn dotNet compiler said it was compiled by itself, I was like "So you can run source code directly on the CPU now?" :)
The compiler always has to be compiled by something other than itself... At least in the very first instance, then I suppose you could use your new compiled version to recompile the source to give you another version
 

ClockworkCoder

Chaotic Neutral
Joined
Jan 21, 2016
Messages
1,718
Location
Menzoberranzan
This always makes me chuckle. I think I remember the Roslyn dotNet compiler said it was compiled by itself, I was like "So you can run source code directly on the CPU now?" :)
The compiler always has to be compiled by something other than itself... At least in the very first instance, then I suppose you could use your new compiled version to recompile the source to give you another version
That's like reprap 3d printers...

Or similarly, Quines https://en.m.wikipedia.org/wiki/Quine_(computing)
 
Top