Skip to content

Commit

Permalink
0.0.3: marsh to frosty
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jun 2, 2020
1 parent 18ce5be commit 1a92c00
Show file tree
Hide file tree
Showing 9 changed files with 663 additions and 535 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# marsh
# frosty
_experimental_ marshalling of native Nim objects via streams, channels

- `cpp +/ nim-1.0` [![Build Status](https://travis-ci.org/disruptek/marsh.svg?branch=master)](https://travis-ci.org/disruptek/marsh)
- `arc +/ cpp +/ nim-1.3` [![Build Status](https://travis-ci.org/disruptek/marsh.svg?branch=devel)](https://travis-ci.org/disruptek/marsh)
_it's like Python's pickle, but, y'know, **cooler*_

- `cpp +/ nim-1.0` [![Build Status](https://travis-ci.org/disruptek/frosty.svg?branch=master)](https://travis-ci.org/disruptek/frosty)
- `arc +/ cpp +/ nim-1.3` [![Build Status](https://travis-ci.org/disruptek/frosty.svg?branch=devel)](https://travis-ci.org/disruptek/frosty)

## Goals

Expand All @@ -21,25 +23,25 @@ structures in 1.5s on my machine.
It currently looks like this:

```nim
import marsh
import frosty
var
data = someArbitraryDataFactory()
handle = openFileStream("somefile", fmWrite)
writeThing(handle, data)
close handle
handle.freeze(data)
handle.close
```

and then

```nim
import marsh
import frosty
var
data: SomeArbitraryType
handle: openFileStream("somefile", fmRead)
readThing(handle, data)
close handle
handle = openFileStream("somefile", fmRead)
handle.thaw(data)
handle.close
```

Zevv gave me the idea to provide a `channels` API as well, so that's something
Expand All @@ -49,11 +51,11 @@ require a copy...
## Installation

```
$ nimph clone disruptek/marsh
$ nimph clone disruptek/frosty
```
or if you're still using Nimble like it's 2012,
```
$ nimble install https://github.com/disruptek/marsh
$ nimble install https://github.com/disruptek/frosty
```

## Documentation
Expand All @@ -64,8 +66,8 @@ I'm going to try a little harder with these docs by using `runnableExamples`
so the documentation demonstrates _current_ usage examples and working tests
despite the rapidly-evolving API.

[See the documentation for the marsh module as generated directly from the
source.](https://disruptek.github.io/marsh/marsh.html)
[See the documentation for the frosty module as generated directly from the
source.](https://disruptek.github.io/frosty/frosty.html)

## License
MIT
134 changes: 102 additions & 32 deletions docs/marsh.html → docs/frosty.html

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/frosty.idx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
frostyMagic frosty.html#frostyMagic frosty: frostyMagic
FreezeError frosty.html#FreezeError frosty: FreezeError
ThawError frosty.html#ThawError frosty: ThawError
greatenIndent frosty.html#greatenIndent.t,Serializer,untyped frosty: greatenIndent(s: var Serializer; body: untyped): untyped
debung frosty.html#debung.t,Serializer,string frosty: debung(s: Serializer; msg: string): untyped
freeze frosty.html#freeze,T,Stream frosty: freeze[T](o: T; stream: Stream)
freeze frosty.html#freeze,T,string frosty: freeze[T](o: T; str: var string)
freeze frosty.html#freeze,T frosty: freeze[T](o: T): string
thaw frosty.html#thaw,Stream,T frosty: thaw[T](stream: Stream; o: var T)
thaw frosty.html#thaw,string,T frosty: thaw[T](str: string; o: var T)
thaw frosty.html#thaw,string frosty: thaw[T](str: string): T
7 changes: 0 additions & 7 deletions docs/marsh.idx

This file was deleted.

44 changes: 31 additions & 13 deletions docs/theindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,51 +72,69 @@
<div class="document" id="documentId">
<div class="container">
<h1 class="title">Index</h1>
Modules: <a href="marsh.html">marsh</a>, <a href="swamp.html">swamp</a>.<br/><p /><h2>API symbols</h2>
Modules: <a href="frosty.html">frosty</a>, <a href="marsh.html">marsh</a>.<br/><p /><h2>API symbols</h2>
<dl><dt><a name="debung" href="#debung"><span>debung:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: debung(s: Serializer; msg: string): untyped" href="frosty.html#debung.t%2CSerializer%2Cstring">frosty: debung(s: Serializer; msg: string): untyped</a></li>
<li><a class="reference external"
data-doc-search-tag="marsh: debung(s: Serializer; msg: string): untyped" href="marsh.html#debung.t%2CSerializer%2Cstring">marsh: debung(s: Serializer; msg: string): untyped</a></li>
</ul></dd>
<dt><a name="freeze" href="#freeze"><span>freeze:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: freeze[T](o: T): string" href="frosty.html#freeze%2CT">frosty: freeze[T](o: T): string</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: debung(s: Serializer; msg: string): untyped" href="swamp.html#debung.t%2CSerializer%2Cstring">swamp: debung(s: Serializer; msg: string): untyped</a></li>
data-doc-search-tag="frosty: freeze[T](o: T; stream: Stream)" href="frosty.html#freeze%2CT%2CStream">frosty: freeze[T](o: T; stream: Stream)</a></li>
<li><a class="reference external"
data-doc-search-tag="frosty: freeze[T](o: T; str: var string)" href="frosty.html#freeze%2CT%2Cstring">frosty: freeze[T](o: T; str: var string)</a></li>
</ul></dd>
<dt><a name="FreezeError" href="#FreezeError"><span>FreezeError:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: FreezeError" href="frosty.html#FreezeError">frosty: FreezeError</a></li>
</ul></dd>
<dt><a name="frostyMagic" href="#frostyMagic"><span>frostyMagic:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: frostyMagic" href="frosty.html#frostyMagic">frosty: frostyMagic</a></li>
</ul></dd>
<dt><a name="greatenIndent" href="#greatenIndent"><span>greatenIndent:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="marsh: greatenIndent(s: var Serializer; body: untyped): untyped" href="marsh.html#greatenIndent.t%2CSerializer%2Cuntyped">marsh: greatenIndent(s: var Serializer; body: untyped): untyped</a></li>
data-doc-search-tag="frosty: greatenIndent(s: var Serializer; body: untyped): untyped" href="frosty.html#greatenIndent.t%2CSerializer%2Cuntyped">frosty: greatenIndent(s: var Serializer; body: untyped): untyped</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: greatenIndent(s: var Serializer; body: untyped): untyped" href="swamp.html#greatenIndent.t%2CSerializer%2Cuntyped">swamp: greatenIndent(s: var Serializer; body: untyped): untyped</a></li>
data-doc-search-tag="marsh: greatenIndent(s: var Serializer; body: untyped): untyped" href="marsh.html#greatenIndent.t%2CSerializer%2Cuntyped">marsh: greatenIndent(s: var Serializer; body: untyped): untyped</a></li>
</ul></dd>
<dt><a name="magic" href="#magic"><span>magic:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="marsh: magic" href="marsh.html#magic">marsh: magic</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: magic" href="swamp.html#magic">swamp: magic</a></li>
</ul></dd>
<dt><a name="readThing" href="#readThing"><span>readThing:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="marsh: readThing[T](stream: Stream; o: var T)" href="marsh.html#readThing%2CStream%2CT">marsh: readThing[T](stream: Stream; o: var T)</a></li>
<li><a class="reference external"
data-doc-search-tag="marsh: readThing[T](str: string; o: var T)" href="marsh.html#readThing%2Cstring%2CT">marsh: readThing[T](str: string; o: var T)</a></li>
</ul></dd>
<dt><a name="thaw" href="#thaw"><span>thaw:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: thaw[T](stream: Stream; o: var T)" href="frosty.html#thaw%2CStream%2CT">frosty: thaw[T](stream: Stream; o: var T)</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: readThing[T](stream: Stream; o: var T)" href="swamp.html#readThing%2CStream%2CT">swamp: readThing[T](stream: Stream; o: var T)</a></li>
data-doc-search-tag="frosty: thaw[T](str: string): T" href="frosty.html#thaw%2Cstring">frosty: thaw[T](str: string): T</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: readThing[T](str: string; o: var T)" href="swamp.html#readThing%2Cstring%2CT">swamp: readThing[T](str: string; o: var T)</a></li>
data-doc-search-tag="frosty: thaw[T](str: string; o: var T)" href="frosty.html#thaw%2Cstring%2CT">frosty: thaw[T](str: string; o: var T)</a></li>
</ul></dd>
<dt><a name="ThawError" href="#ThawError"><span>ThawError:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="frosty: ThawError" href="frosty.html#ThawError">frosty: ThawError</a></li>
</ul></dd>
<dt><a name="writeThing" href="#writeThing"><span>writeThing:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="marsh: writeThing[T](stream: Stream; o: T)" href="marsh.html#writeThing%2CStream%2CT">marsh: writeThing[T](stream: Stream; o: T)</a></li>
<li><a class="reference external"
data-doc-search-tag="marsh: writeThing[T](str: var string; o: T)" href="marsh.html#writeThing%2Cstring%2CT">marsh: writeThing[T](str: var string; o: T)</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: writeThing[T](stream: Stream; o: T)" href="swamp.html#writeThing%2CStream%2CT">swamp: writeThing[T](stream: Stream; o: T)</a></li>
<li><a class="reference external"
data-doc-search-tag="swamp: writeThing[T](str: var string; o: T)" href="swamp.html#writeThing%2Cstring%2CT">swamp: writeThing[T](str: var string; o: T)</a></li>
</ul></dd>
</dl>
<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-06-02 02:09:10 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-06-02 03:30:50 UTC</small>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 1a92c00

Please sign in to comment.