cris2000.espinoza677
2021-4-25 15:00:05

best way to test a r5rs file with rackunit in another file? I found a workaround which is using #lang racket/load and then (load "my-scheme-file.scm") , but is there any other way?

Edit: My instincts say no, because of immutable top level…

Edit2: Nevermind, I just checked where I originally read to use racket/load , and it literally spells what my options are https://docs.racket-lang.org/guide/load.html\|Link


soegaard2
2021-4-25 16:18:41

I am curious about the following construct.

In the gui-lib the button% class for macOS is defined as (define button% (class core-button% (super-new))) and core-button% is defined as (defclass core-button% item% (init parent cb label x y w h style font [button-type #f]) (init-field [event-type 'button]) (inherit get-cocoa get-cocoa-window init-font register-as-child get-wx-window) ...) which in turns uses RacketButton: (define-objc-class RacketButton NSButton #:mixins (FocusResponder KeyMouseResponder CursorDisplayer) [wxb] (-a _void (clicked: [_id sender]) (queue-window*-event wxb (lambda (wx) (send wx clicked))))) I am wondering why button% is needed. Why not not remove that definition and rename core-button% to button%?


mflatt
2021-4-25 16:29:17

It’s so (is-a? button% x) won’t produce #t if x is an instance of check-box% (which is also a subclass of core-button%.


soegaard2
2021-4-25 16:33:32

Thanks - after reading check-box.rkt it makes sense.


hj93
2021-4-25 19:15:21

Hello,

I was wondering how you could make two systems written in different languages and connecting them together. I’d like to build a system S in Common Lisp or Racket and a system T In Python. The Python system will output something and I want to to then feed this output to the lisp system. how do you this? Thanks


spdegabrielle
2021-4-25 20:05:03

spdegabrielle
2021-4-25 20:06:48

ben.knoble
2021-4-25 21:15:47

Also files or Unix pipes. Depends on the type of system: interactive? Long or short running? Etc


ben.knoble
2021-4-25 21:16:19

Either way, S expressions make a good serialization format