Comments on: Example extension for A77
I've uploaded an example REBOL extension source code and binary (12K zip).
Just run R3 A77 with test-ext.r and ext-test.dll in the same dir. Then, open test-exe.r in your editor to check out how trivially easy plugins are to use.
A few notes:
- It's a first draft. It works, but more to do.
- It's useful already. Try a few of your own favorite math natives. They will fly.
- Read the docs: REBOL Extensions. You should find extensions easy to write, but you need to know what you're doing.
- Do not post bugs on CureCode, yet. Just like the GUI, I don't want to generate alpha noise. Post your notes in Chat group 5045.
- Don't hack beyond the isolation interface. Any first year student can do it, but if you break the isolation, future updates will break you. That is a promise.
- By default, SECURE will block extensions. You can easily guess why.
- The included MSVC project files are old school. But, the build is trivial, whatever compiler you like should be easy. If you want to post instructions for other compilers... send them to me or put them in the docs.
If you look at test-ext.r, you will notice this line to allow the extension to import:
secure [extension allow]
Certainly, we'll want some signing or checksums enabled in the future.
As a first user, I have a pleasure to confirm, that the test works :-) Now we will get View faster blitting routines, SQLite for R3, and maybe even some compiler.
Of course, as is usual with me, my thoughts are already provoking - hmm, what comes next? Host source code release? Back to GUI (would be fun)? Networking protocols? User-types? Concurency? Can't wait for August status update, as one milestone is over :-)
If this version allows SQLite than I could start moving my huge project to R3 to get a feeling for it.|
Robert - while we have much more freedom now, we need some simple example, of how to do something like SQLite wrapper. Because in the past, we had dual interface - REBOL-2-DLL, now we have three layears - REBOL-Extension-DLL, so we have to open and wrap DLL in extension level directly. Should not be problem for C fluent programmer though ...|
The requested URL /cgi-bin/concepts/extensions.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at rebol.com Port 80|
http://rebol.com/r3/docs/concepts/extensions.html is the correct link .....|
Lol... above link fixed.
Man, you guys really want SQLite! Should we just throw it in the standard build? (How big is the binary these days?)
Carl, inclusion of SQLite would be imo preliminary. It would set new standard for how some ppl use REBOL and storage. That might be fine, but I think extension means an "option". SQLite.DLL is some 513KB. Do we want R3 to grow that much? Extension interface is out. Let's let BrianH and you do some fixes/merges, and maybe in one month, someone creates SQLite wrapper :-)
There is also other solution - to wrap sqlite executable output. But last I looked at R3 'call function, it seems to be missing some important refinements in comparion to R2, e.g. call/output. Not sure we could do it without it.
So, it's grown a lot. Last time I looked closely, SQLite was less than 100K (at least the core engine that we needed... we don't need language parser, etc., just the DB file handler, journaling, select, sort, merge, etc.)
Well another approach... Oracle has been nagging us to put Berkeley-DB in REBOL. But, I'm not sure it's that much smaller, and I'd have to re-examine the current license.
BTW, once someone has coded any "wrapper" extension that does what we want for any externals, we can quickly import that into REBOL itself. But, the tricky part is to make such interfaces a good/integrated design, not just a bunch of string hacks.
Ouch, Berkeley DB is large these days.|
hum ... extension doesn't means you even have to do the job .. or that people that don't care of those extensions
will see their rebol VM size enhanced.
I like the main goals you put in the project Keep extension simple to be done and not time consuming. And i really looking forward to see how you bring it. Compared to load/dll and the complexity inherent to it I'm really currious of what you will bring with extensions system.
if oracle said you that well at least we can notice 2 things
1) Oracle people knows rebol !
2) Having them interrested in rebol and wanting it to suppoer one of their DB product isn't a bad thing.
Ofcourse we can argue like 10 weeks about what kind of DB extensions for data base is need first or what kind of data base to support... in anyway the Mysql-protocol.r will still work do I personnaly need more than that ?
answer is no but i'm not everyone so if extension system reflect the rest of rebol content then adapating high perf extension to handle any kind of DB will be possible
and if in the process we can attrack big companies like Oracle to considere creating extension for rebol to their product that will be a good thing for rebol difusion and better use.
why not support SWIG instead ? |
Jose, that's a really good idea!
I will look into it.
Post a Comment:
You can post a comment here. Keep it on-topic.