[racket-users] tooltip "im" message
I have a file on which I’m getting this DrRacket internal error: interval-map-cons*!: start is not strictly less than end im: (make-interval-map '(((390 . 410) #(struct:tooltip-info #(str... start: 3201 end: 3201 obj: (tooltip-info (object:...ivate/get-extend.rkt:134:12 ...) 320... context...: /Users/clements/racket/racket/share/pkgs/data-lib/data/interval-map.rkt:74:0: interval-map-cons*! /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:2076:10: loop /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/module-language.rkt:2299:6: for-loop /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/module-language.rkt:2234:24 /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6 /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32 /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:653:3 I’m guessing it won’t be helpful to have the file… but you never know. Here’s the file on which it’s occurring. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. run-grading.rkt Description: Binary data
[racket-users] existing predicate for membership in TR Sexp type?
Now that I know how much faster ‘assert’ can be than ‘cast’, I’m eager to replace uses of ‘assert' all over the place. Specifically, in my PL class, I’m hoping to get rid of uses of (cast … Sexp) that wind up principally in RHSes of match clauses. In order to do this, I need a predicate of type (-> Any Boolean : Sexp). Well, strictly speaking, all I really need is the positive half, which I can construct like this: (: sexp? (-> Any Boolean : #:+ Sexp)) (define (sexp? s) (or (number? s) (symbol? s) (string? s) (and (pair? s) (sexp? (car s)) (sexp? (cdr s))) (null? s))) This works fine, and I can use it in an assert. Should I just drop this on my students, or is there an existing s-expression checking predicate that I can use? Apologies if I’m just not looking hard enough! John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: [racket-users] repeated code in interactions of scribble
Thanks very much. A nice and clear answer. May be I can insert tagged elements and elemrefs in code:comment escaping with #, in order to provide links to definitions in previous examples. I'll try that later. Thanks again, Jos _ From: Ben Greenman [mailto:benjaminlgreen...@gmail.com] Sent: domingo, 24 de septiembre de 2017 6:45 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] repeated code in interactions of scribble You can re-use helper functions by running the different example blocks with the same evaluator (example below). I don't know how to hyperlink one interaction to another. - - - #lang scribble/manual @require[scribble/example] @(define my-eval (make-base-eval)) Beginning. @examples[#:eval my-eval (define (plus2 n) (+ 2 n)) (plus2 0) (plus2 1) ] Intermission. @examples[#:eval my-eval (define (plus4 n) (plus2 (plus2 n))) (plus4 0) ] Conclusion. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] interesting reproducible DrR core dump
I haven’t finished (or really even started) minimizing this yet, but I’m getting a reproducible core dump in DrRacket when running one of my grading scripts. It seems to be related to the top level; specifically, to trigger the crash, I have to run in DrRacket and then call a particular top-level function. Putting the call to the function inside the module doesn’t trigger the crash. Also, the crash log suggests that it’s crashing in a call to "cwd_check + 82 (file.c:4963)”. Anyhow, this is strictly preliminary; the problem currently involves a tangled web of dozens of files, so I’m just posting this (and the attached crash log) in case something jumps right out. I’ll try to narrow this down today or tomorrow. Best, John Clements -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. crash-log Description: Binary data