Re: [racket-users] Path inside package?

2017-01-09 Thread Andreas Olsson
Thank you! That works great! Now I'll try updating my package for racket, hope it works there to. I made a pmap package for racket that can be downloaded in the manager, I've mad map with futures before and now I got a working version with places to. -- You received this message because you a

Re: [racket-users] Path inside package?

2017-01-09 Thread Sam Tobin-Hochstadt
Right, the use of `define-runtime-path` needs to be a the top-level of the module. You can't put it inside of a function, but you don't need to. Sam On Tue, Jan 10, 2017 at 1:16 AM, Andreas Olsson wrote: > It says it needs to be "top level"? > > -- > You received this message because you are sub

Re: [racket-users] Path inside package?

2017-01-09 Thread Andreas Olsson
It says it needs to be "top level"? -- 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://gr

Re: [racket-users] Path inside package?

2017-01-09 Thread Sam Tobin-Hochstadt
You should use `define-runtime-path` as follows: (define-runtime-path worker "place-worker.rkt") ... (dynamic-place worker 'place-main) ... Sam On Tue, Jan 10, 2017 at 1:00 AM, Andreas Olsson wrote: > Lock the example in http://docs.racket-Lang.org/reference/places.html > > That works when the

Re: [racket-users] Path inside package?

2017-01-09 Thread Andreas Olsson
Lock the example in http://docs.racket-Lang.org/reference/places.html That works when the files are in the same directory and run from there. But if you make this into a package the line providing the path to place-worker.rkt doesn't work. How do you get the path to place-worker.rkt when it's

Re: [racket-users] Path inside package?

2017-01-09 Thread 'John Clements' via Racket Users
> On Jan 9, 2017, at 1:16 PM, Andreas Olsson wrote: > > > I'm having a little trouble. I have constructed a package with files that > work when tested in a directory, when installed as a package I get a path > problem. A function in one file creates places that's loaded with a separate > fil

Re: [racket-users] Stack traces for phase 1 errors?

2017-01-09 Thread Alexis King
Alright, that makes sense, thanks. I actually did have my code in question in a separate module, but oddly, I ended up getting different results for the following two commands: $ racket -l errortrace -l hackett/monad $ racket -l errortrace -l hackett/private/type -l hackett/monad The error in

[racket-users] Mann-Whitney test?

2017-01-09 Thread Mitchell Wand
Does anybody have an implementation of the Mann-Whitney U test (or the equivalent Wilcoxson Rank test) in Racket? I imagine I could easily hack up my own, but somebody else may have done a better job of it already. --Mitch -- You received this message because you are subscribed to the Google Gr

[racket-users] Path inside package?

2017-01-09 Thread Andreas Olsson
I'm having a little trouble. I have constructed a package with files that work when tested in a directory, when installed as a package I get a path problem. A function in one file creates places that's loaded with a separate file, the path to the file has proven hard to create. I've tryed func

Re: [racket-users] Stack traces for phase 1 errors?

2017-01-09 Thread Matthew Flatt
Errortrace cannot currently give you traces for phase-1 code in the module being expanded. That's because errortrace works by first fully expanding a module and then instrumenting it. If you can arrange for the compile-time code to be in a different module than the one that triggers the error, you

[racket-users] Stack traces for phase 1 errors?

2017-01-09 Thread Alexis King
I have run into a few situations lately where I would really appreciate stack traces for errors in my compile-time code. However, I can’t figure out how to get errortrace to work with errors that occur at compile-time. For example, here’s a simple program: #lang racket (begin-for-syntax (

Re: [racket-users] How do I offer suggestions for the docs?

2017-01-09 Thread David Storrs
Many thanks, Royall. That was frustrating me a lot. On Mon, Jan 9, 2017 at 1:27 PM, 'Royall Spence' via Racket Users wrote: > I think this is what you're looking for: > https://github.com/racket/racket/blob/62f5b2c4e4cdefa18fa36275074ff9fe376ddaf3/pkgs/racket-doc/scribblings/reference/data.scrbl

Re: [racket-users] How do I offer suggestions for the docs?

2017-01-09 Thread 'Royall Spence' via Racket Users
I think this is what you're looking for: https://github.com/racket/racket/blob/62f5b2c4e4cdefa18fa36275074ff9fe376ddaf3/pkgs/racket-doc/scribblings/reference/data.scrbl I was only able to find it by searching a string in the racket/racket repo on github.com. As far as I know, you just submit a pull

[racket-users] How do I offer suggestions for the docs?

2017-01-09 Thread David Storrs
Sometimes I find places in the docs where things could be better -- for example, I think it would make sense if the Keywords page (http://docs.racket-lang.org/reference/keywords.html?q=string-%3Edocs#%28def._%28%28quote._~23~25kernel%29._string-~3ekeyword%29%29) had a mention of keyword-apply, and

Re: [racket-users] Re: Dynamically generated keywords -- are they possible?

2017-01-09 Thread David Storrs
Good to know. Thanks, Jack. On Mon, Jan 9, 2017 at 1:07 PM, Jack Firth wrote: > On Monday, January 9, 2017 at 9:47:03 AM UTC-8, David K. Storrs wrote: >> What should string->keyword be used for? I was expecting this to work >> but it does not: >> >> (define (foo #:x x) (+ x 3)) >> >> (foo (stri

[racket-users] Re: Dynamically generated keywords -- are they possible?

2017-01-09 Thread Jack Firth
On Monday, January 9, 2017 at 9:47:03 AM UTC-8, David K. Storrs wrote: > What should string->keyword be used for? I was expecting this to work > but it does not: > > (define (foo #:x x) (+ x 3)) > > (foo (string->keyword "x") 8) > > ; foo: arity mismatch; > ; the expected number of arguments d

Re: [racket-users] Dynamically generated keywords -- are they possible?

2017-01-09 Thread David Storrs
Brilliant. Thanks, Ben. On Mon, Jan 9, 2017 at 12:50 PM, Ben Greenman wrote: > You can use it with keyword-apply > > (define (foo #:x x) (+ x 3)) > (keyword-apply foo (list (string->keyword "x")) (list 8) '()) > ;; ==> 11 > > http://docs.racket-lang.org/reference/procedures.html#%28def._%28%28li

Re: [racket-users] Dynamically generated keywords -- are they possible?

2017-01-09 Thread Ben Greenman
You can use it with keyword-apply (define (foo #:x x) (+ x 3)) (keyword-apply foo (list (string->keyword "x")) (list 8) '()) ;; ==> 11 http://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._keyword-apply%29%29 On Mon, Jan 9, 2017 at 12:47 PM, Da

[racket-users] Dynamically generated keywords -- are they possible?

2017-01-09 Thread David Storrs
What should string->keyword be used for? I was expecting this to work but it does not: (define (foo #:x x) (+ x 3)) (foo (string->keyword "x") 8) ; foo: arity mismatch; ; the expected number of arguments does not match the given number ; expected: 0 plus an argument with keyword #:x ; give

Re: [racket-users] Re: FFI Library Naming Conventions

2017-01-09 Thread Hendrik Boom
On Mon, Jan 09, 2017 at 06:56:06AM -0500, Neil Van Dyke wrote: > * (One argument *against* using Racket idiomatic names for a big API, such > as OpenGL, is that sometimes you might really want to make the names look > like the C ones, such as for people copying large masses of example code. > I'm

Re: [racket-users] Re: FFI Library Naming Conventions

2017-01-09 Thread Neil Van Dyke
* Remember that, although Racket is rich with various kinds of namespaces, documentation lookup for the core Racket and add-on packages really prefer that names are mostly unique globally. (I won't get into readability tradeoffs, for various use cases that come up.) See thread "http://lists.r