
-----------------------------------
btiffin
Fri Mar 14, 2008 10:38 pm

REBOL 2.7.6 released!
-----------------------------------
Hello code fans,

REBOL 2.7.6 was released today.  Some very nice enhancements and link library access is now part of the freely redistributable versions of REBOL/Core and REBOL/View.

Read the official announcement here http://www.rebol.net/upnews/0026.html and then follow the link to the builds, which is here http://www.rebol.net/builds/

The zip for windows comes with all the Internet scheme protocol source code, the Viewtop sources including the editor, professional binaries (these have features that require a key, but don't worry ... they are addons, not required for day to day use, especially when load/library is now freed and you get both REBOL/Core for running servers and REBOL/View for everyday development and GUI).

If you haven't experienced REBOL yet, and perhaps don't want to dive right into a full SDK package, there is always the 1.3.2 installer bundles starting at http://rebol.com/download.html

REBOL runs on Windows, Linux, Mac and quite a few others.  Built in Internet protocols include  http, pop, apop ftp, nntp, smtp, esmtp, raw tcp, udp and then user written news, telnet, and even the one I rewrote, dict.
(find dict at http://rebol.org/library/scripts/dict-scheme.r)

This inherent networking means it as easy to  print read file  as it is to  print read http://compsci.ca.  Want to read your email? 

mail: read pop://user:pass@mail.example.com
foreach message mail [print message]


Do yourself a favour and try it out.   A full fledged GUI calculator (again Linux, Mac, Windows) as simply as

REBOL [
	Title: "Calculator"
	Version: 1.2.2
	Date:   17-Jun-2005 ;2-Apr-2001
	Author: ["Jeff Kreis" "Allen Kamp" "Carl Sassenrath"]
	Purpose: {Simple numeric calculator.}
	Needs: [1.3.0]
]

auto-clear: true

calculate: does [
	if error? try [text-box/text: form do text-box/text][
		text-box/text: "Error"
		text-box/color: red
	]
	auto-clear: true
	show text-box
]

clear-box: does [
	clear text-box/text
	text-box/color: snow
	auto-clear: false
	show text-box
]

calculator: layout [   
	style btn btn 40x24
	style kc btn red [clear-box]
	style k= btn [calculate]
	style k  btn [
		if auto-clear [clear-box]
		append text-box/text face/text
		show text-box
	]
	origin 10 space 4
	backeffect base-effect
	text-box: field "0" 172x24 bold snow right feel none
	pad 4
	across
	kc "C" keycode [#"C" #"c" page-down]
	k "(" #"("  k ")" #")"  k " / " #"/" return 
	k "7" #"7"  k "8" #"8"  k "9" #"9"  k " * " #"*" return 
	k "4" #"4"  k "5" #"5"  k "6" #"6"  k " - " #"-" return 
	k "1" #"1"  k "2" #"2"  k "3" #"3"  k " + " #"+" return 
	k "0" #"0"  k "-"       k "." #"."
	k= green "=" keycode [#"=" #"^m"] return
	key keycode [#"^(ESC)" #"^q"] [quit]
]

view center-face calculator


http://rebol.com   http://rebol.org   http://rebol.net

Cheers and Happy pi Day
Brian

-----------------------------------
Mackie
Sat Mar 15, 2008 12:34 pm

RE:REBOL 2.7.6 released!
-----------------------------------
I've got to say, that email reader looks cool.

-----------------------------------
btiffin
Sun Mar 16, 2008 2:33 am

Re: REBOL 2.7.6 released!
-----------------------------------
There is quite a bit to REBOL that oozes cool.  But like chess, the rules are somewhat easy; being a master takes time, effort and a little bent genius.  :)

Scan a web page and print out the hyperlinks ...   (where >> is the default console prompt)

>> parse read http://www.rebol.com [any [thru "A HREF=" copy link to ">" (print link)] to end]


Draw a red box that displays hello and then changes to a random colour on each click

>> view layout [box red [print "hello" face/color: random white show face]]


REBOL's RANDOM handles any of its datatypes, and white being 255.255.255 means generate a colour tuple from 0 to 255 for R  G and B.  Oh, include alpha channel too for transparency  255.255.255.255  but that wouldn't add much to this example.

A little bit of set theory 
>> set1: [a d b c g f i i q]  set2: [a b c]
>> exclude set1 set2
== [d g f i q]
 

A red filled blue circle inside a silver button (along with the "REBOL" text label) and an action block that sets the button's text to show the current time and then quits after waiting 5 seconds.
 
>> view layout [
    b: button "REBOL" silver  effect [
       draw [pen blue  fill-pen red circle 20x9 6]
    ] [face/text: now/time  show face  wait 00:00:05  quit]
]


Just too many features ... and REBOL/View 2.7.6 with installer (released this aft) is still only a 500Kb download.  And these samples are just toys;  full fledged computer science comes built in, covering just about everything.  (System level programming is not really REBOL's forte - it is an interpreter - but that is one of very few areas where REBOL doesn't shine)

Sorry for rambling ladies and gentlemen.  Just evangelizin'.  
Cheers,
Brian
