lainchan / Ω
Minimal Software Thread
Agent Smith · 2022-01-23 13:09
Thread about minimal software. Let's find better and obscure alternatives for well-known but overweight software.
Do you use some C99 program instead of popular javascript app? Write about your experience!
Do you write your own small scripts to parse websites instead of using web browser? Paste it to https://c-v.sh and send here.
Do you run small homeserver on RPi Zero? Post here programs you use.
Drano · 2022-01-23 13:17
As for me, I use minidlna instead of Jellyfin or Kodi. Also I make 90% of my docs in groff. I use tool zaread to convert doc, docx and other files to pdf (basically it's just a shell wrapper over the libreoffice's cli tool).
Also I use many tools to convert doc, docx and other formats to txt with one shell file: https://c-v.sh/unhorsedcivets?lang=auto
Yet Another Lainon · 2022-01-23 13:23
I was 90% way done with a peer to peer note sharing daemon for Linux, written in C, before accidentally irreversibly rm -rf ing the project and it’s backups. And yes, even data recovery programs couldn’t recover it.
The finished program would run as a daemon, automatically connect to other devices on the same network running this daemon. I could then edit, import, export, send, receive or sync whatever note I was working on. This would’ve let me take notes on the same file across all my devices on whatever I was studying at the time.
Zero Cool · 2022-01-23 13:36
>>56046
Ooohhhhhhh! I hope that you'll find some accident backup someday! It sounds so cool!
Six · 2022-01-23 14:23
>>56044
I used to be a free software minimalist. I liked suckless.org software. I used dwm + dmenu , dvtm and a lot from their lists : mupdf, feh, at one point even surf.
I have found that there are a few downsides: Security features often require non-minimalist software - MAC systems, or Virtualization , or both. I use Qubes now.
Surf is a picture of the downsides, its not extensible like firefox, so virtually all the security features that I want like ublock origin, dencentraleyes, etc. are not available.
A bash shell is still my primary file manager. I still cp/rm/mv files with tab autocomplete. Occasionally, I use mc.
Firefox consumes and ungodly amount of RAM, and I should probably just find a way to reduce usage of the web.
Sabo Engle · 2022-01-23 14:29
>>56050
I use links2+tor for 95% of internet, links2 with cookies for dumping social network where my university chat is, badwolf for more css-oriented browsing and surf to get cookies for links if i need them. And I'm not the cultist, just my laptop's fan broke down and I temporarily use Raspberry Pi 3b as desktop.
Joe Bloggs · 2022-01-23 15:11
>>56046
This is why it's important to use a remote git repo for projects, even if it's a personal project, and even if that remote repo is just somewhere else on your computer that you never touch.
Motoko Kusanagi · 2022-01-23 15:14
>>56052
>This is why it's important to use a remote git repo for projects, even if it's a personal project, and even if that remote repo is just somewhere else on your computer that you never touch.
Cloud has outages too. Backups are whats important. If site destruction is apart of your threat model then remote backups. Remember to encrypt your remote backups if they contain private information.
Mario Rossi · 2022-01-23 18:24
>>56052
>Not saving your projects on punch cards and keeping them in a climate controlled, fireproofed storage room.
smh
No seriously, it surprises me that there are still accidents like this, where people didn't regularly back up their work on an external harddrive or something similar. How many projects have been lost to the lack of backup? Too many.
>>56044
I have nothing to show, as work requires me to use winblows, but I intend to scavenge a few old PC's and piece together a machine with Linux and running a minimum of software, and completely disconnected from any network. It'll be my work PC for all my personal projects, reading, writing, and modding. That's why I'll go for something really lightweight and energy efficient, something akin to those client boxes I've seen popping up.
Joe Bloggs · 2022-01-23 18:35
Security requires non-minimalist software, sandboxing, and virtualization. You cannot have security through obscurity or through correctness. You can only have security through isolation and minimal privileges.
Windows and MacOS are far more secure than Linux.
SHODAN · 2022-01-23 20:32
>>56063
>Security requires non-minimalist software, sandboxing, and virtualization
Your on to something here it sounds like.
>Windows and MacOS are far more secure than Linux.
Linux, known for its lack of sandboxing,virtualization? What are you talking about?
Naomi Nascimento · 2022-01-23 21:07
>>56063
> Security requires non-minimalist software, sandboxing, and virtualization.
Use firejail.
Batou · 2022-01-23 22:08
>>56072
Name a single working application firewall for linux.
Shogun · 2022-01-24 00:40
>>56077
https://madaidans-insecurities.github.io/linux.html#firejail
Nemissa · 2022-01-24 03:34
>>56063
So what? You prefer some flavour of BSD?
I can't imagine anyone seriously recommending Wang or macOs brand cereal for their security applications.
John Rain · 2022-01-24 06:56
>>56084
>>56084
1. You can disable setuid in firejail config
2. Madaidan unironically recommends windows 10, microsoft edge, signal, protonmail, he is not an authority for me
Cutter · 2022-01-24 16:07
>>56093 He's core developer on Whonix team. You're on the other hand, nobody.
Cowboy · 2022-01-24 16:18
>>56093
He also recommended Gentoo and Void Linux over Ubuntu and Fedora on his linux hardening guide.
Hacker · 2022-01-25 05:41
Do you know any good kanban? Or any other good and visual tool for managing tasks.
Yet Another Lainon · 2022-01-25 14:44
>>56050
Minimalist front end software open more system resources for important non-minimalist security software. That's how I look at it.
Rick Deckard · 2022-01-25 14:50
>>56153
In the spirit of this thread, here's something I use.
https://github.com/apankrat/nullboard
Special Agent Bob · 2022-01-25 16:25
>>56044
Do you use some C99 program instead of popular javascript app? Write about your experience!
Joey · 2022-01-25 17:26
>>56105
>Whonix
Lmao what?
What a gayboi lol
Irrelevant soykaf, no one uses this soykafe
Lady 3Jane.. · 2022-01-25 17:28
>>56046
Lol even god knows that "notes" are gay, epically owned bro
Ender · 2022-01-25 18:24
>>56171
>web
thanks, but i search something more standalone
Agent Richard Gill · 2022-01-25 22:08
>>56185
>whonix
>Irrelevant soykaf, no one uses this soykafe
It's easy and convenient to use in Qubes, so I'd take a guess at least half of Qubes users actively use its gateway instead of botching it themselves.
Yu-ichi · 2022-01-25 22:12
>>56063
>Security requires non-minimalist software, sandboxing, and virtualization. You cannot have security through obscurity or through correctness. You can only have security through isolation and minimal privileges.
Virtualization is not required, sandboxing would be better called isolation, non-minimalist again depends.
So your statement would be better rephrased as "Security requires isolation and minimal privileges".
seL4 is as small as it can be for its goal, and the intent is to ensure the isolation components are correct (through formal verification, which is helped by a smaller code-base). Programs running on it are also intended to have access to exclusively what they need and nothing more.
Drifter · 2022-01-26 13:52
>>56214
Qubes is used by LARPers
Live Action Roleplayers
not by people actually concerned with security
Unknown · 2022-01-26 14:04
>>56247
That would be true if Qubes didn't actually provide good (albeit different) security solutions.
Lord Nikon · 2022-01-26 14:21
>>56249
>TOR
>virtualization
>containers
no thanks, I'll stick with better software
Guthrie · 2022-01-26 14:24
All the security larping in this thread is based on the fact that you're connected to compromised networks
The real solution is - Don't connect to compromised networks
Batou · 2022-01-26 14:27
>>56253
contd.
All "trust" 𝚌irclejerkery is based on a human problem on a fundamental level, and software isn't meant to solve human problems. "Trust" and "security" is all a big sham
Ivan Horvat · 2022-01-26 16:13
>>56255
What? If software isn't meant to solve human problems why it exists then? Every technology exists to solve human problems.
Nanashi No Gombe · 2022-01-27 07:21
>>56259
Seconded. Technological progress is nothing but "how to make x easier".
>>56255
Technology is fundamentally meant to make life easier. The most basic example is forging a knife, to cut things better. What you may see as 'not meant to solve human problems' is just the abstraction of technology from the immediate purpose of making life easier. Just because it is abstract, doesn't mean it doesn't have it's purpose in solving simple problems. The most basic example for this abstraction is an anvil. It's of no immediate use to someone who just wants to solve everyday problems, and any other surface works for most purposes, but for blacksmithing it is almost indispensable, as it helps immensely in the process of making high quality metal tools, which can then be used to make life easier for others. Just because the big computer does not tell me how to make my crops grow faster, doesn't mean it's not helping humanity in solving it's problems, it just does it through secondary effects.
Donna Hawthorne · 2022-01-27 13:28
>>56302
>>56259
"Human problem" means social, moral problems and problems generally related to interactions between humans, not just any problem you encounter in your life. Software can never and will never be able to solve actual, human problems, and all software "solutions" to human problems will inevitably become bloated and unsuccessful
Cowboy · 2022-01-31 02:44
>>56044
not sure if anyone would be interested but I wrote a little program called lsv. Its ~200 loc. Basically its ls -l but with more colors. Doesn't have the bullshit that exa does, but has more colors than ls --color (at least gnu's).
Trinity · 2022-01-31 03:17
>>56498
forgot to give a link:
https://github.com/TogoorooDev/lsv
Morpheus · 2022-02-04 07:28
I've built my whole workflow on minimal software:
- On login, `pam-gnupg` uses my Linux password to unlock my personal-use GPG key. This key is used by `pass` to manage passwords, and encrypts misc. sensitive files. Any programs that needs pubkey auth (OpenSSH), I add as a subkey. Any programs that need password auth (email, irc), I integrate with pass. Perfect-world, I only need to type in my password on login once to unlock all sensitive files and authenticate literally everything else.
- I haven't found a program to do in-place editing gpg-encrypted files, so I made one.
- Hotkey to list all my projects in a dmenu. On selection, it opens a terminal and vim session in that directory and I immediately start working
- Speaking of vim, I bind ,c and ,p to two filetype-aware "compile" and "preview" scripts. "compile" is mainly for single-file one-off sources, and "preview" is for a smaller set of files (like .tex and .troff to preview pdf files).
- I manage various OpenBSD servers (which have a different set of manpages to my Linux wokstation), so I have a script that lets me choose a remote host, choose from a list of its manpages, and then previews it as a PDF doc (ssh example.com man pf -Tpdf).
- Hotkey to launch vim session of today's journal entry, which is encrypted/decrypted on the fly
- Hotkey to launch vim session of accounting book (driven w/ `ledger`) and a terminal running `watch` to print monthly budget & usage. This is specifically important for me because I want to minimize any resistance for keeping track of my spending.
- Hotkey for cmus music player. Runs on-top of tmux so I can detach and still listen to my music (which I can seek with hotkeys, of course)
This is put together makes a very /comfy/ workflow:
- Wake up middle of the night from strange dream, write about it in journal.
- Login to remote server, troubleshoot soykafd. use man command to view remote manpage so I don't have to install soykafd locally. Fix, close window
- List my projects and pick one I've been working on. Immediately get to work. Tab over to side terminal to `make` or use git every so often -- or, if on lisp, just close the spare term and interact with SLIME.
- Found an issue, go to new workspace and create standalone source file. Hit ,c to compile it on the fly, see the solution, go back to main project.
Feels good man, Unix is the real IDE
Drifter · 2022-02-05 21:13
>>56050
Qubes is awesome, but I couldn't get sleep and hibernation to work, so I switched back to Void.
Mario Rossi · 2022-02-06 02:17
How can I replace gcc to tcc?
I tried to compile dwm and others with tcc, but kinda different
Batou · 2022-02-06 10:56
>>56720
redefine cc or modify the makefile(s)
Liet Kynes · 2022-02-06 19:37
Is there any good simple pdf viewer? Something to like how feh displays images simply. Every pdf viewer I see has features that are unneccesary (at least, to me). Thinking of trying to build one as a learning project.
Nguoi La · 2022-02-06 19:40
>>56739
mupdf or atril are good.
Agent Richard Gill · 2022-02-06 20:00
>>56739
zathura?
Frank Garza · 2022-02-06 20:02
>>56720
export CC=gcc
make
Agent Smith · 2022-02-06 20:33
>>56498
neat, I have one important message tho:
using strcmp() on strings that came from "outside world" (outside of program itself) is living on the edge/living dangerously. I would advice ASAP replacing them in code with strncmp
readability suggestions:
if (size >= 1073742000){
newsize = size / 1073742000.0;
ident = 'G';
}else if (size >= 1048576){
newsize = size / 1048576.0;
ident = 'M';
}else if (size >= 1024){
newsize = size / 1024.0;
ident = 'K';
}else {
newsize = size;
ident = 'B';
} I would make these magic numbers constants like for example
enum{
BYTESPERGIGA=1073742000;
BYTESPERMEGA=1048576);
BYTESPERKILO=1024;
};
As for fragments in printdir() function
char fullpath[2048]; I don't think it's particulary clear you use this particular length and not PATH_MAX or the one defined in limits.h where _POSIX_PATH_MAX and _XOPEN_PATH_MAX are typically defined if you aim to follow these standards or just make code work even on systems where full path might be longer than 2048 as there are such systems. Also see discussion at https://stackoverflow.com/questions/65702034/getcwd-vs-get-current-dir-name
and further
char umode[48];
char gmode[48];
char amode[48];
I would suggest some self explanatory constant instead of directly writing a magic number as size of array
also the fact you insert variable definition that deep into code instead at the beginning of a function might suggest you intend to implement functionality that is deserving becoming separate function.
Undisclosed · 2022-02-07 02:43
>>56743
thanks for the feedback, I'll switch that around.
The Phantom Phreak · 2022-02-07 05:04
>>56044
My local weather station has a .jpg on their website with the weekly/daily weather that gets updated every few hours.
I have a script that automatically downloads it to /tmp and opens it.
Yet Another Lainon · 2022-02-07 07:10
>>56750
I would suggest posting that repo to hacker news (https://news.ycombinator.com), you might get a lot more feedback there. Also keep in mind that code working at this level of operating system might occasionally require adding some tweaks that are specific only to certain UNIX variant.
I myself few years ago found such case in code of pretty popular tool while running it on FreeBSD - it was not working as expected because FreeBSD implementation of certain function was returning different error code in a specific case than it would on Linux based environment. So do not get frustrated too much about that stuff as such problems are being expected to surface at some point. That tool where I found an issue has been developed for well over a decade at that point and in a very wide use. That problem only came to light because system I was running it on had a rare nonstandard configuration.
Lady 3Jane.. · 2022-02-07 07:32
>>56750
I took a look into your current version and you left path allocation to an arbitrary 2048 while switching fullpath size to PATH_MAX, now imagine what happens if PATH_MAX is longer than 2048. This is exactly why you should use constants instead of putting magic numbers directly, because you can easily lose orientation what is connected with what and why is a number you are using exactly of that value and not of another, especially after longer time. Using constants in such cases also shortens time needed to understand the code by people who are new to your code. Without that any details and reasons why you used certain values might be unclear to the reader or even lost forever introducing risk of introducing well hidden bugs by future developers that might come to light only in rare occassions but when they happen in real life they might have devastating consequences.
XERXES · 2022-02-07 08:14
>>56044
For jabber, I use Profanity.
https://profanity-im.github.io/guide/0100/presence.html
Delilah · 2022-02-07 10:27
>>56739
zathura with mupdf plugin.
Drano · 2022-02-07 10:28
>>56760
Profanity is good. I wish there's a bulit-in proxy setting.
Arisu Mizuki · 2022-02-09 19:28
The average user does not care about minimalism and just uses whatever he wants (probably electron "apps" and google chrome).
The advanced users prefers minimalist software due to it's smaller codebases, less dependencies, configurability, security, better design, and no feature/scope creep.
The retarded glitterboy prefers minimalist software because of the memes.