From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109216 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sylvain Hubert Newsgroups: gmane.comp.tex.context Subject: Re: context.delayed as parameter of setuphead[before=...] Date: Wed, 4 Nov 2020 18:17:06 +0100 Message-ID: References: <78fa20a9-8332-29cb-0269-510116964a6c@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6826071213646350043==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7932"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 04 18:20:20 2020 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 1kaMSK-0001vI-DH for gctc-ntg-context-518@m.gmane-mx.org; Wed, 04 Nov 2020 18:20:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 30BAA1A83E6; Wed, 4 Nov 2020 18:17:22 +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 axlyJqUWQ_T6; Wed, 4 Nov 2020 18:17:21 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4F21C1A9D8E; Wed, 4 Nov 2020 18:17:21 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F0BF91A9D7B for ; Wed, 4 Nov 2020 18:17:19 +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 Dd75RTkLPHBO for ; Wed, 4 Nov 2020 18:17:19 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.176; helo=mail-il1-f176.google.com; envelope-from=champignoom@gmail.com; receiver= Original-Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (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 419041A83E6 for ; Wed, 4 Nov 2020 18:17:19 +0100 (CET) Original-Received: by mail-il1-f176.google.com with SMTP id g7so19988841ilr.12 for ; Wed, 04 Nov 2020 09:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ien7pzm28Tb7vEn9iiLW8sqs+xlUDdDp+se0JbKARRY=; b=OPYsInF494veqiwDbx7EevVmGwMNlc3IhrGdg99Zox9L1T6DGuVDlj1FDFa7tYMA/6 l8JPMVSems0AHl8wr7yrYhkbx2XBlM9ghzMedK/OD+jwmyyssQJ+x/o8NLThAdSwyUUk h77DYyeYSvSdxq2Gv1pilDU65d/hGoyCVd9aIQm+x+KQ8Cm6z5KXN8+VSfoNV9Q5iTOd 6ypyBrKwXtzQpunvn3UYhN4fUj/KnHI20Ysg8KAUoi3mtudx7xV8jsayfnJq5g8fHfzG avkyQddQj4vrNq0z8SrgsEF9r3cFOKBiJ0NzpX0LW84/9yg3pGtxFIdI0LUkTQHgsGIO Rf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ien7pzm28Tb7vEn9iiLW8sqs+xlUDdDp+se0JbKARRY=; b=FOHLdSYSX4OGdpwJ7NeT0hfglx+HKXtUZKhC9Kw8vKQabT3a0XimfIGCNKzgoXEYf5 3CzmJ7iZ7KFqvTCoZ+tr4cZAkRY4zVYHhIOTCQXfGzC9UnTsmg8mlTrxxczDgJAcNY4Q kEjRIaBCH77I12ey+ThaTrhRBsC1t5KYAcZecDCKN5CWj2i+lGPi4SJEkLNLq2CL0kf+ xQqgE0427xCUhlyC6Y30N1cXbUAZHmns16sAd4rl5ZXQ+pOIoj6gpLNRxqszhc1k935b eZERrVF2qXWbhEwy4YOUFA4/xE/9r4jsqIosXa1GMZXaFCcZ4aT5Gujx+UuYYYalfrsf GMHw== X-Gm-Message-State: AOAM533nuLKCLmHhf/kD7R5YcBR4azvYDiSwCPktE/G2yjAUJnh57uvH rczf8fFp91vRF3hTYk9Umvnw7rMu2LWvgbFqxgIRc5jbgzg6gQ== X-Google-Smtp-Source: ABdhPJzrD9q2Bgvom0Z9LUakiwaysc5h67qADzi7WKDjjApkj7uPcrDQqdk8KYrIYMtrRFlNo72qtR8GS5BPo5805CI= X-Received: by 2002:a05:6e02:df1:: with SMTP id m17mr1947672ilj.70.1604510237937; Wed, 04 Nov 2020 09:17:17 -0800 (PST) In-Reply-To: <78fa20a9-8332-29cb-0269-510116964a6c@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:109216 Archived-At: --===============6826071213646350043== Content-Type: multipart/alternative; boundary="000000000000c555ec05b34b2668" --000000000000c555ec05b34b2668 Content-Type: text/plain; charset="UTF-8" again, sorry for replying on the wrong channel. On Wed, 4 Nov 2020 at 17:35, Hans Hagen wrote: > > it would harm performance because it involves parsing all values and > also ways around cases where the title is "function" (lieral text). > I'm not sure I understand what you mean by literal text "function" here, but in any case isn't it a one-off <1ms cost to parse a function? > "function() local x=1; return function() x=1-x; return ({'black', > > 'gray'})[x] end end" > > can be way much easier for lua speakers than digging up a bunch of > > documentations to figure out whether it's implemented, or how it can be > > implemented in a language like TeX, or both which is worse. > Really? I have no clue what that function makec clearer than tex. And > one still needs some documentation that explains what it does. > > Often there often is a pretty clean way to do it with less code. > For an experienced tex speaker, indeed. But for an average user who just wants to typeset a bit of fancy stuff, programming in tex is probably not the most pleasant thing to do and arguably not the most reasonable either in light of any modern language like lua. Sylvain --000000000000c555ec05b34b2668 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
again, sorry for replying on the wrong ch= annel.

On Wed, 4 Nov 2020 at 17:35, Hans Hagen <j.hagen@xs4all.nl> wrote:

it would harm performance because it involves parsing all values and
also ways around cases where the title is "function" (lieral text= ).

I'= m not sure I understand=20 what you mean by literal text "function" here, but in any case is= n't it a one-off <1ms cost to parse a function?

> "function() local x=3D1; return function() x=3D1-x; return ({'= ;black',
> 'gray'})[x] end end"
> can be way much easier for lua speakers than digging up a bunch of > documentations to figure out whether it's implemented, or how it c= an be
> implemented in a language like TeX, or both which is worse.
Really? I have no clue what that function makec clearer than tex. And
one still needs some documentation that explains what it does.

Often there often is a pretty clean way to do it with less code.

For an experienced tex speaker, indeed.
But for an average user who just wants to typeset a bit of fancy stuff,=20 programming in tex is probably not the most pleasant thing to do and=20 arguably not the most reasonable either in light of any modern language lik= e lua.

Sylvain
--000000000000c555ec05b34b2668-- --===============6826071213646350043== 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== --===============6826071213646350043==--