Saturday, October 29, 2016

oh Google, O Alphabets !

This is my untagged Facebook post today:

Yes, some followers do not know what Microsoft calls "Azure" or that an Amazon makes profits on Web Services for cloud storage or that Google is owned by Alphabet.
Bill Gates owns the art.
Google does NOT own the alphabet as THAT is in Unicode Version 9 which is NOT Plan 9 which is another obscure reference only to amuse someone who does not follow me anyway.

Friday, February 19, 2016

Red console view GUI

This is a simpler example to paste into a Red console to test the GUI basics of using the view dialect.

view [
    tgl: text "Some test text"
    text 400x30 bold italic blue font-size 16 "Text with properties"
    button "Click Me" [tgl/text: "Text Changed!"]
    field 400 "SELECT this text then Type something into this entry field"
    area 400x200

A Red script might declare that it needs the view module in its header.

The above script was tested with the Feb 19 2016 build of Red.

Red PL do with block

The Red programming language is moving slowly to version 1.0 and today is at 0.5.4

I thought that it might be useful to look at a do block with the prin function when entered at the Red console.

My example is as follows:

do [
  t1: "test1"
  prin t1
  t1: "test2"
  prin t1

The console output will be


and NOT



I think that this is only really clear if you see the example code as

do [
  t1: "test1"
  prin :t1
  t1: "test2"
  prin :t1

The difference above is that each prin function explicitly is being passed the value of t1.

This is what happens in the short-hand or syntactic sugar version of the example as I first presented it.

If a new user of Red imagined that prin was being passed the ADDRESS of t1 or the ADDRESS of its value, one might expect the meta-level do block to output


This is obvious to old-hands from Rebol, but it may not be obvious to users who are new to expression-based languages.