Yup it's with top-of-tree Anarki on github using racket downloaded this weekend (70Mb install) under windows 8. Oh by the way, arc/anarki doesnt seems to run with "Racket minimal" (5Mb install).
I've used both mzc (from racket) and raco.exe, same error message. (I've tried to run create-embedding-executable from repl without success because I've not figured out how to call that correctly.)
Racket/Arc think the symbol is not bound - the symbol being the first symbol in arc.arc coming from scheme (xref disp). It's yet-another error due to namespace+eval I think.
I think it almost works. It creates an exe and calls everything. There is just that namespace thing to fix - hopefully nothing bad gonna happen after that. I've not figured out how to solve this though. Tried many combinations of current-namespace-pass-to-eval...
Wow, that is from before the racket days. Were you trying it with mzc or racket? Were you trying it with arc 3.1? I wonder if the original post was with an earlier version..
"Does Arc 3.1 run properly though on MzScheme 372 or does it need to run on Racket?"
The only problem I've had running on MzScheme 372 is that it can be awkward to track down documentation for that version. Newer versions sometimes have more features available.
Arc doesn't have all the I/O primitives that Racket has -- Racket has an almost ridiculous variety of primitives for file manipulation, sockets, garbage collection, delimited continuations, FFI, concurrency, UI, etc. -- so Arc programmers have often hacked on the language implementation to support their applications. This hacking happens in Racket (aka MzScheme), so having a nice version of Racket is helpful.
I actually thought there were more crucial bug fixes on this branch, like akkartik said, but it seems that the rest of the commits are various improvements to Arc's usability from editors and from the command line.
Here's a holistic summary of the changes, so you don't have to trudge through the commits one by one:
- Adds a CHANGES/ directory which is supposed to host a summary of changes like this one. Anarki's master branch makes use of this directory, but so far it's been neglected on the stable branch. (I should probably add this list to it!)
- Adds an extras/ directory containing Vim and Emacs extensions.
- Adds arc.sh, a nicer way to run Arc from the command line. (Many of the other changes were made to support this.)
That's awesome that you've introduced it to that many people. I haven't really been able to get people interested more than tangentially. Good for you.
>Does Arc 3.1 run properly though on MzScheme 372 or does it need to run on Racket?
I haven't tried running it on MzScheme 372; once I could just use the most recent version of Racket, I decided to just do that. It seems easier than staying on an old version.
zck: I would probably say about ten to fifteen people. I was working on designing a LISP/ML like language which had a lot of similarities to Arc, so I went on a bit of an Arc binge and showed it to a bunch of friends at school. I found that it was a little difficult for some people to set up.
Does Arc 3.1 run properly though on MzScheme 372 or does it need to run on Racket?
Thanks rocketnia - sorry I was afk for a few days. I had no idea that installation details changed. Is it possible to update the instructions on /install? I may update my setup to install racket first. Thanks!
In particular the second issue will cause random failures so it's worth guarding against. The stable branch of anarki has it along with a few other crucial bugfixes to arc 3.1.
Thanks for putting up with the installation instructions you found, and thanks for trying to make life easier for the next person. :)
The instructions at /install are actually more than six years out of date. As of August 2009 (http://arclanguage.org/item?id=10254), Arc officially stopped depending on MzScheme 372. Shortly after that, the official releases of the language ran dry, and the Arc website (this website) entered a more preservational mode of maintenance. It even preserves those obsolete instructions!
Development of Arc continues thanks to unofficial efforts like yours. The most up-to-date material for Arc newcomers is on a community-maintained website: http://arclanguage.github.io/
Interesting. How many people have you gotten into Arc? You mention that you "found it difficult to explain to beginners how to get an Arc REPL up and running".
Arc 3.1 actually doesn't require an old version of mzscheme -- you can just use racket, and start it with `racket -f as.scm`. And no, the instructions on this site don't say anything about that.
Thanks a lot for helping clear that up. Those limitations of Arc are definitely not immediately obvious from reading the docs and essays available on the language.
> So, for Nginx/Apache, are you suggesting Arc might be able to handle uploads if it's sitting behind Nginx/Apache acting as reverse proxy doing buffering?
Nope, that won't help.
> so it's better to have a separate setup of Nginx/Apache (with PHP or whichever) handling file the uploads
That's the easiest approach. Not that you'd need PHP, just pop in a module to handle file uploads for you.
> Or is it more like doing anything with big files in Arc is a no-go
Not Arc as such but the implementation in srv.arc isn't designed for large files. You could read the old MZScheme documentation at http://docs.racket-lang.org/mzscheme/index.html and figure out how to read an input stream into a binary buffer, but it would be more work.
Interesting! Arc is reading the request one character at the time. I think I see where it's happening, in the handle-request-thread function where readc is called.
So, for Nginx/Apache, are you suggesting Arc might be able to handle uploads if it's sitting behind Nginx/Apache acting as reverse proxy doing buffering?
Or is it more like doing anything with big files in Arc is a no-go, so it's better to have a separate setup of Nginx/Apache (with PHP or whichever) handling file the uploads?
Arc handles HTTP requests character by character, which is fine for form submits or REST APIs, but not what you want for handling large binaries.
To be able to handle image uploads directly in Arc, you'd want an HTTP server implementation which supported binary buffers.
But, not everything needs to be implemented directly in Arc. Instead you could use e.g. Ngnix or Apache to handle the image uploads, or upload the images directly to AWS S3 from the browser.
I love Arc as a language. A friend asked me to set up a web board for artists, so I thought it would be nice to work in Arc, and extend news.arc (instead of just using PHP or whatever) with some basic functionality for handling small-to-medium sized images (<1MB per image). However Arc 3.1 (and Rainbow and Anarki) seem to choke on POST requests larger than ~100KB, and become unresponsive afterwards. Would there be some other, more arcish way handling files over network?
There was some discussion recently about running it on OpenShift: http://arclanguage.org/item?id=18900. I also changed some of the documentation/scripts in response. If you wrote up how you did it for some other service after you succeeded, that would be most appreciated.
This is a spec and reference implementation in the really early stages for an assembly language intended to replace javascript as the underlying 'machine code' of the internet, supported by Microsoft, Google, and Mozilla.
It's not much, but they have an sexp. based parser, so it should be at least as easy to build a lisp on top of it as vanilla js.
Can you give more details? Do you have some prior programming experience? Do you mean in-person, in a classroom, online or something else?
I spent some time teaching programming using arc (might not be what you're asking for): http://arclanguage.org/item?id=19039. However, after some time I ended up moving away from arc: http://akkartik.name/post/mu. If you have some programming experience already, though, that might not be for you either.
I think so. I'm primarily familiar with Haskell, but I hope those examples at least work in SML too.
A lot of the syntactic similarity starts to break down once the examples include lambdas, pattern matching, and top-level declarations, but I think that's similar to how the similarity between Lisp dialects breaks down when we look closely enough.
---
"It conflates calling a function (by surrounding it in parentheses) with converting an infix function to prefix."
I was making it look similar to Lisp syntax for the sake of argument, but parentheses aren't actually used like Lisp function calls there. In that example, parentheses are just used for two purposes:
- Grouping.
- Referring to infix variables (+) without applying them, which would otherwise be impossible to do.
The syntax for function application is juxtaposition with left associativity, so "gcd a b" is grouped as "(gcd a) b".
Agda[1] and some notes on Epigram 2[2] track "spines" of elimination contexts for the purposes of type inference and implicit argument elaboration. I think Haskell might use spines to resolve type class instances as well. In that case, the meaning of gcd in ((gcd a) b) can depend on the types known for a and b. With this kind of trick, Haskell's instance resolution can supposedly be used to write what are effectively varargs functions[3].
> In this example, the + and - look like punctuation separating the phrases "gdc a", "b c", and "(square d)", and it takes me a moment to realize "b c" isn't a meaningful expression.
Agreed. This is possibly my main complaint with mixing infix syntax with prefix syntax.
> gcd (a + b) (c - square d) (* ML )
(gcd ((+) a b) ((-) c (square d))) ( ML again *)
This is the same in Haskell^1. But I really dislike how this is done. It conflates calling a function (by surrounding it in parentheses) with converting an infix function to prefix. And if the function is unfamiliar, you don't know which it is. I assume this is taken care of by the parser, so it's into the arbitrariness of syntax, not the clear standard of function application^2.
[1] I assume Haskell got it from ML.
[2] This is unless you assume some insane return type that's basically "if called infix with two arguments, return a number; if called with zero arguments, return a prefix function of two arguments that returns a number".
I prefer the parentheses-based Lisp notation to any notation I've seen that removes them. Perhaps I haven't seen a notation that is simple enough for my taste.
The big benefit that parentheses have is that they make the correct parsing of the text obvious, especially when combined with decent automatic indentation^1. If I never have to read something like `[x * 2 if x % 2 == 0 else x for x in a_list]` or `[x * (2 - x % 2) for x in a_list]` again^2, I'll be thrilled.
So my question is: unless you can make the correct parsing obvious, why skip the parens?