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

World: r4wp

[#Red] Red language group

DocKimbel
24-Apr-2013
[7231]
Once we merge %red.r and %rsc.r, I will look into encapping the whole 
thing, so we'll be able to start distributing Red as a unique binary 
file.
Endo
24-Apr-2013
[7232]
Yeah it will be great. People can try Red & R/S easily then.
DocKimbel
25-Apr-2013
[7233]
ZLib binding for Red/System released by Bruno:

https://github.com/dockimbel/Red/tree/master/red-system/library/zlib
Pekr
25-Apr-2013
[7234]
Looking at http://www.red-lang.org/p/contributions.htmlit seems 
to me, that Red has more bindings, than for R2 + R3 combined :-) 
Maybe just an impression, as I miss such a conscise list on rebol.com 
website ....
Kaj
25-Apr-2013
[7235]
That page is incomplete...
Marco
25-Apr-2013
[7236]
Am I doing something wrong with this?:
Red/System []
mem: declare pointer! [byte!] len: 10
while [all [0 < len: len - 1]][mem: mem + 1]


*** Compiler Internal Error: Script Error : get-function-spec expected 
name argument o
f type: word
*** Where: get-type
*** Near:  [either 'op = second get-function-spec]
Arnold
25-Apr-2013
[7237]
What are you filling mem with?
Marco
25-Apr-2013
[7238x2]
I am not filling mem, that is only an extract of my code (a part 
of a search function).
Why the compiler gives an error?
Arnold
25-Apr-2013
[7240x3]
Could be it is a compiler error, the message suggests it imho.
Pointers are not my specialty :(
Have you previously done a while loop in Red/System like that? Try 
it a little simpler while [0 < len][mem: mem + 1 len: len - 1] to 
be sure it is not the combined statement that is confusing the compiler. 
(Just trying to help here until the real experts jump in)
Marco
25-Apr-2013
[7243]
It seems the all [] inside the while test block the problem, so how 
can I do more then one test inside it?
Kaj
25-Apr-2013
[7244]
Assignments can't be embedded, so you have to split them out into 
a separate expression
Arnold
25-Apr-2013
[7245]
put all [] in a block too?
Kaj
25-Apr-2013
[7246]
len: len - 1  len > 0
Arnold
25-Apr-2013
[7247]
keep it simple
Kaj
25-Apr-2013
[7248]
The ALL [ ] is not needed
Arnold
25-Apr-2013
[7249]
Good thing Red isn't called Green (as in combined blue and yellow)

The all [] was meant to be a test to see if Red/System can handle 
it?
Kaj
25-Apr-2013
[7250]
It can, but it's not needed here
Arnold
25-Apr-2013
[7251]
yep
Marco
25-Apr-2013
[7252]
Not needed here but the original was:
while [all [mem/1 <> string/1 0 < len: len - 1]][mem: mem + 1]
Kaj
25-Apr-2013
[7253]
while [len: len - 1  len > 0]
Arnold
25-Apr-2013
[7254]
so try

while [all [mem/1 <> string/1 len: len - 1 0 < len]][mem: mem + 1]
Kaj
25-Apr-2013
[7255]
while [len: len - 1  all [mem/1 <> string/1  len > 0]]
Arnold
25-Apr-2013
[7256]
6 seconds, you are fast Kaj!
Kaj
25-Apr-2013
[7257]
It has taken 45 years for someone to say that to me :-)
Marco
25-Apr-2013
[7258]
Ok, understood.
Kaj
25-Apr-2013
[7259]
I would like to have that feature in Red/System v2 :-)
Arnold
25-Apr-2013
[7260x2]
Poor Marco! Hope this is still helpful!
I think those 'features' are confusing (and bad practice)
Even while [len: len - 1 0 < len] or while [0 < len len: len - 1] 
is terrible if you ask me. Luckily you do not ask me. :)
Kaj
25-Apr-2013
[7262x2]
You mean the features that define REBOL?
while [0 < len len: len - 1] doesn't work, either in Red/System or 
in REBOL
Arnold
25-Apr-2013
[7264]
I mean code like 0 < len: len - 1 is confusing to me.
Kaj
25-Apr-2013
[7265]
That's a good functional programming idiom that REBOL and Red support. 
Without it, they wouldn't really be functional languages
DocKimbel
25-Apr-2013
[7266]
Adding to Kaj's reply, assignments in Red/System are not returning 
anything, so they can't be used in ANY or ALL blocks. This is something 
we'll change in 2.0 (maybe even before if it's possible without rewritting 
most of the compiler).
Kaj
25-Apr-2013
[7267]
Good news
DocKimbel
26-Apr-2013
[7268x3]
Shared library generation for MacOS X has been released.
Use -t DarwinSO as compilation target for now. Some details needs 
more work and I will probably change the naming scheme for shared 
libraries targets.
Don't use -dlib compilation option as it won't activate all the required 
flags for non-Windows platforms. This should be fixed tonight.
Kaj
26-Apr-2013
[7271x3]
I found out that not only does Red not support Unicode, it doesn't 
support Latin-1, not even on Windows
Both the compile time and runtime lexers don't let Latin-1 through
I've relabeled my console versions as supporting only ASCII
Paul
26-Apr-2013
[7274]
Hey guys was just thinking.  Why not a RED group on linkedin.com? 
 Doc you should start one up.  I'll definatley join and think many 
here would.  Would be another outlet to get more discussion with 
those outside of the usual outlets.
Arnold
26-Apr-2013
[7275]
Good idea. I would join from the start. But better maybe in a later 
stage of the development? When it is more appropriate to attrackt 
more outside momentum because there is even more Red to show to the 
world? After Red becomes really selfsupporting? It seems to me all 
the other channels are taking a lot of time for Nenad as is.
Paul
26-Apr-2013
[7276]
It's low maintemance - more a badge of recognition for the time being 
but since Doc updates the red-lang.lorg site may just as well put 
those posts in the linked group also.
Gregg
26-Apr-2013
[7277x2]
I don't use it, but isn't it more for business networking? Not saying 
it would be bad to show that people use Red (when that time comes), 
but I don't know how appropriate it would be for language discussion.
If Doc needs to do updates another place, that's not good, as we 
need to help keep him focused. If someone else is responsible, that 
would be best.
Pekr
26-Apr-2013
[7279]
What we need is more activity on Facebook as well. Just look when 
last message was posted. Ppl are grateful for any kind of news ....
DocKimbel
26-Apr-2013
[7280]
Gregg: +1