Comments (4)
Current "plain description" is let's make it work and cover all fundamental operations with tests. Depending on expectation I would place node-gir between alfa na beta. GIR itself is not mature enough (though it's stable enough) to describe every single detail. GTK itself has been designed for C developers and docs are friendly for such. Node-gir provides runtime dynamic bindings so if you expect API docs, one should provide special routines to generate Node ones. The more feedback we have the node-gir design is more strict and clear.
from node-gir.
@piotras You mean node-gir is now alpha version.
No wonder loading "Gtk" module is slower than that in Seed.
By now only Gjs is mature enough then?
from node-gir.
@jiyinyiyong I would say it's between alpha and beta. Check tests: https://travis-ci.org/piotras/node-gir/builds/2897206.
They pass for most fundamental types and options. Still there's a lack of in&out arguments, but I find them only C level friendly. Wrt module loading speed. Do you have some real numbers? What about runtime performance? I can take a look and check module loading time, but I would like to know whether I need to fix 5% or 65% for example.
from node-gir.
Test two files here:
load.js
// Generated by CoffeeScript 1.4.0
var Gtk, gir;
if (typeof console !== "undefined" && console !== null) {
gir = require('gir');
gir.load('Gtk', '3.0');
} else if (typeof print !== "undefined" && print !== null) {
Gtk = imports.gi.Gtk;
}
log.js
// Generated by CoffeeScript 1.4.0
if (typeof console !== "undefined" && console !== null) {
console.log('node');
} else if (typeof print !== "undefined" && print !== null) {
print('seed');
}
Run in terminal
➤➤ time node load.js
real 0m1.482s
user 0m1.367s
sys 0m0.123s
➤➤ time seed load.js
real 0m0.112s
user 0m0.083s
sys 0m0.027s
➤➤ time node log.js
node
real 0m0.057s
user 0m0.050s
sys 0m0.003s
➤➤ time seed log.js
seed
real 0m0.039s
user 0m0.023s
sys 0m0.013s
➤➤ uname -a
Linux up 3.6.8-1-ARCH #1 SMP PREEMPT Mon Nov 26 22:10:40 CET 2012 x86_64 GNU/Linux
➤➤ node -v
v0.8.15
➤➤ seed --version
Seed 3.2.0
I found a problem... and I made it work(however I dont't know why is that)
➤➤ node load.js
module.js:340
throw err;
^
Error: Cannot find module './build/Release/lib.target/girepository.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/chen/code/tmp/node_modules/gir/gir.js:8:28)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
➤➤ c node_modules/gir/build/Release/lib.target/
girepository.so
➤➤ cp girepository.so girepository.node
➤➤ c -
load.coffee load.js log.coffee log.js node_modules/
➤➤ time node load
real 0m1.614s
user 0m1.400s
sys 0m0.120s
from node-gir.
Related Issues (20)
- use gtk3 HOT 2
- Xvfb support
- New Maintainer HOT 1
- GError implementation
- Crash in the Guitar Tuner example HOT 4
- Creation methods with parameters are ignored HOT 4
- Arguments in structure constructor
- Error in namespace_loader.cc:18:58 if I try to build node-gir HOT 6
- Error message when linking library
- missing license and copyright HOT 10
- explain how to generate documentation from gir file in the README
- Failed to convert argument 2 "3" to GI Type tag "interface" HOT 2
- problem connecting signals (gir/gtk3) HOT 3
- Can't install on ubuntu HOT 4
- Is this dead? HOT 2
- Why was the license stripped out? HOT 3
- reconsider name mangling on api HOT 20
- notes for building and running examples
- browser.js example fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gir.