Arc Forumnew | comments | leaders | submit | prestonbriggs's commentslogin
1 point by prestonbriggs 5428 days ago | link | parent | on: Dot notation and doc in general

Ah, cool tool. I like it.

Preston

-----

3 points by prestonbriggs 5429 days ago | link | parent | on: Dot notation and doc in general

Offhand, I can think of 3 places where dots are used in Arc. 1) for improper lists (where the cdr of the final cons is not nil), 2) in parameter lists, to indicate that all remaining arguments are to be collected into a list and assigned to a single parameter, and 3) as a syntactic abbreviation. I'm guessing you're referring to the 3rd use, since it's a departure from earlier dialects of Lisp.

When the compiler sees a sequence of non-whitespace characters, it has to decide what it represents. Might be something important like a parenthesis, a character constant, a string, or a number. If it's none of the above, then it's probably a symbol. But before it decides on symbol, it first checks to see if it's a syntactic abbreviation, looking for for one of the special characters: ".", ":", "&", "!", and "~". If any of those are present, then it's some sort of abbreviation and is handled specially; otherwise it's a symbol.

You can search in ac.scm for "ssyntax" to see how things are implemented. You can experiment using "ssexpand".

Usefulness... Saves typing, right? If you want to see the 5th element of a list, you could type fred.5 or (fred 5) Seems natural for strings, tables, etc.

Same for ":". We all know the classical abbreviations like "cadr" and "cddr", but we can also gen up new ones like car:cdr:cdr:cdr:cdr which yields a function like caddddr that we can pass around in a 1st-class way.

Preston

-----


Not for me. Nor does it work with mzscheme. I get the complaint

ac.scm:1023:0: ffi-obj: couldn't get "setuid" from #f (The specified procedure could not be found.; errno=127)

Preston

-----

1 point by waterhouse 5442 days ago | link

That is a known issue with Windows. (I'm guessing it's the reason arc3 is still the "official" version on the install page.) Simple workaround[1]: Find the line that says:

  (define setuid (get-ffi-obj 'setuid #f (_fun _int -> _int)))
and replace it with

  (define (setuid x) x)
I have done this on at least two Windows computers and Arc ran fine afterwards.

[1]Source: http://arclanguage.org/item?id=10625

-----

1 point by prestonbriggs 5442 days ago | link

Got it, thanks.

-----

2 points by ylando 5441 days ago | link

Why arc do not have a normal web page; See:

  http://www.ruby-lang.org/en/
  http://www.python.org/
  http://www.perl.org/
  http://www.erlang.org/
  http://clojure.org/

-----

2 points by akkartik 5441 days ago | link

Because it's unfinished (and may remain so). See http://arclanguage.org and more recently http://news.ycombinator.com/item?id=1525323. No point sucking people in with a normal-looking webpage if the language isn't really ready for production use.

-----

1 point by evanrmurphy 5439 days ago | link

Could you talk about your decision to use it for Readwarp then? If Arc's not really ready for production use, might it still be a good choice for a certain minority of developers?

-----

2 points by akkartik 5439 days ago | link

Yeah, I'm not trying to say you shouldn't use it for production use :)

They're opposing perspectives. As a user of arc I'd throw it into production[1]. At the same time, from PG's perspective I'd want to be conservative about calling it production ready.

I suspect arc will never go out of 'alpha' no matter how mature it gets, just because PG and RTM will not enjoy having to provide support, or having to maintain compatibility.

[1] With some caveats: treat it as a white box, be prepared to hack on its innards, be prepared to dive into scheme and the FFI. And if you're saving state in flat files, be prepared for pain when going from 1 servers to 2.

Not all kinds of production are made the same.

-----