From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GO/lHH219GWIOgEA62LTzQ:P1 (envelope-from ) for ; Fri, 15 Mar 2024 21:54:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GO/lHH219GWIOgEA62LTzQ (envelope-from ) for ; Fri, 15 Mar 2024 21:54:21 +0100 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=A7lmNyHZ; dkim=pass header.d=gmail.com header.s=20230601 header.b="kNcvQxl/"; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1710536061; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+1QYAFIBQgjiEyZkeAGNmnvyKg9yOzleqwFo1lZ0rsk=; b=H2NQeR+c+mHPV0qxjwZHzHsnCPaR6LQVWcCj1sEA9MFEw4PrI6W4pKGjQme6tDK1yoOUNp nFxfxzeGLyAz4QGXWGYOjevCzDbrvBchV8+26J//8fOrgLw034CMYBKf4eOrjhh3S3rz47 brAbqJDUlvanLJDAvfrWRG4JbRQsHJt0PbMTR99QTvZYfHLqI9c50XnM11KtreaHSllJMF S/f/3MaTqqB9Kw0hKhscHNgUBLFDdYB+BsPFmn/RZZCYTrWFlS6M1OskqORGHP2UMQDtyQ ZHVov6FJLwdhICE6jwxwSOouBckRGCmfrJvsWHzQcXeCmR6up9haSxXFdmRfGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=A7lmNyHZ; dkim=pass header.d=gmail.com header.s=20230601 header.b="kNcvQxl/"; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=johnnyrichard.com; t=1710536061; a=rsa-sha256; cv=none; b=rEbse7gd7nr951I12bnHq8FCl5PBvKfm8/FJE8IC6BNo7FNdIH6KNKv2jwaINz2kYzlqdt iKGBpZ05wlO+33KwA/A8aszXsQsZI+EJL7t0PXLoZMKelQZYtQJ9jFKDuHPl/PS26cd9AZ Ihjcs+eYMyWeQupYadJteOrE/Y1LfUTVePpyxwfJBBGjKtwHzYocLfIvTprnsdqX1JAv7G 6PAwyx+dJGPeBzDLav2iEi31X3NrCW0vGFsp0fpYWj6WE+DYzs/+kjbF6ZnLaD10QASICU k57DbWyQnJSxCv98pdXqBcO9QJ/xtRqxk+xsJDabL47dF50Lp7CbZBrp2/1N+Q== Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E3C60138E6 for ; Fri, 15 Mar 2024 21:54:17 +0100 (CET) DKIM-Signature: a=rsa-sha256; bh=RFu/A1aFJ1V3O1WxugsoJIR+PUc/BKk8Q8WE3TYjkEI=; c=simple/simple; d=lists.sr.ht; h=Date:To:Subject:From:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1710536056; v=1; b=A7lmNyHZtm23ye/Vl0SxVjNeia1Ld6jg+dLUA9UZOFq9xf4i6lIrJjuT7h4MiO5hPPTBtQwu ROu871DmUG+t1oGXfQTAWq3/HFv9b3bT3qSLgmrTO7jNAoDNmcFmMyX4rEkmBrab0STNSisEHEi Oh/h3jvvQzBadY5AbwE/h81FF5+spUiBWjcojWcjP6kbhUWgk626eHoW0S/Ii2CxxIg5Gs5KXGd Y4/9r0pUlppb4VGQ1jXO4QgiiFxtVKqU4J1Q3olXMcTC2lWXHbS3yVbGrJ91+IZlAhGRZ9k9SxD 1jUuGUZvE/DkvWMAZWmKGHEGjaAMXR5Swbd66VFdXD8eg== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 4300A20313 for ; Fri, 15 Mar 2024 20:54:16 +0000 (UTC) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by mail-a.sr.ht (Postfix) with ESMTPS id 7B7FB2027C for <~johnnyrichard/olang-devel@lists.sr.ht>; Fri, 15 Mar 2024 20:54:15 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-29c54d08d5cso2269050a91.3 for <~johnnyrichard/olang-devel@lists.sr.ht>; Fri, 15 Mar 2024 13:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710536054; x=1711140854; darn=lists.sr.ht; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=+1QYAFIBQgjiEyZkeAGNmnvyKg9yOzleqwFo1lZ0rsk=; b=kNcvQxl/k3MvF8bukLQC15lVoZ3NFiQfOX2xTmIQjGKQuoVwx+tMd+i0+oOIltVXgz 6DyXugtvqElPNUr2rlMmwdZ2vDSAIFrxm6NUH4XASV5l+Mp4qZVWWOVEKvAWH2QpBJuT osl5e7LijWIrBTv04WDXLKvuY4F3D7nig4WlVgmS4WK8up5dggfVOB1MpuEKHCFVoTdv DmYPHAReU69hiuxD0dkWuPQloxVhCMCSWXVuF5lVSGYdrOQeenNJhoS3Kvmc0Dv0beHD ZAEGfMoNep/TgTRfq4aYXCKIhBC4haKtwwjUl8P5au4P6YquMxB2us30ABZc7w/L5RAX sLtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710536054; x=1711140854; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+1QYAFIBQgjiEyZkeAGNmnvyKg9yOzleqwFo1lZ0rsk=; b=xGUthb4NB97ScvejWZmit2Rqp6cIycVe3D/fOwVdvp1AGCdtS8Yx9KajJMiB0B90uT ksj8RYGxZE2sExTTXZreqlLGdDDHikpAagcg2r9GiJZT4K09z1roqGF4Xvw221jyX1xp zXuI/WQrpjOto1nHUXDRcL/PeUWr43vNwZsZNxK9cruKJzW8YLftwASadVkjzp8Shs6J 15YAZotPPtVxbFj6YrX7JEJWynlpMCncJn+4FUnM+qWPivPWO+04eVQQed/TB4N7Gjjf U23qeVAa3qTqMRFghiX6zQ2ktcxsiVqNQqb+9sCXkuYs0M2r4eunBPuduG0Swh0NDcyZ B3LQ== X-Gm-Message-State: AOJu0YxtP48aeZGIuh/JNs7GELyYLyTLhFurp4oqxfhjBPt7py2OXuHf zGbOgOsvlzfBju8utPm28JHfDVdRRIVWqI+sCgvICre1j/D3t4PqdZsy6L2Xc+0= X-Google-Smtp-Source: AGHT+IE8srXhbT9tnylY4C/s5FnnBcwrWTrlYxxpRs+WuQWKEvPbO6PZvHKm5Qp30aXpgfQZcpbyOw== X-Received: by 2002:a17:90b:804:b0:29e:db7:fcee with SMTP id bk4-20020a17090b080400b0029e0db7fceemr1061790pjb.36.1710536053426; Fri, 15 Mar 2024 13:54:13 -0700 (PDT) Received: from ?IPV6:2804:2e00:80a9:5800:5e4:b444:7b57:c219? ([2804:2e00:80a9:5800:5e4:b444:7b57:c219]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a974800b0029b7e2f7e28sm3369386pjw.7.2024.03.15.13.54.11 for <~johnnyrichard/olang-devel@lists.sr.ht> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Mar 2024 13:54:12 -0700 (PDT) Message-ID: <11b1f29a-7a4a-4b46-9376-98bd52c9edd4@gmail.com> Date: Fri, 15 Mar 2024 17:54:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ~johnnyrichard/olang-devel@lists.sr.ht Subject: Re: [RFC PATCH olang v1] docs: create zero programming language specification Content-Language: en-US From: Ricardo Kagawa Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -7.53 X-Spam-Score: -7.53 X-Migadu-Queue-Id: E3C60138E6 X-Migadu-Scanner: mx13.migadu.com X-TUID: NCEVpeRbk3W7 > You've replied to the CI build reply. Next time try to reply to the > right thread. I just opened the "Reply to thread" link from sourcehut's web interface. It automatically filled the TO, CC, Subject and some thread ID header, which values I just trusted. It seems the UI is not to be trusted, but then, which values should I use? The address in TO seems to have bounced my reply, so I thought it didn't even make it to sourcehut. > Your message has few weird line breaks. I am not myself sure, but I suspect it is an issue with the file format generated by `vim`. My default `email` file type seems to be forcing the `dos` format (CRLF line breaks), which might be being interpreted as two separate line breaks somewhere between Thunderird, Gmail and sourcehut. I'll see if I can force it to use the `unix` format (LF only) and if that fixes things at all. > I'm not sure how you want to version lock this variant. Should I add > a specific github/git tag version to the document? Yes, sort of. The web tool itself cannot be version locked, since it simply does not have that option, but it does link to its GitHub project. The project does not itself contain the description of its EBNF syntax, but it does have a link to what it uses to implement its EBNF parser, which in turn describes its syntax. You could include a version locked link to [that][1]. [1]: https://github.com/Engelberg/instaparse/tree/v1.4.12 > > Is the language going to support Unicode? > > I would say to keep it simple as much as we can on this earlier stage > (ASCII only) unless you have a big concern. I guess that would be OK. I don't think it would be too difficult to migrate later. Maybe tricky, but not difficult, since Unicode is a superset of ASCII. Just need to be careful not to depend too much on the fact that ASCII characters are stored in 8-bit variables, as Unicode uses variable-length characters (variable within a string, but characters are multiples of 8 bits). > If we don't add a token in here like **=** it will be very weird. Actually, I mentioned Kotlin also to imply that there would be an equals sign before the expression. > > - I have not checked if this syntax would avoid that edge case with > > JavaScript I mentioned in the beginning. I might check that next > > time (I'm still not sure of how). > > Maybe we are going to discovery it on the implementation process. I _suspect_ it would be enough to give precedence to interpreting line breaks as end-of-statement, and if so, there might be a way to represent that precedence in the EBNF grammar (by convention). I would still need to mull over it for a while to be sure. Another revision: - Function body now accepts a single expression. - This introduced the `` token, which is not an actual sequence of characters. It allows the function body expression at the end of the program without a following line break or semicolon. Earlier declarations must include a line break or semicolon. - `\v` (vertical tab) and `\f` (form feed) included as line breaks for completeness over ASCII (based on `\s` regex class, which agrees with Unicode properties over the ASCII range). - Integer literals can now include underlines as separators. - The literal is allowed to terminate with an arbitrarily long sequence of separators, though. - It would be possible to restrict the last character to be a digit, but maybe it is not worth the trouble? - Introducing hexadecimal integer literals. - Hexadecimal literals are allowed to have an arbitrarily long sequence of zeroes to the left, after the `0x` prefix. This is intentional, and the parser should ignore excess zeroes. - The alphabetic characters in the literal should be parsed without case-sensitivity. There is no difference between the `0x` and `0X` prefixes in literals. If mixed case is not desirable, let the linter or formattter restrict that. ``` (* Entry Point *) ::= (* Functions *) ::= 'fn' ':' ::= ::= '(' ')' ::= ::= | '=' ( | ) (* Statements *) ::= '{' ( )* ? '}' ::= ';' | ::= ::= 'return' (* Expressions *) ::= (* Identifiers *) ::= 'u32' ::= ( | '_') ( | | '_')* (* Literals *) ::= | ::= #'[1-9]' ( | '_')* | '0' ::= #'0[Xx]' ( | '_')* (* Utilities *) ::= + ::= * ::= | ::= #'[\n\v\f\r]' | '\r\n' ::= #'[ \t]' ::= #'[a-zA-Z]' ::= #'[0-9]' ::= | #'[a-fA-F]' ::= #'$' ```