Commit 144534ed authored by  Hayley Patton's avatar Hayley Patton 🐢

Add :name and :source to binary-parse-block

parent 91ab9838
......@@ -74,7 +74,7 @@
(binary-parse-from-function function)))
table)))
(defun binary-parse-object-from-function (function &key source name)
(defun binary-parse-block-from-function (function &key source name)
(make-instance 'vague-object
:name name :source source
:signatures (read-signatures function)
......@@ -82,12 +82,15 @@
:values (read-hash-table function)
:computed-values (read-hash-table function)))
(defun binary-parse-object (function-or-vector)
(defun binary-parse-block (function-or-vector &key source name)
(if (vectorp function-or-vector)
(let ((position 0)
(vector function-or-vector))
(binary-parse-object-from-function
(lambda ()
(prog1 (aref vector position)
(incf position)))))
(binary-parse-object-from-function function-or-vector)))
(incf position)))
:source source :name name))
(binary-parse-block-from-function function-or-vector
:source source
:name name)))
......@@ -2,10 +2,10 @@
(:use :cl :ironclad :s-base64 :flexi-streams :split-sequence)
(:export
;; formats
#:binary-parse #:binary-render-object
#:binary-render #:binary-render-object
#:parse-block #:render-object
#:parse #:render
#:binary-parse #:binary-render
#:binary-parse #:binary-parse-block
#:apply-class
#:*reader-depth*
#:base64->bytes #:bytes->base64
......
# Netfarm is a[n attempt at creating a] distributed trustless object system.
>> "At this point it is a nonsense name."
> No? I think it does.
> "At this point it is a nonsense name."
> No? I think it does [make sense].
> It's a farm of objects in the net. I think that fits.
— Gilbert Baumann (`gilberth`)
......@@ -25,9 +24,9 @@ We intend to improve on other internet thingamabobs by:
- requiring signatures for changes to mutable objects, which are incredibly
unlikely to be forgeable by anyone without access to identities' private
keys,
- implementing a web-of-trust-like system for generalised user "voting" and
other collective decisions about objects, and only purging objects from nodes
in extreme cases,
- implementing a web-of-trust and collaborative-filtering-like system for
generalised user "voting" and other collective decisions about objects, and
only purging objects from nodes in extreme cases,
- recreating parts of an object system to provide schemas for objects and
verification of them against those schemas, with a substantial (but admittedly
not large) type system including collections, large integers, byte arrays and
......@@ -39,6 +38,9 @@ For more details on why Netfarm may be more useful than other thingamabobs,
read the introduction of
[the Netfarm book](https://cal-coop.gitlab.io/netfarm/documentation/).
Feel free to drop into `#netfarm` on Freenode or `#netfarm:matrix.org` if you
have any questions.
## Installing
1. **Install Quicklisp.** Netfarm requires a decent amount of libraries, and
......@@ -56,8 +58,7 @@ read the introduction of
is a library we wrote to handle object synchronisation and things like that
so that the Netfarm library could be mostly independent of network code, and
to ensure that the interactions between Netfarm and decentralise2 code are
minimal.
**Download netfarm-networking.**
minimal. Then **download netfarm-networking.**
[netfarm-networking](https://gitlab.com/cal-coop/netfarm/netfarm-networking)
glues decentralise2 and Netfarm together, as to not clutter the object-system
code repository.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment