World: r4wp
[#Red] Red language group
older newer | first last |
DocKimbel 18-Apr-2013 [7115] | Oops, you should replace 'head by 'p in the above code. |
PeterWood 18-Apr-2013 [7116] | Many thanks. |
DocKimbel 18-Apr-2013 [7117] | cp hold your codepoint as a 32-bit integer. |
PeterWood 18-Apr-2013 [7118] | I should be able to turn this into a function for Kaj to include in his routine! where he needs UTF-8 |
DocKimbel 18-Apr-2013 [7119] | I guess that should be enough for his needs. |
PeterWood 18-Apr-2013 [7120] | Fingers crossed :-) |
Oldes 18-Apr-2013 [7121] | why not to use native OS functions? At least on WIn there is: http://msdn.microsoft.com/en-us/library/windows/desktop/dd374085(v=vs.85).aspx |
DocKimbel 18-Apr-2013 [7122] | Kaj is working on Linux and Syllable only. Also that API provides UTF-16 to UTF-8 support, but we need also UCS-4 to UTF-8 (UCS-2 being a subset of UTF-16). |
Oldes 18-Apr-2013 [7123] | Some UCS related code for porting is here: http://public.googlecode.com/svn/trunk/UCSUTF.cpp |
DocKimbel 18-Apr-2013 [7124] | Endo: I have submitted a report for false positive to AVIRA, I hope Red binaries will be whitelisted soon. It seems to be the last AV vendor producing false alams, according to virustotal online testing tool. |
Endo 18-Apr-2013 [7125] | Thank you, I'll check it later. |
PeterWood 19-Apr-2013 [7126x5] | Kaj - You can find a rough and ready red-string! to c-string! function at: https://github.com/PeterWAWood/Red-System-Libs/blob/master/UTF-8/string-c-string.reds it #includes the UCS4 character to UTF8 convertor which you will need in the same directory as the string-c-string func. |
The ucs4 -> utf8 char convertor: https://github.com/PeterWAWood/Red-System-Libs/blob/master/UTF-8/ucs4-utf8.reds | |
I haven't really tested it as you can see from : https://github.com/PeterWAWood/Red-System-Libs/blob/master/UTF-8/Tests/string-c-string-test.red | |
I'm not sure how it will cope with repeaated use as there is no way to release allocated c-strings under the Red memory manager. | |
Hope it helps. | |
Pekr 19-Apr-2013 [7131] | who needs a GC/memory manager these days, just buy more RAM :-) |
DocKimbel 19-Apr-2013 [7132] | Peter, maybe you could user ALLOCATE function from Red/Sytem and let Kaj's code call FREE on UTF-8 buffers after usage? |
PeterWood 19-Apr-2013 [7133] | I didn't think that it was possible to mix using the Red Memory Manager and C memory management in the same program. Is it safe to do so? |
DocKimbel 19-Apr-2013 [7134] | Yes, it is. |
PeterWood 19-Apr-2013 [7135] | I have committed the change for the c-string to be allocated with Red/System ALLOCATE function. |
DocKimbel 20-Apr-2013 [7136] | FYI, Bruno is working on a Zlib binding for Red/System: https://github.com/be-red/Red/commits/zlib |
Kaj 20-Apr-2013 [7137] | Much obliged, Peter. I can work that into my I/O routines |
PeterWood 21-Apr-2013 [7138x3] | Really the thanks should go to Nenad. Without his help, I still be trying to work out how to do it. |
I've add support for code points above the BMP. | |
add -> added | |
DocKimbel 21-Apr-2013 [7141] | That is just called team work. :-) |
Arnold 21-Apr-2013 [7142] | Would be nice to be able to download the Red zip file and be able to compile scripts in another directory? |
Kaj 21-Apr-2013 [7143] | How do you mean? What you seem to ask is already possible |
Arnold 21-Apr-2013 [7144] | I was in the impression that Red and Red/System scripts should be in a directory within the Red dir. Where the other (test)scriots are too. I am now hesitant to put a new zip over the old one and lose my scripts (but maybe even that fear is vain). |
Kaj 23-Apr-2013 [7145x2] | Nenad did a lot of work on making it location independent. A few issues remain, for example that Red/System always gets compiled into the builds/ subdirectory, but the source can be anywhere |
If you just unzip, thereīs no reason your scripts would be lost, but you can make it a lot easier by not putting them in the Red folders | |
Andreas 23-Apr-2013 [7147x2] | Not sure what mode of compiling Red/System you are thinking about, but if you compile via rsc.r, you can tell it where to write the binary by passing a `-o` command-line option. |
As in: rebol2 -qsc rsc.r -o hello tests/hello.reds | |
Kaj 23-Apr-2013 [7149x3] | Iīm referring to the normal case of wanting to get the output in your working directory. Red does that now, but Red/System not without using that switch |
You also need to give the full path to the source file | |
Actually, you also have to give the full path in the -o switch | |
Arnold 23-Apr-2013 [7152] | I did some compiling today and found the resulting executable in the build directory. |
Andreas 23-Apr-2013 [7153] | Relative paths work for me. |
MaxV 23-Apr-2013 [7154x2] | Ishttps://github.com/dockimbel/Redthe official Github site? |
Is https://github.com/dockimbel/Redthe official github site? | |
Pekr 23-Apr-2013 [7156] | yes, it is ... |
Kaj 23-Apr-2013 [7157] | ./ paths donīt work for me on rsc.r |
DocKimbel 23-Apr-2013 [7158x2] | Kaj: I think I've found a workaround for the semi-random compilation crash on Linux. It seems SELECT has some deep stability issues in R2. |
At least in 2.7.6 and 2.7.8. | |
Kaj 23-Apr-2013 [7160x2] | Good news and bad news at the same time... |
Didnīt you already replace SELECT with FIND in other places? | |
DocKimbel 23-Apr-2013 [7162] | Yes, in compiler.r, I did replace SELECT on most places where it was used on hash! series. |
Pekr 23-Apr-2013 [7163] | Don't tell Fork, or you will need R3 soon :-) |
DocKimbel 23-Apr-2013 [7164] | ;-) |
older newer | first last |