Tuesday, 18 July 2017

Latest Red

The false positive problem.
I started this blog because i love the Red programming language, so never doubt my loyalty to
Red and its developers  - I will always try my best to promote Red. 
The false positive problem is a serious one, something has got to be done if Red is to be more than just a hobbyist language.  Serious developers just will not bother with it if things do not change very soon.  I've used Red here at work and  I am constantly trying to assure them it is clean.
These crappy AV scanners are causing a lot of trouble and I for one am so fed up with them.
Red is different, better, more efficient, that's why we all love it, but all of this means nothing
if these anti-virus scanners can't handle it and can't understand it. 
If all you want to do is mess around, experiment, tinker with it and be clever about it, then there's no problem, but if you  want to develop commercial or other programs to share with others, then there is a big problem.  Even Defender is now causing trouble.

I'll let Nenad explain why.
Red has its own toolchain and linker, generating a file layout different from 
Visual Studio or GCC linkers. The heuristics they (the AV scanners) use are probably too 
specific to the output of those linkers and are flagging everything else as suspicious.
Also ....
Red compresses a big part of the DATA segment stored in Redbin format and 
uncompresses it on start.  It’s part of the Red runtime boot process.
Some heuristics for AVs use statistical methods on the CPU instruction set used by the executable. 
It seems Reds unoptimized output has a profile that makes it fall into the category of malware.
Popular binary packagers can help as they do have a recognizable signature.
Signing your binaries can also be helpful.  Make people more confident in your exe.
Ok so back to me.
Personally I think the data compression is the main reason, but hey,  what do I know.
So now, packaging.
UPXing (great compression tool) helps a little, but still some virus scanners flag us as bad.
I've also tried NSIS and it certainly also helps, but the worst scanners still flag us.
Hashing or Signing your binaries
Hashing provides a hash of the file, along with that file to download. The user downloads the hash 
and the file, re-computes the hash to verify it matches the downloaded hash, thus proving that the 
file is unaltered and untampered with.  Nice and siimple. I like this one.
Signing verifies the file is clean and the identity of the signer. You'll need a code signing certificate.
Code signing allows us to be sure we’re downloading a file from the true sender. 
Essentially, code signing lets you know that the code hasn’t been tampered with and is a safe download. It's a bit more of a wrangle and it costs, but there's plenty of info on signing your exes, just Google it.
I have not tried this, but was wondering if packaging a Red script with the Red exe in a Rebol way might work, so it simply automates the interpretation of the script. A waste of the Red compile options though.
I'm not sure what more to say about this, I do know that if you voice your opinions there will always 
be someone who wants to argue or disagree - but i've said this before, This is my blog, my thoughts 
and my ideas, I'm happy to accept polite input and help, but nothing more, if you dont like it then move on. 
I've been asked about why I'm not on certain social media sites - I dont like social media because it
gives a voice to the weirdos and maniacs of this world, a voice they would not have had before, so be nice and enjoy life (and Red).  
Been in Germany with work for the last five months, boring stuff, I mean real boring. Will be back soon and back to Red.  Can't wait.  
--------------                                                                                                                               10/03/2018
I'm so busy at work right now, but will do more with Red as soon as I can.  I found this.
If you have a folder of Red scripts, here's a way to run them one by one from a simple list - brilliant stuff,  love it.
Congratulations to Nenad and the Red team on the new 0.63 build, lots of new features to work with.
The date! datatype is an awesome addition.  There's plenty other things to check out. 

Look here for all the new stuff:  http://www.red-lang.org/


Red [needs: 'view]                                       
dat:  form now/date 
day: append form "Day:  " now/day   
mnth: append form "Month:  "now/month  
yr: append form "Year:  "  now/year
view [ title "Date"
       h1 red dat return
       h5 day return
       h5 mnth return
       h1 yr

Been busy with work, so not had chance to post anything for a while.
Lots more to come from me soon !

Try this link for now. 

And this. 

I also love this.


Try this excellent work.


Wednesday, 31 May 2017

The Red Programming Language ....


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 [
    text yellow font-size 14  "Hello world !"
    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  
       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  
       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.


more  to be added here soon ....

7. Other resources.

There is a lot of quality help here - Some Rebol and lots of Red:

more to be added here soon ....

8. What can be achieved with Red
Pretty much anything can be achieved already....

more to be added here soon ....

9. Getting Help when you're stuck 
Just ask and they will help !

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:


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:

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 ....


Thursday, 11 May 2017

The Countess of Computing

The first ever computer programmer

Ok, not about 'Red Programming' this time,  but still might be an interesting read.

As I write this, I'm reminded of a word in a recent forum. It was suggested that I was an atypical programmer.   Atypical.  Meaning:  untypical, non-typical, uncommon, unconventional, unorthodox.  It could also be suggested that 'Red' is an atypical programming language, it's certainly far better and clearly superior to pretty much all of the others.

The Countess of Computing

Ada Lovelace was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine.

Born: 10 December 1815, London - Died: 27 November 1852, Marylebone.

The Countess of Lovelace. Daughter of Lord Byron. The man who was:  'Mad, Bad and Dangerous to know' .

A gifted mathematician, Ada Lovelace is considered to have written the first computer program in the mid-1800s.

Ada’s story is a captivating tale. Not your typical role model: Ada Lovelace the 19th century programmer.   Ahh, There's that word again, was she an atypical programmer.

The daughter of famed poet Lord Byron, Augusta Ada Byron, Countess of Lovelace—better known as "Ada Lovelace"—was born in London on December 10, 1815. Ada showed her gift for mathematics at an early age. She translated an article on an invention by Charles Babbage, and added her own comments.

But although Ada had the mind to see the potential of computers over a century before one was even built, she still doesn’t quite fit the mould of a traditional science heroine. Intelligent she might have been, but she was also manipulative and aggressive, a drug addict, a gambler and an adulteress. Alongside her character flaws, there are also some who still debate the validity of Ada’s accomplishments.

Babbage and the Analytical Engine

Around the age of 17, Ada met Charles Babbage, a mathematician and inventor. The pair became friends, and the much older Babbage served as a mentor to Ada. Through Babbage, Ada began studying advanced mathematics with University of London professor Augustus de Morgan.

Ada was fascinated by Babbage's ideas. Known as the father of the computer, he invented the difference engine, which was meant to perform mathematical calculations. Ada got a chance to look at the machine before it was scrapped, and was captivated by it. Babbage also created plans for another device known as the analytical engine, designed to handle more complex calculations.

Ada was later asked to translate an article on Babbage's analytical engine that had been written by Italian engineer Luigi Federico Menabrea for a Swiss journal. She not only translated the original French text into English, but also added her own thoughts and ideas on the machine. Her notes ended up being three times longer than the original article. Her work was published in 1843, in an English science journal. Ada used only the initials "A.A.L." for Augusta Ada Lovelace, in the publication.

In her notes, Ada described how codes could be created for the device to handle letters and symbols along with numbers. She also theorized a method for the engine to repeat a series of instructions, a process known as looping that computer programs use today. Ada also offered up other forward-thinking concepts in the article. For her work, Ada is often considered to be the first computer programmer.

Ada's health suffered, however, after a bout of cholera in 1837. She had lingering problems with asthma and her digestive system. Doctors gave her painkillers, such as laudanum and opium, and her personality began to change. She reportedly experienced mood swings and hallucinations. Ada died on November 27, 1852.

Ada Lovelace's contributions to the field of computer science were not discovered until the 1950s. Her notes were reintroduced to the world by B.V. Bowden, who republished them in Faster Than Thought: A Symposium on Digital Computing Machines in 1953. Since then, Ada has received many posthumous honors for her work. In 1980, the U.S. Department of Defense named a newly developed computer language "Ada" after Lovelace.

The Ada language is used in Banking, air traffic control systems and also for controlling the United States defence department.

Give me Ada Lovelace every day of the week. A woman who swore and smoked and said what she damn well thought. It’s a beautiful demonstration that whoever you are, whatever your character, there is a place for you in computer science.

At that time It must have been so hard for her to achieve what she did.

I promise lots more 'Red' in my next post. Some of it might even be atypical.


Wednesday, 19 April 2017

The 'Red' Console

Working in the Red Console

    Click on this to make it bigger !


You can cut and paste these examples.

Let's start with the usual 'Hello World'

print "Hello World !"

s: "I am Jenny"
print s

prin s

probe s

Now use the ? to get help

? print
? prin
? probe

Type 'what' at the prompt to get a description of all functions.



name: "Jenny"
print name

num: 36
print num

Assign a block of code to a variable and run it with 'do'

mydo: [print "Hello World"]
do mydo

What about an  'if then'  block

n: 5
if n < 6 [print "Less than 6"]

And an 'either'  true  and  false block 

s: "Yes"
either s = "Yes" [print "It's Yes"] [Print "It's not Yes"]

Using random with the either block

n: random 6
either n < 4 [print "Less than 4"] [print "More than 3"]

ask for input

nm: ask "enter name: "


display the contents of current folder


display the current folder

print ["Current folder:" get-current-dir]


Try these:


More soon!