Readit News logoReadit News
mikejmoffitt · 9 years ago
I like the principles behind its design, but not supporting scrollback and saying "that functionality should be provided by tmux or something similar" is baffling when it's done in the name of removing bloat and complexity.

Not everybody wishes to use a terminal multiplexer in all cases, either.

ycmbntrthrwaway · 9 years ago
Scrollback is implemented as a patch: http://st.suckless.org/patches/scrollback
aexaey · 9 years ago
This.

Also, one should keep in mind that having to apply personal patches is perfectly acceptable for suckless software. In fact, for the very same st, to change font, colour scheme, or hotkeys/shortcuts - one has to edit config.h file and recompile. There is no traditional text config file or "Preferences" menu.

This might sound bizarre at first, but actually works as well as editing a text config file: config.h is very well structured and compilation only takes fraction of a second. Better yet, you're not constrained by opinions of previous commiters on what should be configurable and what - not. Which is the whole point, actually.

jsjohnst · 9 years ago
I can't believe they added serial line support and not scrollback. If you're going to claim bloat, serial line support definitely ranks lower on priority than scrollback.
nine_k · 9 years ago
Likely they enjoy tinkering with hardware, so they just needed the serial line support themselves.
bobwaycott · 9 years ago
My first thought, as well.
pmoriarty · 9 years ago
Different people want different features. There's no way they're going to remain minimal and please everyone.

They have to choose the feature set, and if other programs can provide a feature that some users want, that seems like a feature ripe for pruning. I think they made the right choice.

aidenn0 · 9 years ago
I always find tmux's scrollback to be vastly inferior to a native terminal's though.

There are several reasons, but the biggest is that I'm pretty sure it's not possible to get more than a screenfull of text to my local X11 PRIMARY selection.

generic_user · 9 years ago
It is explained in the info that scrollback is implemented in dvtm. Duplicating the functionality would probably go against the general minimalist Suckless design philosophy.

    Non-goals:
    unlimited scrollback buffer (done by dvtm)

brennen · 9 years ago
Interesting. Thanks for the pointer to dvtm. I'm not sure I can see using it when I'm already fairly hooked on tmux, but it does seem kind of nice.
self_awareness · 9 years ago
Alacritty uses the same argument against scrollback and tabs -- that these features should be handled by something like 'tmux': https://github.com/jwilm/alacritty
tokenizerrr · 9 years ago
And then you have tabs that you can't copy from using your mouse because you wind up selecting content from multiple tabs.
cacplate · 9 years ago
They use patches of the source code for plugin style functionality so it remains as minimal as they want and we can add features at will. There is one for scrollback
hashkb · 9 years ago
What's the problem with typing tmux? I think this is exactly right for the typical audience of suckless projects. No dwm or dmenu users are complaining about "missing features".
bch · 9 years ago
...and does it not support pasting from the X clipboard ? It's not accepting in my installation, anyway... :/
avhon1 · 9 years ago
[modifier]+shift+insert or [modifier]+shift+v are the default bindings for paste. [modifier] is most commonly Alt or Super (the Windows key). Keep in mind that your window manager might already have a binding for these, preventing them from working.
pmoriarty · 9 years ago
I can paste in to it from the X clipboard using SHIFT-INSERT just fine.
cyborgx7 · 9 years ago
This thread is like every thread on suckless software ever.

>This software, which specifically states that it caters to a niche, doesn't cater to my needs. I'm not going to consider thought that I might not be part of the niche it's catering to and complain about it instead.

hncommenter_ · 9 years ago
>This thread is like every thread on HN ever.

FIFY

someheavyocean · 9 years ago
As much as I love st, I had to stop using it recently. When using a bitmap font in tmux, large amounts of text sent to stdout bring my computer to a standstill. X is using 100% of a single core. I've switched to gnome-terminal and the issue is gone.
nine_k · 9 years ago
This, along with the generally accepted notion that Gnome Terminal is one of the slowest with output, puts the whole minimalism idea under a serious question. "Do one thing, but do it well", the saying goes.
microcolonel · 9 years ago
Compared to Terminal.app and iTerm2, VTE (the widget underlying Gnome Terminal) is blazing fast.
otabdeveloper1 · 9 years ago
> the generally accepted notion that Gnome Terminal is one of the slowest with output

Really? Generally accepted by who? My unscientific personal tests show that Gnome Terminal is the fastest and lightest VTE.

problems · 9 years ago
Yikes, consider running that through callgrind or something and sending them the output.
satai · 9 years ago
I can't help myself: suckless sucks. Lots of arbitrary limitations for the code, need to recompile instead of configuration, optimizing for a wrong usage scenario.
tomjakubowski · 9 years ago
Even though I can't stand to use their software (or their aesthetic, or their ethos...) I'm very grateful that suckless exists. The source serves as an excellent reference if you want to learn, say, how a (non-trivial) window manager works, or how IRC is implemented in practice, or how to wrap the WebKit/GTK+ interface. The code is usually quite straightforward, and the lack of features/config makes it fast and easy to see what's going on.
userbinator · 9 years ago
I think the suckless project has correctly identified that a lot of software sucks, but their attempts to make it "suck less" are focusing on the wrong points. A lot of mainstream software is grossly inefficient, bloated and resource-intensive, and that's not necessarily because they're featureful. It's certainly possible to write software that is both featureful and efficient, but suckless aggressively cuts features instead of optimising, to reduce the perception of inefficiency; what's left is not necessarily efficient.

In fact, I don't remember the details now but I recall looking at the source for another one of the suckless applications and finding some pretty inefficient algorithms. I think the other comment here about st being CPU-intensive with high output rates is an example of this.

Ironically, one of the reasons I think mainstream software sucks is because newer versions also tend to remove configurability and features often for the same goal of reducing bloat.

astine · 9 years ago
For better or worse, Suckless's problem isn't with code bloat so much as code complexity. More features mean more code to debug. Better algorithms can also mean more code to debug. If you constrain your design scope, you can write vastly simpler programs that are more stable and easier to comprehend.

It's the same rationale that leads one to use a pen and paper rather than a note taking app.

Jillboy · 9 years ago
I find that most of their software is targeted towards beginner/intermediate hackers. Having to recompile /forces/ you to tinker with the source code. When I was learning how to code I would hack the shit out of my window manager (dwm), I learned a lot of C in the process. When you think about it that way, the "arbitrary limitations" on lines of code and everything else starts to make sense.

I agree most of their stuff isn't targeted toward the average user, just this small niche. Their browser, surf, doesn't even support tabs as far as I can remember.

makafuro · 9 years ago
> Their browser, surf, doesn't even support tabs as far as I can remember.

There is a general tabbing frontend that allows you to tab all sorts of applications: http://tools.suckless.org/tabbed.

davidshepherd7 · 9 years ago
emacs had a similar effect on me. Configuration is all in elisp so you can happily tumble down a rabbit hole of tweaking settings and find yourself learning all kinds of interesting lispy ideas.
laumars · 9 years ago
You're clearly not their target audience if those are your takeaways. But there are lots of people out there who do prefer to recompile instead of configure and find suckless feature sets to be inline with their own requirements. To say that a product "sucks" because they don't cater specifically to your arbitrary desires is grossly unfair.
kitchi · 9 years ago
Well, I mean that's what they're doing as well. They call features other people use and require "bloat" and pretty much say they all suck.

I think it's fair to say suckless code is clean and minimalist. But it definitely isn't suckless.

notzorbo3 · 9 years ago
> To say that a product "sucks" because they don't cater specifically to your arbitrary desires is grossly unfair.

Then again, if they name their project(s) "suck less", it's completely fair to say it sucks. If they can have arbitrary standards about what constitutes suckage, why not us?

Karrot_Kream · 9 years ago
Extending `st` with a config reader is super duper easy.
jjnoakes · 9 years ago
The code does unsafe things in signal handlers (vfprintf, for example), and hides some things in macros that I wouldn't expect to see hidden (like the assignment of the global "argv0" variable, defined in st.c, is assigned in a macro from arg.h).
kookookabongers · 9 years ago
I don't use C for a couple of years and I see this:

void (handler[LASTEvent]) (XEvent ) = { [ButtonPress] = buttonpress, [ConfigureRequest] = configurerequest, [DestroyNotify] = destroynotify, [EnterNotify] = enternotify, [LeaveNotify] = leavenotify, [KeyPress] = keypress, [MappingNotify] = mappingnotify, [MapRequest] = maprequest, [PropertyNotify] = propertynotify, [UnmapNotify] = unmapnotify };

What's this feature called?

bonzini · 9 years ago
Designated initializers. It's in C99.
kookookabongers · 9 years ago
charlesetc · 9 years ago
I used st for a good year and it worked really well! I've switched recently for features like the ability to change the font size without recompiling, etc. Despite its spartan feature set, st is quite usable.
pmoriarty · 9 years ago
You don't have to recompile st in order to change fonts. You can just pass it the -f flag with the font you want to use.
noufalibrahim · 9 years ago
Given their focus on being lean, it's more like SPARTAN!! feature set rather than just a plain spartan feature set. :)
corybrown · 9 years ago
What do you use now? Keyboard shortcut for font size change is a must for me.
pmoriarty · 9 years ago
"Keyboard shortcut for font size change is a must for me."

From the st man page:

       Alt-Shift-Page Up
              Increase font size.

       Alt-Shift-Page Down
              Decrease font size.

       Alt-Shift-Home
              Reset to default font size.

charlesetc · 9 years ago
I use konsole which is better than I found gnome-terminal to be and less klunky than I was expecting

Deleted Comment

smlacy · 9 years ago
Why do people care so much about terminal emulators and their supposed "bloat" and "complexity"?
chrissnell · 9 years ago
Bugs. When you work all day long in a terminal, you need it to be reliable. As I mentioned above, xfce4-terminal is what I normally use but select-to-copy doesn't work 100% of the time. This is super annoying. I'd switch to rxvt but it has its own problems. Despite having had terminals for so much longer, *nix has fallen behind macOS when it comes to terminal usability and reliability.
smlacy · 9 years ago
I work literally all day long in multiple fullscreen gnome-terminal instances, and I can't remember the last time I encountered a "bug". It literally never crashes, and works perfectly for my use case.

I can imagine there could be bugs in esoteric terminal emulation, but for the typical use case of "TERM=xterm-256color" (or screen-256color) it works perfectly for my use case.

Ar-Curunir · 9 years ago
Termite is pretty good and bug-free in my experience.
charlesetc · 9 years ago
There have been many times when vim starts glitching out or something because of the terminal emulator I'm using. Even well tested ones like X-term and gnome-terminal. I never had that problem using st.

We hack so much into a text interface it's really easy to accumulate bugs.

smlacy · 9 years ago
I use tmux+emacs inside gnome-terminal for 8+ hours a day.

I rarely (never?) see any "terminal glitching" except for the cases where I've done something absurdly wrong, like running a bash inside emacs-shell with the wrong setting for TERM.

Terminal emulation is essentially a solved problem (state machines and control code sets are small and well defined, there are many reference implementations and compatibility tests). If you see glitching, it's probably from what you're doing inside the terminal, not from the terminal itself.

jjawssd · 9 years ago
Have you considered using neovim?
chriswarbo · 9 years ago
The way I see it, st is trying to replace xterm.

xterm is a de facto standard, in that you can sit down in front of a machine which appears to be running some flavour of Unix, it doesn't matter if it's Gnome, KDE, TWM, CDE, etc., GNU or BSD or Solaris or whatever, you'll probably be able to find xterm and work out the rest from there.

Many devs/hackers use xterm as their day-to-day terminal, and seem to approximate ANSI control code compliance with "works in xterm".

The problem with this situation, as mentioned on the st page, is that xterm is unmaintained and unmaintainable.

st is trying to be a maintainable replacement, making improvements like vector fonts, and not being shy about ignoring legacy/niche/solved-elsewhere features.

smlacy · 9 years ago
- I dispute "many devs/hackers use xterm". I switched away from xterm over 20 years ago, when it was clear that they were never going to have good support for anti-aliased fonts. I work heavily in the linux and with linux devs, and I can't remember the last time I saw someone using an xterm on a modern system.

- xterm is for exactly the case you describe: when all you have is "base X11" and you need a terminal. No crazy multi-gigabyte toolkit requirements. Its essentially a fallback/recovery tool for these cases, although I prefer just working on console when things get that bad.

- xterm's codebase is 30+ years old. "unmaintainable" seems like an overstatement, by a longshot.

davidgerard · 9 years ago
xterm is actively maintained and cares about a whole pile of corner cases that were enough for users to raise valid bugs. See the changelog: http://invisible-island.net/xterm/xterm.log.html
Skunkleton · 9 years ago
Its funny, but I have had fewer stability issues with gnome-terminal than I have had with st. Seems like most people have the opposite experience.
Karrot_Kream · 9 years ago
Not everyone has the latest and greatest machine.
smlacy · 9 years ago
Are you saying that xterm has poor performance?

This appears to be true (from other comments on terminal performance in this thread) but other VTE-based terminals (gnome-terminal) have high performance and work great on sub-1GHz class machines.

shmerl · 9 years ago
I care about functionality. Stuff like true color support helps reduce strain to the eyes.
Pawka · 9 years ago
Performance.