Whole-known-network
<p><span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> that's very interesting, but this language doesn'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'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>
<p>What are some syntaxes programming¹ languages have used for units?</p><p>I have a human-editable format where a human writes numbers, but might want to specify "3" vs "3 hz" vs "3 samples". I want units to be string names, however</p><p>- Allowing the number to be separated from the unit by a space makes my parser hard<br />- Forcing them together, like 3hz, creates other problems, like hex support</p><p>¹ Would also be happy for syntaxes "not normatively programming" languages have used, like spreadsheet programs</p>
<p><span class="h-card" translate="no"><a href="https://f.duriansoftware.com/@joe" class="u-url mention">@<span>joe</span></a></span> awful</p>
<p>they call it a “conventional oven” because the temperature can’t go past 640 K</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@gamingonlinux" class="u-url mention">@<span>gamingonlinux</span></a></span> So they are getting a lot of users running away from Twitter to Mastodon and Bluesky, and they decided now it's the best time to go full on inserting ads and notifications begging for money so even more people run away from Twitter.</p><p>I don't understand what they're thinking.</p>
<p><span class="h-card" translate="no"><a href="https://social.noyu.me/@hikari" class="u-url mention">@<span>hikari</span></a></span> what if it's witch from mercury</p>
<p><span class="h-card" translate="no"><a href="https://social.noyu.me/@hikari" class="u-url mention">@<span>hikari</span></a></span> yeah</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@gamingonlinux" class="u-url mention">@<span>gamingonlinux</span></a></span> Trying to insult people, shows who you are.</p>