[REBOL] Another newbie stumper

2004-02-24 Thread Kai Peters
Hi All ~ Below is a code snippet that has me stumped: When I click the toggle, everything works fine. However, pressing the hot key CTRL-s generates the error below - shouldn't the hot key do exactly what a left click does? Thansk for any help, Kai snip toggle_start: t

[REBOL] Re: Time, seconds and scientific notation

2004-02-24 Thread Ashley TrĂ¼ter
> Actually, I'd consider this a REBOL problem. It's supposed to be a > cross-platform language afer all, and numbers should not come out > different on different systems. I'll second that and point to file! as a good example of how platform differences are / should be handled. Regards,

[REBOL] Re: Time, seconds and scientific notation

2004-02-24 Thread Carl Read
On 25-Feb-04, Tom Conlin wrote: > the belated but unhelpful answer you have likley heard by now is: > 'dont use windows' > since this is strictly an artifact of MS Actually, I'd consider this a REBOL problem. It's supposed to be a cross-platform language afer all, and numbers should not come

[REBOL] ANN: Kate syntax highlighter

2004-02-24 Thread Roland Hadinger
JFYI: Now there's REBOL syntax highlighting for Kate, a programmer's editor for KDE/Linux. Still under development, suggestions - as always - welcome. Here it is: http://www.errru.net/rebol/utilities/katesyntax/readme.txt http://www.errru.net/rebol/utilities/katesyntax/rebol.xml.txt -- R. -- T

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Tom Conlin
how bout ... antif: func [fn-args[block!]][not do fn-args] then anitif [fn args1 argn] On Mon, 23 Feb 2004, Ladislav Mecir wrote: > > Doc draw my attention to the %subject%, which was discussed at > comp.lang.scheme. The thread started with: > > {Suppose f is a function returning a boolean

[REBOL] Re: Time, seconds and scientific notation

2004-02-24 Thread Tom Conlin
the belated but unhelpful answer you have likley heard by now is: 'dont use windows' since this is strictly an artifact of MS On Mon, 23 Feb 2004, Hallvard Ystad wrote: > > Hi list, > > This is from a console session: > >> third 0:00:01.09 > == 1.09 > >> third 0:00:0.09 > == 9E-2 > > How can

[REBOL] small xml functions

2004-02-24 Thread bry
So I was working on doing a few little xml- parse additions, enhancements, etc. and I was starting on a documentElement function: documentElement: func[blockdom] [currentNode: make Object![tagname: pick blockdom 1 attributes: either block? pick blockdom 2 [length? pick blockdom 2][0] ]]

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Romano Paolo Tenca
> ..., but it wouldn't work for some cases. Have a look at > http://www.compkarori.com/vanilla/display/subfunc.r , which does > (essentially) the same thing ;-) and is optimized for speed by Romano (I > recently found that some improvements can still be made - 67% speed-up > and a correction

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Maxim Olivier-Adlhoch
Ladislav Wrote: > >you could use my encompass function to create an anti function. > > > > > ..., but it wouldn't work for some cases. Have a look at > http://www.compkarori.com/vanilla/display/subfunc.r , which does > (essentially) the same thing ;-) and is optimized for speed > by Romano (

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Maxim Olivier-Adlhoch
> anti: func [f [any-function!] /local exec] [ > exec: func [block] reduce ['not 'apply 'first reduce [:f] 'block] > func load mold third :f reduce [:exec first :f] > ] > that's basically what encompass does including all refinements and their values. you can even augment the argument l

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Ladislav Mecir
Maxim Olivier-Adlhoch napsal(a): >you could use my encompass function to create an anti function. > > ..., but it wouldn't work for some cases. Have a look at http://www.compkarori.com/vanilla/display/subfunc.r , which does (essentially) the same thing ;-) and is optimized for speed by Romano

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Ladislav Mecir
Hi Romano, >...but i agree, the :arg notation is never used and it requires a reference to a >value instead of the "value itself", so it is not totally "correct" to be used >it in context like this. > >About Scheme people, if they would speak "in general", they could be right: we >cannot create a

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Maxim Olivier-Adlhoch
you could use my encompass function to create an anti function. It would even handle all the refinements transparently and would map all parameters, without you needing to know the function's actual argument block. -MAx --- "You can either be part of the problem or part of the solution, but in

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Romano Paolo Tenca
Hi Lad, > I have got a few notes: > > 1) I am still not convinced, that a "get argument", (alias "fetched > argument") is a good argument passing method. The disadvantage of it is, > that you cannot easily supply a result of an expression as an argument. yes, but it is so elegant to write a

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Gabriele Santilli
Hi Anton, On Tuesday, February 24, 2004, 3:34:36 PM, you wrote: AR> func [a b][native func [a b][a = b] get/any 'a get/any 'b] AR> This 'native function is undocumented and it's not obvious AR> to me what it does. What you see is not what you get. ;-) What MOLD prints as "native" above is not

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Romano Paolo Tenca
Hi Anton, That is the serialization of a native function referenced directly. In this case happens to be the 'not function. As you can understand, native functions cannot be serialized, and mold put a 'native word for every native it should serialize. It also outputs 'op for every op! and 'acti

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Ladislav Mecir
Anton Rolls napsal(a): >The function it produces is interesting. > > > >>>f: func [a b][a = b] >>>g: anti f >>>probe :g >>> >>> >func [a b][native func [a b][a = b] get/any 'a get/any 'b] > >This 'native function is undocumented and it's not obvious >to me what it does. > >Anton. > > t

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Ladislav Mecir
Anton Rolls napsal(a): >What is the purpose and utility of such a function ? > >Anton. > > > >>{Suppose f is a function returning a boolean.Is there a way of defining >>a function anti, which, when given f, returns "not f"? >> This is a higher-order function. This style of programming is know

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Ladislav Mecir
Hi Romano, >Ok, Lad > >this is my solution, (without refinements handling and without get and lit >arguments and without optimizations) > > > I have got a few notes: 1) I am still not convinced, that a "get argument", (alias "fetched argument") is a good argument passing method. The disadvant

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Anton Rolls
The function it produces is interesting. >> f: func [a b][a = b] >> g: anti f >> probe :g func [a b][native func [a b][a = b] get/any 'a get/any 'b] This 'native function is undocumented and it's not obvious to me what it does. Anton. > -Original Message- > From: [EMAIL PROTECTED] [mai

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Anton Rolls
What is the purpose and utility of such a function ? Anton. > {Suppose f is a function returning a boolean.Is there a way of defining > a function anti, which, when given f, returns "not f"?} -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the sub

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Romano Paolo Tenca
Ok, Lad this is my solution, (without refinements handling and without get and lit arguments and without optimizations) Do not read if you want to try by yourself. . . . . . . . . . . . . . . . . . . anti: func [[catch] :f /local body][ body: copy [] parse first :f [ some [ [end | refin

[REBOL] Magic! 2.0

2004-02-24 Thread Olivier Auverlot
Hello, Magic! has been updated. You can download the new version of this web application framework from http://rwst.no-ip.com/magic20/magic20.tar.gz Documentation available at http://rwst.no-ip.com/magic20/ (in french) Best regards Olivier ;-) -- To unsubscribe from this list, just send a

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Andreas Bolka
Monday, February 23, 2004, 8:55:15 PM, Ladislav wrote: > Question: Is the guess about Rebol correct? (I will post my answer > later) I'll second Gabriele's answer: The reasoning seems to be intriguing at first glance, but it's (at least partly) wrong. A (naive) demonstration: anti: func [ f

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Gabriele Santilli
Hi Ladislav, On Monday, February 23, 2004, 8:55:15 PM, you wrote: LM> Question: Is the guess about Rebol correct? (I will post my answer later) At first glance it could seem correct, but it's clearly wrong. Regards, Gabriele. -- Gabriele Santilli <[EMAIL PROTECTED]> -- REBOL Programmer A

[REBOL] Re: port/awake (was no-wait)

2004-02-24 Thread Gabriele Santilli
Hi Paul, On Tuesday, February 24, 2004, 2:34:24 AM, you wrote: PT> What is the false for in the awake function? If AWAKE returns true, WAIT will return. Otherwise, WAIT continues waiting. For example, when all View windows are closed, the event port's awake function returns true, so that DO-EV

[REBOL] Re: Can I define an anti function?

2004-02-24 Thread Gabriele Santilli
Hi Ladislav, On Tuesday, February 24, 2004, 2:32:36 AM, you wrote: LM> It isn't, because it takes 2 arguments, while ANTI has to take just one: F ... and return a function. Regards, Gabriele. -- Gabriele Santilli <[EMAIL PROTECTED]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila -

[REBOL] Re: Time, seconds and scientific notation

2004-02-24 Thread Hallvard Ystad
Dixit Carl Read (09.23 24.02.2004): >This discussion has got me experimenting a bit. Look at this, for >instance... > >>> dec: 0.1 >== 1E-5 >>> time: 1:01 >== 1:01 >>> time/second: dec >== 1E-5 >>> time >== 1:01:00.1 Well, but when you try to access only the seconds here (after doing the

[REBOL] Re: Time, seconds and scientific notation

2004-02-24 Thread Carl Read
On 24-Feb-04, Graham Chiu wrote: > Hallvard Ystad wrote.. apparently on 23-Feb-2004/21:00:15+1:00 >> Hi list, >> This is from a console session: third 0:00:01.09 >> == 1.09 third 0:00:0.09 >> == 9E-2 >> How can I have the second example printed without scientific >> notation (as secon