Arc Forumnew | comments | leaders | submitlogin
2 points by shader 4994 days ago | link | parent

Arc already supports docstrings, and has a built in function 'help that displays them, along with the signature of the function and the filename in which the function was defined. The help information can also be accessed from an op when the arc server is running, but I'm not sure how much of that functionality is Anarki specific. There is also 'sig that displays the signature of a given function, 'fns that searches for a given function name in the list of presently defined functions, and on Anarki there's also 'src that prints out the source of a given function or macro. Unfortunately, Anarki's ppr is currently broken because len no longer works for improper lists.

I've been interested for a long time in runtime accessible automatic documentation, and 'src and 'help go a long way towards providing that. One of the few things I think we still need in that regard for runtime documentation is a means of searching for fns by category, and that will probably involve either adding tags to the docstring, or searching the code for a given pattern. Having the source of a function stored in a table at runtime is incredibly useful, and could allow you to search for all functions that call a given function or macro, or that use a particular idiom.



2 points by aw 4994 days ago | link

Arc already supports docstrings

Actually docstrings are an Anarki enhancement.

-----

1 point by SteveMorin 4993 days ago | link

a key Anarki enhancement. Does anyone know if Anarki has keyword arguments too?

-----

1 point by SteveMorin 4993 days ago | link

I agree searching by category would be pretty useful I am going to have to use anarki more and switch from the official version

-----