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

World: r4wp

[#Red] Red language group

GrahamC
8-May-2013
[7621]
which is why we, who are not intimately involved in this project, 
need more detailed docs :(
Kaj
8-May-2013
[7622]
PRINT has been standard in REBOL languages for a decade and a half, 
and half a century in other software...
GrahamC
8-May-2013
[7623]
And in View brings up a console to print to
Kaj
8-May-2013
[7624x2]
Only on Windows, so that's non-standard
Anyway, if you try GTK-IDE, you'll get output in the window
Pekr
9-May-2013
[7626]
LOL, nice exchange - where have you expected print to happen? - On 
my printer :-)
Arnold
9-May-2013
[7627]
CGI is possible indeed. I did a small tutorial a while ago: http://arnoldvanhofwegen.com/blog/simple-red-cgi-scripting-possible/
GrahamC
9-May-2013
[7628]
Do you want to add using it with GET and POST ?
Arnold
9-May-2013
[7629]
Very much so and connecting it to my MySQL database as well! But 
that is not yet possible at this time. I do not see a use for a form 
if I cannot save information from it.

R2 has all these possibilities, on rebol.org are various examples 
of scripts. For Red we might train our patience muscle of finance 
Nenad in the 'right' direction.
Pekr
9-May-2013
[7630]
We can finance Doc anyway, but - he knows his priorities, and imo 
CGI is not one of them right now :-) Well, Red still needs some other 
basic stuff, namely objects, I/O (files, networking), parse ... we 
are getting there, it will just take some time ....
GrahamC
9-May-2013
[7631]
Kaj says CGI is possible using get-env to retrieve the request data
DocKimbel
9-May-2013
[7632x4]
CGI support is trivial, you don't need me to add it to Red.
First release of prototype low-level bridge with Java world:

https://github.com/dockimbel/Red/tree/dyn-lib-emitter/red-system/bridges/java
This is a low-level interface suitable for Red/System. Red will have 
a higher-level abstraction layer for interacting with Java.
This has been tested on Windows only currently, let me know if there's 
issues on other platforms.
Pekr
9-May-2013
[7636x2]
Can't somehow build it ....
do/args %rsc.r "%bridge/java/JNIdemo.reds -o %bridge/java/JNIdemo" 
... there's a typo, should be %bridges/
DocKimbel
9-May-2013
[7638x3]
You need to have the JDK installed.
Ah thanks!
Fixed.
Pekr
9-May-2013
[7641x2]
Don't want to have JDS installed :-)
I got exe, it just prints nothing ... wouldn't I be fine with jus 
same JAVA libs?
DocKimbel
9-May-2013
[7643]
Exe??
Pekr
9-May-2013
[7644]
>> do/args %rsc.r "%bridges/java/JNIdemo.reds -o %bridges/java/JNIdemo"

-= Red/System Compiler =-
Compiling bridges/java/JNIdemo.reds ...

...compilation time:     114 ms
...linking time:         4 ms
...output file size:     6656 bytes
...output file name:     bridges/java/JNIdemo.exe
DocKimbel
9-May-2013
[7645]
Sorry, forgot to add the -dlib option in the README.
Pekr
9-May-2013
[7646]
ok ...
DocKimbel
9-May-2013
[7647]
Fix pushed.
Pekr
9-May-2013
[7648]
JNIdemo.dll
DocKimbel
9-May-2013
[7649x2]
Right.
Now you need to compile the Java side.
Pekr
9-May-2013
[7651]
you mean JNIdemo.java, right? And for that, I need JDK installed 
....
Andreas
9-May-2013
[7652]
Someone can also send you the compiled .class file, but you'll at 
least need the JRE installed :)
DocKimbel
9-May-2013
[7653x2]
Yep.
Right, if you need to install Java, go for the JDK instead of the 
JRE.
Pekr
9-May-2013
[7655x2]
My idea is, that I don't need JAVA at all, and that Red compiler 
spits out final app for me :-)
well, I mean - that I don't need JDK, just typical JAVA client installation 
...
DocKimbel
9-May-2013
[7657]
Andreas, does it work on Linux for you? It seems there's a library 
path access issue there.
Andreas
9-May-2013
[7658x2]
That's the JRE.
(@Pekr ^^)
Pekr
9-May-2013
[7660]
JRE is typically installed on Windows machines, but not sure nowadays. 
But I somehow has it insatlled on my notebook ...
Andreas
9-May-2013
[7661]
@Pekr: http://bolka.at/2013/red/JNIdemo.class(compiled with Java 
7; hope that doesn't cause problems).
DocKimbel
9-May-2013
[7662x2]
Pekr: if you want to put yourself in the end-user shoes only, then 
just forget about this Java stuff until we get full Android support. 
If you want to test the steps in the meantime, just install the JDK.
Andreas, you need to publish the events.class file too, or they won't 
be able to close the window. ;-)
Pekr
9-May-2013
[7664x2]
downloading JDK, but good to know, that end users will not need to 
fight all that stuff ...
well, what is the .class file good for anyway, even if I have JRE?
Andreas
9-May-2013
[7666]
The .class file is Java's "exe".
DocKimbel
9-May-2013
[7667]
Java 7: I think I've relied on Java 6 docs, but it should work as 
these are old APIs.
Andreas
9-May-2013
[7668]
http://bolka.at/2013/red/events.class
DocKimbel
9-May-2013
[7669]
Hmm, on second thought, Pekr, if you don't know what .class are, 
maybe don't bother with JDK then...;-)
Andreas
9-May-2013
[7670]
With the JRE, you can run code in .class files.