* [bug#46846] [PATCH] gnu: Add guile-cbor.
@ 2021-03-01 11:24 pukkamustard
2021-03-01 16:45 ` bug#46846: " Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: pukkamustard @ 2021-03-01 11:24 UTC (permalink / raw)
To: 46846; +Cc: pukkamustard
* gnu/packages/guile-xyz.scm (guile-cbor): New variable.
---
gnu/packages/guile-xyz.scm | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c75fc4b4ac..45b3a82d00 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -32,7 +32,7 @@
;;; Copyright © 2020 Jesse Gibbons <jgibbons2357@gmail.com>
;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
-;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
+;;; Copyright © 2020, 2021 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;;
;;; This file is part of GNU Guix.
@@ -4560,3 +4560,32 @@ ffi-helper from nyacc.")
for C++ code using a simple embedded DSL. Think of it as @code{Boost.Python}
or @code{LuaBind} but for Scheme.")
(license license:boost1.0))))
+
+(define-public guile-cbor
+ (package
+ (name "guile-cbor")
+ (version "0.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://inqlab.net/git/guile-cbor.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "0bdqg3ifayf7m2j09lqrgdfprbdaa67azf09bcq9b4k71inxfnxl"))))
+ (build-system gnu-build-system)
+ (arguments `())
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)))
+ (inputs `(("guile" ,guile-3.0)))
+ (synopsis "Guile implementation of CBOR")
+ (description
+ "The Concise Binary Object Representation (CBOR), as specified by RFC 8949, is
+a binary data serialization format. CBOR is similar to JSON but serializes to
+binary which is smaller and faster to generate and parse. This package provides
+a Guile implementation of CBOR.")
+ (home-page "https://inqlab.net/git/guile-cbor.git")
+ (license license:gpl3+)))
--
2.30.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#46846: [PATCH] gnu: Add guile-cbor.
2021-03-01 11:24 [bug#46846] [PATCH] gnu: Add guile-cbor pukkamustard
@ 2021-03-01 16:45 ` Ludovic Courtès
2021-03-04 8:02 ` [bug#46846] " pukkamustard
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-03-01 16:45 UTC (permalink / raw)
To: pukkamustard; +Cc: 46846-done
Hi,
pukkamustard <pukkamustard@posteo.net> skribis:
> * gnu/packages/guile-xyz.scm (guile-cbor): New variable.
Applied, thanks!
I had a quick look at the code. It’s convenient to have a
Guile-JSON-like interface. OTOH, CBOR lends itself well to more
efficient implementations, à la Bytestructures; I wonder if there could
additionally be a syntactic layer that would generate specialized
serializers/deserializers. Thoughts?
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug#46846] [PATCH] gnu: Add guile-cbor.
2021-03-01 16:45 ` bug#46846: " Ludovic Courtès
@ 2021-03-04 8:02 ` pukkamustard
0 siblings, 0 replies; 3+ messages in thread
From: pukkamustard @ 2021-03-04 8:02 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 46846-done
> I had a quick look at the code. It’s convenient to have a
> Guile-JSON-like interface. OTOH, CBOR lends itself well to more
> efficient implementations, à la Bytestructures; I wonder if
> there could
> additionally be a syntactic layer that would generate
> specialized
> serializers/deserializers. Thoughts?
Interesting, I didn't know about bytestructures. A bytestructures
like-implementation of CBOR would be cool.
One thing I'm not quite sure about is that CBOR is variable
length. For
example an integer is represented in either 1, 2, 3, 5 or 9 bytes
depending
on how large the integer is. From initial glance, I think
bytestructures
is efficient because structures are fixed-size and the
implementation
can do address arithmetic for accessing specific fields.
But there also seem to be "dynamic" bytestructures descriptors. So
I'm
probably lacking imagination. I'll check out bytestructures...
-pukkamustard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-04 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 11:24 [bug#46846] [PATCH] gnu: Add guile-cbor pukkamustard
2021-03-01 16:45 ` bug#46846: " Ludovic Courtès
2021-03-04 8:02 ` [bug#46846] " pukkamustard
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.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).