sclu1034 / lgi-async-extra Goto Github PK
View Code? Open in Web Editor NEWAsynchronous high(er)-level API wrapper for LGI
Home Page: https://sclu1034.github.io/lgi-async-extra/
License: GNU General Public License v3.0
Asynchronous high(er)-level API wrapper for LGI
Home Page: https://sclu1034.github.io/lgi-async-extra/
License: GNU General Public License v3.0
This will require adding the relevant functions to GLib first:
g_file_make_symbolic_link_async
g_file_make_symbolic_link_finish
g_file_make_hard_link_async
g_file_make_hard_link_finish
The synchronous g_file_make_symbolic_link
already exists, but GLib does not yet support creating hard links at all.
The Lua wrapper should be rather straight forward. The signature should be
-- @async
-- @tparam string target The target to point the link to.
-- @tparam[opt=true] boolean symbolic If `true`, create a symbolic link.
-- @treturn[opt] GLib.Error
function File:link(target, symbolic, cb)
end
Gio's stream operations to read arbitrary binary content return GBytes
, which are immutable. To be able to read an entire stream, a GByteArray
or similar mutable storage would be needed.
However, g_byte_array_append
is not available via introspection (likely because the lower-level GArray
operations aren't available either), making it impossible to push multiple GBytes
into a single array.
LGI does have a rudimentary byte array available as require("bytes")
, but this one doesn't allow efficient modification either. __newindex
is implemented, but setting individual indices for buffer sizes of 4096 bytes would be rather inefficient.
Work on implementing a wrapper for GByteArray
was started in https://github.com/sclu1034/lgi-async-extra/tree/feature/bytearray, but this would require linking against LGI and figuring out its inner workings.
It would be much better if LGI's bytes
module was improved or GLib's arrays somehow became introspectable.
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.