Incidentally, sorry for the mangled formatting / narrow margins that
my emails keep having. I'm not doing that, it's coming from GMail.
On Tue, May 15, 2018 at 10:06 AM, David Storrs wrote:
> On Tue, May 15, 2018 at 1:28 AM, Matthew Butterick wrote:
>> To add to your pile of options, because yo
On Tue, May 15, 2018 at 1:28 AM, Matthew Butterick wrote:
> To add to your pile of options, because you said "certain error conditions":
> perhaps you might `raise` an exception in the db code that gets caught by
> the network code (using `with-handlers`). In this way the dependency only
> runs on
To add to your pile of options, because you said "certain error conditions":
perhaps you might `raise` an exception in the db code that gets caught by the
network code (using `with-handlers`). In this way the dependency only runs one
direction (network module imports db module) but the db module
On Mon, May 14, 2018 at 10:07 PM, Greg Hendershott
wrote:
> David you wrote "both" so I just wanted to point out I read three ways:
Good point; I misspoke. (Mistyped?)
> 4. It doesn't sound like this is your case, but: If there are many
> function calls where you pass the extra parameter, and t
David you wrote "both" so I just wanted to point out I read three ways:
1. Units
2. Callbacks (pass the function as a parameter).
3. Lazy-requires
In a simple case (maybe yours?) I'd suggest trying 2 (callbacks)
first, and see how that works for you in practice.
Also:
4. It doesn't sound like t
Brilliant. I knew there had to be a clean way and both of these sound
good. Thanks.
Dave
On Mon, May 14, 2018 at 4:56 PM, Alexis King wrote:
> In addition to what Matthias says, you can also sometimes break these
> kinds of cycles using lazy-require, which defers the requiring the other
> modu
In addition to what Matthias says, you can also sometimes break these
kinds of cycles using lazy-require, which defers the requiring the other
module until it is first needed. This is simpler than using units and
provides stronger guarantees than using callbacks, but it is a bit more
ad-hoc than bo
> On May 14, 2018, at 4:28 PM, David Storrs wrote:
>
> My application retrieves chunks of files from the network and writes
> them to disk, as well as writing certain data about them to the
> database (e.g. where they are on disk and where they came from on the
> network).
>
> I've split these
My application retrieves chunks of files from the network and writes
them to disk, as well as writing certain data about them to the
database (e.g. where they are on disk and where they came from on the
network).
I've split these functions into separate files:
app/network/chunks.rkt
app/lib/db/ch
9 matches
Mail list logo