World: r4wp
[#Red] Red language group
older newer | first last |
BrianH 30-Sep-2012 [2382] | Well, if using an unmodified engine that is already installed is the goal, SQLite 4 is out. |
Kaj 30-Sep-2012 [2383] | Just give it time |
kensingleton 1-Oct-2012 [2384x3] | Hi guys - I am trying out Red/System and all seems very good until I try out Kaj's fibonacci and mandelbrot functions. I downloaded the c-library -sorted the paths and locations and tested the library on simple things and all compiles well. When I try to compile fib and mandel I get the following compilation error: |
>> do/args %rsc.r "%tests/mine/fibonacci.reds" Script: "Red/System compiler wrapper" (none) -= Red/System Compiler =- Compiling tests/mine/fibonacci.reds ... Script: "Red/System IA-32 code emitter" (none) *** Compilation Error: alias name already defined as: [str uct! [ item [c-string!] ]] *** in file: %runtime/common.reds *** at line: 61 *** near: [ str-array!: alias struct! [ item [c-string!] ] typed-value!: alias struct! [ type [integer!] value [integer!] _padding [integer!] ] ] | |
Any suggestions as to what I am doing wrong? | |
Pekr 1-Oct-2012 [2387] | Most probably the binding was not tested for quite some time, and Red + Red/System evolves, so there might be some regression there. Better wait for experts, though ... |
DocKimbel 1-Oct-2012 [2388] | Ken: thanks for giving it a try. We might have left these two scripts lagging behind. Anyway, you'll have that fixed during the day (the good side of having a fast pace). ;-) |
Pekr 1-Oct-2012 [2389] | Go Doc, Go! :-) |
kensingleton 1-Oct-2012 [2390x2] | Thanks guys, for the speedy replies |
Doc, I think the work you are doing is superb and Red is a very exciting project - thankyou! | |
Kaj 1-Oct-2012 [2392] | I test the bindings and examples regularly, so they should work. I'll check, but which version of Red/System are you using? |
kensingleton 1-Oct-2012 [2393] | I am using the version downloaded from Github a couple of days ago "v0.2.6-39-gfc5c4a3" |
Kaj 1-Oct-2012 [2394x2] | Both the Fibonacci and Mandelbrot examples work with the current dyn-lib-emitter branch of Red/System, and I tested them for the 0.2.6 and 0.2.5 releases, so they should work there, too |
Did you install the extra Red-common Fossil repository that the C library binding now needs? (See the Announce group here) | |
kensingleton 1-Oct-2012 [2396x2] | Ok - I downloaded the examples by copy and paste from the examples in the Files section of the C Library Binding for Red - is this the correct way to access the examples as well as the c-library or is there another way? |
I am running on Windows 8 64 bit by the way | |
Kaj 1-Oct-2012 [2398x4] | Currently, the Red-common repository goes into a common/ subdirectory but the Red-C-library repository goes into a Red-C-library/ subdirectory |
It's much easier to download a repository as a Zip package or tarball. Go to a particular version or check-in and use the download links there | |
It's even better to check out the repositories with Fossil, so you can keep them up to date easily: | |
http://rebol.esperconsultancy.nl/documentation/how-to-use-Fossil.html | |
kensingleton 1-Oct-2012 [2402] | Ok - I am confused - are we talking about getting Red/System now, or your c-library bindings and examples? I downloaded Red/System from Github, the zipped version using the supplied button. Then when I had all that working I went to the Red blog site - contributions - c library binding - and downloaded your c-library etc from there using copy and paste |
Kaj 1-Oct-2012 [2403] | No, my bindings |
kensingleton 1-Oct-2012 [2404] | I will have a look into using Fossil and try again - it may be that the examples I have obtained are out of sync with the examples obtained through fossil - once I have figured it out I will try again and let you know my results -thanks for your help |
Kaj 1-Oct-2012 [2405x2] | There is little opportunity for being out of sync, as I tested them all the time |
Most likely, you have put files in different places then they're supposed to be, and the paths are now wrong | |
kensingleton 1-Oct-2012 [2407] | Possibly, but I did go through all the #includes and made sure the c-library and common.reds was accessible and working, but like I said, I will try using Fossil and see what happens that way |
Kaj 1-Oct-2012 [2408x2] | More information on handling the repositories for one binding is here: |
http://rebol.esperconsultancy.nl/extensions/0MQ/ | |
kensingleton 1-Oct-2012 [2410] | Thanks Kaj |
Kaj 1-Oct-2012 [2411] | You're welcome |
Oldes 1-Oct-2012 [2412] | I'm repeating myself, but it looks I'm not alone who find it confusing to work with 2 repos. As we are really working with just a few kB, it would be really better to have it in one place = GitHub and not to merge libs with Fosill. But anyway, I appricaiate your contributions Kaj, so use whatever you like. |
Andreas 1-Oct-2012 [2413x2] | The situation at the moment certainly can be confusing, but the solution lies not in moving everything to a central repository. The real solution is to improve Red(/System)'s mechanisms for locating and including other scripts ("libraries"). A simple "search path" would already go a long way, and will probably be added soon. |
(Please note that I'm deliberately using rather vague terms, as I only want to point at where the solution lies, but not suggest a concrete design of that solution, at the moment.) | |
Pekr 1-Oct-2012 [2415] | it would be nice to formalise, e.g. to have /bindings subdir, where partricular systems would be represented by subdirs, etc. |
Kaj 1-Oct-2012 [2416x3] | Agreed. My bindings already use that structure among each other |
They mirror the situation in the open source world, where work is divided in independent projects. Even if you would heap the bindings together, you would still have to manage the libraries separately | |
A distributed source control database is essential to my operations, so I can't just use anything that others happen to use | |
Pekr 1-Oct-2012 [2419] | What's wrong with Git for your purposes? |
kensingleton 1-Oct-2012 [2420] | Kaj, downloaded the Zip file from Fossil and re-ran (after sorting paths to files) and get the same problem as already posted. The problem is not file locations as that results in a different compiler error which is easily sorted. It seems to me in the problem I have posted, the compiler thinks there is already an alias called str-array! - however I have searched every reds file and there is no other with that name! Anyway, it is not urgent but I just wanted to feed back my findings to you. |
Kaj 1-Oct-2012 [2421x3] | Git is bloated, to the point that in the past we haven't been able to port it to Syllable. Maybe the core would be portable now, but we don't want it, because it's huge and complex and confusing to users. Fossil is much simpler |
Ken, I'm not sure what revision of 0.2.6 you used. When downloading from Git, the "master" branch should be used. I'm also working with the v0.3.0 development branch, so I'll reinstall that later today to test | |
There have been many bugs in the development branches lately, so if you're not using the latest, all bets are off | |
kensingleton 1-Oct-2012 [2424] | ok - I will download v0.3.0 and try it on that too |
Kaj 1-Oct-2012 [2425] | What do you mean by sorting paths to files? If you unpack the repositories in the right places, no files need to be edited |
kensingleton 1-Oct-2012 [2426x2] | Under windows there is no common folder where the common.reds file resides - on windows common.reds resides in the runtime folder, so the #include file in the c-library.reds file needs to point to where that file resides. Likewise on fib and mand - they point to the c-library which I put into the library folder that exists in the Red/System folder on the windows version. |
But the file locations are not the issue - the compiler complains accurately when the files are not in the locations specified by the #include directive. | |
Kaj 1-Oct-2012 [2428x2] | Ah, see, you're mixing up files. The common.reds file in Red has nothing to do with my bindings. It also has nothing to do with Windows. You should leave that alone and put my bindings in the subdirectories I mentioned in a parent directory of your choice |
It's better not to put the bindings in Red's directories at all. They are isolated from each other and should be handled that way | |
kensingleton 1-Oct-2012 [2430] | But in the c-libraray.reds file that is in the zip file with the examples I downloaded from Fosil there is this: #include %../common/common.reds - but there is no common folder or common.reds folder in that download from Fosil - so where does it find this common.reds file that it is trying to access if it is not the one that is part of Red/System? |
Kaj 1-Oct-2012 [2431] | Yes, that's why I asked you if you had installed the extra Red-common repository, from the Announce channel |
older newer | first last |