From nobody Sun Jan 31 23:41:31 2021 Authentication-Results: mail-b.sr.ht; dkim=pass header.d=hagelb-org.20150623.gappssmtp.com header.i=@hagelb-org.20150623.gappssmtp.com Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mail-b.sr.ht (Postfix) with ESMTPS id C625211EFF5 for <~technomancy/fennel@lists.sr.ht>; Sun, 31 Jan 2021 23:41:30 +0000 (UTC) Received: by mail-pf1-f171.google.com with SMTP id b145so3600006pfb.4 for <~technomancy/fennel@lists.sr.ht>; Sun, 31 Jan 2021 15:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagelb-org.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=dtBhadiWCIcK2ZlORrcEZhyM1JAdtOVXp9MHksXNlM4=; b=z9sDv+SMEhvyu/jaeK9TvoP9nB/odq1ijq4ToKiVqYQDG0prrBtWypDE7mt+IQdNma 5oikrreXR9CX86Ahip9cLvIOMPNSf+sEJXkoCl/ma/7VmnnXWwOjPw+M25t+LJ+QLZSP HUca9upnB6fdlgfn8wNvAjye+GZSnzEI727iIuHAD70S9nSK2Ozs6opIMbEVzwv+g9ID nSfQBGRJST8Juyh3KgQEaZo0SKWkaMvotOFDacwxTVxsN6onsRzjCzyWKAiX9sEqd7pj xHiZ5iAfq4dB2lyqHcKjar0FpKyI2TrrKw2C5ZRFBAT5V2GbqUfvD03R90T+q/8jDSiT Wp+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=dtBhadiWCIcK2ZlORrcEZhyM1JAdtOVXp9MHksXNlM4=; b=iL0g8q55uXGzWPf1pneReEky4784ynELFRpZx4xxyFinE11HydEDNoKDOGIiZTWOmQ oR8HyNcw2XfxW2DZbEz+sgSKDxYBA6NegSBDteXEG3c9ahb/bjyfOcpUL2kIQwlgx61o MsaE3l/AYqerDk/AhUsu+BbtNRuiqC6oij2MPv4+3lze5RSABwFkrP5Pj62I6oyslwzM CMSWO1NCmS2AfwWjHXLYpv3AHnha9X72qx45NxyVcAXVant+PiES9vMe2M7XjPPO3akU SisC3IyELapllHdc4MMWpwU/cOWijvuLnX4tzWVapiKQMgeyWalPHi/OzOJfBLHLvQ11 uoAQ== X-Gm-Message-State: AOAM533f9k3n7VNcxgG7ncMHtBfnbOBFev1Y3QNOzllHmbsH2ZfQBxaz fuL/j/PV1VTf3nDk7d8HM/gv+EPtnT5G0w== X-Google-Smtp-Source: ABdhPJwvlkU7dXgpNQ1F/fecM0lXf1UA980s+EsKzsbY4sbr5JumPjqrmvAsM7zl7j6KZZk5Wllr4A== X-Received: by 2002:a62:1788:0:b029:1cd:367d:2bec with SMTP id 130-20020a6217880000b02901cd367d2becmr2716668pfx.38.1612136489550; Sun, 31 Jan 2021 15:41:29 -0800 (PST) Received: from whirlwind ([71.212.154.47]) by smtp.gmail.com with ESMTPSA id c4sm14221203pfd.160.2021.01.31.15.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 15:41:28 -0800 (PST) References: <878s89yq0f.fsf@whirlwind> User-agent: mu4e 1.0; emacs 26.1 From: Phil Hagelberg To: Andrey Orst Cc: ~technomancy/fennel@lists.sr.ht Subject: Re: Raw string syntax proposal for Fennel In-reply-to: Date: Sun, 31 Jan 2021 15:41:25 -0800 Message-ID: <877dnsznbu.fsf@whirlwind> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Andrey Orst writes: > Perhaps I wasn't clear enough here. Lua raw strings can be nested > too, and this is done by using [=[ and ]=] delimiters, where amount of > = signs can be increased to contain nested raw strings. The notation > I'm suggesting here is a plain mapping on Lua raw string notation, > except of using [=[ we use r" to open the string, and instead of ]=] > we use a matching "r. I see. IMO this is a flaw of the Lua design. I think it would be better if raw strings were consistently and completely raw. >> The idea of emitting strings differently depending on what notation was >> used to input them seems problematic. > > This is the side effect of supporting a feature of the host language > but with a different syntax. I'm not sure that logic holds up. The point of Fennel is to offer new notation while preserving Lua runtime semantics. String syntax is not a part of runtime semantics. There are some places where we must keep features from Lua even if we don't like them, such as multiple return values. But I don't believe the same applies to syntactic features. If we decide to add raw strings, we should do it on our own terms. >> depending on what notation was used > > A slight correction here - depending on string contents, not the > notation. The notation implies mangling, but the mangling is always > based on contents, just as with regular Fennel identifier mangling. If its the contents of the string which determine how it's emitted, that means that sometimes Fennel's normal "" strings would be compiled into raw Lua strings; is that what you meant? Can you be more specific about what kind of contents would trigger it to be emitted as a raw string and when it would be emitted as a regular string? But again, I'm interested in hearing from others too. -Phil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEICQrrLvpWtoi0K/XgIoz03nIBsMFAmAXQCUACgkQgIoz03nI BsMmYAwAqLT/P8LgNNaSP9VRDRLxGY3QsLhrawt48pX7GwMKKSPANTC0v7AvfarL eZoegO7ZAjss1B2TZLvqiD+19SYNEZPr138gdsutMbdTi1NJxT9huZhY0q82ZESB 7UhrFmOMVPXR5drl5hAwjg6f0DUd0n/rN2jEeLTZnUDLpvA0vLU6Yh1Hkn0cks3Y hUABmFZfIPavsOPIGKrI+aWT2aDNAsz26T2BxhEniM68R8Tf2+7LPMAWLT5z6yvC TbKiy7JswqHbYP/s/THk0efzGfcS0keNRNwp0LZe1QVCJEjZYtUQxSsXVcBQ9mOi SYYmBJMf45NDkONkLkK158t+XI88BXGxF7Tmae+6+U1uu7D9C+KJZxZz4WPOseNo fWXy/ND3dNckCkdOYya9/x/DruauCwbew8dQcI0uvT/JmeEIvCvnpZD7hq8yqcP8 ka0gJTbLS9z5k/Hm7TMtoZ0EBZTvOw7j7mOFhLoL01xZKPAfXV5VNRi/PnUdkdwH o01yF3Gi =D9MZ -----END PGP SIGNATURE----- --=-=-=--