Arc Forumnew | comments | leaders | submitlogin
Hello Arc
4 points by kinleyd 4720 days ago | 22 comments
This is to say hello to all here in the Arc community. I'm a Lisp noob, and having subscribed to Paul Graham's belief that Lisp is good for us all, I've decided to pick up Arc, his 100 year programming language.

I would like to thank the folks at github.com/nex3/arc for making it possible to finally get Arc running (I reached a number of dead ends and almost settled for Clojure and Common Lisp).

Everything went well with your install directions, except when I tried to git Arc. That's when I got a public key failure. So I manually downloaded and installed the Arc files and had to play around with the command line options for starting Arc with mzscheme. I was lucky enough to find a thread on this forum which recommended dropping the -m option. So I set my startup command to:

$rl ~/.plt/bin/mzscheme -f ~/.plt/arc/as.scm

As a noob, this would have been another point of failure had I not stumbled across that thread. I would certainly suggest an update to the getting started process! :)

I went on to write a short program, mostly file system stuff covering the counting of authors and book titles in my library. And well, even with my very limited familiarity with Arc commands, the code looked much neater, and was much shorter, than the same program I wrote in Node, Python and Ruby. That tells me that PG is well on track towards developing a really powerful language. Cool, and a lot of fun too! I'm happy to be here.



3 points by kinleyd 4719 days ago | link

Thanks Pauan and akkartik. I will definitely try out lite-nu and get back to you with my impressions. From the discussions on lite-nu here as well as the description on its Git page, it sounds very promising. I will also try out arc2js for the same reason.

@akkartik, I realize anarki is bleeding edge. I'm just grateful I stumbled across it and that it's working :) I will revert to the official Arc 3.1 version if it turns out to be too bleeding edge for me.

Now that I've been able to read more threads on this forum, I realize I would have saved a lot of time had I done so earlier. I wouldn't have gone on that long loop with Clojure and Common Lisp.

I think the main problem starts with the Arc Forum | install page (http://arclanguage.org/install). The instructions still are:

"1. Install version 372 of MzScheme. (Don't use the latest version. Versions after 372 made lists immutable.) 2. Get http://ycombinator.com/arc/arc3.tar and untar it.

3. Type mzscheme -m -f as.scm and you should get an Arc prompt.

4. If you ^C an Arc program, you'll get the Scheme REPL. Use (tl) to get back to the Arc REPL.

5. If you have questions or suggestions, post them on the forum. "

I assumed, naturally, that the most prominent page on the forum dedicated to installing Arc would be current. Hence the inevitable install run around.

If either of you are admins here, or if any admin comes across this comment, I would suggest that the Arc Forum | Install page REALLY needs to be updated. A lot of interest in Arc will be killed by frustrating experiences at set up time.

I did visit http://sites.google.com/site/arclanguagewiki (in fact I'd already bookmarked it). However, the instructions there just cover a series of links and could do well with a more detailed instruction set, especially if it is to appear more useful than the Arc Forum install instructions I've referred to above.

After I settle down with Arc, I will contribute in that direction.

-----

2 points by Pauan 4719 days ago | link

"I will also try out arc2js for the same reason."

Although I appreciate the interest, arc2js is currently unusable. I haven't taken the time to port it to either Arc 3.1 or Arubic, so as far as I know you can't actually use it. It's on my TODO list to fix it, but that's not very comforting!

It would, however, be possible to revert to an older working version of arc2js... but that would only work on ar, so I don't really recommend that right now.

-----

1 point by kinleyd 4719 days ago | link

OK, duly noted. Thanks.

-----

3 points by akkartik 4719 days ago | link

Yeah your criticisms are valid. We haven't had the admin here in a while.

The best time to contribute is now, while the memory of your pain is fresh. Edit that frontpage of the wiki and distill the installation instructions that you have managed to glean.

-----

2 points by kinleyd 4719 days ago | link

I will do that. It's been my habit to take lots of notes when trying out new stuff, so no worries about forgetting. :) I will distill it as well as I can and start making some contributions to the wiki. In the absence of an active admin here, hopefully the wiki will start showing up on top of Google Arc searches.

-----

2 points by kinleyd 4716 days ago | link

Added an Installing Arc section to the wiki. It's very Ubuntu-centric right now and I will try to expand coverage in the future.

It doesn't yet show up on the top page of a Google search for "install Arc Lisp" but hopefully it will, and hopefully ahead of the Arc Forum | Install page. : )

-----

3 points by Pauan 4720 days ago | link

My current recommendation for people who want a "no nonsense easy to use" version of Arc 3.1 is to use Lite Nu:

https://github.com/Pauan/ar/tree/lite-nu

This should be a lot easier, cleaner, and simpler for people who are new to Arc. Please tell me if you have any questions, suggestions, or concerns.

-----

3 points by akkartik 4719 days ago | link

I've been playing with lite-nu and tried to load up srv.arc and news.arc. There seems to be a bug with the default for optional args:

  $ arc
  > (def foo((o a)) a)
  #<fn:foo>
  > (foo)
  #<fn:...nu/01 nu.rkt:106:50>
I was going to report it on github, but the repo seems to not have an issues tab. Is it because it's a fork?

-----

1 point by Pauan 4719 days ago | link

That's right. I actually just discovered that a few hours ago when I tried to call "cut". It's already been fixed on my harddrive, I just need to push it out to git. It should be fixed within the new few minutes.

I don't know why it doesn't have an issues tab. In any case, any issues can either be posted here or e-mailed to me.

---

EDIT: Fixed.

-----

3 points by akkartik 4719 days ago | link

Thanks! I got news.arc up and running!

One other change I had to make was to add keywords to the call to open-output-file in nu.rkt:

  (open-output-file f #:mode 'text #:exists mode)
This is looking great.

-----

2 points by Pauan 4719 days ago | link

Ah, right, Nu is still using the mzscheme version of open-output-file, whereas Racket uses keywords... thanks, I'll fix that right now.

EDIT: Fixed.

-----

1 point by Pauan 4719 days ago | link

I just realized that Arc uses 'text mode with outfile... but that breaks on Windows if the file you're writing to isn't a regular file. Even worse, there's no way to specify 'binary from within Arc.

It does, however, allow Arc to pretend that "everything is Unix" since 'text mode automatically converts "\n" to "\r\n" on Windows. But infile uses 'binary mode, so in that case it should probably use 'text mode too, to maintain the illusion.

Alternatively, make outfile use 'binary mode. Just so long as outfile and infile are consistent and agree with each other.

-----

3 points by akkartik 4720 days ago | link

Feel free to update http://sites.google.com/site/arclanguagewiki!

-----

2 points by Pauan 4719 days ago | link

I would, but I'm not sure where to place it. If it were up to me, it would be right at the top, making it easy for newbies to find. But that could be construed as rather egotistical on my part, especially since ar is placed almost at the bottom.

-----

3 points by akkartik 4719 days ago | link

a) Adding it anywhere would be better than the current situation.

b) Feel free to reorganize the page to bring say ar up as well.

The only goal should be to make things easier for newcomers. I think it makes sense to highlight the active variants where the owner is around to answer questions.

-----

4 points by kinleyd 4719 days ago | link

@akkartik: I've been granted write privileges and have begun contributing to the wiki. I agree that some reorganization is necessary and have been taking a good look at the current state. I will focus on giving newbies some more hand holding at the getting started stages, and have opened a new Installing Arc page where I will be more elaborate in detailing installation instructions.

@pauan: I agree that Lite-Nu is the simplest in getting installed and started, and so will add Lite-Nu install instructions and references as well. Newbies should thus be attracted, deservedly, towards Lite-Nu especially in the initial stages. :) After that of course, it's up to them.

-----

1 point by kinleyd 4719 days ago | link

@Pauan, thanks. I like Lite-Nu. I particularly like the ability to run arc scripts from the command line and shell scripts written in Arc - very nifty! I think this gives one the opportunity to get deeply immersed in Arc.

I haven't played enough with it to provide other meaningful feedback or ask questions but I will as I starting using it.

-----

2 points by akkartik 4720 days ago | link

Sorry about all the trouble. You might have an easier time with the wiki at http://sites.google.com/site/arclanguagewiki as a starting point. nex3/arc is bleeding edge since anyone can commit to it, and the install instructions on this site are out of date. Use arc 3.1 and racket as the wiki says; life will be much simpler.

-----

1 point by kinleyd 4719 days ago | link

:) Thanks for the sympathy, and for the help. I am looking forward to some great times with Arc.

BTW, just looking ahead a bit, is it possible to run Arc on a shared hosting website? Not being mainstream, I don't see hosting services including Arc as an option, so I'd be keen to know if somehow it is technically feasible to set it up on a shared hosting website without having admin access to the box itself. I figure it would probably not be possible, in which case what would be the best options to develop on Arc for shared hosting situations?

-----

3 points by rocketnia 4719 days ago | link

I've been in that boat, wanting to use Arc on a shared host. I ended up choosing to write a static site generator in Arc, which wasn't such a bad way to go. Unfortunately, by the time that generator had few enough hacks and dependencies I was comfortable enough with releasing it, it was in JavaScript! :-p https://github.com/rocketnia/chopsgen/blob/master/chopsgen.j...

Speaking of plugging of my own JavaScript stuff, one way to use (a subset of) Arc with a shared host is to run it client-side with Rainbow.js: https://github.com/rocketnia/rainbow-js

I haven't used Rainbow.js for anything yet myself, and because of that I haven't yet bothered to have it load the standard Arc libraries automatically. Because of that, the barrier to entry is probably pretty high at the moment.

An alternative, older option is Arc-Lite, a project to implement Arc 2 in JS. It was developed back when Arc 3.1 didn't exist. I don't know how usable that is for Arc projects.

-----

1 point by kinleyd 4719 days ago | link

Heh, thanks rocketnia. I did have a feeling it would incline toward client-side Arc in Javascript.

A static site generator in Arc also sounds interesting. I know that's the direction the Jekyll folks have taken, and doing something like Jekyll with Arc generated static code would be of interest to me. Let me tuck away this thought as I get up to speed with core Arc.

-----

1 point by akkartik 4719 days ago | link

Is there an example app that demonstrates how to use it?

-----