Arc Forumnew | comments | leaders | submitlogin
Starting up with Arc
3 points by edeion 5594 days ago | 14 comments
I already feel sorry for such a dumb question. Anyway, are any of you using Arc under Debian? How did you install it? I quickly went through the forum, gave a glance at arcfn and googled around but found no clue. I read PG's install guide, though, but Debian no longer has MzScheme in its repositories, PLT Scheme's version is far newer than 372 and I can't find older versions.

Well, I'm not asking for a full guide to get Arc running, but some indications on the way you bring it up could help me much.

(By the way, I find the intentions behind Arc awesome.)



7 points by fallintothis 5594 days ago | link

The link to "Other Versions" on PLT's main download page is a bit non-obvious, but it's there: http://download.plt-scheme.org/all-versions.html

I'm guessing v372 for Ubuntu probably works on Debian, since they're largely similar. If it doesn't, I've been running v360 on squeeze and haven't noticed any issues with arc3. Failing either of these, you could build v372 yourself.

Once MzScheme is installed, there's not much to do about Arc that's not already on http://www.arclanguage.org/install. You might consider aliasing it in your .bashrc (or whatever), and I recommend using rlwrap. e.g.,

  alias arc='cd ~/arc3; rlwrap mzscheme -m -f as.scm'
Good luck!

-----

2 points by palsecam 5594 days ago | link

I confirm: v372 for Ubuntu works also with Debian Squeeze (testing) i686, without modification (I run it).

Direct link: http://download.plt-scheme.org/plt-372-bin-i386-linux-ubuntu....

Actually it's not a .deb package to install with dpkg, it's a self-installer.

-----

2 points by edeion 5593 days ago | link

Thanks palsecam! (btw, are you French?)

I would add (for other potential readers) that it is a very neat self-installer that makes it possible to install in user directory (so that it doesn't spread on the whole system).

What's more, this i386 version worked smoothly despite my amd64 kernel.

-----

1 point by palsecam 5593 days ago | link

Yes I'm French. How did you guess? The username?

Good to know it works without problem on x64. Thanks for this precision and good luck with Arc!

-----

1 point by edeion 5592 days ago | link

Right, the username. Someone who figured out I was French (a space slipped before a question mark) on a lisp-related IRC chan told me there were many French Lispers. I wonder how many we actually are.

-----

1 point by conanite 5592 days ago | link

Hey, I live in Paris ... are any of you nearby? Who wants to meet up in the real world?

-----

2 points by edeion 5592 days ago | link

In Paris too, and I'd be glad to meet some other lispers. Especially since I'm still in the early process of learning Lisp. But I guess we should find another way of dealing with IRL meetings than the forum...

-----

1 point by conanite 5592 days ago | link

to borrow an idiom, (prn "conan" #\@ "conandalton.net")

-----

1 point by palsecam 5592 days ago | link

Mine is in my profile.

-----

4 points by Arubis 5589 days ago | link

If you're running your 'arc' alias from TextMate or the like, this won't much matter, but if you're just executing in Bash, something like:

  alias arc='pushd ~/arc3; rlwrap mzscheme -m -f as.scm ; popd'
...will return you to the directory from whence you came. Which is nice.

-----

1 point by palsecam 5588 days ago | link

Oh yes, I didn't remember of pushd/popd!

Really handy in this case.

Thanks for the tip!

-----

2 points by edeion 5594 days ago | link

Great! Thank you so much, I indeed missed the link on PLT's download page. I'll try it as soon as I'm back home (I can't wait). And thanks for the rlwrap tip too!

-----

3 points by zhtw 5594 days ago | link

If you're interested here is my startup script. It defines "import" macro which is the same as "load" but path is treated related to arc base prefix. "arc" is the startup script itself. Options -l allows to load arc-file before prompth. "boot.scm" is my replacement for as.scm.

arc: #!/bin/sh

  mzscheme=/usr/local/mzscheme372/bin/mzscheme
  pkgbase=/home/avl/pkg

  prog=""

  while [ "$#" -gt 0 ]; do
    if [ "x$1" = "x-l" ]; then
      shift
      [ -f "$1" ] || { echo "No such file ($1)"; exit 1; }
      loadstr="$loadstr (load \"$1\")"
      shift
    else
      [ -f "$1" ] || { echo "No such file ($1)"; exit 1; }
      prog="$1"
      shift
    fi
  done

  if [ -z "$prog" ]; then
    ( echo "$loadstr"; cat; echo " (quit)" ) |
      ( "$mzscheme" -m -f "$pkgbase/arc/boot.scm"; echo )
  else
    ( echo "$loadstr"; echo "(load \"$prog\") (quit)"; ) |
      exec "$mzscheme" -m -f "$pkgbase/arc/boot.scm"
  fi
boot.scm:

  (require mzscheme) ; promise we won't redefine mzscheme bindings

  (define arcbase "/home/avl/pkg/arc/arc3")
  (define arclibs "/home/avl/pkg/arc/lib")

  (define current-dir (path->string (current-directory)))
  (current-directory arcbase)

  (require "arc3/ac.scm") 
  (require "arc3/brackets.scm")
  (use-bracket-readtable)

  (aload "arc.arc")
  (aload "libs.arc") 

  ;(xdef 'curdir current-directory)
  ;(xdef 'pkgbase arclibs)

  (current-directory "/home/avl/pkg/arc")
  (aload "init.arc")
  (current-directory current-dir)

  (tl)
init.arc:

  (load "import.arc")
import.arc:

  ; import is the the same as load but path is threated related to pkgbase

  (def namechain->path (l)
    (tostring (each x l (pr "/" x))))

  (mac import namechain
    `(load (string pkgbase (namechain->path ',namechain) ".arc")))

  ; (import sys stream) -- that's my personal stuff.
So you just need to substitute /home/avl/pkg/arc with the path where your arc3 dir is placed.

And one last thing. If you install rlfe it's convenient to rename "arc" to "real-arc" and start it by "/usr/bin/rlfe real-arc" from "arc".

Hope this will be usefull.

-----

1 point by edeion 5592 days ago | link

Thank you! I'm not using it right now, but it may come in handy sooner or later.

-----