Archive for November, 2007|Monthly archive page

Quickly Impressed

I wrote my first program in REBOL today. It was something simple, but I really thought it would take longer than it did. I wanted a way to display my current IP address. This was something I could use at work too. We use VNC and I usually have to try and tell someone how to hover over the icon in the taskbar tray to see the IP address, so I can connect to their computer. This is a LAN IP I need, not an outside IP, just to clarify. We also have Windows XP, so I was aiming for it.

I started by using REBOL’s “call” command to execute the DOS command ipconfig. I learned how REBOL handled paths and learned the options to call, like call/output. I used it to write the output to a text file. Then I wanted to get some advice from some Reboler’s before going further. I was thinking I would need to parse the output someway. I fired up AltMe and connected to the REBOL3 World. AltMe is what Reboler’s use to communicate, instead of an IRC channel. I posted my question and received help very quickly. The “parse” command was mentioned with some other options. Then Ashley, a well known REBOL developer posted about using a system/network/host-address function in REBOL. This is exactly what I needed, because it displayed the IP address I needed without even using the ipconfig command. This shaved my time down considerably. Then all I had to do was figure out how to display this in a nice pop-up window.

I used the “View Layout” command. I played around with this using different options. Then I was having some trouble displaying the output of system/network/host-address in the window. Nothing was showing. I figured I needed to convert this into a string, but I wasn’t real sure. After researching, I still didn’t find anything concrete, but I did find a “to-string” command. So I tried it and bingo it worked. So I just need to do some more cosmetic changes and I’ll have it finished.

I was truly amazed at how quickly REBOL can do things. Plus, I am enjoying coding in it. The code is making a lot of sense to me, but I still have a lot to learn. It is very cool so far though.
Here is the code I wrote today.

REBOL [
Title: "IPCommand"
Version: 1.0
Author: "NovaBurst"
Purpose: {To display your local IP address in a window using a large font.}
]

myip: system/network/host-address

view layout [
title to-string myip
button "Quit" [quit]
]

REBOL Yahoo Pipe

I have recently created a REBOL Pipe at Yahoo Pipes. I based this from a post by Bill Clementson found here:
http://bc.tech.coop/blog/070504.html

I just REBOlized it. You can run the pipe here.

If you want to view the source, you need a Yahoo account, but it is here.

If you know of other feeds to add to this pipe. You can make a clone of this and add your own or feel free to let me know and I will gladly add it to this pipe. I’m not sure if this will be useful to anyone, but if you read Bill’s post, it will give you a better understanding of what it could do.

REBOL Programming Language

Carl Sassenrath was one of the people responsible for bringing the Amiga to life back in the day. He created the REBOL programming language 10 years ago. So I’ve known about REBOL for some time, but recently gained interest in it. Carl and his team are working on a new version of REBOL, named REBOL 3. I have been following REBOL news, I’m on the REBOL mailing list and I am part of the AltMe REBOL community. AltMe is software written in REBOL that is used for collaboration.

I started playing around with it a couple months ago, but I was using my time for Lisp. You can do some really cool things with it quickly though. It seems to be Lisp oriented actually. I like the community as well. So I’ve decided to buckle down and learn the language. I have started reading this tutorial on REBOL. It should be fun and I hope to report more about it here.