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

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 5001 end: 5100]

world-name: r4wp

Group: #Red ... Red language group [web-public]
DocKimbel:
9-May-2013
Anyway, Android is using a 32-bit JVM.
DocKimbel:
9-May-2013
So we shouldn't have a problem there.
DocKimbel:
9-May-2013
It's a remote control for the JVM from Red/System, you can do most 
of what a Java program can do.
DocKimbel:
11-May-2013
Declare your Red/System exported function in a #system-global block.
DocKimbel:
11-May-2013
BTW, I could make the #system-global block implicit there using a 
Red level directive to abtract such code.
DocKimbel:
11-May-2013
I've fixed the crashes on JNI demo a couple of days ago.
DocKimbel:
11-May-2013
The exiting crash is related to running it in a 64-bit JVM, which 
is not supported.
Kaj:
12-May-2013
How about having the compilers recognise a "Type: library" field 
in the Red [] and Red/System [] headers, so you don't have to add 
the -dlib parameter to the command line?
DocKimbel:
13-May-2013
I thought about it already as one of the ways to produce a shared 
lib, in some of my recent scripts there's already a `Type: 'dll` 
header field, but `library` is probably nicer. I will implement support 
for it when I'll find time as it's a minor feature.
Oldes:
13-May-2013
Hi Doc, I was messing around with the PE.

Added section: [.rsrc  [-   #{00000000000000000004000000000000}]] 
in compiler (this should be just empty .rsrc, and trying to build 
it in PE.r using:

oh/rsrc-addr:			section-addr? job '.rsrc
oh/rsrc-size:			length? job/sections/.rsrc/2


but the address is pointing into wrong position (512B less). You 
probably don't know without some deeper examination, what may be 
the reason, do you?

Btw. there should be:
    .rsrc				#{40000040}	;-- [read initialized]

at this line: https://github.com/dockimbel/Red/blob/master/red-system/formats/PE.r#L119
(the section name starts with a dot).
DocKimbel:
13-May-2013
Oldes: adding .rsrc support is not trivial. I have a stashed prototype 
somewhere, I could push it in a new branch for you to look at and 
improve it.
Oldes:
13-May-2013
be able to add just the empty .rsrc section would be a good start.
DocKimbel:
13-May-2013
That base should be enough for a start, the hard part now is to generate 
the resources tree with all the right entries ...far from easy.
DocKimbel:
13-May-2013
rsrc entries contain file offsets and memory addresses, if you plan 
to just insert a blob of data, it won't work.
Oldes:
13-May-2013
Ok.. I will play with it even more for a while before going sleep.
Gregg:
13-May-2013
Is the plan to use .res files? i.e., to have a resource compiler 
that the linker can include?
Gregg:
13-May-2013
*Many* years ago, I wrote a resource compiler in VB. Too long ago 
to have any of it left in my brain, but something might come back 
is .res is the target.
DocKimbel:
13-May-2013
So, yes, we need to build a resource compiler, but the description 
format needs to be specified in Red format.
DocKimbel:
13-May-2013
Do you have a link for the .res format spec?
DocKimbel:
13-May-2013
Looks like Gregg is a good candidate for building such compiler in 
the future. ;-)
Oldes:
13-May-2013
Ok, so the main problem will be, that oh/headers-size = 1024, but 
the pointer to code as a first section is 512. Now I must find why.
Pekr:
14-May-2013
I might miss some basic OS understanding. Guys, how do you work with 
all the path? I have JAVA installed, REBOL installed, yet what I 
am strugling with, is path. When I follow docs, it always seems to 
be easy. Docs state:


do/args %rsc.r "-dlib %bridges/java/JNIdemo.reds -o %bridges/java/JNIdemo"


well, for normal user, in order to try that, user needs to understand, 
he has to start Rebol for that. So there are basically two options:


- running REBOL from icon. Then you have to change-dir to where Red 
is - in my case, something like C:\!Rebol\Red

- I thought, I might use just "pressing ENTER" upon Red.r, which 
launches console for me. But above still will not work, unless I 
change-dir into red-system subdir. It should be imo either stated 
in the docs, or some shortcuts provided, e.g. red-system.r, allowing 
me to launch console directly in that subdir, and then above command 
would run just OK.


I am not stating anything is wronk, it is upon user to improve the 
workflow, but surely it is an obstacle for occassional user.

Now back to docs:

2. Compile and run the JNIdemo.java app from console:

        $ javac JNIdemo.java
        $ java JNIdemo


Well, when in console, my console does not recognise javac, nor java 
executables. Apparently a path problem, but I have JAVA installed 
via installer. So I have to go inside JAVA dir, which means:

cd c:\Program Files (x86)\Java\jdk1.7.0_21\bin\
javac c:\!rebol\!Red\\red-system\bridges\java\

Any tips? :-)
GrahamC:
14-May-2013
type "set" at a dos shell to see if it's there or not.  If not, you 
have to add it.
DocKimbel:
14-May-2013
I never use the association, I always start Rebol scripts from my 
code editor or from the console (I just have a couple of Rebol shortcuts 
to start them in console mode).
DocKimbel:
14-May-2013
%version.r is a data file used by Red compiler, it's not for decoration. 
;-)
DocKimbel:
14-May-2013
Are you using a tool that messes up Red file headers?
DocKimbel:
14-May-2013
The only time when the switching fails is when a versioned file is 
locked by an app (like a code editor sometimes).
DocKimbel:
15-May-2013
This is a higher-level API for controlling Java from Red. Please 
read the commit log:

https://github.com/dockimbel/Red/commit/5d43ad443a0524f91418fe62c0f5e90e3d143f75
DocKimbel:
15-May-2013
Though, this is not the final API I have in mind for Android, as 
I want a cross-platform API.
DocKimbel:
15-May-2013
I will do a prototype wrapping of the Android GUI API in a few days, 
so you'll be able to put your VID-like dialect on top of it. ;-)
Kaj:
15-May-2013
PicoGL is a library that defines four or so functions in which an 
OpenGL program should be defined. Although PicoGL is a dynamic library 
loaded by the program, it expects the program to provide those functions
Kaj:
15-May-2013
#export adds a few bytes to a program not compiled as a library, 
but it doesn't export the specified symbols
Pekr:
16-May-2013
Now question to API. On SO I found comparisong of AWT vs Swing:

... to add a child to an AWT frame you'd write:

   frame.add(child);   


However using JFrame you need to add the child to the JFrame's content 
pane instead:

   frame.getContentPane().add(child);  


How the above function could be invoked via API? Would java-do [frame/getContentPane/Add 
...] work?
Kaj:
16-May-2013
Or perhaps two java-do's in a row should do it. I'm not sure how 
to pass the child object, though
DocKimbel:
16-May-2013
Is bridge class somehow hardcoded somewhere in the API?


Yes, that's a Java/JNI requirement. The name of exported symbols 
from the shared lib have to include full Java class names. Do not 
change the name of Java classes in bridge.java.
DocKimbel:
16-May-2013
However using JFrame you need to add the child to the JFrame's content 
pane instead: frame.getContentPane().add(child);


JFrame is part of Swing, Swing is not AWT. I can't find a getContentPane() 
method for java.awt.Frame class.
Pekr:
17-May-2013
I just looked up an example of how to e.g. obtain contact list, the 
official API way, not via some low level direct SQLite hacks. Found 
following link, since Android 2.0, there is ContactsContract class 
for that. But - those examples are more complex, e.g. obtaining cursor 
to DB and looping via returend list after sending a query.


As to understand our bridge - what we are allowed is mainly to wrap 
objects/classes and their methods. I mean - get them assigned to 
Red words. Then we have ability to invoke their methods. I wonder 
though, how one wraps such example as in the following link: 


http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/


Another question - would it be possible to create JAVA function on 
Red side, wrapping the sourcecode? Think inlining of ASM in C, or 
inlining of R/S code in Red?
Pekr:
18-May-2013
Working in Android Studio a bit, looking into structures, what does 
it support, etc., I can't foresee, what our aproach is going to be, 
so lookinf forward to it. E.g. the IDE generates GUI definitions 
into XML files, ditto various configs, translations. So - what I 
expect is that you create basid .apk with certain featureset, and 
from that on, it will be manipulated from Red side. Justo wondering, 
if we will be able to dynamically generate UI elements, etc? Or will 
you suggest ppl to use your basic .apk, do certain work in Android 
Studio, and the supporting backend in Red? Or is your idea that ppl 
should not need to eventually touch sw like Android Studio?
DocKimbel:
22-May-2013
Yep, that might close a security hole for your TryRed I guess. You 
can also now build true closed-source software using Red. ;-)
Kaj:
22-May-2013
There's a fundamental complaint among Android developers that you 
can't protect your apps against cracking, unlike on iOS, where Objective 
C apps are compiled. Petr showed how easy it is to decompile Android 
Java apps. With Red and the Java bridge, you can reach the same security 
on Android as native iOS apps. This could be an important marketing 
feature for Red
Kaj:
22-May-2013
I'm not sure how it has shifted by now, but a few years ago, when 
Android was already balancing the market share with iOS, Apple still 
had 99% share of all money collected from mobile apps, due to such 
issues
Andreas:
22-May-2013
Until someone writes a decompiler for Red :)
Kaj:
22-May-2013
That's going to be hard. A lot of information will be lost in compilation, 
especially for Red/System code and especially when the compilers 
will do optimisations
DocKimbel:
24-May-2013
On my Raspbian distro, ldd on any Red binaries returns "not a dynamic 
executable" error. I suspect a local setup issue, but I would like 
to see if it works or not on different armhf installs.
DocKimbel:
24-May-2013
Can you try a `ldd` on any Red[/System] binary?
DocKimbel:
24-May-2013
It seems it's either a local issue on my RPi installation or a Raspbian 
issue. Will check that in the next days.
Marco:
25-May-2013
I have written a simple R/S program that simply writes a text file, 
and when I start it from Windows it always opens a shell even if 
there is no "print-ing". How can avoid it?
DocKimbel:
25-May-2013
Playing with Eclipse for Android, it takes about 360MB of RAM when 
running...looks like a bad joke, but it's not.
Kaj:
25-May-2013
That would be a good slogan for Red: "Nobody needs more than 640 
KB"
DocKimbel:
25-May-2013
640KB sounds like a good upper limit for Red. ;-)
Arnold:
25-May-2013
:D 
I think there is a world market for maybe five computers.
 -- Thomas Watson, chairman of IBM, 1943. 
(There are at least 5 computers that run Red code nowadays??)
DocKimbel:
26-May-2013
Marco, can you try it with a simple Red/System program that just 
contains a call to Sleep(1000) (needs to be imported from C lib)? 
So we can see if it's related to Red/System or to your program.
Kaj:
28-May-2013
To get a feel for what Red can currently do, it's best to run my 
GTK-browser example, here in the Red/ folder for your platform:
Kaj:
28-May-2013
It combines most of my bindings to create an alternative for a web 
browser. It's a graphical program that loads pages and apps written 
in Red from our web server and executes them
Kaj:
28-May-2013
Bindings not in there are SDL and OpenGL, for graphical 2D and 3D 
programs, ZeroMQ for network messaging, and some specific extra widgets 
for the GTK+ binding, such as a (real) web browser, two map browsers 
and a PDF and other document viewer
Kaj:
28-May-2013
Just click it. But if you're trying that on a Mac, you have to install 
the dependency libraries first
Kaj:
28-May-2013
Also, hardly anybody has bothered to test on a Mac so far, so you'd 
have the honour of testing if my bindings work there :-)
Geomol:
28-May-2013
So from that page, I get to https://github.com/mxcl/homebrew/tree/master/Library/Formula

a long list of stuff. Down there, I see gtk+.rb, click it, and I 
get to a page, which seems to be some description (or recipe, as 
you mentioned). Then what?
Geomol:
28-May-2013
-e:67: warning: Insecure world writable dir ...

got a couple of those. Any problem?
Kaj:
28-May-2013
Funny, my build system also says that on Syllable. :-) Ruby gives 
that warning; it's not a problem
Geomol:
28-May-2013
The following directories will be made group writable:
...
The following directories will have their group set to admin:
...

Hm, that's a bit disturbing, that it changes my system, isn't it?
Kaj:
28-May-2013
OS X wants to be a Unix, so there you go
Geomol:
28-May-2013
I have a hard time figuring out, what Red is. Is there a simple overview 
somewhere?
Kaj:
28-May-2013
However, my bindings, like Mac Applications, use infrastructure that 
is included in the ancient Unix parts of the system. So a clash appears, 
when that infrastructure is not installed yet
Geomol:
28-May-2013
So Red/System is like a base for Red?
Kaj:
28-May-2013
As I said above, best to run GTK-browser to get a feel for the state 
of Red
Geomol:
28-May-2013
So I'm asking, if I know should write
	brew install gtk+

or what? I suggest that, because I see something similar on the brew 
page:
http://mxcl.github.io/homebrew/
, where they do a
	brew install wget
Geomol:
28-May-2013
Downloading http://tukaani.org/xz/xz-5.0.4.tar.bz2
make install

Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.1

Downloading http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.1
make install
Installing gtk+ dependency: glib

Downloading http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.2.tar
Downloading patches

./configure --disable-maintainer-mode --disable-dtrace --disable-modular-tes
make
make install
Installing gtk+ dependency: jpeg

Downloading https://downloads.sf.net/project/machomebrew/Bottles/jpeg-8d.lio
Installing gtk+ dependency: libtiff
Downloading http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz
make install
...
and a lot in between. continuing...
Geomol:
28-May-2013
It reminds me a bit on my RedHat days.
Geomol:
28-May-2013
cairo is a large download
Kaj:
28-May-2013
If you look in /usr/local/lib do you see new *.a files?
Geomol:
28-May-2013
Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.18.ta
make install
...

a couple GB taken so far, it seems.
Kaj:
28-May-2013
Do you have a 64 bit system?
Kaj:
28-May-2013
There were probably static /usr/local/lib/*.a libraries compiled 
for most of that. Those are perfect for you to link into World
Pekr:
28-May-2013
In a short - Red compiles to Red/System. Red/System is intermediate 
language, which then compiles to native platforms. Red/System can 
also generate shared libraries. It all means, that from Windows, 
you can generate OS-X, Linux etc. programs or libraries.


As for Red itself, it is not only compiled though. Doc's intention 
is to bring in a modern hybrid, which will work as compiled, jitted, 
or interpreted, upon the need of the programmer or the app. So, what 
we have also got is Red interpreter and console too. JIT has yet 
to come.


Recently Red is not complete, Doc took some side-way to bring in 
Android support. That means we had to have shared libraries available 
first, then JAVA/JNI bridge (which is done), nowadays Doc works towards 
generating first .apk. He is on vacation till 3rd of June though. 
After that is done, we will get objects, I/O and parse (IIRC Gabriele 
will write it, just waiting for object support)
Kaj:
28-May-2013
John, it looks like you can supply a --universal option to brew to 
build both 64 and 32 bit versions
Kaj:
28-May-2013
There's a gtk alias for gtk+ :-)
Geomol:
29-May-2013
Some funny slides in there!

How REBOL began 14 years ago...

 - and then an image from the frech revolution with REBOL flags, onto
... and where it is today

 - and the image of a raft at sea with no sight of land, people suffering 
 and great despair.


You need a viking ship in there maybe, sailing off for new adventures 
in a new World.


I feel, Red is a good project, and with BSD license, it should be 
possible to give and take easily, right?
Geomol:
29-May-2013
So I could see World benefit from Red, thinking of JIT-compilation 
or Rebcode kind of feature, and I could see Red benefit from World 
in some of the mezzanines, I've done already, and maybe some of my 
closed source code, that target a certain problem, like the multi-line 
input in the console (blocks and long strings going over more lines). 
And maybe World could even get a garbage collector from Red, as for 
example Gregg ask for in World.
Geomol:
29-May-2013
Licenses kinda sucks, don't they?


When Mozart visited the sixtin chapel in Rome in 1770, he heard a 
secret piece of music, Allegris "Miserere". From memory, he wrote 
the piece down with all 12 voices or how many, when he was back at 
the hotel. Later he received an order from the Pope. Licenses kinda 
remind me of this. Why show or play something for someone else, and 
then at the same time say, you can't use it? :)
Kaj:
29-May-2013
Yeah, it complicates things a lot
Kaj:
29-May-2013
So far I have mostly talked about the ability to write R3 extensions 
in Red and Red/System, because I made a specific bridge for that. 
But with Red's ability to generate shared libraries, you can also 
make generic extensions for other systems, such as R2 and World. 
You can write libraries in Red and then import them with the DLL 
interfaces in World and R2
Kaj:
29-May-2013
But a viking deserves a rune stone in his memory, don't you think?
Geomol:
29-May-2013
I got the red-core interpreter running here btw. That was easy. But 
I miss a HELP function in there.

And I see a lot of functions, so it seems to have come quite a way, 
but no DO of scripts?
Kaj:
29-May-2013
I/O is not in Red, only in my extensions. DO is the internal interpreter, 
so it doesn't know about my I/O. It's a good point, I should try 
to override DO
Kaj:
29-May-2013
You can start a script when you give its name on the command line, 
even a URL
Geomol:
29-May-2013
I think, it would be a lot easier for e.g. Gregg to create mezzanines, 
if he could do a script with them, like cortex.w and rebol.w in World.
Gregg:
29-May-2013
BTW, my Red HELP experiment is here, under %Red/mezz/. You can paste 
it into a Red console to test.
Gregg:
29-May-2013
But also shows that you can still do a lot in Red, even without it. 
Most of the mezz code I did works.
Gregg:
29-May-2013
It's never struck me as a great name. I just always use HELP. e.g. 
HELP function!
Kaj:
29-May-2013
I found a bug in the interpreter that currently prevents me from 
overriding DO:
Geomol:
29-May-2013
World should have a WHY??? :)
Arnold:
30-May-2013
WHAT is to find out what stuff is attached under an object. I use 
(d) it a lot with VID, finding out which field was filled with what 
value to see how I could go about dynamically change the properties 
like captions and values and colors.
Geomol:
30-May-2013
Arnold, isn't that what HELP (or the ? short) is used for? WHAT seems 
to "Prints a list of globally-defined functions.".
Geomol:
30-May-2013
Yeah, I was just thinking, if it makes sense at all to include a 
language like Verilog in the way, Red/System is made today. I haven't 
looked deeper into it. Maybe it makes more sense to create a cross-compiler 
from Red/System to Verilog and such, totally independent of the code 
backend found in Red/System?


Maybe Red/System could be the base for all different kind of hardware.
Gregg:
30-May-2013
I would probably think to implement as a high level dialect in Red 
that compiles down.
Geomol:
30-May-2013
Isn't that the other way around? I want to go from Red/System source 
to Verilog and other similar languages for different hardware. I 
don't want to start with a Verilog program and end up with what Red/System 
produces.
Kaj:
30-May-2013
Doc wants to program FPGA CPUs dynamically one day, so there is a 
sensible route in there somewhere
TomBon:
30-May-2013
Gregg, you have a fine taste of useful tech ;-)

I guess this is a huge task. If you look at the Xilinx ISE Pack and 
the prices they are asking...

There is a free Web version but this one only supports the very small 
units with max. 24k LC, not enough todo usefull things.

But of course a Verilog/VHDL dialect would be more than cool. Meanwhile 
OpenCL/CUDA would be nice as well.
Pekr:
2-Jun-2013
I am for R3 including enhancements, but Doc does not plan to support 
features like to [a | b | c]. Whereas I am almost refusing to use 
parser without it, Doc seem to be against stuff, which would eventually 
slow down the parser. And as the parser will be most probably implemented 
by Gabriele, we might get some compile rules or something like that. 
I am for R3 compatibility though ...
5001 / 6460812345...4950[51] 5253...643644645646647