Arc Forumnew | comments | leaders | submitlogin
3 points by thaddeus 5665 days ago | link | parent

Not sure if you missed this one ?

http://arclanguage.org/item?id=9159

I didn't see a reply so I am not sure if you decided these were bugs or not.

Thanks, T.



4 points by pg 5665 days ago | link

For now I'm going to leave Windows ports as something for other people to do downstream if they want to. It should be pretty easy, and I don't want to do it myself because I don't have access to a Windows machine or understand anything about the OS.

-----

6 points by kens 5665 days ago | link

Currently, ensure-dir and date use system to run Unix commands. It would be much more portable if they used mzscheme operations instead. This has caused me trouble not only on Windows, but different versions of Linux. And I think make-temporary-file could replace /dev/urandom.

-----

3 points by pg 5663 days ago | link

I changed date to get the date from Mzscheme, but it's not so easy to change ensure-dir. Mz's make-directory doesn't create intermediate directories like mkdir -p, and I don't want to get into trying to understand pathnames.

-----

2 points by thaddeus 5663 days ago | link

------------------------ In ac.scm

    1. added:
    (require (lib "file.ss"))


    2. added:
    (xdef 'make-directory make-directory)
    (xdef 'make-directory* make-directory*)
------------------------ In arc.arc (got from anarki)

    (def mkdir (path (o parents))
         (if (is parents nil)
             (make-directory path)
             (make-directory* path))
    )

    (def ensure-dir (path)
        (unless (dir-exists path)
             (mkdir path t)))
       
I tested on Windows... (ensure-dir "C:/thaddeus/arc/thaddeus/thaddeus/")

Edited. T.

-----

1 point by eds 5663 days ago | link

Here are the two patches for ensure-dir in Anarki stable:

http://github.com/nex3/arc/commit/111fa3c8f021c4abffc1526c88...

http://github.com/nex3/arc/commit/e4ba31f34f84cd946403541ca8...

According to the comment, there is a bug in MzScheme <371 which sets the sticky bit on *nix, so it may still be necessary to call system sometimes.

-----

1 point by thaddeus 5663 days ago | link

don't forget these changes require mods for the $ usage (which you can probably cut out)

and (xdef 'which-os system-type).

T.

-----

1 point by CatDancer 5663 days ago | link

Oh right, now I remember the sticky bit problem! http://arclanguage.org/item?id=2716

. . . .

-----

1 point by CatDancer 5663 days ago | link

If someone wants to implement this, make-directory* in the file.ss library (http://download.plt-scheme.org/doc/352/html/mzlib/mzlib-Z-H-...) looks like it might do it for you. But I haven't tried it myself (I'm not running Windows either).

-----

2 points by CatDancer 5665 days ago | link

If anyone wants to take on being a distributor for a Windows port (or for different variants of Linux, for that matter), I do have a patch for date here: http://catdancer.github.com/date.html

-----

2 points by eds 5665 days ago | link

Another option is the Anarki stable branch (http://github.com/nex3/arc/commits/stable/), which has most of fixes necessary to make most of Arc work portably on Windows and other OSes. (And, being a bug-fix branch, the amount of other random material is limited.)

-----

4 points by thaddeus 5664 days ago | link

I agree with the option, but I also think these posts will fall off the deep end in about 2 months. By then new members may only discover the option after they've discovered the problem. So we're not really saving new members wasted efforts unless the install page guides people.

T.

-----

2 points by pmarin 5664 days ago | link

Why not to setup some kind of wiki under arcelanguage.org? The Tclers Wiki is a great example. http://wiki.tcl.tk/

-----

1 point by eds 5664 days ago | link

pg: Even if you'd rather not think about supporting Windows portability yourself, providing a link to the Anarki stable branch would help new Windows users. Finding this stuff on the forum after it's fallen off the top couple of pages is not very easy.

-----

2 points by thaddeus 5665 days ago | link

Ok.

I have most of them already fixed myself, with the exception of pipe-from, but an average person (aka me) with Windows OS is going to spend time both trying to get Arc working and sifting through the forum which isnt easily searchable (I had to sift through over 300 posts, with 80% of the content being way over my head, to determine pipe-from wasn't expected to be working for a specific reason.... had no clue what "dev/urandom" even was).

If I might suggest: if your not going to fix these that you start a known issues document to save people from the headaches and tail chasing. Even putting something on your install page noting that Windows isn't supported would be appreciated by newcomers.

[Edit] As an idea maybe we could have one posting thread for OS related issues that your install page has a link to ? ....

T.

-----