techcable / janet-msgpack Goto Github PK
View Code? Open in Web Editor NEWA msgpack implementation for Janet
License: MIT License
A msgpack implementation for Janet
License: MIT License
We should support msgpack extension types.
The user will have to specify a custom function to serialize/deserialize it.
Right now we require UTF8 for strings, symbols, and keywords (see here), but not for buffer.
This behavior should be configurable.
Right now the string type is hardcoded to keyword but someone might want them to be a string or a symbol.
After a recursive clone of 05372b0, I get the following for jpm test
:
$ jpm test
compiling mpack/src/mpack/mpack-reader.c to build/mpack___src___mpack___mpack-reader.o...
generating meta file build/msgpack.meta.janet...
compiling msgpack.c to build/msgpack.o...
compiling mpack/src/mpack/mpack-common.c to build/mpack___src___mpack___mpack-common.o...
compiling mpack/src/mpack/mpack-platform.c to build/mpack___src___mpack___mpack-platform.o...
compiling mpack/src/mpack/mpack-reader.c to build/mpack___src___mpack___mpack-reader.static.o...
compiling msgpack.c to build/msgpack.static.o...
compiling mpack/src/mpack/mpack-common.c to build/mpack___src___mpack___mpack-common.static.o...
linking build/msgpack.so...
compiling mpack/src/mpack/mpack-platform.c to build/mpack___src___mpack___mpack-platform.static.o...
creating static library build/msgpack.a...
running test/test.janet ...
error: cannot open directory data
in os/dir [src/core/os.c] on line 1882
in _thunk [test/test.janet] (tailcall) on line 27, column 17
non-zero exit code in test/test.janet: 1
Failing test scripts: 1
After making the following changes, it seemed to work ok:
$ git diff
diff --git a/test/test.janet b/test/test.janet
index dd3761e..41adaf6 100644
--- a/test/test.janet
+++ b/test/test.janet
@@ -1,7 +1,7 @@
(import msgpack)
-(def data-dir "data")
+(def data-dir "test/data")
(defn run-test [data-file]
(def path (string/join [data-dir data-file] "/"))
(print "Testing: " path)
@@ -10,7 +10,7 @@
(file/close f)
(def actual-data (msgpack/decode data))
(def proc (def {:out expected-data-out} (os/spawn
- ["python3" "reference.py" path]
+ ["python3" "test/reference.py" path]
:exp
{:out :pipe})))
(def expected-data-text (:read expected-data-out :all))
Is it possible things are not set up to work with jpm
's testing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.