Handin-server time stamp

Okay, this is incredibly obvious, but it had never occurred to me before today to timestamp handin submissions as they arrive. Specifically, adding this to the check: block:

   (define timestamp-string
     (parameterize ([date-display-format 'rfc2822])
       (date->string (seconds->date (current-seconds) #t) #t)))        
   (add-header-line! (string-append "timestamp: " timestamp-string))

(... and adding (require racket/date) at the top of the file, of course)

John Clements via Racket Discussions
notifications@racket.discoursemail.com writes:

Okay, this is incredibly obvious, but it had never occurred to me before today to timestamp handin submissions as they arrive. Specifically, adding this to the check: block:

   (define timestamp-string
     (parameterize ([date-display-format 'rfc2822])
       (date->string (seconds->date (current-seconds) #t) #t)))        
   (add-header-line! (string-append "timestamp: " timestamp-string))

(... and adding (require racket/date) at the top of the file, of course)

Pardon the slightly offtopic question, but have you figured out how to
prevent add-header-line! from generated wrapped lines? When I add a
long line, it gets wrapped like

;;> --> while evaluating (run (quasiquote (let1 (x 1) (begin (set! x 2) x)))):
parse-sx: parse error: `(set! x 2)

This is a bit of a bummer because it means the files have to be edited
to become valid racket again.

d

I thought I had the problem that you described... but actually, the problem is subtly different, and I'm wondering whether this is your problem too. Consider the following lines from the beginning of a file I recently graded:

;;> Maximum points for this assignment: <+100>
;;> Testfail: while evaluating (top-interp (quote (((empty) : (((cons) : (((empty?) : (((first) : (((rest) : (((Y) : (((length) : (((addup) : (addup (cons 3 (cons 17 empty)))) (Y ((addup) : ((l) : (if (empty? l) then 0 else (+ (first l) (addup (rest l))))))))) (Y ((length) : ((l) : (if (empty? l) then 0 else (+ 1 (length (rest l))))))))) (((x) : ((y) : (y ((z) : (((x x) y) z))))) ((x) : ((y) : (y ((z) : (((x x) y) z)))))))) ((l) : (l false)))) ((l) : (l true)))) ((l) : (equal? l empty)))) ((a b) : ((select) : (if select then a else b))))) 13))):
  lookup: IKEU | Name not found : ''cons
;;> Testfail: expected exception with message containing IKEU on test expression: '(parse '(let ((if = "")) "World"))

The third line here is not commented, and if I want to run the code, I have to go in and comment it myself.

Is this the problem you're referring to?

If so, I think the real issue here is not line wrap; instead, take a look at line #347 of checker.rkt:

This code introduces a newline into the message, causing the problem above.

I think it would probably make sense to simply take this newline out, which would appear to solve the problem.

Thoughts?