?

Log in

No account? Create an account
REBOL Community Below are the 10 most recent journal entries recorded in the "REBOL Community" journal:

[<< Previous 10 entries]

January 9th, 2008
01:15 pm
[anohin]

[Link]

R3/alpha!

Сбылись мечты народные, Р3/альфа выложена в открытый доступ.

(Leave a comment)

June 2nd, 2007
09:01 pm
[stillcarl]

[Link]

Rebol 3 reaches alpha status...
See here...

(1 comment | Leave a comment)

June 24th, 2006
08:33 pm
[stillcarl]

[Link]

First thoughts on RebGUI
I've only just noticed the RebGUI demo, (see Carl's Blog or a couple of posts back from here), but I kind of like it. Couple it with the browser plugin releases coming along nicely, (see The REBOL Week ), and it looks like REBOL's finally moving ahead again. (Not that I've found time to test the new plugins mentioned there yet.)

The one major thing I didn't like about the demo was the inability to block-mark text anywhere but in the editable text fields and areas. If there's text anywhere on a screen, I expect to be able copy it to the clipboard. I hope this isn't the default behaviour for RebGUI...

Otherwise, real good so far.

(Leave a comment)

01:30 am
[carlsblogalert]

[Link]

Carl's Blog Alert
Sat, 24 Jun 2006 0:07:42
Copy and Checksum Large Files
Last week I wrote a short example of how to use checksum ports,
and last year I gave an example of how to use the /seek refinement to deal with large files.
The code below combines these two concepts in a function that copies a file, even if the file is larger than memory (e.g. MPG, MP3, WAV). It will also compute and return the checksum of the file's data.

This is a robust "commercial quality" file copy function that you can use in your applications. If you find a bug, please let me know and I will correct it here.


REBOL [
Title: "Copy File with Optional Checksum"
Author: "Carl Sassenrath"
License: 'MIT
]

copy-file: func [
"Copy a file. Return WORD for failure or return optional checksum."
from [file!]
dest [file!]
/sum "checksum the data"
/local
data
path
ff ; from file port
tf ; to file port
][
path: split-path dest

foreach [block err-word] [
[make-dir/deep path/1] dir-failed
[ff: open/binary/read/seek from] read-failed
[tf: open/binary/write dest] write-failed
[if sum [sum: open [scheme: 'checksum]]] sum-failed
[
while [not tail? ff] [
print index? ff
data: copy/part ff 100000
insert tail tf data
if sum [insert sum data]
ff: skip ff length? data
]
;print index? ff
] copy-failed
][
if error? try block [
if port? sum [close sum]
if tf [close tf]
if ff [close ff]
return err-word
]
]

data: none
if sum [
update sum
data: copy sum
close sum
]
close tf
close ff
data ; checksum value or none
]

print copy-file/sum %movie.mpg %movie2.mpg
ask "done"

---Notes:

#The code has only been tested on REBOL 2.6.2. The code requires a newer REBOL that supports the /seek refinement (Core 2.6).

#If you are new to REBOL, note the way the foreach is used to perform error checking for each step and return the appropriate error word for failures.

#The make-dir line is correct as written. If you do a source on make-dir you will see that it becomes a no-op if the dir exists. Adding an additional exists? check is not needed.

#The "from file" (ff) is opened with /read access. This is done to cause an error if the file cannot be opened. Without it, the file will open as an empty file, even if it does not exist.

#The checksum port defaults to the SHA1 (secure hash) algorithm.

#The code remembers to close the ports if an error occurs.

#File data are copied in chunks of 100000. This number is arbitrary, and you can set it to whatever buffer size you prefer. Smaller numbers may slow the transfer. Larger numbers will require more memory.

#Uncomment the print lines if you want to see it working. You could also modify those lines to show a progress bar.

More here: http://www.rebol.net/article/0281.html

(Leave a comment)

June 23rd, 2006
09:30 pm
[carlsblogalert]

[Link]

Carl's Blog Alert
Fri, 23 Jun 2006 19:50:49
RebGUI - REBOL/View Graphical User Interface
RebGUI is a good way to build user interfaces in REBOL. If you've not tried it yet, you should.

RebGUI takes many of the best concepts of VID (the visual interface dialect) and provides a useful, smart, clean way to quickly build graphical user interfaces in REBOL.

To see a quick tour of RebGUI click on it in the Demos folder of the REBOL Viewtop or type this URL into your REBOL/View GoTo box (or just DO it in the console):

http://www.rebol.com/rebgui-demo.r

The above script simply does this:

do http://www.dobeash.com/RebGUI/get-rebgui.r
do view-root/public/www.dobeash.com/RebGUI/tour.r

I should mettion that Ashley and his team at Dobeash Software have done a nice job documenting RebGUI. Here's the main page where you can get started:

\in

RebGUI Home Page

/in

For me, RebGUI is exactly the kind of thing I've wanted to see done in REBOL. Remember, VID was/is a prototype. Back in 2001 I expected VID to be replaced with something better in less than a year. VID had some unique and cool ideas (e.g. dialected interface specification, datatyped property dispatch, extensible), but also more than a few quirks and loose ends.

Some of you have asked, "Is it ok to use RebGUI for my REBOL applications?" I say yes! Use what works best for your needs and requirements. For many types of applications, I think RebGUI is a good choice.

More here: http://www.rebol.net/article/0280.html

(Leave a comment)

08:30 pm
[carlsblogalert]

[Link]

Carl's Blog Alert
Fri, 23 Jun 2006 19:50:49
RebGUI - REBOL/View Graphical User Interface
RebGUI is a great way to build user interfaces in REBOL. If you've not tried it yet, you should.

RebGUI takes many of the good things about VID (the visual interface dialect) and provides a useful, smart, clean way to quickly build graphical user interfaces in REBOL.

To see a quick, simple demo of RebGUI, type this URL into your REBOL/View GoTo box (or just DO it in the console):

http://www.rebol.com/rebgui-demo.r

The script simply does this:

do http://www.dobeash.com/RebGUI/get-rebgui.r
do view-root/public/www.dobeash.com/RebGUI/tour.r

In addition, Ashley and his team at Dobeash Software have done a nice job documenting RebGUI. Here's the main page where you can get started:

\in

RebGUI Home Page

/in

For me, RebGUI is exactly the kind of thing I've wanted to see done in REBOL. Remember, VID was/is a prototype. I expected VID would be totally replaced within less than a year (of 2001!). It had some cool new ideas (e.g. dialected interface specification, datatyped property dispatch, extensible), but also more than a few quirks and loose ends. VID proved its point, and still has its uses, but it's time to move on (and has been for a while now).

Some of you have asked, "Is it ok to use RebGUI for my REBOL applications?" I say yes! Use what works best for your needs and requirements. For many types of applications, I think RebGUI is a good choice.

More here: http://www.rebol.net/article/0280.html

(Leave a comment)

June 20th, 2006
11:30 pm
[carlsblogalert]

[Link]

Carl's Blog Alert
Tue, 20 Jun 2006 22:45:02
REBOL/Core Guide in the French Language
Did you know that there is a French language translation of the REBOL/Core documentation? I am posting this message to make the link more visible to French speaking developers (and increase search engine ranking for it as well).

Guide Utilisateur de REBOL/Core (Fr)

This translation was created by Philippe Le Goff, with editing revisions from Christophe Coussement, and contribution from Olivier Auverlot.

PS: I would like to personally thank Philippe and his team for making this translation a reality and helping to expand the awareness of REBOL into the French community.


More here: http://www.rebol.net/article/0279.html

(Leave a comment)

June 13th, 2006
12:30 pm
[carlsblogalert]

[Link]

Carl's Blog Alert
Tue, 13 Jun 2006 12:18:08
How to Calculate Checksums for Large Data or Streams
Ok, so you probably know how to calculate checksums in REBOL. It is easy. For example, a simple checksum is:

sum: checksum data

For a stronger checksum, you can use a secure hashing algorithm, such as SHA1 with code like this:

sum: checksum/secure data

But, what happens if your data is too large to fit in memory, or you are streaming data that needs to be checked on the fly?

The answer is: checksum ports.

A checksum port is like any other REBOL port. Here's a quick example of how to compute an ongoing (streaming) checksum:

sport: open [scheme: 'checksum]

insert sport "this is some text"
insert sport "this is more text"
insert sport "this is the final text"
insert sport ...

update sport
sum: copy sport
close sport

print sum

The update function is required to compute the final checksum value. Without it, the copy function will return none.

The default algorithm for the checksum above is SHA1. The open line above is equivalent to writing:

sport: open [scheme: 'checksum algorithm: 'sha1]

If you want MD5 instead, use this line:

sport: open [scheme: 'checksum algorithm: 'md5]

I hope you find this checksum technique of value for your networking and file operations.
More here: http://www.rebol.net/article/0278.html

(Leave a comment)

June 10th, 2006
09:01 pm
[stillcarl]

[Link]

REBOL plugin problems...
Been trying out the new plugin, (see: http://www.rebol.com/web-plugin.html ), but can't get it to install on IE. The only install problem I had with Firefox was it installed the plugin files into a directory within plugins/ instead of into plugins/ itself. Manually moving the files fixed that.

IE though - blugh. The plugin downloads, but then IE refuses to install it, though it doesn't say why. And nothing has appeared in 'Downloaded Program Files'. I've ensured all the ActiveX options are ticked, but nothing happens. (I've had the old plugin working in the past - but I deleted it in the end because I didn't like ActiveX, err, active.)

Anyway, I'm planning to create a sticky-post in this journal filled with links to interesting pages that use the plugin - so if you know of any or have made any, make post about them. I'll then add their link to the sticky post, plus a link to your post so it can easily be found again.

(1 comment | Leave a comment)

June 7th, 2006
10:30 pm
[carlsblogalert]

[Link]

Carl's Blog Alert
Wed, 7 Jun 2006 21:58:26
Browser Plugin Update
You may have noticed that we released a REBOL/View 1.3.2 compatible version fo the browser plugin. Now, all of those nice draw demos can be done within your web browsers. In addition, we have a Firefox/Mozilla version of the plugin (but you must install it manually at this time).

The two big features we are working on right now are:

:Multi-DLL - to allow multiple instances of REBOL within a web page. Each is run as a separate process, independent of the other.

:Auto-update - makes it possible for us to update the REBOL plugin automatically. This is tricky because we want to provide a smooth upgrade method and not store each release of REBOL on your hard disk (unless it is an entirely new version of REBOL, such as 3.0).

We are also looking at a number of other features, as well as better support for installing in Firefox/Mozilla browsers (and eventually other browsers as well).
More here: http://www.rebol.net/article/0277.html

(1 comment | Leave a comment)

[<< Previous 10 entries]

Powered by LiveJournal.com