World: r3wp
[rebcode] Rebcode discussion
older newer | first last |
BrianH 8-Nov-2005 [1239x3] | Well, I don't write View code. We all have our strengths :) |
And on that note, where's the Core version of the new build? | |
Testing: The new brab works. The eq.i opcode still works on logic and datatype values as well. | |
Gregg 8-Nov-2005 [1242x2] | For those with a lot of rebcode already, there will probably be a conversion tool to update your scripts available shortly. |
I can live with dots but I don't like it, looks really un-REBOLish -- That's by design. The opcode names are not human friendly either; also by design. The idea being that rebcode is *not* REBOL, and having it look more like ASM makes you more aware of that. There will probably also be a separate style guide for rebcode at some point. | |
Gabriele 9-Nov-2005 [1244x2] | Kru: we have a script that does the conversion automatically. Ask Ladislav. |
(ah, i see Gregg told you already ;) | |
Rebolek 9-Nov-2005 [1246] | Gabriele: thanks but I've already rewrote most of my code yesterday. I don't know your conversion script but I've had different scripts using 1.30.50, .51, .52 and even old 1.4 alphas so does your script cover all different syntaxes or just the latest one? |
Gabriele 9-Nov-2005 [1247] | only mul -> mul.i, muld -> mul.d and so on. i.e. latest. |
Rebolek 9-Nov-2005 [1248] | And rewriting scripts manually was great opportunity to otimize them to (and sometimes by factor of two, so it was for good :)) |
Gabriele 9-Nov-2005 [1249] | :-) |
Rebolek 9-Nov-2005 [1250] | otimize-optimize |
Oldes 9-Nov-2005 [1251] | What's the problem with dot? I was not voting, but must say I like dot. At least it looks differently from variable names, where I use - and _ chars. |
Pekr 10-Nov-2005 [1252x2] | guys, rgba to integer conversion link is dead ... |
should I rambo-it? :-) | |
Rebolek 10-Nov-2005 [1254x2] | this looks like a bug to me: |
>> o1: context [a: 0 rc: rebcode [x][set a x]] >> o1/rc 3 >> ? o1 O1 is an object of value: a integer! 3 rc rebcode! [x] >> o2: make o1 [] >> o2/rc 5 >> ? o2 O2 is an object of value: a integer! 3 rc rebcode! [x] >> ? o1 O1 is an object of value: a integer! 5 rc rebcode! [x] | |
Volker 10-Nov-2005 [1256] | seems rebcodes are not rebound. |
Rebolek 10-Nov-2005 [1257] | should I RAMBO it? |
Volker 10-Nov-2005 [1258x2] | I think yes. needs either docu or fix. |
maybe thats one of the reasons why all branches are relative? to easier copy on make? | |
Rebolek 10-Nov-2005 [1260] | submited |
Gregg 10-Nov-2005 [1261] | Thanks Petr! No need to RAMBO it. I'll look into it. |
Ladislav 18-Nov-2005 [1262x2] | questions we need to get an answer for, especially from BrianH as a supplier of #3947: |
Related to string COMPARE are these features: 1) case sensitive or not 2) which string is "greater" 3) index of non-equal (tail of compare) 4) find | |
BrianH 19-Nov-2005 [1264x4] | Well after testing, it seems that the behavior of cmp is: 1) Case sensitive. Lowercase the strings for case insensitive compares. 2) If the first string is less than the second, cmp sets the return word to -1, equal sets to 0, and greater sets to 1. If two strings of different lengths and are the same for the length of the shorter string, the longer string counts as greater. Otherwise, the numeric equivalent of each corresponding character is compared. 3) You can roll your own with length?, repeatz, pick, lt.i, gt.i and breakt (if you want, I'll do it). The cmp opcode won't help here. 4) Use apply i find [ser val] - it'll be faster. |
Still, I'm glad to see cmp, sign and asr, and the fixes are welcome too. I didn't know that lsr was not unsigned before - that's what lsr means. Good fix! | |
; Index of non-equal, 1-based, assumes indexes within bounds length? x a length? y b gt.i x y ift [set.i x y] repeat i x [ pick x a i pick y b i eq.i x y breakf ] ; i = first non-equal index | |
It would probably be better to do case-sensitive compares anyway, as it would allow you to compare binaries. Character case needs code pages and such to work anyway when you have Unicode, or languages other than English. | |
Anton 19-Nov-2005 [1268] | View1.3.61 is out. http://www.rebol.net/builds/ |
BrianH 19-Nov-2005 [1269] | Anton, thanks for announcing, as I forgot to mention above that was the version I was testing with :) |
Oldes 23-Nov-2005 [1270x3] | Just uploaded rebcode for tracing 2 colored bitmaps (it's not perfect, I think it can be optimised) but at this moment I have what I needed.... |
do http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/vectorize.r probe vectorize http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/img41.gif | |
It's possible that some situation will not be handled, but I was already able to convert two alphabets from bitmap to vectors using it. | |
Rebolek 23-Nov-2005 [1273] | what is the result of vectorize function? draw dialect surely not |
Oldes 23-Nov-2005 [1274x2] | probe ctx-vectorize/to-pairs vectorize http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/img41.gif |
I'm not using pair as there is no support for them in rebcode | |
Rebolek 23-Nov-2005 [1276] | to-pairs function returns some a lot of negative pair! , why is the image shifted? |
Oldes 23-Nov-2005 [1277x4] | because i use it to make font from the bitmap and there is the y axis counted from below, you may also aske why there is the innerLine (it's because to render the hole correctly there must be correct direction - it could be done in the rebcode, but I found it when I had the inner tracing done and don't want to do it again - so I just changed the "line" to "innerLine" and must fix it in the to-pairs function -> for outer shape I use append and for holes insert :) |
I should probably remove to to-pairs function from the vectorizer's context, and use it alone | |
here is example how to use it in real life: do http://box.lebeda.ws/~hmm/rebol/projects/font-tools/latest/test.r | |
It would be nice to have possibility to use embedded fonts in Rebol as it's possible with Flash. | |
Volker 25-Nov-2005 [1281] | http://www.complang.tuwien.ac.at/papers/ertl%26gregg04pact.ps.gz |
Oldes 25-Nov-2005 [1282] | I probably missed something, how can I read *.ps files? |
Volker 25-Nov-2005 [1283x2] | Click on them in linxu? Hmm, there is ghostscript for windows too somewhere. |
Mybe google has html in its cache, but i lost the search-page. | |
Oldes 25-Nov-2005 [1285] | What is the advantage of using *.ps files? Is it at least interesting reading? |
Volker 25-Nov-2005 [1286x2] | It was the interesting reading why i choosed it. did not realize the *.ps |
about building a native compiler from an interpeter. | |
Oldes 25-Nov-2005 [1288] | ech 10MB of download just to read a simple text file, I'm not going to read it today. |
older newer | first last |