2
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> (all &quot;builtin&quot; commands are single lowercase letters and all user-defined procedures are single uppercase letters. one of the reasons I need a &quot;this here is a unit&quot; syntax is so that the parser knows to look for multi-letter sequences at all instead of thinking Hz means &quot;invoke user procedure H followed by builtin command z&quot;. This does really mean it would be nice if [] were available.)</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@film_girl" class="u-url mention">@<span>film_girl</span></a></span> Wow, just beautiful 👌</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> *looking very nervous* uppercase vs lowercase letters also already has an assigned meaning</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> `Hz`?</p>
<p><span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> that would be great but () and [], specifically, are spoken for. (also I think I know what {} is for and I REFUSE to use separators)</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> alternatively, some sort of suffix wrapper like 3[Hz] to make the lexing/parsing easy</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> I think using the asterisk syntax would still make the most sense since it&#39;s mathematically accurate, and gives you the option to do things like 30*m/s for 30 meters per second.</p>
<p><span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> that&#39;s very interesting, but this language doesn&#39;t have math per se</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> a common approach I&#39;ve seen in various libraries (rather than languages specifically) is to have unit types as something you multiply by, matching how it works in maths itself.</p><p>e.g. in astropy you get a Unit type and a Quantity type, and multiplying a scalar by a Unit gives you a Quantity, such as 30*u.Hz = Quantity(30,Hz)</p>