Programming in stack-based languages is notoriously error-prone: it is way too easy to lose track of where an operand on the stack came from, andgforth allows the use of "locals" in cases like this: https://gforth.org/manual/Local-Variables-Tutorial.html
leave too many or too few operands for an operation.
On 12/29/2024 8:49 PM, Lawrence D'Oliveiro wrote:
Programming in stack-based languages is notoriously error-prone: it is
way too easy to lose track of where an operand on the stack came from,
and leave too many or too few operands for an operation.
gforth allows the use of "locals" in cases like this: https://gforth.org/manual/Local-Variables-Tutorial.html
I would use PostScript more than I already do if it had double precision floating point math capabilities.
I've always toyed with the idea of including the math
needed to compute an engineering equation and a graph/figure to
illustrate it in a single unified program.
I have local variables, too. With lexical binding and full reentrancy. I think I posted an example of that previously; shall I do it again?
I would use PostScript more than I already do if it had double precision
floating point math capabilities.
Since my implementation is in Python, I use Python floats, which are
double precision.
I've always toyed with the idea of including the math
needed to compute an engineering equation and a graph/figure to
illustrate it in a single unified program.
I would recommend using Cairo graphics to do that -- it offers a more
modern graphics API than PostScript <https://www.cairographics.org/>.
There are several Python bindings for this. Here is mine <https://gitlab.com/ldo/qahirah>.
For convenient presentation of information in rich-output form, might I suggest using Jupyter notebooks <https://jupyter.org/>.
On 1/3/2025 1:23 PM, Lawrence D'Oliveiro wrote:
I have local variables, too. With lexical binding and full reentrancy.
I think I posted an example of that previously; shall I do it again?
Sure.
For convenient presentation of information in rich-output form, might I
suggest using Jupyter notebooks <https://jupyter.org/>.
Thank you for the information. I still think I'm looking for something
more like PostScript with double precision math.
Also, GXScript could use a better name (especially if you don't have the GX/graphics part working yet).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 168:56:22 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,551 |