From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3772 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: embedded newbies site. Date: Mon, 29 Jul 2013 14:54:51 -0500 Message-ID: <1375127691.3031.39@driftwood> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375127709 27979 80.91.229.3 (29 Jul 2013 19:55:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 19:55:09 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-3776-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 29 21:55:10 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1V3tXA-00046I-8c for gllmg-musl@plane.gmane.org; Mon, 29 Jul 2013 21:55:08 +0200 Original-Received: (qmail 24511 invoked by uid 550); 29 Jul 2013 19:55:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24503 invoked from network); 29 Jul 2013 19:55:07 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:subject:to:cc:in-reply-to:x-mailer:message-id :mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=F9UxldO4UQD8vkhKpd5uBF349s8gpZjVlx7Z4VF4hjw=; b=HNsyGrSNLT70LMU2SzRcti35yKSjRWG4jNbLbngA0RR0mL3avqSCn/lN4BWxenGtLw RCQATTjjNs+hzDIbdaZvGDXbuOeEZlHyr/x36wZ42eOyL6VsHoTO1NYBlhNkdSaAK/of rd7FXfuOpziAxsT8l13/u2yrBdlOzfiNHHJq8VDzexyLKR3oVYK6pxddTkw7HkHWLv7c MUq1Rm6adLMzqLHWpT0MoqPlVBufHO0iWDQlvUN0kIwGZRDxJrrzdmfH9Wnx2qeSJDov KFTmtWa8JnGjemr/bf4jusA4VphgFWeBMS4Jm6RGm0oDDseVbjB/SP64pDUTihfQGMwV OOrQ== X-Received: by 10.58.24.201 with SMTP id w9mr26577450vef.82.1375127695596; Mon, 29 Jul 2013 12:54:55 -0700 (PDT) In-Reply-To: (from strake888@gmail.com on Fri Jul 26 21:01:48 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQlA6f2BNzEXVOdNlalNie/3l7RkZMMCNAVlAdmofaUdPXpWvooi+mGVMiu21eMDZxdBnCjw Xref: news.gmane.org gmane.linux.lib.musl.general:3772 Archived-At: On 07/26/2013 09:01:48 PM, Strake wrote: > On 26/07/2013, Rob Landley wrote: > > On 07/22/2013 07:12:39 PM, Strake wrote: > >> On 21/07/2013, Rob Landley wrote: > >> > What did you have in mind? > >> > >> >> > - efficient (elegant) programming > >> >> > - Why C and scritpting languages, why NOT C++ and autoconf > >> > >> This. Too, why not glib, and other such garbage. > > > > Never having used glib, I'm not qualified to warn people away from =20 > it. >=20 > I used it little, just to hack surf and jumanji, but I found > insanely_long_function_names, poor docs of what allocates or frees > what, wanton type synonyms, and generally a tangled mess. >=20 > I gave up. >=20 > This may not be glib alone, but glib surely seems guilty too. >=20 > > I _have_ used C++ fairly extensively >=20 > this -> beSorry (); >=20 > >> including, particularly, polymorphism and composability. > > > > I don't know what you mean by this. (I remember the buzzwords, =20 > but...) >=20 > Polymorphism: not need to rewrite essentially the same code for each =20 > type. > Haskell wins at this, but is not quite a systems language (^_~) > C at least has void pointers, which work in some cases. C++ templates don't make you write the same code for each type, instead =20 they generate code for each type bloating the executable tremendously =20 and making you reverse engineer their code generation when a bug =20 happens in the middle of it or you have to trace back through it to =20 understand what the code actually did. Java has a similar failure where they use templates to punch holes in =20 their type system and the result is your tools generate buckets of =20 template code so one year old java projects with three developers with =20 more than a million lines of code are not actually that unusual. The difinitive (long) Java takedown: http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html > Composability: write functions to do one thing well, and have them > call other functions, perhaps passed as arguments, to do other things, > or better yet, not do them at all. For example: "Damn, I wish I could > define my own comparator/reader/whatever function here!" Um, unix has this at the command line level. C has had this from day 1 =20 (it's why it has function pointers). Nobody ever needed a buzzword for =20 it, because it's not special. > > By "code reuse" I meant it's very easy to suck in a lot of code you > > never have a first user for by grabbing a library that does 1000 =20 > things > > of which you need 3. Environmental dependencies are a form of code > > complexity, but it's invisible because you seem virtuous by =20 > requiring > > the whole gnome library suite for what turns out to be a network =20 > daemon. >=20 > Yes, so that particular library loses, but factorization wins. "factorization" is a word now? > > Alternately, "infrastructure in search of a user" is as bad as > > premature optimization: hold off writing code until you actually =20 > need > > it. >=20 > Worse: it may never save any time at all! It generally costs time. > > My aboriginal linux 260 slide presentation described why native > > compiling under emulation is better than cross compiling. One reason > > was throwing processor time at the problem instead of throwing > > engineering time at the problem. Moore's Law helps with one of =20 > these. >=20 > Ah yes, "engineer competence doubles every 18 months" (^_^) Sometimes the tools get better. But often they go down blind allies, =20 and then refuse to back out of their cul-de-sac because they made =20 _progress_ for a year or so before encountering the dead end, and they =20 refuse to abandon all that work they've done on the properties of =20 caloric fluid migrating through the ether. Rob=