[racket-users] DrRacket complete word more convenient setting

2021-06-16 Thread Andrey
I configured Tab key according a solution found somewhere: #lang s-exp framework/keybinding-lang (keybinding "tab" (λ(editor event) (send editor auto-complete))) It works but I wonder is it possible to setup it like in emacs in racket-mode: 1. Repeating key pressing complete common part

Re: [racket-users] Plot Problem: No Line; Bounds not found

2021-06-16 Thread Alex Harsányi
On Wednesday, June 16, 2021 at 3:19:06 AM UTC+8 Ben Greenman wrote: > On 6/15/21, Britt Anderson wrote: > > Thanks for the help to my specific problem. More generally, what should > > have clued me in to a contract or type error when the only message > received > > had to do with y plot

[racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
I'm getting bytes off the wire and attempting to write them to a port. I have a check in place to verify that the pipe has free space but when I attempt to reports that yes, there is space, and then it writes and fails regardless and I'm not sure why. The following is a simplified version of the

[racket-users] Racket News - Issue 51

2021-06-16 Thread Paulo Matos
Hello, Issue 51 of RN is online. Enjoy! https://racket-news.com/2021/06/racket-news-issue-51.html -- Paulo Matos -- 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

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 1:19 PM, David Storrs wrote: I'm getting bytes off the wire and attempting to write them to a port.  I have a check in place to verify that the pipe has free space but when I attempt to reports that yes, there is space, and then it writes and fails regardless and I'm not sure

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
Got it. Thanks. On Wed, Jun 16, 2021 at 3:45 PM Matthew Flatt wrote: > At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > > It looks like the problem > > is that "flush" is not defined ... > > Yes, "returns without blocking after writing as many bytes as it can > immediately flush" is

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
For the record, it doesn't work in 8.1 either. On Wed, Jun 16, 2021 at 2:44 PM David Storrs wrote: > > > On Wed, Jun 16, 2021 at 2:25 PM George Neuner > wrote: > >> >> On 6/16/2021 2:16 PM, David Storrs wrote: >> >> Damn. Sorry, I posted out of sync versions of code and output. This is >>

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread Matthew Flatt
At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > It looks like the problem > is that "flush" is not defined ... Yes, "returns without blocking after writing as many bytes as it can immediately flush" is vague, and more or less intentionally so. The intent it really "writes as much as

[racket-users] exn:break:*

2021-06-16 Thread Nathaniel W Griswold
Related to talk on signals... How come Racket has exn:break:hang-up and exn:break:terminate but not something for SIGINT exceptions. How do you handle SIGINT? I mean i guess you get a `exn:break?` when it happens but there's kinda no way to distinguish that it's a SIGINT other than it just not

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 3:45 PM, Matthew Flatt wrote: At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > It looks like the problem > is that "flush" is not defined ... Yes, "returns without blocking after writing as many bytes as it can immediately flush" is vague, and more or less

Re: [racket-users] DrRacket complete word more convenient setting

2021-06-16 Thread Laurent
There's a quickscript that does something similar, but not quite what you want: https://github.com/Metaxal/quickscript-extra/blob/master/scripts/dynamic-abbrev.rkt It does cycle through completions by pressing the same keybinding repeatedly, but it autocompletes only according to the words that

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
Damn. Sorry, I posted out of sync versions of code and output. This is correct: (define bstr (make-shared-bytes 509 5)) (define rx-pipe-size 16777216) (define-values (rx-in rx-out) (make-pipe rx-pipe-size)) (define (room-in-rx-pipe? bstr) (define avail (- rx-pipe-size (pipe-content-length

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 2:16 PM, David Storrs wrote: Damn.  Sorry, I posted out of sync versions of code and output.  This is correct: (define bstr (make-shared-bytes 509 5)) (define rx-pipe-size 16777216) (define-values (rx-in rx-out) (make-pipe rx-pipe-size)) (define (room-in-rx-pipe? bstr)   (define

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
On Wed, Jun 16, 2021 at 2:25 PM George Neuner wrote: > > On 6/16/2021 2:16 PM, David Storrs wrote: > > Damn. Sorry, I posted out of sync versions of code and output. This is > correct: > > (define bstr (make-shared-bytes 509 5)) > (define rx-pipe-size 16777216) > (define-values (rx-in rx-out)

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
In case anyone else runs into this issue and is worried about their code blocking forever, here's a version that will time out. The only change is the use of sync/timeout and value-evt. https://docs.racket-lang.org/value-evt/index.html (require value-evt) (define bstr (make-shared-bytes 509 5))

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 7:01 PM, Shu-Hung You wrote: Out of curiosity, I wrapped David's code in a loop and tried to write 509 bytes in each iteration. From the output, it looks like CS doesn't implement pipes using a fixed-size buffer. I'm also not sure how many different buffers there are. I think this

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
Forgot to mention this is using  CS 8.1 -- 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

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread Shu-Hung You
Out of curiosity, I wrapped David's code in a loop and tried to write 509 bytes in each iteration. From the output, it looks like CS doesn't implement pipes using a fixed-size buffer. I'm also not sure how many different buffers there are. I think this has something to do with George's question.