ccubed / earl Goto Github PK
View Code? Open in Web Editor NEWEarl is the fanciest C++ extension for Python that allows External Term Format packing and unpacking.
License: MIT License
Earl is the fanciest C++ extension for Python that allows External Term Format packing and unpacking.
License: MIT License
In [29]: a = earl.pack({'d':{'_trace':['discord-gateway-prd-1-3'], 'heartbeat_interval': 6500}, 'op':10, 's': 'nil',
...: 't': 'nil'})
In [30]: a
Out[30]: b'\x83t\x00\x00\x00\x04v\x00\x01dt\x00\x00\x00\x02v\x00\x06_tracel\x00\x00\x00\x01v\x00\x17discord-gateway-prd-1-3jv\x00\x12heartbeat_intervalb\x00\x00\x19dv\x00\x02opa\nv\x00\x01sv\x00\x03nilv\x00\x01tv\x00\x03nil'
This kind of nested structure fails entirely. Why?
Dictionary unpacking causes a sigserv.
Why is this broken?
The memcpy region for floats is wrong.
Now broken. Why are we broken? 👎
In [1]: import earl
In [2]: obb = {"d": {"v": 6, "shard": [0, 1], "compress": False, "token": "", "large_threshold": 250, "properties": {"$os": "linux", "$device": "curious", "$browser": "curious", "$referrer": "", "$referring_domain
...: ": ""}}, "op": 2}
In [3]: earl.pack(obb)
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
fish: “ipython” terminated by signal SIGABRT (Abort)```
Strings are going beyond their memory bounds by 1.
In [2]: earl.pack({'aa': ''})
fish: “ipython” terminated by signal SIGSEGV (Address boundary error)
Big Ints now return a value, but it's the wrong value.
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.