https://github.com/JuliaLang/julia
Revision 3d88550124d30ac88fd68a851df2a67216a5854b authored by Gabriel Baraldi on 06 September 2023, 10:35:01 UTC, committed by GitHub on 06 September 2023, 10:35:01 UTC
This avoids a crashes where we run the destructors because C++ is fun
and runs destructors before thread exit.
1 parent f9d1767
Raw File
Tip revision: 3d88550124d30ac88fd68a851df2a67216a5854b authored by Gabriel Baraldi on 06 September 2023, 10:35:01 UTC
Wait for other threads to finish compiling before exiting (#51213)
Tip revision: 3d88550
bin2hex.scm
(define (read-u8) (io.read *input-stream* 'uint8))
(define modulo mod)
(define display princ)
(let loop ((b (read-u8))
           (i 0))
  (if (not (eof-object? b))
      (begin
        (if (> i 0)
            (display ", "))
        (display "0x") (display (number->string b 16))
        (if (= 0 (modulo (+ 1 i) 16))
            (newline))
        (loop (read-u8) (+ 1 i)))))
(newline)
back to top