Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #151993
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: pure C90 environment |
| Date | 2020-05-03 22:06 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87a72o4tjs.fsf@bsb.me.uk> (permalink) |
| References | (7 earlier) <tehrG.278453$CO1.219175@fx27.am4> <87r1w23t9p.fsf@bsb.me.uk> <fvmrG.240019$dx4.196112@fx05.am4> <87lfm94til.fsf@bsb.me.uk> <kuyrG.215050$MU3.101940@fx38.am4> |
Bart <bc@freeuk.com> writes: > On 03/05/2020 03:55, Ben Bacarisse wrote: >> Bart <bc@freeuk.com> writes: > >>> Yet, it's not quite as clean as the dynamic code, >> >> Your code appears to have some string operations built-in. > > This one of my gripes against C++, because it provides a complex > toolkit for adding such operations instead of just providing them. The language does provide them. The code I posted uses them alone and no user-defined operations. > The > result is a very difficult language, and 'built-in' features that are > very cumbersome to use. I posted the code because I think it shows that C++'s strings are not "very cumbersome" to use. >> It's even >> simpler written in a language that has lots of string operations >> built-in. In Perl it's just >> >> s/$old/$new/g > > It's not quite that simple. The test is rigged (unintentionally, I am sure). I can rig the test the other way: how does your language do the substitution for every line of any number of input files? > 12,000 files and 500MB later, I can recommend a good book, but that might be too last century for you. > I found I needed to do this: > > $newtext = $text; > $newtext =~ s/lived/LIVEDFOREVER/g; > > Like that, it was still somewhat slower than my interpreter On your system, using whatever Perl you found and using whatever libraries that happens to use. On my system, with a recent Linux 64-bit version of Perl it's about twice the speed of your interpreter. Neither statement says anything of any importance. >>> and I had some fun trying to figure out how to pass such a string to >>> fwrite. >> >> Well, it's an odd thing to do, so I am not surprised by that. > > Part of the task is the write the result to a file (and not by the > crude way of writing to a console and capturing the output, mixed up > with any messages such as timing results). Why would anyone do that? Much better to write to std::cout and, if your system software is half decent, the timing text can be kept separate. (Of course, for the purposes of comparison, my C++ driver copies the "named file in, named file out" method from when I started programming in the 70s.) > The original used > fwrite. Maybe there is a way of directly writing a 'string' object to > a file, but I didn't know what that was either. The original was in C. No one expects you to know C++, but your experience of twisting the language's arm to write a std::string using fwrite does not add anything technical to the discussion. -- Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-01 22:19 -0700
Re: pure C90 environment fir <profesor.fir@gmail.com> - 2020-05-02 01:24 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 01:56 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 02:06 -0700
Re: pure C90 environment shi84516584@gmail.com - 2020-05-19 17:53 -0700
Re: pure C90 environment fir <profesor.fir@gmail.com> - 2020-05-02 02:07 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 02:23 -0700
Re: pure C90 environment shi84516584@gmail.com - 2020-05-19 17:55 -0700
Re: pure C90 environment Philipp Klaus Krause <pkk@spth.de> - 2020-05-02 11:05 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 02:14 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-03 22:33 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-03 16:18 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-04 00:35 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-03 17:54 -0700
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-03 18:38 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-03 18:51 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-04 09:36 +0200
Re: pure C90 environment James Harris <james.harris.1@gmail.com> - 2020-05-04 08:48 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 01:12 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-04 15:16 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 06:21 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-04 15:40 +0200
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-04 07:12 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-04 14:47 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 07:08 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 08:12 -0700
Re: pure C90 environment BGB <cr88192@gmail.com> - 2020-05-05 11:36 -0500
Re: pure C90 environment James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-19 11:25 -0400
Re: pure C90 environment James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-19 11:39 -0400
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-19 08:45 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 17:43 +0200
Re: pure C90 environment James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-19 12:35 -0400
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 20:14 +0200
Re: pure C90 environment James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-19 14:42 -0400
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 12:11 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 21:46 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 13:11 -0700
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-19 14:39 -0700
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-19 13:24 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-20 09:26 +0200
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-19 21:11 +0000
Re: pure C90 environment James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-19 18:51 -0400
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-19 23:26 +0000
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-20 09:33 +0200
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-04 11:49 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 04:00 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-04 17:58 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-04 10:18 -0700
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-04 13:57 -0700
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 12:11 +0200
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-02 11:26 +0100
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 13:06 +0200
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-02 04:26 -0700
Re: pure C90 environment fir <profesor.fir@gmail.com> - 2020-05-02 04:53 -0700
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 16:21 +0200
Re: pure C90 environment fir <profesor.fir@gmail.com> - 2020-05-02 11:20 -0700
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 16:20 +0200
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-02 07:33 -0700
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 16:35 +0200
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-02 17:30 +0100
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 18:37 +0200
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-02 18:18 +0100
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 19:25 +0200
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-02 19:25 +0200
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-02 22:45 +0100
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-02 23:29 +0100
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-03 03:55 +0100
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-03 13:07 +0100
Re: pure C90 environment fir <profesor.fir@gmail.com> - 2020-05-03 05:24 -0700
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-03 05:26 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-03 14:27 +0100
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-03 22:38 +0100
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-03 22:06 +0100
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-04 00:28 +0100
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-03 02:16 -0700
Re: pure C90 environment Öö Tiib <ootiib@hot.ee> - 2020-05-03 16:23 -0700
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-04 16:41 +0200
Re: pure C90 environment Bonita Montero <Bonita.Montero@gmail.com> - 2020-05-04 16:59 +0200
Re: pure C90 environment Öö Tiib <ootiib@hot.ee> - 2020-05-04 11:01 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-02 11:13 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 03:53 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 05:14 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 06:30 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-02 12:49 -0700
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-13 03:01 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-13 14:43 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-17 06:30 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-17 05:41 -0700
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-17 13:02 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-17 22:47 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-17 14:03 -0700
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-18 08:54 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 06:11 -0700
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-18 06:51 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 07:12 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-18 15:47 +0100
Re: pure C90 environment Manfred <noname@add.invalid> - 2020-05-18 16:25 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 07:41 -0700
Re: pure C90 environment Manfred <noname@add.invalid> - 2020-05-18 17:32 +0200
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-18 17:09 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 08:52 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-18 17:05 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 09:18 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 19:55 +0000
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-19 01:42 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 20:35 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 16:12 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 10:02 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 17:42 +0000
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-19 18:16 +0100
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 13:00 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 05:09 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-19 15:20 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 08:18 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-19 17:58 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 10:45 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-19 19:31 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 11:58 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-19 20:44 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 13:03 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-19 22:34 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 15:41 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-20 00:03 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 16:10 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-20 01:46 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 22:49 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-20 11:26 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 04:43 -0700
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-19 16:40 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-19 23:11 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 11:40 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 05:48 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 06:19 -0700
Re: pure C90 environment Bart <bc@freeuk.com> - 2020-05-20 16:38 +0100
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 09:15 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 09:37 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 10:43 -0700
Re: pure C90 environment Öö Tiib <ootiib@hot.ee> - 2020-05-20 10:58 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 11:36 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-20 12:37 -0700
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 17:43 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 17:58 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 18:03 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 18:29 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 19:54 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 20:01 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 20:04 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-10 21:07 -0800
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-03-10 23:10 -0800
Re: pure C90 environment "muta...@gmail.com" <mutazilah@gmail.com> - 2021-03-11 01:21 -0800
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2021-03-11 15:26 +0000
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 17:18 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-19 09:52 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 17:39 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 16:17 +0000
Re: pure C90 environment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-05-19 22:54 +0100
Re: pure C90 environment Ian Collins <ian-news@hotmail.com> - 2020-05-20 10:17 +1200
Re: pure C90 environment Manfred <noname@add.invalid> - 2020-05-19 16:28 +0200
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 17:30 +0200
Re: pure C90 environment Manfred <noname@add.invalid> - 2020-05-19 19:39 +0200
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-18 15:12 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 19:51 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 13:02 -0700
Re: pure C90 environment Manfred <noname@add.invalid> - 2020-05-18 15:52 +0200
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-18 17:15 +0200
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-18 20:10 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 13:18 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-18 23:21 +0000
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 13:21 +0200
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 13:12 +0200
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 16:21 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 19:48 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 19:47 +0000
Re: pure C90 environment David Brown <david.brown@hesbynett.no> - 2020-05-19 13:23 +0200
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-17 13:54 -0700
Re: pure C90 environment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-05-17 16:45 -0700
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-17 17:27 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-18 14:44 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 08:17 -0700
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-18 21:39 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 21:58 +0000
Re: pure C90 environment Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-18 16:40 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 00:22 +0000
Re: pure C90 environment antispam@math.uni.wroc.pl - 2020-05-19 00:27 +0000
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-19 16:10 +0000
Re: pure C90 environment Paul Edwards <mutazilah@gmail.com> - 2020-05-18 14:59 -0700
Re: pure C90 environment scott@slp53.sl.home (Scott Lurndal) - 2020-05-18 20:01 +0000
Re: pure C90 environment Ian Collins <ian-news@hotmail.com> - 2020-05-18 13:25 +1200
csiph-web