emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Re: From state table to state diagram
Date: Sat, 25 Sep 2010 09:40:47 +0200	[thread overview]
Message-ID: <AANLkTimO9ONx5Z=uMuT8ek+Q0OHfZB_NgfmVEBjcHTJw@mail.gmail.com> (raw)
In-Reply-To: <i7fq5l$p6k$1@dough.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3294 bytes --]

Hi

I really like the idea of this conversion from a State Transition Table to a
State Transition Diagram as it is much easier to make a table then a graph.
Unfortunately I don't know enough of python to help here.
Could you please publish your solution here (and on worg) as it would be a
very useful addition to org.

Cheers,

Rainer


On Thu, Sep 23, 2010 at 5:02 PM, Gary <emacs-orgmode@garydjones.name> wrote:

> Sorry, I've been rather lax on this :( I got dragged onto other stuff,
> went on training courses, and all sorts of other things.
>
> Eric Schulte wrote:
> > Babel does support generating diagrams with graphviz via "dot" code
> > blocks.  Babel is also capable of converting Org-mode tables to list
> > objects in a number of languages, so I'd recommend writing a table->dot
> > script in your favorite language, and then using babel to handle the
> > coordination and Org-mode integration.
>
> That's all very easy for you to say :))
>
> > I'm happy to help in this regard, the first step would be something like
> > the following example which assumes python is your preferred scripting
> > language (as you can see I have no idea what your state table may look
> > like)...
>
> Well, wikipedia suggests the following[1] (and goes into further detail
> as well[2])
>    | Current State -> | State | State | State |
>    | Input   v        |   A   |   B   |   C   |
>    |------------------+-------+-------+-------|
>    | x                |   B   | ...   | ...   |
>    | y                | ...   |   C   | ...   |
> which basically says that when the machine is in State A and receives
> 'x' then it transitions to State B, and when it receives a 'y' in State
> B it transitions to State C.
>
> > #+results: state-table
> > | 1 | 2 |
> > | 3 | 4 |
> >
> > #+source: table-to-dot
> > #+begin_src python :var table=state-table
> >   python code here
>
> Okay. What should this python code here do? :) I know, it converts a
> table to dot-script, but are there any examples I could look at which
> take a table as input and output something (anything), just so I can see
> how the python code should expect its input?
>
> > #+end_src
> >
> > #+begin_src dot :var text=table-to-dot(table=state-table)
> >   graph{
> >     $text
> >   }
> > #+end_src
> >
> > Once this is working I think it could make a great addition to the
> > library of babel [1] (a collection of generally useful code blocks).
>
> Sure :)
>
> [1]
> http://en.wikipedia.org/wiki/Finite-state_machine#Concepts_and_vocabulary
> [2] http://en.wikipedia.org/wiki/State_transition_table
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>



-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 4598 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2010-09-25  7:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24 10:38 Gary
2010-08-24 11:03 ` Eric S Fraga
2010-08-24 11:24   ` Gary
2010-08-24 11:25   ` Eric S Fraga
2010-08-24 12:06     ` Gary
2010-08-24 23:28       ` Eric S Fraga
2010-08-25  0:33       ` Eric Schulte
2010-09-23 15:02         ` Gary
2010-09-24 10:00           ` Dan Davison
2010-09-25  7:40           ` Rainer M Krug [this message]
2010-09-27  6:27             ` Gary
2010-09-27 15:21               ` Mark Elston
2010-09-28 14:04               ` Rainer M Krug
2010-11-24  1:25                 ` Vladimir Alexiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimO9ONx5Z=uMuT8ek+Q0OHfZB_NgfmVEBjcHTJw@mail.gmail.com' \
    --to=r.m.krug@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Re: From state table to state diagram' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).