[racket-users] error with no location and no traceback, with -l errotrace etc. - how do you get racket to say where?

2015-11-25 Thread thomas.lynch
Ok, here is a new one, but first a summary. To summarize, I originally posted a number of racket error messages that had no backtrace, or no backtrace nor location information. So far, here is people have contributed as fixes, though unfortunately cases remain (see below): 1. errortrace is in

[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
Alex, yes thank you, the quote-srcloc works at run time, so for example: (define-syntax (here3 stx) (let( [program `(quote-srcloc ,stx)] ) (datum->syntax stx program) )) Will print the call point. What the heck is this macro, as it is being

[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
what is the difference between syntax-case matched identifiers, and those provided by let. This example crashes and burns on load: (define-syntax (fine1 stx) (let ( [a 7] [b 9] ) (syntax/loc stx (+ a b) ))) Which begs the question,

[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
p.s. for reference here, Without syntax loc, no location of error in macro: #| (define-syntax (messup5 stx) (datum->syntax stx (let ( [a 7] [b 9] ) (^ a b) ))) (messup5) rac...@test-macro-dev-error.rkt> (enter!

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
> > What syntax/loc would do is put the source location of the caller in the back > trace. It only goes one level deep though, so you're not getting the actual > benefit of using syntax/loc over syntax, unless the error happens in the > outer let expression instead of one the inner

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
thank you !! -- 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

Re: [racket-users] How to get information about where an error occurs, in a stack trace context?

2015-11-21 Thread thomas.lynch
> > The calls that are missing appear to tail calls, and Racket performs > tail-call optimization, so I imagine those missing functions are not > really "on the stack" at the time of the error. > > I don't know that there is a way around this except to deliberately > subvert the tail-call

[racket-users] quote-srcloc an questions of getting location

2015-11-21 Thread thomas.lynch
The example in the manual for quote-srcloc shows it wrapped as a syntax object, and it gives the correct call point location answer. however, when the result from quoteloc is instead put in a variable, then variable has the wrong location (not the call location of stx). An explanation of this

Re: [racket-users] How to get information about where an error occurs, in a stack trace context?

2015-11-19 Thread thomas.lynch
I have a related question. I turned on error trace using the command line Robby suggested, but it doesn't give me a trace, but rather just the call point and error function. Here is an example, the trace should be f -> gg -> g -> hh -> h then bang, the error. But instead Racket shows me f

[racket-users] raco install says it is already there, raco setup says it doesn't exist ...

2015-11-11 Thread thomas.lynch
would some kind person clue me in to the raco setup syntax? When I try to install this, it tells me it is there. When I run setup it says it doesn't exist .. I must be missing a switch or something? §lambda1:/home/deep/liquid-extensions> raco pkg install raco pkg install: package is already

[racket-users] how can code know what phase it is being executed in?

2015-09-30 Thread thomas.lynch
A module ostensibly written for phase 0, can become phase n due to (require (for-syntax a-module)). There is a module with test code that only makes sense at phase 0, but because it is (required "test-code.rkt") inside of another module which itself is required for syntax, or a higher module

[racket-users] ever been confused about using or teaching car, cdr, cadadr, etc? Here is the paper for you...

2015-07-23 Thread thomas.lynch
Wrote this for students. Hope it helps. http://arxiv.org/ftp/arxiv/papers/1507/1507.05956.pdf If any one is interested in starting a project implementing any of the proposed extensions or the like in racket let me know. -- You received this message because you are subscribed to the Google

[racket-users] incantation for library module to access a data file in the same directory?

2015-05-12 Thread thomas.lynch
I created a collection, then used raco to install it. Ran into a problem where a test function within module X in the collection accesses a file in the same directory as the source code: (define (fun-timed-test-2) (define ip (open-input-file realtime-test-data.rkt)) (match-define

[racket-users] accessing a directory local file to a module

2015-05-12 Thread thomas.lynch
I apologize if this posted before, but given a day I don't see it here.. I have a function with a companion data file (data file is part of the collection). When I invoke it with a relative path name (just the file name), racket looks for it in the directory the function is invoked from, not

[racket-users] exploring sribble @ ... seems this should work but doesn't ..

2015-04-21 Thread thomas.lynch
Tyring to use '@' to run a command on a string, fails: racket@ (displayln hello) hello racket@ (require scribble/base) racket@ @displayln{hello} @displayln: undefined; cannot reference undefined identifier context...: /usr/share/racket/collects/racket/private/misc.rkt:87:7 racket@ hello:

[racket-users] scribble confusion ...

2015-04-21 Thread thomas.lynch
Manual says: remember that the Scribble is just an alternate for S-expressions Please pardon the question .. ah then what good is it? We already have S-expressions. Perhaps it looks a lot nicer? .. but if that works for scribble, do we need one of these looks nicer rewrites for the