three months of coastal living: coastML at three months

Today marks three months of coastal living; let’s checkout the running burndown chart:

I still enjoy skipping stones in the shallow tide waters, even if work has taken more of my time than it normally would. I think the most interesting thing is that I changed the syntax of type forms to be simpler, and set the stage for parsing is more easily. We now have a Basis library started, which includes Daffodil, the start of a native coastML JSON parser ported from my RoseJSON system. Work this month focused around some simple fixes to the Python code generator as well, but now we can nicely parse & generate type forms:

% ./carpet.py load basis/Daffodil.coast
main ['./carpet.py', 'load', 'basis/Daffodil.coast']
loading: basis/Daffodil.coast
type Daffodil
| Assoc is [array[string] array[Daffodil]]
| Array is [array[Daffodil]]
| Int is [int]
| Float is [float]
| Null
| Bool is [bool]
| String is [string]
epyt
% ./carpet.py python basis/Daffodil.coast
main ['./carpet.py', 'python', 'basis/Daffodil.coast']
pythonizing: basis/Daffodil.coast
class Daffodil:
    pass
@dataclass
class Daffodil_Assoc(Daffodil):
    m_0 : list
    m_1 : list
@dataclass
class Daffodil_Array(Daffodil):
    m_0 : list
@dataclass
class Daffodil_Int(Daffodil):
    m_0 : int
@dataclass
class Daffodil_Float(Daffodil):
    m_0 : float
@dataclass
class Daffodil_Null(Daffodil):
    pass
@dataclass
class Daffodil_Bool(Daffodil):
    m_0 : bool
@dataclass
class Daffodil_String(Daffodil):
    m_0 : str

You might also notice one other difference…​ we can now call carpet.py from the command line. I added a simple help system and a few commands to get started:

% ./carpet.py
main ['./carpet.py']
usage: carpet.py [command] [file]
commands:
load - load a file, and dump the resulting coastML
python - dump python from a coastML file, without the compiler
cpython - dump python from a coastML file, with the compiler
note, the last two will be merged at some point