[racket-users] What is the address of the venue for RacketCon ?
Since The City Library has multiple locations, it would be helpful to simply list on the website the address of the specific location at which we'll be meeting. Thanks, Brian -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/b51e0fdb-d189-40b8-901b-6feb45663ff0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Idle UI thought: compiling/running indicator?
In dealing with students, it’s a constant frustration to me that students don’t realize that clicking the ‘run’ button triggers both compilation and running. Also, in my own work, I sometimes forget to compile things at the command line, and then wonder why my programs are taking forever to run. How hard would it be to make a two-state “running” icon; one color/shape when we haven’t yet started phase 0 for the code in the buffer, and a different one afterward? Does this seem like it might be useful? John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/4b6abd4e-ec57-4cb9-a696-b57850de7b54%40mtasv.net. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] async-apply in FFI not being called
That did the trick, thanks a lot, Matthew! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/57a10c61-68a4-4e3f-bbc7-f917ab2b998c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] async-apply in FFI not being called
This code work for me on macOS from the command line. It does not work in DrRacket, and that's because an async callback is not allowed to do anything that has to synchronize with a Racket thread. DrRacket's output requires thread synchronization, while it happens that stdout in a terminal usually doesn't have to synchronize. In short, don't use ports in an async callback. Try using `log-error` instead of `displayln`, since it's safe to log a message in an async callback. If I make that change, I see logging when running in DrRacket --- but also a crash soon after, because nothing keeps the callback live. Changing to (define callback (lambda (interval dummy) (log-error "in callback") ;; never gets called 1000)) (SDL_AddTimer 1000 callback #f) keeps the callback live and avoids a crash. At Thu, 9 May 2019 06:19:18 -0700 (PDT), Андрей Кравчук wrote: > Hello. > I'm trying to fix SDL2 library bindings for Racket. The library includes > the function SDL_AddTimer, which, according to documentation, takes > callback and runs it in another thread. Without #:async-apply keyword on > FFI callback definition the call to SDL_AddTimer segfaults, which is to be > expected. Adding #:async-apply fixes the crash, but in that case it seems > that the callback is not being called (and even async-apply helper itself). > Here's the code: > > (define (async-apply thunk) > (displayln "in async-apply") ;; never gets called > (thunk)) > > (define _SDL_TimerCallback (_fun #:async-apply async-apply _uint32 _pointer > -> _uint32)) > > (define-sdl2 SDL_AddTimer (_fun _uint32 _SDL_TimerCallback _pointer -> > _int)) > > (SDL_AddTimer > 1000 > (lambda (interval dummy) > (displayln "in callback") ;; never gets called > 1000) > #f) > > (sleep 10) > > Could someone please point me at what am I doing wrong? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/0cc49a07-c070-4636-8901-a13ae5a4 > 7e6d%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/5cd42e53.1c69fb81.69f8b.3b09SMTPIN_ADDED_MISSING%40gmr-mx.google.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] async-apply in FFI not being called
Hello. I'm trying to fix SDL2 library bindings for Racket. The library includes the function SDL_AddTimer, which, according to documentation, takes callback and runs it in another thread. Without #:async-apply keyword on FFI callback definition the call to SDL_AddTimer segfaults, which is to be expected. Adding #:async-apply fixes the crash, but in that case it seems that the callback is not being called (and even async-apply helper itself). Here's the code: (define (async-apply thunk) (displayln "in async-apply") ;; never gets called (thunk)) (define _SDL_TimerCallback (_fun #:async-apply async-apply _uint32 _pointer -> _uint32)) (define-sdl2 SDL_AddTimer (_fun _uint32 _SDL_TimerCallback _pointer -> _int)) (SDL_AddTimer 1000 (lambda (interval dummy) (displayln "in callback") ;; never gets called 1000) #f) (sleep 10) Could someone please point me at what am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/0cc49a07-c070-4636-8901-a13ae5a47e6d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.