public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: msk@strikr.io
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: [RFC] database with API information
Date: Fri, 9 Sep 2022 16:06:21 +0100	[thread overview]
Message-ID: <CAH6eHdQtfrNSYU+K-=wjKEMY+N3gAB344+K=oLL7h3JLN+CT_Q@mail.gmail.com> (raw)
In-Reply-To: <C0CBB085-E734-434A-8112-08F9D9FC487A@strikr.io>

On Fri, 9 Sept 2022 at 13:06, SAIFI <msk@strikr.io> wrote:
>
> On 9 September 2022 11:47:30 am UTC, Jonathan Wakely <jwakely.gcc@gmail.com> 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.

  reply	other threads:[~2022-09-09 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  6:22 Ulrich Drepper
2022-09-07 10:56 ` Richard Sandiford
2022-09-07 12:33   ` Martin Liška
2022-09-09 15:26     ` Iain Sandoe
2022-09-09 17:07       ` Ulrich Drepper
2022-09-09 17:13         ` Iain Sandoe
2022-09-09 11:40 ` SAIFI
2022-09-09 11:47   ` Jonathan Wakely
2022-09-09 12:29     ` SAIFI
2022-09-09 15:06       ` Jonathan Wakely [this message]
2022-09-09 16:41         ` SAIFI
2022-09-09 18:21           ` Jonathan Wakely
2022-09-09 18:40             ` SAIFI
2022-09-09 20:05               ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6eHdQtfrNSYU+K-=wjKEMY+N3gAB344+K=oLL7h3JLN+CT_Q@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=msk@strikr.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).