cxreg / zavolaj Goto Github PK
View Code? Open in Web Editor NEWPrototype of the native call interface for Rakudo
Prototype of the native call interface for Rakudo
Zavolaj! This project prototypes native calling interface functionality for Rakudo. It should give Rakudo the ability to call out to C libraries without having to drop to writing PIR). The Parrot Native Call Interface gives a similar facility in PIR. The project name is the Slovak translation of the imperative "call!", to complement Blizkost, a Rakudo-to-Perl-5 integration project. The functions that Zavolaj can currently call must have signatures (the type of the return value and the types of the arguments) that already exist in a fixed list inside Parrot. Adding more signatures currently involves adding entries to the parrot/src/nci/extra_thunks.nci file. There is a project to enable calling all possible function signatures: http://github.com/plobsing/parrot-libjit-fb is currently a Parrot extension. Zavolaj does not use it yet. MySQL Initially the MySQL client library is being used as a test case, because it is a popular application, is frequently asked about, and because Parrot does have all the function signatures. There is a Rakudo project http://github.com/mberends/fakedbi that wraps these functions with a DBI compatible interface. The /usr/include/mysql.h file defines the mysql client library functions and their parameters. Prepare your system along these lines before trying out the examples: $ mysql -u root -p CREATE DATABASE zavolaj; CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'testpass'; GRANT CREATE ON zavolaj.* TO 'testuser'@'localhost'; GRANT DROP ON zavolaj.* TO 'testuser'@'localhost'; GRANT INSERT ON zavolaj.* TO 'testuser'@'localhost'; GRANT DELETET ON zavolaj.* TO 'testuser'@'localhost'; GRANT SELECT ON zavolaj.* TO 'testuser'@'localhost'; GRANT LOCK TABLES ON zavolaj.* TO 'testuser'@'localhost'; GRANT SELECT ON mysql.* TO 'testuser'@'localhost'; # or maybe otherwise GRANT ALL PRIVILEGES ON zavolaj.* TO 'testuser'@'localhost'; You can look at the results via a normal mysql connection: $ mysql -utestuser -ptestpass USE zavolaj; SHOW TABLES; SELECT * FROM nom; SQLite3 This library cannot be called yet because of missing Parrot NCI signatures, see the example file for details. Microsoft Windows The win32-api-call.p6 script shows the beginning of a GUI application written in Perl 6. Testing Before running 'make test', you *must* perform this: sudo apt-get install libmysqlclient-dev sudo apt-get install libtest-harness-perl export PERL6LIB=lib
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.