Archives for Syntax
How to create a Program Launcher (using Rebol Bind Function)
I have a personal productivity problem as I have a bunch of programs all over the place on my Desktop or in my Program Files Menu. I tried many launchers freewares but none really satisfied me so I finally decided to use Rebol Shell as my launcher. It's also a ...more»
How to read and parse your environment variables (System32, Java_Home, Classpath, Path…)
Rebol has a native get-env function to read environment variables. For example, to test if your JAVA_HOME (JDK installation directory), CLASSPATH (for Java imports), CATALINA_HOME (for Tomcat) environment variables have been set, type in Rebol Console :get-env "JAVA_HOME"
get-env "CLASSPATH"
get-env "JRE_HOME"
get-env "CATALINA_HOME"To parse your environment variable, just use parse/all ...more»
How to group related Global Objects / Functions into “Modules”
When program grows, best practice is to organize source code by modules. There's no explicit concept of "Module" per se in Rebol 2 unlike other languages like Ruby and of course Java, .NET, etc. but Rebol could have the same kind of feature by combining the Object or Context type ...more»
How to Dynamically Extend an Object (for Rebol 2)
Dynamic Languages are hot today since people now realize that static language properties are less suitable for some kind of tasks like Behavior Driven Development. Javascript Framework like Prototype has a method for extending an object, and even now static languages like C# are looking to become dynamic with extension ...more»
Tags: dynamic, extend, inheritance, OOP
Native vs Mezzanine and how to get the source of a Rebol Mezzanine function
There are two types of functions in Rebol:native
mezzanineA native function is a compiled function which source code is not accessible whereas a mezzanine function is written in Rebol itself. For example the Parse function is native whereas the build-markup function is mezzanine. So try this in Rebol Console:source build-markupIt will ...more»
Tags: Build-Markup, mezzanine, mold, source
Improving the twitter client to read message status from clipboard (coping with Optional Parameters)
We're going to improve our twitter command line program by adding support for message from clipboard: if the user just type tweet without specifying any message as parameter, the message will be read from the clipboard. So we could just type "tweet" and the message would be sent straight away ...more»
How to pass arguments to a remote script through the do command
We have seen how to pass Command Line arguments to a script through Rebol.exe in this article on Interfacing C# Client with Rebtweeter: in this case system/options/args will contain a block of Command Line arguments.In the case of the Do Command for Remote Code execution, we'll use the /args refinement ...more»
Basic String Operations
For absolute beginners, you may be puzzled by the lack of some basic string operations like left, mid and right so here there are if Google is your friend you would have found them here:left: func n ]
right: func n ]
mid: func i n ...more»
24 Aug by admin in All, Concept, Helper Function, Internet, Professional Programming, Syntax, Web Services, php
Protect access to your Rebol Script with PHP (kind of Easy Distributed Web Service)
As we have seen since the very beginning, Rebol has the amazing power of being able to execute code remotely. Behind the scene, it will transparently load the script from the server and execute it on your machine as if the web storage was an extension of your disk space.Since ...more»
An equivalent of Scala Var Keyword in Rebol
This is even easier than for the val keyword (see ""):var: :setThat's all Folks :) Test for the absolute skeptics:>> var 'a 1
== 1
>> a
== 1
>> a: 2
== 2
>>Of course in Rebol this syntax is completely useless as you could just write:a: 1But for our Scala learning purpose this may ...more»










No Comment
Tags: bind function, call function, select function