Arc Forumnew | comments | leaders | submitlogin
List of Arc Functions and Macros
13 points by dmdavis 6168 days ago | 23 comments
Thought it'd be useful, so I pulled all defs and macs out of arc.arc, and listed them on my site: dyn.dnadavis.net/ArcDocs/

They are listed just by name followed by parameters. If you want more details, expand the node and you can see the actual source for that function or macro. Let me know what else you'd like to see there, and if this is helpful. Some of my immediate plans:

  * add the defs and macs from *.arc
  * put a brief description of each function/macro before the source 
    code
  * maybe actually give the page a bit of design. Probably not. :)


3 points by shiro 6167 days ago | link

Here's another one (work in progress): http://practical-scheme.net/wiliki/arcxref

It might be a bit clumsy for a reference. I'm more interested in the relationship between arg primitives and other Scheme's primitives, to see how pg made design choices differently.

-----

2 points by cpfr 6167 days ago | link

Would you be able to add some of this work as docstrings? If not, would it be alright if I integrated it as such?

-----

1 point by shiro 6167 days ago | link

No problem at all. It's just a wiki so you can also put new stuff there.

-----

5 points by parenthesis 6167 days ago | link

Excellent. But don't forget the xdef'd stuff in ac.scm: (sig (variable), apply, cons, car, cdr, is, ...).

-----

3 points by dmdavis 6167 days ago | link

thanks, I'll look at adding those.

-----

1 point by dmdavis 6166 days ago | link

OK, done.

-----

3 points by nex3 6167 days ago | link

Very cool idea, dmdavis. Would you be willing to integrate this with the docstring support in the Anarkies? It would suck to have documentation in one place but not the other...

-----

1 point by dmdavis 6166 days ago | link

I changed my script that grabs the functions so that it will work with docstrings, but I thought it made more sense to be documenting the main branch rather than the git repo. What do you think?

-----

1 point by nex3 6166 days ago | link

The Git repo is pretty much a superset of arc0, except for a few bugfixes here and there. Plus if we're going to actually add docstrings to the code, the only way to do that would be to commit them to the repo.

I think it would make the most sense to just document the Git repo and make a note in the documentation that it's not identical to arc0.

-----

1 point by dmdavis 6165 days ago | link

Yeah, that makes sense. The page is now showing all info from the Git repo.

-----

1 point by byronsalty 6168 days ago | link

This is awesome. Some thoughts:

alphabetize?

I believe someone else has already put in descriptions of all methods as well - maybe you won't have to write them yourself.

When you add defs and macs from other .arc files please split them up by source file (and ideally have an "all").

-----

2 points by dmdavis 6164 days ago | link

I added search capabilities. Just type a query in the text box, press enter, and it will return all functions/macros/xdefs that contain that string.

-----

2 points by tlrobinson 6167 days ago | link

Very nice.

It would be helpful if there was an "expand all" button to show all the function/macro names so I could search them.

-----

1 point by dmdavis 6166 days ago | link

OK, I've made a few changes, let me know what you think.

  *I put everything into one tree, with a node for each file
  *I alphabetized everything, except arc.arc is the first file listed.
  *I added the xdefs from ac.scm
  *I added a button to expand all the tree (except the source code) so that it's easier to search

-----

1 point by dmdavis 6168 days ago | link

I was going to alphabetize, but then I thought that it might be good to see them in the order they are defined in the file. I'll have to make an option to sort them.

-----

3 points by greatness 6167 days ago | link

Different styles of organization would be nice:

* Category (input/output, list functions, etc.)

* Function or Macro (Split them up and alphabetize them)

* Alphabetical (all in one giant alphabetical list.)

* By file (arc.arc, app.arc, etc.)

You're already doing a combination of two of these, but you should give them as separate options; or perhaps keep what you have and just add all these options. Shouldn't be that hard if you keep all the definitions in a database, with the information required to do this.

-----

2 points by dpawson 6167 days ago | link

Isn't this what Paul should be doing to define the language?

-----

1 point by NickSmith 6167 days ago | link

This is really useful. Thank you.

-----

1 point by dmdavis 6168 days ago | link

OK, I've added the defs and macs for *.arc. Any thoughts on a better way to present this info?

-----

1 point by cpfr 6168 days ago | link

How would I be able to start adding documentation to some of those functions and macros?

-----

1 point by dmdavis 6167 days ago | link

I'm not sure yet. I wrote a script that generates all the code from the .arc files, so it would be tricky to throw the docs in there. What may be best would be to use the docstrings that someone has added once they become part of the main release, and I'll change my script to grab those?

-----

1 point by ryantmulligan 6167 days ago | link

I think the best way would be to use that docstrings patch and then just pull the docstrings.

-----

1 point by verec 6168 days ago | link

isnt is but is isnt ...

-----