[REBOL] Re: Send/attach

2003-11-27 Thread SunandaDH

Thanks Gabriele,

 Sac We need to be able to do something like:
  
  Sac print difference version 1.2.1 version 1.2.10
  
  http://www.rebol.it/~romano/#sect4.

Neat!
And useful,
Sunanda.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [encompass.r]

2003-11-27 Thread Anton Rolls

How about encompass stores the old function
name and function definition in a list maintained
within itself, so you can /restore later.
Just an idea.

Anton. 

 Hi all,
 
 
 I just wanted to let everyone know of a nifty function I just 
 uploaded to the rebol.r repository, it is called emcompass.
 
 I wanted to share it here, but its too large and will wordwrap 
 pretty badly...
 
 http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=en
 compass.r
 
 There are a lot of comments in the code (per my usual coding style)
 
 It lets you add code around a function and wraps all refinements 
 to it.  It is a follow up to the question I asked a week ago 
 about transfering all refinements to another function of the 
 same/lesser template.
 
 'ENCOMPASS can be used to modify behaviour of code, without 
 actually tampering with the code itself.  It is especially 
 usefull in patching native! funcs.
 
 simply put you can:
  -extend the argument list by adding new parameters or refinements, 
  -add pre-process code, executed before the function you are enclosing.
  -add pos-tprocess code, executed after the function you are enclosing.
  -the return value (if any) of the enclosed function can be 
 created/modified in the
   post-process, which is in turn returned by the encompassing function.
 
 the example within the rebol.org encompass.r script show how you 
 can add a confirm on every 'read done, in the case where you want 
 to monitor and intercept what a script is about to read, just 
 before it does.  Canceling the read, terminates the script.  
 
 the example even adds a refinement to read /safe which prevent 
 any confirmation when you know the file is safe.
 
 the patch replaces the global read statement, so calling this at 
 the begining of your code actually protects you from someone 
 prying files on your disk and sending them over the net without 
 your knowledge.
 
 good thing is that if the template to read changes in the future, 
 you have nothing to edit, it just continues using the new 
 template, because you do not have to tamper with it yourself. 
 
 
 The example itself is simple, but it shows just how easy it is to 
 extend/restrict functionality of any function, method, action or native.
 
 
 hope some of you find it usefull, I know I really am!
 
 
 ciao!
 
 
 -MAx
 
 PS: if some of you noticed it yesterday, I have severely updated 
 it last night, its worth getting the newer version (1.0.2)
 
 -
 Steel project coordinator
 http://www.rebol.it/~steel
 - 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Problem with Rebol in a LAN

2003-11-27 Thread Petr Krenzelok

Mauro Fontana wrote:

Hi all,
I would like to use Rebol in a LAN to write some simple client/server apps 
but I find it impossible to do any communication with any other computer on 
the LAN.
That is I cannot open any TCP or UDP port on any computer. Actually even a 
open tcp://myhost:anynumber works.

We have a firewall on the LAN that checks for external accesses (that is 
towards Internet) but I do not think it can influence internal packet 
transmission.

So, can anyone help me sirting this problem out?

I hope the given info is enough.

MF

  

1) try setting debugging mode: trace/net: true
2) it surely should work. Do you have rebol NET settings set properly in 
your user.r? E.g. mine is:
set-net [EMAIL PROTECTED] orion.sec.trz.cz orion.sec.trz.cz 
proxy.sec.trz.cz 3128 generic]

Imo - if you can ping other IP and there is no local (personal) firewall 
software blocking the connection, it has to work :-)

-pekr-


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: COLLECTing results

2003-11-27 Thread Romano Paolo Tenca

Hi, all

this works also with foreach (not only with loop and repeat):

use [insert-only break-return res] [
 insert-only: func [series value] [insert/only series value]
 break-return: func [value] [break/return value]
 res: func [value] [func [] reduce [value]]
 collectB: func [
  {Collects block evaluations, use as body in For, Repeat, etc.}
  block [block!] Block to evaluate.
  /initial result [series!] Initialize the result.
  /only Inserts into result using the Only refinement.
 ][
  initial: res reduce [none any [make result result make block! 10]]
  reduce [
   :loop 1 reduce [
:change :initial reduce [:break-return]
pick reduce [:insert :insert-only] not only
 :tail :second :initial :do block
 ;:do block could be to-paren block, to make it a little more fast
 ; but so the block is copyed
:change :initial none
   ]
   :do :initial
  ]
 ]
]

---
Ciao
Romano

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [encompass.r]

2003-11-27 Thread Maxim Olivier-Adlhoch

very good idea!

but this would only work for global words.  I often use the encompass return function 
in an object, in order to overide the default function only within the context of an 
object.  

thats basically what namespaces (contexts, objects) are for.


Anyone... What is the best way for a function to detect if it is part of an object?


-MAx
---
You can either be part of the problem or part of the solution, but in the end, being 
part of the problem is much more fun.
 

 -Original Message-
 From: Anton Rolls [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 27, 2003 6:46 AM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] Re: [encompass.r]
 
 
 
 How about encompass stores the old function
 name and function definition in a list maintained
 within itself, so you can /restore later.
 Just an idea.
 
 Anton. 
 
  Hi all,
  
  
  I just wanted to let everyone know of a nifty function I just 
  uploaded to the rebol.r repository, it is called emcompass.
  
  I wanted to share it here, but its too large and will wordwrap 
  pretty badly...
  
  http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=en
  compass.r
  
  There are a lot of comments in the code (per my usual coding style)
  
  It lets you add code around a function and wraps all refinements 
  to it.  It is a follow up to the question I asked a week ago 
  about transfering all refinements to another function of the 
  same/lesser template.
  
  'ENCOMPASS can be used to modify behaviour of code, without 
  actually tampering with the code itself.  It is especially 
  usefull in patching native! funcs.
  
  simply put you can:
   -extend the argument list by adding new parameters or refinements, 
   -add pre-process code, executed before the function you 
 are enclosing.
   -add pos-tprocess code, executed after the function you 
 are enclosing.
   -the return value (if any) of the enclosed function can be 
  created/modified in the
post-process, which is in turn returned by the 
 encompassing function.
  
  the example within the rebol.org encompass.r script show how you 
  can add a confirm on every 'read done, in the case where you want 
  to monitor and intercept what a script is about to read, just 
  before it does.  Canceling the read, terminates the script.  
  
  the example even adds a refinement to read /safe which prevent 
  any confirmation when you know the file is safe.
  
  the patch replaces the global read statement, so calling this at 
  the begining of your code actually protects you from someone 
  prying files on your disk and sending them over the net without 
  your knowledge.
  
  good thing is that if the template to read changes in the future, 
  you have nothing to edit, it just continues using the new 
  template, because you do not have to tamper with it yourself. 
  
  
  The example itself is simple, but it shows just how easy it is to 
  extend/restrict functionality of any function, method, 
 action or native.
  
  
  hope some of you find it usefull, I know I really am!
  
  
  ciao!
  
  
  -MAx
  
  PS: if some of you noticed it yesterday, I have severely updated 
  it last night, its worth getting the newer version (1.0.2)
  
  -
  Steel project coordinator
  http://www.rebol.it/~steel
  - 
 
 -- 
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
 
 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: vim again

2003-11-27 Thread Maxim Olivier-Adlhoch

ok I checked out vim last week, but I don't get it.

why would you want to use vi style of cryptic text editing in the year 2003?  is it 
just out of habit of using vi in the past?

 maybe its just the version of vim which installed itself, which just looked like a 
shell with vi loaded... did I miss out on something... there where no menue , no point 
and click features that I noticed...

I work in ultra edit and man, I don't see how I could code faster (within a text 
editor)!

it can even do advanced stuff like replace/all in a collection of files and record 
macros for that 34 keystroke procedure you have to apply to those 104 items of text 
;-)...


I'm just curious, really, I'm not saying any vi(m) user is wrong, just that I don't 
understand.

thanks for any replies trying to explain :-)

-MAx
---
You can either be part of the problem or part of the solution, but in the end, being 
part of the problem is much more fun.
 

 -Original Message-
 From: Ingo Hohmann [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2003 5:12 PM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] vim again
 
 
 
 Hi Vimmers out there,
 
 I have a beta version of my rebol.vim so far ... goto
 
 http://www.h-o-h.org/rebol-vim.tgz
 
 (Sorry, not yet linked, and it seems I desperately need to 
 update my page ;-)
 
 
 Kind regards,
 
 Ingo
 
 
 
 
 -- 
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
 
 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Send/attach

2003-11-27 Thread Romano Paolo Tenca

Hi,

 View for AIX seems to be at 1.2.1.17.  I do not use View on AIX because
 I want to run REBOL from a shell script.  Running Core from a shell
 script works, but if I try to run View from a shell script it tries to
 start an X-server, which I don't want.  So I have just Core (2.3) on
 AIX.  Of course, IF View 1.2.1.17 has Core 2.5.1 or higher AND it were
 possible to use View to run a script without trying to open a window,
 THEN I could get the latest View on AIX and use that, instead of Core
 only.  I have tried that, and it seems not to work.

Oh! AIX sems the only Core stopped at 2.3 version!

I have not AIX so i can't say, but from what i read, seems that View needs X
from startup.

This page lists differences in global functions betwween core 2.3.0 and core
2.5.6:

http://www.rebol.it/%7Eromano/make_func_diff_2.5.6.3.1-2.3.0.3.1.html

i should like to add a 256/250 diff, but i have not that version of Core for
Windows.

I think that a compatibilty layer for 2.3 can be built copying these
functions:

  1.1. alter
  1.2. attempt
  1.3. build-attach-body
  1.4. build-markup
  1.5. component?
  1.7. context
  1.10. decode-url
  1.11. dispatch
  1.12. dump-obj
  1.15. extract
  1.19. has
  1.30. set-user-name
  1.32. sign?
  1.35. suffix?

Obviously, many functions (native or not) can have more refinements, different
argument types or bug fixed, but this has not been checked in the above page.

For example, i should try to copy the new Help function (and the Send function
:-).

---
Ciao
Romano

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: vim again

2003-11-27 Thread Gabriele Santilli

Hi Maxim,

On Thursday, November 27, 2003, 4:47:23 PM, you wrote:

MOA why would you want to use vi style of cryptic text
MOA editing in the year 2003?  is it just out of habit of using
MOA vi in the past?

Because it is much better? ;-)

Actually, VIM is much, much more than VI.

MOA  maybe its just the version of vim which installed
MOA itself, which just looked like a shell with vi loaded... did
MOA I miss out on something... there where no menue , no point
MOA and click features that I noticed...

GVIM  has menus etc., but I almost never use it. With the keyboard
it's so much faster...

MOA I work in ultra edit and man, I don't see how I could
MOA code faster (within a text editor)!

If I had to go to something different than VIM, I'd use ION.pe. At
least it's fully integrated with REBOL.

Regards,
   Gabriele.
-- 
Gabriele Santilli [EMAIL PROTECTED]  --  REBOL Programmer
Amiga Group Italia sez. L'Aquila  ---   SOON: http://www.rebol.it/

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [encompass.r]

2003-11-27 Thread SunandaDH

Max:

 Anyone... What is the best way for a function to detect if it is part of an 
 object?

One way would be to check if 'self is defined.

Sunanda.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [encompass.r]

2003-11-27 Thread Maxim Olivier-Adlhoch

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 27, 2003 11:33 AM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] Re: [encompass.r]
 
 
 
 Max:
 
  Anyone... What is the best way for a function to detect if 
 it is part of an 
  object?
 
 One way would be to check if 'self is defined.


I though of that, but it is very possible that someone will use self in the global 
context. even checking if its type is object! isn't completely safe...

isn't there a way to probe the current context, one which works whether we are in an 
object or the global namespace ?

I might add a /bind refinement which forces a bind of the created function block to an 
object.  When used, It would implicitly make /revert function differently than when 
defined 'globally'.


As I don't need this functionality right now, I'll put it on the back burner, but if 
any one DOES need it, I'll raise the priority.

I'm pushing slim as the only code I write on right now... so everything else is 
secondary.

I want to start working on STEEL|FORGE SOO badly.

I might start working on a QD forge prototype (a closed rebol-coding exclusive 
toolset with no api) to bootstrap the real application and improve liquid-vid coding 
speed.


cheers!

-MAx
-
Steel project coordinator
http://www.rebol.it/~steel
- 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Problem with Rebol in a LAN How do you ping in Rebol?

2003-11-27 Thread Mauro Fontana

On Thu, 27 Nov 2003 13:52:09 +0100, Petr Krenzelok [EMAIL PROTECTED] 
wrote:

 1) try setting debugging mode: trace/net: true
 2) it surely should work. Do you have rebol NET settings set properly in 
 your user.r? E.g. mine is:
 set-net [EMAIL PROTECTED] orion.sec.trz.cz orion.sec.trz.cz 
 proxy.sec.trz.cz 3128 generic]

 Imo - if you can ping other IP and there is no local (personal) firewall 
 software blocking the connection, it has to work :-)


Thanks for the answer.

I should have the proper net setup, though I have not set any proxy server.
I user trace on but it fleooded the console with too many info to 
understand something.
I use it at work, so I cannot give it too much time. I'll try the trace/net 
option.

BTW, what's the right way to make a ping in Rebol?

MF

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Send/attach

2003-11-27 Thread bry

 
  So parts of REBOL are written 
in...REBOL!  Those RT guys are quite the
  hackers.
 
 
 Eventually RT should mention that more? 
 

right, at least part of rebol is improvable 
source
:)


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] [bug?] Problem with 'load

2003-11-27 Thread SunandaDH

Is this a bug, or am I just being thick?

I  just want to evaluate a header, but REBOL won't let me even load it if the 
needs aren't met:

 load/all/header rebol [needs: [1.2.1 view]]

will work if you are running view.

But ask for a version you definitely don't have:

 load/all/header rebol [needs: [1.2.1 ]]
** Script Error: This script needs   or better to function correctly
** Near: load/all/header rebol [needs: [1.2.1 ]]

Load/all is not meant to evaluate, so I reckon it's a bug. It's certainly a 
problem.

Thanks to Chris RG for spotting this while trying to contribute a script to 
the Script LibraryWe try to load the header for validation, but we're 
running Core so the problem was reported as an unable to load error, leading to 
some mutual head-scratching.

Sunanda.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [encompass.r]

2003-11-27 Thread Anton Rolls

There is no notion of current context.
The same function can be referenced by words
in two different objects, can't it?
Therefore, which context is current?

It's probably infeasible to add a complete
undo function, but perhaps an /original
refinement might be good so you don't have
to remember the original function. It doesn't
buy you much, though.

Anton.

  Max:
  
   Anyone... What is the best way for a function to detect if 
  it is part of an 
   object?
  
  One way would be to check if 'self is defined.
 
 
 I though of that, but it is very possible that someone will use 
 self in the global context. even checking if its type is object! 
 isn't completely safe...
 
 isn't there a way to probe the current context, one which works 
 whether we are in an object or the global namespace ?
 
 I might add a /bind refinement which forces a bind of the created 
 function block to an object.  When used, It would implicitly make 
 /revert function differently than when defined 'globally'.
 
 
 As I don't need this functionality right now, I'll put it on the 
 back burner, but if any one DOES need it, I'll raise the priority.
 
 I'm pushing slim as the only code I write on right now... so 
 everything else is secondary.
 
 I want to start working on STEEL|FORGE SOO badly.
 
 I might start working on a QD forge prototype (a closed 
 rebol-coding exclusive toolset with no api) to bootstrap the real 
 application and improve liquid-vid coding speed.
 
 
 cheers!
 
 -MAx

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.