Arc Forumnew | comments | leaders | submit | jsgrahamus's commentslogin
2 points by jsgrahamus 1164 days ago | link | parent | on: Arc Forum installation Step 3

What is the link you are using?

-----


Downloaded anarki to C:\Users\Steve\Downloads" and tried it.

Got same results.

-----


  Sorry it took so long.

  Running on Windows 10 Home, and Racket v8.0[cs (Downloaded 1 day ago)]:
  arc> (outfile "~/test.txt")
  expand-user-path: bad username in path
    path: ~/test.txt
    system error: unsupported; rkt_err=1
    context...:
     body of "D:\Steve - D\Documents - D\git\anarki\ac.rkt"
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1014:14: outfile
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1459:4

  arc> (outfile "~\test.txt")
  expand-user-path: bad username in path
    path: ~       est.txt
    system error: unsupported; rkt_err=1
    context...:
     body of "D:\Steve - D\Documents - D\git\anarki\ac.rkt"
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1014:14: outfile
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1459:4

  arc> (outfile "~\\test.txt")
  expand-user-path: bad username in path
    path: ~\test.txt
    system error: unsupported; rkt_err=1
    context...:
     body of "D:\Steve - D\Documents - D\git\anarki\ac.rkt"
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1014:14: outfile
     D:\Steve - D\Documents - D\git\anarki\ac.rkt:1459:4

  arc>

-----

3 points by rocketnia 1237 days ago | link

If I understand right, I think those are supposed to be errors still. The documentation for `expand-user-path` says "In addition, on Unix and Mac OS, a leading ~ is treated as user’s home directory and expanded[...]" but it doesn't say there's any corresponding behavior on Windows.

-----

3 points by zck 1236 days ago | link

Ah, interesting. That's a good point that it's Unix/MacOS-specific. My hope was that it should make Arc interpret paths the same way the default shell on the system does. On Linux, ~/ is the home directory of the current user, so it makes sense that Anarki would work that way on Linux. But Windows doesn't work that way, so it makes sense Anarki wouldn't either.

I don't know of any similar path tricks on Windows, But, if this change hasn't broken anything on Windows, I would be satisfied with that. Can you verify it still works to open an existing file? Are there any other special ways to refer to files or directories on Windows?

-----

2 points by rocketnia 1230 days ago | link

"On Linux, ~/ is the home directory of the current user, so it makes sense that Anarki would work that way on Linux. But Windows doesn't work that way, so it makes sense Anarki wouldn't either."

Yeah, I don't know much about what a Windows user would expect ~ to do. I would say `expand-user-path` leaving ~ alone on Windows is probably as good a behavior as any. It coincides with Command Prompt, where ~ just refers to a file or folder named "~". In PowerShell, ~ seems to be expanded to C:\Users\[username]\ somehow, so there's potentially an alternative design there.

---

"I don't know of any similar path tricks on Windows, But, if this change hasn't broken anything on Windows, I would be satisfied with that. Can you verify it still works to open an existing file?"

On Windows 10 64-bit with Racket 8.1, I've at least run the tests.arc unit tests, the unit-test.arc/tests.arc unit tests, and build-web-help.arc, and they seem to work.

---

"Are there any other special ways to refer to files or directories on Windows?"

Racket deals with a lot more Windows path features than I've ever learned about or encountered, and there's some gritty documentation of that here: https://docs.racket-lang.org/reference/windowspaths.html

I hardly know where to begin learning about and testing those features, and the documentation makes it look like Racket has explored hat rabbit hole pretty thoroughly already, so I'm inclined to suggest we just piggyback on Racket's work here.

-----


Very interesting.

Thanks.

-----


Odd that downloading it again caused it to work.

-----


I downloaded a new version, and it started just fine. Thanks.

-----


Thanks for checking in. The dates of the files in the directories is 2018. I downloaded recent version and gave it a spin: It took about a minute to start up and then I ran (app-start "news") and it started the news app.

Thanks again.

Steve

-----


Looks consistent under Windows cmd:

    D:\anarki>arc.cmd
    initializing arc.. (may take a minute)
    Can't understand fn arg list 5750784
      context...:
       D:\anarki\ac.rkt:432:0: ac-complex-args
       [repeats 1 more time]
       D:\anarki\ac.rkt:418:0: ac-complex-fn
       D:\anarki\ac.rkt:575:0: ac-mac-call
       .../private/map.rkt:40:19: loop
       D:\anarki\ac.rkt:562:0: ac-call
       D:\anarki\ac.rkt:526:0: ac-args
       D:\anarki\ac.rkt:562:0: ac-call
       D:\anarki\ac.rkt:575:0: ac-mac-call
       [repeats 2 more times]
       D:\anarki\ac.rkt:374:0: ac-if
       .../private/map.rkt:40:19: loop
       D:\anarki\ac.rkt:394:0: ac-fn
       D:\anarki\ac.rkt:562:0: ac-call
       D:\anarki\ac.rkt:575:0: ac-mac-call
       [repeats 2 more times]

-----

1 point by jsgrahamus 1285 days ago | link

Cannot get it formatted to separate lines

-----


Copied directory to another drive:

  Steve@DESKTOP-0SFLH1S MINGW64 /d/anarki (master)
  $ racket -v
  Welcome to Racket v8.0 [cs].

  Steve@DESKTOP-0SFLH1S MINGW64 /d/anarki (master)
  $ ./arc.sh -n
  initializing arc.. (may take a minute)
  Can't understand fn arg list 4931584
    context...:
     D:\anarki\ac.rkt:432:0: ac-complex-args
     [repeats 1 more time]
     D:\anarki\ac.rkt:418:0: ac-complex-fn
     D:\anarki\ac.rkt:575:0: ac-mac-call
     .../private/map.rkt:40:19: loop
     D:\anarki\ac.rkt:562:0: ac-call
     D:\anarki\ac.rkt:526:0: ac-args
     D:\anarki\ac.rkt:562:0: ac-call
     D:\anarki\ac.rkt:575:0: ac-mac-call
     [repeats 2 more times]
     D:\anarki\ac.rkt:374:0: ac-if
     .../private/map.rkt:40:19: loop
     D:\anarki\ac.rkt:394:0: ac-fn
     D:\anarki\ac.rkt:562:0: ac-call
     D:\anarki\ac.rkt:575:0: ac-mac-call
     [repeats 2 more times]

-----

2 points by jsgrahamus 1308 days ago | link | parent | on: Arc Installation

What did you see?

-----

3 points by jsgrahamus 1308 days ago | link

I saw this:

  Steve@DESKTOP-0SFLH1S MINGW64 /d/Steve - D/Documents - 
  D/Apps/Arc/arc3.2

  $ which racket
  /c/Program Files/Racket/racket

  Steve@DESKTOP-0SFLH1S MINGW64 /d/Steve - D/Documents - 
  D/Apps/Arc/arc3.2

  $ ls
  ac.scm  app.arc  arc.arc  as.scm  blog.arc  brackets.scm  code.arc  copyright  how-to-run-news  html.arc  libs.arc  news.arc  pprint.arc  prompt.arc  srv.arc  static/  strings.arc

  Steve@DESKTOP-0SFLH1S MINGW64 /d/Steve - D/Documents - 
  D/Apps/Arc/arc3.2

  $ racket -f as.scm
  Use (quit) to quit, (tl) to return here after an interrupt.

  arc> (* 1 2 3 4 5)
  120
arc>

-----

2 points by svk 1308 days ago | link

I downloaded and installed racket as described on arc installation page, and I got DrRacket version 8.0. The DrRacket window says: "Welcome to DrRacket, version 8.0 [cs]. Language: No language chosen; memory limit: 128 MB. DrRacket cannot process programs until you choose a programming language. Either select the “Choose Language…” item in the “Language” menu, or get guidance. > I've tried to type racket -f as.scm, but it doesn't work. I've type the same instruction in my MacBook Terminal, it doesn't work either. I don't know what to do next. Have I got the wrong racket? Thanks, jsgrahamus, for your reply :)

-----

3 points by zck 1308 days ago | link

The "racket -f as.scm" is supposed to be done in your terminal, you're right! DrRacket is a different thing that is very cool, but not the tool to run Arc with.

When you type it in your terminal, what does it say? If it says something like "racket not found", try downloading the racket installer from https://download.racket-lang.org/.

If it installs correctly, you should be able to type "racket" (without quotes) in your terminal, and get a message "Welcome to Racket 8.0". To quit, press Ctrl-D, or type (exit) with the parentheses, then hit enter.

If that works, you should be able to run "racket -f as.scm".

-----

3 points by svk 1308 days ago | link

Thank you so much, zck :) I've used a combination of your helpful suggestions, stack overflow, and cd command to get to the right folder, and now it works. I got the arc command prompt (arc>) in my terminal now. I will take my time to explore the tutorial on Arc. I feel good that this community is really helpful. Thanks everyone!

-----

More