Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Sort of trivial code challenge - may be interesting to you anyway Date: Wed, 04 Mar 2026 07:01:56 -0800 Organization: A noiseless patient Spider Lines: 35 Message-ID: <86pl5jd4ez.fsf@linuxsc.com> References: <10n80sc$3soe4$1@dont-email.me> <86v7feei2e.fsf@linuxsc.com> <10o53k6$1i0ef$2@dont-email.me> <86ms0peby6.fsf@linuxsc.com> <10o6nci$21m76$1@dont-email.me> <86a4wpdmfi.fsf@linuxsc.com> <20260303235636.00007198@yahoo.com> <865x7ceakz.fsf@linuxsc.com> <20260304114541.000060b1@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 04 Mar 2026 15:02:01 +0000 (UTC) Injection-Info: dont-email.me; posting-host="de0045d7c780f08ea604ccdb8e034471"; logging-data="3163603"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N/HDzG6xSnIIPCV/iVHvcRwNfe0D6A5U=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:OlGZln4eM91lbUD/PRKk4lv+ADY= sha1:Fyzp06t1pvUi5qN3BgncRsfzT4w= Xref: csiph.com comp.lang.c:396759 Michael S writes: > On Tue, 03 Mar 2026 15:51:08 -0800 > Tim Rentsch wrote: > >> Michael S writes: >> >>> On Tue, 03 Mar 2026 06:20:33 -0800 >>> Tim Rentsch wrote: >>> >>>> My rule is not to post my own code until others have made a good >>>> faith effort on the challenge. >>> >>> One question before I start thinking: is setjmp/longjmp also >>> diallowed? >> >> setjmp and longjmp are both part of the standard C library, >> so yes calling them is allowed. (The C standard calls setjmp >> a macro, but the Synopsis describes it using a function >> interface, so it seems natural to count it as a function.) > > If setjmp/longjmp allowed then it's not interesting. > No thinking required, just tedious work and attention to details. > At least, that's how it looks to me without actually trying. It's a challenge to make it less tedious. Personally I found that interesting. If other folks have a different reaction that's okay with me. If you try it though you might find it more interesting than you expect; there are some skills to learn, similarly in a way to when doing functional programming for the first time. Or like assembly language programming - I wouldn't do assembly programming now, but I'm glad I went through the process of learning and doing assembly programming all those years ago.