Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #133735 > unrolled thread
| Started by | skybuck2000@hotmail.com |
|---|---|
| First post | 2018-08-13 12:53 -0700 |
| Last post | 2018-10-10 18:24 -0700 |
| Articles | 14 on this page of 354 — 27 participants |
Back to article view | Back to comp.lang.c
>< swap operator skybuck2000@hotmail.com - 2018-08-13 12:53 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-08-13 16:05 -0400
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-13 13:46 -0700
Re: >< swap operator Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-08-14 11:19 +0300
Re: >< swap operator skybuck2000@hotmail.com - 2018-08-14 06:16 -0700
Re: >< swap operator bart4858@gmail.com - 2018-08-14 07:50 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-08-14 16:59 +0200
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-08-14 10:46 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-08-14 20:03 +0200
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-08-14 11:37 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-08-14 21:16 +0200
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-14 11:32 -0700
Re: >< swap operator bart4858@gmail.com - 2018-08-14 16:24 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-08-15 11:32 +0200
Re: >< swap operator skybuck2000@hotmail.com - 2018-10-01 07:46 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 05:20 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 13:58 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 14:08 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 09:16 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-02 15:35 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 09:43 -0400
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 10:51 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 09:08 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 15:26 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 10:52 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 17:57 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 13:27 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 11:52 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 20:48 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 15:56 -0400
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-10-02 13:05 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 13:26 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 21:36 +0100
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 13:47 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 11:14 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 16:37 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 22:02 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 17:16 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 11:25 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-03 10:52 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 14:29 +0200
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-03 05:52 -0700
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-03 21:31 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 16:47 -0400
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 03:43 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 22:47 -0400
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 04:25 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 20:44 -0700
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 11:53 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-04 05:15 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-04 13:48 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-04 10:56 -0400
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 17:47 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-04 11:01 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-04 22:15 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-04 16:19 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-04 21:42 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-04 15:01 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-04 23:59 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 09:54 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 18:03 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 21:08 +0200
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-05 20:31 +0100
Re: >< swap operator Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2018-10-05 15:59 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 21:18 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-06 03:51 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-06 12:19 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-06 19:49 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-07 12:25 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-07 14:19 +0100
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-07 06:56 -0700
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-07 16:30 +0100
Re: >< swap operator Wouter Verhelst <w@uter.be> - 2018-10-09 13:17 +0200
C idioms (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-09 13:07 +0000
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-09 14:27 +0100
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-10 00:05 +0100
Re: C idioms Bart <bc@freeuk.com> - 2018-10-10 02:03 +0100
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-11 01:05 +0100
Re: C idioms Bart <bc@freeuk.com> - 2018-10-11 02:09 +0100
Re: C idioms Bart <bc@freeuk.com> - 2018-10-11 12:39 +0100
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-11 16:24 +0100
Re: C idioms scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 15:55 +0000
Re: C idioms Keith Thompson <kst-u@mib.org> - 2018-10-11 09:42 -0700
Re: C idioms Wouter Verhelst <w@uter.be> - 2018-10-11 19:23 +0200
Re: C idioms jameskuyper@alumni.caltech.edu - 2018-10-11 11:11 -0700
Re: C idioms Keith Thompson <kst-u@mib.org> - 2018-10-11 12:05 -0700
Re: C idioms Bart <bc@freeuk.com> - 2018-10-11 17:53 +0100
Re: C idioms Keith Thompson <kst-u@mib.org> - 2018-10-11 10:38 -0700
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-12 00:14 +0100
Re: C idioms Bart <bc@freeuk.com> - 2018-10-11 19:26 +0100
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-09 16:38 +0200
Re: C idioms (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-09 15:23 +0000
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-09 20:31 +0200
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-09 20:18 +0100
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-09 22:11 +0200
Re: C idioms (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-09 20:50 +0000
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-09 22:58 +0200
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-09 22:34 +0100
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 08:10 +0200
Re: C idioms (Was: >< swap operator) jameskuyper@alumni.caltech.edu - 2018-10-09 14:45 -0700
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 08:07 +0200
Hmmm... (Was: C idioms (Was: >< swap operator)) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 07:56 +0000
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) David Brown <david.brown@hesbynett.no> - 2018-10-10 10:32 +0200
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) Ike Naar <ike@iceland.freeshell.org> - 2018-10-10 13:44 +0000
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 14:52 +0000
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) Wouter Verhelst <w@uter.be> - 2018-10-10 17:47 +0200
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) David Brown <david.brown@hesbynett.no> - 2018-10-10 17:18 +0200
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 15:22 +0000
Re: Hmmm... (Was: C idioms (Was: >< swap operator)) David Brown <david.brown@hesbynett.no> - 2018-10-10 23:58 +0200
Re: Hmmm... Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-10 07:51 -0600
Re: Hmmm... gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 14:53 +0000
Re: Hmmm... David Brown <david.brown@hesbynett.no> - 2018-10-10 17:21 +0200
Re: C idioms (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 12:57 +0000
Re: C idioms (Was: >< swap operator) James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-10-10 12:29 -0400
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-11 00:07 +0200
Re: C idioms (Was: >< swap operator) Keith Thompson <kst-u@mib.org> - 2018-10-09 14:50 -0700
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 08:13 +0200
Re: C idioms (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 12:56 +0000
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 15:55 +0200
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-10 15:17 +0100
Re: C idioms (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 14:49 +0000
Fall-through in switch statements... (Was: C idioms (Was: >< swap operator)) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 14:59 +0000
Re: Fall-through in switch statements... (Was: C idioms (Was: >< swap operator)) Bart <bc@freeuk.com> - 2018-10-10 16:09 +0100
Re: Fall-through in switch statements... (Was: C idioms (Was: >< swap operator)) nobody@example.org (Scott) - 2018-10-10 17:29 +0000
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-10 16:01 +0100
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 17:29 +0200
Re: C idioms (Was: >< swap operator) Wouter Verhelst <w@uter.be> - 2018-10-10 17:55 +0200
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-10 17:11 +0100
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-10 23:15 +0100
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-11 00:16 +0200
Re: C idioms (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-10 23:23 +0100
Re: C idioms (Was: >< swap operator) Keith Thompson <kst-u@mib.org> - 2018-10-10 16:31 -0700
Re: C idioms (Was: >< swap operator) Keith Thompson <kst-u@mib.org> - 2018-10-10 15:32 -0700
Re: C idioms (Was: >< swap operator) Keith Thompson <kst-u@mib.org> - 2018-10-10 16:24 -0700
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-11 10:52 +0200
Re: C idioms Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-10 09:59 -0600
Re: C idioms (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-10 17:26 +0200
Re: C idioms (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 14:48 +0000
Return values of fork() (Was: C idioms (Was: >< swap operator)) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 14:51 +0000
Re: Return values of fork() (Was: C idioms (Was: >< swap operator)) scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 15:20 +0000
You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-10 15:28 +0000
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) David Brown <david.brown@hesbynett.no> - 2018-10-11 00:23 +0200
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 13:22 +0000
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) David Brown <david.brown@hesbynett.no> - 2018-10-11 15:58 +0200
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 14:17 +0000
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) David Brown <david.brown@hesbynett.no> - 2018-10-11 16:42 +0200
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) Wouter Verhelst <w@uter.be> - 2018-10-11 16:53 +0200
Re: You know that and I know that, but ... (Was: Return values of fork() (Was: C idioms (Was: >< swap operator))) David Brown <david.brown@hesbynett.no> - 2018-10-11 20:11 +0200
Re: Return values of fork() (Was: C idioms (Was: >< swap operator)) David Brown <david.brown@hesbynett.no> - 2018-10-11 00:20 +0200
Re: Return values of fork() (Was: C idioms (Was: >< swap operator)) Keith Thompson <kst-u@mib.org> - 2018-10-10 16:15 -0700
Re: Return values of fork() Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-11 14:42 -0600
Re: C idioms Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-09 16:18 -0600
Re: C idioms gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-09 22:28 +0000
Re: C idioms scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 12:58 +0000
Re: C idioms (Was: >< swap operator) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-09 07:48 -0700
Re: C idioms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-09 16:42 +0100
Re: C idioms (Was: >< swap operator) Wouter Verhelst <w@uter.be> - 2018-10-09 19:40 +0200
Re: C idioms (Was: >< swap operator) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-09 12:38 -0700
Re: C idioms (Was: >< swap operator) Wouter Verhelst <w@uter.be> - 2018-10-09 23:41 +0200
Re: C idioms (Was: >< swap operator) Wouter Verhelst <w@uter.be> - 2018-10-09 19:38 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-07 15:04 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-07 16:37 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-07 16:58 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-07 12:17 -0400
Grammar police! (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-07 20:37 +0000
Re: >< swap operator jameskuyper@alumni.caltech.edu - 2018-10-07 09:31 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-07 18:09 +0100
Re: >< swap operator jameskuyper@alumni.caltech.edu - 2018-10-07 14:05 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-07 22:35 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-08 02:56 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-08 10:48 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 12:09 +0100
Re: >< swap operator Ike Naar <ike@iceland.freeshell.org> - 2018-10-08 16:00 +0000
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 17:44 +0100
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-08 10:39 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 20:08 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-09 11:22 +0200
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-09 09:25 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-09 20:43 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-09 20:15 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-09 22:26 +0200
Re: >< swap operator Ike Naar <ike@iceland.freeshell.org> - 2018-10-08 21:09 +0000
Re: >< swap operator David Kleinecke <dkleinecke@gmail.com> - 2018-10-08 15:18 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-08 07:55 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-09 11:24 +0200
Re: >< swap operator jameskuyper@alumni.caltech.edu - 2018-10-08 07:19 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 16:26 +0100
Re: >< swap operator jameskuyper@alumni.caltech.edu - 2018-10-10 10:59 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 19:53 +0100
Re: >< swap operator James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-10-07 18:00 -0400
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-07 17:10 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 01:25 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-08 02:51 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 11:29 +0100
Re: >< swap operator mark.bluemel@gmail.com - 2018-10-08 04:41 -0700
Re: >< swap operator jameskuyper@alumni.caltech.edu - 2018-10-08 07:56 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-08 08:36 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 17:34 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-08 21:35 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 22:00 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-09 00:47 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-09 01:11 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-09 02:47 +0100
Re: >< swap operator mark.bluemel@gmail.com - 2018-10-09 00:49 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-09 11:28 +0100
Re: >< swap operator gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-09 13:00 +0000
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-08 10:28 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-08 10:49 -0700
Re: >< swap operator Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-07 20:00 -0600
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-06 13:07 -0700
Re: >< swap operator gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 23:35 +0000
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-06 03:49 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-06 16:18 +0200
Re: >< swap operator scott@slp53.sl.home (Scott Lurndal) - 2018-10-06 14:48 +0000
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-06 12:53 -0700
Re: >< swap operator scott@slp53.sl.home (Scott Lurndal) - 2018-10-07 16:38 +0000
Re: >< swap operator James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-10-07 15:56 -0400
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-07 16:53 -0700
Re: >< swap operator David Kleinecke <dkleinecke@gmail.com> - 2018-10-07 17:07 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-07 17:24 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-08 01:30 +0100
Re: >< swap operator Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-10-07 19:12 -0600
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-06 18:26 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-06 19:41 +0100
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-06 13:05 -0700
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-07 02:24 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-07 12:41 +0200
100% of the user base... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-06 00:22 +0000
Re: 100% of the user base... (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-06 01:55 +0100
Re: 100% of the user base... (Was: >< swap operator) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-06 03:58 -0700
Re: 100% of the user base... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-06 11:51 +0000
Re: 100% of the user base... (Was: >< swap operator) Bart <bc@freeuk.com> - 2018-10-06 13:09 +0100
Re: 100% of the user base... (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-06 05:26 -0700
Re: 100% of the user base... (Was: >< swap operator) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-06 05:40 -0700
Re: 100% of the user base... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-06 12:46 +0000
Re: 100% of the user base... (Was: >< swap operator) Melzzzzz <Melzzzzz@zzzzz.com> - 2018-10-06 12:46 +0000
Re: 100% of the user base... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-06 12:49 +0000
Re: 100% of the user base... (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-06 06:27 -0700
Re: 100% of the user base... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-07 12:47 +0000
Re: 100% of the user base... (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-07 09:03 -0400
Re: 100% of the user base... (Was: >< swap operator) scott@slp53.sl.home (Scott Lurndal) - 2018-10-07 16:47 +0000
Re: >< swap operator Wouter Verhelst <w@uter.be> - 2018-10-05 10:17 +0200
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 09:20 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 10:58 +0100
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 12:09 +0200
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-05 03:11 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 07:56 -0400
Re: >< swap operator Wouter Verhelst <w@uter.be> - 2018-10-05 14:25 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 08:39 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 15:47 +0100
Re: >< swap operator Wouter Verhelst <w@uter.be> - 2018-10-05 17:30 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 11:41 -0400
Re: >< swap operator Wouter Verhelst <w@uter.be> - 2018-10-05 17:56 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 12:00 -0400
Re: >< swap operator Richard Damon <Richard@Damon-Family.org> - 2018-10-05 12:34 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 12:48 -0400
Re: >< swap operator Richard Damon <Richard@Damon-Family.org> - 2018-10-05 13:55 -0400
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-05 11:20 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 14:45 -0400
Re: >< swap operator Richard Damon <Richard@Damon-Family.org> - 2018-10-05 21:39 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-07 08:51 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-11-25 14:18 -0800
Re: >< swap operator Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-10-05 15:46 +0300
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 06:05 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 06:16 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 15:09 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 10:18 -0400
Re: >< swap operator Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-10-05 17:32 +0300
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 10:34 -0400
Of course it is crazy! (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 15:17 +0000
Re: >< swap operator gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 18:30 +0000
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 14:48 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 15:06 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 13:55 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 06:14 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 16:18 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 10:21 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 17:27 +0200
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-05 15:26 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 10:28 -0400
Re: >< swap operator gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 14:46 +0000
When pigs fly... (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 16:10 +0000
Re: >< swap operator Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-10-05 17:35 +0300
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 10:46 -0400
Re: >< swap operator gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 15:15 +0000
6K years??? (Was: >< swap operator) gazelle@shell.xmission.com (Kenny McCormack) - 2018-10-05 13:20 +0000
Re: 6K years??? (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 09:28 -0400
Re: 6K years??? (Was: >< swap operator) Wouter Verhelst <w@uter.be> - 2018-10-05 17:53 +0200
Re: 6K years??? (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 11:56 -0400
Re: 6K years??? (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-05 18:17 +0200
Re: 6K years??? (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 09:21 -0700
Re: 6K years??? (Was: >< swap operator) David Brown <david.brown@hesbynett.no> - 2018-10-05 18:50 +0200
Re: 6K years??? (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 12:52 -0400
Re: 6K years??? (Was: >< swap operator) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-05 13:05 -0400
Re: 6K years??? (Was: >< swap operator) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-06 03:42 -0700
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-05 15:59 +0200
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-06 03:45 +0100
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-04 11:22 -0700
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 20:35 +0100
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-04 13:28 +0100
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-04 17:59 +0100
Re: >< swap operator John Bode <jfbode1029@gmail.com> - 2018-10-04 09:56 -0700
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 06:03 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-03 14:37 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 09:51 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 15:39 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 10:05 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 10:09 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 16:22 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 10:29 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 20:52 +0200
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-03 14:57 -0400
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 16:06 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-03 00:09 +0100
Re: >< swap operator Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2018-10-02 19:21 -0400
Re: >< swap operator David Brown <david.brown@hesbynett.no> - 2018-10-03 11:21 +0200
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-10-02 13:43 -0700
Re: >< swap operator scott@slp53.sl.home (Scott Lurndal) - 2018-10-02 21:01 +0000
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 14:29 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 22:37 +0100
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-03 05:07 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 21:01 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 16:06 -0400
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 21:45 +0100
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 17:09 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 16:11 -0400
Re: >< swap operator "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-02 16:22 -0400
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-10-02 13:17 -0700
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-10-02 13:24 -0700
Re: >< swap operator scott@slp53.sl.home (Scott Lurndal) - 2018-10-02 15:04 +0000
Re: >< swap operator Niles Rogoff <eternal-september@niles.xyz> - 2018-10-03 18:28 +0000
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-08-14 11:50 -0700
Re: >< swap operator Siri Cruise <chine.bleu@yahoo.com> - 2018-08-14 17:07 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 02:22 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 02:34 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 03:09 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 03:24 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 04:51 -0700
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 05:06 -0700
Re: >< swap operator Siri Cruise <chine.bleu@yahoo.com> - 2018-08-15 04:21 -0700
Re: >< swap operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-08-15 14:43 +0100
Re: >< swap operator fir <profesor.fir@gmail.com> - 2018-08-15 07:08 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-08-15 16:52 +0100
Re: >< swap operator Ike Naar <ike@iceland.freeshell.org> - 2018-08-15 15:51 +0000
Re: >< swap operator John Bode <jfbode1029@gmail.com> - 2018-10-01 14:59 -0700
Re: >< swap operator Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-02 03:06 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 11:43 +0100
Re: >< swap operator John Bode <jfbode1029@gmail.com> - 2018-10-02 07:27 -0700
Re: >< swap operator Bart <bc@freeuk.com> - 2018-10-02 15:43 +0100
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 11:01 -0700
Re: >< swap operator Keith Thompson <kst-u@mib.org> - 2018-10-02 10:54 -0700
Re: >< swap operator Thiago Adams <thiago.adams@gmail.com> - 2018-10-02 12:39 -0700
Re: >< swap operator skybuck2000@hotmail.com - 2018-10-10 18:10 -0700
Re: >< swap operator skybuck2000@hotmail.com - 2018-10-10 18:24 -0700
Page 18 of 18 — ← Prev page 1 … 16 17 [18]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2018-08-15 14:43 +0100 |
| Message-ID | <8736vfu4mz.fsf@bsb.me.uk> |
| In reply to | #133873 |
Siri Cruise <chine.bleu@yahoo.com> writes:
> In article <ddc1a534-1402-43f2-ae44-83cd39b2c7da@googlegroups.com>,
> fir <profesor.fir@gmail.com> wrote:
>
>> W dniu środa, 15 sierpnia 2018 02:07:55 UTC+2 użytkownik Siri Cruise napisał:
>> > In article <36d546c5-b471-45fc-b87a-8ebebdc0c0b7@googlegroups.com>,
>> > skybuck2000@hotmail.com wrote:
>> >
>> > > Hello,
>> > >
>> > > I just had a funny idea how to implement a swap operator for types:
>> > >
>> > > A >< B
>> > >
>> > > would mean swap A and B.
>> >
>> > It's a special case of a more general operation missing from C, the
>> > parallel
>> > assignment: A,B := B,A. For example you can generate Fibonacci with
>> > int a, int b := 1, 1;
>> > do true then a,b := b,a+b od
>> >
>> good one
>
> Edgser Dijkstra, god rest his soul.
In a way, C does have multiple assignments in that function calls are
done "as if by assignment" so, with a compiler that eliminates tail
calls, you can write the code above in C as
void fib(int a, int b)
{
printf("%d\n", b);
fib(b, a+b);
}
together with a call to fib(0, 1).
Using 0 and printing b gives you one number before overflow. The
overflow-checked version would be
void fib(int a, int b)
{
printf("%d\n", b);
if (a <= INT_MAX - b) fib(b, a+b);
}
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2018-08-15 07:08 -0700 |
| Message-ID | <766e6827-bf75-43ad-90f9-5dc66a9fb5a0@googlegroups.com> |
| In reply to | #133886 |
W dniu środa, 15 sierpnia 2018 15:43:40 UTC+2 użytkownik Ben Bacarisse napisał:
> Siri Cruise <chine.bleu@yahoo.com> writes:
>
> > In article <ddc1a534-1402-43f2-ae44-83cd39b2c7da@googlegroups.com>,
> > fir <profesor.fir@gmail.com> wrote:
> >
> >> W dniu środa, 15 sierpnia 2018 02:07:55 UTC+2 użytkownik Siri Cruise napisał:
> >> > In article <36d546c5-b471-45fc-b87a-8ebebdc0c0b7@googlegroups.com>,
> >> > skybuck2000@hotmail.com wrote:
> >> >
> >> > > Hello,
> >> > >
> >> > > I just had a funny idea how to implement a swap operator for types:
> >> > >
> >> > > A >< B
> >> > >
> >> > > would mean swap A and B.
> >> >
> >> > It's a special case of a more general operation missing from C, the
> >> > parallel
> >> > assignment: A,B := B,A. For example you can generate Fibonacci with
> >> > int a, int b := 1, 1;
> >> > do true then a,b := b,a+b od
> >> >
> >> good one
> >
> > Edgser Dijkstra, god rest his soul.
>
> In a way, C does have multiple assignments in that function calls are
> done "as if by assignment" so, with a compiler that eliminates tail
> calls, you can write the code above in C as
>
> void fib(int a, int b)
> {
> printf("%d\n", b);
> fib(b, a+b);
> }
>
> together with a call to fib(0, 1).
>
> Using 0 and printing b gives you one number before overflow. The
> overflow-checked version would be
>
> void fib(int a, int b)
> {
> printf("%d\n", b);
> if (a <= INT_MAX - b) fib(b, a+b);
> }
>
interesting, this may men one can write mandelbrot calculator also as recursive calls
n=1;
foo(double re, double im)
{
n++;
if(re*re+im*im>4) return;
if(n==100) return;
foo(re*re-im*im+cr, 2*re*im+ci);
return;
}
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2018-08-15 16:52 +0100 |
| Message-ID | <H_XcD.65761$fy.48278@fx26.am4> |
| In reply to | #133886 |
On 15/08/2018 14:43, Ben Bacarisse wrote: >>> W dniu środa, 15 sierpnia 2018 02:07:55 UTC+2 użytkownik Siri Cruise napisał: >>>> It's a special case of a more general operation missing from C, the >>>> parallel >>>> assignment: A,B := B,A. For example you can generate Fibonacci with >>>> int a, int b := 1, 1; >>>> do true then a,b := b,a+b od > In a way, C does have multiple assignments in that function calls are > done "as if by assignment" Not really. Otherwise we could eliminate normal assignments with the same reasoning. We can't. At least, without making it considerably harder to write programs. (Not for you, obviously.) -- bart
[toc] | [prev] | [next] | [standalone]
| From | Ike Naar <ike@iceland.freeshell.org> |
|---|---|
| Date | 2018-08-15 15:51 +0000 |
| Message-ID | <slrn3l54pn8ivb.b2r.ike@iceland.freeshell.org> |
| In reply to | #133873 |
On 2018-08-15, Siri Cruise <chine.bleu@yahoo.com> wrote: > In article <ddc1a534-1402-43f2-ae44-83cd39b2c7da@googlegroups.com>, > fir <profesor.fir@gmail.com> wrote: > >> W dniu ?roda, 15 sierpnia 2018 02:07:55 UTC+2 u?ytkownik Siri Cruise napisa?: >> > In article <36d546c5-b471-45fc-b87a-8ebebdc0c0b7@googlegroups.com>, >> > skybuck2000@hotmail.com wrote: >> > >> > > Hello, >> > > >> > > I just had a funny idea how to implement a swap operator for types: >> > > >> > > A >< B >> > > >> > > would mean swap A and B. >> > >> > It's a special case of a more general operation missing from C, the >> > parallel >> > assignment: A,B := B,A. For example you can generate Fibonacci with >> > int a, int b := 1, 1; >> > do true then a,b := b,a+b od >> > >> good one > > Edgser Dijkstra, god rest his soul. Edsger Dijkstra, Siri mangle his name.
[toc] | [prev] | [next] | [standalone]
| From | John Bode <jfbode1029@gmail.com> |
|---|---|
| Date | 2018-10-01 14:59 -0700 |
| Message-ID | <7e8674ad-43f4-4f9d-b87e-82df23731874@googlegroups.com> |
| In reply to | #133735 |
On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote:
> Hello,
>
> I just had a funny idea how to implement a swap operator for types:
>
> A >< B
>
> would mean swap A and B.
>
> Bye,
> Skybuck.
Personally, I would add a "swap" keyword:
a swap b;
rather than recycle relational operators.
Obviously, both operands must be modifiable lvalues.
What should the *result* of the expression be? The LHS after the swap? The RHS after
the swap? Should that result in itself be an lvalue? IOW, Should we allow expressions like
a swap b swap c
and if so, what should the result be? Obviously, this will require a fixed order of evaluation
and a sequence point after each operand is evaluated.
I can imagine some fun to be had with such an operator, especially if you allow things like
a swap b swap c swap d ...
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.arthur.mclean@gmail.com> |
|---|---|
| Date | 2018-10-02 03:06 -0700 |
| Message-ID | <cddb5f94-baa4-4c64-ab32-5fbfd638ba4d@googlegroups.com> |
| In reply to | #135985 |
On Monday, October 1, 2018 at 11:00:06 PM UTC+1, John Bode wrote: > On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote: > > Hello, > > > > I just had a funny idea how to implement a swap operator for types: > > > > A >< B > > > > would mean swap A and B. > > > > Bye, > > Skybuck. > > Personally, I would add a "swap" keyword: > > a swap b; > > rather than recycle relational operators. > > Obviously, both operands must be modifiable lvalues. > > What should the *result* of the expression be? The LHS after the swap? The RHS after > the swap? Should that result in itself be an lvalue? IOW, Should we allow expressions like > > a swap b swap c > > and if so, what should the result be? Obviously, this will require a fixed order of evaluation > and a sequence point after each operand is evaluated. > > I can imagine some fun to be had with such an operator, especially if you allow things like > > a swap b swap c swap d ... > That's the problem with a swap keyword. A better idea is to add memswap() to string.h. A casual implementation can provide a byte-copying loop very easily. A quality implementation can special-case it to swapping out to a temporary, unless the size argument is variable.
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2018-10-02 11:43 +0100 |
| Message-ID | <xZHsD.484726$xT1.89283@fx03.am4> |
| In reply to | #135985 |
On 01/10/2018 22:59, John Bode wrote: > On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote: >> Hello, >> >> I just had a funny idea how to implement a swap operator for types: >> >> A >< B >> >> would mean swap A and B. >> >> Bye, >> Skybuck. > > Personally, I would add a "swap" keyword: > > a swap b; > > rather than recycle relational operators. > > Obviously, both operands must be modifiable lvalues. > > What should the *result* of the expression be? Why does there need to be any result at all? Either make swap a statement (for which 'swap(a,b)' works better), or make it return void. -- bart
[toc] | [prev] | [next] | [standalone]
| From | John Bode <jfbode1029@gmail.com> |
|---|---|
| Date | 2018-10-02 07:27 -0700 |
| Message-ID | <a7c0e1d4-e5fd-4feb-9ebb-054248460413@googlegroups.com> |
| In reply to | #135987 |
On Tuesday, October 2, 2018 at 5:43:52 AM UTC-5, Bart wrote:
> On 01/10/2018 22:59, John Bode wrote:
> > On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote:
> >> Hello,
> >>
> >> I just had a funny idea how to implement a swap operator for types:
> >>
> >> A >< B
> >>
> >> would mean swap A and B.
> >>
> >> Bye,
> >> Skybuck.
> >
> > Personally, I would add a "swap" keyword:
> >
> > a swap b;
> >
> > rather than recycle relational operators.
> >
> > Obviously, both operands must be modifiable lvalues.
> >
> > What should the *result* of the expression be?
>
> Why does there need to be any result at all?
>
*If* we create it as an operator, then it has to have a result (otherwise it would not fit
in the current operator and expression hierarchy). Again, the big question would be, what
*is* that result? How would that result be useful in a larger expression? Should that
result be an lvalue or not?
We already know at least one constraint, that both operands must be lvalues. What other
constraints should there be? Obviously, most of the constraints for an assignment
operator should apply, but what else?
I'm asking people like Rick and Skybuck to think through the idea in a little more detail than
just picking a symbol. Personally, I can't see it as being useful or meaningful (it's not
something I have many use cases for) , but obviously some number of people *do*, so I
want them to explain how to fit it in with the other operators in a way that makes sense.
> Either make swap a statement (for which 'swap(a,b)' works better), or
> make it return void.
>
Honestly, a swap *function* in the standard library would be a better solution than an
operator:
void swap( void * restrict lhs, void * restrict rhs, size_t size );
does a bytewise swap of its parameters.
This way we don't have to worry about operator semantics, or where it fits in the
expression syntax hierarchy, or anything else. But, at least two people think an *operator*
is a good idea, so I'd like them to flesh out the idea a bit more.
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2018-10-02 15:43 +0100 |
| Message-ID | <MuLsD.707962$iK2.367749@fx08.am4> |
| In reply to | #136001 |
On 02/10/2018 15:27, John Bode wrote:
> On Tuesday, October 2, 2018 at 5:43:52 AM UTC-5, Bart wrote:
>> Why does there need to be any result at all?
>>
>
> *If* we create it as an operator, then it has to have a result (otherwise it would not fit
> in the current operator and expression hierarchy).
Take this code:
void bill(void){puts("Bill");}
double ben(void){puts("Ben");}
int main(void) {
int c=0;
c ? bill() : ben();
The result of the ?: doesn't have a determinable type, and some
compilers will complain. Yet many will also run the code. Since the
result isn't used, it doesn't really matter.
A swap operator could work the same way. Or just make it return zero,
**if** you had to make it an operator.
>> Either make swap a statement (for which 'swap(a,b)' works better), or
>> make it return void.
>>
>
> Honestly, a swap *function* in the standard library would be a better solution than an
> operator:
>
> void swap( void * restrict lhs, void * restrict rhs, size_t size );
>
> does a bytewise swap of its parameters.
That would be useful addition to functions like memcpy(), to exchange
the contents of two blocks of memory. Blocks that might be of different
types, and might be sub-blocks of a larger type.
But the idea of swap() feature is to simply and quickly exchange the
values of two objects of the same type. And we'd also like it to be
efficient without /requiring/ an optimising compiler.
--
bart
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2018-10-02 11:01 -0700 |
| Message-ID | <lnsh1o6xeh.fsf@kst-u.example.com> |
| In reply to | #136004 |
Bart <bc@freeuk.com> writes:
[...]
> Take this code:
>
> void bill(void){puts("Bill");}
> double ben(void){puts("Ben");}
>
> int main(void) {
> int c=0;
>
> c ? bill() : ben();
>
> The result of the ?: doesn't have a determinable type, and some
> compilers will complain. Yet many will also run the code. Since the
> result isn't used, it doesn't really matter.
In `x ? y : z`, if both y and z have void type the expression
has void type. If one has void type and the other doesn't,
the expression violates a constraint (6.5.15p3), so it has no
meaning in standard C. (Some compilers might permit it as an
extension. In that case the result type would obviously have to
be implementation-defined.)
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2018-10-02 10:54 -0700 |
| Message-ID | <lnwor06xq8.fsf@kst-u.example.com> |
| In reply to | #136001 |
John Bode <jfbode1029@gmail.com> writes:
[...]
>> > On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote:
>> >> I just had a funny idea how to implement a swap operator for types:
>> >>
>> >> A >< B
>> >>
>> >> would mean swap A and B.
[...]
> *If* we create it as an operator, then it has to have a result
> (otherwise it would not fit in the current operator and expression
> hierarchy). Again, the big question would be, what *is* that result?
> How would that result be useful in a larger expression? Should that
> result be an lvalue or not?
[...]
There's no reason an operator has to yield a non-void result.
`(void)` is a cast operator, and `(void)42` yields a void result
(or, if you prefer, doesn't yield a result). ?: can also yield a
void result.
*If* a swap operator were added to the language, it would be
perfectly sensible for a swap-expression to be a void expression.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Thiago Adams <thiago.adams@gmail.com> |
|---|---|
| Date | 2018-10-02 12:39 -0700 |
| Message-ID | <1b5420c1-4a35-4abc-9799-e2081e83937c@googlegroups.com> |
| In reply to | #136013 |
On Tuesday, October 2, 2018 at 2:54:13 PM UTC-3, Keith Thompson wrote: > John Bode <jfbode1029@gmail.com> writes: > [...] > >> > On Monday, August 13, 2018 at 2:53:54 PM UTC-5, skybu...@hotmail.com wrote: > >> >> I just had a funny idea how to implement a swap operator for types: > >> >> > >> >> A >< B > >> >> > >> >> would mean swap A and B. > [...] > > > *If* we create it as an operator, then it has to have a result > > (otherwise it would not fit in the current operator and expression > > hierarchy). Again, the big question would be, what *is* that result? > > How would that result be useful in a larger expression? Should that > > result be an lvalue or not? > [...] > > There's no reason an operator has to yield a non-void result. > `(void)` is a cast operator, and `(void)42` yields a void result > (or, if you prefer, doesn't yield a result). ?: can also yield a > void result. > > *If* a swap operator were added to the language, it would be > perfectly sensible for a swap-expression to be a void expression. > > -- > Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> > Working, but not speaking, for JetHead Development, Inc. > "We must do something. This is something. Therefore, we must do this." > -- Antony Jay and Jonathan Lynn, "Yes Minister" I want to remind some conceptual problem. Swap like other operations can have a custom implementation. The C language can copy structs. For instance, *pX1 = *pX2; This will copy the memory. What do you do in your code? Do you create X_Copy function, and them, if necessary, you can change the implementation without to have to change the callers or do you do the default operator *Dest = *Source? In my code I tend to create the function to represent to concept I want. The same when I need to delete the struct. What do you do when you need to delete some struct? 1 - free(pX); ? 2 - X_Delete(pX); //function This is also to create some protection against changes in the operation. Let's say we add some pointer to heap inside the struct. Then I cannot do just free because I also have to free the internal pointer. Creating the function I don't have to change the callers. The callers just ask the "concept" they want. This is generally represented in my code by X_Operation where X is the name of the struct. Swap has the same characteristic. Very few cases when we have some pointers pointing to the struct itself then we need custom swap to fix the pointer destination. This is the reason why I am suggesting to separate concepts from implementation in a way we could say "I want this effect" "this operation applied for these operands" Then the correct function would be selected. In practice I would just write Swap(pX1, pX2) or Copy(pX1, pX2) instead of X_Swap(pX1, pX2) or X_Copy(pX1, pX2). But more than that I would like to have the default implementation read to use and override just when necessary. This would simplify the development making easier to divide and conquer or in other words I can change the implementation without change the caller. And I don't need to repeat again and again (X_Swap, Y_Swap) the same implementation. The concept, or the ideia about what the operation does also would be universal if present on the standard library.
[toc] | [prev] | [next] | [standalone]
| From | skybuck2000@hotmail.com |
|---|---|
| Date | 2018-10-10 18:10 -0700 |
| Message-ID | <46785958-09b3-4194-9668-5038efa55188@googlegroups.com> |
| In reply to | #133735 |
I wanted to write this reply one or two days sooner, but for some reason PC/Internet was acting strange, anyway: I've read some of the postings in this thread and it's quite amazing, sometimes amuzing and also insightfull. I will sum up shortly what I've learned from this thread and the way I see it: There is apperently a problem with implementing a swap operator in general, though this proposed operator symbol does illustrate it pretty nicely. The suggested operator was >< which looks like an xor to me, but it could also be the "x-wing" from StarWars ! =D For that reason alone a true nerd would implement it in C LOL, no just kidding, but let's get a little bit more serious though, thanks though for the <=> spaceship operator and tie-fighter reference, pretty cool. Anyway: The >< operator can be thought of as two operators combined: A > B B < A As was explained somewhat in one of my subsequent postings. Pretend for a moment that > and < does not mean greater and less, but is actually an assignment into a certain direction. Here apperently lies the problem. C is a LHS language, left hand side language. Basically this means everything goes to the left, for example: A = 10; // is legal 10 goes to the left. 10 = A; // is not legal 10 goes to the right. The reason for this LHS rule is the following code: 10 = A = 20; What is A ? Is it first 10 and then overwritten with 20 ? Is it first 20 and then overwritten with 10 ? Is it perhaps 30 ? Is it perhaps 15 ? A precedence could be introduced to read from left to right when undefined. In this case A could be 20. Anyway it was kinda refreshing to see Rick's point of view on programming language in general and what might be possible. Bart counted this with some critique, though Rick impressed more with actual assembler like statements/output showing how it would/could work, so this does proof that Rick knows a thing or two about compilers and generating instructions. Also the idea of a "god" programming language is kinda cool. A language approved by "God" :) I don't take it too seriously... but why not mix logic and religion... kinda funny. If Rick wants to do this he has my approval LOL. I don't think I quite agree with the way Rick would want to implement >< swap operator, that was quite hard to understand. I do agree with Bart and others that in this case swap operator would allow a rotation. A <> B <> C. A would end up on the right side replacing C, as follows: A <> B B <> A followed by A <> C C <> A This seems to make must sense to me. There seem to be further/other problems or undefined things: What is the result of A >< B, some pointed out this would actually return two values which seem somewhat of a genuine remark and observation. This is apperently unusual in C. A further problem is, which was explained far above, A > B This conflicts with the general approach to C which is LHS. Now suddenly data is flowing from left to right. Also the rotation example illustrates this. Rick was also very sharp and observative in this regards, his example was: (A + B + C) = D could be replaced with: (A + B + C) >< D Sort of conceptually, maybe even in actually output and such. One person suggested to return "void" for the >< operator in case it's used as a sub expression (?). Perhaps this is an acceptable solution (?) (for now ?) Other funny things could be done though, for example summing it up, but this would then only apply to integers, swap is a bit more general than that. Rick suggested to pick either one of the "operands". Either A or B. This creates some weird issues, pre-fix, post-fix, before or after "the deed". Rick had some further suggestions: =>< or ><= The = symbol would be used as a sort of direction, or operand selector. LHS vs RHS. = on left side would mean whatever is swapped to the left is returned. = on the right side would mean whatever is swapped to the right is returned. However this still is a problem. Before or After the swap ? So this definition is not enough for me at least and remains vague, but it was a nice attempt from Rick to try and expand on this idea and make it more usefull/diverse/powerfull. Just to make Rick happy cause he seems to be found of combining symbols, which was also a cool point by Bart, many combinations can be made, so just to make something even more funny than Rick here goes: I will try to solve the pre/post operation problem by adding yet another symbol: - will mean pre + will mean post Just like ++I and I++ As so many of you C programmers love (and hate? ;)) Crashed any spacecrafts yet ? =D Anywayyyyy :) =D LOL... so yeah you should be used to seeing this already... though the position of the symbols are more important than the symbol itself. Cause it can also be applied to negative/minus/decrement --I I-- So the original idea was just a simple swap: A >< B Which turned out to be not so simple given C's constraints and practices and philosophy and practicality and so forth/implementation concerns/clearity, etc. Then rick introduced return specifier (I'll call it). A =<> B (returns/result left side) B <>= A (returns/result right side) I am not totally happy with this because it is missing before and after the swap, I want this solved somehow so let's try something: A +<> B (return left side after swap) A <>+ B (return right side after swap) A ->< B (return left side before swap) B ><- A (return right side before swap) Maybe this idea of "pre" and "post" returns makes some sense or maybe not ;) Logic inspection and code tries/examples would have to shed some light on that to see if it could be usefull. Again Rick tried to see the usefullness in it, then others pointed out that the >< could be omitted and had no effect. Eventually the debat turned into a nasty name calling conflict and also humilating Rick on his religious believes and view of the world, but that is kinda uncalled for especially seeing the effort he put into working out his ideas. This does illustrate that it's perhaps better to keep logic and religion seperated, then again even Einstein and that other guy may have stumbled on mathematical proof of god ! ;) Not sure if religion/god and logic are related/connected... it's a little bit interesting to think they may be connected though, this would be surprising to some ;) Unfortunately Rick is trieing to do something that scares people: Trying to create a more relaxed C language called CAlive. Kinda funny name to call a language "alive" is this a reference to god/living beings/religion ? hmmm... Other people worry it won't work well or will produce undefined/bad results or bad code. Other people worry there C code may not compile anymore. Bart also seems to be busy with his own compiler, though no real evidence of that existed in this thread, at least not in the way Rick showed, though Bart also had some interesting critique, as well as others. For me it's easy to read all of it, cause I generally don't code in C but in Delphi which is a much more relaxed language. So for now I keep an open mind to for example Rick and his proposed language ideas. Though somebody added a link to his specification, but it's behind some kind of "member wall" have to be a member to see it, this is a bit unfortunate. Would like to have seen it, oh well... The discussion about operator symbol vs routine/macro name was also interesting. There were also some slight concerns that re-using these symbols might also be problematic. For now it seems introducing this operator has less potential for conflicts than a macro/routine name and such. One argument against this operator is that it is rarely used. This is perhaps true, but what other language features does C have which are rarely used ?!? I do know that writing a swap routine is boring and annoying as hell. Also how many swap routines can you write for different types ? swap_my_struct ? swap_integer ? swap_pointer ? and so forth this was also pointed out by somebody. Somebody else also had a very interesting point: swap( a, b ) Conflicts with the way C works. A C programmer seeing this does not expect a or b to change since no call by reference was used in case for example swap was a macro. Correct code would have to be: swap( &a, &b ) Though don't blame me if even this is wrong, cause long time I wrote C code like this ;) Anyway... all interesting points/arguments. Reading through all of this my advise if this were to be implemented is as follows: 1. Keep it as simple as possible and only make it do for what it was intended: Simply swapping A and B. 2. Result value should either be two results if possible or void to prevent issues. 3. Though if a result is desired then I think it makes most sense to stick with LHS and the POST solution. This makes most sense, first the operation is performed, and finally the LHS of both is returned. Most left is returned. Perhaps this might rule out certain functionality, but I am all for easy to read and easy to understand code. Since return values are usually at the end of a function it makes sense for the programmer to expect the swap to happen first and then the left side to be returned. Which leaves a perhaps unresolved by slightly interesting feature: A <> B <> C Will this could/might be an awesome rotation, this is not what it was intended for and this may upset to many oldtimers who wrote C compilers and don't like stuff moving from left to right like that. Thus perhaps it's better to consider this a compile error. Only two operands should be allowed and not more. Though in a way the code still makes sense: A <> B is performed B <> A LHS is returned: B Then B <> C is performed C <> B LHS is returned: C This is counter-intuitive though, but perhaps you C programmers might like that ;) Now that I see this bad example, perhaps it's a much better idea to return the RHS to make it intuitive. Perhaps this might conflict a little bit with the C LHS philosophy, but perhaps SWAP is simply an exception which must be applied to make it usuable/usefull and intuitive. I would actually recommend to return the right side after the swap is done, to keep it intuitive. So that is my final say on this matter. Also here is a slightly amuzing fact for you guys: I kinda left my e-mail attached to this thread cause I post via groups.google.com and it automatically sets my e-mail. So my e-mail box was "spammed" with all your replies =D But I don't mind so much since this thread was interesting. I do mind the idoms and other side tracking and "compiler implementation discussions" this is getting a bit off-topic/sided tracked, then again it's also somewhat on topic as to how to process/compile this swap thing, so continue for now, but keep in mind this goes all into my e-mail box, not sure if I can disable this, but for now I will let you have fun and enjoy spamming my box a bit more. (Also I had some other spam from some forum spammer but that was easy to delete, not gonna delete these mails from this thread for now though, maybe some day it might come in handy if I ever want to implement some sort of compiler myself ;) :)) What started out as a seemingly simply idea got a bit nasty, but interesting nasty, mostly cause of people trying to write their own C compiler/language... I guess it was a lucky time to post this otherwise the response and feedback might not have been as good ! ;) Lastly I wish you the best with your language endeavors ! Don't let anybody put you down. Some might be jealous, some a bit frustrated, some mean well and try to share pitfulls and gotchas, though some may also under estimate the skills of others or over estimate their own skills =D Which is which only time will tell ! =D I do hope you continue giving feedback on each other, because I do think there was some value in it for all. Some got surprised by Ricks answers, Rick might be warned a bit about common pitfalls, though Rick did have some surprising solutions. I kinda do hope and wish that Rick gets a little bit more help with trying to implement some of his ideas. I also hope Rick tries to make this language less weird and hard to understand and more intuitive, some things were and some things might not be. By Rick trying to listen to others what is intuitive and what not his language might actually become a bit better. Rick may need some help implementing certain ideas or working out things more. Perhaps if Bart and Rick work together and finding some middle ground on what they actually find acceptable and intuitive they could benefit from each others work as well as others. Writing a compiler is not an easy job and the critique that annoyed me the most is demanding/requiring Rick to figure out everything. This seemed a bit unreasonable. The state of the art in compiler technology was probably helped forward/invented by many and not a single individual. Bye for now, Skybuck.
[toc] | [prev] | [next] | [standalone]
| From | skybuck2000@hotmail.com |
|---|---|
| Date | 2018-10-10 18:24 -0700 |
| Message-ID | <967fdf37-f74e-470f-906d-3fc8e520d4b2@googlegroups.com> |
| In reply to | #133735 |
For those that find typos annoying or confusing here is a 70% corrected post, it's probably not necessary to re-read this, cause the original posting was pretty good and just had some minor typos and miss-spellings, very few. (Last 30% not checked, but is also probably the most boring part, since this last part should be pretty obvious. Just to be clear: I am all for returning the RHS of the swap). Posted on comp.lang.c via groups.google.com on 11 october 2018 by Skybuck Flying: Subject is: >< swap operator I wanted to write this reply one or two days sooner, but for some reason PC/Internet was acting strange, anyway: I've read some of the postings in this thread and it's quite amazing, sometimes amuzing and also insightfull. I will sum up shortly what I've learned from this thread and the way I see it: There is apperently a problem with implementing a swap operator in general, though this proposed operator symbol does illustrate it pretty nicely. The suggested operator was >< which looks like an xor to me, but it could also be the "x-wing" from StarWars ! =D For that reason alone a true nerd would implement it in C LOL, no just kidding, but let's get a little bit more serious though, thanks though for the <=> spaceship operator and tie-fighter reference, pretty cool. Anyway: The >< operator can be thought of as two operators combined: A > B B < A As was explained somewhat in one of my subsequent postings. Pretend for a moment that > and < does not mean greater and less, but is actually an assignment into a certain direction. Here apperently lies the problem. C is a LHS language, left hand side language. Basically this means everything goes to the left, for example: A = 10; // is legal 10 goes to the left. 10 = A; // is not legal 10 goes to the right. The reason for this LHS rule is the following code: 10 = A = 20; What is A ? Is it first 10 and then overwritten with 20 ? Is it first 20 and then overwritten with 10 ? Is it perhaps 30 ? Is it perhaps 15 ? A precedence could be introduced to read from left to right when undefined. In this case A could be 20. Anyway it was kinda refreshing to see Rick's point of view on programming language in general and what might be possible. Bart countered this with some critique, though Rick impressed more with actual assembler like statements/output showing how it would/could work, so this does proof that Rick knows a thing or two about compilers and generating instructions. Also the idea of a "god" programming language is kinda cool. A language approved by "God" :) I don't take it too seriously... but why not mix logic and religion... kinda funny. If Rick wants to do this he has my approval LOL. I don't think I quite agree with the way Rick would want to implement >< swap operator, that was quite hard to understand. I do agree with Bart and others that in this case swap operator would allow a rotation. A <> B <> C. A would end up on the right side replacing C, as follows: A <> B B <> A followed by A <> C C <> A This seems to make most sense to me. There seem to be further/other problems or undefined things: What is the result of A >< B, some pointed out this would actually return two values which seem somewhat of a genuine remark and observation. This is apperently unusual in C. A further problem is, which was explained far above, A > B This conflicts with the general approach to C which is LHS. Now suddenly data is flowing from left to right. Also the rotation example illustrates this. Rick was also very sharp and observative in this regards, his example was: (A + B + C) = D could be replaced with: (A + B + C) >< D Sort of conceptually, maybe even in actually output and such. One person suggested to return "void" for the >< operator in case it's used as a sub expression (?). Perhaps this is an acceptable solution (?) (for now ?) Other funny things could be done though, for example summing it up, but this would then only apply to integers, swap is a bit more general than that. Rick suggested to pick either one of the "operands". Either A or B. This creates some weird issues, pre-fix, post-fix, before or after "the deed". Rick had some further suggestions: =>< or ><= The = symbol would be used as a sort of direction, or operand selector. LHS vs RHS. = on left side would mean whatever is swapped to the left is returned. = on the right side would mean whatever is swapped to the right is returned. However this still is a problem. Before or After the swap ? So this definition is not enough for me at least and remains vague, but it was a nice attempt from Rick to try and expand on this idea and make it more usefull/diverse/powerfull. Just to make Rick happy cause he seems to be fund of combining symbols, which was also a cool point by Bart, many combinations can be made, so just to make something even more funny than Rick here goes: I will try to solve the pre/post operation problem by adding yet another symbol: - will mean pre + will mean post Just like ++I and I++ As so many of you C programmers love (and hate? ;)) Crashed any spacecrafts yet ? =D Anywayyyyy :) =D LOL... so yeah you should be used to seeing this already... though the position of the symbols are more important than the symbol itself. Cause it can also be applied to negative/minus/decrement --I I-- So the original idea was just a simple swap: A >< B Which turned out to be not so simple given C's constraints and practices and philosophy and practicality and so forth/implementation concerns/clearity, etc. Then rick introduced return specifier (I'll call it). A =<> B (returns/result left side) B <>= A (returns/result right side) I am not totally happy with this because it is missing before and after the swap, I want this solved somehow so let's try something: A +<> B (return left side after swap) A <>+ B (return right side after swap) A ->< B (return left side before swap) B ><- A (return right side before swap) Maybe this idea of "pre" and "post" returns makes some sense or maybe not ;) Logic inspection and code tries/examples would have to shed some light on that to see if it could be usefull. Again Rick tried to see the usefullness in it, then others pointed out that the >< could be omitted and had no effect. Eventually the debate turned into a nasty name calling conflict and also humilating Rick on his religious believes and view of the world, but that is kinda uncalled for especially seeing the effort he put into working out his ideas. This does illustrate that it's perhaps better to keep logic and religion seperated, then again even Einstein and that other guy may have stumbled on mathematical proof of god ! ;) Not sure if religion/god and logic are related/connected... it's a little bit interesting to think they may be connected though, this would be surprising to some ;) Unfortunately Rick is trieing to do something that scares people: Trying to create a more relaxed C language called CAlive. Kinda funny name to call a language "alive" is this a reference to god/living beings/religion ? hmmm... Other people worry it won't work well or will produce undefined/bad results or bad code. Other people worry their C code may not compile anymore. Bart also seems to be busy with his own compiler, though no real evidence of that existed in this thread, at least not in the way Rick showed, though Bart also had some interesting critique, as well as others. For me it's easy to read all of it, cause I generally don't code in C but in Delphi which is a much more relaxed language. So for now I keep an open mind to for example Rick and his proposed language ideas. Though somebody added a link to his specification, but it's behind some kind of "member wall" have to be a member to see it, this is a bit unfortunate. Would like to have seen it, oh well... The discussion about operator symbol vs routine/macro name was also interesting. There were also some slight concerns that re-using these symbols might also be problematic. For now it seems introducing this operator has less potential for conflicts than a macro/routine name and such. One argument against this operator is that it is rarely used. This is perhaps true, but what other language features does C have which are rarely used ?!? I do know that writing a swap routine is boring and annoying as hell. Also how many swap routines can you write for different types ? swap_my_struct ? swap_integer ? swap_pointer ? and so forth this was also pointed out by somebody. Somebody else also had a very interesting point: swap( a, b ) Conflicts with the way C works. A C programmer seeing this does not expect a or b to change since no call by reference was used in case for example swap was a macro. Correct code would have to be: swap( &a, &b ) Though don't blame me if even this is wrong, cause long time I wrote C code like this ;) Anyway... all interesting points/arguments. Reading through all of this my advise if this were to be implemented is as follows: 1. Keep it as simple as possible and only make it do for what it was intended: Simply swapping A and B. 2. Result value should either be two results if possible or void to prevent issues. 3. Though if a result is desired then I think it makes most sense to stick with LHS and the POST solution. (See below why this does not actually make any sense to me for swap operator ! ;) (Rest of post is not checking for spelling errors, it's late time to hit the sack and such ! ;) :)) This makes most sense, first the operation is performed, and finally the LHS of both is returned. Most left is returned. Perhaps this might rule out certain functionality, but I am all for easy to read and easy to understand code. Since return values are usually at the end of a function it makes sense for the programmer to expect the swap to happen first and then the left side to be returned. Which leaves a perhaps unresolved by slightly interesting feature: A <> B <> C Will this could/might be an awesome rotation, this is not what it was intended for and this may upset to many oldtimers who wrote C compilers and don't like stuff moving from left to right like that. Thus perhaps it's better to consider this a compile error. Only two operands should be allowed and not more. Though in a way the code still makes sense: A <> B is performed B <> A LHS is returned: B Then B <> C is performed C <> B LHS is returned: C This is counter-intuitive though, but perhaps you C programmers might like that ;) Now that I see this bad example, perhaps it's a much better idea to return the RHS to make it intuitive. Perhaps this might conflict a little bit with the C LHS philosophy, but perhaps SWAP is simply an exception which must be applied to make it usuable/usefull and intuitive. I would actually recommend to return the right side after the swap is done, to keep it intuitive. So that is my final say on this matter. Also here is a slightly amuzing fact for you guys: I kinda left my e-mail attached to this thread cause I post via groups.google.com and it automatically sets my e-mail. So my e-mail box was "spammed" with all your replies =D But I don't mind so much since this thread was interesting. I do mind the idoms and other side tracking and "compiler implementation discussions" this is getting a bit off-topic/sided tracked, then again it's also somewhat on topic as to how to process/compile this swap thing, so continue for now, but keep in mind this goes all into my e-mail box, not sure if I can disable this, but for now I will let you have fun and enjoy spamming my box a bit more. (Also I had some other spam from some forum spammer but that was easy to delete, not gonna delete these mails from this thread for now though, maybe some day it might come in handy if I ever want to implement some sort of compiler myself ;) :)) What started out as a seemingly simply idea got a bit nasty, but interesting nasty, mostly cause of people trying to write their own C compiler/language... I guess it was a lucky time to post this otherwise the response and feedback might not have been as good ! ;) Lastly I wish you the best with your language endeavors ! Don't let anybody put you down. Some might be jealous, some a bit frustrated, some mean well and try to share pitfulls and gotchas, though some may also under estimate the skills of others or over estimate their own skills =D Which is which only time will tell ! =D I do hope you continue giving feedback on each other, because I do think there was some value in it for all. Some got surprised by Ricks answers, Rick might be warned a bit about common pitfalls, though Rick did have some surprising solutions. I kinda do hope and wish that Rick gets a little bit more help with trying to implement some of his ideas. I also hope Rick tries to make this language less weird and hard to understand and more intuitive, some things were and some things might not be. By Rick trying to listen to others what is intuitive and what not his language might actually become a bit better. Rick may need some help implementing certain ideas or working out things more. Perhaps if Bart and Rick work together and finding some middle ground on what they actually find acceptable and intuitive they could benefit from each others work as well as others. Writing a compiler is not an easy job and the critique that annoyed me the most is demanding/requiring Rick to figure out everything. This seemed a bit unreasonable. The state of the art in compiler technology was probably helped forward/invented by many and not a single individual. Bye for now, Skybuck.
[toc] | [prev] | [standalone]
Page 18 of 18 — ← Prev page 1 … 16 17 [18]
Back to top | Article view | comp.lang.c
csiph-web