pkpkpk / fress Goto Github PK
View Code? Open in Web Editor NEWfressian for clojure(script) and WebAssembly
fressian for clojure(script) and WebAssembly
Good day Sir,
it would be appreciated if the latest snapshot version is available via maven.
Thanks in advanced!
Sincerely F.
Hello! When i loading fress lib. I getting following error
`/home/ferdi/customer/kommunismus/new-konserve/konserve/.cljs_node_repl/fress/util.js:73
fress.util.TextEncoder = (new TextEncoder("utf8"));
^
ReferenceError: TextEncoder is not defined
at Object. (/home/ferdi/customer/kommunismus/new-konserve/konserve/.cljs_node_repl/fress/util.js:73:31)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at global.CLOSURE_IMPORT_SCRIPT (repl:76:9)
at Object.goog.require (repl:21:8) (node:3318) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.`
i have following node version: v10.7.0
Good day Sir,
the following code writes a vector with record elements into a buffer:
(ns fress-test.core
(:require [fress.api :as fress]))
(defrecord baz [x y])
(def baz1 (baz. 2 3))
(def baz2 (baz. 4 5))
(def foobar [ baz1 baz2 baz2])
(def buffer (fress.api/byte-stream))
(def writer (fress.api/create-writer buffer :record->name {baz "baz"}))
(fress.api/write-object writer foobar)
(def reader (fress/create-reader buffer :name->map-ctor {"baz" map->baz}))
(def read (fress.api/read-object reader))
read => [#fress-test.core.baz{:x 2, :y 3} #fress-test.core.baz{:x nil, :y nil, "x" 4, "y" 5} #fress-test.core.baz{:x nil, :y nil, "x" 4, "y" 5}]
foobar => [#fress-test.core.baz{:x 2, :y 3} #fress-test.core.baz{:x 4, :y 5} #fress-test.core.baz{:x 4, :y 5}]
Best regards ferdi
When compiling under :advanced
(with Shadow CLJS), the following warning gets printed:
------ WARNING #2 - -----------------------------------------------------------
File: ~/.m2/repository/fress/fress/0.3.1/fress-0.3.1.jar!/fress/writer.cljs:452:5
--------------------------------------------------------------------------------
449 | (writeInt wtr length)
450 | (doseq [o arr] (writeObject wtr o))))
451 |
452 | (def default-write-handlers
-----------^--------------------------------------------------------------------
References to the global RegExp object prevents optimization of regular expressions.
--------------------------------------------------------------------------------
453 | {js/Number writeNumber
454 | js/String writeString
455 | js/Boolean writeBoolean
456 | js/Array writeList
plumatic/schema#165 shows one way that this was previously solved, though I'm not sure if it's directly applicable here.
Good Day Sir,
I'm currently working on a cljs k-v store. For the de- and serializer i use your library. After i update CIDER 0.17.0
to CIDER 0.21.0
the deserializer is not working anymore.
Somehow the read-object function holds old values.
On the top left you can see the deserializer. I added println function to highlight the read problem (line 35 and 40).
Bottom left is a simple example code for the filestore and on the right you can see the execution.
As u can see the read-object function return 47 and i never saved that value in the store.
Leiningen: 2.8.3
on Java 1.8.0_201 Java HotSpot(TM) 64-Bit Server VM
Leiningen profiles.clj: {:user {:plugins [[cider/cider-nrepl "0.20.0"]]}}
Node: v10.12.0
git clone https://[email protected]:FerdiKuehne/incognito.git
lein install
git clone https://github.com/FerdiKuehne/konserve.git
lein cljsbuild test
the serializer is located at konserve/src/konserve/serializers.cljc (line 31 - 62)
Thank you very much for your effort in advance.
Best regards Ferdi
Good Day Mister!
Currently i write a clojurescript record serialization for fressian.
I already implemented custom write-handlers with the help of your fress library.
Now i'm stuck with custom read handlers. It would be great if it is possible to override the default record reader like the record write-handler.
Sincerely Ferdi!
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.