TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Railroading the Pascal Language

38 pointsby sysrpl10 months ago

9 comments

leejoramo10 months ago
I immediately remember the Apple Pascal poster from the late 1970s:<p><a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;pascal-poster-v-3-a-1" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;pascal-poster-v-3-a-1</a>
moefh10 months ago
The use of &quot;mantissa&quot;[1] in this document is not right. What&#x27;s being called mantissa here should be &quot;exponent&quot;.<p>There&#x27;s some ambiguity about what <i>exactly</i> &quot;mantissa&quot; means in the representation of a floating point number, to the point where some people recommend avoiding it[2] (for example, the IEEE standard for floating point uses &quot;significand&quot; instead).<p>But whatever mantissa means, it&#x27;s exactly <i>not</i> (like the page says[1]) what&#x27;s &quot;<i>used to raise or lower a floating point literal numbers by factors of 10</i>&quot;, that&#x27;s the exponent. The mantissa, if anything, is the <i>other</i> part of the number, that is, what&#x27;s being multiplied by the factors of 10 (but it&#x27;s complicated, the wikipedia[2] page explains it).<p>[1] <a href="https:&#x2F;&#x2F;www.getlazarus.org&#x2F;learn&#x2F;language&#x2F;lexical&#x2F;#float_literal" rel="nofollow">https:&#x2F;&#x2F;www.getlazarus.org&#x2F;learn&#x2F;language&#x2F;lexical&#x2F;#float_lit...</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Significand" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Significand</a> (section &quot;Floating-point mantissa&quot;)
01HNNWZ0MV43FF10 months ago
Railroad syntax diagrams, not railroad error handling
评论 #40985357 未加载
nu11ptr10 months ago
I love railroad syntax diagrams. Not sure why, but I guess it is because they work in my brain. Grammars just seem to be shown in a way that makes it easier for my visual brain to comprehend.
评论 #40986710 未加载
mark_l_watson10 months ago
Memory lane. This made me remember Ken Bowles, one of the key figures in development of UCSD Pascal. Ken always seemed to be on a mission. Last time I talked with him, many decades ago, we were at a party and he and his wife were headed off somewhere exotic to go SCUBA diving.<p>I used UCSD Pascal on one very large project: my Go playing program Honnibo Warrior.
LeFantome10 months ago
I had to read through this more than once to realize that Free Pascal has classes.<p>They are buried under “Generic Constaints”.<p><a href="https:&#x2F;&#x2F;www.getlazarus.org&#x2F;learn&#x2F;language&#x2F;lexical&#x2F;#generic_constraint" rel="nofollow">https:&#x2F;&#x2F;www.getlazarus.org&#x2F;learn&#x2F;language&#x2F;lexical&#x2F;#generic_c...</a><p>For me, a BNF would be so much easier. It looks like a fairly easy syntax to parse.<p>Maybe I will try to create a toy compiler sometime.
katzenversteher10 months ago
I like. Quite a bit easier to read than EBNF and the like
mosburger10 months ago
Brings me back to a time early in my career where I had to write Cognos QTP, QUIZ, and QUICK programs (blech!) ... their documentation used this format, I didn&#x27;t know there was a name for it. It was the only nice thing about working with those languages.
signaru10 months ago
It might be fun to look at the last few chapter&#x27;s of Wirth&#x27;s &quot;Algorithms + Data Structures = Programs&quot; for a deep dive and similar looking diagrams.