[racket-dev] displayln appears to write to console from where drracket was launched

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Oct 19 17:01:18 EDT 2011

I am running the silly program below (no meaning), and on occasion I see the output of the *** line in the console from where I launched drracket. from 10/16

#lang racket 

(require (for-syntax syntax/parse))

(define-for-syntax (postfix stx word stem)
  (datum->syntax stx (string->symbol (string-append word "-" (symbol->string stem)))))

(define-syntax (define-un-serialize stx)
  (syntax-parse stx 
    [(_ name:id (argument:id ...) unparser:expr parser:expr)
     (define serialize   (postfix stx "serialize"   (syntax-e #'name)))
     (define deserialize (postfix stx "deserialize" (syntax-e #'name)))
     (displayln `(,serialize ,deserialize)) ;; ****
     #`(define-values (#,serialize #,deserialize)
         (values (lambda (argument ...) unparser)
                 (lambda (msg) parser)))]))

(define-un-serialize f (x y) values values)

Posted on the dev mailing list.