Re: [racket-users] Using DrRacket interface language with scribble

2020-03-08 Thread Chongkai Zhu
languages, hopefully! > > Robby > > On Sun, Mar 8, 2020 at 10:47 AM Chongkai Zhu > wrote: > >> In DrRacket, if I set interface language to Chinese, I can get >> >> > (check-satisfied 1 odd?) >> 测试通过! >> >> That is, the output of check-satisfie

[racket-users] Using DrRacket interface language with scribble

2020-03-08 Thread Chongkai Zhu
In DrRacket, if I set interface language to Chinese, I can get > (check-satisfied 1 odd?) 测试通过! That is, the output of check-satisfied is also in Chinese. But with scribble/eval (https://docs.racket-lang.org/scribble/eval.html), in the .html generated by scribble, I always get > (check-satisfi

[racket-users] How to load net/jwt

2017-09-10 Thread Chongkai Zhu
Hi all, https://docs.racket-lang.org/jwt/index.html It seems I just need to (require net/jwt) in racket 6.10 and everything should work. But: Welcome to DrRacket, version 6.10 [3m]. Language: racket, with debugging; memory limit: 128 MB. . unsaved-editor:2:9: cannot open module file module pa

[racket] why there's not mcadr mcdar and so on?

2012-03-25 Thread Chongkai Zhu
It seems to be they should be build-in just as cadr,cdar ... Chongkai Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Bouncing default value

2012-02-14 Thread Chongkai Zhu
On 2/11/2012 10:55 AM, Laurent wrote: Hi, Often I'd like to make a wrapper for a given function that has default values (possibly with keywords). So if I want my function to have the same default values for one particular optional argument, I need to redefine it myself. For example, suppose

Re: [racket] Bouncing default value

2012-02-14 Thread Chongkai Zhu
On 2/11/2012 10:55 AM, Laurent wrote: Hi, Often I'd like to make a wrapper for a given function that has default values (possibly with keywords). So if I want my function to have the same default values for one particular optional argument, I need to redefine it myself. For example, suppose

Re: [racket] Compile racket

2011-02-24 Thread Chongkai Zhu
http://git.racket-lang.org/plt/blob_plain/HEAD:/src/worksp/README I used MSVC 2008 and everything works fine. Chongkai On 2/24/2011 11:36 AM, José António Branquinho de Oliveira Lopes wrote: Hello, How do you compile racket for Microsoft Windows? Are you using MSYS/MinGW? Regards, José José

Re: [racket] Writing UTF-16 to a socket/file

2011-02-12 Thread Chongkai Zhu
You can use string->utf16 from rnrs/bytevectors-6: (require rnrs/bytevectors-6) (string->utf16 "abc") and them use "write-bytes". Chongkai On 2/12/2011 2:35 PM, Gregory Woodhouse wrote: Is it possible to ensure that data written to a socket or file is encoded as UTF-16? I ask because Healt

Re: [racket] flat-rec-contract and vectorof

2011-02-08 Thread Chongkai Zhu
Sorry for the dum question. Obviously (define c (flat-rec-contract T number? (vectorof T #:flat? #t))) is what I want. Chongkai On 2/8/2011 8:23 AM, Chongkai Zhu wrote: Hi all, > (define c (flat-rec-contract T num

[racket] flat-rec-contract and vectorof

2011-02-08 Thread Chongkai Zhu
Hi all, > (define c (flat-rec-contract T number? (vectorof T))) . . flat-rec-contract: expected flat contracts as arguments, got # I noticed there's a new section "Impersonators and Chaperones" in the doc. I'm not intending to deal with chaper

Re: [racket] Is there anything like the cl format?

2010-12-17 Thread Chongkai Zhu
There's SRFI 48 and SRFI 54, both supported in Racket: #lang racket (require srfi/48) (format "~6,5F" pi) => "3.14159" - Chongkai On 12/17/2010 12:58 AM, Manfred Lotz wrote: Hi there, Common Lisp has format to print stuff like for example: (format t "~,5f" pi) 3.14159 I found format and

Re: [racket] ... vs ...+

2010-09-27 Thread Chongkai Zhu
On 9/27/2010 9:41 PM, The Configurator wrote: This might be a silly question, but in the docs, what's the difference between ... and ...+? A good example for that is the definition of begin: (begin

[racket] FFI question: a callback that will be called by some foreign thread

2010-07-11 Thread Chongkai Zhu
Using FFI, one can use _cprocedure to pass Scheme procedures to foreign functions as C callback. For my case, if the callback function is called from a different C thread (unknow to PLT FFI), it crashes. Adding #:atomic? #t doesn't help. Is there a workaround, or could I conclude that FFI can't