On Tue, May 18, 2021 at 3:52 PM Sam Tobin-Hochstadt
wrote:
> I think the key question is what you want to happen if you would need
> to re-run the "pre" thunk, because you re-enter the code via a
> continuation.
>
> In many cases, you don't want to support that at all …
>
Then you can use `call-
I think the key question is what you want to happen if you would need
to re-run the "pre" thunk, because you re-enter the code via a
continuation.
In many cases, you don't want to support that at all, and then it's
pretty easy (although you still need mutation):
(let* ([conn (connect-to-server)]
Thank you. Is there a way to do it without the mutation? I was hoping to
use this for macro generation that simplifies combining with-handlers and
dynamic-wind with setup/teardown code.
(try [pre
(define db (connect-to-db))
(define conn (connect-to-server))]
[(send-message conn
It's not quite as convenient, but here's a version of your program
that should work:
(let ([conn #f])
(dynamic-wind
(lambda () (set! conn (connect-to-server))
(lambda () (send-message conn "foo"))
(lambda () (finalize-connection conn
Sam
On Tue, May 18, 2021 at 2:08 PM David St
>
> > (So I guess the only question that comes up is: is it possible to update
> > the sqlite version?)
> > [vaguely remember seeing a mailing list thread about this but, currently
> I
> > only find other ones]
>
> My libsqlite3[1] package provides recent versions (currently 3.35.5) of
> SQL
dynamic-wind is nice because it guarantees that the pre- and postconditions
for a chunk of code will be run regardless of continuation jumps,
exceptions, etc. The only issue I have is that the three thunks do not
share scope, making it difficult to do setup/teardown workflows. I feel
like I shoul
You might also be interested in the new `raco-pkg-env` tool:
https://github.com/samdphillips/raco-pkg-env/
Sam
On Tue, May 18, 2021 at 12:20 PM Matthew Flatt wrote:
>
> Yes, this approach can work. I don't think the existing Racket tools
> will help much with persisting a configuration across ve
kamist...@gmail.com writes:
> (So I guess the only question that comes up is: is it possible to update
> the sqlite version?)
> [vaguely remember seeing a mailing list thread about this but, currently I
> only find other ones]
My libsqlite3[1] package provides recent versions (currently 3.35.5)
Yes, this approach can work. I don't think the existing Racket tools
will help much with persisting a configuration across versions, though,
so you'd probably have to script that.
One potential drawback of your approach is that executables,
documentation, etc., associated with the extra package wi
utah has 32-bit Windows snapshots now again.
I did a cross build with:
>> Cross configuration
Target:i386-win32
Host: x86_64-linux
Version: current
VM:bc
Workspace: /tmp/todays-snapshot
with `pkg install` `exe ...` `dist ...` moved dist over to windows vm and
it ran fine,
10 matches
Mail list logo