synrc / rpc Goto Github PK
View Code? Open in Web Editor NEW☎️ RPC: Type Driven Parser Generator
Home Page: https://rpc.n2o.dev
License: ISC License
☎️ RPC: Type Driven Parser Generator
Home Page: https://rpc.n2o.dev
License: ISC License
I got a json-bert.js
which contains
function check_len(x) { try { return (eval('len'+utf8_arr(x.v[0].v))() == x.v.length) ? true : false }
catch (e) { return false; } }
From utf8.js
:
function utf8_arr(ab) { if (!(ab instanceof ArrayBuffer)) ab = new Uint8Array(utf8_enc(ab)).buffer;
return utf8_dec(ab); }
This function always fails because utf8_arr expects as its input an ArrayBuffer. But bert.js
s atom(o)
gives an Uint8Array
as v
property.
Possible fix: replace utf8_arr(x.v[0].v)
with utf8_arr(x.v[0].v.buffer)
or utf8_dec(x.v[0].v)
.
Or am I getting something wrong?
During compilation using rebar3 (rebar 3.10.0 on Erlang/OTP 20 Erts 9.0) the following error was raised
error in parse transform 'bert_validator': {function_clause,
[{bert_validator,guard,
[{union,
[{remote_type,92,
[{atom,92,calendar},
{atom,92,datetime},
[]]}]},
"Started",
{form,
[10,118,97,108,105,100,97,116,
101,40,68,32,61,32,35,39,119,
114,105,116,101,114,39,123,
105,100,32,61,32,73,100,44,
32,99,111,117,110,116,32,61,
32,67,111,117,110,116,44,32,
99,97,99,104,101,32,61,32,67, ...
During compilation using rebar3 (rebar 3.10.0 on Erlang/OTP 20 Erts 9.0) the following error was raised
error in parse transform 'bert_validator': {function_clause,
[{bert_validator,guard,
[{union,
[{type,89,reference,[]}]},
"Timer",
{form,
[10,118,97,108,105,100,97,116,
101,40,68,32,61,32,35,39,119,
114,105,116,101,114,39,123,
105,100,32,61,32,73,100,44,
32,99,111,117,110,116,32,61,
32,67,111,117,110,116,44,32,
99,97,99,104,101,32,61,32,67, ...
During compilation using rebar3 (rebar 3.10.0 on Erlang/OTP 20 Erts 9.0) the following error was raised
Error in parse transform 'bert_validator': {function_clause,
[{bert_validator,guard,
[{union,
[{type,25,string,[]},
{type,25,binary,[]}]},
"Name",
{form,
[10,118,97,108,105,100,97,116,
101,40,68,32,61,32,35,39,119,
114,105,116,101,114,39,123,
105,100,32,61,32,73,100,44,
32,99,111,117,110,116,32,61 ...
If you try to generate Bert validator in an umbrella project it will fail silently.
Workaround is to create a src/
directory in the root of the project and have it generated there.
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.