Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Experimental fork of http://arclanguage.org, primarily for keyword args and generic functions

branch: master

stop pretending that this is production-ready

blurb on github used to be: My curated set of patches atop http://arclanguage.org
now it's: Experimental fork of http://arclanguage.org, primarily for keyword args and generic functions
latest commit e34797317a
Kartik Agaram authored
Octocat-spinner-32 www rename webserver dir www November 20, 2010
Octocat-spinner-32 Readme stop pretending that this is production-ready January 07, 2014
Octocat-spinner-32 ac.scm now support nested optionals and keywords -- only in a single destruc… January 07, 2014
Octocat-spinner-32 ac.scm.t Now walk can take a keyword! January 07, 2014
Octocat-spinner-32 app.arc crlf in http headers as required by rfc January 04, 2014
Octocat-spinner-32 arc.arc Now walk can take a keyword! January 07, 2014
Octocat-spinner-32 as.scm reorg and cleanup October 31, 2010
Octocat-spinner-32 blog.arc arc3.1 October 30, 2010
Octocat-spinner-32 brackets.scm arc3.1 October 30, 2010
Octocat-spinner-32 code.arc Now walk can take a keyword! January 07, 2014
Octocat-spinner-32 copyright arc3.1 October 30, 2010
Octocat-spinner-32 form-tests.arc http://github.com/nex3/arc/commit/ce74bfff9d June 25, 2012
Octocat-spinner-32 how-to-run-news news.arc seems to be working November 03, 2010
Octocat-spinner-32 html.arc support for multipart forms and file upload May 28, 2012
Octocat-spinner-32 libs.arc map, reduce, etc. can now handle trees January 04, 2014
Octocat-spinner-32 news.arc . January 05, 2014
Octocat-spinner-32 pprint.arc done converting other arc files to new optional-arg syntax. Arc loads up November 02, 2010
Octocat-spinner-32 prompt.arc undo previous; we need some one-character way to concatenate. 'join' … December 15, 2010
Octocat-spinner-32 queue.arc merge defgeneric and 'extend' into defextend January 04, 2014
Octocat-spinner-32 services.arc . January 04, 2014
Octocat-spinner-32 spliceable-list.arc merge defgeneric and 'extend' into defextend January 04, 2014
Octocat-spinner-32 srv.arc . January 04, 2014
Octocat-spinner-32 state.arc . January 10, 2011
Octocat-spinner-32 strings.arc map, reduce, etc. can now handle trees January 04, 2014
Octocat-spinner-32 tem-report.akkartik bugfix with templates January 04, 2014
Octocat-spinner-32 tree.arc Now walk can take a keyword! January 07, 2014
Readme
An experimental and incompatible fork of the Arc programming language (http://arclanguage.org)

*Important*: If you are running a HN-like site, using this fork will mess up
your data. Talk to me first, and be sure to make a backup.

- Features so far
'$' for escaping to scheme
http://awwx.ws/defarc for making scheme extensible from arc
Dynamic scope: http://awwx.ws/implicit

Extensible coerce (rntz; http://arclanguage.org/item?id=9828)
Macros can be defined in any order.

All functions are generic and can be extended for new conditions
using 'defextend'.
  (Previous discussions: http://arclanguage.org/item?id=11779,
  http://arclanguage.org/item?id=11865, http://arclanguage.org/item?id=13790)

pervasive keyword args. If a function f has params (a b c), (f :c 3 1 2) <=> (f 1 2 3), etc.
BUT this assumes no keyword syms in data:
  arc> (iso :x :x)  # won't work because x is a param of iso

new arglist syntax:
  arc> (def foo (a ? b 34) (list a b))
  arc> (foo 3)
  (3 34)

optional params and keyword args can't be combined with destructuring.

transparent persistence using 'persisted', which can be extended for new
datatypes by supporting the generics 'serialize' and 'unserialize'.

srv:
  parse IP from X-Forwarded-For
  access static subdirectories
  more mime-types, more html attributes, more useful logging
  correctly sends crlf-terminated lines

Bugfixes:
  readline handles empty lines: http://awwx.ws/readline, http://arclanguage.org/item?id=10830
  downcase/upcase on nil return nil: http://arclanguage.org/item?id=10793
  each over tables returns nil

Case can work on lists and other compounds

- Incompatibilities and gotchas
0. temload and temstore are subtly different. If you've been using news.arc
on your own site, make a backup before switching.
1. nil == (); type.nil == nil.
2. Optional args have a new syntax. (a (o b) (o c 3)) => (a ? b nil c 3)
3. some and keep don't testify.
4. Always handle null values when defining a generic
5. srv no longer calls setuid. Run it behind apache or nginx, never as root.
6. thread and new-thread require docstrings, like in autosave-thread in state.arc.
7. case no longer autoquotes: http://arclanguage.org/item?id=13234
8. List operations treat non-lists as degenerate dotted lists by default.
Something went wrong with that request. Please try again.