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

World: r4wp

[#Red] Red language group

DocKimbel
25-Aug-2012
[1426x3]
My personal favorite is Blender, I'd very much like to add Red/System 
support to it (and kick out Python later when Red will be there). 
;-)
But bridging with Android and iOS is high priority, so Blender will 
wait.
BTW, best option for bridging with Java can be discussed here (on 
the ML). I'm not sure anymore that the JNI way is the best one...
Pekr
25-Aug-2012
[1429]
What I still think is, that we need strong parse. It is very cool 
technology. Yes, I dare to call it a technology. We need r3 level 
parse. Then we can create dialects, and show other guys, that dialecting 
is a cool concept. Pity we were not able to capitalise on it more, 
mainly due to closed nature of R2 possibilities to bind to other 
environments .... you imo :-)
DocKimbel
25-Aug-2012
[1430]
*(or on the ML)
Pekr
25-Aug-2012
[1431x2]
you = just
some kind of brige is required, if we want to get into an Android 
API. Ditto for .NET?
DocKimbel
25-Aug-2012
[1433x3]
Yes
Same issue.
I have added a sample program for those who want to play with DLL 
generation:


https://github.com/dockimbel/Red/blob/dyn-lib-emitter/red-system/tests/shared-lib.reds
Kaj
25-Aug-2012
[1436x2]
I've looked at the Blender interface, but it's rather big and complex
Petr, I think we need Topaz level PARSE :-)
Pekr
25-Aug-2012
[1438x2]
you used -dlib option, does it replace -t one? Not skilled here, 
but - can I generate e.g. ARM executable/library from Windows Red/System? 
Or is target environment needed?
Topaz has even better parse than R3?
Kaj
25-Aug-2012
[1440]
I don't know if it's complete, but it goes beyond REBOL
Jerry
25-Aug-2012
[1441]
Doc, this page can be updated because of the support of DLL generation. 
http://www.red-lang.org/p/roadmap.html
Kaj
25-Aug-2012
[1442x6]
Also, 4.8 in the documentation:
As c-string! and struct! are already implicit pointers, the only 
pointed datatypes allowed are integer! and byte! (logic! pointer 
is not needed).
Outdated since float support
4.8.2:
Pointer declaration is only required for local pointer variables 
in functions' specification block. In such case, the datatype declaration 
can be omitted and left to the inferencer to guess.
This seems to contradict itself
DocKimbel
25-Aug-2012
[1448x7]
Blender: yes, API is huge and it's a lot of work, but I'm convinced 
that Red, with appropriate dialects, would do wonders there and it 
could be a great way to make Red known.
-dlib option: it's just set the flag to produce shared library instead 
of executable.


-t option: sets a target which is just a handy way to group several 
options together (most options don't have a specific command-line 
switch).
can I generate e.g. ARM executable/library from Windows Red/System?


You can cross-compile ARM/ELF code from Windows or MacOSX, just use 
the appropriate target (https://github.com/dockimbel/Red). Currently 
there's only two ARM targets: Linux-ARM and Android. You can cross-compile 
to these targets from any platform Red/System compiler works on.
When Windows for ARM will be out, I guess we'll need a few modifications 
to PE emitter to support it. Does anyone know if Windows8/ARM beta 
versions are available somewhere?
Jerry: roadmap updated.
Re 4.8 in docs: I agree it's messy...improving that right now.
Done.
Gregg
26-Aug-2012
[1455]
I know I'm late to the game, but temp.dll works here (win7 x64). 
If needed, I can pull up an XP x64 box to test.
DocKimbel
26-Aug-2012
[1456]
Gregg: thanks for taking the time to test it. I think it won't be 
needed for XP x64 as we know it works on XP 32-bit and W7 x64 already.
Rebolek
27-Aug-2012
[1457x2]
Doc, I can confirm that the DLL works now. Thanks!
Well that was too soon. If I compile your example (%shared-lib.reds), 
I cannot load it into R2 (R2 crashes). If I comment all the on-* 
actors, I can load the lib, but I cannot access any values from the 
lib (foo, bar, i has no value).
DocKimbel
27-Aug-2012
[1459x2]
Rebolek: I can reproduce the crash, looking into it....
(I'm pretty sure it was working last time I've tested shared-lib.reds 
script)
Rebolek
27-Aug-2012
[1461x2]
And are you able to use the exported values (foo, bar, i)?
Ah, nevermind, I had an error in my test script, exported values 
work.
DocKimbel
27-Aug-2012
[1463]
It seems there are some remaining bugs in on-* callbacks, probably 
registers saving issue...still investigating...
Rebolek
27-Aug-2012
[1464]
So I've got this working:

>> foo: make-native [a [integer!] return: [integer!]][a + 1]
>> equal? 124 foo 123
== true


Still needs some work before publishing, but it shouldn't take long.
DocKimbel
27-Aug-2012
[1465x2]
Great! :-)

I'll push a fix for the on-* issue in a couple of minutes.
Fix pushed, let me know if you see regressions.
MagnussonC
27-Aug-2012
[1467]
Is Rebols GUI code (view etc) going to be usable in Red? Or is it 
going to something completely different? A while back I think there 
was talk of an dedicated Red editor (Reditor?). Is this still included 
in the roadmap?
Pekr
27-Aug-2012
[1468x2]
I think that guys had some kind of GUI in mind, or maybe more specifically 
- some GUI targets, as e.g. html5, etc., being native on target devices. 
Myself, I would support and sponsor bit a View plus VID3 transition 
towards the Red, but not sure if someone would pick up. So - in the 
end, some "GUI" might appear ....
... but GUI is not a priority right now I think ....
Henrik
27-Aug-2012
[1470]
It's important to distinguish between View and VID, and I assume 
that any kind of graphics engine can be implemented. I would personally 
like a View/VID like clone without the design flaws, but there is 
probably no hindrance in using GTK+ or whatever.
Kaj
27-Aug-2012
[1471]
I'm not sure it's useful to repeat this, because people seem to wipe 
their memory and start over the discussion, but:

- Red's roadmap includes binding to native GUIs. That means there's 
supposed to appear a binding for every platform Red is ported to. 
The intent is to try to create one dialect that would be able to 
drive all these native bindings. This would be a common denominator 
dialect.

- Some of those GUIs are actually cross-platform, such as GTK and 
Enlightenment. so those can figure as a cross-platform GUI. They 
could offer more functionality than the common denominator dialect 
but still be cross-platform.
Pekr
27-Aug-2012
[1472]
I can't accept anything so bloated as GTK or Enlightenment, hence 
I will voter for View clone anyday .... but the "architecture" of 
the plan sounds reasonable ...
Kaj
27-Aug-2012
[1473]
You don't have to accept anything: the roadmap calls for a binding 
to the platform you already work on
Robert
27-Aug-2012
[1474x2]
I'm not convinced with the native GUI bindings. A lot of framework 
have tried it too and it's a lot of work to bridget the gaps. Or 
if the least common denominator is becoming to small the native look 
& feel won't help since the app feels crippeled anyway: Why don't 
they use widget ABC here?
Porting / binding R3 GUI to Red shouldn't be hard to do. It's a lot 
of work but we would get a simple and fast to use GUI. One of the 
major USPs of Rebol. I don't know any other simple to use interpreter 
that gives you a GUI out of the box. And, in these app days, it's 
no longer so critical to support native look & feel in all aspects.