
[scribble] is it possible to typeset a (long) list of identifier+value definitions as a table, rather than a as sequence of defthing
? It’s for a long list of identifiers that are bound to unicode characters (as strings). I want to display them in a table, and use the table as the scribble definition sites. I tried indexed-racket
, but it seems that index
only creates an entry, not a definition site IIUC.

I am using defidentifier
to set the definition site for functions in the Sketching docs. Maybe that can be used? (I am trying a different style of documentation than usual).

That works, thanks @soegaard2! The default style is indeed not ideal, but at least that’s a start :slightly_smiling_face:


That could be modified to add a hint like "\nMaybe you need to (require (for-syntax (racket/base)))?"

Depending on gotchas, i think that would be a good idea.

Do you want to open an issue or PR, or should I?

go ahead, unless you prefer I do it, or you don’t have time


Thanks greg!

Nice! I think adding special error message for phase 1 is a good idea.

I’m also confused by the error message
X: unbound identifier, and X: undefined
and I wonder why isn’t the error message something like
expander: the identifier X is unbound (in phase NN) and runtime: the value of X is undefined

Is there a way to unbuffer output from (e.g.) displayln
? The ouput from a Racket program appears to buffer on GitHub actions, while most other programs don’t (and it looks fine locally, ofc)

Unbuffer? Do you mean flush
?

Perhaps—I guess I mean “make sure output from displayln
shows up in real time in GitHub actions.” I’m assuming it’s a buffer/flush problem, but I’m not sure how to test/fix that

Maybe file-stream-buffer-mode
?

Something like (file-stream-buffer-mode (current-output-port) 'line)
?

Or 'none

Maybe also current-error-port

That looks right—the default is 'block
for output-ports, unless it’s a terminal (probably istty
or equivalent is true). Now, can I inject that from the command-line? Something like racket -e "(file-stream-buffer-mode (current-output-port) 'line)" my-program.rkt <args>
? The -h
makes me believe so, but

Or, probably better, run multiple files in a row :thinking_face:

I just set those in my script.

Which may or may not be possible for you

I’ve also only done that in a Racket program, not “to” it from the command-line. I wonder if something like env var TERM=1
would make Racket think istty or whatever? Not sure.

Gar, I can’t get variations of racket unbuffer.rkt prog.rkt
to work, where unbuffer sets the modes and prog prints them. Silliness.

If the coreutils stdbuf
program is available in GitHub Actions, you could use that to run Racket, maybe?

(that suggestion is based on my extensive experience googling this topic for about 2 minutes so beware :smile:)

I was hoping to only do this in GitHub actions, where it’s not necessary elsewhere. I suppose I could write a quick wrapper for the program to only do this. sigh


GOT IT—you have to use -t
. No other flag combo seems to work. https://docs.racket-lang.org/guide/racket.html#%28part._start-module-mode%29

racket foo.rkt bar.rkt
passes "bar.rkt"
as the first command line argument to foo.rkt

Yeah, I was trying -e foo.rkt -e bar.rkt
, and the various other “run things” flags, but only -t
works

^and does support <args>
after bar.rkt

yes, -e
is “evaulate this expression”