Re: [racket-dev] Problem with planet and Windows shortcuts
To catch up the list: Antonio sent me more information, and the problem is that Racket was handling symbolic links but not junctions (which are a different kind of link on Windows). Antonio: I've pushed a repair to handle junctions, so let me know if it works for you. At Thu, 18 Sep 2014 12:32:48 +0100, Antonio Menezes Leitao wrote: > Hi, > > On Thu, Sep 18, 2014 at 12:00 PM, Matthew Flatt wrote: > > > I think there must be a problem with v6.1's support for soft links on > > Windows, while previous versions of Racket were oblivious to links on > > Windows. > > > > What does > > > > (resolve-path "C:\\Users\\aml\\AppData\\Roaming\\Racket") > > > > report? > > > > > > (resolve-path "C:\\Users\\aml\\AppData\\Roaming\\Racket") > "C:\\Users\\aml\\AppData\\Roaming\\Racket" > > > Best, > António. > > > At Wed, 17 Sep 2014 17:31:55 +0100, Antonio Menezes Leitao wrote: > > > Hi, > > > > > > Recent versions of Racket for Windows (at least, starting from 6.1.0.3) > > > cannot install packages from planet when Racket's AppData/Roaming/ folder > > > is a shortcut. I'm sure Racket could do it in previous versions. > > > > > > The output I get is: > > > > > > ..\..\Program Files\Racket-6.1.0.3\collects\racket\path.rkt:66:14: > > > normalize-path: element within the input path is not a directory or does > > > not exist > > > element: C:\Users\aml\AppData\Roaming\Racket > > > > > > Here are some additional tests: > > > > > > > (directory-exists? "C:\\Users\\aml\\AppData\\Roaming\\Racket") > > > #f > > > > (file-exists? "C:\\Users\\aml\\AppData\\Roaming\\Racket") > > > #f > > > > (link-exists? "C:\\Users\\aml\\AppData\\Roaming\\Racket") > > > #t > > > > > > The reason why I use a shortcut is simply because I use several different > > > machines which synchronize that folder using Dropbox. > > > > > > Is there a workaround (besides making > > C:\Users\aml\AppData\Roaming\Racket a > > > regular folder)? > > > > > > Best, > > > António. > > > _ > > > Racket Developers list: > > > http://lists.racket-lang.org/dev > > > > _ > > Racket Developers list: > > http://lists.racket-lang.org/dev > > _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Working Cairo-bindings for Racket?
No, I'm suggesting that while I think a real binding to cairo would be a good idea, it should be based on the code already in racket/draw and that the code in my library is probably useless. Feel free to use any of it that you find useful, though. Sam On Sep 27, 2014 5:08 AM, "Antti Karttunen" wrote: > > > On Fri, Sep 26, 2014 at 4:05 PM, Sam Tobin-Hochstadt > wrote: > >> Instead of changing my Planet package, it would be better to provide >> an FFI to cairo based on the existing one that's in the library you >> mention. I don't think any of my package would be useful for that, >> though. >> > > > Did I understand right that your cairo.ss is intended to work with some > substantially earlier version of Cairo-library, and you want to keep it > that way? > > In any case, at least I realized that > (require racket/draw/unsafe/cairo-lib) > followed by (define libcairo cairo-lib) > > is (just ?) a more portable way of saying: > > (define libcairo (ffi-lib "libcairo")) > [Or in Windows: (define libcairo (ffi-lib "libcairo-2")) because it is > called libcairo-2.dll] > > Like this: > #lang racket > (require racket/draw/unsafe/cairo-lib) > (require ffi/unsafe) > > cairo-lib > # > > (define libcairo (ffi-lib "libcairo")) > . . ffi-lib: couldn't open "libcairo.dll" (The specified module could not > be found.; errno=126) > > (define libcairo (ffi-lib "libcairo-2")) > > libcairo > # > > (eq? cairo-lib libcairo) > #t > > > > > > > So I guess making my own set of bindings shouldn't be too much of > racket-science... > > > Best, > > Antti > > >> Sam >> >> On Fri, Sep 26, 2014 at 8:44 AM, Antti Karttunen >> wrote: >> > >> > Another question: >> > >> > Would it be a big job to edit the bindings in >> > >> http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss >> > so that it worked with the current >> > >> > (require racket/draw/unsafe/cairo-lib) >> > >> > cairo-lib >> > # >> > >> > ? >> > >> > I guess it's not just question of "deprecated names for Cairo >> functions" as >> > mentioned in the ticket: >> > http://planet.racket-lang.org/trac/ticket/357 >> > >> > but also code like: (define libcairo (ffi-lib "libcairo")) >> > >> > right in the beginning of .../samth/cairo.plt/1/0/cairo.ss >> > ? >> > >> > >> > Yours, >> > >> > Antti Karttunen >> > >> > >> > _ >> > Racket Developers list: >> > http://lists.racket-lang.org/dev >> > >> > > _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Working Cairo-bindings for Racket?
On Fri, Sep 26, 2014 at 4:05 PM, Sam Tobin-Hochstadt wrote: > Instead of changing my Planet package, it would be better to provide > an FFI to cairo based on the existing one that's in the library you > mention. I don't think any of my package would be useful for that, > though. > Did I understand right that your cairo.ss is intended to work with some substantially earlier version of Cairo-library, and you want to keep it that way? In any case, at least I realized that (require racket/draw/unsafe/cairo-lib) followed by (define libcairo cairo-lib) is (just ?) a more portable way of saying: (define libcairo (ffi-lib "libcairo")) [Or in Windows: (define libcairo (ffi-lib "libcairo-2")) because it is called libcairo-2.dll] Like this: #lang racket (require racket/draw/unsafe/cairo-lib) (require ffi/unsafe) cairo-lib # > (define libcairo (ffi-lib "libcairo")) . . ffi-lib: couldn't open "libcairo.dll" (The specified module could not be found.; errno=126) > (define libcairo (ffi-lib "libcairo-2")) > libcairo # > (eq? cairo-lib libcairo) #t > So I guess making my own set of bindings shouldn't be too much of racket-science... Best, Antti > Sam > > On Fri, Sep 26, 2014 at 8:44 AM, Antti Karttunen > wrote: > > > > Another question: > > > > Would it be a big job to edit the bindings in > > > http://planet.racket-lang.org/package-source/samth/cairo.plt/1/0/cairo.ss > > so that it worked with the current > > > > (require racket/draw/unsafe/cairo-lib) > > > > cairo-lib > > # > > > > ? > > > > I guess it's not just question of "deprecated names for Cairo functions" > as > > mentioned in the ticket: > > http://planet.racket-lang.org/trac/ticket/357 > > > > but also code like: (define libcairo (ffi-lib "libcairo")) > > > > right in the beginning of .../samth/cairo.plt/1/0/cairo.ss > > ? > > > > > > Yours, > > > > Antti Karttunen > > > > > > _ > > Racket Developers list: > > http://lists.racket-lang.org/dev > > > _ Racket Developers list: http://lists.racket-lang.org/dev