Re: [racket-users] requirements for streaming html parser

2019-06-06 Thread Greg Hendershott
Although I don't think I currently /need/ a streaming parser for speed or space reasons, I can imagine using one. I'd suggest making something where the user supplies an "on-element" "callback", which is called with each element -- plus the "path" of ancestor elements. The user's callback can do

Re: [racket-users] Re: grammar-based fuzzing

2019-06-06 Thread Robby Findler
In addition to the other suggestions, if you can express the thing you want to generate as a contract, the contract library will generate random instances of it. But it doesn't have the tuning of weights you're looking for. Robby On Thu, Jun 6, 2019 at 3:41 PM Eric Eide wrote: > > Ryan Kramer

[racket-users] requirements for streaming html parser

2019-06-06 Thread Neil Van Dyke
If anyone has a use for a *streaming* permissive HTML parser (i.e., one that calls your specific bits of code while it's parsing, rather than it constructing some kind of representation of the entire page for your code to process afterwards), I'd be interested in what specifically you'd like

[racket-users] Re: grammar-based fuzzing

2019-06-06 Thread Eric Eide
Ryan Kramer writes: > Does Racket have any grammar-based fuzzing utilities? You might be interested in Xsmith. Version 1.0 will be released imminently, like within the next week. I'll send another email when it's released. Stay tuned! --

Re: [racket-users] grammar-based fuzzing

2019-06-06 Thread Jay McCarthy
`redex-check` is what you want. If it isn't exactly what you need, then `data/enumerate` will help you build what you need very easily. -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io Vincit qui se vincit. On Thu, Jun 6, 2019 at 3:21 PM Ryan Kramer wrote: >

[racket-users] grammar-based fuzzing

2019-06-06 Thread Ryan Kramer
Does Racket have any grammar-based fuzzing utilities? I'm probably going to play around with this either way, but if there is an existing solution I'll quit after I've had my fun. If, however, people think Racket could use something like this I may attempt to make it into a usable package. I'm

Re: [racket-users] Are function parameters copy on write?

2019-06-06 Thread David Storrs
Cool. Thanks, Jay. On Thu, Jun 6, 2019 at 12:25 PM Jay McCarthy wrote: > On Thu, Jun 6, 2019 at 12:16 PM David Storrs > wrote: > >> >> >> On Thu, Jun 6, 2019 at 12:14 PM Jay McCarthy >> wrote: >> >>> Your code is passing bytes by value, but bytes are themselves >>> pointers, so you are

Re: [racket-users] Are function parameters copy on write?

2019-06-06 Thread Jay McCarthy
On Thu, Jun 6, 2019 at 12:16 PM David Storrs wrote: > > > On Thu, Jun 6, 2019 at 12:14 PM Jay McCarthy > wrote: > >> Your code is passing bytes by value, but bytes are themselves >> pointers, so you are passing copies of the pointer, not copies of the >> bytes. When you modify it, with

Re: [racket-users] Are function parameters copy on write?

2019-06-06 Thread David Storrs
On Thu, Jun 6, 2019 at 12:14 PM Jay McCarthy wrote: > Your code is passing bytes by value, but bytes are themselves > pointers, so you are passing copies of the pointer, not copies of the > bytes. When you modify it, with `bytes-set!` you are modifying the > underlying structure. When you copy

Re: [racket-users] Are function parameters copy on write?

2019-06-06 Thread Jay McCarthy
Your code is passing bytes by value, but bytes are themselves pointers, so you are passing copies of the pointer, not copies of the bytes. When you modify it, with `bytes-set!` you are modifying the underlying structure. When you copy it with `subbytes` or `bytes-copy`, you are making a new object

Re: [racket-users] Are function parameters copy on write?

2019-06-06 Thread Jon Zeppieri
On Thu, Jun 6, 2019 at 12:00 PM David Storrs wrote: > My understanding is that Racket is call by value, not call by reference. > My application will often be passing around large-ish byte strings; will > they be copied every time I pass them, or will the interpreter use > copy-on-write? >

[racket-users] Are function parameters copy on write?

2019-06-06 Thread David Storrs
My understanding is that Racket is call by value, not call by reference. My application will often be passing around large-ish byte strings; will they be copied every time I pass them, or will the interpreter use copy-on-write? -- You received this message because you are subscribed to the

Re: [racket-users] scopes across files

2019-06-06 Thread Fastmail
> On Jun 3, 2019, at 11:52 AM, Eric Griffis wrote: > Several times now, I've run into one or another form of the following problem: > > Say I want to build primitives to > > declare an "interface" as a list of names, and > implement and use those names at run time in a limited scope The