From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id C05D93858C52 for ; Fri, 9 Sep 2022 15:06:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C05D93858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x634.google.com with SMTP id fy31so4665102ejc.6 for ; Fri, 09 Sep 2022 08:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=8MTefEtAlQyiNhNeMk/6Ue08d4C6cJ7NU9XNjGjrFlw=; b=o0CXMY5R/+MWNb5opfX8znJWHh9+mbizlkscGnr7yi8PRFQ4DEmSlUGH9g/CIcWguh /VySvmLWboXvYS4LlcnEHlg4uarh9AkflDYC45IOB81Yo0SVgtBmg2aIbuEA6Z87jRTF 8kZffcUviRvQPRZSElfQxIQRaapWH7dSbgFYj2vtuAKPan8fNre8XUawB1RAYasik14m GGospQ1uWJ0kaVk9RJhY0ag9TK0+U+zoxUJ8zBEsvuzpdOvowleoYgFLeaVXuvJ7fJ+y w6WcFezZICd5rIhqAi16jj2PERGQjjIuasksofQJIGh8zhIxJeXTrJNNsKsP/K66dj0P 0bQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=8MTefEtAlQyiNhNeMk/6Ue08d4C6cJ7NU9XNjGjrFlw=; b=rUP1EECOiH1cHURE29JA8Bv3w31c8cVBwq1z4wf7A0X+LuNCQ+IAUcmfgq+04MsdyE XwfMjVAUOttmhvO45LK6a74bL30Kox3Q1uSOtKDofscam82aT9MwIdHTFrM/ictP63W8 niT/04ClU6l8AVQIxEpzlp9V7pR3SIv4Q5somYRa88MXjuqBXLgeu63cFjSqOBWlwiG0 80fYKb/b56Ix8EatybDX1tIJ7/7sSEgv6OJt+aFnUoywLIgdgld2AZ1RNsVV3OpF71TZ r3KQtF1yWkttYsuz5qly2M8sEUI/5z2SScW4StpztNBtcS8HMBPi6B34UVuX0vDmE5Ww TUEw== X-Gm-Message-State: ACgBeo3qCPHYq0vOF0eaB4BD+Yg1XgjM5QymaFTVAgLChArvXJcHe/RH Q6zbHSUfpEbKKzjXoGElZPLHZOcUBCorEJLeDO4= X-Google-Smtp-Source: AA6agR6vIjFptqh/xhXyN2DIt1qk4wd+Gg5wWO/1fxhvFPQqmeLb54Z88oMm4Kkj97zEWV/+uzlejLhEq27Mrjz/zGs= X-Received: by 2002:a17:907:1dcc:b0:77a:c5f3:708b with SMTP id og12-20020a1709071dcc00b0077ac5f3708bmr47619ejc.331.1662735993194; Fri, 09 Sep 2022 08:06:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 9 Sep 2022 16:06:21 +0100 Message-ID: Subject: Re: [RFC] database with API information To: msk@strikr.io Cc: "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 9 Sept 2022 at 13:06, SAIFI wrote: > > On 9 September 2022 11:47:30 am UTC, Jonathan Wakely wrote: > >On Fri, 9 Sept 2022 at 12:17, SAIFI wrote: > >> > >> > > >> > let's use a simple database, a CSV file for simplicity, and generate both files from this. > >> > >> Curious to learn, why wouldn't you want to do it in C++ itself ? > >> > >> As an example, please see > >> https://github.com/cplusplus/lib-issues-software > > > >That repo has been dead for years, maybe you want the still maintained code at: > >https://github.com/cplusplus/LWG/tree/master/src > > > >I'm not persuaded that 4000 lines of C++ code for processing XML into > >HTML is really a good alternative to 150 lines of Python. > > To quote again, the OP words for emphasis, "let's use a simple database, a CSV file for simplicity, and generate both files from this." > > Do you think the effort estimate to implement this requirement is "4000 lines of C++" ? No, but it was you who linked to the LWG repo with 4000 lines of C++, I don't know why. > Am i missing something here ? OK ... This script would be needed to bootstrap GCC. Using C++ would mean that we need to restrict it to C++11 (since that's all that is needed for bootstrapping GCC), and deal with all the peculiarities of the platform's C++ compiler and linker. We already do that to build GCC itself, but now we'd also need to do it for this tool that has to be built first, and would need to use all the right CXXFLAGS and LDFLAGS etc. to compile on the build machine (which might have unconventional linker properties, for example). We'd also need to implement a CSV parser from scratch. Or we could just use 150 lines of Python, which already has a csv module to do the parsing correctly. C++ is a great tool for some things. For parsing a CSV file and printing out some text there are simpler tools.