Wednesday 31 May 2017

The Red Programming Language ....

       14/12/2017

Hi, 
My name is Jenny,... This is my very first time blogging ....
I have lots to share, so please keep looking on my blog ....



Just a quick note before I start:  Many parts of this/my blog will be voicing my opinions, what I am thinking at the time I write it,  If you don't like it then just move on, I'm not interested in entering into any arguments or discussions about anything I say ....  If you agree, then that's nice, but if you don't, then don't bother me with it, this is 'MY' blog.

About me:  Well I've worked with C# and VB professionally for the past 8 years, before that I was a glamour model, yes that's right tits and bum (and the rest) , but because of the constant and ever increasing requirement for me to do naked photo shoots, I made the decision to make a complete career change, so after several years at college and plenty of hard work,  here I am. 
So, here I go - love Red, found it last year  tried a few things and found how easy it is to create meaningful applications. 

** With the utmost respect to the brilliant Nenad Rakocevic and his team **

I started this blog because I wanted to spread the word about 'Red' - and because I've found from my own experiences that there is a need for more in the way of a complete novice type of help for 'Red'. The official sites are brilliant, and the developers are all very focused and certainly always helpful. Their knowledge and development skills are unquestionable, but Red's power, and its simplicity of use at application level can be overshadowed by language development issues and technical discussions.

School age, college level or just plain novices need a different approach to learning.

The people who will make a new language a success or a failure are the app level developers, they are the key to the success of a new programming language. Like it or not,  that's the way it is.
It's all about  'shiny, shiny' - colourful graphics, sound  and ease of use. Every successful app/gui programmer knows the importance of catching the user's attention.
The development of a new programming language is a technically brilliant achievement, but at app level it could be seen by some as more of an art.  'The Art of Programming' .

So here we go ....
I like Alan from mycode4fun.co.uk - He has been a programmer for many years and now teaches programming in schools and colleges and is into 'Red' big time. He is always quick to explain that he is no expert on 'Red'.  I actually met him for lunch a couple of months ago (he lives less than 20 miles from me) a charming and friendly man,  Because of my love and promotion of  his site, It was once suggested that myself and he, were one in the same person, very strange, as my tits and legs are much better than his....  lol  ....  Seriously though I learnt more about 'Rebol' and 'Red' from him than anywhere else. I will be showing a lot of his work and linking to his site for a lot of the help, and it is he who talked to me about  'The Art of Programming'.

Anyway, let's start - - - - Usually for most new programmers it should all be done on a 'need to know basis' - if you need to know it, then learn it, but until you need it, then don't stress it. This isn't always the case, but as a general rule it is.
I've worked in the industry long enough to know how some of these so called professionals pretend that they know it all, but of course we all know that these fools use the same resource libraries as the rest of us. The industry is full of pretenders and wannabees.
So as an application or gui level developer, all you need are some reasonable programming skills, but more importantly a good and easily understandable resource library. So here is where you'll get both. Well for 'Red' anyway ....

---------------------------------------------------------------------------------------------------------------------
Navigate my blog:   Top     Middle 1     Middle 2     Bottom
---------------------------------------------------------------------------------------------------------------------

 1. How to get Red.
The latest stable build is good to start with.
download it from here: http://www.red-lang.org/p/download.html

2. Set up Red.
No setup needed, just double click the Red exe and it will build the console for you.
Then It's pretty much just a case of keeping everything in the same folder.
Here's the official getting started page:   http://www.red-lang.org/p/getting-started.html
But best just to go here, it's much easier:  http://www.mycode4fun.co.uk/red-apps download the reded editor. then you can write, edit, interpret, compile without all the nonsense.
About the Red console.
If you type:  'what' at the Red console prompt, you will get a full list of all Red functions. 
Choose the one you want to know more about (i.e. uppercase) and then type:  '? uppercase'  to get 
a better description of that function.

3. Your first Red program.
Red [needs: 'view]
view [ text "Hello World !" ]

4. Some simple examples.
Red [needs: 'view ]
view [ text "Another Example"  button "Quit" [quit] ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
Red [needs: 'view ]
view [ t: text "And Another Example"  button "Change text" [t/text: "Changed text" ] ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
Red [needs: 'view]
view [a: area "Hello !"   button "change" [ a/text: "Changed"]  ]   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
Red [needs: 'view]
view [
    below
    area
    field
    text yellow font-size 14  "Hello world !"
    drop-down
    check
    button "Quit" [quit]

    ]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
Red [needs: 'view]
;'''' 'below' positions all elements below the previous one.  ;;
;'''' 't' is the text   ;;   'f' is the field   ;;   
;'''' if button is pressed evaluate true or false blocks with 'either'  ;; 
view [below t: text  "Hi, I'm Jenny  What's your name ?" f: field 180x25
      button "Say Hi .." [
      either f/text = none [t/text: "You must enter something !"]
                           [t/text: append form "Hello " f/text]
      ]  ;''''' this is the end of the button block

      ]  ;''''' and this is the end of the view block
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 

;;;;; In below example - Variables are 'name' 'eyeColor' 'descriptn' 'age' ;;;;;
;;;;; append and form are used to make t/text a usable string ;;;;
;;;;; append inserts values at series tail ;;;; 
;;;;; form makes the whole thing a user friendly string ;;;;;
;;;;; notice also the use of  below  and  across ;;;;;
Red [needs: 'view ]
name: "Jenny"  eyeColor: "brown" descriptn: "Sexy"  age: 36 
view [ below 
       t: text "About Jenny" 250x30  
       across
       button "Eyes" [ t/text: append append append form name " has " eyeColor " eyes."]
       button "Describe" [ t/text: append append form name " is " descriptn]
       button "Age" [ t/text: append append append form name " is " age " years old."]              

       ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Red [needs: 'view ]
;; this does the same as above script, but uses 'rejoin' instead of 'append form' ;;
name: "Jenny"  eyeColor: "brown" descriptn: "Sexy"  age: 36 
view [ below 
       t: text "About Jenny" 250x30  
       across
       button "Eyes" [ t/text: rejoin [name " has " eyeColor " eyes."]]
       button "Describe" [ t/text: rejoin [name " is " descriptn]]
       button "Age" [ t/text: rejoin [name " is " age " years old."]]              

       ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Lots of good examples here also: http://www.mycode4fun.co.uk/About-Red-Programming

;;more to be added here soon ....

5. Build your own example/resource library.
This is pretty obvious. It's about collecting and writing snippets of code, useful routines that will be of use to you at some point. Try to label each routine or folder you save clearly so that when you're stuck on something you can easily find your resource. Also keep a note of useful sites that can give answers to your questions. 
Keep notes on anything you think might be helpful in the future.  As your library grows,  so will 
your understanding and knowledge of Red.

more to be added here soon ....

6. Your programmers guides.

http://www.mycode4fun.co.uk/red-beginners-reference-guide
http://www.red-by-example.org/
https://doc.red-lang.org/en/
https://learnxinyminutes.com/docs/red/

more  to be added here soon ....

7. Other resources.
http://www.mycode4fun.co.uk/About-Red-Programming
http://redprogramming.com/Home.html
http://www.red-lang.org/
https://github.com/red/code/tree/master/Scripts
https://ungaretti.gitbooks.io/red-language-notebook/content/

There is a lot of quality help here - Some Rebol and lots of Red:
https://gist.github.com/9214/784e7f7af2342f117bc67a8e2698855b

more to be added here soon ....

8. What can be achieved with Red
Pretty much anything can be achieved already....
http://www.mycode4fun.co.uk/red-apps
https://github.com/red/code/tree/master/Showcase

more to be added here soon ....

9. Getting Help when you're stuck 
Just ask and they will help !
https://groups.google.com/forum/#!forum/red-lang
https://gitter.im/red/help
https://gitter.im/red/red/welcome

more to be added here soon ....

10. If anyone wants to be included here, Show me what you got


http://theredphone.posthaven.com/    - Here's an interesting blog from Gregg Irwin.

-----------------------------------------------------------------------------------------

This is Ported from Rebol to Red by Pekr, optimized by Nenad Rakocevic. and modified by DideC
You can find the script here:
https://github.com/red/code/blob/d214f907ef73a9a34662bd78a0c0047891248070/Scripts/spiral.red
























-----------------------------------------------------------------------------------------


Here's a couple of brilliant Red animations from  'Gregg Irwin' and 'Quingtian Xie'
They are ports of old Rebol demos by Gabriele Santilli and Richard Smolak.
Both can be found here - You'll need to scroll down quite a way, but it's worth it:
http://www.red-lang.org/

And the scripts can be found here: https://github.com/red/code/tree/master/Scripts

Bubbles Demo
Particle Demo
















---------------------------------------------------------------------------------------------

This demo gif was made for me by Alan from mycode4fun.co.uk
All Apps and Examples in it are his. 






















Show me what you can do with Red ....I will add it if I like it ....

----------------------------------------------------------------------------------------------






No comments:

Post a Comment