Subject: bug#29684: exception printers - request for improvement

From: David Pirotte <[email-masked]>
Date: Sun, 1 Jul 2018 19:23:21 -0300

Hello Ludovic,

> ...
> It seems to me that you can achieve similar effect, at least in some
> cases, by parameterizing ‘current-error-port’.  It also makes more sense
> to me to parameterize ‘current-error-port’ rather than set
> ‘exception-format’, because the ‘exception-format’ is very constrained:
> it has to implement at least everything ‘simple-format’ implements.
> 
> WDYT?
> 
> Besides, note that there’s also ‘set-exception-printer!’.  It’s a
> different kind of customization, but it can serve a similar purpose.

To be honest, exactly how does not really matter, I leave that to you (maintainers):
I have used the code, actually written by Daniel, who also claimed it was not
complete, iirc, to raise the issue, so we can discuss it between us:

	I think we should be very (very) friendly to new Guile users, and especially
	those who do not know scheme (yet);

	I think I should be able to use Guile-CV to teach basic image manipulation
	to a class of young teenagers, who would not even know what scheme is, which
	means, imo, no guile customization should be required:

	guile
	(use-modules (cv))
	(im-load "my-preferred-penguin.png")

	- at this point, even if the image is very small, guile is 'lost' [*]
	- same if I teach them to compose a few image ops, they commit
	a mistake while typing .. bang, the exception printer is 'lost'

It is perfectly fine, on the opposite side, to ask advanced scheme users (who would
want to, but I really don't see the point) configure guile s the repl and the
exception printer so it tries to print the full content of huge lsts, vectors, arrays
...

David

[*]	one could argue i could have chosen another data structure, but well, I
	did not :), and imo, we can't tell users who have to manipulate large
	structures (arrays, vector, think about non s/w engineers scientists,
	biologists ...),	"... don't manipulate large structures in a repl, wrap them
	in a record first ..."

	it happened to me at university, trying to make a demo of Guile-CV to a group
	of postdoc candidates: I updated guile the day before and forgot to repatch
	both the repl and the exception printers, opened an image, and ... bang!

	I was in emacs, so ... after a few seconds they all laughed and ... by
	the time I could recover, repatched guile ... they were all ...
	gone! (and convinced they should stick to python and open-cv or java and
	imagej ...