From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113659 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio via ntg-context" Newsgroups: gmane.comp.tex.context Subject: Re: upload Date: Sun, 5 Dec 2021 23:41:18 -0500 Message-ID: References: <56be4d62-9642-cdd3-acf5-79334efc3b8a@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4965739068922523529==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Jairo A. del Rio" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 06 05:42:05 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mu5pF-0000S9-Ce for gctc-ntg-context-518@m.gmane-mx.org; Mon, 06 Dec 2021 05:42:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 15705280FE0; Mon, 6 Dec 2021 05:41:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r-MSC9eS821q; Mon, 6 Dec 2021 05:41:34 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 43316280EB6; Mon, 6 Dec 2021 05:41:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BF4F8280CA9 for ; Mon, 6 Dec 2021 05:41:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NtTRURE1GPtK for ; Mon, 6 Dec 2021 05:41:30 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.45; helo=mail-wr1-f45.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 46083280722 for ; Mon, 6 Dec 2021 05:41:30 +0100 (CET) Original-Received: by mail-wr1-f45.google.com with SMTP id c4so19686438wrd.9 for ; Sun, 05 Dec 2021 20:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Nk6bdojMzhpHCtEmlqTB+88CFrUhXgJWA189sF1EZ3I=; b=T9AtNtFh7GxgNMbZC8vtvwbAYa0jKuc27XMYjaplkbZaU1I0xBMZ4JBjiG2iADLMLJ DzKWl80S4JdTHlCrSipC/cJIbzEgHUvXmjn58qMooUCrR2hAPNN24zj7qiuDdH12lpG4 7Hrz3FzvLaDl83MiPIDmmXtcV3fj/9azR95Hd+ZbTMAF8MzYvU7idDr6uo0xSTxJcdC6 UrmkJpwIThtyZWApFRogQXg8fgiZ23pKsW13j/hzrFYfqferls681kw9FRAFAU7kjgUN /YXJXJLLjkgupOFA/HdTsXkcvma5BLj3nfc1/TBGz8lGd6KZPIRVuNuM5uDvMaFSr7tu 5XlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Nk6bdojMzhpHCtEmlqTB+88CFrUhXgJWA189sF1EZ3I=; b=Far4hTvVQwZQ0u2Lp4dhZZwZjAka7qtsgaD4OIP83IB37s5CPpcsQiCO98kEg20zr8 YwDFNNHN2p4O3MxWhW99vBy3nB3/TvRPFFZyp+x+TNrqG8partdiOsdAoz/cSj/6L1mB S4fWAMtFQc6w/w4x9WvX0At5M0MrsuTsjzBNN3e6JZfRd8SrJ6eznMeRHpQNfD+97lC3 VC0ZFOBUNJeYcAIMoUmIMZHD0mQaWHzoxWk1Hv/NbHrbq4WFJtOt2OSAWhgy45C5RPMx rkf+dMvEUCatYZsae03yA/fL1vFnAvHENqAKutSJwCGCbJvMxFx+vro+hM3kRuSJHt8h +acw== X-Gm-Message-State: AOAM531wvyounepo+TaC28dUvrBiG1UOhKl7QjplkFGLQ5Ri3+3rp4i6 wI6/02x00Qs68ZiP7wkpJVF37VFSZvsEqZXh3IzyFsPyLFzTWg== X-Google-Smtp-Source: ABdhPJx0SPd5oc7JrrXgJdznugOJb8Kbfd5vlS0OCDa+++gZUoQNpMWwTtozoBiLtmBKqFfFNb7lk+PyoTxmWJaNZO8= X-Received: by 2002:adf:ed83:: with SMTP id c3mr39235328wro.169.1638765689684; Sun, 05 Dec 2021 20:41:29 -0800 (PST) In-Reply-To: <56be4d62-9642-cdd3-acf5-79334efc3b8a@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:113659 Archived-At: --===============4965739068922523529== Content-Type: multipart/alternative; boundary="000000000000cdc73405d272de3a" --000000000000cdc73405d272de3a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Hans. I've got a question. Negative steps are treated as positive: \starttext \expandedloop 10 0 -2 {\the\currentloopiterator\ } \stoptext gives 0 2 4 6 8 10 Is this expected behavior? If so, it would be fine to have something more alike to MetaPost's "for ... step ... until" loop. Thank you in advance. Regards, Jairo El vie, 3 dic 2021 a la(s) 09:29, Hans Hagen via ntg-context ( ntg-context@ntg.nl) escribi=C3=B3: > Hi, > > a new upload > > - some keywords renamed in the engine and therefore more split between > mkiv and lmtx (hopefully i included all files) .. if something doesn't > work any more it might be because i missed a rename. > > - i finally decied that it does make sense to have native loops at the > primitive level (after all, metapost as macro language also has them) > and although much is possible in macros it doesn't mean we have to do it > the (often ugly and showing-off-by-abusing-side-effects way). > > We have just a constructor: > > \unexpandedloop 1 100 1 {.} > > and a fully expandable one for e.g. use in \edef: > > \expandedloop 1 100 1 {.} > > plus an also fully expandable one for anywhere but with potential side > effects (out of order local loops): > > \localcontrolledloop 1 100 1 {.} > > complemented by a few status primitives (integers, use \the or \number > to serialize them): > > \currentloopiterator > \currentloopnesting > > and a quitter that aborts at the next iteration: > > \quitloop > > as usual it's experimental for a while. Among the rationales are 'less > tracing clutter', 'performance' and 'more natural primitive tex coding' > (but that one is personal). > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --000000000000cdc73405d272de3a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Hans. I've got a question. Neg= ative steps are treated as positive:

\starttext
\expandedloop 10 = 0 -2 {\the\currentloopiterator\ }
\stoptext

gives

0 = 2 4 6 8 10

Is this expected behavior? If so, it would be fine = to have something more alike to MetaPost's "for ... step ... until= " loop. Thank you in advance.

Regards,

Jairo=

El vie, 3 dic 2021 a la(s) 09:29, Hans Hagen via ntg-context (ntg-context@ntg.nl) escribi=C3=B3:
Hi,

a new upload

- some keywords renamed in the engine and therefore more split between
mkiv and lmtx (hopefully i included all files) .. if something doesn't =
work any more it might be because i missed a rename.

- i finally decied that it does make sense to have native loops at the
primitive level (after all, metapost as macro language also has them)
and although much is possible in macros it doesn't mean we have to do i= t
the (often ugly and showing-off-by-abusing-side-effects way).

We have just a constructor:

=C2=A0 =C2=A0\unexpandedloop=C2=A0 =C2=A0 =C2=A0 1 100 1 {.}

and a fully expandable one for e.g. use in \edef:

=C2=A0 =C2=A0\expandedloop=C2=A0 =C2=A0 =C2=A0 =C2=A0 1 100 1 {.}

plus an also fully expandable one for anywhere but with potential side
effects (out of order local loops):

=C2=A0 =C2=A0\localcontrolledloop 1 100 1 {.}

complemented by a few status primitives (integers, use \the or \number
to serialize them):

=C2=A0 =C2=A0\currentloopiterator
=C2=A0 =C2=A0\currentloopnesting

and a quitter that aborts at the next iteration:

=C2=A0 =C2=A0\quitloop

as usual it's experimental for a while. Among the rationales are 'l= ess
tracing clutter', 'performance' and 'more natural primitive= tex coding'
(but that one is personal).

Hans

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000cdc73405d272de3a-- --===============4965739068922523529== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4965739068922523529==--