Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #396916 > unrolled thread
| Started by | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| First post | 2026-03-12 07:24 +0100 |
| Last post | 2026-03-27 17:03 +0000 |
| Articles | 20 on this page of 231 — 18 participants |
Back to article view | Back to comp.lang.c
Isn't that beauty ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 07:24 +0100
Re: Isn't that beauty ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 07:26 +0100
Re: Isn't that beauty ? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-12 09:32 +0100
Re: Isn't that beauty ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 11:36 +0100
Re: Isn't that beauty ? Janis Papanagnou <janis_papanagnou@hotmail.com> - 2026-03-12 20:15 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-12 10:00 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 15:03 +0100
Re: Isn't that beauty ? (no it's not) tTh <tth@none.invalid> - 2026-03-12 15:27 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 15:34 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 15:13 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-12 10:43 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 16:10 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-12 11:22 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 16:25 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 16:25 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 16:48 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2026-03-12 20:25 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 00:57 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou@hotmail.com> - 2026-03-13 02:19 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 06:14 +0100
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 01:48 -0700
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 09:49 +0100
[OT] AI - questions and answers (was Re: Isn't that beauty ? (no it's not)) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-13 10:27 +0100
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 11:59 -0700
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-12 21:22 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 06:15 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 06:48 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-14 03:29 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-12 16:44 +0100
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-12 17:32 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 00:56 +0100
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 11:54 -0700
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 01:14 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-12 16:18 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 01:06 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 01:27 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 16:11 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 06:01 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-14 01:49 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 07:23 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-14 02:58 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 07:52 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 07:53 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-14 03:05 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 08:10 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-14 03:17 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 08:59 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 09:12 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-14 12:15 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 14:00 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 16:43 -0400
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-16 20:57 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 19:07 -0400
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-17 00:49 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-17 05:21 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-18 12:40 -0400
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-18 17:06 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-18 15:46 -0400
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-18 22:14 +0000
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-19 22:39 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-18 16:14 -0400
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-19 22:42 +0000
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-17 14:46 +0000
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-16 22:26 +0000
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-16 22:35 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 19:09 -0400
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-16 23:17 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 19:21 -0400
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-16 23:34 +0000
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-17 00:09 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 21:45 -0400
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-17 10:42 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-17 13:04 +0100
Re: Isn't that beauty ? (no it's not) Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-17 12:17 +0000
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-17 12:31 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 21:27 -0400
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-16 22:26 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-16 19:41 -0400
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-17 00:29 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-17 05:38 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-17 11:47 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-17 13:08 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-17 12:37 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-18 02:40 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-18 11:21 +0200
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-18 10:49 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-18 15:10 +0000
Re: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-03-18 21:20 +0000
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-18 23:13 +0000
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 13:23 -0700
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-18 11:20 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-18 21:57 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-18 22:01 +0100
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-19 10:43 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 12:23 +0200
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-19 15:22 +0100
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-19 15:07 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 04:16 +0100
Re: Isn't that beauty ? (no it's not) Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-20 02:14 -0700
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 12:38 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-20 13:06 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 13:27 +0100
Re: Isn't that beauty ? (no it's not) Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-20 13:22 -0700
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-21 02:25 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-19 16:13 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 17:41 +0200
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 04:01 +0100
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-20 08:35 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 12:47 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 14:42 +0200
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-22 04:39 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-22 08:33 +0200
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-20 17:10 -0400
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-21 02:53 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-20 22:35 -0400
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-21 14:42 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-22 04:57 +0100
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 12:32 -0700
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-22 04:50 +0100
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-21 15:39 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-22 15:48 -0400
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-22 23:04 +0100
Re: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-03-19 13:28 +0000
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 03:45 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 11:19 +0200
Re: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-19 10:49 +0100
Re: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-03-19 14:09 +0000
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-19 14:49 +0000
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 17:09 +0200
sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 17:29 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-19 18:33 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-19 21:40 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-19 23:53 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-20 00:15 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 05:05 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 12:58 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 12:53 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 13:13 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-20 13:26 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 15:08 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-20 13:43 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 15:51 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) David Brown <david.brown@hesbynett.no> - 2026-03-20 14:47 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-22 02:03 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-22 04:03 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 15:13 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-04-07 02:22 +0300
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 21:00 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-04-07 09:37 +0300
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-07 21:54 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-09 16:06 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-11 09:04 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-11 19:55 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-04-07 14:46 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-07 20:04 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-09 21:15 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-04-10 01:31 +0300
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-12 06:17 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-11 21:32 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-12 04:59 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-26 07:29 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-04-09 23:33 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-10 11:35 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-12 07:13 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-13 20:44 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-25 15:47 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-27 02:04 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-26 22:27 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-27 14:41 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 14:01 +0200
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 13:48 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-04-07 01:58 +0300
Re: sorting Was: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-04-07 01:02 +0100
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-07 08:01 -0700
Re: sorting Was: Isn't that beauty ? (no it's not) antispam@fricas.org (Waldek Hebisch) - 2026-03-19 23:21 +0000
Re: sorting Was: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 18:37 -0700
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-20 04:33 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-20 14:24 +0200
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-22 05:06 +0100
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-03-22 09:30 +0200
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-07 02:12 -0700
Re: Isn't that beauty ? (no it's not) Michael S <already5chosen@yahoo.com> - 2026-04-07 14:00 +0300
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-16 10:23 -0700
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-04-07 16:39 -0400
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-12 11:16 -0700
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-25 00:45 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-17 06:25 +0100
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-20 01:33 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-20 07:42 +0100
Re: Isn't that beauty ? (no it's not) Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-20 12:16 +0000
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-14 16:22 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 18:04 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-14 17:39 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 19:25 +0100
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-13 00:54 +0000
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 00:31 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 06:24 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 01:40 -0400
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 01:34 -0400
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-13 14:38 +0000
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-13 15:31 +0000
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-15 13:15 -0700
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-16 15:18 +0000
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-23 21:23 -0700
Re: Isn't that beauty ? (no it's not) James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-13 18:47 -0400
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-15 14:38 -0700
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 07:24 +0100
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 01:51 -0700
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 09:54 +0100
Re: Isn't that beauty ? (no it's not) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-13 10:29 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 10:33 +0100
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 11:57 -0700
Re: Isn't that beauty ? (no it's not) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-13 11:58 -0700
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-13 14:29 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 08:08 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 04:19 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 09:53 +0100
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 09:56 +0100
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-13 05:10 -0400
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 10:14 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-13 17:32 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-13 18:44 +0100
Re: Isn't that beauty ? (no it's not) Bart <bc@freeuk.com> - 2026-03-13 19:36 +0000
Re: Isn't that beauty ? (no it's not) Bonita Montero <Bonita.Montero@gmail.com> - 2026-03-14 06:03 +0100
Re: Isn't that beauty ? (no it's not) scott@slp53.sl.home (Scott Lurndal) - 2026-03-12 16:56 +0000
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-20 23:07 -0700
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-22 16:55 -0400
Re: Isn't that beauty ? (no it's not) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-26 20:08 -0700
Re: Isn't that beauty ? (no it's not) DFS <nospam@dfs.com> - 2026-03-27 00:35 -0400
Re: Isn't that beauty ? (no it's not) Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-26 21:53 -0700
Re: Isn't that beauty ? (no it's not) gazelle@shell.xmission.com (Kenny McCormack) - 2026-03-27 17:03 +0000
Page 3 of 12 — ← Prev page 1 2 [3] 4 5 … 12 Next page →
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-14 02:58 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p30um$utg$3@dont-email.me> |
| In reply to | #396989 |
On 3/14/2026 2:23 AM, Bonita Montero wrote:
> Am 14.03.2026 um 06:49 schrieb DFS:
>
>> Your output is messy. What you want to do is iterate the data and
>> find the longest name, then pad spaces after the name so the phone
>> numbers line up.
>
> No, alphabetically ordered. My code exactly does that.
>
>> 88 LOC
>> 16.84MB executable
>> perfect output
>>
>>
>> $ ./dfs names-numbers-unsorted-montero.txt
>> 1. Anna Becker 0170-2233445
>> ...
>
>
> My output is the same without line numbers:
What? Your output is FUBAR. You don't give anyone a list looking like
this:
> "Anna Becker" "0170-2233445"
> "Anna Fischer" "0341-9988776"
> "Anna Müller" "0987-6543210"
> "Ben Meier" "0341-5566778"
> "Ben Richter" "069-3344556"
> "Clara Hofmann" "0157-2233445"
> "Clara Zimmermann" "040-5566778"
> "Tom Bauer" "0171-1122334"
....
> But your code is 101 lines of code, my 25. C really sucks.
88 LOC, and C is great.
Did you notice your 25 lines of C++ turns into a ridiculous 665MB
executable. wtf? 2/3 of a GB for that little bit of processing?
Something's wrong with that language.
But C and C++ are the wrong languages for text processing and formatting
anyway. You want python (or maybe perl, or other text processing
languages).
-------------------------------------------------------------------
import sys
names = []
with open(sys.argv[1],'r') as f:
for line in f:
if line != '\n':
line = line.replace('"','')
names.append(line.strip())
for j, name in enumerate(sorted(names)):
e = [i.strip() for i in name.split(' ') if i]
print("%2d. %-20s %s" % (j+1, e[0] + ' ' + e[1],e[2]))
-------------------------------------------------------------------
$ python3 sortnames.py names-numbers-unsorted.txt
1. Anna Becker 0170-2233445
2. Anna Fischer 0341-9988776
3. Anna Müller 0987-6543210
4. Ben Meier 0341-5566778
5. Ben Richter 069-3344556
6. Clara Hofmann 0157-2233445
7. Clara Zimmermann 040-5566778
8. David Schulz 030-9988776
9. Emma Bauer 0157-9988776
10. Emma Wolf 040-5566778
11. Felix Hoffmann 0711-5566778
12. Felix Neumann 0170-2233445
13. Hannah Wagner 0221-5566778
14. Jan Hoffmann 0711-3344556
15. Jana Zimmer 030-6677889
16. Jonas Klein 030-4455667
17. Jonas Klein 0171-4455667
18. Julia Neumann 0221-3344556
19. Julia Schulz 0228-4455667
20. Laura Fischer 040-9876543
21. Laura Schulze 0228-1122334
22. Lea Richter 0341-1122334
23. Lea Wagner 0151-3344556
24. Lena Fischer 0151-6677889
25. Leon Krause 089-1122334
26. Leon Zimmermann 0711-1122445
27. Leonie Klein 0341-5566778
28. Lukas Hofmann 089-6677889
29. Lukas König 069-7788990
30. Marie Becker 040-4455667
31. Marie Richter 0221-7788990
32. Max Mustermann 0123-4567890
33. Maximilian Keller 030-1122334
34. Mia Keller 089-6677889
35. Michael Braun 0170-9988776
36. Moritz Wolf 0157-4455667
37. Nina Krause 0341-4455667
38. Paul Schäfer 0228-3344556
39. Paul Wolf 030-2233445
40. Peter Schmidt 030-1234567
41. Philipp König 089-9988776
42. Sarah Braun 040-7788990
43. Sarah Lehmann 040-2233445
44. Simon Meier 030-7788990
45. Sophie Neumann 0711-3344556
46. Sophie Wagner 089-2233445
47. Tim Becker 0151-1112223
48. Tim Richter 030-6677889
49. Tim Schäfer 0711-5566778
50. Tom Bauer 0171-1122334
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 07:52 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p30j2$13nd$1@raubtier-asyl.eternal-september.org> |
| In reply to | #396988 |
Now my output is exactly the same as yours with 38 lines instead of 101.
#include <iostream>
#include <regex>
#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>
using namespace std;
int main( int argc, char **argv )
{
if( argc < 2 )
return EXIT_FAILURE;
ifstream ifs( argv[1] );
static regex rxNameTel( R"~(^\s*"([^"]*)"\s*"([^"]*)"\s*$)~" );
struct name_tel { string name, tel; };
vector<name_tel> phoneList;
smatch sm;
for( string line; !ifs.eof(); )
if( getline( ifs, line ) && regex_match( line, sm, rxNameTel ) )
phoneList.emplace_back( sm[1].str(), sm[2].str() );
if( !phoneList.size() )
return EXIT_FAILURE;
sort( phoneList.begin(), phoneList.end(),
[]( name_tel &left, name_tel &right ) { return left.name < right.name;
} );
size_t
maxName = max_element( phoneList.begin(), phoneList.end(),
[]( name_tel &a, name_tel &b ) { return a.name.length() <
b.name.length(); } )->name.length(),
maxLineNo = (ostringstream() << phoneList.size()).rdbuf()->view().size();
string totalNamePad( maxName, ' ' );
size_t iLine = 1;
for( name_tel &phone : phoneList )
{
auto namePad = string_view( totalNamePad.begin(), totalNamePad.begin()
+ (maxName - phone.name.length()) );
cout << setw( maxLineNo ) << right << iLine++ << ". " << setw( maxName
) << left << phone.name << " " << phone.tel << endl;
}
}
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 07:53 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p30kr$13nd$2@raubtier-asyl.eternal-september.org> |
| In reply to | #396990 |
Eh, 35 lines. I forget to remove namePad.
#include <iostream>
#include <regex>
#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>
using namespace std;
int main( int argc, char **argv )
{
if( argc < 2 )
return EXIT_FAILURE;
ifstream ifs( argv[1] );
static regex rxNameTel( R"~(^\s*"([^"]*)"\s*"([^"]*)"\s*$)~" );
struct name_tel { string name, tel; };
vector<name_tel> phoneList;
smatch sm;
for( string line; !ifs.eof(); )
if( getline( ifs, line ) && regex_match( line, sm, rxNameTel ) )
phoneList.emplace_back( sm[1].str(), sm[2].str() );
if( !phoneList.size() )
return EXIT_FAILURE;
sort( phoneList.begin(), phoneList.end(),
[]( name_tel &left, name_tel &right ) { return left.name < right.name;
} );
size_t
maxName = max_element( phoneList.begin(), phoneList.end(),
[]( name_tel &a, name_tel &b ) { return a.name.length() <
b.name.length(); } )->name.length(),
maxLineNo = (ostringstream() << phoneList.size()).rdbuf()->view().size();
string totalNamePad( maxName, ' ' );
size_t iLine = 1;
for( name_tel &phone : phoneList )
cout << setw( maxLineNo ) << right << iLine++ << ". " << setw( maxName
) << left << phone.name << " " << phone.tel << endl;
}
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-14 03:05 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p31b3$utg$4@dont-email.me> |
| In reply to | #396991 |
On 3/14/2026 2:53 AM, Bonita Montero wrote:
> Eh, 35 lines. I forget to remove namePad.
>
> #include <iostream>
> #include <regex>
> #include <fstream>
> #include <vector>
> #include <algorithm>
> #include <sstream>
> #include <iomanip>
>
> using namespace std;
>
> int main( int argc, char **argv )
> {
> if( argc < 2 )
> return EXIT_FAILURE;
> ifstream ifs( argv[1] );
> static regex rxNameTel( R"~(^\s*"([^"]*)"\s*"([^"]*)"\s*$)~" );
> struct name_tel { string name, tel; };
> vector<name_tel> phoneList;
> smatch sm;
> for( string line; !ifs.eof(); )
> if( getline( ifs, line ) && regex_match( line, sm, rxNameTel ) )
> phoneList.emplace_back( sm[1].str(), sm[2].str() );
> if( !phoneList.size() )
> return EXIT_FAILURE;
> sort( phoneList.begin(), phoneList.end(),
> []( name_tel &left, name_tel &right ) { return left.name <
> right.name; } );
> size_t
> maxName = max_element( phoneList.begin(), phoneList.end(),
> []( name_tel &a, name_tel &b ) { return a.name.length() <
> b.name.length(); } )->name.length(),
> maxLineNo = (ostringstream() <<
> phoneList.size()).rdbuf()->view().size();
> string totalNamePad( maxName, ' ' );
> size_t iLine = 1;
> for( name_tel &phone : phoneList )
> cout << setw( maxLineNo ) << right << iLine++ << ". " << setw(
> maxName ) << left << phone.name << " " << phone.tel << endl;
> }
You didn't handle multibyte characters like ä and ö and ü, so the phone
numbers aren't lined up.
1. Anna Becker 0170-2233445
2. Anna Fischer 0341-9988776
3. Anna Müller 0987-6543210
4. Ben Meier 0341-5566778
5. Ben Richter 069-3344556
6. Clara Hofmann 0157-2233445
7. Clara Zimmermann 040-5566778
8. David Schulz 030-9988776
9. Emma Bauer 0157-9988776
10. Emma Wolf 040-5566778
11. Felix Hoffmann 0711-5566778
12. Felix Neumann 0170-2233445
13. Hannah Wagner 0221-5566778
14. Jan Hoffmann 0711-3344556
15. Jana Zimmer 030-6677889
16. Jonas Klein 030-4455667
17. Jonas Klein 0171-4455667
18. Julia Neumann 0221-3344556
19. Julia Schulz 0228-4455667
20. Laura Fischer 040-9876543
21. Laura Schulze 0228-1122334
22. Lea Richter 0341-1122334
23. Lea Wagner 0151-3344556
24. Lena Fischer 0151-6677889
25. Leon Krause 089-1122334
26. Leon Zimmermann 0711-1122445
27. Leonie Klein 0341-5566778
28. Lukas Hofmann 089-6677889
29. Lukas König 069-7788990
30. Marie Becker 040-4455667
31. Marie Richter 0221-7788990
32. Max Mustermann 0123-4567890
33. Maximilian Keller 030-1122334
34. Mia Keller 089-6677889
35. Michael Braun 0170-9988776
36. Moritz Wolf 0157-4455667
37. Nina Krause 0341-4455667
38. Paul Schäfer 0228-3344556
39. Paul Wolf 030-2233445
40. Peter Schmidt 030-1234567
41. Philipp König 089-9988776
42. Sarah Braun 040-7788990
43. Sarah Lehmann 040-2233445
44. Simon Meier 030-7788990
45. Sophie Neumann 0711-3344556
46. Sophie Wagner 089-2233445
47. Tim Becker 0151-1112223
48. Tim Richter 030-6677889
49. Tim Schäfer 0711-5566778
50. Tom Bauer 0171-1122334
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 08:10 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p31m1$1h02$1@raubtier-asyl.eternal-september.org> |
| In reply to | #396993 |
Am 14.03.2026 um 08:05 schrieb DFS: > You didn't handle multibyte characters like ä and ö and ü, so the phone > numbers aren't lined up. No, my output is correct. Don't trust the console, print everyhting into a file with "xxx yyy > filename".
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-14 03:17 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p3236$utg$5@dont-email.me> |
| In reply to | #396994 |
On 3/14/2026 3:10 AM, Bonita Montero wrote: > Am 14.03.2026 um 08:05 schrieb DFS: > >> You didn't handle multibyte characters like ä and ö and ü, so the >> phone numbers aren't lined up. > > No, my output is correct. Don't trust the console, > print everyhting into a file with "xxx yyy > filename". Your output is most definitely NOT correct. Mine is, though. See the setspacing() function to see how I did it.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 08:59 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p34ge$2iot$1@raubtier-asyl.eternal-september.org> |
| In reply to | #396995 |
Am 14.03.2026 um 08:17 schrieb DFS: > Your output is most definitely NOT correct. The problem is that setw( xxx ) on cout doesn't support UTF-8 strings with Visual C++ even if I imbue cout to "de_DE.utf8". I'm looking for a solution without counting the characters myself.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 09:12 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p35aa$2uts$1@raubtier-asyl.eternal-september.org> |
| In reply to | #396995 |
Am 14.03.2026 um 08:17 schrieb DFS:
> On 3/14/2026 3:10 AM, Bonita Montero wrote:
>> Am 14.03.2026 um 08:05 schrieb DFS:
>>
>>> You didn't handle multibyte characters like ä and ö and ü, so the
>>> phone numbers aren't lined up.
>>
>> No, my output is correct. Don't trust the console,
>> print everyhting into a file with "xxx yyy > filename".
>
>
> Your output is most definitely NOT correct.
>
> Mine is, though. See the setspacing() function to see how I did it.
Now it works without imbuing cout to de_DE.utf8:
#include <iostream>
#include <regex>
#include <fstream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>
#include <locale>
using namespace std;
int main( int argc, char **argv )
{
if( argc < 2 )
return EXIT_FAILURE;
ifstream ifs( argv[1] );
static regex rxNameTel( R"~(^\s*"([^"]*)"\s*"([^"]*)"\s*$)~" );
struct name_tel { string name, tel; };
vector<name_tel> phoneList;
smatch sm;
for( string line; !ifs.eof(); )
if( getline( ifs, line ) && regex_match( line, sm, rxNameTel ) )
phoneList.emplace_back( sm[1].str(), sm[2].str() );
if( !phoneList.size() )
return EXIT_FAILURE;
sort( phoneList.begin(), phoneList.end(),
[]( name_tel &left, name_tel &right ) { return left.name < right.name;
} );
static auto length = []( string_view sv ) { return count_if(
sv.begin(), sv.end(), []( char c ) { return (c & 0xC0) != 0x80; } ); };
static auto extents = []( string_view sv ) { return count_if(
sv.begin(), sv.end(), []( char c ) { return (c & 0xC0) == 0x80; } ); };
size_t
maxName = length( max_element( phoneList.begin(), phoneList.end(),
[&]( name_tel &a, name_tel &b ) { return length( a.name ) < length(
b.name ); } )->name ),
maxLineNo = (ostringstream() << phoneList.size()).rdbuf()->view().size();
size_t iLine = 1;
for( name_tel &phone : phoneList )
cout << setw( maxLineNo ) << right << iLine++ << ". " << setw( maxName
+ extents( phone.name ) ) << left << phone.name << " " << phone.tel << endl;
}
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2026-03-14 12:15 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p3jgn$80c7$1@dont-email.me> |
| In reply to | #396991 |
On 14/03/2026 06:53, Bonita Montero wrote:
> Eh, 35 lines. I forget to remove namePad.
>
> #include <iostream>
> #include <regex>
> #include <fstream>
> #include <vector>
> #include <algorithm>
> #include <sstream>
> #include <iomanip>
>
> using namespace std;
>
> int main( int argc, char **argv )
> {
> if( argc < 2 )
> return EXIT_FAILURE;
> ifstream ifs( argv[1] );
> static regex rxNameTel( R"~(^\s*"([^"]*)"\s*"([^"]*)"\s*$)~" );
> struct name_tel { string name, tel; };
> vector<name_tel> phoneList;
> smatch sm;
> for( string line; !ifs.eof(); )
> if( getline( ifs, line ) && regex_match( line, sm, rxNameTel ) )
> phoneList.emplace_back( sm[1].str(), sm[2].str() );
> if( !phoneList.size() )
> return EXIT_FAILURE;
> sort( phoneList.begin(), phoneList.end(),
> []( name_tel &left, name_tel &right ) { return left.name <
> right.name; } );
> size_t
> maxName = max_element( phoneList.begin(), phoneList.end(),
> []( name_tel &a, name_tel &b ) { return a.name.length() <
> b.name.length(); } )->name.length(),
> maxLineNo = (ostringstream() << phoneList.size()).rdbuf()-
> >view().size();
> string totalNamePad( maxName, ' ' );
> size_t iLine = 1;
> for( name_tel &phone : phoneList )
> cout << setw( maxLineNo ) << right << iLine++ << ". " <<
> setw( maxName ) << left << phone.name << " " << phone.tel << endl;
> }
I got it down to 32 lines (you left in 2 blank lines, and there was one
{ on its own line).
Doing the same to DFS's 88 line solution (that is, 88 lines without
comments), it was down to around 80 lines.
In terms of file size, it's about 1.9:1. Both use spaced indents. If I
get rid of leading white space (and some trailing white space in DFS
version), then difference is 1.7:1.
However, even at 1.9:1, the readability of DFS version is far superior.
It's also easier to maintain, and to port.
Your C++ always looks like total gobbledygook. It's also impossible to
port, even to C++ (eg. to older versions).
As for binary sizes, those aren't so interesting: using -Os -s:
BM: 87KB
DFS: 50KB
Compilation time however was very different:
BM g++-Os -s 4.9 seconds, or 6.5 lps
DFS gcc-Os -s 0.3 seconds, or 270 lps
Both are poor frankly, but the C++ was still significantly slower.
When I don't care about size or performance and need a quick build-cycle:
BM g++ -s 4.0 seconds (producing a 280KB file)
DFS tcc 0.05 seconds (producing a 5KB file)
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-03-14 14:00 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p3m4g$8ooo$1@raubtier-asyl.eternal-september.org> |
| In reply to | #397000 |
Am 14.03.2026 um 13:15 schrieb Bart: > In terms of file size, it's about 1.9:1. Both use spaced indents. If I > get rid of leading white space (and some trailing white space in DFS > version), then difference is 1.7:1. Ridiculous, a rough estimate of the relation is sufficient. > Your C++ always looks like total gobbledygook. If you can handle C++ it's easier. > As for binary sizes, those aren't so interesting: using -Os -s: > BM: 87KB > DFS: 50KB My PC has 128GiB of memory. > BM g++-Os -s 4.9 seconds, or 6.5 lps > DFS gcc-Os -s 0.3 seconds, or 270 lps This is worth the less development times. > Both are poor frankly, but the C++ was still significantly slower. It's for sure as slow as most of the time is taken by the kernel flushes to cout / stdout.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-16 16:43 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10p9q0h$2a77o$1@dont-email.me> |
| In reply to | #397000 |
On 3/14/2026 8:15 AM, Bart wrote:
> On 14/03/2026 06:53, Bonita Montero wrote:
>> Eh, 35 lines. I forget to remove namePad.
<snip>
> Your C++ always looks like total gobbledygook.
Not sure you can fix it - it's just how C++ looks.
Without using or looking back at Montero's code, I did my own research
and replicated this little bit of functionality using recommended C++
style and libraries and functions:
read file in
clean data (remove whitespace, remove quote marks)
sort
print
and this is what it looks like:
=================================================================================
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <regex>
#include <iomanip>
using namespace std;
int main(int argc, char* argv[]) {
vector<string> lines; // store all lines
string line; // store one line
regex re_strip ("^\\s+|\\s+$"); // regex to strip whitespace
regex re_quotes ("\""); // regex to remove quote marks
ifstream file(argv[1]); // Open the file
while (getline(file, line)) { // read lines, clean, add to array
line = regex_replace(line, re_strip , "");
line = regex_replace(line, re_quotes, "");
lines.push_back(line);
}
file.close();
sort(lines.begin(), lines.end());
int i = 0;
for (const string& stored_line : lines) {
cout << right << setw(2) << ++i << ". " << stored_line << endl;
}
return 0;
}
=================================================================================
fairly hideous to look at, and 6 includes required?
Even with the -Os compile flag you mentioned, the executable is 101MB.
That's crazy for that tiny bit of functionality.
But for this little code, C++ does some nice things for you: memory
management, easier regex usage, and easier sorting.
But for my money, python is the best tradeoff of ease of use,
readability, speed and functionality.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2026-03-16 20:57 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <V8_tR.311101$8l3.285047@fx07.iad> |
| In reply to | #397014 |
DFS <nospam@dfs.com> writes: >On 3/14/2026 8:15 AM, Bart wrote: >> On 14/03/2026 06:53, Bonita Montero wrote: >>> Eh, 35 lines. I forget to remove namePad. > ><snip> > > >> Your C++ always looks like total gobbledygook. > > >Not sure you can fix it - it's just how C++ looks. > >Without using or looking back at Montero's code, I did my own research >and replicated this little bit of functionality using recommended C++ >style and libraries and functions: > >read file in >clean data (remove whitespace, remove quote marks) >sort >print Technically, your example removes _leading_ and _trailing_ whitespace, no? $ sed -e 's/^[ \t]*//;s/[ \t]*$//' -e 's/"//' < inputfile | sort >But for my money, python is the best tradeoff of ease of use, >readability, speed and functionality. For functionality that can be composed from standard command line utilities, even python loses.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-16 19:07 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10pa2fq$2dtli$2@dont-email.me> |
| In reply to | #397015 |
On 3/16/2026 4:57 PM, Scott Lurndal wrote:
> DFS <nospam@dfs.com> writes:
>> On 3/14/2026 8:15 AM, Bart wrote:
>>> On 14/03/2026 06:53, Bonita Montero wrote:
>>>> Eh, 35 lines. I forget to remove namePad.
>>
>> <snip>
>>
>>
>>> Your C++ always looks like total gobbledygook.
>>
>>
>> Not sure you can fix it - it's just how C++ looks.
>>
>> Without using or looking back at Montero's code, I did my own research
>> and replicated this little bit of functionality using recommended C++
>> style and libraries and functions:
>>
>> read file in
>> clean data (remove whitespace, remove quote marks)
>> sort
>> print
>
> Technically, your example removes _leading_ and _trailing_
> whitespace, no?
Yes.
> $ sed -e 's/^[ \t]*//;s/[ \t]*$//' -e 's/"//' < inputfile | sort
This is what I got from that:
Anna Becker" "0170-2233445"
Anna Fischer" "0341-9988776"
Anna Müller" "0987-6543210"
Ben Meier" "0341-5566778"
Ben Richter" "069-3344556"
...
Not what we're looking for.
>> But for my money, python is the best tradeoff of ease of use,
>> readability, speed and functionality.
>
> For functionality that can be composed from standard command
> line utilities, even python loses.
Sure, but sed and regex are inscrutable.
original Montero file
"Max Mustermann" "0123-4567890"
"Anna Müller" "0987-6543210"
"Peter Schmidt" "030-1234567"
"Laura Fischer" "040-9876543"
"Tim Becker" "0151-1112223"
"Julia Neumann" "0221-3344556"
"Michael Braun" "0170-9988776"
"Sophie Wagner" "089-2233445"
"Felix Hoffmann" "0711-5566778"
"Lea Richter" "0341-1122334"
"Jonas Klein" "030-4455667"
"Emma Wolf" "040-5566778"
"Lukas König" "069-7788990"
"Clara Hofmann" "0157-2233445"
"Paul Schäfer" "0228-3344556"
"Mia Keller" "089-6677889"
"Leon Zimmermann" "0711-1122445"
"Nina Krause" "0341-4455667"
"David Schulz" "030-9988776"
"Sarah Lehmann" "040-2233445"
"Ben Richter" "069-3344556"
"Hannah Wagner" "0221-5566778"
"Tom Bauer" "0171-1122334"
"Lena Fischer" "0151-6677889"
"Simon Meier" "030-7788990"
"Marie Becker" "040-4455667"
"Jan Hoffmann" "0711-3344556"
"Leonie Klein" "0341-5566778"
"Philipp König" "089-9988776"
"Laura Schulze" "0228-1122334"
"Moritz Wolf" "0157-4455667"
"Jana Zimmer" "030-6677889"
"Felix Neumann" "0170-2233445"
"Sarah Braun" "040-7788990"
"Tim Schäfer" "0711-5566778"
"Anna Fischer" "0341-9988776"
"Maximilian Keller" "030-1122334"
"Lea Wagner" "0151-3344556"
"Lukas Hofmann" "089-6677889"
"Marie Richter" "0221-7788990"
"Jonas Klein" "0171-4455667"
"Clara Zimmermann" "040-5566778"
"Paul Wolf" "030-2233445"
"Sophie Neumann" "0711-3344556"
"Ben Meier" "0341-5566778"
"Emma Bauer" "0157-9988776"
"Leon Krause" "089-1122334"
"Julia Schulz" "0228-4455667"
"Tim Richter" "030-6677889"
"Anna Becker" "0170-2233445"
This 12-line python reads the file, strips leading/trailing spaces,
removes quote marks, determines the longest name for spacing (if new
longer names are added it still pretty-prints), and outputs
first-last-phone numbered and aligned and sorted by last-first.
import sys
names = []
longname = 0
with open(sys.argv[1],'r') as f:
for line in f:
line = line.replace('"','')
e = [i.strip() for i in line.split(' ') if i]
ln = len(e[0]) + len(e[1])
if ln > longname: longname = ln
names.append((e[1], e[0], e[2]))
for i,n in enumerate(sorted(names)):
print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
1. Emma Bauer 0157-9988776
2. Tom Bauer 0171-1122334
3. Anna Becker 0170-2233445
4. Marie Becker 040-4455667
5. Tim Becker 0151-1112223
6. Michael Braun 0170-9988776
7. Sarah Braun 040-7788990
8. Anna Fischer 0341-9988776
9. Laura Fischer 040-9876543
10. Lena Fischer 0151-6677889
11. Felix Hoffmann 0711-5566778
12. Jan Hoffmann 0711-3344556
13. Clara Hofmann 0157-2233445
14. Lukas Hofmann 089-6677889
15. Maximilian Keller 030-1122334
16. Mia Keller 089-6677889
17. Jonas Klein 0171-4455667
18. Jonas Klein 030-4455667
19. Leonie Klein 0341-5566778
20. Leon Krause 089-1122334
21. Nina Krause 0341-4455667
22. Lukas König 069-7788990
23. Philipp König 089-9988776
24. Sarah Lehmann 040-2233445
25. Ben Meier 0341-5566778
26. Simon Meier 030-7788990
27. Max Mustermann 0123-4567890
28. Anna Müller 0987-6543210
29. Felix Neumann 0170-2233445
30. Julia Neumann 0221-3344556
31. Sophie Neumann 0711-3344556
32. Ben Richter 069-3344556
33. Lea Richter 0341-1122334
34. Marie Richter 0221-7788990
35. Tim Richter 030-6677889
36. Peter Schmidt 030-1234567
37. David Schulz 030-9988776
38. Julia Schulz 0228-4455667
39. Laura Schulze 0228-1122334
40. Paul Schäfer 0228-3344556
41. Tim Schäfer 0711-5566778
42. Hannah Wagner 0221-5566778
43. Lea Wagner 0151-3344556
44. Sophie Wagner 089-2233445
45. Emma Wolf 040-5566778
46. Moritz Wolf 0157-4455667
47. Paul Wolf 030-2233445
48. Jana Zimmer 030-6677889
49. Clara Zimmermann 040-5566778
50. Leon Zimmermann 0711-1122445
If you can do that with sed and regex and pipes in 1 or 2 lines, I'm
gonna hurl.
[toc] | [prev] | [next] | [standalone]
| From | Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> |
|---|---|
| Date | 2026-03-17 00:49 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10pa8f9$2fuuc$1@dont-email.me> |
| In reply to | #397019 |
On 16/03/2026 23:07, DFS wrote:
> On 3/16/2026 4:57 PM, Scott Lurndal wrote:
>> DFS <nospam@dfs.com> writes:
>>> On 3/14/2026 8:15 AM, Bart wrote:
>>>> On 14/03/2026 06:53, Bonita Montero wrote:
>>>>> Eh, 35 lines. I forget to remove namePad.
>>>
>>> <snip>
>>>
>>>
>>>> Your C++ always looks like total gobbledygook.
>>>
>>>
>>> Not sure you can fix it - it's just how C++ looks.
>>>
>>> Without using or looking back at Montero's code, I did my own research
>>> and replicated this little bit of functionality using recommended C++
>>> style and libraries and functions:
>>>
>>> read file in
>>> clean data (remove whitespace, remove quote marks)
>>> sort
>>> print
>>
>> Technically, your example removes _leading_ and _trailing_
>> whitespace, no?
>
> Yes.
>
>
>> $ sed -e 's/^[ \t]*//;s/[ \t]*$//' -e 's/"//' < inputfile | sort
>
> This is what I got from that:
>
> Anna Becker" "0170-2233445"
> Anna Fischer" "0341-9988776"
> Anna Müller" "0987-6543210"
> Ben Meier" "0341-5566778"
> Ben Richter" "069-3344556"
> ...
>
> Not what we're looking for.
>
>
>
>>> But for my money, python is the best tradeoff of ease of use,
>>> readability, speed and functionality.
>>
>> For functionality that can be composed from standard command
>> line utilities, even python loses.
>
> Sure, but sed and regex are inscrutable.
>
>
>
> original Montero file
>
> "Max Mustermann" "0123-4567890"
> "Anna Müller" "0987-6543210"
> "Peter Schmidt" "030-1234567"
> "Laura Fischer" "040-9876543"
> "Tim Becker" "0151-1112223"
> "Julia Neumann" "0221-3344556"
> "Michael Braun" "0170-9988776"
> "Sophie Wagner" "089-2233445"
> "Felix Hoffmann" "0711-5566778"
> "Lea Richter" "0341-1122334"
> "Jonas Klein" "030-4455667"
> "Emma Wolf" "040-5566778"
> "Lukas König" "069-7788990"
> "Clara Hofmann" "0157-2233445"
> "Paul Schäfer" "0228-3344556"
> "Mia Keller" "089-6677889"
> "Leon Zimmermann" "0711-1122445"
> "Nina Krause" "0341-4455667"
> "David Schulz" "030-9988776"
> "Sarah Lehmann" "040-2233445"
> "Ben Richter" "069-3344556"
> "Hannah Wagner" "0221-5566778"
> "Tom Bauer" "0171-1122334"
> "Lena Fischer" "0151-6677889"
> "Simon Meier" "030-7788990"
> "Marie Becker" "040-4455667"
> "Jan Hoffmann" "0711-3344556"
> "Leonie Klein" "0341-5566778"
> "Philipp König" "089-9988776"
> "Laura Schulze" "0228-1122334"
> "Moritz Wolf" "0157-4455667"
> "Jana Zimmer" "030-6677889"
> "Felix Neumann" "0170-2233445"
> "Sarah Braun" "040-7788990"
> "Tim Schäfer" "0711-5566778"
> "Anna Fischer" "0341-9988776"
> "Maximilian Keller" "030-1122334"
> "Lea Wagner" "0151-3344556"
> "Lukas Hofmann" "089-6677889"
> "Marie Richter" "0221-7788990"
> "Jonas Klein" "0171-4455667"
> "Clara Zimmermann" "040-5566778"
> "Paul Wolf" "030-2233445"
> "Sophie Neumann" "0711-3344556"
> "Ben Meier" "0341-5566778"
> "Emma Bauer" "0157-9988776"
> "Leon Krause" "089-1122334"
> "Julia Schulz" "0228-4455667"
> "Tim Richter" "030-6677889"
> "Anna Becker" "0170-2233445"
>
>
> This 12-line python reads the file, strips leading/trailing spaces,
> removes quote marks, determines the longest name for spacing (if new
> longer names are added it still pretty-prints), and outputs
> first-last-phone numbered and aligned and sorted by last-first.
>
> import sys
> names = []
> longname = 0
> with open(sys.argv[1],'r') as f:
> for line in f:
> line = line.replace('"','')
> e = [i.strip() for i in line.split(' ') if i]
> ln = len(e[0]) + len(e[1])
> if ln > longname: longname = ln
> names.append((e[1], e[0], e[2]))
> for i,n in enumerate(sorted(names)):
> print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
>
> 1. Emma Bauer 0157-9988776
> 2. Tom Bauer 0171-1122334
> 3. Anna Becker 0170-2233445
> 4. Marie Becker 040-4455667
> 5. Tim Becker 0151-1112223
> 6. Michael Braun 0170-9988776
> 7. Sarah Braun 040-7788990
> 8. Anna Fischer 0341-9988776
> 9. Laura Fischer 040-9876543
> 10. Lena Fischer 0151-6677889
> 11. Felix Hoffmann 0711-5566778
> 12. Jan Hoffmann 0711-3344556
> 13. Clara Hofmann 0157-2233445
> 14. Lukas Hofmann 089-6677889
> 15. Maximilian Keller 030-1122334
> 16. Mia Keller 089-6677889
> 17. Jonas Klein 0171-4455667
> 18. Jonas Klein 030-4455667
> 19. Leonie Klein 0341-5566778
> 20. Leon Krause 089-1122334
> 21. Nina Krause 0341-4455667
> 22. Lukas König 069-7788990
> 23. Philipp König 089-9988776
> 24. Sarah Lehmann 040-2233445
> 25. Ben Meier 0341-5566778
> 26. Simon Meier 030-7788990
> 27. Max Mustermann 0123-4567890
> 28. Anna Müller 0987-6543210
> 29. Felix Neumann 0170-2233445
> 30. Julia Neumann 0221-3344556
> 31. Sophie Neumann 0711-3344556
> 32. Ben Richter 069-3344556
> 33. Lea Richter 0341-1122334
> 34. Marie Richter 0221-7788990
> 35. Tim Richter 030-6677889
> 36. Peter Schmidt 030-1234567
> 37. David Schulz 030-9988776
> 38. Julia Schulz 0228-4455667
> 39. Laura Schulze 0228-1122334
> 40. Paul Schäfer 0228-3344556
> 41. Tim Schäfer 0711-5566778
> 42. Hannah Wagner 0221-5566778
> 43. Lea Wagner 0151-3344556
> 44. Sophie Wagner 089-2233445
> 45. Emma Wolf 040-5566778
> 46. Moritz Wolf 0157-4455667
> 47. Paul Wolf 030-2233445
> 48. Jana Zimmer 030-6677889
> 49. Clara Zimmermann 040-5566778
> 50. Leon Zimmermann 0711-1122445
>
>
> If you can do that with sed and regex and pipes in 1 or 2 lines, I'm
> gonna hurl.
I can do something that works with the provided data with util-linux,
sed, awk, and coreutils:
{ sed 's/"//g' | awk '{print $1 " " $2 ":" $3}' | sort -k2 | column -t
-s: | nl -s". " ; } < data
where the file "data" contains the original list. Although there will be
some differences in behaviour for some other data and I think your
python and the above will do unintuitive things with other data.
The pipeline goes as follows:
sed strips quotes
awk makes two delimited columns
sort sorts on surnames, and where surnames are identical on telno
column presents columns with a visual model
nl adds number prefixes
If I really try and use tee and fifos I can use many fewer tools.
None of these are really good languages/toolsets for the task. A DSL
with a data schema would be best.
--
Tristan Wibberley
The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2026-03-17 05:21 +0100 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10pakrn$2jpeu$1@dont-email.me> |
| In reply to | #397027 |
On 2026-03-17 01:49, Tristan Wibberley wrote:
> On 16/03/2026 23:07, DFS wrote:
>> On 3/16/2026 4:57 PM, Scott Lurndal wrote:
>>> DFS <nospam@dfs.com> writes:
>>>> On 3/14/2026 8:15 AM, Bart wrote:
>>>>> On 14/03/2026 06:53, Bonita Montero wrote:
>>>>>> Eh, 35 lines. I forget to remove namePad.
>>>>
>>>> <snip>
>>>>
>>>>
>>>>> Your C++ always looks like total gobbledygook.
>>>>
>>>>
>>>> Not sure you can fix it - it's just how C++ looks.
>>>>
>>>> Without using or looking back at Montero's code, I did my own research
>>>> and replicated this little bit of functionality using recommended C++
>>>> style and libraries and functions:
>>>>
>>>> read file in
>>>> clean data (remove whitespace, remove quote marks)
>>>> sort
>>>> print
>>>
>>> Technically, your example removes _leading_ and _trailing_
>>> whitespace, no?
>>
>> Yes.
>>
>>
>>> $ sed -e 's/^[ \t]*//;s/[ \t]*$//' -e 's/"//' < inputfile | sort
>>
>> This is what I got from that:
>>
>> Anna Becker" "0170-2233445"
>> Anna Fischer" "0341-9988776"
>> Anna Müller" "0987-6543210"
>> Ben Meier" "0341-5566778"
>> Ben Richter" "069-3344556"
>> ...
>>
>> Not what we're looking for.
>>
>>
>>
>>>> But for my money, python is the best tradeoff of ease of use,
>>>> readability, speed and functionality.
>>>
>>> For functionality that can be composed from standard command
>>> line utilities, even python loses.
>>
>> Sure, but sed and regex are inscrutable.
>>
>>
>>
>> original Montero file
>>
>> [...]
>>
>>
>> This 12-line python reads the file, strips leading/trailing spaces,
>> removes quote marks, determines the longest name for spacing (if new
>> longer names are added it still pretty-prints), and outputs
>> first-last-phone numbered and aligned and sorted by last-first.
>>
>> import sys
>> names = []
>> longname = 0
>> with open(sys.argv[1],'r') as f:
>> for line in f:
>> line = line.replace('"','')
>> e = [i.strip() for i in line.split(' ') if i]
>> ln = len(e[0]) + len(e[1])
>> if ln > longname: longname = ln
>> names.append((e[1], e[0], e[2]))
>> for i,n in enumerate(sorted(names)):
>> print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
>>
>> [...]
>>
>>
>> If you can do that with sed and regex and pipes in 1 or 2 lines, I'm
>> gonna hurl.
>
> I can do something that works with the provided data with util-linux,
> sed, awk, and coreutils:
>
> { sed 's/"//g' | awk '{print $1 " " $2 ":" $3}' | sort -k2 | column -t
> -s: | nl -s". " ; } < data
If quote-stripping is the only thing that 'sed' is used for I'd
suggest to use 'tr -d' instead (and avoid 'sed'; but see below).
The way Awk is used here may work for the given data with names
of exactly two name components but fail otherwise (say for names
like "Charles Antony Richard Hoare").
The key tasks is sensibly identifying the actual payload data.
> where the file "data" contains the original list. Although there will be
> some differences in behaviour for some other data and I think your
> python and the above will do unintuitive things with other data.
>
> The pipeline goes as follows:
> sed strips quotes
> awk makes two delimited columns
> sort sorts on surnames, and where surnames are identical on telno
> column presents columns with a visual model
> nl adds number prefixes
>
> If I really try and use tee and fifos I can use many fewer tools.
>
> None of these are really good languages/toolsets for the task. A DSL
> with a data schema would be best.
I've lost track of what the actual requirements meanwhile are.
Double-quoted names and numbers are the payload to extract?
Result sorted by surname part of the name data?
Equal width columns? Numbered entries?
As Tristan already did; just compose tools/parameters as needed.
I usually don't like 'sed' too much (prefer 'awk' for example),
but 'sed' can do the payload extraction, and the rest can be
composed by other standard Unix tools as desired. For example,
sed -e 's/[^"]*"\([^"]*\)"[ \t]*"\([^"]*\)"/\1:\2/' < data |
sort -k2 | column -ts: | nl -s ". "
The regexp needs some attention; it basically just extracts the
two data parts between the quotes and produces the data separated
by a colon. The rest does (as borrowed from Tristan's suggestion)
the sorting, the "columnation", and numbering.
This was designed to separate the key elements of the requirements
with clear responsibilities between the tools.
(You could of course do all that also with GNU Awk alone. But it
would then look more clumsy, a bit like that Python script above.)
Janis
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-18 12:40 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10peki1$elp$3@dont-email.me> |
| In reply to | #397030 |
On 3/17/2026 12:21 AM, Janis Papanagnou wrote:
> On 2026-03-17 01:49, Tristan Wibberley wrote:
>> On 16/03/2026 23:07, DFS wrote:
>>>
>>> import sys
>>> names = []
>>> longname = 0
>>> with open(sys.argv[1],'r') as f:
>>> for line in f:
>>> line = line.replace('"','')
>>> e = [i.strip() for i in line.split(' ') if i]
>>> ln = len(e[0]) + len(e[1])
>>> if ln > longname: longname = ln
>>> names.append((e[1], e[0], e[2]))
>>> for i,n in enumerate(sorted(names)):
>>> print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
>>>
> look more clumsy, a bit like that Python script above.)
You misspelled beautiful.
You can put makeup on most code by using more descriptive names and
lining things up:
import sys
namelist = []
longname = 0
with open(sys.argv[1],'r') as file:
for line in file:
line = line.replace('"','')
elements = [parts.strip() for parts in line.split(' ') if parts]
thisname = len(elements[0]) + len(elements[1])
if thisname > longname: longname = thisname
namelist.append((elements[1], elements[0], elements[2]))
for count, name in enumerate(sorted(namelist)):
print("%2d. %-*s %s" % (count+1, longname+2, name[1] +' '+ name[0],
name[2]))
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2026-03-18 17:06 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10pem35$s9g$1@dont-email.me> |
| In reply to | #397067 |
On 18/03/2026 16:40, DFS wrote:
> On 3/17/2026 12:21 AM, Janis Papanagnou wrote:
>> On 2026-03-17 01:49, Tristan Wibberley wrote:
>>> On 16/03/2026 23:07, DFS wrote:
>>>>
>>>> import sys
>>>> names = []
>>>> longname = 0
>>>> with open(sys.argv[1],'r') as f:
>>>> for line in f:
>>>> line = line.replace('"','')
>>>> e = [i.strip() for i in line.split(' ') if i]
>>>> ln = len(e[0]) + len(e[1])
>>>> if ln > longname: longname = ln
>>>> names.append((e[1], e[0], e[2]))
>>>> for i,n in enumerate(sorted(names)):
>>>> print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
>>>>
>
>> look more clumsy, a bit like that Python script above.)
>
>
> You misspelled beautiful.
>
> You can put makeup on most code by using more descriptive names and
> lining things up:
>
> import sys
> namelist = []
> longname = 0
> with open(sys.argv[1],'r') as file:
> for line in file:
> line = line.replace('"','')
> elements = [parts.strip() for parts in line.split(' ') if parts]
> thisname = len(elements[0]) + len(elements[1])
> if thisname > longname: longname = thisname
> namelist.append((elements[1], elements[0], elements[2]))
> for count, name in enumerate(sorted(namelist)):
> print("%2d. %-*s %s" % (count+1, longname+2, name[1] +' '+ name[0],
> name[2]))
>
>
I don't think that helps! It's exactly the same, somewhat indigestible
lump of code; the longer names just obscure things more.
Some blank lines wouldn't have gone amiss; those don't contribute to
line-count.
However, the approach used could be different. The input is something
like this, bounded by <>:
<..."abc def"..."ghi"...>
the ... represent unwanted white space.
Your first step is to get rid of those ", to end up with:
<...abc def...ghi...>
But now that white space, which had been neatly excluded by the quotes,
because part of the content and needs dealing with.
Maybe also, the tel no contain embedded spaces, or maybe the name is
only a first or last name, or there is a middle name. So removing the
quotes also removed the demarcation between name and tel no.
In my scripted version, the 'read' process uses the quotes to delimit
each of the two items; it will be read <abc def> and <ghi>.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2026-03-18 15:46 -0400 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10peves$46bh$1@dont-email.me> |
| In reply to | #397068 |
On 3/18/2026 1:06 PM, Bart wrote:
> On 18/03/2026 16:40, DFS wrote:
>> On 3/17/2026 12:21 AM, Janis Papanagnou wrote:
>>> On 2026-03-17 01:49, Tristan Wibberley wrote:
>>>> On 16/03/2026 23:07, DFS wrote:
>>>>>
>>>>> import sys
>>>>> names = []
>>>>> longname = 0
>>>>> with open(sys.argv[1],'r') as f:
>>>>> for line in f:
>>>>> line = line.replace('"','')
>>>>> e = [i.strip() for i in line.split(' ') if i]
>>>>> ln = len(e[0]) + len(e[1])
>>>>> if ln > longname: longname = ln
>>>>> names.append((e[1], e[0], e[2]))
>>>>> for i,n in enumerate(sorted(names)):
>>>>> print("%2d. %-*s %s" % (i+1, longname+2, n[1]+' '+n[0], n[2]))
>>>>>
>>
>>> look more clumsy, a bit like that Python script above.)
>>
>>
>> You misspelled beautiful.
>>
>> You can put makeup on most code by using more descriptive names and
>> lining things up:
>>
>> import sys
>> namelist = []
>> longname = 0
>> with open(sys.argv[1],'r') as file:
>> for line in file:
>> line = line.replace('"','')
>> elements = [parts.strip() for parts in line.split(' ') if parts]
>> thisname = len(elements[0]) + len(elements[1])
>> if thisname > longname: longname = thisname
>> namelist.append((elements[1], elements[0], elements[2]))
>> for count, name in enumerate(sorted(namelist)):
>> print("%2d. %-*s %s" % (count+1, longname+2, name[1] +' '+
>> name[0], name[2]))
>>
>>
>
> I don't think that helps!
It helps a lot!
It goes from above avg python/pseudocode to great python/pseudocode.
It really can't be improved. I'm not even sure it can be shortened and
still maintain the same functionality.
Maybe I could combine the .replace() and the .split() to save one line,
but it's not worth it.
elements = [parts.strip() for parts in line.replace('"','').split(' ')
if parts]
Didn't try it.
You can construct fantastic one-liners in python, but like a long regex
they're more trouble to write and read than they're worth.
> It's exactly the same, somewhat indigestible lump of code;
eh? It's rare that python code is labeled "indigestible".
If it was perl or Montero C++ you'd be correct.
I notice you didn't deliver any Q code. Why not?
> the longer names just obscure things more.
The longer names make it even better. I should use long names all the time.
But maxcolumnwidth is too long, and mcw is too short and
non-descriptive, so I'll typically use maxcolwidth, etc. It's a tradeoff.
> Some blank lines wouldn't have gone amiss; those don't contribute to
> line-count.
Here I didn't test for blank lines. They didn't exist in the input, and
rarely exist in real life.
> However, the approach used could be different. The input is something
> like this, bounded by <>:
>
> <..."abc def"..."ghi"...>
>
> the ... represent unwanted white space.
>
> Your first step is to get rid of those ", to end up with:
>
> <...abc def...ghi...>
Yes.
> But now that white space, which had been neatly excluded by the quotes,
> because part of the content and needs dealing with.
Now that the quotes are gone, the python strip() command inside the list
comprehension works right:
elements = [parts.strip() for parts in line.split(' ') if parts]
That gives me the 3 elements - first, last, phone - stripped of white space
If the quote marks are still in place they become part of the names and
phone.
> Maybe also, the tel no contain embedded spaces, or maybe the name is
> only a first or last name, or there is a middle name. So removing the
> quotes also removed the demarcation between name and tel no.
Now you're changing the input format or the transformation spec or both.
> In my scripted version, the 'read' process uses the quotes to delimit
> each of the two items; it will be read <abc def> and <ghi>.
Then you can't sort by last-first, but output by first-last.
So to match what I did here your read process needs to parse it into:
<abc> <def> <ghi>.
I did it exactly right, in the right order, and I bet you will too.
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2026-03-18 22:14 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10pf83v$7t0o$1@dont-email.me> |
| In reply to | #397070 |
On 18/03/2026 19:46, DFS wrote:
> On 3/18/2026 1:06 PM, Bart wrote:
> It helps a lot!
>
> It goes from above avg python/pseudocode to great python/pseudocode.
>
> It really can't be improved. I'm not even sure it can be shortened and
> still maintain the same functionality.
>
> Maybe I could combine the .replace() and the .split() to save one line,
> but it's not worth it.
>
> elements = [parts.strip() for parts in line.replace('"','').split(' ')
> if parts]
>
> Didn't try it.
>
> You can construct fantastic one-liners in python, but like a long regex
> they're more trouble to write and read than they're worth.
>
>
>> It's exactly the same, somewhat indigestible lump of code;
>
> eh? It's rare that python code is labeled "indigestible".
>
> If it was perl or Montero C++ you'd be correct.
>
>
> I notice you didn't deliver any Q code. Why not?
I thought I did, maybe you didn't see it, so I've repeated my post
below. It was in response to your 12-line Python.
(Note that I'm not saying that is much more digestible than the Python.
Only a little!)
>> Some blank lines wouldn't have gone amiss; those don't contribute to
>> line-count.
>
> Here I didn't test for blank lines. They didn't exist in the input, and
> rarely exist in real life.
I meant in the Python code.
>> In my scripted version, the 'read' process uses the quotes to delimit
>> each of the two items; it will be read <abc def> and <ghi>.
>
> Then you can't sort by last-first, but output by first-last.
Your Python seems to assume a format like this:
..."bart simpson"..."1-800-123-4567"
That is, exactly two parts to the name (as in, separated with white
space), and one part to the phone number.
In the UK, telephone numbers have spaces. But that shouldn't matter:
those quotes exactly indicate which part is the name, and which part is
the number. But you discard that useful data too early.
----------------------
Here is my post first sent 17-Mar-26 at 12:31 GMT; I've added some white
space:
--------------------------------------------------
Huh. I can just about do it in 11 lines:
maxlen:=0
names::=()
for x in readtextfile("abc") do
readln @x, name:"s", tel:"s"
(c, s) := splitstring(name, " ")
maxlen max:= name.len
names &:= (s, c, tel)
end
for i, x in sort(names) do
fprintln "#. # #", i:"2", x[2]+" "+x[1]:tostr(maxlen)+"jl", x[3]
end
Python has an advantage in not needing those 'end' lines! Otherwise my
solution would be 9 lines (obviously still a long way from a one-liner
like Awk).
However mine is missing a couple of things: 'name.len' needs to be
replaced by a function that counts UTF8 characters. And 'sort' currently
is another custom routine that sorts only the surname.
(Python's 'sorted' presumably compares all elements LTR.)
But these lie outside the main program which remains at 11 lines.
(It's not clear how the Python would work when there is more than one
first name.)
[toc] | [prev] | [next] | [standalone]
| From | Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> |
|---|---|
| Date | 2026-03-19 22:39 +0000 |
| Subject | Re: Isn't that beauty ? (no it's not) |
| Message-ID | <10phtuf$13kpb$1@dont-email.me> |
| In reply to | #397030 |
On 17/03/2026 04:21, Janis Papanagnou wrote: > I've lost track of what the actual requirements meanwhile are. > Double-quoted names and numbers are the payload to extract? Yes, the python code didn't seem to dequote to objects but assumed the quotes were noise and there would be two name parts. -- Tristan Wibberley The message body is Copyright (C) 2026 Tristan Wibberley except citations and quotations noted. All Rights Reserved except that you may, of course, cite it academically giving credit to me, distribute it verbatim as part of a usenet system or its archives, and use it to promote my greatness and general superiority without misrepresentation of my opinions other than my opinion of my greatness and general superiority which you _may_ misrepresent. You definitely MAY NOT train any production AI system with it but you may train experimental AI that will only be used for evaluation of the AI methods it implements.
[toc] | [prev] | [next] | [standalone]
Page 3 of 12 — ← Prev page 1 2 [3] 4 5 … 12 Next page →
Back to top | Article view | comp.lang.c
csiph-web