• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
15-Jun-2012
[554]
Hehe :-) For the core language, from user perspective, it will be 
very similar. For the external libs (GUI mainly), Red will provide 
different options. For more detail, you can re-read all the slides 
from the two presentations I've made for Red.
Gerard
15-Jun-2012
[555]
@Doc : No better success even if running from NativeEXE.apk version 
0.5 and Android version 3.2 - will continue to read before being 
able to investigate myself what could be done - Please don't loose 
your time on this case for now - You have much better  to do ... 
even if it's annoying a bit. I don't despair but I really can't be 
useful to you for now... my understanding of the inner working of 
this stuff exceeds my current capabilities !
Andreas
17-Jun-2012
[556]
a "hello world!" written in and compiled by red/system running on 
a raspberry pi:

[pi-:-raspberrypi]:~$ ./hello-reds.arm 
hello from red/system!

([pi-:-raspberrypi]:~$ uname -a

Linux raspberrypi 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l 
GNU/Linux)
Henrik
17-Jun-2012
[557]
Nice :-)
Pekr
17-Jun-2012
[558]
cool :-)
DocKimbel
17-Jun-2012
[559]
Does the provided hello.reds script work too?
Andreas
17-Jun-2012
[560]
hello.reds works as well, yes.
GrahamC
17-Jun-2012
[561]
who's raspberrypi ?
Pekr
17-Jun-2012
[562]
I expect it's Andreas' RaspberryPi, as Doc tweeted, that his is still 
undelivered?
Andreas
18-Jun-2012
[563]
Mine, yes.
Bas
20-Jun-2012
[564x2]
There is now also an English page on Wikipedia about Red:
http://en.wikipedia.org/wiki/Red_%28programming_language%29
Endo
20-Jun-2012
[566x2]
Cool!
we can add red-lang.org and cheyenne-server.org links to the external 
references.
Kaj
20-Jun-2012
[568x2]
red-lang.org is there. Cheyenne doesn't have much to do with Red 
yet
However, Windows, OS X and Android are missing from the OS entries
Endo
21-Jun-2012
[570]
we can copy/paste "about" section from http://www.red-lang.org/p/about.html
as well.
Kaj
21-Jun-2012
[571]
Be careful with that. The Red site is speaking in the future. Wikipedia 
will not regard that as encyclopedic information
Endo
21-Jun-2012
[572]
I see. So we will put those information after Red is completed.
Evgeniy Philippov
22-Jun-2012
[573x2]
It would be interesting for RED to be a strict superset of REBOL...
It is interesting what does DocKimbel think about such possibility...
Kaj
22-Jun-2012
[575]
You're right: as a compiler, it can't be
DocKimbel
27-Jun-2012
[576x2]
Bas: great work, thank you!
Evgeniy: I am not sure if a strict superset of REBOL is doable in 
Red without introducing some important runtime overhead, making the 
compilation approach much less efficient, so less useful. I'll try 
to push it as far as possible and will stop when we loose too much 
performances.
Pekr
27-Jun-2012
[578]
Hello Doc - how are you doing, lately? Still busy with the non-red 
related contract? :-)
DocKimbel
27-Jun-2012
[579]
Unfortunately yes, but it should end in about ten days, so I could 
finally get back to the interesting stuff. I'm becoming an MQL4 language 
expert now, and I really don't like that (even if it can make me 
see some interesting niche opportunities for a Red dialect). ;-)
Pekr
27-Jun-2012
[580]
Well, as for dialects, I still can see PARSE as a secret weapon. 
Hopefully Red gets to R3 or Topaz level, as far as parsing goes. 
We could create some dialects for niches, I think ppl would see the 
advantage ...
Rebolek
28-Jun-2012
[581x2]
It's possible to do something like [s: make c-string! 1000] in Red? 
So I would reserve 1000 bytes long c-string?
I tried declare but that leaves me with empty c-string!
PeterWood
28-Jun-2012
[583]
I haven't found away to pre-allocate memory for a c-string! in Red/System 
except by initialising a string.
Rebolek
28-Jun-2012
[584]
ah, that's unfortunate. thanks
DocKimbel
29-Jun-2012
[585]
Red/System has no memory manager. You need to use the allocate/free 
wrappers provided by the runtime (see %Red/red-system/runtime/libc.reds). 


Once Red's memory manager will be stable, we could easily add some 
simple functions to make it available from Red/System too, so you'll 
be able to either manually manage memory or rely on Red's memory 
manager (including being able to call the GC).
Rebolek
29-Jun-2012
[586x2]
Ah, great! Thanks.
How can I get address of c-string! variable?
DocKimbel
29-Jun-2012
[588]
c-string! variables are memory pointers, so you're already manipulating 
the address. ;-)
Rebolek
29-Jun-2012
[589]
yes, but if I want that adress for another purpose like copy-memory 
function?
DocKimbel
29-Jun-2012
[590]
Just pass the variable name.
Rebolek
29-Jun-2012
[591]
I tried but ended with:

*** Compilation Error: argument type mismatch on calling: copy-memory
*** expected: [pointer! [byte!]], found: [c-string!]
DocKimbel
29-Jun-2012
[592]
You need to make a type casting: as byte-ptr! <variable>
Rebolek
29-Jun-2012
[593]
ah, thanks!
DocKimbel
29-Jun-2012
[594]
byte-ptr! is just a macro for [pointer! [byte!]] which is a bit more 
generic type than c-string!
Rebolek
29-Jun-2012
[595x2]
yes, that works. Thanks very much!
another question :) how to get pointer to integer! ? as byte-ptr! 
converts the value and doesn't return address.
DocKimbel
29-Jun-2012
[597x3]
just use: as-integer <byte-ptr! variable>
Ah sorry, not what you asked for...
The get-word! syntax for integer! variables hasn't been implemented 
yet. So currently, the only way (AFAIR) is to wrap your integer! 
in a struct! (as you would do in REBOL).
Rebolek
29-Jun-2012
[600]
I see, thanks.
Kaj
29-Jun-2012
[601x2]
There are several *-reference! types defined in my C library binding 
that do that:
integer-reference!:				alias struct! [value [integer!]]
GiuseppeC
5-Jul-2012
[603]
Hi Doc,

   I have found the time to view the documentation of RED/System on 
   your site.

   Red/system brings the expressiveness of REBOL in a low level language.

   I see there is no object orientation capabilities into this language. 
   Is it planned ? Otherwise, as a programmer, why you dont find it 
   usefull ?