Design (projects)

Table of Contents

[ dropbox ][ notes, records ][ commonplace ][ Org,Emacs Info ]


A place to start software projects. Mostly shell based, but heck, some python likely.

This idea originated with the manufacture table I started yesterday (6/9/15).

1 dataFlow

From my moleskin notebook today

I'm giving myself the hour to formulate the data structure for a shell function to support the data flow diagram

name () { command args files
         [ | command ... [  ... ] 
         > output ] ; }

 input file ... | -->  ( process ) --> | output file ...
                           ^
                           |
            ( args ) . . . +


 data structure := { table : name + { field } 1,m } 1,N

Since a function may invoke a list of piped commands, each with it's own arguments, some (many) of which are files.

A function is a list of commands

1.1 tables

  1. function

    name commands

  2. command

    name files arguments

  3. process

    name function arguments inputs outputs

1.2 thinking, design

For starters, the rdb /list format looks like a good start

file	function

field name
field commands

file  command

field name
field files
field arguments

file fragment
field name
field function
field arguments
field inputs      # defaults to stdin
field outputs     # defaults to stdout

Let's start with a simple function

function invest_rdb
{
    set -- $(y_m_d $1)
    trace_call $*
    rdb_hdr $(invest_csv);
    lastFid tocancsv $1 | grep -iv 'name/number' | cawk 'NF > 12' | tr , '\t'
}

#+BEGIN_SRC

type fragment
name investhdr
inpt NULL
func rdb_hdr
args $(invest_csv)

type fragment
name lastFidA
inpt $(lastFid)
func tocansv
args $(y_m_d $1)

type fragment
name grepname
args -iv 'name/number'
func grep 

type fragment 
name fGT12
func cawk
args 'NF > 12'

type fragment
name csv2tab
func tr
args , '\t'

Author: Marty

Created: 2015-06-10 Wed 14:13

Emacs 24.4.1 (Org mode 8.2.10)

Validate