Erlang Development Environment

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang Development Environment

chandru
Good one Sean!! I like it!

cheers,

> -----Original Message-----
> From: Sean Hinde [mailto:Sean.Hinde]
> OK, Here it is..
>
> code_finder:start(). to start. Hit "Update", wait for a
> minute or so and
> then you can search away in all exported functions in your path.
>
> e.g.
>
> mnesia - greps all functions with mnesia anywhere in the
> module or function
> name
> mnesia: - lists only functions exported from the mnesia module
> mnesia:dirty - lists all functions exported from mnesia containing the
> string "dirty"
> mnesia:dirty/1 - lists all functions exported from mnesia
> containing the
> string dirty of arity 1.
>
> Hit Return or click Find to search.
>
> If anyone finds any bugs or finds the TODO items so annoying they feel
> inspired to implement them then be my guest - please just let me know.
>
> Enjoy!
>
> - Sean
>
> P.S It would have been somewhat quicker to write if the docs for the
> Abstract form and its toolset were a little more informative :)
>



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.



Reply | Threaded
Open this post in threaded view
|

Erlang Development Environment

Peter Andersson

Chandrashekhar Mullaparthi wrote:
>
> Good one Sean!! I like it!


Sucking up to the boss, are we!?  :-)

Seriously, I also liked it a lot - very useful! Thanks Sean! An improvement
would perhaps be the possibility to save the retrieved data (from an update) to
file so that you don't have to collect the info from scratch every time you
start the program. I suppose using e.g. dets, it would be quite a quick thing to
implement?

While we're on the subject of easy access to documentation... I've sometimes
found it useful to be able to view Erlang man pages from the Erlang shell. I
wrote a very simple program the other day that either prints a page to stdout or
lets you perform some string searching within a page. If anyone's interested
I'll post it.

Regards

  /Peter


> > -----Original Message-----
> > From: Sean Hinde [mailto:Sean.Hinde]
> > OK, Here it is..
> >
> > code_finder:start(). to start. Hit "Update", wait for a
> > minute or so and
> > then you can search away in all exported functions in your path.
> >
> > e.g.
> >
> > mnesia - greps all functions with mnesia anywhere in the
> > module or function
> > name
> > mnesia: - lists only functions exported from the mnesia module
> > mnesia:dirty - lists all functions exported from mnesia containing the
> > string "dirty"
> > mnesia:dirty/1 - lists all functions exported from mnesia
> > containing the
> > string dirty of arity 1.
> >
> > Hit Return or click Find to search.
> >
> > If anyone finds any bugs or finds the TODO items so annoying they feel
> > inspired to implement them then be my guest - please just let me know.
> >
> > Enjoy!
> >
> > - Sean
> >
> > P.S It would have been somewhat quicker to write if the docs for the
> > Abstract form and its toolset were a little more informative :)
> >
>
> NOTICE AND DISCLAIMER:
> This email (including attachments) is confidential.  If you have received
> this email in error please notify the sender immediately and delete this
> email from your system without copying or disseminating it or placing any
> reliance upon its contents.  We cannot accept liability for any breaches of
> confidence arising through use of email.  Any opinions expressed in this
> email (including attachments) are those of the author and do not necessarily
> reflect our opinions.  We will not accept responsibility for any commitments
> made by our employees outside the scope of our business.  We do not warrant
> the accuracy or completeness of such information.

--
 ?--? ? - ? ?-?     ?--? ? ?--? ?--? ?     ?- -? -?? ? ?-? ??? ??? --- -?  
                      Peter "Peppe" Andersson                              
               Ericsson Systems Expertise Ltd, Ireland
                                   
   address: Ericsson Software Campus   address: Apartment No 43            
   (work)   Athlone, Co. Westmeath     (home)   Irishtown Central
                                                Athlone, Co. Westmeath
   fax:   +353 902 31304
   phone: +353 902 31784               phone(mobile): +353 86 815 3813

                 email: Peter.Andersson

    ~ Anthony's Law of Force: "Do not force it, get a larger hammer" ~
 ?--? ? - ? ?-?     ?--? ? ?--? ?--? ?     ?- -? -?? ? ?-? ??? ??? --- -?


Reply | Threaded
Open this post in threaded view
|

Erlang Development Environment

Ulf Wiger-4
On Fri, 9 Mar 2001, Peter Andersson wrote:

>While we're on the subject of easy access to documentation... I've
>sometimes found it useful to be able to view Erlang man pages from
>the Erlang shell.

Perhaps you could fix the man.erl program in the gs examples while
you're at it. It seems to have rotted a bit.

With the following, it will at least display man pages. Unfortunately,
they're not properly formatted. I'll leave that for someone else to
play with.

/Uffe

> diff man.erl
/OTP/.../lib/gs-1.3.7/examples/src/man.erl
89c89
<     sort(FirstList).
---
>     sort(check_4_last(FirstList)).
90a91,98
> check_4_last([]) -> [];
> check_4_last([H|T]) ->
>     case catch(get_4_last(reverse(H))) of
>       [46,116,120,116] -> % ".txt"
>           [remove_4_last(H)|check_4_last(T)];
>       Any ->
>           check_4_last(T)
>     end.
91a100,101
> get_4_last([H1,H2,H3,H4|T]) ->
>     [H4,H3,H2,H1].
92a103,106
> remove_4_last(Str) ->
>     reverse(tl(tl(tl(tl(reverse(Str)))))).
>
>
98c112
<     Filename = filename:join(dirManual(), Page),
---
>     Filename = lists:flatten([dirManual(),Page,".txt"]),



/Uffe
--
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




Reply | Threaded
Open this post in threaded view
|

Speaking of documentation

Niclas Eklund-2
In reply to this post by chandru


Hello!

Have anyoune looked att Doxygen?

http://www.stack.nl/~dimitri/doxygen/

Distributed under GNU General Public License.

Supports C++, Java, IDL (Corba, Microsoft and KDE-DCOP flavors) and C.
Would be rather nice to be able to use the same tool for all languages one
uses (I cannot, however, come up with a single reason for using any other
language than Erlang ;-).

I quote Doxygen's homepage:

"It can help you in three ways:

    1.It can generate an on-line documentation browser (in HTML) and/or an
off-line reference manual (in  ) from a set of documented source files.
There is also support for generating output in RTF (MS-Word),
      Postscript, hyperlinked PDF, compressed HTML, and Unix man pages.
The documentation is extracted directly from the sources, which makes it
much easier to keep the documentation consistent with the source
      code.
    2.Doxygen can be configured to extract the code structure from
undocumented source files. This can be very useful to quickly find your
way in large source distributions. The relations between the various
      elements are be visualized by means of include dependency graphs,
inheritance diagrams, and collaboration diagrams, which are all generated
automatically.
    3.You can even `abuse' doxygen for creating normal documentation (as I
did for this manual).

Doxygen is developed under Linux, but is set-up to be highly portable. As
a result, it runs on most other UNIX flavors as well. Furthermore, an
executable for Windows 9x/NT is also available."


/Nick



> Chris Pressey (cpressey) wrote:
>> Is there a supported "autodoc" facility for Erlang, where one can write
>> documentation embedded in comments in the code, which is then extracted
>> and processed into 'formal' documentation in HTML (or whatever)?
>>
>> I've noticed some unexplained comment sentinels in various sources, but
>> I've also noticed that the documentation and code are in seperate files
>> for all of the library modules I've looked into so far.
>
>We are using a very simple in-house documentation tool that produces
>Latex documentation of the code.
>
>Maybe we should release this tool if you that it could serve as a basis
>for further improvement.
>
>I am also looking seriously at CCviewer: It might be great to integrate
>such a doc tool with Ulf Wiger's source code browser.
>
>I must dig deeper to see if/how this could be feasible.
>
>--
>Micka?l R?mond





Reply | Threaded
Open this post in threaded view
|

Speaking of documentation

Mickael Remond-2
Niclas Eklund (nick) wrote:
>
>
> Hello!
>
> Have anyoune looked att Doxygen?
>
> http://www.stack.nl/~dimitri/doxygen/

We are planning to release our in-house auto-documentation tool
tomorrow.

For the moment it only produce latex output.
We are hoping to add an HTML-hyperlinked result soon.

The principle is very simple: You store information into the comments
with a specific syntax. The comments are parsed to produce the resulting
documentation.

Here are the information we are managing by putting comments in our
source code:
On the module level, we use such comments:
%%----------------------------------------------------------------------
%% HEADER xmnesia
%% COPYRIGHT IDEALX (C) 2000
%% PURPOSE Implements a hierarchical database
%% DESCRIPTION This is the main module for the core of the hierarchical
%%   database.
%%----------------------------------------------------------------------

We are also extracting author, version, and last_modif date from the
Erlang module directive (-author, -vsn, and -last_modified).
We keep the separation with other information because we want those
three specific information to be accessible with the module_info()
function.

On the function level, we use such standard comments:
%%----------------------------------------------------------------------
%% FUNCTION new_element/4
%% PURPOSE Creates a new element in the document.
%% ARGUMENTS
%%   Name         -- String()
%%   DocId        -- doc_id()
%%   Value        -- term()
%%   Attributes   -- term()
%% RETURN VALUE elt_id() | {error, Reason}
%% DESCRIPTION
%%  Extra comments can be put here, if needed.  
%% SEE ALSO
%%   xm_entry:element/4, new_document/1
%%----------------------------------------------------------------------


Maybe in a futur version we will include a way to merge information with
the cross reference tool.

--
Micka?l R?mond