• 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
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 14801 end: 14900]

world-name: r3wp

Group: rebcode ... Rebcode discussion [web-public]
Volker:
28-Oct-2005
You have to get the table-base from somewhere and add that.
Volker:
28-Oct-2005
You have to add that 0 to the table-base. table-base may be known 
by pc and slightly faster to access if not dynamic, ubt i doubt the 
difference is big.
BrianH:
28-Oct-2005
The table is a block. The block reference has a position. That position 
is the base. All these indexes are relative to that. If you specify 
0-based or 1-based, that 0 or 1 can be hardcoded (faster in the interpreter) 
or can be replaced with 0-based or 1-based machine instructions (faster 
if you JIT, as both types are common, and other bases require rebasing 
to 0 or 1 first).
BrianH:
28-Oct-2005
x86 has instructions that directly correspond to pick/poke and pickz/pokez, 
but other bases require some math (or segmenting).
Volker:
28-Oct-2005
The block reference has a position.

 Yes. And i can base on that at compiletime. if i use 1, i decrement 
 that position at compiletime. when i add, its as good as 0-based. 
 if i know at compiletime the offset is something else, i can adjust 
 too.
Gabriele:
28-Oct-2005
renaming will be next, then a public beta will be released. brab 
should work, but i haven't tested it, and not sure if anyone tested 
it yet...
BrianH:
28-Oct-2005
Also, as far as I can tell, indirect label blocks just don't work, 
and for indirect offset blocks the position of the block is ignored 
and the index is counted relative to the head of the block, not the 
current position. If these two cases stand as is, there will be no 
reason to support indirect offset block addressing at all. The current 
reasons to support indirect branch target blocks are to have the 
label words used to make offset calculations at runtime (effectively 
making the branch target an absolute offset), or to play with the 
branch block position for obscure reasons. Relative branch targets 
are only valid from one location, so there is no point to putting 
them into a runtime value like a block referenced through a word 
when they can only be used once.
BrianH:
28-Oct-2005
(Pardon the awkward phrasing - it's a complicated topic and I don't 
have time to rephrase. Be back later)
BrianH:
28-Oct-2005
Then there is almost no point to referring to the label block indirectly. 
You could theoretically swap indirect offset blocks at runtime as 
part of a state machine, but you would have to calculate offsets 
manually, and couldn't use rewrite rules then because the offsets 
would likely change in unpredictable ways.
BrianH:
29-Oct-2005
New rebcode-enabled versions up: Core 2.6.51, View 1.3.51

Fixes since test 15 (as far as I can tell so far): The BRAB crash 
has been fixed in syntax - now the index can only be passed in a 
word, literal indexes have been disallowed (and were a little silly 
anyway, as they could be replaced by BRA or BRAW).
BrianH:
29-Oct-2005
The great rename hasn't been done yet and BRAB is currently 0-based.
Ladislav:
29-Oct-2005
the poll seems to be a little "unpopular", only two voters and one 
of them is me
Volker:
29-Oct-2005
I am not sure what i would need. With state-machines and such its 
no problem anyway, as i can choose the keys adjusted to brab's needs.
Volker:
29-Oct-2005
Teaming up with rebol 1 would be better, but then a little add is 
no problem too. And 0 would be slightly faster, as the cpu does a 
0-bounds-check automatic.
Volker:
29-Oct-2005
But how about a three-state if too? lesser/equal/higher 0? Could 
speed up binary search and such?
Volker:
29-Oct-2005
( 2 target and next comand )
Volker:
29-Oct-2005
For now we have an interpreter. For straight c, it would not slow 
down at least. And with assembler a braw would be as fast as a brab, 
so we would not need it. althought if c shall be an option, brab 
matches to switch.
BrianH:
29-Oct-2005
; And then use it like this:
cmp.i t a b
brab [leq lgt] t
; Less than
label leq
; Equal
label lgt
; Greater than
BrianH:
29-Oct-2005
Well, brab has three targets in the example above: 0, 1 and default.
BrianH:
29-Oct-2005
; And then use it like this:
cmp.i a b [
    ; Less than
] [
    ; Equal
] [
    ; Greater than
]
Volker:
29-Oct-2005
something like this. But imho it does to much. and it should work 
with gotos, is it possible to jump out of a blick?
Volker:
29-Oct-2005
the typical thing is that you really subtract (or compare) and follow 
that by two conditional branches. no lookup like with brab needed.
Volker:
29-Oct-2005
The jit has to realize that your compare results in -1, 0, 1, that 
you add 1, and then that you brab. Possible, but needs more insights.
BrianH:
29-Oct-2005
A JIT would know that a cmp would only set t to -1, 0 or 1, and then 
know what to translate a following brab on it to.
Volker:
29-Oct-2005
So you have to track three statements. And to give always that order 
or the jit needs to look even deeper.
BrianH:
29-Oct-2005
Sure you can, it'll just treat it as a deafult and move on to the 
next instruction without branching.
Volker:
29-Oct-2005
and a general compare is as heavy as a bras. and makes most sense 
with a brab immediate following IMHO.
Volker:
29-Oct-2005
Ah, get it. i thought compare takes two chars, and we have to loop. 
as a loop returning -1,0,1 it makes sense.
Volker:
29-Oct-2005
but i am not sure about this special case. sometimes i want to know 
where the difference occoured  and such things. So i prefer a selfmade 
loop, with rebcode. Except it turns out string-comparisons are very 
common.
BrianH:
29-Oct-2005
If you expect the comparison to be common, why not make a subroutine 
and apply it or compose it in when needed? Not everything has to 
be an opcode, and the difference will be slight after the JIT is 
implemented.
Volker:
29-Oct-2005
the jit sees two comparisons and two branches. needs smartness to 
detect that this two comparisons can be folded in one because of 
cpu-flagword.
BrianH:
30-Oct-2005
I kind-of expected bras to be rejected. There was a workaround using 
min and brab, slower but doable. This is why I put "Undetermined" 
as the priority when I submitted it. Compare seemed like a good idea 
though.
Pekr:
30-Oct-2005
I would like to know how is it with trapping the errors? I read available 
rebcode docs, and it seems to me that you can make your rebol process 
to fail by wrong rebcode code, right? Is it  theoretically possible 
to wrap rebcode call into 'try, so if it fails, error is returned 
instead of process crash?
BrianH:
30-Oct-2005
JVM and CLR VMs do a lot of testing of their bytecode sequences before 
execution, as part of their security testing. Until someone makes 
a type-inferencer for rebcode, it won't be safe to use without manually 
reviewing every function before use, or only using rebcode generated 
by trusted compilers. It is much like machine code in that way.
Pekr:
30-Oct-2005
hmm, that is true, imagine website providing some service and someone 
passing intentionally wrong values to your fields etc. :-)
Henrik:
30-Oct-2005
To me the BRAB example in the rebcode docs in section 2.8 is quite 
unclear. "The brab opcode allows computed branch offsets to be created". 
You can say the same about BRA, BRAF and BRAT as well. :-)


I have no idea what this opcode does, except that it looks vaguely 
similar to a SWITCH so it would be doing multiple branches somehow. 
It would have helped to see output results from the code and to have 
a better initial explanation on how to use BRA with integer indexes 
and an explanation of the B in BRAB. Do you agree?
BrianH:
30-Oct-2005
You can also reference the block of offsets through a word. Labels 
are not converted then - you must use numeric offsets that you count 
by hand (or in a compiler). Since these offsets are relative to the 
end of the branch statement, this block is only useful in one location. 
Also, when the rewrite phase comes back and they start using rewrite 
rules again, those hand-calculated offsets will likely be wrong. 
In theory, this could be used to implement a multi-state machine, 
but that kind of thing is deep magic that you should be doing with 
the parse engine anyways. It is theoretically possible to fill the 
block at runtime, which would technically be a computed branch, but 
this is so slow, awkward and unnecessary as to be ridiculous, especially 
for a branch block that can only be used from one location.
BrianH:
30-Oct-2005
True computed branches require the use of the BRAW opcode. Of course, 
this opcode was removed from the engine in the latest revision and 
is not mentioned in the docs, so you are out of luck.
BrianH:
30-Oct-2005
The index works like the index in pickz and pokez - that's not hard 
to understand. The real thing they need to explain better is how 
they count the offsets.
BrianH:
30-Oct-2005
Henrik, they actually do a good job at explaining what the index 
is for:

The first argument to the opcode is normally a block, and the second 
is a zero-based index into that block. The value at that position 
is fetched and assumed to be the integer offset for the branch.

Now all they need to do is replace the word "computed" with "indexed".
BrianH:
30-Oct-2005
The fixup pass doesn't currently fixup labels passed to BRAB unless 
they are in a block, and then that follows the normal behavior, not 
this "special case" behavior.
BrianH:
1-Nov-2005
Several of my suggestions and comments have been intended to make 
rebcode easier to learn. Easier to use is a side effect.
BrianH:
1-Nov-2005
i and o could be series parameters
Gabriele:
1-Nov-2005
the main thing is, that the details need to be discussed more (i.e. 
the grammar for the rules dialect, and things like this).
Ladislav:
1-Nov-2005
FLOOR: ROUND can be adapted to Rebcode, but only partially - some 
datatypes aren't available yet, and I have got a newer ROUND version 
- better suited for Rebcodization
Oldes:
1-Nov-2005
I did some test with integer conversions and found, that using rebcode 
is 3x faster than using struct! :)
BrianH:
1-Nov-2005
A SIGN opcode would set a word to the integer -1, 0 or 1 depending 
on whether an argument is less than, equal to, or greater than 0.


sign: ["Set variable to the sign of a value (-1,0,1)" word! word!]


It would be preferable to have SIGN work with all numeric arguments, 
but you might choose to implement this as sign.i and sign.d for speed 
- either way is fine by me. The SIGN opcode, when combined with BRAB, 
would enable functionality equivalent to the BRAS proposal (#3948), 
and so would supercede it. There are many other uses as well.
Volker:
3-Nov-2005
Not sure, we can now take the value of a word? with bind or something? 
and then apply that?
Rebolek:
3-Nov-2005
Because I've got lot of this objects (i.e. this object is oscillator 
with settings like pitch and with one rebcode function to produce 
actual value).
Geomol:
3-Nov-2005
Right, and it's not 'nice' to export things to the global context 
like that. We should have it your way! Write it in "RT Q&A".
Volker:
3-Nov-2005
i thought we have some sort if binding in rebcode now. then it would 
be like

   rebcode[][ set word 'rcmul bind word  ctx  setw x word  apply x [..] 
   ]
but not soure if its really there, and about syntax.
BrianH:
3-Nov-2005
Romano, not that I would normally be defending relative jump (look 
at the group history :) ), but when you have to specify the offsets 
as literal numbers, relative offsets are more useful. Most of the 
time branches are used for control flow on a local level - branches 
only work within the same code block and most code blocks aren't 
very large. If you have relative branches, you can add instructions 
before the affected area without having to recount all of your branch 
statements, and you can add code snippets into code without having 
to add labels. When you use absolute branches that doesn't work so 
well. Of course there is no difference when you are branching to 
labels because either way the assembler would be doing the counting.
BrianH:
4-Nov-2005
Here are some initial comments on the recently posted rebcode documentation 
draft:

- It has been suggested on the list that since the assembler's rewrite 
engine is a mezzanine, it might not be included in the final version, 
in favor of (to promote?) user-made rewrite engines. If not, you 
would need to change the documentation to match, especially section 
1.4.

- It needs to be made clear somewhere in the initial description 
of the rebcode dialect that rebcode is a statement-based language, 
not an expression-based language like the do dialect. Opcodes perform 
actions, but don't return anything per-se. The 2.1 or 2.3 sections 
would be a good place for this explanation to be.

- In the "Branches are always relative" note at the end of 2.6, there 
is a sentence "The branches are always relative to the current block." 
that could be removed. The whole note should probably be renamed 
to "Branches are always local" because the note doesn't really cover 
that they are also relative. Also the phrase "use a branch opcode 
to" could be replaced with "branch to" and be less awkward.

- A common mistake in specifying literal branch offsets is to miscalculate 
what location the offsets are relative to. This mistake would be 
less likely if the third paragraph of 2.8 were changed to "The argument 
to the branch opcodes is an integer value, representing how much 
of an offset you want the branch to perform. Branch offsets are always 
relative to the location after the branch statement, not the absolute 
offset within the block. Positive values branch forward; negative, 
backward. The branch target must always fall within the current code 
block." as this is the actual branch behavior (and more clear).

- The sentence in 2.8 "The brab opcode allows computed branch offsets 
to be created." isn't really true right now, at least in any practical 
way. The current behavior is more like "The brab opcode allows you 
to branch to an offset selected at runtime by an index.".

- The paragraph at the end of 2.8 "There is also a special case of 
operation. If the block argument to BRAB is an integer (created from 
a label), then the branch is made to that relative location plus 
the value of the index argument." would be a good idea to be implemented 
(I've submitted it to RAMBO), but is rather awkwardly phrased. This 
could be rephrased once the behavior is implemented, or left alone 
if you don't want most rebcode users to use this behavior.

- In section 2.9, the sentence "Result then refers to the value returned 
from the function." may be better said as "The word result is then 
assigned the value returned from the function.".

- 4.1.*: The phrasing of many of these entries is awkward. Also, 
remember that opcodes don't return anything, they modify operands.

- 4.1.1: I'm not sure "integral" means "the integer part of" as it 
is used here; the word may be more related to integrate than integer.

- 4.1.4: Lowercase the "Tail" word to be consistent. Otherwise, well 
phrased.

- 4.1.5: The descriptions of change, copy and insert don't describe 
how their amount parameter is used. You could describe change as 
"Changes part of a series at the current position to that part of 
a value (-1 for the whole value).", copy as "Set the operand to a 
partial copy of the series (-1 for all) from the current position.", 
and insert as "Inserts part of one series (-1 for all) into another 
at the current position.". Or, you could provide further explanation 
in some new 2.* section.

- 4.1.6: In the description of index?, change "Returns the" to "Set 
the operand to".

- 4.1.7: Does not reflect the renaming of the opcode get to getw 
and the addition of setw. Also, instances of "Result modified" should 
be changed to "Set result" or "Set operand to result".
- 4.3.3: The braw opcode has been removed.
Romano:
4-Nov-2005
BrianH: "If you have relative branches, you can add instructions 
before the affected area without having to recount all of your branch 
statements"

Yes, only branches which are affected by the addition. Not a great 
advantage from my pov, because with relative branches is a little 
more complex to establish what branches are affected and what branches 
are not affected.


and you can add code snippets into code without having to add labels.
I do not understand what you mean with this.
BrianH:
5-Nov-2005
OK, here's how you figure that out. You have the branch statement, 
and the branch target. Now you have two possibilities here: The target 
is before the branch or it's after it. If the target is before the 
branch then you can add instructions before the target or after the 
branch, but not between them, and not have to recount your offsets. 
If the target is after the branch then you can add instructions before 
the branch or after the target, but not between them, and not have 
to recount your offsets. The trick here is that if the number of 
instructions between the branch and its target don't change, then 
you can do whatever you want with the instructions around that group 
and not care.
BrianH:
5-Nov-2005
As for "and you can add code snippets into code without having to 
add labels", imagine that you are generating your rebcode, or copy-paste 
coding, rather than hand-writing every line every time. Now imagine 
that there are branches in the code snippet you are putting into 
your code unchanged. If you use labels as branch targets, you may 
end up accidently reusing some label name that already exists in 
the block and the assembler will complain. To avoid that you can 
branch to offsets specified as literal numbers. You get these numbers 
by counting the instructions between the branch and the target yourself. 
This may seem like a lot of work for code that you have to write 
every time, but it is not too much work to put into a tested snippet 
of code that will be reused as is, over and over again. And if you 
have relative branches, you only need to consider how far apart instructions 
are within the snippet, rather than recalculating those offsets depending 
on what position the entire snippet has in the block you are inserting 
it into.
BrianH:
5-Nov-2005
Remember that if you are programming with snippets, then every change 
you make to that snippet would need to be tested. If that change 
is made by a processor, then you need to test the processor. If the 
change is made by hand, then the changed code will need to be verified 
again by hand. This all would make rebcode-generating dialects more 
difficult to implement. And rebcode, generated or written, needs 
a lot of testing because you can easily crash REBOL with erroneous 
rebcode.
Robert:
5-Nov-2005
graph-layout: I won't have the time to get deeper into rebcode in 
the moment. So, here is a request, for something that gives a nice 
demo: I have the old graph-layout code, which uses the TouchGraph 
idea. Anyone interested to port it to rebcode and see howmany nodes 
we can handle?
Robert:
5-Nov-2005
Ok, I send it to you. I have serveral versions, one using faces, 
one using draw (but has problems with layout that doesn't converge). 
IMO a version using draw and rebcode would be nice.
Romano:
5-Nov-2005
BrianH: my argument is: 


case 1) given a block of absolute jump [ 15 36 40 46] and 2 statement 
added at line 37 i can adjust the block easy,


case2 ) given a block of relative jump [-10 -5 15 30] and 2 statement 
added at line 37 i must know also the starting  jump position,  calc 
the new position of jump after the addition of code, calc (directly 
or indirectly) the absolute adresses of jumps ,  make the same work 
for case 1, and transform back jumps in relatives ones. A lot of 
work and a more information needed.
BrianH:
5-Nov-2005
But given your cases here, keep in mind that the only instruction 
now that takes a block of offsets is BRAB. As I have said above, 
BRAB with relative jumps means that it is only practical to use an 
offset block from a single branch statement. Branching to a block 
referenced by a word is only practical for rather obscure circumatances 
(for instance a multistate machine). So for most code using brab 
the offset block will be placed right there in the statement., so 
you will definitely know the starting position. But your second case 
is a little off, because with relative jumps, you don't need to know 
the absolute position of anything.


Assuming a branch offset block like the one in your second case, 
the relevant section of the code block you are using starts with 
the beginning position of the first target statement and ends with 
the beginning position of the last target statement. Branch offsets 
are calculated relative to the end of the branch statement, a position 
we will call the source. With relative jumps, you don't have to take 
into account the absolute position of the end of the branch statement, 
you just need to count the positions between the source source and 
the target. You don't need to know that any added instructions are 
on line 37 (a meaningless concept in rebcode because lines are ignored), 
you only need to tell whether the added instructions are in between 
the source and the target, and then increase the offsets on that 
side of the branch accordingly.


For most branches you will probably be better off with labels and 
let the assembler do the work. But for code snippets, what I often 
do is just do the intiial writing with labels, put the code in a 
rebcode block and let the assembler do the offset calculations. Then 
I copy the fixed up code, remove any label statements and adjust 
affected offsets by two for every removed label statement. Let the 
assembler do most of the work.
BrianH:
6-Nov-2005
Is the index 37 position relative to the beginning of the entire 
code block that contains the brab statement, or relative to the statement 
targeted by the -10 offset in your brab offset block? The "affected 
area" of your brab statement is the 40 instructions beginning with 
the one pointed to by the -10 and ending with that pointed to by 
the 30. This is also referred to as a "basic block". When your branches 
are relative, this area is the one that you should be concerned with. 
If you are counting your insertion index relative to the affected 
area then the only offset affected by the insertion would be the 
30, which would need to be changed to 33.


If you are counting your index of 37 as an absolute offset (actually, 
relative to the beginning of the code block that contains the branch 
statement), then you need to subtract the absolute offset of the 
branch statement to convert to the offset scale that matters, that 
relative to the branch statement. Coincidently, that is exactly the 
calculation performed by the label fixup phase of the assembler. 
Because of this I tend to suggest that when you are programming based 
on the whole code block, typical of programming-by-hand, that you 
use label statements and branch to them.


When you use literal offsets you have to consider the range of instructions 
from the branch to the target as being one entity, a "basic block". 
When inserting instructions into a basic block, all you need to consider 
is how it affects that segment of code. These code segments are usually 
developed and tested independently, and then dropped whole into the 
greater stream of code without much change. Programming by stringing 
together a set of these basic blocks (or code snippets) is often 
what code-generating dialect processor (or "compiler") does.
BrianH:
6-Nov-2005
An optimizer does just the opposite: It converts the literal offset 
to a kind of virtual label statement (the difference being that the 
virtual one takes no space in the code); then after code insertions 
or deletes have happened, it changes the offsets to their new values, 
just like rerunning the fixup phase of the assembler. Of course optimizations 
like this can get a little more complicated when you have branch 
targets calculated at runtime - this was probably why they added 
BRAB and removed BRAW in the recent release, replacing general branch 
calculations with a simple lookup table.
BrianH:
6-Nov-2005
As for whether the relative offsets are more efficient than absolute, 
that is only true of actual machine code, and then maybe only on 
older processors without an instruction cache. What we are calling 
an absolute offset here isn't a memory address like it is in machine 
code, it is really just an offset relative to the beginning of the 
code block, rather than the location of the branch statement. I think 
that the reason Carl chose offsets relative to the location of the 
branch statement is that he decided to only implement one branch 
method in the VM, and this method is more friendly to generated code 
(or maybe that was just luck).
Rebolek:
8-Nov-2005
OK I know it's a dialect, not REBOL, but there is not a single word 
in REBOL that uses dot. Decimals and tupples use them, but not words.
BrianH:
8-Nov-2005
Search and replace :)
Pekr:
8-Nov-2005
I agree with Kru that once again probably the poll was only informative 
and the voice of most - ignored ...
BrianH:
8-Nov-2005
Well, the dot and dash versions were really arbitrary between them. 
We couldn't do paths and the no-change and no-seperator choices had 
significant negatives.
BrianH:
8-Nov-2005
And anyway, REBOL syntax is designed to be quick to type. That is 
why we use - instead of _ and [ ] instead of { } like other languages.
BrianH:
8-Nov-2005
And on that note, where's the Core version of the new build?
BrianH:
8-Nov-2005
Testing: The new brab works. The eq.i opcode still works on logic 
and datatype values as well.
Gregg:
8-Nov-2005
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.
Rebolek:
9-Nov-2005
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
only   mul -> mul.i, muld -> mul.d and so on. i.e. latest.
Rebolek:
9-Nov-2005
And rewriting scripts manually was great opportunity to otimize them 
to (and sometimes by factor of two, so it was for good :))
Oldes:
9-Nov-2005
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.
BrianH:
19-Nov-2005
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.
BrianH:
19-Nov-2005
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!
BrianH:
19-Nov-2005
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.
Oldes:
23-Nov-2005
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 :)
Oldes:
23-Nov-2005
I should probably remove to to-pairs function from the vectorizer's 
context, and use it alone
DideC:
25-Nov-2005
...and it works well!
Oldes:
28-Nov-2005
hm, but now I want to work with decimals as well and wonder if will 
be faster to use block to store the cell variables, or if I will 
use my own decimal format and binary structer as I'm using now
Rebolek:
28-Nov-2005
mul.d i i is i ** 2 and not 2 ** i
Oldes:
28-Nov-2005
how to get random number between 0 and 1?
Rebolek:
28-Nov-2005
I generate random number from 0 to milion and divede it by milion
Rebolek:
1-Dec-2005
I rewrote my old 3d demo to rebcode to see the speed difference. 
But I found that normal rebol can draw 120+ triangles without slowing 
down and because I became bored adding more objects I stopped testing 
it :) Anyway, rebcode optimalised (just three or four functions - 
matrix multiplication, inversion and 3d to 2d conversion - are rewritten 
to rebcode, it can be optimalized more) version is here - http://krutek.info/rebol/ratrix.r
. z-buffer does not work very well as you can see.
Pekr:
1-Dec-2005
and the speedup is? :-)
Pekr:
1-Dec-2005
maybe it would be nice to have some button, have functions saved, 
and toggle between rebcode/non-rebcode version ....
Pekr:
1-Dec-2005
:-) hmm, and if you would like to make object movement faster?
Rebolek:
1-Dec-2005
Pekr as I said, here on this computer, classic rebol is capable of 
updating more than 120 trinagles at full speed (rate: 0) without 
problem. And after 120 triangles I became bored adding more so I 
did not test it :)
Henrik:
1-Dec-2005
This is also how Maya is built. A powerful 3D engine and a comprehensive 
programming language which builds the editor. A little like Emacs.
Rebolek:
1-Dec-2005
There are "entities" like "faces" in View. And 3d "pane". It can 
be dialected as you wrote.
Pekr:
1-Dec-2005
I remember some talk between Cyphre and Carl about "subpixel accuracy" 
in regards to AGG, but dunno if related. Carl was thinking if he 
should allow decimals for pairs IIRC.
Pekr:
1-Dec-2005
I also remember, that he said that rebol is good fit even for 3D, 
where 3D is another container, and result put back to face (bitmap). 
But dunno if I got it right. I doubt it :-)
Volker:
1-Dec-2005
Cool: IMHO the priority should be on moving camera now. And some 
support for collisions, maybe only in 2d-space. Idea: some kind of 
3d-icons. I can live with colored pyramids and some text, but i need 
to move.
Rebolek:
1-Dec-2005
Volker: there's camera code, but there's probably bug in invert matrix 
function so the camera does not work right now. I'm trying to find 
some informations on that topic and to fix it.
Volker:
1-Dec-2005
And then we do a 3d-desktop? :)
Volker:
1-Dec-2005
Yes. Something like this atomic modells. Each ball is a site and 
you can move along the connections :)
Oldes:
2-Dec-2005
nice demo, it's eating almost no CPU on my computer. But if I click 
and move cursor, everything is stoped.
14801 / 4860612345...147148[149] 150151...483484485486487