Showing posts with label Rebol3. Show all posts
Showing posts with label Rebol3. Show all posts

Tuesday, 6 August 2013

Saphirion source on GitHUB

Finally Saphirion is releasing it's rebol source on GitHub, at the present you can find:

Monday, 13 May 2013

Rebol 3B updates:

Rebol 3B updates:
  • added Cyphre corrections to the editor
  • added H1 to H5 text syles


You can easily add new text styles, just add your styles to this file: https://github.com/angerangel/r3bazaar/blob/master/builds/windows/r3-gui.r

Example:

fontize [
h1: base [
font: [
name: "Arial"
style: 'bold
size: 18
color: 0.0.0
offset: 0x0
space: 0x0
shadow: none
]
]
h2: h1 [ font: [ size: 16] ]
h3: h1 [ font: [ size: 14] ]
h4: h1 [ font: [ size: 12] ]
h5: h4 [ font: [ style: 'italic ]]
]

stylize [
h1: text [ facets: [ text-style: 'h1]]
h2: text [ facets: [ text-style: 'h2]]
h3: text [ facets: [ text-style: 'h3]]
h4: text [ facets: [ text-style: 'h4]]
h5: text [ facets: [ text-style: 'h5]]
]


Monday, 6 May 2013

R3B update: welcome back editor!

I'm pleased to announce that now Rebol 3 Bazaar has the dear old editor:



How to use it?
  1. download the last https://github.com/angerangel/r3bazaar/raw/master/builds/windows/r3-view.exe
  2. download https://github.com/angerangel/r3bazaar/raw/master/builds/windows/libgcc_s_dw2-1.dll
  3. download https://github.com/angerangel/r3bazaar/raw/master/builds/windows/libstdc++-6.dll  and rename it libstdc++-6.dll  (unfortunately HTML changes + chars in %20)
  4. start r3-view.exe
  5. launch load-gui from rebol console
  6. now you can use editor as the rebol2 editor
You may press F5 to execute your code in the editor!

 First of all there are some bugs, most of them depends on R3GUI, for example this one: https://github.com/angerangel/r3bazaar/issues/8

Second of all, we need VID. The R3GUI language is very far to be simple as the old R2VID, at the moment it's very difficult to code.

Monday, 22 April 2013

R3B updates

Here the last Rebol 3 Bazaar updates:

  • Corrected demo, adde Cyphre version for Android
  • Added test scripts, see the tests folder
  • added gchiu correction to do-redirect
  • added BrianHawley Private module imports take precedence
  • added earl Fix crash in RESOLVE/extend/only

NOTICE:

I started a wiki about the source, in order to explain it, you may help me on: https://github.com/angerangel/r3bazaar/wiki/Source-explained


TO-DO:

Here a list of easy tasks where you may help R3B development:

Monday, 15 April 2013

Rebol 3 on Android

Richard “Cyphre” Smolak his making an attempt to port Rebol 3 on Android. See the following screenshots:





If you want to help him, try to contact him on  cyphre@seznam.cz
Here is the last APK: http://development.saphirion.com/experimental/r3-droid-view.apk
Who is "Cyphre"?
There isn't much on the web about him. I found that he ported AGG graphic in Rebol, what is AGG? See this link: http://www.antigrain.com/

There is also an account on http://stackoverflow.com/users/1450971/cyphre

I found also the following presentation:

Monday, 8 April 2013

Rebol 3 Bazaar updates

Here a brief summary:
  • added further images, easy to configure and add, see images directory
  • added ladislav Collect unused GOBs
  • Added make prep in make file
  • corrected misspelled word find-all help string
  • 0branch fix ensure that binary series constructed from blocks are distinct
  • added snd_win32.c file for sound support in Windows, thanks to Pekr
  • added logo, now logo is an image of Rebol logo
  • added ladislav corrections on help string of assertion and transcode
  • added ladislav corrections on help string of  first+
  • added ladislav corrections on help string of  BIND and UNBIND 
  • added ladislav Make build platform handling more robust
  • added ladislav Fix clipboard device code so it works identically under non-wide-char platforms
  • added earl Fix PARSE *THRU* integer operation
  • added cyphre *DECOMPRESS/GZIP* fix
  • cyphre fix allows to set event/window or event/gob fields. 
  • ladislav Fix GC crash with gob/parent handling
  • 0branch  Implement BROWSE on Mac OS X
  • 0branch  BROWSE: Return R_UNSET rather than R_NONE
  •  BrianHawley REWORD API Revamp
  • 0branch fix Round decimal division of tuple elements
  • added `make view` rule in makefile
  • improved demo
  • changed file name r3-gui.r3  to r3-gui.r


And this is a video of Rebol 3B Graphic working:


Monday, 18 March 2013

Gob! type

Rebol 3 has a new type: gob!
GOB stands for Grafical Object, before using this guide, remember to launch load-gui

Concept

A GOB is a low-level graphical object.
GOBs are used for for constructing windows, panels, images, text, and drawings. They support two dimensional compositing with transparency (alpha channel), scalar vector graphics, image effects, and rich-text.
A GOB is a highly optimized native datatype. It has been designed to provide the primary features required for graphics, but substantially reduce the memory footprint and processing overhead required. As a result, complex displays, such as animations, simulations, or video games can be created that are composed of thousands of individual GOB elements.

Usually users do not need this information just to use the GUI. This information is provided for users who want to use the graphics system directly or to create new styles for the GUI.

GOB is a Datatype

A GOB is an optimized datatype for supporting graphics. Technically, it is not a series nor is it an object, but it will respond to action functions similar to both of those.

Making GOBs

New GOBs are created with make and a specification block.
gob1: make gob! [text: "Example" size: 400x40]
view gob1




logo-image: load %reb-logo.gif
gob2: make gob! [offset: 10x20 image: logo-image]
view gob2



You may use also the Rebol 2 Draw commands, but at the moment you can't access directly, you have to use the stylize function:


stylize [
 circle: [
 about: "A circle style"
 facets: [init-size: 100x100]
 draw: [
  pen black
  line-width 2.7
  fill-pen maroon
  circle 50x50 40
  ]
 ]
]
view [a: circle]



If inspect a/gob/draw you you'll find the DRAW commands, but don't try to modify directly it!


>> ? a/gob
A/GOB is a gob of value: make gob! [
 offset: 5x5
 size: 105x104
 alpha: 0
 draw: [translate 0x0 clip 0x0 105x104 anti-alias false pen false line-width
   1.0 variable
   pen 255.255.255 fill-pen false anti-alias true pen 0.0.0 line-width 2.7
   variable fill-pen 128.0.0 circle 50x50 40x40
   ]
]



Note that the specification block is not reduced and only valid field names are allowed (see list below.)
You can also create a GOB from another GOB, inheriting its settings:

gob4: make gob1 [text: "Another example"]


Content Types

Each GOB is of a content type that determines the format of its data and how it will be rendered on the display. Complex displays are created by combining layers of GOBs of these various types. For example, you can create a display that has colored text on top of an image on top of a draw-rendered gradient on top of a colored background.
Type Description
color An RGBA color to fill the specified area.
image An RGBA image. The size of the GOB is determined by the size of the image.
draw A block of scalar vector graphic (SVG) commands, such as line, box, and circle.
effect A block of special effect commands, such as blur or colorize, etc.
text A block of rich-text commands including special modes such as bold, italic, color, etc.
In addition a GOB may have no content type and just be used as a pane that holds a list of GOBs that will be composited together. For example a window or a panel used for an input form may be used just for "organizational" purposes.

Access Fields

A GOB datatype allows access to the following fields:
Field Datatype Description
offset pair! the x-y coordinate relative to parent
size pair! width and height of gob canvas or coordinate space
pane block! a block of child gobs (see below)
parent gob! the parent gob (in its pane)
data object! block! string! binary! integer! none! normally used to reference data related to the gob, such as the VID face object
flags block! special flags, see section below
alpha integer! alpha transparency for the gob overall
owner gob! a temporary field used for popup windows to specify the owning parent window
For example:
agob/offset: 100x100
print agob/size
bgob: agob/parent

In addition, these fields are used to access the content of a GOB, depending on its type:
Field Datatype Description
color tuple! the color of the gob
image image! an image within the gob
draw block! a DRAW dialect block
effect block! an EFFECT dialect block
text block! string! a richtext dialect block
Examples:
agob/color: blue
agob/image: load %photo.jpg

Note that you can only specify one content field per GOB. If you attempt to set a second field, it overwrites the earlier one.

Offset and Size

Spatial information about the GOB can be accessed with:
Name Description
offset The x-y offset of the GOB relative to its parent. Either value (or both) can be negative and clipping will occur.
size The width and height of GOB content area. Any graphics that extends outside this area will be clipped.
For example:
gob/offset: 100x20
print gob/offset
gob/size: 150x50

Data Reference

The primary purpose of the data field is to provide a way to reference an object, block, or other data related to your rendering, subsystem, or application.
Although the data field is under the control of the programmer and is not accessed by the GOB system itself, it is used by subsystems like the GUI. For example, in the GUI the data field might point to the face object that stores run-time information such as event handling to quickly locate the face.
Internally, the data field is pointer-sized (32 bits as of writing this page) for optimization reasons. It is not a fully-qualified value field, so can only hold the specific values mentioned above, and any series references contain no indexed offsets. If you need to store general values, use a block or object.

Panes

The pane field provides the tree structure (the hierarchy) for a GOB display. Each pane begins a new relative-coordinate system with sub-GOBs located within it.
Each GOB can include a content and a pane. In such cases, the content is layered behind any GOBs of the pane. The GOBs of the pane are also clipped according to the size of the parent GOB.
The order of layering for GOBs in a pane is last-on-top. That is, they are rendered in the order they appear in the pane, with each successive GOB on top of the others.
Reuse restriction: When a GOB can only be in one pane at a time. If you attempt to insert a GOB into more than one pane, it will be removed form it prior pane. This is a necessary requirement of the linked list used to manage panes and state internal variables required for rendering.

Adding GOBS to Panes

To add one or more GOBs to a pane, use the append or insert functions.
For example, given these gobs:
gob1: make gob! [size: 200x200 color: white]
gob2: make gob! [offset: 20x20 size: 40x30 color: red]
gob3: make gob! [offset: 120x80 size: 50x40 color: blue]

this line will add gob2 to the gob1 pane:
append gob1 gob2
view gob1


Or, you can add several GOBs at the same time:
append gob1 [gob2 gob3]
view gob1


Note that the block of words is not reduced, but words will be looked up.

Other Useful Actions

You can use other series-like functions, such as getting the length:
length? gob1
Or clearing the pane, or specific parts of the pane:
clear gob1
clear at gob1 2

You can also remove from the pane:
remove find gob1 gob2

As well as use indexing refinements:
gob1/1: gob4
gob1/2/image: new-image

All Valid Actions

Here's a full list of all the action functions that operate on the GOB datatype:
Action Description
append Inserts a value at tail of series and returns the series at head. (Modifies)
at Returns the series at the specified index.
back Returns the series at its previous position.
clear Removes all values. For series, removes from current index to tail and returns tail. (Modifies)
find Finds a value in a series and returns the series at the start of it.
head Returns the series at its head.
head? Returns TRUE if a series is at its head.
index? Returns the index number of the current position in the series.
insert Inserts into a series and returns the series after the insert. (Modifies)
length? Returns the length of the series from the current position.
next Returns the series at its next position.
past? Returns TRUE if a series index is past its tail.
pick Returns the value at the specified position in a series.
poke Returns value after changing its data at the given index. (Modifies)
remove Removes value(s) from a series and returns after the remove. (Modifies)
reverse Reverses a series and similar types. (Modifies)
skip Returns the series forward or backward from the current position.
tail Returns the series at the position after the last value.
tail? Returns TRUE if empty, or for series, if index is at or beyond its tail.
take Copies and removes from series. (Typically, removes last GOB.)

Coordinate Mapping

Each GOB pane provides it's own coordinate system. That is, all of it's sub-gobs are located relative to the origin of their parent.
Often you will need to take a position at the top level and map it to a position within a sub-gob, or within even deeper sub-gobs. There are two functions to help perform this mapping:
Function Description
map-gob-offset Translates a gob and offset to the deepest gob and offset in it, returned as a block: the gob and offset. Also supports the reverse operation: given a GOB and offset, provide the GOB and offset within its top-most GOB.
map-event Within an event datatype that has a GOB and offset position, modify the event by mapping to its terminal (lowest) GOB and offset.

GOBs as Windows

The screen and its windows are controlled with GOBs. New windows are opened by adding a window GOB to the screen GOB pane. Windows are closed by removing the window GOB from the pane.

The Screen GOB

The screen-gob is a field in system/view object. The size field of the GOB is the size of the screen:
print system/view/screen-gob/size
1440x900

Each GOB within the screen-gob/pane is a window.

Creating a Window

Note: See R3 View - Windowing System for more information about windows.
Normally, windows are created by the view function. Internally, it creates a new GOB for the window. The offset provides the position of the window, and the size provides its width and height. If text is provided, it will become the window caption. (Window GOBs do not allow color, image, draw, or effect content types, only text for the caption.)
For example, if you create a GOB:
win: make gob! [text: "Test Window" offset: 100x100 size: 300x200]

You can use that for a window by calling view this way:
view/as-is win ; use the argument as the window itself

Or, you could open the window on screen with this:
append system/view/screen-gob win
show win

However, this method should be avoided. You should use the view function, which handles many other features.

Window Flags

Window GOBs accept these special flags:
Flag Description
dropable allow drag and drop of files
hidden window is hidden
modal modal event handling (for requestors)
no-border do not draw window borders (or title)
no-title do not show window title
on-top keep window on top
popup a popup window (has owning parent window)
resize allow the window to be resized
transparent let the window be transparent
These flags can be set like this:
win/flags: [resize dropable]

or during the MAKE with:
win: make gob! [size: 100x200 flags: [resize]]

You can obtain the flags block with:
probe win/flags

Event Handling

Window events such as mouse moves and button clicks are mapped by the native system to an offset within a specific window gob. The higher level event system is responsible for locating the specific sub-gob target of the click, if that action is desired.
Typically, a GOB that requires interactivity, such as processing of button events will be part of a higher level face object, and the processing of the specific events will be done by functions of that face.
For more information see R3 View - Event Handling and R3 View - Windowing System sections.

Rendering Graphics

Graphics is rendered with the show function. This same function is used for both initial rendering as well as updates (refresh). The target GOB to render is specified as the argument.
The line:
show gob1

Render gob1 as well as all sub-gobs in its pane, if it has one. If the GOB is already being displayed, it's display would be refreshed.
This same function is true for window GOBs:
show win

renders all of the graphics in the window and redisplays it.
The show function also allows a block of GOBs:
show [gob1 gob2 gob3]

As you can see, if the gobs are words, their values will be used.
Here are a few important notes about rendering:
  • Rendering order is first to last
    For GOB panes, each GOB is rendered in the order it appears in the pane, with each successive GOB on top of the others, with the last GOB on top.
  • Background refresh
    When a GOB offset is moved relative to its parent GOB, or when it changes size, any background behind the GOB is re-rendered. (Internally a GOB stores its old-offset and old-size information for use in this process.)
  • Optimized show
    If a gob appears more than once within a show block (and the panes of gobs in that block) the second case of the GOB will be ignored (an optimization).
  • Delayed show
    If you are changing several GOBs during a single event, it is more efficient to keep a list of changes then render all the changes together with a single call to show. In the R3 GUI, this is done by defining a show-later that queues the requests to a block, then calls show-now to refresh the display.

Transparency

GOBs support two levels of transparency.
  1. Images or colors may specify transparency. For example, an image with transparent rounded edges.
  2. The transparency of a GOB can be controlled with /alpha. This setting affects the entire GOB (and all subGOBs within it). The range is 0 to 255.
An example of setting the transparency of a GOB:

gob1: make gob! [size: 200x100 text: "Example of transapency"]
gob2: make gob! [size: 180x50]
gob2/image: load %logo.gif
gob2/alpha: 200
append gob1 gob2
view gob1



Note on speed optimization: if an image or color is found not to be transparent, and the /alpha field fully opaque, the compositing system will optimize the action (using a non-transparent blit). The speed difference is significantly faster, but should only matter in special cases, such as when moving or updating large areas of a window (e.g. playing a large animation or video, where alpha is not so important.)

Examples

The example below creates a window with a background image and an image on top of that background. Note, that setting gobb/image to back-img automatically sets gobb/size to the image's size - or, to state it differently, for image GOBs the size is always equal to that of the image.
Rebol []
;-- Background image
gobb: make gob! [offset: 0x0]
gobb/image: load %rebol-3d.png
;-- Top image:
gobi: make gob! [offset: 10x10]
gobi/image: load %icon.png
;-- The window:
win: make gob! [] ;[text: "Test Window"]
win/size: gobb/size
append win gobb
append win gobi
view win

Tuesday, 12 March 2013

Rebol 3 Bazaar updates:

Well, these are the changes added to Rebol 3 Bazaar:

  • changed bugs
  • changed changes
  • corrected demo, now launching demo, you'll obtain this:

  • added demo in builds/windows, so you can understand new Rebol 3 styles
  • added lasidlav correction of help string of exp and log-e
  • Added r3-guir.r3 in build/windows/ directory, this way you don't need to load from internet; just launch  
    do %r3-gui.r3

  • Added hostilefork suggestion to allow NEW-LINE and NEW-LINE? to accept PAREN! series
  • Added earl fix parse thru end

Thursday, 21 February 2013

Rebol 3 Bazaar evolution

Thank you for your support, I received quite all cheering emails and I promise to answer all you as soon as possible. As you can see at the moment I'm trying to add all pull requests pending on Rebol 3, I added:
  • Brian Hawley multi-script support, and better support for length-specified embedding
  • ladislav suggestion of using David M. Gay's dtoa for molding decimals
  • earl fix of select bug (see http://issue.cc/r3/1936)
  • CCX fix of trim function
  • earl fix of recursive make call

See https://github.com/angerangel/r3bazaar for more informations.

Here an example:



Rebol []
load-gui
view layout [
  text "Do you like Rebol 3 Bazaar?"
  button green "yes"
  button red "no"
  ]


As Hugo pointed out, each of you would have some area of interest where a Rebol article might be accepted for publication. Accounting, for example. An article in an accounting magazine could draw a dozen new members. Rebol doesn't need coders, needs enthusiasts! The challenge being to write a solid article that speaks to that market.

Someone proposed to acronym Rebol 3 Bazaar in R3B, what do you think?

I want to mention Frank Dube for his image and video, and remember that you may add images on http://rebol.informe.com/gallery:



Wednesday, 13 February 2013

Rebol3 is dead, long live to Rebol3Bazaar

I've been quiet for a long while, and this blog is not easy for me to write.
I'm sitting here with a glass of 2013 Ferrarelle mineral water of the glass bottle... hoping to be inspired on how to write this...
No, bad introduction...
You know that Rebol is a fantastic programming language, but its development was discontinued and bad supported. A lot of people when encounter Rebol falls in love for its simplicity, a blend of theory, experimentation, and invention, the language embodies elegant and wonderful concepts and properties. It was and is the most productive language I've ever used. I hope your experience has been similar.

Unfortunately a lot of bad events are leading Rebol to a no through road:
  • no direction of the new Rebol3
  • no a central site open for discussion
  • no updates on Rebol 3 source (well, just one every month)
  • too many sites about Rebol and with no updates from years

These and other reasons forced me to create http://rebol.informe.com/portal.html a public forum, with a public wiki and a blog, where everybody can contribute. The result is just 17 users, this means that Rebol is dying; the cathedral way of Rebol 3  development is not working.
So I'm forced by my love for Rebol to create a new GitHub repository: Rebol 3 Bazaar, it's a Rebol 3 source, with graphic working (VID, but just on windows at the moment); I promise you:
If you like to contribute write me, use GitHub or Rebol portal; you don't need to be a programmer, think about a new logo, contribute the wiki.
I draw the following logo, what do you think?


If you know REBOLers who might be interested in this discussion, please let them know about this blog posting. I look forward to hearing from you,
-Max

Friday, 11 January 2013

Unoffical binaries

The site: http://www.rebolsource.net/
contains the build of Rebol 3 ready to use, so you don't need to compile source anymore!

Tuesday, 8 January 2013

Embedded boards

The gollowing link is a guide for installing rebol 3 on embedded boards like Raspberry PI:
https://github.com/hostilefork/r3-hf/wiki/Building-for-raspberry-pi-and-similar-embedded-boards

It's a wiki, so if you found some errors or want to contribute, feel free to correct and add informations.

Monday, 7 January 2013

All Rebol 3 words

Now you can learn all Rebol 3 words here:
https://github.com/hostilefork/r3-hf/wiki/Commands-list
How many new words do you find?
Adjust descriptions, add examples, browse all the wiki, since is an open wiki and everybody can contribute!

Rebol on Android: WORKS!

YES! Rebol works on Android now, you can download your apk to install from: http://development.saphirion.com/experimental/r3-droid.apk

Wednesday, 2 January 2013

Bugs

There is a new function in Rebol3:
bugs

It opens a browser to curecode:


I would prefer to use GitHub and unifying all requests... however now you know this function.

Friday, 21 December 2012

Rebol 3 wiki

Since the rebol wiki mysteriously disappeared from R3 GitHUB, HostileFork made a backup, so if you need to share some information or need information, you can use the following wiki:
https://github.com/hostilefork/r3-hf/wiki

You can modify it with your GitHub account, as any wiki on GitHub.

Thank Hostile Fork

Wednesday, 19 December 2012

Rebol 3 today

Hi, the release of the source code on GitHub take me a lot of time and I hadn't time to post something.
I am so excited of this event, I see a lot of people participating together, solving bugs, writing docs, all this is a dream come true.
On the other side I notice some people making old errors, that could ruin Rebol3:
  • dividing resource on multiple site (using curecode instead of GitHub)
  • closing the public wiki

My point of view is the following: GitHub is an excellent platform to develop software, we must use it as much as possible, so our energies will be concentrate and effective.
Asking people to register and using another site for bug submitting is a non-sense, it double the requests and make extremely difficult to find if an error is already discussed and double the time to check the requests.
One of the biggest problem of documentation with Rebol 2 was the total absence of a public wiki, documentation lacked on simple topic and was too deep about very specific topic. Github gives the public wiki, where everybody with a GitHub account can contribute, in few days there were a lot of contribution and today it was disappeared.
I hope the the administrators of the rebol source will not repeat the errors of Rebol 2.

Thursday, 13 December 2012

Rebol 3 sources released!

It's official, on https://github.com/rebol/r3 the sources of Rebol are released.
Now Rebol development depends on you!


Wednesday, 28 November 2012

A message from Carl

Carl Sassenrath wrote:
made good progress over the holiday, powered by turkey sandwiches from France.

Prep of C source nearly done. See, not just a dump and run. Sure, a few problems came up, but I'm not going to hold up the release for them. You can decide.

Grabbed latest git source and built it for this dev box (which did not support 1.8 version as bin.)

Once released, I've got a number of notes to write up. Like how to quickly port R3. Takes about 5 mins if you know what you're doing. Got it up on ARM & MIPS Linux.

Also, I have some goals in mind. Android and iphone, that kind of thing. Getting graphics and sound back up. GUI and tinyGUI. A micro-R3 for smallish embedded systems.

There's a lot you can help with. Delegation, right?