> On Oct 3, 2017, at 10:31 AM, 'Shakin Billy' via Racket Users
> how do i access the pattern variable var at compile time (phase 1?)
> additional to an answer, could you point me to the right part of the
> documentation? i really couldn't find it.
Thanks a lot.
Am 03.10.2017 9:05 nachm. schrieb "Matthew Butterick" :
> > On Oct 3, 2017, at 10:31 AM, 'Shakin Billy' via Racket Users <
> email@example.com> wrote:
> > how do i access the pattern variable var at compile time (phase 1?)
> > additional to an
> On Oct 1, 2017, at 12:50 PM, Jordan Johnson wrote:
> Correct me if I’m wrong in this understanding: the #'(module ...) is
> effectively replacing the body of whatever program is written in #lang
> mylang, so the path-string "semantics.rkt" must be interpreted
I'm dealing with some foreign apis that want to be passed long lived output
pointers to structs. The apis eventually call back indicating that the
struct has been filled in appropriately and then I want to read out the
values and deallocate the structs. I'm using atomic interior memory for
Is the work to parse out the values short enough that you can do it
atomically in response to the notification that says the data is ready?
If so, it's probably best to parse and free in atomic mode. Or can you
at least atomically separate out references to children, where
finalizers can sensibly
Parsing it out in atomic mode probably will work, I'll look at that. The
callback method I described is actually not how it works, and it is a bit
more complicated (involving a separate place and blocking foreign calls),
but I can do all of the decomposing work in atomic mode. I think I'm
Hi Ben Greenman
Unsyntaxed elemtag and elemref work well in code:comment.
I did this as follows:
@(define my-eval (make-base-eval))
(code:comment #,(elemtag "plus2" ""))
(define (plus2 n)
(+ 2 n))
I have been implementing some toy problems in typed/racket. However,
I have hit a wall while trying to invoke `(random-sample)`. This
(define (example (limit : Integer)
(count : Integer))
The keyword is #:replacement? instead of #:replacement (note the
question mark). I don't know enough Typed Racket to understand that
error message tho, sorry.
On Tue, Oct 3, 2017 at 1:40 AM, Taahir Ahmed wrote:
> I have been
Of course it's something simple like that. You are correct, I changed
it to `#:replacement?` and then the program typechecked and ran.
It would be helpful if the error message showed me that I was passing
extra arguments in the domain of the function, but at least now I know
what was happening.
Yes, that's definitely a bad error message, so we should try to
improve Typed Racket here.
On Tue, Oct 3, 2017 at 12:54 PM, Taahir Ahmed wrote:
> Of course it's something simple like that. You are correct, I changed
> it to `#:replacement?` and then the program
how do i access the pattern variable var at compile time (phase 1?)
additional to an answer, could you point me to the right part of the
documentation? i really couldn't find it.
(define inp (open-input-string "12+34"))
(define-syntax (terminal stx)
(syntax-case stx ()
I've actually simplified my program that causes the issues and it doesn't
need the callback or the foreign functions at all it just needs structs
This shows that if garbage is collected after making the substruct is
complete then the finalizer gets run, which trashes the memory
Mail list logo