Elektrine lite

← Feed

@chemoelectric@masto.ai

Post #1864456

2026-05-01 18:35 UTC

hiha sources now contain a comment explaining why my notation for floating point numbers with exponents is picky. It has to be an uppercase E and you have to have the sign before the exponent. It is because something like 30.0e10 in hiha ought to be 30.0 times the vector e10. The comment explains that physicists are totally effed up about vectors and that ‘entanglement’ is logically impossible. That this is one reason to give vectors special attention: 74ff: https://github.com/hiha-lang/hiha/commit/53110b96e48997fef329a10f3ca88593e6827b80

Replies (1)

  • @chemoelectric@masto.ai 2026-05-01 18:39

    In the src/plugins/50-decimal_float.c plugin. This is something that acts on about the third pass through the Pratt parser for the lexing phase. That’s how I am doing lexing. I am using NUD rules in a Pratt parser and going through the parser repeatedly until a fixed point is reached. It could be done in one pass (because my input reader has indefinite amounts of lookahead, I use Gnulib’s gl_xlist.h) but multiple passes makes it a little simpler.

    Open ##1864720