Re: [racket-dev] Generics scoping issues

2013-08-16 Thread Carl Eastlund
Mind you, I don't think this example -- using a method in a #:fast-defaults predicate -- can work. The implementation of free-box will have to check the predicate in order to perform generic dispatch, and the predicate has to call free-box, so it will diverge. Carl Eastlund On Fri, Aug 16, 2013

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread Carl Eastlund
The method name you give to define/generic is interpreted in the context of the generic interface name you provide. So if you supply the name "free" inside a macro, that's the wrong context. That error goes away, as you found, if you pass "free" as an argument to def-free. After that, you get th

[racket-dev] main-repo packages on pkg.racket-lang.org

2013-08-16 Thread Matthew Flatt
All of the packages in the main repository are now listed on pkg.racket-lang.org. They have tags like "main-distribution" (for packages that are in the main distribution) and "main-tests" (for tests that are not in the distribution, but are for main-distribution code). If you try to install any o

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread Carl Eastlund
The method names are always going to be in the context of the generic interface name. There's nowhere else they can come from. Carl Eastlund On Fri, Aug 16, 2013 at 5:39 PM, J. Ian Johnson wrote: > WRT the struct abstraction, using syntax-local-introduce on > #'gen:binds-variables seemed to d

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread J. Ian Johnson
WRT the struct abstraction, using syntax-local-introduce on #'gen:binds-variables seemed to do the trick, oddly. -Ian - Original Message - From: "Carl Eastlund" To: "J. Ian Johnson" Cc: "dev" Sent: Friday, August 16, 2013 5:23:33 PM GMT -05:00 US/Canada Eastern Subject: Re: [racket-dev]

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread Carl Eastlund
Okay, let me dig into this. The expansion of define/generic is an odd thing in the way it treats the method names; I'm not at all sure I've gotten it right, or that it's clear what "right" should even be. I'll get back to you shortly. Carl Eastlund On Fri, Aug 16, 2013 at 5:17 PM, J. Ian Johns

Re: [racket-dev] Updating dependency packages from other sources

2013-08-16 Thread Asumu Takikawa
On 2013-08-16 14:27:41 -0600, Matthew Flatt wrote: > How about allowing a package source as an argument to `raco pkg update`? > > After all, removing an old package implementation and installing a new > one is already the job of `raco pkg update`, not `raco pkg install`. I like this idea better th

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread J. Ian Johnson
Re: problem 1 - ah yes I see. Problem 2: In the body of def-free: generic-problems.rkt:16:26: define/generic: free is not a method of generic interfaces gen:binds-variables at: free in: (define/generic gfree free) This compiles if I additionally supply def-free with free, but it doesn't run:

Re: [racket-dev] Updating dependency packages from other sources

2013-08-16 Thread Jay McCarthy
I think that's a better idea Matthew. On Fri, Aug 16, 2013 at 2:27 PM, Matthew Flatt wrote: > At Thu, 15 Aug 2013 11:07:07 -0400, Asumu Takikawa wrote: >> On 2013-08-15 08:19:06 -0600, Jay McCarthy wrote: >> > As for what we could do going forward, I think either of these >> > approaches could be

Re: [racket-dev] Generics scoping issues

2013-08-16 Thread Carl Eastlund
Problem 1 -- you have to use define/generic if you want to use the generic version of something in the context of a set of specific method implementations. That's by design. Problem 2 -- what error message or unexpected behavior are you getting? That should work, it sounds like a bug in define/ge

[racket-dev] Generics scoping issues

2013-08-16 Thread J. Ian Johnson
I'm starting to use generics, and me being myself, I wrote some macros to make writing method definitions easier. But, I'm seeing that #:methods seems to rebind method identifiers in a way that hygiene interferes with. I would expect to be allowed to do the following two things (problems annota

Re: [racket-dev] Updating dependency packages from other sources

2013-08-16 Thread Matthew Flatt
At Thu, 15 Aug 2013 11:07:07 -0400, Asumu Takikawa wrote: > On 2013-08-15 08:19:06 -0600, Jay McCarthy wrote: > > As for what we could do going forward, I think either of these > > approaches could be 'automated'. > > Yes, that'd be great. > > > For instance, we could add a command like > > > > $

Re: [racket-dev] Again. JPEG: unsupported library version: "unknown"

2013-08-16 Thread WarGrey Gyoudmon Ju
It's weird. I cloned and modified the racket/draw/unsafe/jpeg.rkt, even the basic form (ffi-lib "libjpeg") gives me the unknown version, and the only version in my system is 62. Finally I solved it by configuring with "--disable-libffi". More over, I don't know the difficulties to have retina d