From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gM4EJU4P92XK1AAAqHPOHw:P1 (envelope-from ) for ; Sun, 17 Mar 2024 16:42:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gM4EJU4P92XK1AAAqHPOHw (envelope-from ) for ; Sun, 17 Mar 2024 16:42:06 +0100 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=nYkxpXTW; dkim=none ("invalid DKIM record") header.d=maniero.me header.s=hostingermail1 header.b=cLTOSFyk; arc=reject ("signature check failed: fail, {[1] = sig:mailchannels.net:reject}"); spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=maniero.me (policy=none) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1710690126; 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: in-reply-to:in-reply-to:references:references:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ckjXJKOqUx7cCQN8iO6JEH1LfQP37MZJ3ddCZlhSWDw=; b=ac7KxE2z1g+2Jqk1VO5YA/J2tEH0NNPyA/TjGS+tWcN7vDYdOmhghaYPMF20Zz7iabtJ2M l/EahePzhm64viahLCLGBZjwyYF2igT0lFItyGdTcu+8DcOyPh1tHuEqQT3luiCnhhSfTz T3A7xBHjo66hlCtM8eO/HlKGJsGJsjAotrpWSvwW9qK2GqYzqYOnCB3ZUSPXqDHzxfHldi evjm5KlehMuZOjsfB13XDtXMVnNig8fhdhQ2SFXXQPxB8roqbXsR9mlW+oqF4Vs2fwufkB LjRAcWydvcUFtYjZIC+mqhinNeQg1jXXan+7BAExlfO+27/qEo78Dvr9fwooxA== ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1710690126; a=rsa-sha256; cv=fail; b=CeH4LWylzCPq0nClMQjQtRR5Lr8nKqp9fTXvDBxzHSxeWI3JxRJtsMuYLKPdc3Kujm9+ZY Qpps9Llw6M+eMfhPxnuQPcz0Lz239oktXMhtNXi+bmh8hxUAYhy0X1DbWaEcKpPtIxcy4N ufaaPqo2cVvYuXtY3f6PmRSp11XL68EfEtKgleYq1hkrABwtsz9NNKpHg2rmt3vjrNp06F Ftp2GbVI+LhUEH7WMlNgp5+2v+MMuMwtQ5KFIF4LwW1SxtH4ZtAOlr34RCTeeRMmm/uUG9 LOWb4vBJ7IsNcyx4LpcE1zFgerJkKLNg8QLbu41RFkIL9VSeahm9Fc78YzFKcg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=nYkxpXTW; dkim=none ("invalid DKIM record") header.d=maniero.me header.s=hostingermail1 header.b=cLTOSFyk; arc=reject ("signature check failed: fail, {[1] = sig:mailchannels.net:reject}"); spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=maniero.me (policy=none) 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 95F1669D79 for ; Sun, 17 Mar 2024 16:42:02 +0100 (CET) DKIM-Signature: a=rsa-sha256; bh=bCl3Odup9WkzMCzzQyOqxJD5ZD9kQT7mMKMMqlze3EQ=; c=simple/simple; d=lists.sr.ht; h=Date:Subject:From:To:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1710690122; v=1; b=nYkxpXTWdRpq/Wuu74FqmJ2RlLQjUMAznC/Hx7wGXHAeb6AppqG/6OEZnai25HTlKx22iIZg FSaSFjSOyNZ4Ug6YlELkzR5YMZRMcMHTCB1kHjzVzWbK+Sd1uadYcc7vyNYDJa7yPvYcmOx3CbA ORsmT/eU9W9954ybYbyIPAJxyo42Ko/8vEgXK3BSSpOczOja41ZNLGlGuvSp3sByAJmBdoWDdsB BqXgWgLms6eG93PEh2/wpet3+Tajr9suHIkTmYNadTwZCPZBMeoSPGIkkBsrRQ8MR/EGWdMv8pu vyV1XitiY4gLN1Zg6Qx87ZwXiRsC3p/i69mH2ZVskd+Ng== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 30A6820145 for ; Sun, 17 Mar 2024 15:42:02 +0000 (UTC) Received: from iguana.tulip.relay.mailchannels.net (iguana.tulip.relay.mailchannels.net [23.83.218.253]) by mail-a.sr.ht (Postfix) with ESMTPS id E6ACB20123 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 17 Mar 2024 15:42:00 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 19F46C1926 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 17 Mar 2024 15:41:59 +0000 (UTC) Received: from uk-fast-smtpout2.hostinger.io (unknown [127.0.0.6]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 2F6DDC1A4E for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 17 Mar 2024 15:41:58 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710690118; a=rsa-sha256; cv=none; b=9/VBOdpJlipo7TCWNg0+DSxYqEFwrv1IfiwEcmzD0x4WHs+OqXnAOgeHySmLKCEBDtOsOe /UAshrhb2wb1tX3bsdjhKrxwiVa1Zlfu/xGbDWqfY4y+t42G+oMMspe+P9+u0WH5a7C7Nq H+P7EEK6N3MNwdL33ca5imXWIPwWmNykQMe30JXWwa4dsiQ/tyg1Wa5allBkjfG+sbWvCW +b554/rEQrQJEImuHWtWsIUAh5iwLoMPkjjT825Bm2Tz3/1RvZAvdtqNjxEVohi5jUIuX4 d80qJG0PXdcT+AdHhHXm9CtK3x1VH1BCNlxzWw/rFVOE4/7VXDomyPBbhQBpdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710690118; h=from:from: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=moHaWnUA0jWZcUMXlWUlCNRKnF19Aev0+Bujt4p7Zc4=; b=kRIRXb1Jk7xlVm7fsE+Ly/GNxH1N72z6pVVIBCCiQKLdVzFewenXuSqZ3Mhm1ODlxgnDC8 YN1ulLs3CUeKucmI9stPye4xcWp+J/+ySGazOTZQMFLtNzoXbO5JvaB6nTtVe3j8IU2WBJ LFxGgibZFFf6rDxa4H6s3gTb9Vh++BJV3ZFS27UUE2j9YqmjyMZAXxsyA/NPMthasTO+4a LHt947SttE8XfgTl6glqn4qIJxOW9eg2TUzR6XAZXIO5le5dzGE+8/UeyvUn6i2rr7hRUx mRtiM5EStuA6uIT9KsMrYWc4kPTVVgbsdhgHHosfN9fvP612hqU5OLoaoFkDpw== ARC-Authentication-Results: i=1; rspamd-76c7995f89-qr5dd; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Tart-Eight: 59d91a335af34d47_1710690118703_2736801104 X-MC-Loop-Signature: 1710690118702:708875440 X-MC-Ingress-Time: 1710690118702 Received: from uk-fast-smtpout2.hostinger.io (uk-fast-smtpout2.hostinger.io [31.220.23.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.111.46.219 (trex/6.9.2); Sun, 17 Mar 2024 15:41:58 +0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1710690117; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=moHaWnUA0jWZcUMXlWUlCNRKnF19Aev0+Bujt4p7Zc4=; b=cLTOSFykzsYUciQV74fpiS3EHcmQ8zZwg7pHBXQy1ATPX+7tu85Oe4Yvb94G0Ntyj3vshl CoaMZ8Ou5rcS15tzch40pcrP89k/19OEZKJCzbGkj5ScaPQoYqoVOCM7PDXq6CK7TKNtoG Z93LAwcXQDYEv+Ne0xPEJrefgvIHyVFCOSmRKkTPWskg4K5vMoH9k77/xRc6hm43oArw5D YyNHkFGwLz1z9MtnB6tIlElLnLmvKY+eBuQ3v3ZzGA6bT/Ngb7h8NXPmsv5k9ppGdp5KZD fAL79h7ECQFhHU/egRot30BbDzeCafSimnrI1g4/t5lp4fXbmFxquDRxyZLzVA== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 17 Mar 2024 12:41:52 -0300 Message-Id: Subject: Re: [RFC PATCH olang v1] docs: create zero programming language specification From: "Carlos Maniero" To: "Ricardo Kagawa" , <~johnnyrichard/olang-devel@lists.sr.ht> X-Mailer: aerc 0.15.2-211-g37d5fc691aff References: <11b1f29a-7a4a-4b46-9376-98bd52c9edd4@gmail.com> In-Reply-To: <11b1f29a-7a4a-4b46-9376-98bd52c9edd4@gmail.com> X-CM-Envelope: MS4xfLan4VT2zy56ghzm2F1lf2HUCnvz4xSm+VQx/Ej/ftqSiB42IYknEVeKvFJjYQe8hDexmDX5Fv0ZUQzNElrocmc9X7FzgvX90Q0WAmGbDVckZdT5xBT0 cWT2/uLE6ythCWYyk/5OwakUhuHAKiNJjp1t7yfKCEZFeJB6ZwhFIEEUQhyWIEnutt7Ds4j1Eri4pKkX3THiscQ/qaf5cb6lWFxuJS+iTd3AgOdQqBlZ/CNh CYO7emcpdo+m3VdOUNhKbw== X-CM-Analysis: v=2.4 cv=B6m/0vtM c=1 sm=1 tr=0 ts=65f70f43 a=5+VMC1FZ3J4mVPAKpPmAqg==:117 a=5+VMC1FZ3J4mVPAKpPmAqg==:17 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=d6rO00OXKpJsShgJpRUA:9 a=QEXdDO2ut3YA:10 a=BXDaF_L80NY05PYiAFlV:22 X-AuthUser: carlos@maniero.me 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.91 X-Spam-Score: -7.91 X-Migadu-Queue-Id: 95F1669D79 X-Migadu-Scanner: mx11.migadu.com X-TUID: tmoRsdbEzdgS I'd like to begin by echoing Johnny's words of thanks. It's truly fantastic to see more people getting involved in making olang a remarkable language. It's also quite refreshing to have someone on board who is well-versed in the theory behind creating a programming language. I'm certain that I, along with others, will learn a great deal from you. I'll start with a question from your first reply: > My limited understanding is that the semicolon would indeed be more > convenient, as it would be a definitive end-of-statement symbol, > requiring no lookahead to resolve as such. The LF token could be > ambiguous on its own (between end-of-statement and white space), so > some lookahead would be required to resolve it. I had a hard time trying to understand why the "LF token could be ambiguous on its own", but now I got it. Before, I was just thinking about the function body where, to me, a blank line in the function's body is just an empty statement, same as a sequence of semicolons in C. But I wasn't considering that there are a lot of other places where the programmer could add a blank space, like in function declarations: fn main() : u32 { return 0 } Even though the code above is ugly AF, it's still syntactically correct. And that made me realize why it's more convenient to have an end-of-statement token. I'm just putting this out here in case someone else has the same doubt. Although, it seems like we are all on the same page about wanting to make the language more user-friendly, even if it means giving the parser a bit of a hard time. About the "some lookahead would be required to resolve it" we definitely added some of these in the parser, but given a better look, we could easily get rid of then by replacing the function: static void skip_line_feeds(lexer_t *lexer) { token_t token; lexer_peek_next(lexer, &token); while (token.kind =3D=3D TOKEN_LF) { lexer_next_token(lexer, &token); lexer_peek_next(lexer, &token); } } With: static void next_non_lf_token(lexer_t *lexer, token_t *token) { do { lexer_next_token(lexer, token); } while (token->kind =3D=3D TOKEN_LF); } I'm sure it may be some corner cases where it cannot be applied, but I think that it reduces backtrack for most of the cases. > - Function body now accepts a single expression. > ... > - `\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. > ... > - Introducing hexadecimal integer literals. > ... >>From your last email, I'm totally up for discussing these topics. But I reckon we might want to split them into new threads to avoid trying to hash out the entire language in one go. What do you all think about us trying to: 1. Nail down the current state of the language, leaving new features for later. 2. Figure out how we're gonna document new features. 3. Kick off a new thread for each feature we're thinking of adding. Sound good?