r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[rebcode] Rebcode discussion

Geomol
24-Oct-2005
[776]
Right. I once talked with an astronomer working in Lund, Sweden. 
He told me about the software, they use. It's mostly based in code 
written in the 70'ies (in FORTH, if I remember correctly). It's good, 
well-tested software of course, but the user interfaces are terrible, 
often just a command-line. It could be interesting doing modern versions 
of some of that software using REBOL. But the scientists have to 
be 100% sure, the output is correct and the same as they get from 
the software, they use now. If the right function libraries were 
developed in REBOL (rebcode), I think scientists could be a good 
user-base (developer-base) for the REBOL language.
Graham
24-Oct-2005
[777x2]
Geomol, they are probably using a domain specific language to drive 
their telescopes ... something forth pioneered.
They also use Forth to control the robotic arms on the space shuttles.
Oldes
24-Oct-2005
[779]
I think Rebol would be better for teachers than scientists, as in 
Rebol you can much more easily explore how programing works
Graham
24-Oct-2005
[780]
Yeah, I would leave the scientists alone ... it's like trying to 
wean a unix user from their command line tools!
Oldes
24-Oct-2005
[781]
I live in command line with Rebol and I'm happy:)
Tomc
24-Oct-2005
[782]
these days telescope control should all be "ASCOM" compliant

http://ascom-standards.org/index.html
Pekr
24-Oct-2005
[783x2]
most of the stuff we met was crappy ...
even big SBIG used parallel port back in the time we used ethernet. 
The sad thing is - no money, no music ... 4 ppl working part-time 
can't beat 80 full-time workers. But we did, for ourselves - I have 
our camera in my table ;-) And we build quite a few telescopes - 
REBOL is COOL for astronomy - dialects etc. wow ... the thing is, 
if it would be adopted ....
OneTom
24-Oct-2005
[785x2]
pekr, did i understand that u were using rebol 4 astronomy? could 
show me/us some of ur worx? a collegue of mine - whom i really want 
to b converted from php to rebol - is an amateur astronomist and 
such a stuff can give him the final pulse to start learning&using 
rebol
jfyi i use forth regulary for writing pic microcontrolers applications 
(small ones usually)
Pekr
24-Oct-2005
[787]
tomorrow, or I will write to you privately, too tired now, time to 
sleep :-)
OneTom
24-Oct-2005
[788]
sure. thanks in advance!
DideC
25-Oct-2005
[789x3]
Actually...
opcodes for integer math are :
	-add, mul, div, min, max, abs, ...
opcodes for decimal math are :
	-addd, muld, divd, mind, maxd, absd, ...
Would you prefer integer opcodes to be :
	-addi, muli, divi, mini, maxi, absi, ...
or not ?
(quick answer required!)
Volker
25-Oct-2005
[792x2]
yes.
i typed it that way the first few times.
BrianH
25-Oct-2005
[794x2]
Speaking as someone who generates as well as wwrites rebcode, I would 
say yes. This frees up the non-typed opcodes to be rewritten with 
their typed equivalents by a type inferencer.
It also makes their typed nature explicit, and establishes the convention 
of <opcode>i for integer-specific opcodes, which will come in handy 
later when we add more (like picki/pokei).
Volker
25-Oct-2005
[796x2]
Maybe it makes it sense to have generic math too, then we could add, 
sub etc too. Not sure, but if interaction with rebol is closer and 
we deal with rebol-created blocks?
would keep that option open.
BrianH
25-Oct-2005
[798]
Generic math is slower....
Volker
25-Oct-2005
[799]
Yes, but a typecheck and a branch and a conversin even more.
Tomc
25-Oct-2005
[800]
I would prefer the explicit interger opcodes
DideC
25-Oct-2005
[801]
(no chance some of you change a bit his color : you look the same 
all three)
BrianH
25-Oct-2005
[802]
Volker, the typecheck can be done by the programmer, or a type inferencer, 
either way statically. When rebcode gets a JIT those typechecks get 
put right back to implement generic math, because the real machine 
won't have it.
Volker
25-Oct-2005
[803]
if i want a generic sum, people feed [ 1 2.5 3 ], it would be faster 
in rebcode, so makes sense. with hand-typecheck it would be slower. 
I guess its to rare to worry about, but i would keep the option.

but main reason is, its easier to remember, set seti setd add addi 
addd would be first thoughts.
BrianH
25-Oct-2005
[804x2]
When you hand-typecheck, you usually do it at programming time, not 
runtime, so it's not so bad.
(I just read the names :)
Volker
25-Oct-2005
[806]
i write support for rebol, and so it should be easy to pass data.
Tomc
25-Oct-2005
[807]
Didec: on linux we cannot change colors
DideC
25-Oct-2005
[808]
Ah, didn't know that. Pooor guy ;-)
Volker
25-Oct-2005
[809]
it worked, see dotgroup.
Tomc
25-Oct-2005
[810x2]
I get an error report requester to send feedback to safeworlds
ahhh but it did change
BrianH
25-Oct-2005
[812]
(I'm just lazy)
Volker
25-Oct-2005
[813]
We managed to give you a different color than us. :)
Tomc
25-Oct-2005
[814]
but then ...  "Multiple Errors, Altme must quit now"    <blink>
DideC
25-Oct-2005
[815]
If change is done to add the "i" on add and others, it will also 
be the case on comparison operators.
eqi, gti, ...
BrianH
25-Oct-2005
[816x3]
I was hoping so.
Did you see that idea in Rebol Enhancements about picki and pokei 
for bytewise access to integers?
I get generic add by doing this:
    to-dec a
    to-dec b
    addd a b

You can skip one or both conversions if you can trace the type flow 
and be sure of the data types of the arguments.
Volker
25-Oct-2005
[819]
agreed, thtat is sufficient.
BrianH
25-Oct-2005
[820]
Sorry, to-dec a a ...
DideC
25-Oct-2005
[821]
Your opinion is require.


Some opcodes exist in double due to specific integer or decimal value 
handling.

What would be your preference on opcode naming ?

Choice are :

1) INTEGER add mul div min eq gt gte ... / DECIMAL addd muld divd 
mind eqd gtd gted ...

2) INTEGER addi muli divi mini eqi gti gtei ... / DECIMAL addd muld 
divd mind eqd gtd gted ...

3) INTEGER add.i mul.i div.i min.i eq.i gt.i gte.i ... / DECIMAL 
add.d mul.d div.d min.d eq.d gt.d gte.d ...

(Today rebcode is 1)

It concern math, logic and comparison opcode.
Henrik
25-Oct-2005
[822]
be brief. use the first one like now
BrianH
25-Oct-2005
[823x2]
I prefer the second, although the third has merits.
The second is brief and consistent. The first is just brief, half 
the time, and confusing.
Volker
25-Oct-2005
[825]
3 is not rebol. add/i add/d if you really want that. the little extra 
letter works best for me.