REBOL 3.0

Comments on: Example extension for A77

Carl Sassenrath, CTO
REBOL Technologies
13-Aug-2009 4:35 GMT

Article #0231
Main page || Index || Prior Article [0230] || Next Article [0232] || 12 Comments || Send feedback

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.

12 Comments

Comments:

-pekr-
13-Aug-2009 3:15:03
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 :-)

Robert
13-Aug-2009 6:25:26
If this version allows SQLite than I could start moving my huge project to R3 to get a feeling for it.
-pekr-
13-Aug-2009 6:30:45
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 ...
Kaj
13-Aug-2009 8:50:45
Not Found 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
-pekr-
13-Aug-2009 9:29:57
http://rebol.com/r3/docs/concepts/extensions.html is the correct link .....
Carl Sassenrath
14-Aug-2009 11:23:14
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?)

-pekr-
14-Aug-2009 11:46:04
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.

Carl Sassenrath
14-Aug-2009 12:41:13
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.

Kaj
15-Aug-2009 11:16:35
Ouch, Berkeley DB is large these days.
shadwolf
28-Aug-2009 21:05:44
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.

jose
9-Sep-2009 5:25:42
why not support SWIG instead ?
Maxim Olivier-Adlhoch
15-Sep-2009 23:30:48
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.

Name:

Blog id:

R3-0231


Comment:


 Note: HTML tags allowed for: b i u li ol ul font span div a p br pre tt blockquote
 
 

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, spams, personal attacks, politics, religion, etc.

REBOL 3.0
Updated 23-Sep-2017 - Edit - Copyright REBOL Technologies - REBOL.net