Arc Forumnew | comments | leaders | submit | Jonesk79's commentslogin

Yes, I have experience programming from years ago and recently started learning Python until I happened across Arc. I think it's neat and would be great for my project. Where is the how-to-run news in case I don't find it myself? Thanks

-----

1 point by akkartik 1327 days ago | link

It's right inside the arc3.2.tar file. Just cd into the arc3.2 directory after you expand it, and you should see it. It looks like this: https://github.com/arclanguage/anarki/blob/official/how-to-r...

-----

2 points by Jonesk79 1327 days ago | link

I run this code and check http://localhost:8080/ but nothing loads.

  arc> load "news.arc"
 
  #<procedure: load>

  arc> "news.arc"
  
  arc> nsv

  #<procedure:zz>

-----

3 points by Jonesk79 1327 days ago | link

I ran (load "news.arc") this time and it prints out a list of items prefixed with * redefining and 'nil' returns after the last item.

However, nothing happens at localhost8080 and when I run (nsv) it gives this message:

  The syntax of the command is incorrect.

  The syntax of the command is incorrect.
  
  The syntax of the command is incorrect.
  
  The syntax of the command is incorrect.

  'rm' is not recognized as an internal or external command,
  operable program or batch file.

  load items: Error: "directory-list: could not open 
  directory\n  path: C:\\Users\\Hopet Ma'at 
  Amun\\Desktop\\arc3.2\\arc\\news\\story\\\n  system error: 
  The system cannot find the path specified.; win_err=3"

-----

2 points by rocketnia 1327 days ago | link

There are a number of system calls like (system "rm ...") in news.arc and other places. These run shell commands, and most of them only work on a POSIX shell. I'm sorry to say, I'm not sure anyone has ever gone through all these calls and made them portable so that news.arc can run on Windows.

If you use the Anarki master branch, I think a few of those calls have been replaced with more portable code, but not all of them. I've at least been able to get a server started up and showing content before.

I used to use Arc on Windows quite a bit, and I tried the web server a couple of times, but I never really used the web server. Nowadays I still use Windows, but I do a lot of my programming projects inside a Linux Mint VM using VirtualBox. I think running news.arc inside a VM like that would be one of the easier ways to get it working. Of course, learning to set up a VM like that could be a lot to figure out, but at least that's something a lot of people out there have already written up tutorials for.

Another possibility is to look for one of the many Hacker News clones that people have whipped up in other languages. You probably won't get to use Arc that way, but some of those clones may be better architected and better maintained than news.arc.

-----

2 points by Jonesk79 1327 days ago | link

I have found this and it looks promising. https://coderrocketfuel.com/courses/hacker-news-clone

My only concern is that it won't use the news.arc algorithm. In that case, I think I'd take the time to learn how to set up a virtual environment.

-----

2 points by akkartik 1327 days ago | link

Ah, news.arc doesn't work on Windows, unfortunately.

-----

3 points by krapp 1326 days ago | link

The Anarki fork should work, I run it in Windows.

https://github.com/arclanguage/anarki

-----

2 points by Jonesk79 1327 days ago | link

Ok, thanks

-----

2 points by Jonesk79 1328 days ago | link | parent | on: Arc Installation

After running the command, I get the following:

  > racket -f as.scm

  ; racket: undefined;

  ;  cannot reference an identifier before its definition

  ;   in module: top-level

  ; [,bt for context]

  > ; -f: undefined;

  ;  cannot reference an identifier before its definition

  ;   in module: top-level

  ; [,bt for context]

  > ; as.scm: undefined;

  ;  cannot reference an identifier before its definition

  ;   in module: top-level

  ; [,bt for context]
I think I have to somehow cd to the untarred arc3.2 but I'm not sure how to do so in the Racket App Terminal

-----

2 points by akkartik 1328 days ago | link

It looks like you're trying to run racket -f as.scm inside Racket. It's just a terminal command. Open a new terminal (unrelated to Racket) and type it in there.

-----

2 points by Jonesk79 1328 days ago | link

I got it set up in the regular terminal by adding the path to environment variables, however, it gave me the same message as before. Is there something more I should be doing with the untarred folder, maybe?

-----

1 point by akkartik 1327 days ago | link

I'm not sure where the disconnect lies. I think we might need to discuss details more explicitly. What OS are you on?

-----

2 points by Jonesk79 1327 days ago | link

You're a great help, thanks! I was typing in Racket before racket -f as.scm, when I don't need to

-----