3 ms·
I want to hack on my system's source code
Hi HN,
I now feel I'm confident enough to modify the source code of the software I use everyday, so I'd like the ability to do so. Put simply, I want a daily-use desktop system (linux or BSD) on which I can instantaneously modify some source code to fix bugs or add new features if I want to. I need it to be stable --granted that my modifications might break something--, upgradable, and in general easy to use, with the exception that I'd need to compile stuff.
As I feel comfortable using Debian, there's the option of downloading the source package for that specific software I want to modify, which puts you in conflict with already installed packages. BSD ports and Gentoo's portage allow this. They allow you to build a system from scratch, you actually use upstream code with some patches to adapt it to your system, and it's easy to hack something, recompile it and make install.
Then there's the issue of source code clarity. Here's mkdir.c:
* Linux http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/mkdir.c
* OpenBSD http://www.openbsd.org/cgi-bin/cvsweb/src/bin/mkdir/mkdir.c?rev=1.24;content-type=text%2Fx-cvsweb-markup
* Plan9base (just for fun) http://git.suckless.org/9base/tree/mkdir/mkdir.c
Up to this point, it seems that the only feasible choices are LFS (too complicated to install), Gentoo (GNU code is kind of bloated), and then the BSDs.
Of those, Open's documentation is excellent, and Net's code is simple and clear. Both would work. However, I read OpenBSD's documentation, and it states explicitly that "you probably want to use precompiled packages". I'm unsure if that is to discourage newbies or honest advice.
I want to be able to modify the desktop software I'm running, and I'd like some advice from fellow readers who might already have a setup like this one. My biggest fears are upgrades, new upstream versions with new patches on software I've modified, or new system releases. Is this unmaintainable on the long run?
Thanks!
- lumberjack 14y agohttps://www.gnu.org/software/stow/ https://www.gnu.org/software/stow/ I've never used it but if I understand correctly GNU Stow allows you to manage the programs you build from source. You will obviously install them in different directories than the one's installed using apt-get, either in you home directory or in .../local/. This can be used with whatever distro you like.
- catenate 14y agoMaybe use and hack on Inferno? It's a VM which runs over Windows, Linux, and MacOS, and provides a stripped-down unixy environment evolved from Plan 9. The entire OS and VM is compiled from source, it's a relatively small and efficient codebase, and you learn some newer OS ideas along the way. It's written in the programming language Limbo, which is sort of half-way between C and Go. (There's a book on systems programming in Inferno with Limbo to help you along.) Best of all, when you mess something up, you can just fall back to your host OS, so you can try more. (And don't worry about upgrades, the latest full release was in 2004.;)
- carlesfe 14y agoI already know about Inferno, but unfortunately, it's an experiment and can't be used on a daily basis. Some of the underlying ideas are great, though!
- catenate 14y agoshrug I use it on a daily basis, over top of Linux, mostly. I've used Wily/Acme-SAC/Acme as my programming and OS interface for the past 10 years (2003-), after 11 years of Emacs (1992-2003). Both systems are completely reprogrammable, and Inferno has the advantage of being an actual OS (as opposed to a kitchen sink). I recommend it because it's a good way to get the feeling that you know the whole system, which you seem to be interested in, like the early home computers. I think the major three OSes are a little too big and bloated to get the same feel. Also, since it's a VM, you can take it around to other machines, and share it with other people, without changing the base OS they use.
- carlesfe 14y agoThanks for the tip, but it's not what I aim for. You say you use Inferno over Linux. It's my daily linux apps I would want to tweak: Firefox, mutt, vim, eog, etc. I don't want to learn about operating systems... I just want to hack my daily apps. Thanks again, I might try to hack Inferno itself. I ran it on a VM some months ago and it seemed nice.