World: r4wp
[#Red] Red language group
older newer | first last |
Kaj 27-Jun-2013 [8830x5] | Alternatively, you could reuse either img1 or img2 to produce the result image if you don't need them afterwards. That would save the allocation and freeing of the third image |
To make the algorithm foolproof, you could also check that size1 and size2 are equal | |
Apart from the use of as-binary, everything should work. :-) I guess you were thrown by the initialisations: | |
img1: as-binary 0 | |
These are only needed if the later set actions are nested, so your above code doesn't need them | |
Arnold 27-Jun-2013 [8835] | I think Bo is comparing two camera images, always the same source,same size? Adapt Kaj's suggestion anyway, the check costs almost nothing and is worth the trouble. |
Kaj 27-Jun-2013 [8836x2] | Yes |
Arnold, there is not one account for red.esperconsultancy.nl. Each Fossil repository under there has its own account system. But you don't need accounts for reading; they're public repositories | |
Arnold 27-Jun-2013 [8838] | Yes I understand now. Is it possible to have a page linking to all the Red repositories? Alternative is have a special Red-info group with all of the links to various Red sites. The repositories, Issue list, Wish list etc etc. |
Kaj 27-Jun-2013 [8839x6] | The incomplete Contributions page on the Red site is all there is so far |
I was going to set up a bindings site, but Doc wanted me to work on Android support | |
However, as I've explained before, all repositories follow the same naming pattern. If a dependency is #included from a common/ directory it's in the Red-common repository | |
And there's a complete list of all my repositories in my download.r script, which you can use to download and update them all in one go: | |
http://red.esperconsultancy.nl/Red-test/dir?ci=tip | |
Great work on Android, Doc, and nice tweak, Petr :-) | |
Pekr 27-Jun-2013 [8845] | I am surprised that sometimes I can be somehow usefull :-) |
Kaj 27-Jun-2013 [8846] | :-) |
DocKimbel 27-Jun-2013 [8847] | Kaj, thanks! We're about half-way to the full Android Red support I have in mind, but it's already usable if you don't mind going through the Android API. Fortunately, we'll make that part vanish too with some nice high-level abstractions. |
Pekr 27-Jun-2013 [8848x2] | Doc, Henrik asks about RPi support, in case it runs Android. Will it run? |
It's in the FB group .... | |
Kaj 27-Jun-2013 [8850x3] | The Raspberry hardly runs Android |
They say it runs a little, but I've tried it and it's so bad you might as well say it doesn't run | |
Inasfar as it does run, there's no reason Red wouldn't run on it now | |
james_nak 27-Jun-2013 [8853] | Doc, what's your timeline on the full support you have in mind? |
DocKimbel 27-Jun-2013 [8854] | I need to have objects and ports implemented first, so don't expect it before September most probably. |
james_nak 27-Jun-2013 [8855] | Thanks. So it's not as if it is next year. Where can I see the red code for your second hello? |
DocKimbel 27-Jun-2013 [8856] | I've renamed it to `eval`, it's in red/bridges/android/samples/eval/. |
Bo 27-Jun-2013 [8857] | Thanks for the help everyone, esp. Kaj. Changing to 'allocate was all I needed for my program to work. Thanks to Doc for the debugging hint (run from MS-DOS console). Don't know why I didn't think of that on my own. |
james_nak 27-Jun-2013 [8858x2] | Doc, I must be in some other world. Where is red/bridges? |
I checked the pastebin link and saw the code. | |
Kaj 27-Jun-2013 [8860x2] | It's in the dyn-lib-emitter branch. I guess you were looking in master? |
https://github.com/dockimbel/Red/tree/dyn-lib-emitter/red/bridges/android/samples/eval | |
james_nak 27-Jun-2013 [8862] | Kaj, thanks. Yes, I was in master! Perfect. |
Kaj 27-Jun-2013 [8863] | Almost the same as another world ;-) |
james_nak 27-Jun-2013 [8864x3] | When you're lost it is exactly the same. The problem with me is that I come in and out of these conversations and so end up not building on top of previous knowledge. Every trip into red-landia is a new one :-) |
While I am at it, I'm on the dyn-lib-emitter page, is there something I click on to download the entire dyn-lib folder? | |
Nevermind. I just created an account and now see the zip button. | |
Kaj 27-Jun-2013 [8867] | I thought it worked without an account. But I haven't been logged out for a long time |
james_nak 27-Jun-2013 [8868] | I don't know if I am using it correctly but I attempted to run the build.r file (w/o any arguments...I think it builds the "eval.red"). I end up with: Signing apk... 'jarsigner' is not recognized as an internal or external command, operable program or batch file. Aligning apk... Unable to open 'builds\eval-signed.apk' as zip archive |
Kaj 27-Jun-2013 [8869x2] | It should have downloaded the jarsigner and other tools |
Do you have a JDK installed? | |
james_nak 27-Jun-2013 [8871] | Interesting, the lines for downloading that are commented out. I will try it again. I do have the JDK installed as I was doing some driod app stuff a while back. |
Kaj 27-Jun-2013 [8872x2] | Seems a mistake |
Wonder how it worked for Petr | |
james_nak 27-Jun-2013 [8874] | Getting closer. I now have jarsigner but the cmd expected to see it in the root dir. So I just placed jarsigner there along with the jli.dll. That may not be a good idea because it seems to do its thing but finally dies with: Signing apk... Error: Could not find or load main class sun.security.tools.JarSigner Aligning apk... Unable to open 'builds\eval-signed.apk' as zip archive |
Kaj 27-Jun-2013 [8875] | Looks like Doc and Petr had jarsigner already installed with their tool suite |
james_nak 27-Jun-2013 [8876] | At this point I am stuck on the sun.security.tools.JarSigner file issue. |
Bo 27-Jun-2013 [8877] | OK. Next enigma about Red/System that I ran into. Consider the two following sets of code and output. Why are they different? Code 1: im1: as-integer ((img1/r / 3) + (img1/g / 3) + (img1/b / 3)) print-line as-integer ((img1/r / 3) + (img1/g / 3) + (img1/b / 3)) Output 1: ... 96 99 107 111 105 104 100 99 100 98 Code 2: im1: as-integer ((img1/r / 3) + (img1/g / 3) + (img1/b / 3)) print-line im1 Output 2: ... 4260192 4260451 4260203 4260207 4259945 4259944 4259940 4260451 4260196 4260194 |
Kaj 27-Jun-2013 [8878] | The example is not complete. How do you get more than one value? |
Bo 27-Jun-2013 [8879] | This is a loop that processes raw binary image data. 'r, 'g, and 'b are incremented through an 'until loop until the data is all consumed. |
older newer | first last |