<br><br><div class="gmail_quote">On Wed, May 25, 2011 at 7:46 AM, Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com">watson.timothy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> Unfortunately information about individual functions is<br>
> scattered all over the place. I want the source, the type signature,<br>
> the documentation. These are available in a variety of different<br>
> formats in different places. Documentation is in untagged comments<br>
> in @tagged edoc format or in XML in a completely different file.<br>
<br>
</div>Yes, this is a really important part of it. Being able to slurp in<br>
Erlang projects from the file system (and github, etc), access all<br>
this information and provide it in a searchable fashion would<br>
*already* put us way ahead of the crowd in terms of discovery.<br>
<div class="im"><br>
> Silly design question: if multiple people can edit (say) a wiki<br>
> of functions what formatting standards should be enforced?<br>
><br>
> - the last person who edited the text<br>
> - some "moderator" (who)<br>
> - by a pretty printer<br>
> (is there a *really good* pp? - with color syntax marking)<br>
<br>
</div>I think there are reasonable ones around. Take a look at<br>
<a href="http://tidier.softlab.ntua.gr:20000/tidier/getstarted" target="_blank">http://tidier.softlab.ntua.gr:20000/tidier/getstarted</a>. I would also<br>
propose that you let the viewer configure the pp to their own<br>
preferences. Given that you're actually storing abstract code (or AST<br>
or something like that) rather than lines of source code anyway, this<br>
is just human readable representation after all. Let people view with<br>
whatever (potentially hideous) whitespace &c convention they like.<br></blockquote><div><br>Very interesting idea - there was once a pascal pretty printer that analysed your code<br>and inferred the style that you preferred - "Umm this guy likes semi-colons at the end of<br>
line ..." they in applied it to code you hadn't written.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
>> I'm guessing this will require patching the compiler to preserve the<br>
>> type specs in the beam code. That is something I would need help with,<br>
>> but may be trivial for others.<br>
><br>
> Easy - it is there already (I think) poke around in beam_lib.erl<br>
> this analyses the .beam files.<br>
><br>
<br>
</div>I was pretty sure this wasn't the case. I'll dig in to beam_lib at<br>
lunch time and have another look.<br>
</blockquote></div><br>