X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Mon, 10 Aug 2015 18:15:23 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Levente (leventelist AT gmail DOT com) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] gEDA on FreeBSD In-Reply-To: Message-ID: References: <20150809131504 DOT 4d5ad4f8 AT jive DOT levalinux DOT org> <20150810122457 DOT GA19015 AT localhost DOT localdomain> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 10 Aug 2015, Levente (leventelist AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: >Good old days... :-) single Unix operating system. My dream. > >I think we struggle too much with all these Unix variants. > There is also another very important aspect. All the code is astonishingly simple and small. I've just opened the libc implementation of popen() and pclose(). It's a single C file, 55 lines total. It's not a wrapper around some internal popen()/pclose(), it really creates the pipe, forks, calls execl. It includes two headers (stdlib.h and signal.h, easy to foresee what they are going to be used for). The code is to the point, plain and simple. I think it's not only about having one UNIX variant and smaller amount of hardware, it's also about making APIs more advanced (complicated) over time, implementing workarounds that will require more workarounds in turn, etc. Looking at the glibc implementation, it's 381 lines just for popen() - if I even found the right file. Yeah, it "has to" deal with close-on-exec, pipe() vs. pipe2(), set up some complex IO structs... It's hard to follow the code riddled with #ifdefs. It includes 10 headers. To be fair, not all parts of V7 is like that: the Bourne shell's soruce, for example, is pretty ... strange. If I was shown a few dozen lines from the middle of any .c, I wouldn't even tell it's written in C. Regards, Igor2