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

World: r3wp

[Core] Discuss core issues

Anton
4-May-2007
[7787]
Correct.
Brock
4-May-2007
[7788x3]
your first solution is more along the lines of what I need.   I need 
to be able to control whether I write or append through the condition.
Thanks for your solutions.  I'm going to play around with Pekr's 
contributions to see what he did and better understand where I went 
wrong.  Thanks guys
Pekr, regarding not simply doing this in an either statement.  I 
have this scenario in a couple of locations and wanted a be a little 
more elegant.  I know it wouldn't add alot of space, just was trying 
to be more elegant.
Anton
4-May-2007
[7791]
Hard to achieve elegance here. Different people wrote helper functions 
for this type of thing. DO PICK is good for just one refinement, 
but the second one is better for several refinements (and accompanying 
arguments).
Brock
4-May-2007
[7792x2]
Henrik, your solution is nice as well.  Pekr, I see the err in my 
ways with the to-path command.  That and enclosing the entire command 
in a block made all the difference.
Anton, yes, I am really just trying to minize my overuse of either 
yet still be readable, and memorable for future use.
Anton
4-May-2007
[7794]
http://anton.wildit.net.au/rebol/doc/flag-val-doc.txt
Henrik
4-May-2007
[7795]
This is one of my pet peeves, that optionally using refinements can't 
be simpler than this.
Anton
4-May-2007
[7796]
I think it was decided some function will be built into R3 which 
makes refinement and argument propagation easier.
Gabriele
4-May-2007
[7797]
and that would be APPLY
Henrik
6-May-2007
[7798]
A question: Does anyone know the ratio of mezzanine vs. native functions 
in a standard REBOL/View 1.3.2? I'm trying to use that as a statistical 
argument of how much of REBOL 2 is currently open source. :-)
Sunanda
6-May-2007
[7799]
These two lines get you close to a answer
  help function!
  help native!

May also need to count various things in the system object as available 
source (not quite *open* source)
btiffin
6-May-2007
[7800]
Hi,  I've been pondering electrical circuits.  Should NOT none return 
none?

low voltage NOT should be high, high voltage NOT should go low, but 
a zero voltage NOT should be no volts? No?
Sunanda
6-May-2007
[7801]
REBOL has slightly wonky three-value logic:
(not none) = (not false)
== true
>> none = false
== false
btiffin
6-May-2007
[7802]
Yeah, I was looking at that.  The output wire I have on a NOT circuit 
is always lit.  I
have to test for "no input" along with the 1's and 0's.  :)
Gregg
6-May-2007
[7803]
I would say a zero voltage is zero volts which, in that domain, might 
be called a lack of voltage, or no voltage. i.e. a REBOL none value 
is not the same as no voltage, but you might have a NONE? func in 
that domain that means "zero? volts".
btiffin
6-May-2007
[7804]
I'm coding an interactive half-adder circuit today.  The NOT gate 
outputs are lit even

if the "circuit" doesn't have any virtual power running through it. 
 Easy to work round

but this was more of a theoretical.  :)  In real life, a NOT gate 
doesn't go high for
no-volts, only low-volts no?  I don't know enough.  :)
Anton
7-May-2007
[7805x5]
Henrik:
result: [] 
foreach word first system/words [
	if value? in system/words word [
		type: type?/word get in system/words word 
		either blk: select result type [
			append blk word
		][
			repend result [type reduce [word]]
		]
	]
]

print ["actions:" length? result/action! "natives:" length? result/native! 
"funcs:" length? result/function!]
actions: 120 natives: 137 funcs: 238
(and don't forget op!)
Brian, Gregg, in electronics, which of high and low voltage is considered 
"true" and "false" can be different in each circuit.
Henrik
7-May-2007
[7810x2]
anton, interesting, thanks
does RENAME not support renaming dirs?
Pekr
7-May-2007
[7812]
RENAME - new name for Rebol :-) Rename your toolset :-)
Maxim
7-May-2007
[7813x2]
I would have thought someone would have suggested 
Do
cause you just want to DO stuff.
btiffin
7-May-2007
[7815]
Terminology question.  For proper REBOL terms, now is a native!  
But is it a misnomer

to say function?  The question came up as I'm trying to describe 
now/time.  Can I

say function, or is it more properly the verbose "time refinement 
of the now native"?
Sunanda
7-May-2007
[7816]
RT seem happy the word function in both cases:
http://www.rebol.com/docs/dictionary.html
Perhaps we have to distniguish two types: native and mezzanine.
btiffin
7-May-2007
[7817x2]
I'm aiming a lot of the Usage docs at beginners, but I don't won't 
to pollute the purity
of the terminology too soon in their careers.  ;)
In this case, (I'm doc'ing the timer and timing related scripts) 
I think I'll go verbose.
BrianH
7-May-2007
[7819x2]
As long as you don't elaborate on the differences between natives, 
actions and ops on every reference to functions of any of those types, 
then it is cool to use the term "native" to refer to all of those. 
The only things that matter about the difference between native and 
REBOL functions are the speed of natives and the available source 
code of REBOL functions.
IMHO
btiffin
7-May-2007
[7821x2]
Thanks for the opinion Brian.  Noted.
I can usually get away with the expression 'utility' when doc'ing 
the library scripts, but
I don't want to slip up too many times.  :)
BrianH
7-May-2007
[7823]
I usually reserve "utility" for standalone scripts, not library functions.
btiffin
7-May-2007
[7824x2]
A lot of the library scripts are "stand alone".  Hopefully that situation 
will change as we
progress.
We (well some smarter guys) are hard at work defining a real library 
function library :)
BrianH
7-May-2007
[7826]
I don't mean scripts from the script library, I mean functions that 
are meant to be part of an API.
btiffin
7-May-2007
[7827x2]
Yeah, understood.  Right now I'm putting up Usage docs for the more 
'fluffy' rebol.org 
entries.  Meaty docs should start soon.
Fluffy may me the wrong term.  There is a lot to learn in the samples.
Chris
8-May-2007
[7829]
>> any-function? :now
== true
TimW
10-May-2007
[7830]
Well, I didn't know where to ask this, so maybe here is a good place.
x: load/markup http://www.xanga.com/timwylie/588202056/item.html

then look at x/211, It's a big chunk of tags.  Why?  The only issue 
I can see is that the first tag at 211 has two quotes in a row.  
Any help in fixing this problem?
Henrik
10-May-2007
[7831x2]
looks like the double quotes are throwing load/markup off
so it thinks the rest is a big string inside the tags
Gregg
10-May-2007
[7833]
If that's the case, check RAMBO and submit it if it isn't there already.
Anton
10-May-2007
[7834x2]
We should try to isolate the problem first.
A huge bunch of html isn't very useful. Can you make a small example 
of the problem.
Gregg
10-May-2007
[7836]
>> load/markup {<span id="xprofimg"">}
== [{span id="xprofimg"">}]