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

World: r4wp

[#Red] Red language group

Kaj
8-Feb-2013
[5499]
What is your goal?
Kaj
9-Feb-2013
[5500]
Doc, could you bring lex-scope up to date with master? Then I can 
start testing it
DocKimbel
9-Feb-2013
[5501]
Done.
Kaj
9-Feb-2013
[5502]
Thanks! Been anxiously awaiting those fixes
DocKimbel
9-Feb-2013
[5503]
I'm working on fixing #405 too in the lex-scope branch. Once that 
done, I will merge it in master if there is no regression.
Kaj
9-Feb-2013
[5504]
I figured so
DocKimbel
9-Feb-2013
[5505]
I might add #374 too the list too as it is related to scoping.
Kaj
9-Feb-2013
[5506x4]
I hoped so :-)
No build regressions in a full build run
Oddly, there's a build regression in a GTK program just for Syllable, 
which is not even a valid combination
I can't replicate it
Bo
10-Feb-2013
[5510]
I want to be able to compare two images pixel-by-pixel.
Kaj
10-Feb-2013
[5511x4]
Ah, that's relatively easy, because you don't have to know the image 
format. At least not if you can compare byte values instead of strict 
pixels
So you only have to look in the GDK/GLib headers to finish the image! 
struct definition enough to know the data length
Have to run
Do you only want two know if two images are the same? Then why not 
just read the files and compare them?
Bo
10-Feb-2013
[5515]
Actually, I want to know which pixels are different between the two 
images. Thanks for the tips!
Kaj
10-Feb-2013
[5516x2]
You'd have to know GDK's internal image format, then
Perhaps there are more suitable functions in Oldes' ImageMagick binding
Bo
10-Feb-2013
[5518x2]
I'll take a look.
Looks like ImageMagick will do the trick, if I can just figure how 
to translate the tutorials from C to Red/System.
DocKimbel
11-Feb-2013
[5520]
Kaj: are we good with the fixes in lex-scope branch? If all is fine, 
I will merge it tonight.
Kaj
11-Feb-2013
[5521]
Yep, it's starting to look good. I'll build the examples once more
DocKimbel
11-Feb-2013
[5522]
Great, I'll add a few binding tests from the tickets, then I'll do 
the merge.
Kaj
11-Feb-2013
[5523x3]
No build problems
I'm happy to report that literal arguments work now. For example:
cycle: func ["Cycle a series through its index."
	'series [word!]
	/local s
][
	either tail? s: get series [
		set series  next head s
		first head s
	][
		set series  next s
		s/1
	]
]
DocKimbel
11-Feb-2013
[5526x2]
Nice one!
Branch `lex-scope` merged in master.
Kaj
11-Feb-2013
[5528x2]
It seems that the optional attributes and function description are 
swapped in Red/System compared to REBOL. Is that intentional?
http://www.rebol.com/r3/docs/concepts/funcs-defining.html#section-1
DocKimbel
11-Feb-2013
[5530x2]
Yes, it makes it easier and faster to find optional attributes this 
way.
We could change it though, it's no significant impact on the compiler.
Gregg
11-Feb-2013
[5532]
I believe REBOL allows either order, so it's just the docs that say 
it has to be that way.
Kaj
11-Feb-2013
[5533]
I like the REBOL order better in the formatting of the program
Gregg
11-Feb-2013
[5534x2]
I can see arguments both ways. Attrs are short, and having them first 
makes them easier to see, because they will be used far less than 
doc strings. OTOH, being used less makes them feel "more optional" 
than doc strings, hence could come after the doc string.
This would be a great question for Carl, as to why he did it the 
way he did it in REBOL. That is, allowing either order.
Kaj
11-Feb-2013
[5536x2]
I like to put the function description on the same line as the function 
name, so it's easy to scan through a program text for them. Having 
the attributes in front of it makes the line too long and hides the 
atrributes in the text
So when there are attributes, I have to move the description in line 
with the arguments, where it becomes hidden because it's not lined 
up with the other function descriptions
DocKimbel
12-Feb-2013
[5538]
Kaj: I've pushed a change in attributes handling for Red/System functions, 
you can now specify attributes or function's description doc-string 
in any order. I've replaced direct spec block access for attributes 
by a function call in deep compiler's code parts, so watch out for 
regressions especially in callbacks!
Kaj
12-Feb-2013
[5539]
Fast response, thanks!
Bo
12-Feb-2013
[5540]
Pekr mentioned on 7-Jun-2012 in this group that an OpenCV binding 
was coming, but I can't find it anywhere.  Does anyone know if it 
exists?
Kaj
12-Feb-2013
[5541]
Good question. I have no idea where Petr pulled that from
DocKimbel
12-Feb-2013
[5542x2]
OpenCV binding is done by François Jouen, it's a work in progress. 
There's a Red/System version that you could find from this page (in 
french):


http://www.digicamsoft.com/cgi-bin/rebelBB.cgi?thread=%3C25May2012200150764026200%3E


There's a Red version that François sent me privately a few days 
ago for testing, but I haven't had the time yet to review it.
François showed me a few nice demos done with that binding a couple 
of weeks ago when I visited him in Paris. He had some camera-controlling 
and image recognition demos done from Red(/System).
Bo
12-Feb-2013
[5544x2]
Any chance he'd be willing to share his Red/System code?  I want 
to do something similar, and it would be great if I could see working 
examples!
Oh, I see he has a samples.zip file in that link you posted above.
DocKimbel
12-Feb-2013
[5546x2]
Right.
I will ask him for the latest version tomorrow.
Kaj
12-Feb-2013
[5548]
Very cool