2020-10-13 08:37:53 +00:00
|
|
|
#lang racket/base
|
|
|
|
|
2020-10-14 22:17:24 +00:00
|
|
|
(require ffi/unsafe)
|
|
|
|
|
2020-10-13 08:37:53 +00:00
|
|
|
(displayln "hello world")
|
2020-10-14 22:17:24 +00:00
|
|
|
|
|
|
|
(void (for/list ([i (in-list '(1 2 3 4 5))]) (printf "loop: ~a\n" i)))
|
|
|
|
|
|
|
|
(define table (dynamic-require ''static-ffi 'table))
|
|
|
|
(displayln "ffi table")
|
|
|
|
(displayln table)
|
|
|
|
|
|
|
|
(define func (cast (cadr (car table)) _int64 (_fun -> _void)))
|
|
|
|
|
|
|
|
(displayln "calling")
|
|
|
|
(func)
|
|
|
|
(displayln "back")
|
2020-10-15 02:18:35 +00:00
|
|
|
|
|
|
|
; (error "meow meow")
|
2020-10-17 03:33:50 +00:00
|
|
|
|
|
|
|
(module gui-test racket/gui
|
|
|
|
(provide run-test)
|
|
|
|
(define (run-test)
|
|
|
|
(message-box "hello" "hello world")))
|
|
|
|
|
|
|
|
(require (submod "." gui-test))
|
|
|
|
(run-test)
|