Syllable now has its first separate REBOL binding (screenshot on Syllable Desktop). The project created a binding with the popular cURL library, which is included in Syllable as its networking library. Documentation and downloads for Syllable, Linux and Windows are available here. The binding will be demonstrated at the upcoming REBOL & Boron conference.
The current version of REBOL 3 for Syllable interfaces with the system at the POSIX level. Beyond that, you can write your own bindings with system and user libraries. Bindings are written as REBOL 3 extensions. Amazingly, and just like the core REBOL 3 interpreter library, Syllable Desktop can run the Linux binary of the cURL binding unchanged, so that the same binary can be shared between Syllable Desktop and Syllable Server. This is possible because the interfaces between REBOL 3 and its extensions are designed for maximal portability, to avoid dependency hell.
The binding consists of a dynamic (shared) library; one single, binary file. On Syllable, either Desktop or Server, installation consists of just dropping it into place, exactly like native Syllable drivers and plug-ins. On other systems, installation may be more complicated.
REBOL has network protocols built in, but the new REBOL version 3 doesn’t have many of the protocols of REBOL 2 yet. The cURL binding fills this gap, and also provides missing features such as SSL and proxy support, and even some protocols that REBOL 2 never had. The exact protocol support depends on the cURL version that you use. Here’s a basic programming example that reads a page from an SSL encrypted website:
import %cURL-binding.so session: curl/new-session curl/read session data: copy #{} curl/verify-peer session off curl/do session https://github.com/carls/R3A110 curl/end-session session result: to-string data
cURL is very powerful and flexible, and the REBOL binding gives you an easy way to access its capabilities. For example, if you need to do special web programming to make a website think that your program is a human user, custom headers can be set that will be sent to the server along with a request:
session: curl/new-session curl/headers session [ "Referer: ..." "User-Agent: ..." "Cookie: name1=content1; name2=content2;" ]
Advanced communication with REBOL is possible in both directions. A callback that provides progress status can be added that is written in REBOL, but is called periodically by cURL. Here’s an example, including error checking:
progress: func [ download-goal [decimal!] download-now [decimal!] upload-goal [decimal!] upload-now [decimal!] ][ print [ "Read" to-integer download-now "of" to-integer download-goal "bytes" ] 0 ; Return non-zero to abort transfer ] session: curl/new-session unless all [ curl/progress session self 'progress curl/read session data: copy #{} curl/do session http://rebol.com ][ do make error! second curl/session-error session ] curl/end-session session result: to-string data
I have to say, i like the syllable project. The same as the antecessor atheos, except from the creepy Name. Well, there is soo much potential in there…
But i think, besides the rebol engagement, there is no high activity in this project.
Am I right?
But good to see this project evolving.
I would say that the activity has been flaky for the last few years. In the sense that before that, our development speed and release rhythm were extremely stable, but in the past few years the project has been going through many changes, both planned and unforeseen. We’re still recovering from the unforeseen changes, and the planned changes mean that we’ve been starting up new subprojects that have been largely under the hood until recently.
Thanks for the kind words. We’re planning to stabilise our development this year and bring a number of our new developments to the forefront.
Any plans to step up the work on the UI and the applications for Syllable Desktop?
Yes, two people have been working on a native theming engine for Syllable (Desktop), and one of the plans to get more applications on Syllable is to make it easy to write REBOL 3 apps.
Another subproject, that we created a year ago, is to have more standard open source programs, starting on Syllable Server. In the past year we have been using Syllable Server with X11, the ROX Desktop and many apps such as Firefox and Thunderbird exclusively for our own development and infrastructure. (I’m on it right now, and the websites pointed to in the article are running on it.) Sadly, this standard software is so complex that it’s much more work to reach release quality, so we can’t release this system yet:
<a href=”http://web.syllable.org/news/2011-01-01-20-30-Good-Syllable-year.ht…
That’s good news. Is there an estimated timeframe for next release?
No, we can’t commit to that yet until we have restabilised development. But there’s a hint on the ReBorCon site. 🙂
“The project created a binding with the popular cURL library”
Which project wrote the binding? Rebol, or Syllable? Because it’s not that clear from the text.
The Syllable project.
Moderation test : reporting abusive content to myself.