laurent.orseau
2021-6-14 10:32:52

I’m working on a pict-like library for ‘drawing’ 2d text in unicode, mostly to render math in unicode. I always find naming pretty hard, can you help me?

Currently the lib is called text-block, with basic operations like tblock-vappend, tblock-happend, plus some math operations (in a separate file) like tblock+, tblock/, tblock-sum, tblock-sqrt, left-paren, brace, …

  1. How would you name this library? text-block, unicode-draw, …?
  2. Should all operations be prefixed with tblock (or some other prefix) including brace and left-paren? (I worry that it would make it hard to read, but there’s the issue of name clash like sqrt and +)

laurent.orseau
2021-6-14 11:57:13

Another point: Currently the tblock-happend and tblock-vappend functions take a #:align argument. This contrasts with pict where we have ht-append and friends. I feel like a keyword is more appropriate. Bad idea?


rokitna
2021-6-14 19:47:40

The keyword approach seems pretty good to me. It’s a lot more convenient than what I was initially expecting, which would have been throwing an error if the blocks weren’t precisely the same height/width.


notjack
2021-6-14 20:44:24

if it’s mostly to render math in Unicode, what do you think of using more math-specific naming?


notjack
2021-6-14 20:44:44

like text-formula or text-diagram


notjack
2021-6-14 20:45:17

instead of text-block which is very generic