Re: [racket-users] question about places and main thread gc

2020-09-13 Thread Nate Griswold
Sorry, it's all a bit simpler than i'm making it out to be. Basically, i want to run racket from c code (embedded i guess, but i'm not compiling any embedded c files). This is because i want to run everything in one process. I want to have actual parallelism so that is why i'm using places. I

[racket-users] matching M-N instances

2020-09-13 Thread David Storrs
Using the 'match' form, is there a straightforward way to have optional items in a pattern? For example: (match records [(list (? string? name) 0..1 phone-numbers ..1) 'ok]) This would match a list of phone numbers that might or might not have the owner's name (either as a single string or as

Re: [racket-users] question about places and main thread gc

2020-09-13 Thread George Neuner
On 9/13/2020 4:12 PM, Nate Griswold wrote: Sorry, i forgot to mention this would be interfacing on the main thread from c does this still hold true? Like if a c call returns does it kill the places? Nate I'm not really sure what you are asking:  it sounds like you are wanting to embed

Re: [racket-users] question about places and main thread gc

2020-09-13 Thread Nate Griswold
The reason i'm asking is i am dedicating a thread to racket after calling racket_boot on it. Nate On Sun, Sep 13, 2020 at 3:12 PM Nate Griswold wrote: > Sorry, i forgot to mention this would be interfacing on the main thread > from c > > does this still hold true? Like if a c call returns

Re: [racket-users] package manager woes on Windows 10?

2020-09-13 Thread Robby Findler
I'm not sure. I would probably add a 'single-no-return style and then grep the codebase for places that use 'single and change them (as appropriate). Robby On Sun, Sep 13, 2020 at 3:15 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > I meant, wouldn’t it be better to fix

Re: [racket-users] package manager woes on Windows 10?

2020-09-13 Thread Sorawee Porncharoenwase
I meant, wouldn’t it be better to fix text-field% itself, instead of only some instances of it? Sorry if that was confusing. On Sun, Sep 13, 2020 at 1:12 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Should the fix apply to all 'single styled text-field% >

Re: [racket-users] question about places and main thread gc

2020-09-13 Thread Nate Griswold
Sorry, i forgot to mention this would be interfacing on the main thread from c does this still hold true? Like if a c call returns does it kill the places? Nate On Sun, Sep 13, 2020 at 12:17 PM George Neuner wrote: > > > On 9/13/2020 3:55 AM, Nate Griswold wrote: > > > I am making an app

Re: [racket-users] package manager woes on Windows 10?

2020-09-13 Thread Sorawee Porncharoenwase
Should the fix apply to all 'single styled text-field% too? On Sun, Sep 13, 2020 at 7:50 AM Robby Findler wrote: > Yea, I agree. I'd made that change locally but hadn't pushed because I > couldn't make the bad behavior happen reliably. Perhaps

Re: [racket-users] question about places and main thread gc

2020-09-13 Thread George Neuner
On 9/13/2020 3:55 AM, Nate Griswold wrote: I am making an app that basically spawns two racket places and i want to be able to communicate with them from c code. Will gc happen in the two racket places if i don't keep the main thread (the one that spawned the places) running? Exiting

Re: [racket-users] package manager woes on Windows 10?

2020-09-13 Thread Robby Findler
Yea, I agree. I'd made that change locally but hadn't pushed because I couldn't make the bad behavior happen reliably. Perhaps that lack shouldn't stop us! Pushed now. Robby On Sat, Sep 12, 2020 at 11:15 PM jackh...@gmail.com wrote: > Could we make the "do what I mean" box just automatically

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Shriram Krishnamurthi
Apologies, I left in some debugging code. All we need is @(define (markdown-inline file) (xexprs->scribble-pres (with-input-from-file file read-markdown))) This will do you job, Jos Koot. For instance: @title{Hello} @(markdown-inline "new.md") combined with (as "new.md") This is a *

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Shriram Krishnamurthi
> > In that case, does it work if you simply remove the call to `decode-flow` > from the definition of `markdown-inline`? Then the function would > just return a list of pre-parts to be spliced into the enclosing document. > Doh. It appears to indeed! > If you want to make the Markdown sections

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Hendrik Boom
On Sun, Sep 13, 2020 at 07:50:01AM -0400, Shriram Krishnamurthi wrote: > It's useful to have this behave like a `#include`. There are settings where > you want to have a non-Scribble person author things that go "in the > middle"; you want to think of this as just a more convenient way of writing

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Ryan Culpepper
Okay, if I understand correctly, you would expect the trailing text in my example to be appended to the final subsection from the file. In that case, does it work if you simply remove the call to `decode-flow` from the definition of `markdown-inline`? Then the function would just return a list of

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Shriram Krishnamurthi
It's useful to have this behave like a `#include`. There are settings where you want to have a non-Scribble person author things that go "in the middle"; you want to think of this as just a more convenient way of writing what you'd have written in Scribble. I realize there's presumably a closure

Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-13 Thread Ryan Culpepper
What should the splicing version do in the following case: some text @(markdown-inline "file-with-sections.md") some trailing text In particular, what should happen to the trailing text? Scribble doesn't have a notion of returning to the top-level after a section. One possibility would be

[racket-users] question about places and main thread gc

2020-09-13 Thread Nate Griswold
Hi. I am making an app that basically spawns two racket places and i want to be able to communicate with them from c code. Will gc happen in the two racket places if i don't keep the main thread (the one that spawned the places) running? I was thinking about whether i should keep the main thread